Platform SDK: Debugging and Error Handling |
The ImageRvaToSection function locates a relative virtual address (RVA) within the image header of a file that is mapped as a file and returns a pointer to the section table entry for that virtual address.
PIMAGE_SECTION_HEADER ImageRvaToSection( PIMAGE_NT_HEADERS NtHeaders, PVOID Base, ULONG Rva );
If the function succeeds, the return value is a pointer to an IMAGE_SECTION_HEADER structure.
If the function fails, the return value is NULL. To retrieve extended error information, call GetLastError.
The ImageRvaToSection function locates an RVA within the image header of a file that is mapped as a file and returns a pointer to the section table entry for that virtual address.
Windows NT/2000: Requires Windows NT 4.0 or later.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in Dbghelp.h.
Library: Use Dbghelp.lib.
Debug Help Library Overview, DbgHelp Functions, IMAGE_NT_HEADERS, IMAGE_SECTION_HEADER, ImageNtHeader, MapViewOfFile