-
[splt from http://cboard.cprogramming.com/showthread.php?t=87067 - please don't hijack other threads; Ken Fitlike]
On the topic of resources, can anyone post an example of how to properly use a VERSIONINFO resource?
Here's the closest I've come so far, but I think its still wrong somewhere:
Code:
versionID VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP
BEGIN
BLOCK "StringFileInfo"
{
/*english-ASCII */
BLOCK "0x0409-0"
{
VALUE "Comments", "comment"
VALUE "CompanyName", "My Company Name"
VALUE "FileVersion", "1.0"
VALUE "InternalName", "app.exe"
VALUE "OriginalFilename", "app.exe"
VALUE "ProductName", "My Application"
VALUE "ProductVersion", "1.0"
}
}
END
It compiles okay, but when I open up the properties sheet for my .exe in windows, the version information sheet is still filled with blank fields....
-
Here's a working .rc file which fills out some of the version info. I can't explain it though, sorry.
Code:
#include "afxres.h"
1 VERSIONINFO
FILEVERSION 1700,0,0,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "FileVersion", "1700"
VALUE "CompanyName", "MyCompanyName"
VALUE "Comments", "Automated RC file generated"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
-
Thanks a lot, no worries on the content, I know what all the values are, i just was utterly confused on what order/syntax was to fill it with.
I still can't seem to get the following tab to display on my exe, maybe I'm just going about it entirely wrong.... any suggestions?
-
The documentation can be confusing.
Code:
versionID VERSIONINFO
This must be:
as shown by QuestionC.
If it's still not working, can you post your current attempt?
-
Yea, I have to admit I chuckled at myself for actually typing out versionID :P
Here is what I have currently (pretty muched copied of QuestionC's response):
-EDIT-
Actually, I did not realize how verbose that example had to be, I thought versionID might be a programmer-defined identifier value much like with other resources (so i gave it some value... 5), but after strictly giving it value 1, it then worked fine.
Thanks for all your help guys, much appreciated!