atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Tue Oct 23, 2007 8:49 pm Post subject: [C++] Injection Functions |
|
|
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.
_________________
- Retired. |
|