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

# XStoreShowAssociatedProductsUIAsync

> XStoreShowAssociatedProductsUIAsync

# XStoreShowAssociatedProductsUIAsync

這會開啟 Microsoft Store 應用程式，並顯示與遊戲相關聯的可用附加元件集合。這可以進一步依產品類型篩選。這是在遊戲內列舉並呈現可用產品的替代方式。

<Note>注意，此 API 會在網頁瀏覽器中開啟市集；如果您的遊戲出現在主機、PC 上的 XBOX 應用程式或遊戲串流店面中，建議使用 XStoreShowProductPageUI 或 XStoreShowPurchaseUI。</Note>

<img src="https://mintcdn.com/microsoft-4404708b/-_0FrcE2bDxzGxv-/images/gdk/reference/addonsforthisgame-small.png?fit=max&auto=format&n=-_0FrcE2bDxzGxv-&q=85&s=2d03bf5581fce6d5486ef468e2821bf6" alt="此遊戲的附加元件" width="600" height="332" data-path="images/gdk/reference/addonsforthisgame-small.png" />

## 語法

```cpp theme={null}
HRESULT XStoreShowAssociatedProductsUIAsync(  
         const XStoreContextHandle storeContextHandle,  
         const char* storeId,  
         XStoreProductKind productKinds,  
         XAsyncBlock* async  
)  
```

### 參數

*storeContextHandle*   \_In\_\
類型：XStoreContextHandle

由 [XStoreCreateContext](/zh-TW/reference/system/xstore/functions/xstorecreatecontext) 傳回的使用者市集內容控制代碼。

*storeId*   \_In\_z\_\
類型：char\*

產品的識別碼。

*productKinds*   \_In\_\
類型：XStoreProductKind

指出要顯示之產品種類的列舉。

*async*   \_Inout\_\
類型：XAsyncBlock\*

定義正在進行之非同步工作的 [XAsyncBlock](/zh-TW/reference/system/xasync/structs/xasyncblock)。[XAsyncBlock](/zh-TW/reference/system/xasync/structs/xasyncblock) 可用來輪詢呼叫的狀態並擷取呼叫結果。如需詳細資訊，請參閱 [XAsyncBlock](/zh-TW/reference/system/xasync/structs/xasyncblock)。

### 傳回值

類型：HRESULT

HRESULT 成功或錯誤碼。

## 需求

**標頭：** XStore.h

**程式庫：** \*\*\*\*.lib
**支援的平台**：Windows、XBOX One 系列主機和 XBOX Series 主機

## 概念文件

* [在您的遊戲中實作遊戲內購買](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/pc-dev/tutorials/pc-e2e-guide/e2e-services/e2e-in-game-purchases)
* [基本市集作業](/zh-TW/publishing/xstore-commerce/xstore-basic-operations)

## 另請參閱

[XStore](/zh-TW/reference/system/xstore/xstore_members)


## Related topics

- [XStoreShowAssociatedProductsUIAsync](/reference/system/xstore/functions/xstoreshowassociatedproductsuiasync.md)
- [XStoreShowAssociatedProductsUIResult](/reference/system/xstore/functions/xstoreshowassociatedproductsuiresult.md)
- [Basic store operations](/publishing/xstore-commerce/xstore-basic-operations.md)
- [基本的な Store 操作](/ja-jp/publishing/xstore-commerce/xstore-basic-operations.md)
- [商店基本操作](/zh-CN/publishing/xstore-commerce/xstore-basic-operations.md)
