0

I'm currently experiencing something weird. I've created a resource file for a c++ project developped with Visual Studio Express. I used ResEdit to generate an initial resource.rc file which looks like:

// Version Information resources
//
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
1 VERSIONINFO
    FILEVERSION     0,0,0,0
    PRODUCTVERSION  0,0,0,0
    FILEOS          VOS__WINDOWS32
    FILETYPE        VFT_UNKNOWN
    FILESUBTYPE     VFT2_UNKNOWN
    FILEFLAGSMASK   0x00000000
    FILEFLAGS       0x00000000
{
    BLOCK "StringFileInfo"
    {
        BLOCK "040C04E4"
        {
            VALUE "Comments", ""
            VALUE "CompanyName", "MyCompany"
            VALUE "FileDescription", ""
            VALUE "FileVersion", ""
            VALUE "InternalName", ""
            VALUE "LegalCopyright", "MyCopyRight"
            VALUE "LegalTrademarks", ""
            VALUE "OriginalFilename", ""
            VALUE "PrivateBuild", ""
            VALUE "ProductName", ""
            VALUE "ProductVersion", "1.0"
            VALUE "SpecialBuild", ""
        }
    }
    BLOCK "VarFileInfo"
    {
        VALUE "Translation", 0x040C, 0x04E4
    }
}

When the project is built, if I right click on the binary file in Explorer, I can see the "Version" tab. But all the fields are blanks although I can retrieve programmatically the vsver informations. :( Any idea ? is there something wrong with this RC file ? I'm using Windows XP SP2 or 3 in French.

tshepang
  • 12,111
  • 21
  • 91
  • 136
Zyend
  • 572
  • 1
  • 4
  • 24
  • What happens if you comment out the `LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL` part and recompile? – MicroVirus Feb 26 '14 at 12:18
  • @MicroVirus: Same thing...fields remain blanks :( – Zyend Feb 26 '14 at 12:24
  • Could you try using this: http://stackoverflow.com/questions/19890318/vs-2008-c-vs-version-info?rq=1 . (It is for US English (0x0409) and Unicode (1200 / 0x04B0), but if that works you can try changing the language & encoding values). Or maybe this http://stackoverflow.com/questions/852568/version-resource-in-dll-not-visible-with-right-click?rq=1 helps? – MicroVirus Feb 26 '14 at 12:28
  • @microvirus Unfortunately I've already checked read those posts before posting here :( – Zyend Feb 26 '14 at 12:34

1 Answers1

0

Your resource script does not compile. You need to include the Windows.h header file at the top of the resource script:

#include <Windows.h>
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
....
David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490