IDebugClient::SetEventCallbacks 方法 (dbgeng.h)
SetEventCallbacks 方法向此客户端注册事件回调对象。
语法
HRESULT SetEventCallbacks(
[in, optional] PDEBUG_EVENT_CALLBACKS Callbacks
);
参数
[in, optional] Callbacks
指定要向此客户端注册的事件回调对象的接口指针。
返回值
根据 回调指定的对象中方法 IDebugEventCallbacks::GetInterestMask 的实现,可能会返回其他值,如“备注”部分所述。
返回代码 | 描述 |
---|---|
|
该方法成功。 |
言论
如果 回调 的值未 NULL,则调用方法 IDebugEventCallbacks::GetInterestMask。 如果未S_OK返回值,SetEventCallbacks,SetEventCallbacksWide 不起作用,并且返回此值。
每个客户端最多可以有一个 IDebugEventCallbacks 或 IDebugEventCallbacksWide 对象注册,以接收 事件。
IDebugEventCallbacks 接口扩展 COM 接口 IUnknown。 SetEventCallbacks 和 SetEventCallbacksWide 成功时,它们调用由 回调指定的对象的 IUnknown::AddRef 方法。 此对象的 IUnknown::Release 方法将在下次 SetEventCallbacks 或 SetEventCallbacksWide 在此客户端上调用时调用,或者在删除此客户端时调用。
有关回调的详细信息,请参阅 回调。
要求
要求 | 价值 |
---|---|
目标平台 | 桌面 |
标头 | dbgeng.h (包括 Dbgeng.h) |