Kernel32VirtualQuery(UIntPtr, MemoryBasicInformation32, IntPtr) Method

Retrieves information about a range of pages in the virtual address space of the calling (current) 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 VirtualQuery(
	UIntPtr address,
	ref MemoryBasicInformation32 refBuffer,
	IntPtr length
)

Parameters

address  UIntPtr
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  MemoryBasicInformation32
A pointer to a MemoryBasicInformation32 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