How to set the File version into a DLL/EXE?

How to set the File version into a DLL/EXE?

Post by paracha » Fri, 11 Jul 2003 13:19:59



hi all,

All the articles i have come across are how to read the
file version information from binary file. I want

1-To insert new version resource if the DLL/exe doesn't
have one AND
2-If it has one then change that (increment/decrement).

Can someone let me know how do you do this using WinAPI
and C++? Link and/or code sample would greatly be
appreciated.
On the net all i could find is utilities that modify the
version resource. But i want to write my own code for
that and also be able to insert new version resource.

thx all,
paracha3

 
 
 

How to set the File version into a DLL/EXE?

Post by David Lincol » Fri, 11 Jul 2003 16:24:20


If you are running WinNT/2000/XP, you can use the "BeginUpdateResource" and "UpdateResource" functions. Otherwise, it's much more
difficult, you'll need to read up on the PE Executeable file format and the binary resource formats and modify the DLL binary data
directly.

Cheers,
Dave.

hi all,

All the articles i have come across are how to read the
file version information from binary file. I want

1-To insert new version resource if the DLL/exe doesn't
have one AND
2-If it has one then change that (increment/decrement).

Can someone let me know how do you do this using WinAPI
and C++? Link and/or code sample would greatly be
appreciated.
On the net all i could find is utilities that modify the
version resource. But i want to write my own code for
that and also be able to insert new version resource.

thx all,
paracha3