Udostępnij za pośrednictwem


IVsMonitorSelection.AdviseSelectionEvents(IVsSelectionEvents, UInt32) Method

Definition

Registers a VSPackage for selection event notification.

public:
 int AdviseSelectionEvents(Microsoft::VisualStudio::Shell::Interop::IVsSelectionEvents ^ pSink, [Runtime::InteropServices::Out] System::UInt32 % pdwCookie);
int AdviseSelectionEvents(Microsoft::VisualStudio::Shell::Interop::IVsSelectionEvents const & pSink, [Runtime::InteropServices::Out] unsigned int & pdwCookie);
public int AdviseSelectionEvents (Microsoft.VisualStudio.Shell.Interop.IVsSelectionEvents pSink, out uint pdwCookie);
abstract member AdviseSelectionEvents : Microsoft.VisualStudio.Shell.Interop.IVsSelectionEvents * uint32 -> int
Public Function AdviseSelectionEvents (pSink As IVsSelectionEvents, ByRef pdwCookie As UInteger) As Integer

Parameters

pSink
IVsSelectionEvents

[in] Pointer to the IVsSelectionEvents interface of the VSPackage registering for selection event notification.

pdwCookie
UInt32

[out] Pointer to an abstract handle representing the completed registration.

Returns

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  
);  

Applies to