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++] Injection Functions

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Tue Oct 23, 2007 8:49 pm    Post subject: [C++] Injection Functions Reply with quote

Made this for the NosHack that I released. Nothing major 3 functions that use two basic and pretty well known methods of injection. Needs little editing to get working, just need to replace the hook name with your own and modify the registry part of method 2. (If your game doesn't use the registry, you could add support to read from an INI file for the path, etc.)

Call InjectHook() first which will determine the best method to use at the given time. It will determine the method to use based on if the game is currently running in memory or not. If it is, it will use method 1 which will create a remote thread and inject.

Method two will occur if the given process is not located in memory, if so, it will locate the game path via registry (again change if you need to) and launch the game using ForceLib to inject.

Source is pretty well commented incase you don't understand something, it should explain things well enough. Any questions just post.



The Extension 'rar' was deactivated by an board admin, therefore this Attachment is not displayed.


_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
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