XStoreQueryProductsAsync
Returns listing information for the specified products that are associated with the current game, regardless of whether the products are available for purchase within the game.Syntax
Parameters
storeContextHandle _In_Type: XStoreContextHandle The store context handle for the user returned by XStoreCreateContext. productKinds _In_
Type: XStoreProductKind The types of products to return. storeIds _In_z_count_(storeIdsCount)
Type: char** The store identifiers for the products to retrieve. storeIdsCount _In_
Type: size_t The number of products in the list of storeIds. This number shouldn’t exceed 100. actionFilters _In_opt_z_count_(actionFiltersCount)
Type: char** Restricts the results by some action stored in the product document. By default, this API returns all products, even if they aren’t purchasable, but you can use action filters to restrict results. For example, use “Purchase” if you only want purchasable products, or “License” if you only want licensable products. Other action filters include “Fulfill”, “Browse”, “Curate”, “Details”, and “Redeem”. actionFiltersCount _In_
Type: size_t The number of filters in actionFilters. async _Inout_
Type: XAsyncBlock* An XAsyncBlock defining the asynchronous work being done. Use the XAsyncBlock to check the call’s status and get the results. For more information, see XAsyncBlock.
Return value
Type: HRESULT HRESULT success or error code.Remarks
Call XStoreQueryProductsResult to retrieve the listing information and the execution result of this function. This API fails if you provide more than 100 storeIDs in the request. If you’re working with a large catalog, limit each query to fewer than 100 products. To get details for all products that players can purchase within the current game, use XStoreQueryAssociatedProductsAsync instead. The following code snippet shows an example of retrieving listing information for the specified products that are associated with the current game.Requirements
Header: XStore.h (included in XGameRuntime.h) Library: xgameruntime.lib Supported platforms: Windows, XBOX One family consoles, and XBOX Series consolesConceptual documentation
- Basic store operations
- Granting players access to add-on content
- Fine Grained Rate Limiting for Microsoft Store APIs
See also
XStore XStoreQueryProductsResultXStoreQueryAssociatedProductsAsync
XStoreQueryEntitledProductsAsync
XStoreQueryProductsAsync
XStoreQueryProductForCurrentGameAsync
XStoreQueryProductForPackageAsync
Basic store operations
Granting players access to add-on content
