问题所在?修改进程代码区
[code=C/C++]void CTestDlg::OnOK() {
BYTE pro[5] = {0xe9};
DWORD *pD = (DWORD *)0x00022200;
memcpy(pro+1, (LPVOID)pD, 4);
HWND hwnd = ::FindWindow("WSWINDOW", NULL);
DWORD pid = ::GetWindowThreadProcessId(hwnd, NULL);
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);
DWORD dwOld;
::VirtualProtectEx(hProcess, (DWORD *)0x00589f30, 5, PAGE_READWRITE, &dwOld);
WriteProcessMemory(hProcess, (DWORD *)0x00589f30, pro, 5, NULL);
::VirtualProtectEx(hProcess, (DWORD *)0x00589f30, 5, dwOld, NULL);
}
[/code]
修改后问题仍存在。
点击IDOK按钮执行这个OnOk()函数的效果是: