Private Declare Function OpenProcess Lib "kernel32.dll" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As Integer Public Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByVal lpBuffer() As Byte, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer Private Const PROCESS_VM_READ As Long = &H10 Private Sub sd() Dim ph As Integer Dim i As Integer Dim h As Integer Dim buffer(20) As Byte Dim bytesRead As Integer '获得进程 ph = OpenProcess(PROCESS_ALL_ACCESS, False, 1832) If ph Then MessageBox.Show(True) h = ReadProcessMemory(ph, &H403000, buffer, buffer.Length, bytesRead) For i = 0 To buffer.Length - 1 TempMem += buffer(i).ToString Next Else MessageBox.Show(False) End If End Sub