Compartilhar via


IVsUIHierarchy.AdviseHierarchyEvents(IVsHierarchyEvents, UInt32) Method

Definition

Allows clients to hook up for event notifications without making the hierarchy implement IConnectionPointContainer.

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

Parameters

pEventSink
IVsHierarchyEvents

[in] IVsHierarchyEvents interface on the object requesting notification of hierarchy events.

pdwCookie
UInt32

[out] Pointer to a unique identifier for the referenced event sink. This value is required to unadvise the event sink using UnadviseHierarchyEvents(UInt32).

Returns

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

Implements

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsUIHierarchy::AdviseHierarchyEvents(  
   [in] IVsHierarchyEvents *pEventSink,  
   [out] VSCOOKIE *pdwCookie  
);  

Applies to