PsSetEventCallback

Assigns a debugging protocol event callback to the given engine.

Syntax

PULSE_STATUS PsSetEventCallback(
 [in] PPS_ENGINE pEngine,
 [in] lpfnEventCallback EventCallback,
 [in] uintptr_t Context
);

Parameters

PPS_ENGINE pEngine

An opaque handle to an engine created by the EngCreateEngine function.

lpfnEventCallback EventCallback

A callback function that will be called every time the engine receives a debugging event. See the defintion of lpfnEventCallback for its arguments.

uintptr_t Context

A user-defined context for the lpfnEventCallback function. This will be passed as the "Context" parameter in the callback.

Return value

If the function succeeds, the return value is PULSE_STATUS_SUCCESS.

If it fails, it returns one of the PULSE_STATUS values. Possible return codes include, but are not limited to, the following:

PULSE_STATUS_INVALID_PARAMETER
0xC0000010
The pEngine argument is NULL.

Remarks

This callback is executed in a dedicated thread. You cannot call any other PulseSDK function within it. The engine will not continue working until the callback function returns.

It can be set at any moment during the engine's lifetime.

It can be set to NULL so that it won't trigger any event callbacks.