Skip to main content

XStoreCanAcquireLicenseForPackageAsync

Retrieves a preview license for DLC (Durable with package). This API allows the game to see if the Durable’s package is licensable, but without actually acquiring the license.

Syntax

Parameters

storeContextHandle   _In_
Type: XStoreContextHandle
The store context handle for the user returned by XStoreCreateContext. packageIdentifier   _In_z_
Type: char*
A string that uniquely identifies a store package. For more information about package identifiers, see Manage and license downloadable content (DLC). async   _Inout_
Type: XAsyncBlock*
An XAsyncBlock defining the asynchronous work being done. The XAsyncBlock can be used to poll for the call’s status and retrieve call results. See XAsyncBlock for more information.

Return value

Type: HRESULT HRESULT success or error code.

Remarks

To retrieve the preview license and the execution result of this function call XStoreCanAcquireLicenseForPackageResult after calling this function. This function requires an online connection and only checks whether a package’s license can be acquired. To acquire a license for a package, call XStoreAcquireLicenseForPackageAsync. This code snippet shows an example of using the following APIs:

Requirements

Header: XStore.h (included in XGameRuntime.h) Library: xgameruntime.lib Supported platforms: Windows, XBOX One family consoles, and XBOX Series consoles

Conceptual documentation

See also

XStore
XStoreCanAcquireLicenseForPackageResult
XStoreAcquireLicenseForPackageAsync
Manage and license downloadable content (DLC)
Last modified on August 20, 2026