This documentation is archived and is not being maintained.

IVsTrackProjectDocuments2.AdviseTrackProjectDocumentsEvents Method

This method enables clients to receive notifications of project documents events.

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

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



[in] Pointer to the IVsTrackProjectDocumentsEvents2 interface.


[out] Pointer to an abstract handle that identifies the client to be advised of project documents events.

Return Value

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

COM Signature

From IVsTrackProjectDocuments2.idl

HRESULT IVsTrackProjectDocuments2::AdviseTrackProjectDocumentsEvents(
   [in] IVsTrackProjectDocumentsEvents2 *pEventSink,
   [out] VSCOOKIE *pdwCookie

The pdwCookie parameter is passed in with a call to UnadviseTrackProjectDocumentsEvents when the client wants to be unadvised of these events.