'模块部分
Private Const PROCESS_VM_WRITE = (&H20) '用OpenProcess打开进程时指定写内存空间权限
Private Const PROCESS_VM_OPERATION = (&H8) '用OpenProcess打开进程时指定操作权限。MSDN上说:Enables using the process handle in the VirtualProtectEx and WriteProcessMemory functions to modify the virtual memory of the process.
Private Const PROCESS_CREATE_THREAD = (&H2) '用OpenProcess打开进程时指定创建线程权限
'窗体部分
'在过程中调用 OpenProces
pHandle = OpenProcess(PROCESS_CREATE_THREAD Or PROCESS_VM_OPERATION Or PROCESS_VM_WRITE, False, pid) ' 在内存地址中读取数据