Microsoft KB Archive/187280

= FIX: Visual Studio 97 SP3 Installs Incorrect Cvtres.exe =

Article ID: 187280

Article Last Modified on 8/11/2005

-

APPLIES TO


 * Microsoft Visual Studio 6.0 Professional Edition
 * Microsoft Visual Studio 6.0 Service Pack 3
 * Microsoft Visual C++ 5.0 Professional Edition
 * Microsoft Visual Basic 5.0 Enterprise Edition

-



This article was previously published under Q187280



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 that this is a bug in the Microsoft products that are 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:

194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why

194295 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 Download Center:

Cvtres1.exe

Release Date: Jun-10-1998

For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to Obtain Microsoft Support Files from Online Services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.

Cvtres1.exe contains the following files:
 * Cvtres.exe


 * Readme.txt

Steps to Reproduce Behavior
 Install Visual Studio 97 on Windows NT 4.0. Install Visual Studio 97 Service Pack 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. In the ResourceView, right-click the string table and then click Insert Copy from the shortcut menu. In the Language list, select English (Ireland). Open the localized string table and change IDS_TEST text to different string that will allow you to identify the language. Repeat steps 4 through 6 for the following languages: English (U.K.), English (Canada), and Swedish.</li>  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); }     }                        </li> Build the project and execute it. Some strings will not be localized correctly.</li> Copy the updated Cvtres.exe into the VC\BIN directory.</li> On the Build menu, click Rebuild All.</li> All localized strings should now appear as expected.</li></ol>

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

<div class="references_section">