HWND hWnd
=
::FindWindow(NULL, TEXT(
"
QQ游戏 - 连连看角色版
"
));
if (hWnd != NULL) {
DWORD pid;
GetWindowThreadProcessId(hWnd, & pid);
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, false , pid);
if (hProcess != NULL) {
int num;
SIZE_T cnt;
if (ReadProcessMemory(hProcess, (LPCVOID) 0x112f78 , (LPVOID) & num, 4 , & cnt)) {
if ( 4 == cnt) {
// 读取数据成功
}
}
}
}
if (hWnd != NULL) {
DWORD pid;
GetWindowThreadProcessId(hWnd, & pid);
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, false , pid);
if (hProcess != NULL) {
int num;
SIZE_T cnt;
if (ReadProcessMemory(hProcess, (LPCVOID) 0x112f78 , (LPVOID) & num, 4 , & cnt)) {
if ( 4 == cnt) {
// 读取数据成功
}
}
}
}
HWND hWnd
=
::FindWindow(NULL, TEXT(
"
QQ游戏 - 连连看角色版
"
));
if (hWnd != NULL) {
DWORD pid;
GetWindowThreadProcessId(hWnd, & pid);
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, false , pid);
if (hProcess != NULL) {
int num = 0 ;
SIZE_T cnt;
if (WriteProcessMemory(hProcess, (LPVOID) 0x1163b0 , & num, 4 , & cnt)) {
if ( 4 == cnt) {
MessageBox(TEXT( " GOOD! " ));
}
}
}
}
if (hWnd != NULL) {
DWORD pid;
GetWindowThreadProcessId(hWnd, & pid);
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, false , pid);
if (hProcess != NULL) {
int num = 0 ;
SIZE_T cnt;
if (WriteProcessMemory(hProcess, (LPVOID) 0x1163b0 , & num, 4 , & cnt)) {
if ( 4 == cnt) {
MessageBox(TEXT( " GOOD! " ));
}
}
}
}