fileversioninfo

Can't read FileVersionInfo with Code Page mismatch

谁说我不能喝 提交于 2019-11-28 11:42:04
I have some reasonably tried and tested code which uses the Windows API calls to read FileVersionInfo strings, like "FileVersion" and "CompanyName". I found it failed with one particular 3rd party DLL. The problem seems to be this: Reading the \VarFileInfo\Translation value, I get 040904B0 (US English, Unicode). But when I then attempt to call VerQueryValue on \StringFileInfo\040904B0\CompanyName , it returns false. But tweaking the code to use the Windows Latin-1 ANSI codepage works: \StringFileInfo\040904E4\CompanyName . So, the code page in the string table doesn't match the \VarFileInfo

How do I set the version information for an existing .exe, .dll?

别来无恙 提交于 2019-11-26 12:04:56
As part of our build process I need to set the version information for all of our compiled binaries. Some of the binaries already have version information (added at compile time) and some do not. I want to be able to apply the following information: Company Name Copyright Notice Product Name Product Description File Version Product Version All of these attributes are specified by the build script and must be applied after compilation. These are standard binaries (not assemblies) compiled with C++ Builder 2007. How can I do this? While it's not a batch process, Visual Studio can also add/edit