Serves as a logical wrapper for the corresponding Win32 function. The Win32 implementation of VirtualQuery retrieves information about a range of pages in the virtual address space of the calling process.
HRESULT VirtualQuery ( [in] void* lpAddress, [out] void* lpBuffer, [in] SIZE_T dwLength, [out] SIZE_T* pResult );
VirtualQuery returned successfully.
The common language runtime (CLR) has not been loaded into a process, or the CLR is in a state in which it cannot run managed code or process the call successfully.
The call timed out.
The caller does not own the lock.
An event was canceled while a blocked thread or fiber was waiting on it.
An unknown catastrophic failure occurred. When a method returns E_FAIL, the CLR is no longer usable within the process. Subsequent calls to hosting methods return HOST_E_CLRNOTAVAILABLE.
VirtualQuery provides information about a range of pages in the virtual address space of the calling process. This implementation sets the value of the pResult parameter to the number of bytes returned in the information buffer, and returns an HRESULT value. In the Win32 VirtualQuery function, the return value is the buffer size. For more information, see the Windows Platform documentation.
The operating system's implementation of VirtualQuery does not incur deadlock and can run to completion with random threads suspended in user code. Use great caution when implementing a hosted version of this method.
Platforms: See .NET Framework System Requirements.
Library: Included as a resource in MSCorEE.dll
.NET Framework Versions: 4, 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0