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

# 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](https://docs.xbox.com/reference/system/xstore/functions/xstorequeryproductforcurrentgameresult.md), [XStoreQueryProductForPackageResult.md](https://docs.xbox.com/reference/system/xstore/functions/xstorequeryproductforpackageresult.md), [XStoreQueryEntitledProductsResult](https://docs.xbox.com/reference/system/xstore/functions/xstorequeryentitledproductsresult.md), [XStoreQueryAssociatedProductsAsync](https://docs.xbox.com/reference/system/xstore/functions/xstorequeryassociatedproductsasync.md), and [XStoreQueryProductsResult](https://docs.xbox.com/reference/system/xstore/functions/xstorequeryproductsresult.md).

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

Game defined context to pass to callback.

*callback*   \_In\_\
Type: [XStoreProductQueryCallback\*](https://docs.xbox.com/reference/system/xstore/functions/xstoreproductquerycallback.md)

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](https://docs.xbox.com/reference/system/xstore/functions/xstoreproductsqueryhasmorepages.md) function to check for further product information. If there is more product information to be read then use [XStoreProductsQueryNextPageAsync](https://docs.xbox.com/reference/system/xstore/functions/xstoreproductsquerynextpageasync.md) to read it. See [XStoreQueryAssociatedProductsAsync](https://docs.xbox.com/reference/system/xstore/functions/xstorequeryassociatedproductsasync.md) 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](https://docs.xbox.com/reference/system/xstore/xstore_members.md)\
[XStoreQueryAssociatedProductsAsync](https://docs.xbox.com/reference/system/xstore/functions/xstorequeryassociatedproductsasync.md)\
[XStoreQueryProductsResult](https://docs.xbox.com/reference/system/xstore/functions/xstorequeryproductsresult.md)\
[XStoreProductQueryCallback](https://docs.xbox.com/reference/system/xstore/functions/xstoreproductquerycallback.md)


## Related topics

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