Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
This API is now deprecated. Use XGameActivationRegisterForEvent instead.
Registers a callback for protocol activation.
Syntax
STDAPI XGameProtocolRegisterForActivation(
_In_opt_ XTaskQueueHandle queue,
_In_opt_ void* context,
_In_ XGameProtocolActivationCallback * callback,
_Out_ XTaskQueueRegistrationToken* token
) noexcept;
Parameters
queue _In_opt_
Type: XTaskQueueHandle
The task queue that dispatches the event callback.
context _In_opt_
Type: void*
The context we pass to the event callback.
callback _In_
Type: XGameProtocolActivationCallback*
The event callback function.
token _Out_
Type: XTaskQueueRegistrationToken*
A token from the task queue that represents the registration. Use the token to unregister the callback for protocol activation.
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.
The XGameProtocolRegisterForActivation function uses an XGameProtocolActivationCallback as an argument.
To unregister a callback for a game invite event, call XGameProtocolUnregisterForEvent.
Requirements
Header: XGameProtocol.h
Library: xgameruntime.lib
Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles