为什么这段代码只能读,不能写?
//植物大战僵尸阳光基址 006A9EC0//一级偏移 768 二级偏移 5560 [[0x006A9EC0]+0x768]+0x5560
LPCVOID base=(LPCVOID)0x006A9EC0;
DWORD ID;
HANDLE m_hwnd;
DWORD s;
CString m_str;
hwnd=::FindWindow(NULL,"植物大战僵尸中文版");
::GetWindowThreadProcessId(hwnd,&ID);
m_hwnd=::OpenProcess(PROCESS_ALL_ACCESS | PROCESS_VM_WRITE | PROCESS_VM_OPERATION ,FALSE,ID);
::ReadProcessMemory(m_hwnd,base,(LPVOID)&m_m,4,&s);
::ReadProcessMemory(m_hwnd,(LPCVOID)(m_m+0x768),(LPVOID)&m_m,4,&s);
::ReadProcessMemory(m_hwnd,(LPCVOID)(m_m+0x5560),(LPVOID)&m_m,4,&s);
//UpdateData(false);
//LPVOID pbase=(LPVOID)&m_m;
GetDlgItemText(IDC_EDIT1,m_str);
int buf=atoi(m_str);
::WriteProcessMemory(m_hwnd,(LPVOID)m_m,&buf,4,&s);
UpdateData(true);
CloseHandle(m_hwnd);