IVsCommonMessagePump.ModalWaitForObjects 方法

使用此方法等待对信号的对象 (可能由进程某的背景),在保持与响应。

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

语法

声明
Function ModalWaitForObjects ( _
    rgHandles As IntPtr(), _
    cHandles As UInteger, _
    <OutAttribute> ByRef pdwWaitResult As UInteger _
) As Integer
int ModalWaitForObjects(
    IntPtr[] rgHandles,
    uint cHandles,
    out uint pdwWaitResult
)

参数

  • rgHandles
    类型:array<System.IntPtr[]
    包含对象的句柄于等待的数组。
  • cHandles
    类型:System.UInt32
    处理数数组中。最大值为 64。
  • pdwWaitResult
    类型:System.UInt32%
    [out] 设置的结果,当等待条件匹配的 (即,那么,当方法返回的 S_OK):
    1. WAIT_OBJECT_0 为 (WAIT_OBJECT_0 + cHandles - 1) 指示终止的对象 (适用,仅当 fWaitForAllObjects 是 false时)。

    2. WAIT_OBJECT_0,如果 fWaitForAllObjects 是 true。

    3. ,在 fWaitForAllObjects 指定的条件匹配之前, WAIT_TIMEOUT 超时间隔的。

返回值

类型:System.Int32
S_OK ,如果等待条件匹配的; the pdwWaitResult 参数将包含有关等待结果的更多信息。返回 E_PENDING ,如果该方法必须退出,因为用户取消了等待操作。E_ABORT ,如果 WM_QUIT 接收。

备注

这是使用的首选方法此接口。它不需要使用者实现的。方法在一个模式状态会自动将 IDE,减少重新进入的风险。方法处理还显示解释等待原因的默认 UI。大约 2 秒,在启动后,此等待 UI 显示等待。

.NET Framework 安全性

请参见

参考

IVsCommonMessagePump 接口

Microsoft.VisualStudio.Shell.Interop 命名空间