Saturday, December 19, 2009

Win32 Programming: How to add version and other information



[Click the image to enlarge]


Here we’re telling how you can add application information on its executable file. If you don’t understand this tutorial much I suggest you read the previous ones where I shown how to add resource files(resource.h and prog.rc)

Pretty easy task it is. Add following lines in your resource(.rc) file.


/////////////////////////////////////////////////////////////////////////////
//
// Version
//

1 VERSIONINFO
 FILEVERSION 1,0,0,0
 PRODUCTVERSION 1,0,0,0
 FILEFLAGSMASK 0x0L
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
 FILEOS 0x0L
 FILETYPE 0x1L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904e4"
        BEGIN
            VALUE "Comments", "This program shows Bangla Clock in Unicode"
            VALUE "CompanyName", "Saint Group"
            VALUE "FileDescription", "SA OS Tut7 Executable"
            VALUE "FileVersion", "1.0"
            VALUE "InternalName", "Unicode Bangla Clock"
            VALUE "LegalCopyright", "Saint Atique (c) 2009"
            VALUE "LegalTrademarks", "Saint Group"
            VALUE "OriginalFilename", "SA-OS Tutorial 7.exe"
            VALUE "ProductName", "SA-OS Tutorial"
            VALUE "ProductVersion", "1.0"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x409, 1252
    END
END

Change the information according to your need. Build and run the solution.

Details about versioninfo resource on msdn:

No comments:

Post a Comment