Platform SDK: Debugging and Error Handling

ImageLoad

The ImageLoad function maintains a list of loaded DLLs.

PLOADED_IMAGE ImageLoad(
  PSTR DllName, 
  PSTR DllPath  
);

Parameters

DllName
[in] Pointer to a null-terminated string that specifies the name of the image that is loaded.
DllPath
[in] Pointer to a null-terminated string that specifies the path used to locate the image if the name provided cannot be found. If NULL is used, then the search path rules set forth in the SearchPath function apply.

Return Values

If the function succeeds, the return value is a pointer to a LOADED_IMAGE structure.

If the function fails, the return value is NULL. To retrieve extended error information, call GetLastError.

Remarks

The ImageLoad function is used to maintain a list of loaded DLLs. If the image has already been loaded, the prior LOADED_IMAGE is returned. Otherwise, the new image is added to the list.

The LOADED_IMAGE structure must be deallocated by the ImageUnload function.

Requirements

  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.

See Also

Image Help Library Overview, ImageHlp Functions, ImageUnload, LOADED_IMAGE