procedure TForm1.Button1Click(Sender: TObject); var Form1: TForm1; handle:HWND; pid:dword; OpenHandle:THandle; lpNumberOfBytes:dword; begin handle := FindWindow('qtClass', 'Qt'); if handle= 0 then messagebox(handle,'请先打开QT','error',mb_ok); GetWindowThreadProcessId (handle, @pid); OpenHandle:=OpenProcess(PROCESS_ALL_ACCESS, false, pid); WriteProcessMemory (OpenHandle, Ptr($004BA111), PChar(Chr(235)) ,1, lpNumberOfBytes) ; CloseHandle (OpenHandle); end; 这段代码哪里有错误啊? 我想将程序内存地址004BA111值改为235 另外,为什么handle:HWND必须在过程中声明,设成全局变量会提示找不到 请给出WriteProcessMemory的具体使用,这个lpNumberOfBytes不声明dword变量,直接写成0怎么不行? 代码调试时,的确修改了程序内存(HIPS软件提示access memory),可是实际在程序中并没有体现出来 请诸位帮忙
12345678_0001