The information in this article applies to:
SYMPTOMSA call to LoadStringW returns NULL on Windows 95 or Windows 98, even though the string is in the resource. CAUSEStrings are stored in resource files in Unicode. LoadStringA converts the strings it reads to Multibyte Character Set (MBCS) before returning them. How this conversion takes place depends on the current code page. LoadStringW, on Windows NT, returns the exact string stored in the resource. On Windows 95 and Windows 98, this function is a stub that returns NULL. This is true of most W functions on Windows 95 and Windows 98, with MessageBoxW being a notable exception. RESOLUTIONYou can emulate the behavior of LoadStringW through calls to FindResourceEx and LoadResource. Strings are stored in resources in blocks of 16. First, you must locate the block containing the desired string and load it into memory. Then you must locate the string within the block of memory and copy it out. The following code shows how to do this:
STATUSThis behavior is by design. Additional query words:
Keywords : kbSDKPlatform kbString kbGrpUser kbWinOS95 kbWinOS98 |
Last Reviewed: December 4, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |