XStoreCreateContext
Creates a store context for the specified user.Syntax
Parameters
user _In_opt_Type: XUserHandle The user to create the store context for.
This parameter is optional for PC games only: simply pass a nullptr value. On PC the user signed into the Microsoft Store is used automatically and this parameter is ignored. A valid XUser is required for console games. storeContextHandle _Out_
Type: XStoreContextHandle* On success contains the created store context.
Return value
Type: HRESULT HRESULT success or error code.Remarks
NOTE: On consoles, the XStoreContextHandle created by this function is invalidated after a Suspend or Quick Resume event. To safely handle these conditions we recommend closing a XStoreContextHandle and recreating it whenever the game resumes from a suspended state.This function isn’t safe to call on a time-sensitive thread. For more information, see Time-sensitive threads.
Requirements
Header: XStore.h (included in XGameRuntime.h) Library: xgameruntime.lib Supported platforms: Windows, XBOX One family consoles and XBOX Series consolesConceptual documentation
See also
XStoreXStoreCloseContextHandle
XStoreRegisterGameLicenseChanged
