ReadProcessMemory on a 64 bit proces always returns Error 299
I'm having some trouble with ReadProcessMemory My code is 64 bit I can read the memory of any 32 bit process , but ReadProcessMemory always fails with error code 299 (Partial read) returning 0 bytes read. Done my research and most answers were relate to privilges , but I have Debugging token enabled and running as admin , The address i read the the ImageBase in the PE optional header I tried to check the page status using VirtualQueryEx and got access denied! Note : The code runs perfectly on any 32 bit process. Any Ideas what maybe be causing this ? HANDLE hProcess; DWORD pid; EnableDebugPriv