BUG: LSTRCMP and LSTRCMPI May Fail With Non-US Regional Settings

Last reviewed: February 16, 1998
Article ID: Q178529
The information in this article applies to:
  • Microsoft Windows Software Development Kit (SDK) on the following platform:

        - Windows 95
    

SYMPTOMS

Under the following conditions, the LSTRCMP and LSTRCMPI string-comparison APIs may erroneously report that two strings fail to compare:

  1. Windows 95 is configured for a Regional Setting other than "English (United States)."

  2. One of the strings is located in a 16-bit discardable code segment which has been discarded.

CAUSE

If the regional setting is anything other than English (United States), the string-compare call is thunked to 32-bit string-compare functions in Kernel32. The thunking code does not force a segment reload if the segment containing a string that is supposed to be compared has been discarded.

RESOLUTION

It may be possible to work around this problem using one of the following methods:

  • If a segment contains a string that is going to be compared with LSTRCMP or LSTRCMPI, do not mark that segment as discardable.
  • Touch the string in some way to force the segment to be reloaded if it is discarded before calling LSTRCMP or LSTRCMPI.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

For additional information, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q180727
   TITLE     : Error Message: Property or Method Not Found
Keywords          : UsrLoc
Version           : WIN95
Platform          : Win95
Issue type        : kbbug
Solution Type     : kbfix


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 16, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.