-
-
[求助]WriteProcessMemory总是失败怎么回事啊
-
发表于:
2013-12-30 09:32
4729
-
[求助]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,望大牛们指教!
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课