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

# XStoreShowAssociatedProductsUIAsync

> XStoreShowAssociatedProductsUIAsync

# XStoreShowAssociatedProductsUIAsync

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

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

![此遊戲的附加元件](https://mintcdn.com/microsoft-4404708b/-_0FrcE2bDxzGxv-/images/gdk/reference/addonsforthisgame-small.png?fit=max\&auto=format\&n=-_0FrcE2bDxzGxv-\&q=85\&s=2d03bf5581fce6d5486ef468e2821bf6)

## 語法

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

### 參數

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

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

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

產品的識別碼。

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

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

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

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

### 傳回值

類型：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)
* [基本市集作業](https://docs.xbox.com/zh-TW/publishing/xstore-commerce/xstore-basic-operations.md)

## 另請參閱

[XStore](https://docs.xbox.com/zh-TW/reference/system/xstore/xstore_members.md)


## Related topics

- [XStoreShowAssociatedProductsUIResult](https://docs.xbox.com/zh-TW/reference/system/xstore/functions/xstoreshowassociatedproductsuiresult.md)
- [基本商店作業](https://docs.xbox.com/zh-TW/publishing/xstore-commerce/xstore-basic-operations.md)
- [XStore (API 內容)](https://docs.xbox.com/zh-TW/reference/system/xstore/xstore_members.md)
- [在 Unity 專案中使用 GDK API 的 C# 包裝函式](https://docs.xbox.com/zh-TW/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XStoreShowProductPageUIAsync](https://docs.xbox.com/zh-TW/reference/system/xstore/functions/xstoreshowproductpageuiasync.md)
