how to use VirtualQueryEx in vb.net
-
Hi all, I have a project with VirtualQueryEx in vb.net. Some line of My code here : ============= Public Structure MEMORY_BASIC_INFORMATION Public BaseAddress As Long Public AllocationBase As Long Public AllocationProtect As Long Public RegionSize As Long Public State As Long Public Protect As Long Public Type As Long End Structure Public Declare Function VirtualQueryEx Lib "kernel32" (ByVal hProcess As IntPtr, ByVal lpAddress As Long, ByRef lpBuffer As MEMORY_BASIC_INFORMATION, ByVal dwLength As Integer) As Integer processHandle = OpenProcess(PROCESS_ALL_ACCESS, 0, m_ReadProcess.Id) Dim mbi As New MEMORY_BASIC_INFORMATION VirtualQueryEx(processHandle, addr, mbi, Marshal.SizeOf(mbi)) ============== But, VirtualQueryEx not working in vb.net . Pls, help me fix error or give me some advices. Thank you alot Best regard