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

# XStoreQueryProductsResult

> XStoreQueryProductsResult

# XStoreQueryProductsResult

获取对 [XStoreQueryProductsAsync](/reference/system/xstore/functions/xstorequeryproductsasync) 调用的结果。

## 语法

```cpp theme={null}
HRESULT XStoreQueryProductsResult(  
         XAsyncBlock* async,  
         XStoreProductQueryHandle* productQueryHandle  
)  
```

### 参数

*async*   \_Inout\_\
类型：[XAsyncBlock\*](/reference/system/xasync/structs/xasyncblock)

传递给 [XStoreQueryProductsAsync](/reference/system/xstore/functions/xstorequeryproductsasync) 的 `XAsyncBlock`。
使用 [XAsyncBlock](/reference/system/xasync/structs/xasyncblock) 检查调用的状态并获取结果。
有关详细信息，请参阅 [XAsyncBlock](/reference/system/xasync/structs/xasyncblock)。

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

返回时，包含表示查询的 XStoreProductQueryHandle。可以将返回的 XStoreProductQueryHandle 传递给 [XStoreEnumerateProductsQuery](/reference/system/xstore/functions/xstoreenumerateproductsquery) 以枚举查询返回的产品。

### 返回值

类型：HRESULT

如果成功，则返回 S\_OK；否则返回错误代码。

## 备注

使用此结果函数获取 [XStoreQueryProductsAsync](/reference/system/xstore/functions/xstorequeryproductsasync) 的执行结果。如果执行成功，则返回列表信息。
在 [XStoreQueryProductsAsync](/reference/system/xstore/functions/xstorequeryproductsasync) 之后调用此函数，通常在回调函数的上下文中。

有关使用示例，请参阅 [XStoreQueryProductsAsync](/reference/system/xstore/functions/xstorequeryproductsasync)。

## 要求

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

**库：** xgameruntime.lib

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

## 概念文档

* [授予玩家访问加载项内容的权限](https://learn.microsoft.com/gaming/gdk/docs/store/commerce/fundamentals/xstore-granting-access-to-content)

## 另请参阅

[XStore](/reference/system/xstore/xstore_members)\
[XStoreQueryAssociatedProductsAsync](/reference/system/xstore/functions/xstorequeryassociatedproductsasync)\
[XStoreQueryEntitledProductsAsync](/reference/system/xstore/functions/xstorequeryentitledproductsasync)\
[XStoreQueryProductsAsync](/reference/system/xstore/functions/xstorequeryproductsasync)\
[XStoreQueryProductForCurrentGameAsync](/reference/system/xstore/functions/xstorequeryproductforcurrentgameasync)\
[XStoreQueryProductForPackageAsync](/reference/system/xstore/functions/xstorequeryproductforpackageasync)\
[基本商店操作](https://learn.microsoft.com/gaming/gdk/docs/store/commerce/fundamentals/xstore-basic-store-operations)\
[授予玩家访问加载项内容的权限](https://learn.microsoft.com/gaming/gdk/docs/store/commerce/fundamentals/xstore-granting-access-to-content)


## Related topics

- [XStoreEnumerateProductsQuery](/zh-CN/reference/system/xstore/functions/xstoreenumerateproductsquery.md)
- [XStoreCloseProductsQueryHandle](/zh-CN/reference/system/xstore/functions/xstorecloseproductsqueryhandle.md)
- [XStoreQueryProductsAsync](/zh-CN/reference/system/xstore/functions/xstorequeryproductsasync.md)
- [XStoreProductsQueryHasMorePages](/zh-CN/reference/system/xstore/functions/xstoreproductsqueryhasmorepages.md)
- [XStoreProductsQueryNextPageAsync](/zh-CN/reference/system/xstore/functions/xstoreproductsquerynextpageasync.md)
