Debugging Tools for Windows

SetEventCallbacks

The SetEventCallbacks and SetEventCallbacksWide methods register an event callbacks object with this client.

HRESULT
  IDebugClient::SetEventCallbacks(
    IN IDebugEventCallbacks *  Callbacks
    );

HRESULT
  IDebugClient5::SetEventCallbacksWide(
    IN IDebugEventCallbacks *  Callbacks
    );

#ifdef UNICODE
#define SetEventCallbacksT SetEventCallbacksWide
#define IDebugEventCallbacksT IDebugEventCallbacksWide
#else
#define SetEventCallbacksT SetEventCallbacks
#define IDebugEventCallbacksT IDebugEventCallbacksWide
#endif

Parameters

Callbacks
Specifies the interface pointer to the event callbacks object to register with this client.

Return Value

S_OK
The method was successful.

Depending on the implementation of the method IDebugEventCallbacks::GetInterestMask in the object specified by Callbacks, other values may be returned, as described in the Comments section.

Interface Version

SetEventCallbacks is available in all versions of IDebugClient. SetEventCallbacksWide is available in IDebugClient5 and later versions.

Comments

If the value of Callbacks is not NULL, the method IDebugEventCallbacks::GetInterestMask is called. If the return value is not S_OK, SetEventCallbacks and SetEventCallbacksWide have no effect and they return this value.

Each client can have at most one IDebugEventCallbacks or IDebugEventCallbacksWide object registered with it for receiving events.

The IDebugEventCallbacks interface extends the COM interface IUnknown. When SetEventCallbacks and SetEventCallbacksWide are successful, they call the IUnknown::AddRef method of the object specified by Callbacks. The IUnknown::Release method of this object will be called the next time SetEventCallbacks or SetEventCallbacksWide is called on this client, or when this client is deleted.

For more information about callbacks, see Callbacks.

Requirements

Headers: Defined in dbgeng.h. Include dbgeng.h.

See Also

IDebugEventCallbacks, GetEventCallbacks

Build machine: CAPEBUILD