次の方法で共有


FlavoredProject.IVsHierarchy.AdviseHierarchyEvents Method

Subscribes to hierarchy events.

Namespace:  Microsoft.VisualStudio.Shell.Flavor
Assemblies:   Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)
  Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
  Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)

Syntax

'宣言
Private Function AdviseHierarchyEvents ( _
    eventSink As IVsHierarchyEvents, _
    <OutAttribute> ByRef cookie As UInteger _
) As Integer Implements IVsHierarchy.AdviseHierarchyEvents
'使用
Dim instance As FlavoredProject
Dim eventSink As IVsHierarchyEvents
Dim cookie As UInteger
Dim returnValue As Integer

returnValue = CType(instance, IVsHierarchy).AdviseHierarchyEvents(eventSink, _
    cookie)
int IVsHierarchy.AdviseHierarchyEvents(
    IVsHierarchyEvents eventSink,
    out uint cookie
)
private:
virtual int AdviseHierarchyEvents(
    IVsHierarchyEvents^ eventSink, 
    [OutAttribute] unsigned int% cookie
) sealed = IVsHierarchy::AdviseHierarchyEvents
private abstract AdviseHierarchyEvents : 
        eventSink:IVsHierarchyEvents * 
        cookie:uint32 byref -> int 
private override AdviseHierarchyEvents : 
        eventSink:IVsHierarchyEvents * 
        cookie:uint32 byref -> int 
JScript does not support explicit interface implementations.

Parameters

  • cookie
    Type: System.UInt32%
    [out] Returns the unique identifier used to unsubscribe for these events.

Return Value

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

Implements

IVsHierarchy.AdviseHierarchyEvents(IVsHierarchyEvents, UInt32%)

Remarks

This method calls the AdviseHierarchyEvents method.

.NET Framework Security

See Also

Reference

FlavoredProject Class

FlavoredProject Members

Microsoft.VisualStudio.Shell.Flavor Namespace