The ImageNtHeader function locates the IMAGE_NT_HEADERS structure in a PE image and returns a pointer to the data.
PIMAGE_NT_HEADERS ImageNtHeader(
IN LPVOID ImageBase
);
If the function succeeds, the return value is a pointer to an IMAGE_NT_HEADERS structure.
If the function fails, the return value is NULL. To retrieve extended error information, call GetLastError.
Windows NT: Requires version 4.0 or later.
Windows: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Windows CE: Unsupported.
Header: Declared in imagehlp.h.
Import Library: Use imagehlp.lib.
PE Image Helper (ImageHlp) Overview, Image Access, MapViewOfFile