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

# XStoreQueryProductForPackageResult

> XStoreQueryProductForPackageResult

# XStoreQueryProductForPackageResult

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

## 语法

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

### 参数

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

传递给 [XStoreQueryProductForPackageAsync](/reference/system/xstore/functions/xstorequeryproductforpackageasync) 的 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

HRESULT 成功或错误代码。

## 备注

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

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

## 要求

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

**库：** xgameruntime.lib

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

## 另请参阅

[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)


## Related topics

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