Udostępnij za pośrednictwem


IVsIME.GetImmCompositionStringW(UInt32, UInt32, String, Int32) Method

Definition

Retrieves information about the composition string. Wrapper for a call to ImmGetCompositionString. Handles string as wide characters (wchar_t) rather than as bytes.

public:
 int GetImmCompositionStringW(System::UInt32 HIMC, System::UInt32 dwIndex, [Runtime::InteropServices::Out] System::String ^ % pbstrCompString, [Runtime::InteropServices::Out] int % plRetVal);
int GetImmCompositionStringW(unsigned int HIMC, unsigned int dwIndex, [Runtime::InteropServices::Out] std::wstring const & & pbstrCompString, [Runtime::InteropServices::Out] int & plRetVal);
public int GetImmCompositionStringW (uint HIMC, uint dwIndex, out string pbstrCompString, out int plRetVal);
abstract member GetImmCompositionStringW : uint32 * uint32 * string * int -> int
Public Function GetImmCompositionStringW (HIMC As UInteger, dwIndex As UInteger, ByRef pbstrCompString As String, ByRef plRetVal As Integer) As Integer

Parameters

HIMC
UInt32

[in] Handle to the IME context.

dwIndex
UInt32

[in] Index of the information to retrieve. For more information about possible values, see IME Composition String Values.

pbstrCompString
String

[out] Wide character (wchar_t, Unicode) buffer. Use SysAllocStringByteLen and SysStringByteLen to manage memory for this item. See ImmSetCompositionString and ImmGetCompositionString.

plRetVal
Int32

[out] Pointer to the return value. Contains the number of wide characters copied to the destination buffer or, if dwBufLen is zero, the buffer size, in wide characters, needed to receive all of the information. The size is always in wide characters.On error, set to one of the two values: IMM_ERROR_NODATA, or IMM_ERROR_GENERAL.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsIME::GetImmCompositionStringW(   
   [in] HIMC himc,   
   [in] DWORD dwIndex,   
   [out] BSTR *pbstrCompString,   
   [out] LONG * plRetVal  
);  

Applies to