IGameInput::RegisterReadingCallback
Registers a function to be called when a new reading arrives in the input stream.Syntax
Parameters
device _In_opt_Type: IGameInputDevice* Limits registered callback to only trigger for a specific device. inputKind _In_
Type: GameInputKind Limits registered callback to only trigger for devices that support at least one of the specified types of input. context _In_opt_
Type: void* Some object which provides relevant information for the callback function. Typically the calling object. callbackFunc _In_
Type: GameInputReadingCallback Title defined callback function. callbackToken _Result_zeroonfailure_
Type: GameInputCallbackToken* Token identifying the registered callback function. This token will be used to identify the registered function in the event that you would like to cancel or unregister the callback function.
Return value
Type: HRESULT Function result.Remarks
Registering a callback does not cause an initial callback to be dispatched with the most current reading that matches the supplied input filter. It only causes callbacks to be dispatched for subsequent state changes.Requirements
Header: GameInput.h Input API OverviewIGameInput
IGameInput::UnregisterCallback
IGameInput::StopCallback
