Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

GetImageUnusedHeaderBytes function

Retrieves the offset and size of the part of the PE header that is currently unused.

Syntax


DWORD GetImageUnusedHeaderBytes(
  _In_   PLOADED_IMAGE LoadedImage,
  _Out_  PDWORD SizeUnusedHeaderBytes
);

Parameters

LoadedImage [in]

A pointer to a LOADED_IMAGE structure that is returned from a call to MapAndLoad or ImageLoad.

SizeUnusedHeaderBytes [out]

A pointer to a variable to receive the size, in bytes, of the part of the image's header which is unused.

Return value

If the function succeeds, the return value is the offset from the base address of the first unused header byte.

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

Remarks

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

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.