Microsoft KB Archive/166958

= FIX: WWWQuote Sample Fails with Error Message =

Article ID: 166958

Article Last Modified on 10/24/2003

-

APPLIES TO


 * Microsoft Visual C++ 5.0 Enterprise Edition
 * Microsoft Visual C++ 5.0 Professional Edition

-



This article was previously published under Q166958





SYMPTOMS
When you try to display a welcome page associated with the WWWQuote sample through a browser, the following error message appears:

"Could not find string 129"

You will see similar errors when you try to access other pages in the sample directly. The IDs will be different.



CAUSE
This behavior is due to a bug in the resource compiler with Visual C++ 5.0.

The CWWWQuote::LoadLongResource function is trying to find a custom resource of type "HTML." The resource compiler with Visual C++ 5.0 modifies the custom resource of type "HTML" to "#23." The function is unable to find the resource, so it displays the error message.



RESOLUTION
Change the custom type resource "HTML" to a different type so that the resource compiler does not modify it.

Open the resource file as text and modify it as follows:

Original lines: ...  ////////////////////////////////////////////////////////////////////////    //    //    // HTML //

IDS_HTML_WELCOME       HTML      DISCARDABLE     "HTML\\welcome.htm" IDS_HTML_LOOKUPMETHOD  HTML      DISCARDABLE     "HTML\\issueerr.htm" IDS_ISSUES_HEADER      HTML      DISCARDABLE     "HTML\\Selhead.htm" IDS_ISSUES_TRAILER     HTML      DISCARDABLE     "HTML\\Seltail.htm" IDS_GET_QUOTES_ERROR   HTML      DISCARDABLE     "HTML\\quoteerr.htm" IDS_PREV_BUTTON        HTML      DISCARDABLE     "HTML\\Prev.htm" IDS_NEXT_BUTTON        HTML      DISCARDABLE     "HTML\\Next.htm" IDS_QUOTE_HEADER       HTML      DISCARDABLE     "HTML\\quothead.htm" ... After Modification to use type "MYHTML" ...  ////////////////////////////////////////////////////////////////////////    //    //    // MYHTML //

IDS_HTML_WELCOME       MYHTML      DISCARDABLE     "HTML\\welcome.htm" IDS_HTML_LOOKUPMETHOD  MYHTML      DISCARDABLE     "HTML\\issueerr.htm" IDS_ISSUES_HEADER      MYHTML      DISCARDABLE     "HTML\\Selhead.htm" IDS_ISSUES_TRAILER     MYHTML      DISCARDABLE     "HTML\\Seltail.htm" IDS_GET_QUOTES_ERROR   MYHTML      DISCARDABLE     "HTML\\quoteerr.htm" IDS_PREV_BUTTON        MYHTML      DISCARDABLE     "HTML\\Prev.htm" IDS_NEXT_BUTTON        MYHTML      DISCARDABLE     "HTML\\Next.htm" IDS_QUOTE_HEADER       MYHTML      DISCARDABLE     "HTML\\quothead.htm" ... You also have to modify the following line in wwwquote.cpp so that you are looking for the correct resource type: static const TCHAR szHTMLType[] = _T("HTML"); to: static const TCHAR szHTMLType[] = _T("MYHTML");



STATUS
This problem was corrected in Visual C++ version 6.0 for Windows.



Steps to Reproduce Behavior

 * 1) Build the WWWQuote sample with Visual C++ 5.0.
 * 2) Copy the dll to the correct directory.
 * 3) Invoke the dll through the Web Browser.

Additional query words: WWWQuote

Keywords: kberrmsg kbbug kbfix kbnoupdate kbvc600fix KB166958

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.