BUG: LSTRCMP and LSTRCMPI Fails with Non-US Regional Settings (178529)
The information in this article applies to:
- Microsoft Platform Software Development Kit (SDK) 1.0, when used with:
- the operating system: Microsoft Windows 95
This article was previously published under Q178529 SYMPTOMS
Under the following conditions, the LSTRCMP and LSTRCMPI string-comparison
APIs may erroneously report that two strings fail to compare:
- Windows 95 is configured for a Regional Setting other than "English
(United States)."
- 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.
Modification Type: | Minor | Last Reviewed: | 7/11/2005 |
---|
Keywords: | kbBug KB178529 |
---|
|