This documentation is archived and is not being maintained.

IVsRunningDocumentTable.AdviseRunningDocTableEvents Method

Enables the client to receive notifications of changes to the Running Document Table (RDT).

Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in

int AdviseRunningDocTableEvents (
	[InAttribute] IVsRunningDocTableEvents pSink,
	out uint pdwCookie
int AdviseRunningDocTableEvents (
	/** @attribute InAttribute() */ IVsRunningDocTableEvents pSink, 
	/** @attribute OutAttribute() */ /** @ref */ UInt32 pdwCookie
JScript does not support passing value-type arguments by reference.



[in] The IVsRunningDocTableEvents interface that receives the event notifications.


[out] Returns an abstract value that identifies the client to be advised of RDT events. Use this cookie later in a call to the UnadviseRunningDocTableEvents method.

Return Value

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

COM Signature

From vsshell.idl:

HRESULT IVsRunningDocumentTable::AdviseRunningDocTableEvents(
   [in] IVsRunningDocTableEvents *pSink,
   [out] VSCOOKIE                *pdwCookie

The IVsRunningDocTableEvents interface can contain additional interfaces such as IVsRunningDocTableEvents2, IVsRunningDocTableEvents3, and IVsRunningDocTableEvents4 to handle additional events. The environment calls the QueryInterface method on the IVsRunningDocTableEvents interface to obtain the other interfaces.