> ## 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

枚举产品查询的结果。

## 语法

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

### 参数

*productQueryHandle*   \_In\_\
类型：XStoreProductQueryHandle

要枚举结果的查询的句柄。XStoreProductQueryHandle 由 [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) 和 [XStoreQueryProductsResult](/reference/system/xstore/functions/xstorequeryproductsresult) 返回。

*context*   \_In\_opt\_\
类型：void\*

要传递给回调的、由游戏定义的上下文。

*callback*   \_In\_\
类型：[XStoreProductQueryCallback\*](/reference/system/xstore/functions/xstoreproductquerycallback)

将为每个产品调用的、由游戏定义的回调。

### 返回值

类型：HRESULT

HRESULT 成功或错误代码。

## 备注

此函数可在时间敏感线程上安全调用。

此函数用于枚举请求产品信息的函数所返回的产品。如有必要，一旦你调用了产品枚举，可使用 [XStoreProductsQueryHasMorePages](/reference/system/xstore/functions/xstoreproductsqueryhasmorepages) 函数来检查是否有更多产品信息。如果有更多产品信息要读取，则使用 [XStoreProductsQueryNextPageAsync](/reference/system/xstore/functions/xstoreproductsquerynextpageasync) 来读取。有关用法示例，请参阅 [XStoreQueryAssociatedProductsAsync](/reference/system/xstore/functions/xstorequeryassociatedproductsasync)。

## 要求

**头文件：** XStore.h（包含于 XGameRuntime.h 中）

**库：** xgameruntime.lib

**支持的平台：** Windows、XBOX One 系列主机和 XBOX Series 主机

## 概念文档

* [时间敏感线程](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## 另请参阅

[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](/zh-CN/reference/system/xstore/functions/xstoreproductquerycallback.md)
- [XStoreProductsQueryHasMorePages](/zh-CN/reference/system/xstore/functions/xstoreproductsqueryhasmorepages.md)
- [XStoreProductsQueryNextPageAsync](/zh-CN/reference/system/xstore/functions/xstoreproductsquerynextpageasync.md)
- [XStoreQueryProductsResult](/zh-CN/reference/system/xstore/functions/xstorequeryproductsresult.md)
- [XStoreQueryAssociatedProductsResult](/zh-CN/reference/system/xstore/functions/xstorequeryassociatedproductsresult.md)
