| View previous topic :: View next topic |
| Author |
Message |
Chaosis13 Master Cheater
Reputation: 0
Joined: 14 Aug 2007 Posts: 372
|
Posted: Mon Jul 21, 2008 4:45 pm Post subject: [C++] exe to dll problem |
|
|
I am making a ram searcher/scanner in C++ with Dev-C++. After I had a really good beta version working I decided to make it into a dll with VC++ 2008. When I compile I get no errors, just one or two errors which dont matter. When I inject it I get problems.
I had to use AllocConsole, but when I try to output stuff nothing happens... I have done this before any it has worked just fine... Whats wrong?
EDIT:
I put in some beeps and found out that my code is running smoothly, only that it skips over cout and other things that write to the console window. I know it skips them, b/c I tryed using the alarm (\a), and heard nothing.
HELP PLZ!
|
|
| Back to top |
|
 |
rapion124 Grandmaster Cheater Supreme
Reputation: 0
Joined: 25 Mar 2007 Posts: 1095
|
Posted: Tue Jul 22, 2008 6:17 am Post subject: |
|
|
| It seems like you're encountering runtime errors, like access violations. Do you know how to use OutputDebugString and tombstones? For example, whenever you scan memory, you do OutputDebugString("Scanning memory"). It seems like you're scanning memory that doesn't have read access and your program crashes.
|
|
| Back to top |
|
 |
DoomsDay Grandmaster Cheater
Reputation: 0
Joined: 06 Jan 2007 Posts: 768 Location: %HomePath%
|
Posted: Tue Jul 22, 2008 7:25 am Post subject: |
|
|
You can't use CIn\COut when you're creating your own console.
If you do want to use it using a DLL, use GetStdHandle(to get the console's input\output\error handles), and the WriteConsole()\ ReadConsole() API's to create your own input\output functions.
|
|
| Back to top |
|
 |
Chaosis13 Master Cheater
Reputation: 0
Joined: 14 Aug 2007 Posts: 372
|
Posted: Tue Jul 22, 2008 11:03 am Post subject: |
|
|
It worked for me before...
But thanks for the help. I will go try that now.
|
|
| Back to top |
|
 |
|