The ImageDirectoryEntryToData function obtains access to image-specific data.
PVOID ImageDirectoryEntryToData(
IN LPVOID Base,
IN BOOLEAN MappedAsImage,
IN USHORT DirectoryEntry,
OUT PULONG Size
);
Value | Meaning |
---|---|
IMAGE_DIRECTORY_ENTRY_EXPORT | Export directory |
IMAGE_DIRECTORY_ENTRY_IMPORT | Import directory |
IMAGE_DIRECTORY_ENTRY_RESOURCE | Resource directory |
IMAGE_DIRECTORY_ENTRY_EXCEPTION | Exception directory |
IMAGE_DIRECTORY_ENTRY_SECURITY | Security directory |
IMAGE_DIRECTORY_ENTRY_BASERELOC | Base relocation table |
IMAGE_DIRECTORY_ENTRY_DEBUG | Debug directory |
IMAGE_DIRECTORY_ENTRY_COPYRIGHT | |
IMAGE_DIRECTORY_ENTRY_GLOBALPTR | RVA of global pointer |
IMAGE_DIRECTORY_ENTRY_TLS | thread local storage directory |
IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG | Load configuration directory |
IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT | Bound import directory |
IMAGE_DIRECTORY_ENTRY_IAT | Import address table |
If the function succeeds, the return value is a pointer to the directory entry's data.
If the function fails, the return value is NULL. To retrieve extended error information, call GetLastError.
The ImageDirectoryEntryToData function is used to obtain access to image-specific data.
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