Platform SDK: Debugging and Error Handling |
The BindImageEx function computes the virtual address of each function that is imported.
This function supersedes the BindImage function. Use BindImageEx to provide a status routine or flags to control the image binding.
BOOL BindImageEx( DWORD Flags, PSTR ImageName, PSTR DllPath, PSTR SymbolPath, PIMAGEHLP_STATUS_ROUTINE StatusRoutine );
Value | Meaning |
---|---|
BIND_NO_BOUND_IMPORTS | Do not generate a new import address table.
Windows 95/98: This flag is required. |
BIND_NO_UPDATE | Do not make changes to the file. |
BIND_ALL_IMAGES | Bind all images in the call tree for this file. |
BIND_CACHE_IMPORT_DLLS | Do not discard DLL information in the cache between calls. This improves performance when binding a large number of images. |
If the function succeeds, the return value is TRUE.
If the function fails, the return value is FALSE. To retrieve extended error information, call GetLastError.
The process of binding an image consists of computing the virtual address of each imported function. The computed virtual address is then saved in the importing image's Import Address Table (IAT). As a result, the image is loaded much faster, particularly if it uses many DLLs, because the system loader does not have to computer the address of each imported function.
If a corresponding symbol file can be located, its time stamp and checksum are updated.
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 Imagehlp.h.
Library: Use Imagehlp.lib.
Image Help Library Overview, ImageHlp Functions, StatusRoutine