IVsIME.AttachContext 方法

关联或分离具有编辑器 (IME)窗口的输入法编辑器 (ime) 上下文。有关 IME 上下文的更多信息,请参见 Input Context

命名空间:  Microsoft.VisualStudio.Shell.Interop
程序集:  Microsoft.VisualStudio.Shell.Interop(在 Microsoft.VisualStudio.Shell.Interop.dll 中)

语法

声明
Function AttachContext ( _
    hwnd As IntPtr, _
    fAttach As Integer, _
    <OutAttribute> perr As VSIME_ERR() _
) As Integer
int AttachContext(
    IntPtr hwnd,
    int fAttach,
    VSIME_ERR[] perr
)

参数

  • fAttach
    类型:System.Int32
    [in] 布尔值。设置为 true 附加 IME 上下文到窗口。设置为 false 销毁一个附加的 IME 上下文。

返回值

类型:System.Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。

备注

COM 签名

从 vsshell.idl:

HRESULT IVsIME::AttachContext(
   [in] HWND hwnd, 
   [in] BOOL fAttach, 
   [out] VSIME_ERR * perr
);

.NET Framework 安全性

请参见

参考

IVsIME 接口

Microsoft.VisualStudio.Shell.Interop 命名空间