Microsoft KB Archive/182053

{|
 * width="100%"|

FIX: LSTRCMP and LSTRCMPI May Fail with Non-US Regional Settings

 * }

Q182053

-

The information in this article applies to:


 * Microsoft Win32 Software Development Kit (SDK), on platform(s):
 * the operating system: Microsoft Windows 95

-

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


 * 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. If the segment containing a string to be compared has been discarded, the thunking code does not force a segment reload.

RESOLUTION
You may be able to work around this problem using one of the following methods:


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

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

This problem was corrected in Windows 2000.

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

"Q180727 Error Message: Property or Method Not Found" Additional query words:

Keywords : kbOSWin2000fix kbSDKWin32 kbOSWin95

Issue type : kbbug

Technology : kbWin32SDKSearch kbAudDeveloper kbSDKSearch kbWin32sSearch