PDA

View Full Version : PE "Version info" resource format?


Maximus
August 21st, 2010, 10:48
Hello,

I were looking CFF Explorer, and I would like to be able to parse the "Version Info" resource in the same way, so that I can programmatically edit it.

can someone point me (or detail) to the format of the 'Version Info' resource? it seems a sequence of unicode strings, but there is surely about...

In other words, if i know its format I am able to move it and add/edit/remove such entries at my will - but i need to know their format.

Thanks in advance!

Maximus

Neitsa
August 21st, 2010, 12:02
Hi, Reactos is great for this kind of things.

"Version Info" is probably a VS_VERSION_INFO_STRUCT32 structure:

http://doxygen.reactos.org/d5/d68/dll_2win32_2version_2info_8c_source.html#l00197

You may need to check the internal logic of the GetFileVersionInfoW API() from the SVN:

http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/version/info.c?view=markup&pathrev=41329

Or a more convenient display of the same function:

http://doxygen.reactos.org/d5/d68/dll_2win32_2version_2info_8c_a7058d7e5b50bf967e639f3823ceca8b0.html#a7058d7e5b50bf967e639f3823ceca8b 0

Hope it helps.

edit:

BTW you can get version info details using some Windows' APIs like GetVersionInfo(Ex) and the like:

http://msdn.microsoft.com/en-us/library/ms646981%28VS.85%29.aspx

But you can also update you PE resources using some nifty API, like UpdateResource():

http://msdn.microsoft.com/en-us/library/ms648049%28VS.85%29.aspx