This documentation is archived and is not being maintained.

IVsSolution.AdviseSolutionEvents Method

Establishes client notification of solution events.

Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in microsoft.visualstudio.shell.interop.dll)

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

Parameters

pSink

[in] Pointer to the IVsSolutionEvents interface on the object requesting notification of solution events.

pdwCookie

[out] Unique identifier for the referenced event sink. This value is required to unadvise the event sink using the UnadviseUpdateSolutionEvents 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 IVsSolution::AdviseSolutionEvents(
   [in] IVsSolutionEvents *pSink,
   [out] VSCOOKIE *pdwCookie
);

Use this method to set up notification of solution events on a particular object by synchronizing the solution to the solution events. For example, the Output window contains some panes that provide information about the solution. These panes are closed when the solution is closed. Thus, when the solution close event is received, then the Output window clears the Build pane and the Debug Output pane. For another example, see OnAfterSave.

Show: