CommonMessagePump CommonMessagePump CommonMessagePump CommonMessagePump CommonMessagePump Class

Definition

CommonMessagePump allows callers to block the current thread until a handle or handles have been signaled. During the wait the IDE will be placed in a modal state to prevent reentrancy. If the wait takes more than 2 secs a wait dialog is presented to the user which can be canceled (by default). Callers can call the default behaviour which will show default text in the wait dialog or they can provide custom values for things like the dialog text, status bar text, timeout values etc. Callers can also provide a custom implementation of IVsCommonMessagePumpClientEvents which allows the client to run code when certain events occur such as messages being processed, timeout or a handle being signaled. This interface can also be used to detemine if the wait should continue or return.

public ref class CommonMessagePump : Microsoft::Internal::VisualStudio::Shell::Interop::IOleComponent2Private, Microsoft::VisualStudio::OLE::Interop::IOleComponent, Microsoft::VisualStudio::Shell::Interop::IVsCommonMessagePump
[Windows::Foundation::Metadata::WebHostHidden]
class CommonMessagePump : Microsoft::Internal::VisualStudio::Shell::Interop::IOleComponent2Private, Microsoft::VisualStudio::OLE::Interop::IOleComponent, Microsoft::VisualStudio::Shell::Interop::IVsCommonMessagePump
public class CommonMessagePump : Microsoft.Internal.VisualStudio.Shell.Interop.IOleComponent2Private, Microsoft.VisualStudio.OLE.Interop.IOleComponent, Microsoft.VisualStudio.Shell.Interop.IVsCommonMessagePump
type CommonMessagePump = class
    interface IVsCommonMessagePump
    interface IOleComponent2Private
    interface IOleComponent
Public Class CommonMessagePump
Implements IOleComponent, IOleComponent2Private, IVsCommonMessagePump
Inheritance
CommonMessagePumpCommonMessagePumpCommonMessagePumpCommonMessagePumpCommonMessagePump
Implements
Microsoft.Internal.VisualStudio.Shell.Interop.IOleComponent2PrivateMicrosoft.Internal.VisualStudio.Shell.Interop.IOleComponent2PrivateMicrosoft.Internal.VisualStudio.Shell.Interop.IOleComponent2PrivateMicrosoft.Internal.VisualStudio.Shell.Interop.IOleComponent2PrivateMicrosoft.Internal.VisualStudio.Shell.Interop.IOleComponent2Private IOleComponentIOleComponentIOleComponentIOleComponentIOleComponent IVsCommonMessagePumpIVsCommonMessagePumpIVsCommonMessagePumpIVsCommonMessagePumpIVsCommonMessagePump

Remarks

During the wait, the IDE is placed in a modal state to prevent reentrancy. If the wait takes more than 2 seconds, a wait dialog is presented to the user which can be canceled (by default). Callers can use the default behavior, which will show default text in the wait dialog, or they can provide custom values for things like the dialog text, status bar text, timeout values, and so on.

Callers can also provide a custom implementation of IVsCommonMessagePumpClientEvents, which allows the client to run code when certain events occur such as messages being processed, a timeout, or a handle being signaled. This interface can also be used to determine if the wait should continue or return.

Constructors

CommonMessagePump() CommonMessagePump() CommonMessagePump() CommonMessagePump() CommonMessagePump()

Initializes a new instance of CommonMessagePump.

Properties

AllowCancel AllowCancel AllowCancel AllowCancel AllowCancel

Controls if the wait dialog has an enabled cancel button.

CurrentStep CurrentStep CurrentStep CurrentStep CurrentStep

Current step for the progress control of the wait dialog.

EnableRealProgress EnableRealProgress EnableRealProgress EnableRealProgress EnableRealProgress

Determines what type of progress control to use in the Wait Dialog. true indicates a percentage progress. false indicates a marquee stype progress. Only has an effect before calling the ModalWait functions.

ProgressText ProgressText ProgressText ProgressText ProgressText

