Is there a library I can use in Linux that will return the properties of a Windows EXE file that are listed in Explorer\'s Version tab? These are fields like Product Name, Produ
Here is a patch for code to support PE32+. Tested on some files and seems to work.
//optHeader is a IMAGE_OPTIONAL_HEADER32
const char *optHeader = coff + 20;
WORD magic = READ_WORD(optHeader);
if (magic != 0x10b && magic != 0x20b)
return NULL;
//dataDir is an array of IMAGE_DATA_DIRECTORY
const char *dataDir = optHeader + (magic==0x10b ? 96: 112);
DWORD vaRes = READ_DWORD(dataDir + 8*2);