in reply to Getting compile time out of Windows binary (exe and dll) files

It is possible, but tricky. The information that you want is buried in a somewhat complicated fashion in the file. You need to locate the IMAGE_FILE_HEADER structure in the file's PE header (prefixed by "PE\0\0"). That contains a DWORD TimeDateStamp field which has "The time that the linker (or compiler for an OBJ file) produced this file. This field holds the number of seconds since December 31st, 1969, at 4:00 P.M.". The C struct is:

typedef struct _IMAGE_FILE_HEADER { WORD Machine; WORD NumberOfSections; DWORD TimeDateStamp; DWORD PointerToSymbolTable; DWORD NumberOfSymbols; WORD SizeOfOptionalHeader; WORD Characteristics; }

Perl is Huffman encoded by design.
  • Comment on Re: Getting compile time out of Windows binary (exe and dll) files
  • Download Code