> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XStoreEnumerateProductsQuery

> XStoreEnumerateProductsQuery

# XStoreEnumerateProductsQuery

Enumerates the results of a products query.

## Syntax

```cpp theme={null}
HRESULT XStoreEnumerateProductsQuery(  
         const XStoreProductQueryHandle productQueryHandle,  
         void* context,  
         XStoreProductQueryCallback* callback  
)  
```

### Parameters

*productQueryHandle*   \_In\_\
Type: XStoreProductQueryHandle

The handle of the query to enumerate the results of. XStoreProductQueryHandle is returned by [XStoreQueryProductForCurrentGameResult](/reference/system/xstore/functions/xstorequeryproductforcurrentgameresult), [XStoreQueryProductForPackageResult.md](/reference/system/xstore/functions/xstorequeryproductforpackageresult), [XStoreQueryEntitledProductsResult](/reference/system/xstore/functions/xstorequeryentitledproductsresult), [XStoreQueryAssociatedProductsAsync](/reference/system/xstore/functions/xstorequeryassociatedproductsasync), and [XStoreQueryProductsResult](/reference/system/xstore/functions/xstorequeryproductsresult).

*context*   \_In\_opt\_\
Type: void\*

Game defined context to pass to callback.

*callback*   \_In\_\
Type: [XStoreProductQueryCallback\*](/reference/system/xstore/functions/xstoreproductquerycallback)

Game define callback to be called for each product.

### Return value

Type: HRESULT

HRESULT success or error code.

## Remarks

This function is safe to call on a time-sensitive thread.

This function is used to enumerate products returned by a function that requests product information. If necessary, once you have called for the enumeration of products use the [XStoreProductsQueryHasMorePages](/reference/system/xstore/functions/xstoreproductsqueryhasmorepages) function to check for further product information. If there is more product information to be read then use [XStoreProductsQueryNextPageAsync](/reference/system/xstore/functions/xstoreproductsquerynextpageasync) to read it. See [XStoreQueryAssociatedProductsAsync](/reference/system/xstore/functions/xstorequeryassociatedproductsasync) for a usage example.

## Requirements

**Header:** XStore.h (included in XGameRuntime.h)

**Library:** xgameruntime.lib

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## Conceptual documentation

* [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## See also

[XStore](/reference/system/xstore/xstore_members)\
[XStoreQueryAssociatedProductsAsync](/reference/system/xstore/functions/xstorequeryassociatedproductsasync)\
[XStoreQueryProductsResult](/reference/system/xstore/functions/xstorequeryproductsresult)\
[XStoreProductQueryCallback](/reference/system/xstore/functions/xstoreproductquerycallback)


## Related topics

- [XStoreProductQueryCallback](/reference/system/xstore/functions/xstoreproductquerycallback.md)
- [XStoreQueryProductsResult](/reference/system/xstore/functions/xstorequeryproductsresult.md)
- [XStoreQueryAssociatedProductsForStoreIdResult](/reference/system/xstore/functions/xstorequeryassociatedproductsforstoreidresult.md)
- [XStoreProductsQueryHasMorePages](/reference/system/xstore/functions/xstoreproductsqueryhasmorepages.md)
- [XStoreProductsQueryNextPageAsync](/reference/system/xstore/functions/xstoreproductsquerynextpageasync.md)
