|
#1
|
|||
|
|||
|
Ok many ask how to create a trainer. I wont explain here how to search and all. I will just give my main poke function that i find on internet and make simplier. It does write in a certain place in memory in a certain process (a game for example).
It work well with the free Borland Builder but should work with mingw or cygwin also. just copy the code snipet bellow and put it in you program. Should work without any problems in console or in Windows mode. parameter explanation: Wname: name of the process, just look in task manager if you are not sure. addr: adress to be writen in newbyte: byte to be writen in a string. let say you want to write 0x90, 0x90 so you write it this way "\x90\x90" nbyte: number of byte to be writen. Make sure it match with the number of byte you insert in newbyte. here an example: poke_window("Robin Hood: Defender Of The Crown", 0x00425B8A, "\x90\x90",2 ) One last thing. Make sure that there is a delay between writes (or write just once in code segment). or it will slow down you game. Code:
//include those in order to make it work
#include <iostream.h>
#include <windows.h>
int poke_window(char wname[50], DWORD addr, BYTE newbyte[12],int nbyte)
{
HWND Wnd=0;
LPDWORD PID;
DWORD Proc=0;
HANDLE Hproc;
DWORD MWritte;
Wnd = FindWindow(NULL, wname); // see if it exist
if ( Wnd )
{
Proc = GetWindowThreadProcessId(Wnd,(LPDWORD) &PID); //get a PROCESS number
if (Proc)
{
Hproc= OpenProcess(PROCESS_ALL_ACCESS,NULL,(DWORD)PID);
if(Hproc)
WriteProcessMemory (Hproc, (LPVOID)addr, newbyte, nbyte,&MWritte);
}
}
return(0);
}
Last edited by pikachu5501; 19-03-2007 at 09:35. |
| Sponsored Links |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Rainbow Six Vegas v1.04 Trainer Doesn't work | mfw41 | Game Trainers | 7 | 30-03-2007 22:13 |
| The best (and fun) NFS:Carbon trainer available | intoksicated | General Gaming | 3 | 22-12-2006 04:55 |
| Simple questions please answer | jimmyps2dimwit | PS2 Games | 3 | 01-09-2002 11:05 |