Writeprocessmemory syntax
Ok hello MPGH community i am having some C++ troubs
I am making a stand alone hack (not a dll that needs to be injected) and i have a question that deals with the syntaxing of WriteProcessMemory.
Code:
WriteProcessMemory(ProcessHandle,(LPVOID*)(DWORD)address, &value , MY QUESTION,NULL);
How do i know how many bytes i just wrote? For instance, for an ammo address, (which lets just say is 0x0FAA458B) i write the value 99. What would my bytes be?
Also i have another quick question. Looking at some pointers for Combat Arms, they use something that is cshell.dll+0xHexAddress. Would i use the same kind of method for the address? i am very new to game hacking, so sorry if this is really simple
No it doesn't matter, just do sizeof(int) or sizeof( long ) where int and long are your variable types
change ProcessHandle = OpenProcess(PROCESS_ALL_ACCESS,0,pid);
into
HANDLE ProcessHandle = OpenProcess(PROCESS_ALL_ACCESS,0,pid);
and change vid GetProcess(..)
into
HANDLE GetProcess(...)
The first error is because you are going to return a handle so the return TYPE is HANDLE. The second error was you weren't declaring ProcessHandle as a HANDLE it was just nothing.
vid GetProcess(..) ? if you mean void Getprocess, i dont have that anywhere in my code
Sorry I meant HANDLE GetProcess(..)
cool it works! Thanks alot! You have msn or aim?