Debugging Tools for Windows |
The GetVirtualTranslationPhysicalOffsets method returns the physical addresses of the system paging structures at different levels of the paging hierarchy.
HRESULT
IDebugDataSpaces2::GetVirtualTranslationPhysicalOffsets(
IN ULONG64 Virtual,
OUT OPTIONAL PULONG64 Offsets,
IN ULONG OffsetsSize,
OUT OPTIONAL PULONG Levels
);
This method can also return error values. See Return Values for more details.
GetVirtualTranslationPhysicalOffsets is available in IDebugDataSpaces2 and later versions.
This method is only available in kernel-mode debugging.
Translating a virtual address to a physical address requires Windows to walk down the paging hierarchy. At each level it reads paging information from physical memory. This method returns the offsets for these physical pages. The number of levels in the paging hierarchy may be different for different addresses.
The address at the last level of the hierarchy is the physical address corresponding to the specified virtual address. This is what VirtualToPhysical would return.
For details on how virtual addresses are translated into physical addresses, see Microsoft Windows Internals by David Solomon and Mark Russinovich.
Headers: Defined in Dbgeng.h. Include Dbgeng.h.