Partilhar via


IVsRunningDocTableEvents2 Interface

Definition

Implements methods that fire in response to changes to documents in the Running Document Table (RDT).

public interface class IVsRunningDocTableEvents2 : Microsoft::VisualStudio::Shell::Interop::IVsRunningDocTableEvents
public interface class IVsRunningDocTableEvents2 : Microsoft::VisualStudio::Shell::Interop::IVsRunningDocTableEvents
__interface IVsRunningDocTableEvents2 : Microsoft::VisualStudio::Shell::Interop::IVsRunningDocTableEvents
[System.Runtime.InteropServices.Guid("15C7826F-443C-406D-98F8-55F6260669EC")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsRunningDocTableEvents2 : Microsoft.VisualStudio.Shell.Interop.IVsRunningDocTableEvents
[System.Runtime.InteropServices.Guid("15C7826F-443C-406D-98F8-55F6260669EC")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IVsRunningDocTableEvents2 : Microsoft.VisualStudio.Shell.Interop.IVsRunningDocTableEvents
[<System.Runtime.InteropServices.Guid("15C7826F-443C-406D-98F8-55F6260669EC")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsRunningDocTableEvents2 = interface
    interface IVsRunningDocTableEvents
[<System.Runtime.InteropServices.Guid("15C7826F-443C-406D-98F8-55F6260669EC")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IVsRunningDocTableEvents2 = interface
    interface IVsRunningDocTableEvents
Public Interface IVsRunningDocTableEvents2
Implements IVsRunningDocTableEvents
Derived
Attributes
Implements

Remarks

The IVsRunningDocTableEvents2 interface is specified in a call to the AdviseRunningDocTableEvents method in the IVsRunningDocumentTable interface.

The interface's methods use a cookie to represent the client requesting the notification. You use the cookie in the call to the UnadviseRunningDocTableEvents method when the package no longer wants to listen to RDT events.

You may want to implement additional interfaces for richer event notification:

  • To receive notice before a document is saved, implement the IVsRunningDocTableEvents3 interface.

  • To receive notice before the first lock on a document is applied (giving you a chance to load the document), implement the IVsRunningDocTableEvents4 interface.

Notes to Implementers

Implement this interface in your packages to receive events about the state of documents in the RDT. Note that this interface derives from the IVsRunningDocTableEvents interface and must implement all methods on that interface as well.

The cookie parameter passed to all of the methods in this interface represents the document affected by a particular event. This cookie is the same value returned from the FindAndLockDocument(UInt32, String, IVsHierarchy, UInt32, IntPtr, UInt32) or RegisterAndLockDocument(UInt32, String, IVsHierarchy, UInt32, IntPtr, UInt32) methods in the IVsRunningDocumentTable interface.

Notes to Callers

The environment calls this interface when specific events have occurred. This interface provides access to more information than IVsRunningDocTableEvents about when a document is renamed.

Methods

OnAfterAttributeChange(UInt32, UInt32)

Called after a change in a document attribute of a document in the Running Document Table (RDT).

OnAfterAttributeChangeEx(UInt32, UInt32, IVsHierarchy, UInt32, String, IVsHierarchy, UInt32, String)

Called after a document attribute changes. This is an advanced version of the OnAfterAttributeChange(UInt32, UInt32) method.

OnAfterDocumentWindowHide(UInt32, IVsWindowFrame)

Called after a document window is hidden.

OnAfterFirstDocumentLock(UInt32, UInt32, UInt32, UInt32)

Called after applying the first lock of the specified type to the specified document in the Running Document Table (RDT).

OnAfterSave(UInt32)

Called after a document in the Running Document Table (RDT) is saved.

OnBeforeDocumentWindowShow(UInt32, Int32, IVsWindowFrame)

Called before displaying a document window.

OnBeforeLastDocumentUnlock(UInt32, UInt32, UInt32, UInt32)

Called before releasing the last lock of the specified type on the specified document in the Running Document Table (RDT).

Applies to