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++]Problem openning a window through a DLL

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Fri Mar 14, 2008 10:55 am    Post subject: [C++]Problem openning a window through a DLL Reply with quote

I've made a little Icy Tower trainer, it works fine on my other computer but on this computer it doesn't work.

I used a thread to create the window and process the messages, but I never called this thread. (only when I created the thread, its called automatically)

But when I tick a check box (which activates a hack, for example God Mode) when I use my new "ability" (for example, don't die when falling off the screen using god mode) then I get an error "Unable to register class", which is located at my thread.

Code:
if (!RegisterClassEx(&wcx))
   {
      MessageBox(NULL, L"Unable to register class!", L"Error!", MB_OK | MB_ICONEXCLAMATION);
      return FALSE;
   }

I checked if CreateThread was called again, and it wasn't, I tried finding out what accesses to my thread for the second time but I found nothing...

Why does my thread loop itself? Surprised
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Fri Mar 14, 2008 2:34 pm    Post subject: Reply with quote

You kinda need to show us some more code then just your error handle for RegisterClassEx. Such as the code before that which should be the window class filling.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Sat Mar 15, 2008 10:40 am    Post subject: Reply with quote

I know, but I didn't find anything that might call the thread, I just asked what might call it, maybe not from the DLL, but I figured it out, I calculated the jump to a code cave wrong, I wrote a wrong address, for example I needed 0x500 - 5 I wrote minus 0x495 instead of minus 0x4FB...
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