IVsDebugger.AdviseDebugEventCallback Method
Used by a client to receive notifications of debugger events. In general, use AdviseDebuggerEvents and UnadviseDebuggerEvents instead.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
‘선언
Function AdviseDebugEventCallback ( _
punkDebuggerEvents As Object _
) As Integer
‘사용 방법
Dim instance As IVsDebugger
Dim punkDebuggerEvents As Object
Dim returnValue As Integer
returnValue = instance.AdviseDebugEventCallback(punkDebuggerEvents)
int AdviseDebugEventCallback(
Object punkDebuggerEvents
)
int AdviseDebugEventCallback(
[InAttribute] Object^ punkDebuggerEvents
)
abstract AdviseDebugEventCallback :
punkDebuggerEvents:Object -> int
function AdviseDebugEventCallback(
punkDebuggerEvents : Object
) : int
Parameters
- punkDebuggerEvents
Type: System.Object
[in] Pointer to the IUnknown interface of an object that also implements IVsDebuggerEvents.
Return Value
Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
This method allows a Visual Studio package to receive all debug events. This can be useful for establishing a custom communication channel between a package and a debug engine. This API should be used with care since it forwards all debug events.
The punkDebuggerEvents object needs to also implement IDebugEventCallback. It is strongly advised that if a package chooses to implement IDebugEventCallback in managed code, that ReleaseComObject be invoked on the various interfaces passed to IDebugEventCallback2::Event.
COM Signature
From vsshell.idl:
HRESULT IVsDebugger::AdviseDebugEventCallback(
[in]IUnknown *punkDebuggerEvents
);
.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.