| Debugging Tools for Windows | 
The GetValidRegionVirtual method locates the first valid region of memory in a specified memory range.
HRESULT
  IDebugDataSpaces4::GetValidRegionVirtual(
    IN ULONG64  Base,
    IN ULONG  Size,
    OUT PULONG64  ValidBase,
    OUT PULONG  ValidSize
    );
This method can also return error values. See Return Values for more details.
GetValidRegionVirtual is available in IDebugDataSpaces4 and later versions.
Headers: Defined in Dbgeng.h. Include Dbgeng.h.