BindImageEx

The BindImageEx function computes the virtual address of each function that is imported.

BOOL BindImageEx(
  IN DWORD Flags,                            
  IN LPSTR ImageName,                        
  IN LPSTR DllPath,                          
  IN LPSTR SymbolPath,                       
  IN PIMAGEHLP_STATUS_ROUTINE StatusRoutine  
);
 

Parameters

Flags
Specifies the behavior of the function. This parameter can be a combination of the following values:
Value Meaning
BIND_NO_BOUND_IMPORTS Do not generate a new import address table.
BIND_NO_UPDATE Do not make any changes to the file.
BIND_ALL_IMAGES Bind all images in the call tree for this file.

ImageName
Pointer to a null-terminated string that specifies the name of the file to be bound. This value can be a filename, a partial path, or a full path.
DllPath
Pointer to a null-terminated string that specifies the root of the search path to use if the file specified by the ImageName parameter cannot be opened.
SymbolPath
Pointer to a null-terminated string that specifies the root of the path to search for the file's corresponding symbol file.
StatusRoutine
Pointer to a status routine. The status routine is called during the progress of the image binding. For more information, see PIMAGEHLP_STATUS_ROUTINE.

Return Values

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.

Remarks

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.

QuickInfo

  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.

See Also

PE Image Helper (ImageHlp) Overview, ImageHlp Image Modification Functions, PIMAGEHLP_STATUS_ROUTINE