| Locale-Sensitive Windows C++ Function int LCMapString(LCID Locale, DWORD dwMapFlags, LPCTSTR lpSrcStr, int cchSrc, LPTSTR lpDestStr, int cchDest);  int LCMapStringA(LCID Locale, DWORD dwMapFlags, LPCSTR lpSrcStr, int cchSrc, LPSTR lpDestStr, int cchDest);  int LCMapStringW(LCID Locale, DWORD dwMapFlags, LPCWSTR lpSrcStr, int cchSrc, LPWSTR lpDestStr, int cchDest); Internationalization (I18n) Function OverviewThe LCMapStringfunction either maps the input character stringlpSrcStrto another string atlpDestStr, usingLocaleand the specified transformationdwMapFlags, or generates a sort key for the input 
string based onLocaleand stores the key
in the buffer pointed to bylpDestStr. cchSrcshould be set to either the size, inTCHARs, of thelpSrcStrbuffer, or to a negative value, in which case the function automatically
calculates the number ofTCHARsin the null-terminatedlpSrcStr, including
theNULLcharacter.
 If the function is being used for string mapping, then cchDestshould be set to 
either the size, inTCHARs, of thelpDestStrbuffer, or to0,
in which case, the function returns the number ofTCHARsthat would be written tolpDestStr, but does not actually modify the buffer. If the function is being used to generate a sort key, then cchDestshould be set to 
either the byte size of thelpDestStrbuffer, including the sort key 0x00 terminator, 
or to0, in which case, the function returns the number of bytes that would be written tolpDestStr, but does not actually modify the buffer. In the event of an error, LCMapStringreturns0and
sets extended error information that can be obtained by callingGetLastError. LCMapStringAis the narrow version of the function, passing in single or multibyte strings and string length values in bytes.
 LCMapStringWis the wide version of the function, passing in wide-character strings and string length values in wide characters (WCHARs).
 See the MSDN Library for more information.
 I18n IssuesUse the appropriate version of the function as required for internationalization support, noting the following: Formulate the correct LCIDto pass intoLCMapString. If the function is being used for string mapping, and cchSrcandcchDestare non-zero, then ensure that these length values are set correctly for 
the chosen platform; bytes for the narrow version andWCHARsfor the wide version. 
See Locale-Sensitive Length Functions for a discussion on multibyte and 
wide character sizes. If the function is being used to generate a sort key, and cchSrcandcchDestare non-zero, then ensure that these lengths are byte values, regardless
the target platform. Recommended Replacements*When possible, use the Generic version of the function, rather than the narrow or wide versions, and let the Windows #define UNICODEswitch determine which version of the function will be called.  
*If you're already using the recommended function, see I18n Issues for other reasons why Globalyzer is detecting the function.   
 |