Kernel32VirtualQueryEx(IntPtr, IntPtr, MemoryBasicInformation64, IntPtr) Method

Retrieves information about a range of pages within the virtual address space of a specified process.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Kernel32.dll", SetLastError = true)]
public static IntPtr VirtualQueryEx(
	IntPtr hProcess,
	IntPtr address,
	ref MemoryBasicInformation64 refBuffer,
	IntPtr length
)

Parameters

hProcess  IntPtr
A handle to the process whose memory information is queried.

The handle must have been opened with the QueryInformation access right, which enables using the handle to read information from the process object.

address  IntPtr
A pointer to the base address of the region of pages to be queried. This value is rounded down to the next page boundary.

To determine the size of a page on the host computer, use the GetSystemInfo function.

refBuffer  MemoryBasicInformation64
A pointer to a MemoryBasicInformation64 structure in which information about the specified page range is returned.
length  IntPtr
The size of the buffer pointed to by the lpBuffer parameter, in bytes.

Return Value

IntPtr
The return value is the actual number of bytes returned in the information buffer

If the function fails, the return value is 0.

To get extended error information, call GetLastWin32Error.

Remarks

See Also