Partager via


IVsSolution2.AdviseSolutionEvents Method (IVsSolutionEvents, UInt32%)

Establishes client notification of solution events.

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

Syntax

'Déclaration
Function AdviseSolutionEvents ( _
    pSink As IVsSolutionEvents, _
    <OutAttribute> ByRef pdwCookie As UInteger _
) As Integer
'Utilisation
Dim instance As IVsSolution2
Dim pSink As IVsSolutionEvents
Dim pdwCookie As UInteger
Dim returnValue As Integer

returnValue = instance.AdviseSolutionEvents(pSink, _
    pdwCookie)
int AdviseSolutionEvents(
    IVsSolutionEvents pSink,
    out uint pdwCookie
)
int AdviseSolutionEvents(
    [InAttribute] IVsSolutionEvents^ pSink, 
    [OutAttribute] unsigned int% pdwCookie
)
abstract AdviseSolutionEvents : 
        pSink:IVsSolutionEvents * 
        pdwCookie:uint32 byref -> int 
function AdviseSolutionEvents(
    pSink : IVsSolutionEvents, 
    pdwCookie : uint
) : int

Parameters

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Implements

IVsSolution.AdviseSolutionEvents(IVsSolutionEvents, UInt32%)

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsSolution2::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.

.NET Framework Security

See Also

Reference

IVsSolution2 Interface

IVsSolution2 Members

AdviseSolutionEvents Overload

Microsoft.VisualStudio.Shell.Interop Namespace