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

# XStoreShowProductPageUIAsync

> XStoreShowProductPageUIAsync

# XStoreShowProductPageUIAsync

此 API 會直接開啟 Store 應用程式，並顯示所提供 ProductId 的產品詳細資料頁面 (PDP)。這可讓尚未整合購買流程或遊戲內商店 UI 的遊戲，仍能協助將使用者導向與其遊戲相關的產品，以及產品詳細資料頁面上的購買流程。

![pdp](https://mintcdn.com/microsoft-4404708b/MccwT2UvEEolGlU5/images/gdk/reference/pdpexample-small.webp?fit=max\&auto=format\&n=MccwT2UvEEolGlU5\&q=85\&s=ccd512ab75cdb0bd60e8314238d6a5da)

## 語法

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

### 參數

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

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

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

產品的識別碼。

*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\
**程式庫：** xgameruntime.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)

## 另請參閱

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


## Related topics

- [XStoreShowProductPageUIResult](https://docs.xbox.com/zh-TW/reference/system/xstore/functions/xstoreshowproductpageuiresult.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)
- [XStoreShowAssociatedProductsUIAsync](https://docs.xbox.com/zh-TW/reference/system/xstore/functions/xstoreshowassociatedproductsuiasync.md)
- [XStoreProductsQueryNextPageAsync](https://docs.xbox.com/zh-TW/reference/system/xstore/functions/xstoreproductsquerynextpageasync.md)
