Skip to main content

XGameInviteRegisterForEvent (deprecated)

This API is now deprecated. Use XGameActivationRegisterForEvent instead.
Registers a callback for a game invite event.

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: XGameInviteEventCallback*
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 the game invite event.

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 XGameInviteRegisterForEvent function uses an XGameInviteEventCallBack as an argument. To unregister a callback for a game invite event, call XGameInviteUnregisterForEvent. For an example of calling this function, see the remarks section of the XGameInviteEventCallback topic.

Requirements

Header: XGameInvite.h Library: xgameruntime.lib Supported platforms: Windows, XBOX One family consoles and XBOX Series consoles

Conceptual documentation

See also

XGameInvite XGameInviteEventCallBack XGameInviteUnregisterForEvent
Last modified on August 20, 2026