RegisterOutputCallbackInteractionContext function (interactioncontext.h)

Registers a callback to receive interaction events from an Interaction Context object.


HRESULT RegisterOutputCallbackInteractionContext(
  [in]           HINTERACTIONCONTEXT                 interactionContext,
  [in]           INTERACTION_CONTEXT_OUTPUT_CALLBACK outputCallback,
  [in, optional] void                                *clientData


[in] interactionContext

Handle to the Interaction Context.

[in] outputCallback

The callback function.

[in, optional] clientData

A pointer to an object that contains information about the client. The value typically points to the object for which the member function is called (this).

Return value

If this function succeeds, it returns S_OK.

Otherwise, it returns an HRESULT error code.


Each instance of an Interaction Context is limited to one output callback. Registering a callback function overwrites any existing callback registration for the Interaction Context.

This function is typically called after the creation of an Interaction Context or when the Interaction Context is reassigned to another UI element.


Minimum supported client Windows 8 [desktop apps only]
Minimum supported server None supported
Target Platform Windows
Header interactioncontext.h
Library Ninput.lib
DLL Ninput.dll

See also



Interaction Context Functions