This documentation is archived and is not being maintained.

IVsLiteTree.AdviseTreeEvents Method

Registers an IVsLiteTreeEvents interface and thus adds an events listener to the listener list.

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

int AdviseTreeEvents (
	[InAttribute] IVsLiteTreeEvents^ pEventSink, 
	[OutAttribute] unsigned int% pdwCookie
int AdviseTreeEvents (
	/** @attribute InAttribute() */ IVsLiteTreeEvents pEventSink, 
	/** @attribute OutAttribute() */ /** @ref */ UInt32 pdwCookie
JScript does not support passing value-type arguments by reference.



[in] Pointer to events interface, IVsLiteTreeEvents.


[out] Cookie used to identify this particular instance of the events interface in calling UnadviseTreeEvents.

Return Value

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


From vsshell.idl:

HRESULT IVsLiteTree::AdviseTreeEvents(
   [in] IVsLiteTreeEvents *pEventSink, 
   [out] VSCOOKIE *pdwCookie