ImageLoad function (imagehlp.h)
Maintains a list of loaded DLLs.
Syntax
PLOADED_IMAGE IMAGEAPI ImageLoad(
[in] PCSTR DllName,
[in] PCSTR DllPath
);
Parameters
[in] DllName
The name of the image.
[in] DllPath
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 value
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.
All ImageHlp 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.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | imagehlp.h |
Library | Imagehlp.lib |
DLL | Imagehlp.dll |