 |
WideCharToMultiByte ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
The WideCharToMultiByte function maps a wide-character string (Unicode) to a new character string. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
int WideCharToMultiByte(
UINT CodePage, // code page
DWORD dwFlags, // performance and mapping flags
LPCWSTR lpWideCharStr, // wide-character string
int cchWideChar, // number of chars in string
LPSTR lpMultiByteStr, // buffer for new string
int cbMultiByte, // size of buffer
LPCSTR lpDefaultChar, // default for unmappable chars
LPBOOL lpUsedDefaultChar // set when default char used
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER WideCharToMultiByte IN kernel32;
INTEGER CodePage,;
INTEGER dwFlags,;
STRING lpWideCharStr,;
INTEGER cchWideChar,;
STRING @ lpMultiByteStr,;
INTEGER cbMultiByte,;
STRING lpDefaultChar,;
INTEGER lpUsedDefaultChar
|
 |
 |
 |
| Parameters: |
 |
CodePage
[in] Specifies the code page used to perform the conversion.
dwFlags
[in] Specifies the handling of unmapped characters.
lpWideCharStr
[in] Points to the wide-character string to be converted.
cchWideChar
[in] Specifies the number of wide characters in the string pointed to by the lpWideCharStr parameter.
lpMultiByteStr
[out] Points to the buffer to receive the translated string.
cbMultiByte
[in] Specifies the size, in bytes, of the buffer pointed to by the lpMultiByteStr parameter.
lpDefaultChar
[in] Points to the character used if a wide character cannot be represented in the specified code page.
lpUsedDefaultChar
[in] Points to a flag that indicates whether a default character was used.
|
 |
 |
| Return value: |
 |
| If the function succeeds, and cbMultiByte is nonzero, the return value is the number of bytes written to the buffer pointed to by lpMultiByteStr. The number includes the byte for the null terminator. |
 |
 |
| My comment: |
 |
| FoxPro function StrConv() with Unicode support added in VFP7 makes this call redundant. |
 |
 |
| Word Index links for the WideCharToMultiByte : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2002-07-10 15:57:59 | | Modified: | 2004-09-17 07:13:57 | Visited in last 7 days: 31 |