Compartilhar via


ConvertINetUnicodeToMultiByte (Windows CE 5.0)

Send Feedback

This function translates a character stream in Unicode to the specified destination code page.

HRESULT ConvertINetUnicodeToMultiByte(LPDWORDlpdwMode,DWORDdwEncoding,LPCWSTRlpSrcStr,LPINTlpnWideCharCount,LPSTRlpDstStr,LPINTlpnMultiCharCount);

Parameters

  • lpdwMode
    Pointer to a DWORD that is used internally to store conversion context. A caller should provide storage that is initialized with zero at the first call to the function. A caller must not modify the value without calling the MLANG service functions.
  • dwEncoding
    DWORD that contains the code page identifier value for the multibyte destination string.
  • lpSrcStr
    Pointer to the Unicode string that is being converted.
  • lpnWideCharCount
    Pointer 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 to this buffer the number of characters processed.
  • lpDstStr
    Pointer to the string buffer where the conversion result is stored.
  • lpnMultiCharCount
    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 Values

The following table shows the return values for this function.

Value Description
S_OK Performed the conversion successfully.
S_FALSE The specified conversion is not supported on the system.
E_FAIL An error has occurred.

Remarks

The destination code page can be any of the 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 that provided by calling the IMultiLanguage::ConvertStringFromUnicode method. Note that the size of the Unicode string to be converted is specified in characters, while the size of the multibyte string returned is given in bytes.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Mlang.h, Mlang.idl.
Link Library: Mlang.dll.

See Also

IMultiLanguage::ConvertStringFromUnicode

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.