ConvertINetUnicodeToMultiByte Function

Translates a character stream in Unicode to the specified destination code page.

Syntax

HRESULT ConvertINetUnicodeToMultiByte(      
    LPDWORD lpdwMode,     DWORD dwEncoding,     LPCWSTR lpSrcStr,     LPINT lpnWideCharCount,     LPSTR lpDstStr,     LPINT lpnMultiCharCount );

Parameters

lpdwMode
A pointer to a DWORD that is used internally to store conversion context. A caller can provide storage that is initialized with zero at the first call to the function. A caller must not modify the value without calling MLANG service functions.
dwEncoding
A DWORD that contains the code page identifier value for the multibyte destination string.
lpSrcStr
A pointer to the Unicode string that is being converted.
lpnWideCharCount
A pPointer to the buffer that stores the length of the source string in character counts. If this is NULL, or if the length specified is -1, the function assumes the source string is null-terminated. When conversion is successful, the function returns the number of characters processed to this buffer.
lpDstStr
A pointer to the string buffer where the conversion result is stored.
lpnMultiCharCount
A pointer to the buffer that stores the length of the destination buffer in bytes. When the conversion is successful, the function returns the number of bytes copied to the lpDstStr buffer.

Return Value

The function returns one of the following values.

S_OKPerformed the conversion successfully.
S_FALSEThe specified conversion is not supported on the system.
E_FAILAn unknown error has occurred.

Remarks

The destination code page can be any of the Microsoft Windows standard code pages or any code page using character encoding defined by the International Organization for Standardization (ISO). This function provides a translation similar to translation that is provided by calling IMultiLanguage::ConvertStringFromUnicode. Note that the size of the Unicode string to be converted is specified in characters, while the size of the multibyte string returned is specified in bytes.

Function Information

Stock Implementationmlang.dll
Custom ImplementationNo
Import libraryNone
Minimum availabilityInternet Explorer 5.5
Minimum operating systems Windows 95, Windows NT 4.0, Windows CE 4.0
Tags :


Page view tracker