Skip to main content
Creates an XblContextHandle used to access XBOX services.

Syntax

Parameters

user   _In_
Type: XblUserHandle
The user associated with this XBOX services context. context   _Out_
Type: XblContextHandle*
Passes back the XBOX services context handle.

Return value

Type: HRESULT HRESULT return code for this API operation. Possible error codes include the following. This list isn’t exhaustive.

Remarks

Call this function after XblInitialize succeeds and the user has signed in. Create one context for each signed-in user. If more than one component needs the same context, call XblContextDuplicateHandle instead of creating a second context for the same user. Close every handle with XblContextCloseHandle when you no longer need it. For an example, see How to use XBOX services APIs.

Requirements

Header: xbox_live_context_c.h Library: Microsoft.Xbox.Services.142.C.lib or Microsoft.Xbox.Services.143.C.lib

See also

xbox_live_context_c
Last modified on October 29, 2026