Is it possible to read process memory of a 64 bit process from a 32bit app?

前端 未结 5 1082
孤独总比滥情好
孤独总比滥情好 2020-12-10 14:35

On windows 64 bit, I\'ve got a 32 bit process that reads the memory of other 32 bit processes, and I\'d like it to be able to read 64 bit processes too.

ReadProcessM

5条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-10 15:30

    ReadProcessMemory can read any size of memory including from x86 processes reading x64 processes.

    You can without a problem, in an x86 program, do the following:

    DWORD64 test = 0;
    ReadProcessMemory(hProcess, (LPCVOID)lpBaseAddress, &test, sizeof(DWORD64), NULL);
    

    Which would allow you to dereference an x64 pointer from a x86 process.

提交回复
热议问题