Export (0) Print
Expand All

UnMapAndLoad function

Deallocate all resources that are allocated by a previous call to the MapAndLoad function.

Syntax


BOOL UnMapAndLoad(
  _In_  PLOADED_IMAGE LoadedImage
);

Parameters

LoadedImage [in]

A pointer to a LOADED_IMAGE structure. This structure is obtained through a call to the MapAndLoad function.

Return value

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 UnMapAndLoad function must be used to deallocate all resources that are allocated by a previous call to MapAndLoad. This function also writes a new checksum value into the image before the file is closed. This ensures that if a file is changed, it can be successfully loaded by the system loader.

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
LOADED_IMAGE
MapAndLoad

 

 

Community Additions

ADD
Show:
© 2014 Microsoft