Export (0) Print
Expand All

ImageLoad function

Maintains a list of loaded DLLs.

Syntax


PLOADED_IMAGE ImageLoad(
  _In_  PSTR DllName,
  _In_  PSTR DllPath
);

Parameters

DllName [in]

The name of the image.

DllPath [in]

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

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Imagehlp.h

Library

Imagehlp.lib

DLL

Imagehlp.dll

See also

ImageHlp Functions
ImageUnload
LOADED_IMAGE

 

 

Community Additions

ADD
Show:
© 2014 Microsoft