I am attempting to write a routine that pulls the program name and version from my resource file, but can not find a example like it. I have found some samples for writing a resource file, but not reading back at run time.
For Example:
Test Resourc.rc
I think the route has something to do with loadstring, but unsure what to do? Can someone point me at an example? I would like to ultimately only have to change version numbers in the resource file, and not hunt through exe code for each place that I may have had to display version numbers (sometimes they slip through and I miss one so it shows the incorrect version)
Thanx for any tips
For Example:
Test Resourc.rc
Code:
#include "resource.h" // * Version info. // // VS_VERSION_INFO VERSIONINFO FILEVERSION 5, 0, 0, 0 PRODUCTVERSION 5, 0, 0, 0 FILEOS VOS_WINDOWS32 FILETYPE VFT_APP BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904B0" //Does this have to be this value or what does the value mean? BEGIN VALUE "CompanyName", "Your Company, Inc.\000" VALUE "FileDescription", "Program Desc\000" VALUE "FileVersion", "05.00.0000\000" VALUE "InternalName", "Internal Name\000" VALUE "OriginalFilename", "Original Name.EXE\000" VALUE "LegalCopyright", "Copyright \251 2007 Your Company, Inc.\000" VALUE "ProductName", "Program Name\000" VALUE "ProductVersion", "05.00.0000\000" VALUE "Comments", "Yadda Yadda\000" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 0x4B0 END END
Thanx for any tips

Comment