hi...
i've got a big Problem. I cannot open the WoW process with "PROCESS_ALL_ACCESS". By changing the access-level, e.g. to "READ_CONTROL", then ReadProcessMemory doesn't work anymore.
Code:
int main()
{
HWND hWnd = FindWindow(0, "World of Warcraft");
if(!hWnd)
{
MessageBox(0, "Error cannot find window.", "Error", MB_OK|MB_ICONERROR);
return 1;
}
DWORD ProccessID;
GetWindowThreadProcessId(hWnd, &ProccessID);
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, ProccessID);
if(!hProcess)
{
MessageBox(0, "Could not open the process!", "Error!", MB_OK|MB_ICONERROR);
return 1;
}
uint32 buffer = 0;
if (!ReadProcessMemory(hProcess, (void *)(0x05AF3F6C), &buffer, sizeof(uint32), 0))
{
MessageBox(0, "Could not read memory!", "Error!", MB_OK|MB_ICONERROR);
return 1;
}
CloseHandle(hProcess);
system("pause");
return 0;
}
In one of these steps i always get an error...
can you help me plz