Skip to main content

XGameProtocolRegisterForActivation (deprecated)

This API is now deprecated. Use XGameActivationRegisterForEvent instead.
Registers a callback for protocol activation.

Syntax

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

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

See also

XGameProtocol members
Last modified on August 20, 2026