IMultiLanguage::CreateConvertCharset method

Creates a charset Conversion object and gets its corresponding IMLangConvertCharset interface.

Syntax

HRESULT CreateConvertCharset(
  [in]  UINT                 uiSrcCodePage,
  [in]  UINT                 uiDstCodePage,
  [in]  DWORD                dwProperty,
  [out] IMLangConvertCharset **ppMLangConvertCharset
);

Parameters

  • uiSrcCodePage [in]
    The code page identifier value for the source character stream to which the caller wants the Conversion object dedicated.

  • uiDstCodePage [in]
    The code page identifier value for the destination character stream to which the caller wants the Conversion object dedicated.

  • dwProperty [in]
    One of the MLCONVCHAR-defined values. This flag indicates how to display unconvertible Unicode characters when Unicode-to-multibyte conversion is performed.

  • ppMLangConvertCharset [out]
    The address of the buffer where the client receives an IMLangConvertCharset interface.

Return value

Returns one of the following values.

Return code Description
S_OK

Success.

S_FALSE

The object was created but it cannot be initialized, because the specified set of source and destination code pages is not supported.

E_FAIL

The method failed to create an instance of the object.

 

Remarks

A client should use the Conversion object to perform repeated character set conversions with the same combination of source and destination code pages.

Although the IMLangConvertCharset interface is retrieved through this method, the caller is responsible for releasing it when it is no longer required.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Header

Mlang.h

IDL

Mlang.idl

DLL

Mlang.dll

See also

IMultiLanguage

Reference

ConvertStringFromUnicodeEx

ConvertStringInIStream

ConvertStringToUnicodeEx