ProcessID = PID (编辑框1.内容)
ProcessHandle = OpenProcess (#PROCESS_ALL_ACCESS, 假, ProcessID)
addrStart = VirtualAllocEx (ProcessHandle, 0, 1024, #MEM_COMMIT, #PAGE_EXECUTE_READWRITE)
.如果真 (addrStart = 0)
返回 (0)
.如果真结束
调试输出 (addrStart)
dll_name = ??? () '
b = WriteProcessMemory (ProcessHandle, addrStart, dll_name + 9, 100, 0) ' 关键就是这个地方函数的正确入口
.如果真 (b = 假)
返回 (0)
.如果真结束
hThread = CreateRemoteThread (ProcessHandle, lp, 0, addrStart, 0, 0, 0)
.如果真 (hThread = 0)
返回 (0)
.如果真结束
WaitForSingleObject (hThread, #INFINITE)
GetExitCodeThread (hThread, 取变量地址 (hDll))
VirtualFreeEx (ProcessHandle, addrStart, 0, #MEM_RELEASE)
CloseHandle (hThread)
CloseHandle (ProcessHandle)
上一篇 自定义数据类型数组排序例程