GetTimestampForLoadedLibrary Function

Debug Help Library

GetTimestampForLoadedLibrary Function

Retrieves the timestamp of a loaded image.

DWORD WINAPI GetTimestampForLoadedLibrary(
  __in          HMODULE ImageBase



The base address of an image that is mapped into memory by a call to the MapViewOfFile function.

Return Value

If the function succeeds, the return value is the timestamp from the image.

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


The timestamp for an image indicates the date and time that the image was created by the linker. The value is represented in the number of seconds elapsed since midnight (00:00:00), January 1, 1970, Universal Coordinated Time, according to the system clock. The timestamp can be printed using the C run-time (CRT) function ctime.

All DbgHelp 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.



Requires DbgHelp.dll 5.1 or later.


Declared in Dbghelp.h.


Use Dbghelp.lib.


Requires Dbghelp.dll.

See Also

DbgHelp FunctionsMapViewOfFile

Send comments about this topic to Microsoft

Build date: 9/25/2007

© 2007 Microsoft Corporation. All rights reserved.