Home COM GDI+ WebBrowser Data Access

IMLangConvertCharset  Interface

 

CLSID_CMLangConvertCharset

{D66D6F99-CDAA-11D0-B822-00C04FC9B31F}

IID_IMLangConvertCharset

{D66D6F98-CDAA-11D0-B822-00C04FC9B31F}

 

 

This interface converts a string from one code page to another.

 

Remarks

A client creates an instance of the Conversion by using IMultiLanguage::CreateConvertCharset or by explicitly calling CoCreateInstance. The IMLangConvertCharset methods perform more efficient character set conversions than the methods in the IMultiLanguage interface.

 

A caller uses this interface to repeatedly perform character set conversions involving the same combination of source/destination code pages. This interface can also be used to reinitialize the Conversion with new source and destination code pages as many times as necessary.

 

 

Methods in VTable order

IUnknown Methods

Description

QueryInterface

Returns pointers to supported interfaces.

AddRef

Increments reference count.

Release

Decrements reference count.

IMLangConvertCharset Methods

Description

Initialize

Initializes the internal state of the Conversion object with the specified parameters.

GetSourceCodePage

Retrieves the code page identifier value that has been designated as the source code page of the Conversion object.

GetDestinationCodePage

Retrieves the identifier value of the destination code page of the Conversion object.

GetProperty

Retrieves the MLCONVCHAR constant(s) that the Conversion object has set.

DoConversion

Converts the given string from the source code page of the Conversion object to its destination code page.

DoConversionToUnicode

Converts the given string from the source multibyte code page of the Conversion object to the Unicode character set.

DoConversionFromUnicode

Converts the given wide-character string from Unicode to the destination code page of the Conversion object.

 

Initialize

 

FUNCTION IMLangConvertCharset_Initialize ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL uiSrcCodePage AS DWORD _
, BYVAL uiDstCodePage AS DWORD _
, BYVAL dwProperty AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG

  CALL DWORD @@pthis[3] USING IMLangConvertCharset_Initialize (pthis, uiSrcCodePage, uiDstCodePage, dwProperty) TO HRESULT

  FUNCTION = HRESULT

END FUNCTION

 

 

GetSourceCodePage

 

FUNCTION IMLangConvertCharset_GetSourceCodePage ( _
  BYVAL pthis AS DWORD PTR _
, BYREF puiSrcCodePage AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG

  CALL DWORD @@pthis[4] USING IMLangConvertCharset_GetSourceCodePage (pthis, puiSrcCodePage) TO HRESULT

  FUNCTION = HRESULT

END FUNCTION

 

 

GetDestinationCodePage

 

FUNCTION IMLangConvertCharset_GetDestinationCodePage ( _
  BYVAL pthis AS DWORD PTR _
, BYREF puiDstCodePage AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG

  CALL DWORD @@pthis[5] USING IMLangConvertCharset_GetDestinationCodePage (pthis, puiDstCodePage) TO HRESULT

  FUNCTION = HRESULT

END FUNCTION

 

 

GetProperty

 

FUNCTION IMLangConvertCharset_GetProperty ( _
  BYVAL pthis AS DWORD PTR _
, BYREF pdwProperty AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG

  CALL DWORD @@pthis[6] USING IMLangConvertCharset_GetProperty (pthis, pdwProperty) TO HRESULT

  FUNCTION = HRESULT

END FUNCTION

 

 

DoConversion

 

FUNCTION IMLangConvertCharset_DoConversion ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL pSrcStr AS BYTE PTR _
, BYREF pcSrcSize AS DWORD _
, BYVAL pDstStr AS BYTE PTR _
, BYREF pcDstSize AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG

  CALL DWORD @@pthis[8] USING IMLangConvertCharset_DoConversion (pthis, pSrcStr, pcSrcSize, pDstStr, pcDstSize) TO HRESULT

  FUNCTION = HRESULT

END FUNCTION

 

 

DoConversionToUnicode

 

FUNCTION IMLangConvertCharset_DoConversionToUnicode ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL pSrcStr AS DWORD _
, BYREF pcSrcSize AS DWORD _
, BYVAL pDstStr AS DWORD _
, BYREF pcDstSize AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG

  CALL DWORD @@pthis[9] USING IMLangConvertCharset_DoConversionToUnicode (pthis, pSrcStr, pcSrcSize, pDstStr, pcDstSize) TO HRESULT

  FUNCTION = HRESULT

END FUNCTION

 

 

DoConversionFromUnicode

 

FUNCTION IMLangConvertCharset_DoConversionFromUnicode ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL pSrcStr AS DWORD _
, BYREF pcSrcSize AS DWORD _
, BYVAL pDstStr AS DWORD _
, BYREF pcDstSize AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG

  CALL DWORD @@pthis[10] USING IMLangConvertCharset_DoConversionFromUnicode (pthis, pSrcStr, pcSrcSize, pDstStr, pcDstSize) TO HRESULT

  FUNCTION = HRESULT

END FUNCTION

 

 

Page last updated on Sunday, 26 March 2006 11:05:35 +0100