CodePudding user response:
Very simple, as it provides the function prototype into the same type of VB.NET data types, the value type In or out, and transfer them to determine the byval or byref, written In the standard VB.NET external API declaration form is ok, give you a chestnut ao:Structure MEMORY_BASIC_INFORMATION '28 bytes
Dim BaseAddress As Integer
Dim AllocationBase As Integer
Dim AllocationProtect As Integer
Dim RegionSize As Integer
Dim State As Integer
Dim Protect As Integer
Dim lType As Integer
End Structure
Private Declare Function VirtualQuery Lib "kernel32" (ByVal lpAddress As IntPtr, ByRef lpBuffer As a MEMORY_BASIC_INFORMATION, ByVal dwLength As UInteger) As an Integer
Call:
Ret=VirtualQuery (pAddr, mi, miLen)
CodePudding user response:
This I have written,,, okCodePudding user response: