XUserRegisterForDeviceAssociationChanged
Registers a callback for user device association change events.
Syntax
HRESULT XUserRegisterForDeviceAssociationChanged(
XTaskQueueHandle queue,
void* context,
XUserDeviceAssociationChangedCallback* callback,
XTaskQueueRegistrationToken* token
)
Parameters
queue _In_opt_
Type: XTaskQueueHandle
A handle to the asynchronous queue to put the change callback on.
context _In_opt_
Type: void*
A callback the application defines and passes back to the callback.
callback _In_
Type: XUserDeviceAssociationChangedCallback*
A callback the application defines and registers.
token _Out_
Type: XTaskQueueRegistrationToken*
On success contains a token identifying the callback you can use to un-register the callback.
Return value
Type: HRESULT
HRESULT success or error code.
For a list of error codes, see Error Codes.
Remarks
Note
This function isn't safe to call on a time-sensitive thread. For more information, see Time-sensitive threads.
Calling XUserDeviceAssociationRegisterForChangeEvent does not invalidate previously registered callbacks.
To unregister a user device association change callback, call XUserUnregisterForDeviceAssociationChanged.
To register a callback that the application defines and invokes when the default endpoint changes, call XUserRegisterForDefaultAudioEndpointUtf16Changed.
To unregister a default audio endpoint change callback, call XUserUnregisterForDefaultAudioEndpointUtf16Changed.
Requirements
Header: XUser.h
Library: xgameruntime.lib
Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles
See also
XUserUnregisterForDeviceAssociationChanged