XStoreQueryAssociatedProductsForStoreIdAsync
Gets store listing information for purchasable products related to a target product that’s specified by its Store ID.Syntax
Parameters
storeContextHandle _In_Type: XStoreContextHandle The store context handle for the user returned by XStoreCreateContext. storeId _In_
Type: const char* The Store ID for the product for which the associated products are retrieved. productKinds _In_
Type: XStoreProductKind The type of products to return. maxItemsToRetrievePerPage _In_
Type: uint32_t The maximum number of items to retrieve per page. The number of items returned per page can vary from 0 to
maxItemsToRetrievePerPage.
async _Inout_Type: XAsyncBlock* An XAsyncBlock that defines the asynchronous work being done. Use the XAsyncBlock 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
To get the store listing information and execution result for this function, call XStoreQueryAssociatedProductsForStoreIdResult after calling this function. XStoreQueryAssociatedProductsForStoreIdResult contains anXStoreProductQueryHandle that’s enumerated by calling XStoreEnumerateProductsQuery.
This API supports the same paging pattern as described in XStoreQueryAssociatedProductsAsync.Paging can behave differently between sandboxes and RETAIL.
Verify your paging implementation and be sure to test in RETAIL before release.For more information, see Paging.
-
Developers run
XPackageEnumeratePackagesto enumerate installed XPackageKind::Game products, then for one of these games, they runXStoreQueryAssociatedProductsForStoreIdAsyncusing the storeId obtained from theXPackageDetails. Developers runXPackageEnumeratePackagesfor XPackageKind::Content to enumerate installed DLC. Results from the content enumeration and product query are cross-referenced so developers can now identify which DLCs are installed for the specific game. -
Developers run
XStoreQueryAssociatedProductsAsyncto get a list of purchasable products associated with the current game. Then, by using the storeId from the target game’sXStoreProduct, developers runXStoreQueryAssociatedProductsForStoreIdAsyncto find out which DLCs are associated with it.
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
XStoreXStoreQueryAssociatedProductsForStoreIdResult
XStoreQueryAssociatedProductsAsync
XStoreEnumerateProductsQuery
XStoreProductsQueryHasMorePages
XStoreProductsQueryNextPageAsync
