> ## 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](/zh-TW/reference/system/xstore/functions/xstorequeryproductforcurrentgameresult)、[XStoreQueryProductForPackageResult.md](/zh-TW/reference/system/xstore/functions/xstorequeryproductforpackageresult)、[XStoreQueryEntitledProductsResult](/zh-TW/reference/system/xstore/functions/xstorequeryentitledproductsresult)、[XStoreQueryAssociatedProductsAsync](/zh-TW/reference/system/xstore/functions/xstorequeryassociatedproductsasync) 和 [XStoreQueryProductsResult](/zh-TW/reference/system/xstore/functions/xstorequeryproductsresult) 傳回。

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

要傳遞給回呼的遊戲定義內容。

*callback*   \_In\_\
類型：[XStoreProductQueryCallback\*](/zh-TW/reference/system/xstore/functions/xstoreproductquerycallback)

針對每個產品呼叫的遊戲定義回呼。

### 傳回值

類型：HRESULT

HRESULT 成功或錯誤碼。

## 備註

在時間敏感執行緒上呼叫此函式是安全的。

此函式可用來列舉要求產品資訊之函式所傳回的產品。必要時，在您呼叫產品列舉之後，請使用 [XStoreProductsQueryHasMorePages](/zh-TW/reference/system/xstore/functions/xstoreproductsqueryhasmorepages) 函式檢查是否有更多產品資訊。如果還有更多產品資訊要讀取，請使用 [XStoreProductsQueryNextPageAsync](/zh-TW/reference/system/xstore/functions/xstoreproductsquerynextpageasync) 進行讀取。如需使用範例，請參閱 [XStoreQueryAssociatedProductsAsync](/zh-TW/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](/zh-TW/reference/system/xstore/xstore_members)\
[XStoreQueryAssociatedProductsAsync](/zh-TW/reference/system/xstore/functions/xstorequeryassociatedproductsasync)\
[XStoreQueryProductsResult](/zh-TW/reference/system/xstore/functions/xstorequeryproductsresult)\
[XStoreProductQueryCallback](/zh-TW/reference/system/xstore/functions/xstoreproductquerycallback)


## Related topics

- [XStoreEnumerateProductsQuery](/reference/system/xstore/functions/xstoreenumerateproductsquery.md)
- [XStoreProductQueryCallback](/reference/system/xstore/functions/xstoreproductquerycallback.md)
- [XStoreQueryProductsResult](/reference/system/xstore/functions/xstorequeryproductsresult.md)
- [XStoreQueryAssociatedProductsForStoreIdResult](/reference/system/xstore/functions/xstorequeryassociatedproductsforstoreidresult.md)
- [XStoreProductsQueryHasMorePages](/reference/system/xstore/functions/xstoreproductsqueryhasmorepages.md)
