IVsUIHierarchy.AdviseHierarchyEvents Method (IVsHierarchyEvents, UInt32%)
Allows clients to hook up for event notifications without making the hierarchy implement IConnectionPointContainer.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'宣言
Function AdviseHierarchyEvents ( _
pEventSink As IVsHierarchyEvents, _
<OutAttribute> ByRef pdwCookie As UInteger _
) As Integer
'使用
Dim instance As IVsUIHierarchy
Dim pEventSink As IVsHierarchyEvents
Dim pdwCookie As UInteger
Dim returnValue As Integer
returnValue = instance.AdviseHierarchyEvents(pEventSink, _
pdwCookie)
int AdviseHierarchyEvents(
IVsHierarchyEvents pEventSink,
out uint pdwCookie
)
int AdviseHierarchyEvents(
[InAttribute] IVsHierarchyEvents^ pEventSink,
[OutAttribute] unsigned int% pdwCookie
)
abstract AdviseHierarchyEvents :
pEventSink:IVsHierarchyEvents *
pdwCookie:uint32 byref -> int
function AdviseHierarchyEvents(
pEventSink : IVsHierarchyEvents,
pdwCookie : uint
) : int
Parameters
- pEventSink
Type: Microsoft.VisualStudio.Shell.Interop.IVsHierarchyEvents
[in] IVsHierarchyEvents interface on the object requesting notification of hierarchy events.
- pdwCookie
Type: System.UInt32%
[out] Pointer to a unique identifier for the referenced event sink. This value is required to unadvise the event sink using UnadviseHierarchyEvents.
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
COM Signature
From vsshell.idl:
HRESULT IVsUIHierarchy::AdviseHierarchyEvents(
[in] IVsHierarchyEvents *pEventSink,
[out] VSCOOKIE *pdwCookie
);
.NET Framework Security
- 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.