Partager via


OleUndoEngine.IVsLinkedUndoClient.OnInterveningUnitBlockingLinkedUndo Method

Indicates that the undo manager is blocking another undo manager from executing a linked action.

Namespace:  Microsoft.VisualStudio.Shell.Design
Assembly:  Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)

Syntax

'Declaration
Private Function OnInterveningUnitBlockingLinkedUndo As Integer 
    Implements IVsLinkedUndoClient.OnInterveningUnitBlockingLinkedUndo
int IVsLinkedUndoClient.OnInterveningUnitBlockingLinkedUndo()
private:
virtual int OnInterveningUnitBlockingLinkedUndo() sealed = IVsLinkedUndoClient::OnInterveningUnitBlockingLinkedUndo
private abstract OnInterveningUnitBlockingLinkedUndo : unit -> int  
private override OnInterveningUnitBlockingLinkedUndo : unit -> int
JScript does not support explicit interface implementations.

Return Value

Type: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Implements

IVsLinkedUndoClient.OnInterveningUnitBlockingLinkedUndo()

Remarks

When this method is called, it means that the undo manager has a non-linked action on top of its undo or redo stack which is blocking another undo manager from executing its linked action.

If possible, you should do the following in response to this call:

1) Activate a window with a view on the corresponding data using the undo manager.

2) Put up a message box with the provided localized error string or put up your own custom UI.

If you can do the above two so that the user knows what happened, return S_OK. Otherwise, you must return E_FAIL, which will cause the undo to fail and break all transaction links to that document.

.NET Framework Security

See Also

Reference

OleUndoEngine Class

Microsoft.VisualStudio.Shell.Design Namespace

UndoUnit

OleUndoEngine

OleUndoEngine

AddUndoUnit

CreateUndoUnit

DiscardUndoUnit

Dispose

Other Resources

Supplying Undo Support to Designers