请问WriteProcessMemory怎么用?(20分)

  • 主题发起人 主题发起人 icysword
  • 开始时间 开始时间
I

icysword

Unregistered / Unconfirmed
GUEST, unregistred user!
请问WriteProcessMemory怎么用? 这样用对吗?<br>WriteProcessMemory(hProcess,pointer($00403f29),@a1,1,lpWritten);
 
例:WriteProcessMemory(hWnd,pRemoteThread,&amp;ThreadProc,THREADSIZE,0)<br><br>BOOL WriteProcessMemory(<br>&nbsp; HANDLE hProcess, &nbsp;// handle to process whose memory is written to<br>&nbsp; LPVOID lpBaseAddress,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // address to start writing to<br>&nbsp; LPVOID lpBuffer, &nbsp;// pointer to buffer to write data to<br>&nbsp; DWORD nSize, &nbsp; &nbsp; &nbsp;// number of bytes to write<br>&nbsp; LPDWORD lpNumberOfBytesWritten <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // actual number of bytes written<br>);<br>&nbsp;<br>Parameters<br>hProcess <br>Handle to the process whose memory is to be modified. The handle must have PROCESS_VM_WRITE and PROCESS_VM_OPERATION access to the process. <br>lpBaseAddress <br>Pointer to the base address in the specified process to be written to. Before any data transfer occurs, the system verifies that all data in the base address and memory of the specified size is accessible for write access. If this is the case, the function proceeds; otherwise, the function fails. <br>lpBuffer <br>Pointer to the buffer that supplies data to be written into the address space of the specified process. <br>nSize <br>Specifies the requested number of bytes to write into the specified process. <br>lpNumberOfBytesWritten <br>Pointer to the actual number of bytes transferred into the specified process. This parameter is optional. If lpNumberOfBytesWritten is NULL, the parameter is ignored.
 
主要是指针的参数不太会用.<br>谁有关于DELPHI指针的介绍文章吗? 能不能贴来以供学习. 谢谢.
 
接受答案了.
 
后退
顶部