Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[C++] exe to dll problem

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Chaosis13
Master Cheater
Reputation: 0

Joined: 14 Aug 2007
Posts: 372

PostPosted: Mon Jul 21, 2008 4:45 pm    Post subject: [C++] exe to dll problem Reply with quote

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
View user's profile Send private message
rapion124
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Mar 2007
Posts: 1095

PostPosted: Tue Jul 22, 2008 6:17 am    Post subject: Reply with quote

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
View user's profile Send private message
DoomsDay
Grandmaster Cheater
Reputation: 0

Joined: 06 Jan 2007
Posts: 768
Location: %HomePath%

PostPosted: Tue Jul 22, 2008 7:25 am    Post subject: Reply with quote

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
View user's profile Send private message
Chaosis13
Master Cheater
Reputation: 0

Joined: 14 Aug 2007
Posts: 372

PostPosted: Tue Jul 22, 2008 11:03 am    Post subject: Reply with quote

It worked for me before... Shocked

But thanks for the help. I will go try that now.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites