Syntax
Parameters
xboxLiveContext   _In_Type: XblContextHandle XBOX services context handle. handler   _In_
Type: XblRealTimeActivityConnectionStateChangeHandler* The callback function that receives notifications. context   _In_opt_
Type: void* Caller context that will be passed back to the handler function.
Return value
Type: XblFunctionContext An XblFunctionContext object that can be used to unregister the event handler. Pass it to XblRealTimeActivityRemoveConnectionStateChangeHandler. A successful registration returns a token greater than 0. If the function fails, it can return an HRESULT error code cast toXblFunctionContext, which is a negative value. Possible error codes include the following. This list isn’t exhaustive.
Remarks
The handler is registered for the user that’s associated with xboxLiveContext. XSAPI also calls the handler withXblRealTimeActivityConnectionState::Disconnected when it closes an idle connection because the user has no remaining RTA subscriptions or legacy activations.
XSAPI catches and logs exceptions that the handler throws.