Gets the progress text.

StatusBarText StatusBarText StatusBarText StatusBarText StatusBarText

Text of the status bar during the wait.

Timeout Timeout Timeout Timeout Timeout

Set the timeout value for the modal wait. Use TimeSpan.MaxValue for an infinite wait.

TotalSteps TotalSteps TotalSteps TotalSteps TotalSteps

Total number of steps for the progress control of the wait dialog.

WaitText WaitText WaitText WaitText WaitText

Wait dialog text for what we are waiting on.

WaitTitle WaitTitle WaitTitle WaitTitle WaitTitle

Title of the wait dialog

Methods

ModalWaitForHandles(WaitHandle[], Int32) ModalWaitForHandles(WaitHandle[], Int32) ModalWaitForHandles(WaitHandle[], Int32) ModalWaitForHandles(WaitHandle[], Int32) ModalWaitForHandles(WaitHandle[], Int32)

Blocks the current thread by pumping messages until either a timeout or one of the specified handles has been signaled.

ModalWaitForHandles(WaitHandle[], IVsCommonMessagePumpClientEvents) ModalWaitForHandles(WaitHandle[], IVsCommonMessagePumpClientEvents) ModalWaitForHandles(WaitHandle[], IVsCommonMessagePumpClientEvents) ModalWaitForHandles(WaitHandle[], IVsCommonMessagePumpClientEvents) ModalWaitForHandles(WaitHandle[], IVsCommonMessagePumpClientEvents)

Blocks the current thread by pumping messages until either a timeout or one of the specified handles has been signaled.

ModalWaitForHandles(WaitHandle) ModalWaitForHandles(WaitHandle) ModalWaitForHandles(WaitHandle) ModalWaitForHandles(WaitHandle) ModalWaitForHandles(WaitHandle)

Blocks the current thread by pumping messages until either a timeout or the specified handle has been signaled.

Explicit Interface Implementations

