VB.NET读内存用用哪个类???刚学~~·不明白!
在VB6.0中,读内存常常用到这样的API,分5个步骤就搞定了
(1-找窗口标题,2-得到ThreadProcessId,3-打开进程,4-读取内存,5-CloseHandle)
Public Declare Function FindWindow Lib "user32 " Alias "FindWindowA " (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function GetWindowThreadProcessId Lib "user32 " (ByVal hwnd As Long, lpdwProcessId As Long) As Long
Public Declare Function OpenProcess Lib "kernel32 " (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Public Declare Function ReadProcessMemory Lib "kernel32 " (ByVal hProcess As Long, lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Public Declare Function CloseHandle Lib "kernel32 " (ByVal hObject As Long) As Long
到了VB2005,我不知道该怎么办了~~~~?????
[解决办法]
用内存流啊。