The problem of reading other process memory in vb.net

Problem Description

Using ReadProcessMemory under vb.net can not always read the contents of the memory. It seems to be a common problem. I don't know if you have any good methods, how to call and declare ReadProcessMemory, or use other methods to read the memory of other processes.

solution

ReadProcessMemory declared like this. Declare lpBaseAddress as ByVal:

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

Dim ph As Integer
Dim buffer(200) As Byte
Dim bytesRead As Integer
ReadProcessMemory(ph, &H403000, buffer, buffer.Length,bytesRead)

Guess you like

Origin blog.csdn.net/qq_39517716/article/details/112915548