Skip to content

Latest commit

 

History

History
277 lines (231 loc) · 7.65 KB

nf-dbghelp-imagedirectoryentrytodata.md

File metadata and controls

277 lines (231 loc) · 7.65 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:dbghelp.ImageDirectoryEntryToData
ImageDirectoryEntryToData function (dbghelp.h)
Obtains access to image-specific data.
IMAGE_DIRECTORY_ENTRY_ARCHITECTURE
IMAGE_DIRECTORY_ENTRY_BASERELOC
IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT
IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR
IMAGE_DIRECTORY_ENTRY_DEBUG
IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT
IMAGE_DIRECTORY_ENTRY_EXCEPTION
IMAGE_DIRECTORY_ENTRY_EXPORT
IMAGE_DIRECTORY_ENTRY_GLOBALPTR
IMAGE_DIRECTORY_ENTRY_IAT
IMAGE_DIRECTORY_ENTRY_IMPORT
IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG
IMAGE_DIRECTORY_ENTRY_RESOURCE
IMAGE_DIRECTORY_ENTRY_SECURITY
IMAGE_DIRECTORY_ENTRY_TLS
ImageDirectoryEntryToData
ImageDirectoryEntryToData function
_win32_imagedirectoryentrytodata
base.imagedirectoryentrytodata
dbghelp/ImageDirectoryEntryToData
base\imagedirectoryentrytodata.htm
Debug
9a4ef9e9-543a-4b1b-ba22-2f1ece19f7e6
12/05/2018
IMAGE_DIRECTORY_ENTRY_ARCHITECTURE, IMAGE_DIRECTORY_ENTRY_BASERELOC, IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT, IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR, IMAGE_DIRECTORY_ENTRY_DEBUG, IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT, IMAGE_DIRECTORY_ENTRY_EXCEPTION, IMAGE_DIRECTORY_ENTRY_EXPORT, IMAGE_DIRECTORY_ENTRY_GLOBALPTR, IMAGE_DIRECTORY_ENTRY_IAT, IMAGE_DIRECTORY_ENTRY_IMPORT, IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG, IMAGE_DIRECTORY_ENTRY_RESOURCE, IMAGE_DIRECTORY_ENTRY_SECURITY, IMAGE_DIRECTORY_ENTRY_TLS, ImageDirectoryEntryToData, ImageDirectoryEntryToData function, _win32_imagedirectoryentrytodata, base.imagedirectoryentrytodata, dbghelp/ImageDirectoryEntryToData
dbghelp.h
Windows
Dbghelp.lib
Dbghelp.dll
Windows
DbgHelp.dll 5.1 or later
19H1
ImageDirectoryEntryToData
dbghelp/ImageDirectoryEntryToData
c++
APIRef
kbSyntax
DllExport
Dbghelp.dll
imagehlp.dll
ImageDirectoryEntryToData

ImageDirectoryEntryToData function

-description

Obtains access to image-specific data.

This function has been superseded by the ImageDirectoryEntryToDataEx function. Use ImageDirectoryEntryToDataEx to retrieve the section header.

-parameters

-param Base [in]

The base address of the image.

-param MappedAsImage [in]

If this parameter is TRUE, the file is mapped by the system as an image. If the flag is FALSE, the file is mapped as a data file by the MapViewOfFile function.

-param DirectoryEntry [in]

The index number of the desired directory entry. This parameter can be one of the following values.

Value Meaning
IMAGE_DIRECTORY_ENTRY_ARCHITECTURE
7
Architecture-specific data
IMAGE_DIRECTORY_ENTRY_BASERELOC
5
Base relocation table
IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT
11
Bound import directory
IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR
14
COM descriptor table
IMAGE_DIRECTORY_ENTRY_DEBUG
6
Debug directory
IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT
13
Delay import table
IMAGE_DIRECTORY_ENTRY_EXCEPTION
3
Exception directory
IMAGE_DIRECTORY_ENTRY_EXPORT
0
Export directory
IMAGE_DIRECTORY_ENTRY_GLOBALPTR
8
The relative virtual address of global pointer
IMAGE_DIRECTORY_ENTRY_IAT
12
Import address table
IMAGE_DIRECTORY_ENTRY_IMPORT
1
Import directory
IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG
10
Load configuration directory
IMAGE_DIRECTORY_ENTRY_RESOURCE
2
Resource directory
IMAGE_DIRECTORY_ENTRY_SECURITY
4
Security directory
IMAGE_DIRECTORY_ENTRY_TLS
9
Thread local storage directory

-param Size [out]

A pointer to a variable that receives the size of the data for the directory entry, in bytes.

-returns

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.

-remarks

The ImageDirectoryEntryToData function is used to obtain access to image-specific data.

All DbgHelp functions, such as this one, are single threaded. Therefore, calls from more than one thread to this function will likely result in unexpected behavior or memory corruption. To avoid this, you must synchronize all concurrent calls from more than one thread to this function.

-see-also

DbgHelp Functions

ImageDirectoryEntryToDataEx

MapViewOfFile