XGameStreamingRegisterConnectionStateChanged
Registers a callback to be invoked when a streaming client device’s connection state changes. Upon registration, the callback will be invoked for all streaming client devices that are already connected.Syntax
Parameters
queue _In_opt_Type: XTaskQueueHandle Handle to the asynchronous queue to put the change callback on. context _In_opt_
Type: void* An optional pointer to the context passed to the callback function. callback _In_
Type: XGameStreamingConnectionStateChangedCallback* The callback function that will be invoked when any streaming client device’s connection state changes. token _Out_
Type: XTaskQueueRegistrationToken* A pointer to the registration token which can be used to unregister from the event.
Return value
Type: HRESULT Returns S_OK if successful; otherwise, returns an error code.Potential Errors
For a list of error codes, see Error Codes.
Remarks
This function isn’t safe to call on a time-sensitive thread. For more information, see Time-sensitive threads.
Upon registration, the callback will be invoked for all streaming client devices that are currently connected.
Example
Requirements
Header: xgamestreaming.h Library: xgameruntime.lib Supported platforms: Windows, XBOX One family consoles and XBOX Series consolesConceptual documentation
See also
XGameStreamingConnectionStateXGameStreamingConnectionStateChangedCallback
XGameStreamingUnregisterConnectionStateChanged
XGameStreaming