IOleComponent2Private.FContinueMessageLoop(UInt32, IntPtr, MSG[]) IOleComponent2Private.FContinueMessageLoop(UInt32, IntPtr, MSG[]) IOleComponent2Private.FContinueMessageLoop(UInt32, IntPtr, MSG[]) IOleComponent2Private.FContinueMessageLoop(UInt32, IntPtr, MSG[]) IOleComponent2Private.FContinueMessageLoop(UInt32, IntPtr, MSG[])
IOleComponent2Private.FDoIdle(UInt32) IOleComponent2Private.FDoIdle(UInt32) IOleComponent2Private.FDoIdle(UInt32) IOleComponent2Private.FDoIdle(UInt32) IOleComponent2Private.FDoIdle(UInt32)
IOleComponent2Private.FPreTranslateMessage(MSG[]) IOleComponent2Private.FPreTranslateMessage(MSG[]) IOleComponent2Private.FPreTranslateMessage(MSG[]) IOleComponent2Private.FPreTranslateMessage(MSG[]) IOleComponent2Private.FPreTranslateMessage(MSG[])
IOleComponent2Private.FQueryTerminate(Int32) IOleComponent2Private.FQueryTerminate(Int32) IOleComponent2Private.FQueryTerminate(Int32) IOleComponent2Private.FQueryTerminate(Int32) IOleComponent2Private.FQueryTerminate(Int32)
IOleComponent2Private.FReserved1(UInt32, UInt32, IntPtr, IntPtr) IOleComponent2Private.FReserved1(UInt32, UInt32, IntPtr, IntPtr) IOleComponent2Private.FReserved1(UInt32, UInt32, IntPtr, IntPtr) IOleComponent2Private.FReserved1(UInt32, UInt32, IntPtr, IntPtr) IOleComponent2Private.FReserved1(UInt32, UInt32, IntPtr, IntPtr)
IOleComponent2Private.GetWaitHandlesAndTimeout(IntPtr[], UInt32, UInt32, IntPtr) IOleComponent2Private.GetWaitHandlesAndTimeout(IntPtr[], UInt32, UInt32, IntPtr) IOleComponent2Private.GetWaitHandlesAndTimeout(IntPtr[], UInt32, UInt32, IntPtr) IOleComponent2Private.GetWaitHandlesAndTimeout(IntPtr[], UInt32, UInt32, IntPtr) IOleComponent2Private.GetWaitHandlesAndTimeout(IntPtr[], UInt32, UInt32, IntPtr)
IOleComponent2Private.HwndGetWindow(UInt32, UInt32) IOleComponent2Private.HwndGetWindow(UInt32, UInt32) IOleComponent2Private.HwndGetWindow(UInt32, UInt32) IOleComponent2Private.HwndGetWindow(UInt32, UInt32) IOleComponent2Private.HwndGetWindow(UInt32, UInt32)
IOleComponent2Private.OnActivationChange(IOleComponent, Int32, OLECRINFO[], Int32, OLECHOSTINFO[], UInt32) IOleComponent2Private.OnActivationChange(IOleComponent, Int32, OLECRINFO[], Int32, OLECHOSTINFO[], UInt32) IOleComponent2Private.OnActivationChange(IOleComponent, Int32, OLECRINFO[], Int32, OLECHOSTINFO[], UInt32) IOleComponent2Private.OnActivationChange(IOleComponent, Int32, OLECRINFO[], Int32, OLECHOSTINFO[], UInt32) IOleComponent2Private.OnActivationChange(IOleComponent, Int32, OLECRINFO[], Int32, OLECHOSTINFO[], UInt32)
IOleComponent2Private.OnAppActivate(Int32, UInt32) IOleComponent2Private.OnAppActivate(Int32, UInt32) IOleComponent2Private.OnAppActivate(Int32, UInt32) IOleComponent2Private.OnAppActivate(Int32, UInt32) IOleComponent2Private.OnAppActivate(Int32, UInt32)
IOleComponent2Private.OnEnterState(UInt32, Int32) IOleComponent2Private.OnEnterState(UInt32, Int32) IOleComponent2Private.OnEnterState(UInt32, Int32) IOleComponent2Private.OnEnterState(UInt32, Int32) IOleComponent2Private.OnEnterState(UInt32, Int32)
IOleComponent2Private.OnHandleSignaled(UInt32, IntPtr, Boolean) IOleComponent2Private.OnHandleSignaled(UInt32, IntPtr, Boolean) IOleComponent2Private.OnHandleSignaled(UInt32, IntPtr, Boolean) IOleComponent2Private.OnHandleSignaled(UInt32, IntPtr, Boolean) IOleComponent2Private.OnHandleSignaled(UInt32, IntPtr, Boolean)
IOleComponent2Private.OnLoseActivation() IOleComponent2Private.OnLoseActivation() IOleComponent2Private.OnLoseActivation() IOleComponent2Private.OnLoseActivation() IOleComponent2Private.OnLoseActivation()
IOleComponent2Private.OnTimeout(IntPtr, Boolean) IOleComponent2Private.OnTimeout(IntPtr, Boolean) IOleComponent2Private.OnTimeout(IntPtr, Boolean) IOleComponent2Private.OnTimeout(IntPtr, Boolean) IOleComponent2Private.OnTimeout(IntPtr, Boolean)
IOleComponent2Private.Terminate() IOleComponent2Private.Terminate() IOleComponent2Private.Terminate() IOleComponent2Private.Terminate() IOleComponent2Private.Terminate()
IOleComponent.FContinueMessageLoop(UInt32, IntPtr, MSG[]) IOleComponent.FContinueMessageLoop(UInt32, IntPtr, MSG[]) IOleComponent.FContinueMessageLoop(UInt32, IntPtr, MSG[]) IOleComponent.FContinueMessageLoop(UInt32, IntPtr, MSG[]) IOleComponent.FContinueMessageLoop(UInt32, IntPtr, MSG[])

