FIX: Visual Studio 97 SP3 Installs Incorrect Cvtres.exe

ID: Q187280


The information in this article applies to:


SUMMARY

Cvtres1.exe is a self-extracting file that contains Cvtres.exe version 5.00.1736.1. Link.exe uses Cvtres.exe to convert resource files into the Common Object File Format (COFF). An incorrect version of Cvtres.exe causes some localized resources to become unavailable to the application. As a result, applications that determine which localized resources to use at run time do not obtain the correct resources. The Visual Studio 97 Service Pack 3 (SP3), which installs an incorrect version of Cvtres.exe (5.00.1668.1), causes this problem. To resolve this problem, you need to replace Cvtres.exe version 5.00.1668.1 with an updated Cvtres.exe, version 5.00.1736.1 or later.

NOTE: This problem can affect other resources as well, such as dialog boxes. Also, if your application uses message resources, the following error message might appear:

Error 1815: The specified resource language ID cannot be found in the image file.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.

This bug was corrected in Visual Studio 6.0 Service Pack 3. For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base:
Q194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why

Q194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed


MORE INFORMATION

After Cvtres.exe has been replaced, any application with localized resource problems needs to be rebuilt. Open up the project in Developer Studio. On the Build menu, click Rebuild All. The following files are available for download from the Microsoft Software Library:

Cvtres1.exe
Release Date: Jun-10-1998

For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:
Q119591 How to Obtain Microsoft Support Files from Online Services

Cvtres1.exe contains the following files:

Steps to Reproduce Behavior

  1. Install Visual Studio 97 on Windows NT 4.0.


  2. Install Visual Studio 97 Service Pack 3.


  3. Create a Visual C++ Windows Console Application that uses a String Table that has one entry with identifier IDS_TEST and ID number 1.


  4. In the ResourceView, right-click the string table and then click Insert Copy from the shortcut menu.


  5. In the Language list, select English (Ireland).


  6. Open the localized string table and change IDS_TEST text to different string that will allow you to identify the language.


  7. Repeat steps 4 through 6 for the following languages: English (U.K.), English (Canada), and Swedish.


  8. Insert the following code into your project:
    
          #include <windows.h>
          #include <stdio.h>
          #include "resource.h"
    
          void main()
          {
             TCHAR pszTest[256];
             INT i = 0;
             HMODULE hMod = GetModuleHandle(NULL);
             LANGID langIds[5] = { 0x409,0x1809,0x809,0x1009,0x41d };
             TCHAR pszLangIds[5][25] = { "English","Ireland",
                "British","Canada","Swedish"};
    
             for(i; i<=4; i++)
             {
                // SetThreadLocale function is not supported on Windows 95.
                SetThreadLocale(langIds[i]);
                LoadString(hMod, IDS_TEST, pszTest, sizeof(pszTest));
                printf("%s\t(LangId = 0x%x)\t=\t%s\n", pszLangIds[i],
                   langIds[i], pszTest);
             }
          } 


  9. Build the project and execute it. Some strings will not be localized correctly.


  10. Copy the updated Cvtres.exe into the VC\BIN directory.


  11. On the Build menu, click Rebuild All.


  12. All localized strings should now appear as expected.


NOTE: This problem can affect other resources as well, such as dialog boxes.


REFERENCES

You can find Language Identifiers in the Microsoft Developer Network (MSDN) under:

SDK Documentation\Platform SDK\Window Base Services\International Features\Locale Identifiers\Language Identifiers and Locales

Additional query words: VS97bug kbSPack3


Keywords          : kbfile kbpatch kbservicepack kbLinker kbVS97sp3 kbVS600sp2 kbVS600SP1 kbVS600sp3fix kbGrpDSTools 
Version           : WINDOWS:6.0,6.0 SP3,97sp3
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: May 21, 1999