-
-
[求助]WriteProcessMemory总是失败怎么回事啊
-
发表于:
2013-12-30 09:32
4747
-
[求助]WriteProcessMemory总是失败怎么回事啊
Remoteaddr=VirtualAllocEx(hp,(PVOID)BaseAddr,(ULONG)(ULONG(AllSize/0x1000)+1)*0x1000,MEM_COMMIT |MEM_RESERVE,PAGE_EXECUTE_READWRITE);
if (!WriteProcessMemory(hp,Remoteaddr,(PVOID)LocalVirtualAddress,(ULONG)(ULONG(AllSize/0x1000)+1)*0x1000,NULL))
{
DWORD a= GetLastError();
::MessageBoxA(NULL,"写入失败!","",MB_OK);
}
基本上除了Remoteaddr之外都是ULONG类型的变量,
返回a为487,是不可读写的内存地址,但是我用CE可以写啊!不知道错在哪儿!
初学VC,望大牛们指教!
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!