Called during each iteration of a message loop.

IOleComponent.FDoIdle(UInt32) IOleComponent.FDoIdle(UInt32) IOleComponent.FDoIdle(UInt32) IOleComponent.FDoIdle(UInt32) IOleComponent.FDoIdle(UInt32)

Gives the component a chance to do idle time tasks.

IOleComponent.FPreTranslateMessage(MSG[]) IOleComponent.FPreTranslateMessage(MSG[]) IOleComponent.FPreTranslateMessage(MSG[]) IOleComponent.FPreTranslateMessage(MSG[]) IOleComponent.FPreTranslateMessage(MSG[])

Processes the message before it is translated and dispatched.

IOleComponent.FQueryTerminate(Int32) IOleComponent.FQueryTerminate(Int32) IOleComponent.FQueryTerminate(Int32) IOleComponent.FQueryTerminate(Int32) IOleComponent.FQueryTerminate(Int32)

Called when the component manager wishes to know if the component is in a state in which it can terminate.

IOleComponent.FReserved1(UInt32, UInt32, IntPtr, IntPtr) IOleComponent.FReserved1(UInt32, UInt32, IntPtr, IntPtr) IOleComponent.FReserved1(UInt32, UInt32, IntPtr, IntPtr) IOleComponent.FReserved1(UInt32, UInt32, IntPtr, IntPtr) IOleComponent.FReserved1(UInt32, UInt32, IntPtr, IntPtr)

Reserved.

IOleComponent.HwndGetWindow(UInt32, UInt32) IOleComponent.HwndGetWindow(UInt32, UInt32) IOleComponent.HwndGetWindow(UInt32, UInt32) IOleComponent.HwndGetWindow(UInt32, UInt32) IOleComponent.HwndGetWindow(UInt32, UInt32)

Retrieves a window associated with the component.

IOleComponent.OnActivationChange(IOleComponent, Int32, OLECRINFO[], Int32, OLECHOSTINFO[], UInt32) IOleComponent.OnActivationChange(IOleComponent, Int32, OLECRINFO[], Int32, OLECHOSTINFO[], UInt32) IOleComponent.OnActivationChange(IOleComponent, Int32, OLECRINFO[], Int32, OLECHOSTINFO[], UInt32) IOleComponent.OnActivationChange(IOleComponent, Int32, OLECRINFO[], Int32, OLECHOSTINFO[], UInt32) IOleComponent.OnActivationChange(IOleComponent, Int32, OLECRINFO[], Int32, OLECHOSTINFO[], UInt32)

Notifies the component when a new object is being activated.

IOleComponent.OnAppActivate(Int32, UInt32) IOleComponent.OnAppActivate(Int32, UInt32) IOleComponent.OnAppActivate(Int32, UInt32) IOleComponent.OnAppActivate(Int32, UInt32) IOleComponent.OnAppActivate(Int32, UInt32)

Notifies the component when the host application gains or loses activation.

IOleComponent.OnEnterState(UInt32, Int32) IOleComponent.OnEnterState(UInt32, Int32) IOleComponent.OnEnterState(UInt32, Int32) IOleComponent.OnEnterState(UInt32, Int32) IOleComponent.OnEnterState(UInt32, Int32)

Notifies the component when the application enters or exits the specified state.

IOleComponent.OnLoseActivation() IOleComponent.OnLoseActivation() IOleComponent.OnLoseActivation() IOleComponent.OnLoseActivation() IOleComponent.OnLoseActivation()

Notifies the active component that it has lost its active status because the host or another component has become active.

IOleComponent.Terminate() IOleComponent.Terminate() IOleComponent.Terminate() IOleComponent.Terminate() IOleComponent.Terminate()

Terminates the message loop.

IVsCommonMessagePump.EnableRealProgress(Boolean) IVsCommonMessagePump.EnableRealProgress(Boolean) IVsCommonMessagePump.EnableRealProgress(Boolean) IVsCommonMessagePump.EnableRealProgress(Boolean) IVsCommonMessagePump.EnableRealProgress(Boolean)

