Forum > Operating Systems
WriteProcessMemory not working for me...
440bx:
Did you first check that OpenProcess was successful ?
CodeSculptor:
To answer questions, YES, I did check to see that the process was open.
And the biggest clue was Martin_fr's comment regarding : "LastError"...
The 998 showed it was lack of permission to mod memory..
So the NEW write is now working as (oldSettings is : DWORD ) :
VirtualProtectEx( Process_Handle,
Pointer( Heap_Byte_Address ),
2,
PAGE_EXECUTE_READWRITE,
@oldSettings );
WriteProcessMemory( Process_Handle,
Pointer( Heap_Byte_Address ),
@tmpByte_Array,
2,
HowManyBytesWritten );
VirtualProtectEx( Process_Handle,
Pointer( Heap_Byte_Address ),
2,
oldSettings,
@oldSettings);
Thanks everyone :)
Navigation
[0] Message Index
[*] Previous page