IMultiLanguage2::DetectCodepageInIStream (Windows CE 5.0)

Send Feedback

This method detects the code page of the given stream.

HRESULTDetectCodepageInIStream(DWORDdwFlag,DWORDdwPrefWinCodePage,IStream* pstmIn,DetectEncodingInfo* lpEncoding,INT* pnScores);

Parameters

  • dwFlag
    [in] Specifies one of the MLDETECTCP-defined bit flag values that specify the type of incoming source text. Setting the bit flags helps the detection engines produce more accurate results.
  • dwPrefWinCodePage
    [in] Specifies the preferred Windows code page. If this value is set to zero, this method returns all possible encodings. Otherwise, it lists only those encodings related to this parameter.
  • pstmIn
    [in] Pointer to the IStream interface for the source stream.
  • lpEncoding
    [in, out] Pointer to an array of DetectEncodingInfo structures where the detection information will be returned.
  • pnScores
    [in, out] Pointer to a buffer that contains the number of DetectEncodingInfo structures allocated in the array pointed to by the lpEncoding parameter. When this method is successful, this parameter returns the number of elements of the array that have been filled in.

Return Values

The following table shows the possible return values for this method.

Value Description
S_OK Success.
S_FALSE The method cannot determine the code page of the input stream.
E_FAIL An error occurred.

Remarks

The caller is responsible for allocating and freeing the lpEncoding array.

Requirements

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

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.