XStoreCanAcquireLicenseForStoreIdAsync
Retrieves a preview license for licensable content, including Durables with or without packages, and content on a disc that is currently inserted. This API allows the game to see if the product is licensable, but without actually acquiring the license.Syntax
Parameters
storeContextHandle _In_Type: XStoreContextHandle The store context handle for the user returned by XStoreCreateContext. storeProductId _In_z_
Type: char* StoreID for the product to check 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. For more information, see XAsyncBlock.
Return value
Type: HRESULT HRESULT success or error code.Remarks
XStoreCanAcquireLicenseForStoreIdAsync provides the ability for a game to determine if the user could acquire a license for a particular piece of content without actually acquiring that license and using up that user’s concurrency slot. This function doesn’t need to be used for the currently running game, since it has a license already, but it can determine if the user owns other games or content from the same publisher. For example, a game can use this API to determine whether to reward users who own prior versions of the game (either digitally or from an inserted disc) or to up-sell products to the user. To retrieve the preview license and the execution result of this function call XStoreCanAcquireLicenseForStoreIdResult after calling this function. This code snippet shows an example of using the following APIs:- XStoreCanAcquireLicenseForStoreIdAsync
- XStoreCanAcquireLicenseForStoreIdResult
Requirements
Header: XStore.h (included in XGameRuntime.h) Library: xgameruntime.lib Supported platforms: Windows, XBOX One family consoles, and XBOX Series consolesConceptual documentation
- Granting players access to add-on content
- Manage and license downloadable content (DLC)
- Enabling licensing testing
See also
XStoreXStoreCanAcquireLicenseForStoreIdResult
How to use a durable without a package
Granting players access to add-on content
