invoke VirtualQueryEx, pid,Start,addr Men,28
.if eax != 0
invoke GlobalAlloc,GMEM_FIXED,Men.RegionSize
.if eax != 0
invoke ReadProcessMemory ,pid,Start, eax,Men.RegionSize ,0
看别人的代码这样用过,自己试一下ReadProcessMemory返回值一直是1不知为什么
------解决方案--------------------
返回 1 (非 0)是函数执行成功啊,返回 0 才是失败。
------解决方案--------------------
BOOL WINAPI ReadProcessMemory(
_In_ HANDLE hProcess,
_In_ LPCVOID lpBaseAddress,
_Out_ LPVOID lpBuffer,
_In_ SIZE_T nSize,
_Out_ SIZE_T *lpNumberOfBytesRead
);