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

# XStoreQueryProductForPackageResult

> XStoreQueryProductForPackageResult

# XStoreQueryProductForPackageResult

获取对 [XStoreQueryProductForPackageAsync](https://docs.xbox.com/zh-CN/reference/system/xstore/functions/xstorequeryproductforpackageasync.md) 调用的结果。

## 语法

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

### 参数

*async*   \_Inout\_\
类型：[XAsyncBlock\*](https://docs.xbox.com/zh-CN/reference/system/xasync/structs/xasyncblock.md)

传递给 [XStoreQueryProductForPackageAsync](https://docs.xbox.com/zh-CN/reference/system/xstore/functions/xstorequeryproductforpackageasync.md) 的 XAsyncBlock。[XAsyncBlock](https://docs.xbox.com/zh-CN/reference/system/xasync/structs/xasyncblock.md) 可用于轮询调用的状态并检索调用结果。有关详细信息，请参阅 [XAsyncBlock](https://docs.xbox.com/zh-CN/reference/system/xasync/structs/xasyncblock.md)。

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

返回时，包含表示查询的 XStoreProductQueryHandle。可以将返回的 XStoreProductQueryHandle 传递给 [XStoreEnumerateProductsQuery](https://docs.xbox.com/zh-CN/reference/system/xstore/functions/xstoreenumerateproductsquery.md) 以枚举查询返回的产品。

### 返回值

类型：HRESULT

HRESULT 成功或错误代码。

## 备注

此结果函数允许你检索 [XStoreQueryProductForPackageAsync](https://docs.xbox.com/zh-CN/reference/system/xstore/functions/xstorequeryproductforpackageasync.md) 的执行结果，以及执行成功时所调用的商店产品信息。因此，应在调用 [XStoreQueryProductForPackageAsync](https://docs.xbox.com/zh-CN/reference/system/xstore/functions/xstorequeryproductforpackageasync.md) 之后调用此函数，通常是在回调函数的上下文中。

有关使用示例，请参阅 [XStoreQueryProductForPackageAsync](https://docs.xbox.com/zh-CN/reference/system/xstore/functions/xstorequeryproductforpackageasync.md)。

## 要求

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

**库：** xgameruntime.lib

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

## 另请参阅

[XStore](https://docs.xbox.com/zh-CN/reference/system/xstore/xstore_members.md)
[XStoreQueryAssociatedProductsAsync](https://docs.xbox.com/zh-CN/reference/system/xstore/functions/xstorequeryassociatedproductsasync.md)\
[XStoreQueryEntitledProductsAsync](https://docs.xbox.com/zh-CN/reference/system/xstore/functions/xstorequeryentitledproductsasync.md)\
[XStoreQueryProductsAsync](https://docs.xbox.com/zh-CN/reference/system/xstore/functions/xstorequeryproductsasync.md)\
[XStoreQueryProductForCurrentGameAsync](https://docs.xbox.com/zh-CN/reference/system/xstore/functions/xstorequeryproductforcurrentgameasync.md)\
[XStoreQueryProductForPackageAsync](https://docs.xbox.com/zh-CN/reference/system/xstore/functions/xstorequeryproductforpackageasync.md)


## Related topics

- [XStoreQueryProductForPackageAsync](https://docs.xbox.com/zh-CN/reference/system/xstore/functions/xstorequeryproductforpackageasync.md)
- [XStoreCloseProductsQueryHandle](https://docs.xbox.com/zh-CN/reference/system/xstore/functions/xstorecloseproductsqueryhandle.md)
- [XStoreEnumerateProductsQuery](https://docs.xbox.com/zh-CN/reference/system/xstore/functions/xstoreenumerateproductsquery.md)
- [XStoreProductsQueryHasMorePages](https://docs.xbox.com/zh-CN/reference/system/xstore/functions/xstoreproductsqueryhasmorepages.md)
- [XStoreProductsQueryNextPageResult](https://docs.xbox.com/zh-CN/reference/system/xstore/functions/xstoreproductsquerynextpageresult.md)
