EngWideCharToMultiByte
The EngWideCharToMultiByte function converts a wide character string into an ANSI source string using the specified code page.
INT
EngWideCharToMultiByte(
IN UINT CodePage,
IN LPWSTR WideCharString,
IN INT BytesInWideCharString,
OUT LPSTR MultiByteString,
IN INT BytesInMultiByteString
);
Parameters
- CodePage
- Specifies the code page to use to perform the translation.
- WideCharString
- Pointer to a buffer containing the wide character string to be translated.
- BytesInWideCharString
- Specifies the size, in bytes, of WideCharString.
- MultiByteString
- Pointer to a buffer into which the translated character string is to be copied
- BytesInMultiByteString
- Specifies the number of bytes in MultiByteString. If MultiByteString is not large enough to contain the translation, EngWideCharToMultiByte truncates the string, and does not report an error.
Return Value
EngWideCharToMultiByte returns the number of bytes converted into multibyte form, if successful. Otherwise, it returns -1.
Headers
Declared in winddi.h. Include winddi.h.
See Also
EngMultiByteToWideChar, EngUnicodeToMultiByteN