Partager via


IVsMonitorSelection.AdviseSelectionEvents Method

Registers a VSPackage for selection event notification.

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

Syntax

'Déclaration
Function AdviseSelectionEvents ( _
    pSink As IVsSelectionEvents, _
    <OutAttribute> ByRef pdwCookie As UInteger _
) As Integer
'Utilisation
Dim instance As IVsMonitorSelection
Dim pSink As IVsSelectionEvents
Dim pdwCookie As UInteger
Dim returnValue As Integer

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

Parameters

  • pdwCookie
    Type: System.UInt32%
    [out] Pointer to an abstract handle representing the completed registration.

Return Value

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

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsMonitorSelection::AdviseSelectionEvents(
   [in]  IVsSelectionEvents *psink,
   [out] VSCOOKIE           *pdwCookie
);

.NET Framework Security

See Also

Reference

IVsMonitorSelection Interface

IVsMonitorSelection Members

Microsoft.VisualStudio.Shell.Interop Namespace