Determines the kind of progress to be displayed

IVsCommonMessagePump.ModalWaitForObjects(IntPtr[], UInt32, UInt32) IVsCommonMessagePump.ModalWaitForObjects(IntPtr[], UInt32, UInt32) IVsCommonMessagePump.ModalWaitForObjects(IntPtr[], UInt32, UInt32) IVsCommonMessagePump.ModalWaitForObjects(IntPtr[], UInt32, UInt32) IVsCommonMessagePump.ModalWaitForObjects(IntPtr[], UInt32, UInt32)

Blocks the current thread by pumping messages until either a timeout or one of the specified handles has been signaled.

IVsCommonMessagePump.ModalWaitForObjectsWithClient(IntPtr[], UInt32, IVsCommonMessagePumpClientEvents) IVsCommonMessagePump.ModalWaitForObjectsWithClient(IntPtr[], UInt32, IVsCommonMessagePumpClientEvents) IVsCommonMessagePump.ModalWaitForObjectsWithClient(IntPtr[], UInt32, IVsCommonMessagePumpClientEvents) IVsCommonMessagePump.ModalWaitForObjectsWithClient(IntPtr[], UInt32, IVsCommonMessagePumpClientEvents) IVsCommonMessagePump.ModalWaitForObjectsWithClient(IntPtr[], UInt32, IVsCommonMessagePumpClientEvents)

Blocks the current thread by pumping messages until either a timeout or one of the specified handles has been signaled.

IVsCommonMessagePump.SetAllowCancel(Boolean) IVsCommonMessagePump.SetAllowCancel(Boolean) IVsCommonMessagePump.SetAllowCancel(Boolean) IVsCommonMessagePump.SetAllowCancel(Boolean) IVsCommonMessagePump.SetAllowCancel(Boolean)

Controls if the wait dialog has an enabled cancel button.

IVsCommonMessagePump.SetProgressInfo(Int32, Int32, String) IVsCommonMessagePump.SetProgressInfo(Int32, Int32, String) IVsCommonMessagePump.SetProgressInfo(Int32, Int32, String) IVsCommonMessagePump.SetProgressInfo(Int32, Int32, String) IVsCommonMessagePump.SetProgressInfo(Int32, Int32, String)

Sets progress information for the message.

IVsCommonMessagePump.SetStatusBarText(String) IVsCommonMessagePump.SetStatusBarText(String) IVsCommonMessagePump.SetStatusBarText(String) IVsCommonMessagePump.SetStatusBarText(String) IVsCommonMessagePump.SetStatusBarText(String)

Text of the status bar during the wait.

IVsCommonMessagePump.SetTimeout(UInt32) IVsCommonMessagePump.SetTimeout(UInt32) IVsCommonMessagePump.SetTimeout(UInt32) IVsCommonMessagePump.SetTimeout(UInt32) IVsCommonMessagePump.SetTimeout(UInt32)

Set the timeout value for the modal wait. Use 0xFFFFFFFF for an infinite wait.

IVsCommonMessagePump.SetWaitText(String) IVsCommonMessagePump.SetWaitText(String) IVsCommonMessagePump.SetWaitText(String) IVsCommonMessagePump.SetWaitText(String) IVsCommonMessagePump.SetWaitText(String)

Wait dialog text for what we are waiting on.

IVsCommonMessagePump.SetWaitTitle(String) IVsCommonMessagePump.SetWaitTitle(String) IVsCommonMessagePump.SetWaitTitle(String) IVsCommonMessagePump.SetWaitTitle(String) IVsCommonMessagePump.SetWaitTitle(String)

Title of the wait dialog

Extension Methods

FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>)
FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>)

Microsoft internal use only.

FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>)
FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>)
IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>) IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>) IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>) IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>) IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>)

Microsoft internal use only.

Applies to