HierarchyNode.AdviseHierarchyEvents Method
Establishes client notification of hierarchy events.
Namespace: Microsoft.VisualStudio.Package
Assembly: MPF.Project.NonShipping (in MPF.Project.NonShipping.dll)
Syntax
'宣言
Public Overridable Function AdviseHierarchyEvents ( _
sink As IVsHierarchyEvents, _
<OutAttribute> ByRef cookie As UInteger _
) As Integer
'使用
Dim instance As HierarchyNode
Dim sink As IVsHierarchyEvents
Dim cookie As UInteger
Dim returnValue As Integer
returnValue = instance.AdviseHierarchyEvents(sink, _
cookie)
public virtual int AdviseHierarchyEvents(
IVsHierarchyEvents sink,
out uint cookie
)
public:
virtual int AdviseHierarchyEvents(
IVsHierarchyEvents^ sink,
[OutAttribute] unsigned int% cookie
)
public function AdviseHierarchyEvents(
sink : IVsHierarchyEvents,
cookie : uint
) : int
Parameters
sink
Type: Microsoft.VisualStudio.Shell.Interop.IVsHierarchyEventsA client-side event sink that implements IVsHierarchyEvents.
cookie
Type: System.UInt32%A unique identifier for the referenced event sink, which is used later to stop notification.
Return Value
Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Implements
IVsUIHierarchy.AdviseHierarchyEvents(IVsHierarchyEvents, UInt32%)
IVsHierarchy.AdviseHierarchyEvents(IVsHierarchyEvents, UInt32%)
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.