Question : How to keep Visual Studio 2008 from trashing conditional code in my C/C++ Resource File?

Below is an example of some conditional code I am trying to include in my C/C++ Resource file.  However, any time I change something about Resource from Visual Studio, it completely overwrites the Resource file, including my conditional code.

Is there a way to keep the conditional code in the Resource file and still maintain it with Visual Studio, or do I have to manually maintain the Resource file?

Thanks.

Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
 
VS_VERSION_INFO VERSIONINFO
 FILEVERSION 1,0,0,1
 PRODUCTVERSION 1,0,0,1
 FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
 FILEOS 0x40004L
 FILETYPE 0x1L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904b0"
        BEGIN
            VALUE "FileVersion", 1.0.0.1\0"
            VALUE "ProductVersion", 1.0.0.1\0"
#ifdef SYM1
            VALUE "FileDescription", "ABCD\0"
#else
            VALUE "FileDescription", "WXYZ\0"
#endif
#ifdef SYM2
            VALUE "Comments", LICENSE_STR "\0"
#endif
        END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x409, 1200
    END
END

Answer : How to keep Visual Studio 2008 from trashing conditional code in my C/C++ Resource File?

In MSDN I found an article Using Multiple Resource Files and Header Files with Visual C++:
http://msdn.microsoft.com/en-us/library/6t3612sk(VS.71).aspx

please check if it answers your  question.

Random Solutions  
 
programming4us programming4us