IOleInPlaceComponentUIManager.UpdateUI 方法

通知环境的就地 VSPackage 对象的可见用户界面的状态发生了变化。

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

语法

声明
Function UpdateUI ( _
    dwCompRole As UInteger, _
    fImmediateUpdate As Integer, _
    dwReserved As UInteger _
) As Integer
int UpdateUI(
    uint dwCompRole,
    int fImmediateUpdate,
    uint dwReserved
)

参数

  • dwCompRole
    类型:System.UInt32
    [in] 受影响的就地对象的作用。有关有效的 dwCompRole 值列表,请参见 OLEROLE
  • fImmediateUpdate
    类型:System.Int32
    [in] 标记指示一次立即同步更新是否应进行。如果设置为 true,更新是同步的。如果设置为 false,更新出现在空闲时间。
  • dwReserved
    类型:System.UInt32
    [in] 留作未来使用。必须设置为 0。

返回值

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

备注

COM 签名

从 oleipc.idl:

HRESULT IOleInPlaceComponentUIManager::UpdateUI(
   [in] DWORD dwCompRole,
   [in] BOOL fImmediateUpdate,
   [in] DWORD dwReserved
);

UpdateUI 可以调用由最内层的 UI 有效的对象或由充当容器此最内层的对象。通常,用户界面的更新时发生在空闲时间而不是立即。但是,因此,如果 fImmediateUpdate 参数设置为 true,更新立即执行 (同步)。

.NET Framework 安全性

请参见

参考

IOleInPlaceComponentUIManager 接口

Microsoft.VisualStudio.Shell.Interop 命名空间