WriteProcessMemory doesn't work

Posts 1–4 of 4 · Page 1 of 1
WriteProcessMemory doesn't work
Hey guys, Ive got a problem, I want to have noRecoil and noFlash so I opened the process like this
Code:
mw2_hwnd = FindWindow(NULL,L"AlterIWNet");
GetWindowThreadProcessId(mw2_hwnd,&mw2_pid);
mw2_process_w = OpenProcess(PROCESS_VM_WRITE,false,mw2_pid);
then wrote the new hexcode like this
Code:
#define ADDR_FLASH	0x00457310
BYTE NoFlash[6] = {0xB8, 0x00, 0x00, 0x00, 0x00, 0xC3};
WriteProcessMemory(mw2_process_w,(PVOID)(ADDR_FLASH),&NoFlash,6,NULL);
but in game nothing happens.
What do I have to do?

Greetings
NEokil
Quote Originally Posted by Neokil View Post
Hey guys, Ive got a problem, I want to have noRecoil and noFlash so I opened the process like this
Code:
mw2_hwnd = FindWindow(NULL,L"AlterIWNet");
GetWindowThreadProcessId(mw2_hwnd,&mw2_pid);
mw2_process_w = OpenProcess(PROCESS_VM_WRITE,false,mw2_pid);
then wrote the new hexcode like this
Code:
#define ADDR_FLASH	0x00457310
BYTE NoFlash[6] = {0xB8, 0x00, 0x00, 0x00, 0x00, 0xC3};
WriteProcessMemory(mw2_process_w,(PVOID)(ADDR_FLASH),&NoFlash,6,NULL);
but in game nothing happens.
What do I have to do?

Greetings
NEokil
Code:
mw2_hwnd = FindWindowA(NULL, "alterIWnet");
If nothing happens then try to call the VirtualProtectEx(), maybe the address is write protected.
ok,
I dont know why but when I tried to get the HANDLE just before writing it worked...
Quote Originally Posted by Neokil View Post
ok,
I dont know why but when I tried to get the HANDLE just before writing it worked...
What? Please explain better, also have you tried my solution too?
Posts 1–4 of 4 · Page 1 of 1
This thread is closed for replies.

Tags

None

Talk with us