例:WriteProcessMemory(hWnd,pRemoteThread,&ThreadProc,THREADSIZE,0)<br><br>BOOL WriteProcessMemory(<br> HANDLE hProcess, // handle to process whose memory is written to<br> LPVOID lpBaseAddress,<br> // address to start writing to<br> LPVOID lpBuffer, // pointer to buffer to write data to<br> DWORD nSize, // number of bytes to write<br> LPDWORD lpNumberOfBytesWritten <br> // actual number of bytes written<br>);<br> <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.