Freigeben über


IVsIME.GetImmCompositionStringW Method

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

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'Declaration
Function GetImmCompositionStringW ( _
    HIMC As UInteger, _
    dwIndex As UInteger, _
    <OutAttribute> ByRef pbstrCompString As String, _
    <OutAttribute> ByRef plRetVal As Integer _
) As Integer
int GetImmCompositionStringW(
    uint HIMC,
    uint dwIndex,
    out string pbstrCompString,
    out int plRetVal
)
int GetImmCompositionStringW(
    [InAttribute] unsigned int HIMC, 
    [InAttribute] unsigned int dwIndex, 
    [OutAttribute] String^% pbstrCompString, 
    [OutAttribute] int% plRetVal
)
abstract GetImmCompositionStringW : 
        HIMC:uint32 * 
        dwIndex:uint32 * 
        pbstrCompString:string byref * 
        plRetVal:int byref -> int
function GetImmCompositionStringW(
    HIMC : uint, 
    dwIndex : uint, 
    pbstrCompString : String, 
    plRetVal : int
) : int

Parameters

  • HIMC
    Type: UInt32

    [in] Handle to the IME context.

  • dwIndex
    Type: UInt32

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

  • pbstrCompString
    Type: String%

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

  • plRetVal
    Type: 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.

Return Value

Type: Int32
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
);

.NET Framework Security

See Also

Reference

IVsIME Interface

Microsoft.VisualStudio.Shell.Interop Namespace