Partager via


IVsIME.GetImmContext Method

Retrieves the Input Method Editor (IME) context for a given window. Use before getting or setting IME information using methods such as GetImmCompositionString.

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

Syntax

'Declaration
Function GetImmContext ( _
    hwnd As IntPtr, _
    <OutAttribute> ByRef phimc As UInteger _
) As Integer
int GetImmContext(
    IntPtr hwnd,
    out uint phimc
)
int GetImmContext(
    [InAttribute] IntPtr hwnd, 
    [OutAttribute] unsigned int% phimc
)
abstract GetImmContext : 
        hwnd:IntPtr * 
        phimc:uint32 byref -> int
function GetImmContext(
    hwnd : IntPtr, 
    phimc : uint
) : int

Parameters

  • hwnd
    Type: IntPtr

    [in] Handle for the editor window.

  • phimc
    Type: UInt32%

    [out] Pointer to a handle to the IME context.

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::GetImmContext(
   [in] HWND hwnd, 
   [out] HIMC * phimc
);

.NET Framework Security

See Also

Reference

IVsIME Interface

Microsoft.VisualStudio.Shell.Interop Namespace