Compartir a través de


IVsCommonMessagePump Interface

Allows the user to keep Visual Studio responsive during background processing. The interface can be obtained via the SVsCommonMessagePumpFactory service.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assemblies:   Microsoft.VisualStudio.Shell.Interop.10.0 (in Microsoft.VisualStudio.Shell.Interop.10.0.dll)
  Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)

Syntax

'Declaration
<GuidAttribute("FB3B20F4-9C8E-454A-984B-B1334F790541")> _
<InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)> _
Public Interface IVsCommonMessagePump
[GuidAttribute("FB3B20F4-9C8E-454A-984B-B1334F790541")]
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
public interface IVsCommonMessagePump
[GuidAttribute(L"FB3B20F4-9C8E-454A-984B-B1334F790541")]
[InterfaceTypeAttribute(ComInterfaceType::InterfaceIsIUnknown)]
public interface class IVsCommonMessagePump
[<GuidAttribute("FB3B20F4-9C8E-454A-984B-B1334F790541")>]
[<InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)>]
type IVsCommonMessagePump =  interface end
public interface IVsCommonMessagePump

The IVsCommonMessagePump type exposes the following members.

Methods

  Name Description
Public method EnableRealProgress Enables (or disables) a percent-based progress control.
Public method ModalWaitForObjects Use this method to wait for objects to signal (likely by some background processing) while keeping VS responsive.
Public method ModalWaitForObjectsWithClient The method's behavior is very similar to ModalWaitForObjects. In addition, it allows for a custom wait and events processing logic to be supplied. The method makes VS modal, and automatically provides the default wait UI after about 2 seconds of waiting.
Public method SetAllowCancel Specifies whether or not a Cancel button should appear n the wait dialog.
Public method SetProgressInfo Specifies the progress information for the wait dialog.
Public method SetStatusBarText Specifies the text to use on the status bar.
Public method SetTimeout Specifies the maximum time (in milliseconds) to wait for objects to signal.
Public method SetWaitText Specifies the text for the default wait UI that explains the reason for the wait.
Public method SetWaitTitle Specifies the title of the wait dialog.

Top

Remarks

The interface provides a common way to keep Visual Studio responsive while doing long time processing on the main thread or waiting for objects (e.g. events, mutexes, semaphores, etc) to signal. Using this interface will not solve all the problems related to reentrancy that are caused by pumping window messages while doing some other processing on the main VS thread. It will allow for the uniform processing of windows messages and the correct handling of things like hotkeys. Using this interface allows troubleshooting mechanisms to detect reentrancy-related issues.

See Also

Reference

Microsoft.VisualStudio.Shell.Interop Namespace