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

# XStoreShowProductPageUIAsync

> XStoreShowProductPageUIAsync

# XStoreShowProductPageUIAsync

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

<img src="https://mintcdn.com/microsoft-4404708b/MccwT2UvEEolGlU5/images/gdk/reference/pdpexample-small.webp?fit=max&auto=format&n=MccwT2UvEEolGlU5&q=85&s=ccd512ab75cdb0bd60e8314238d6a5da" alt="pdp" width="1920" height="1080" data-path="images/gdk/reference/pdpexample-small.webp" />

## 語法

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

### 參數

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

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

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

產品的識別碼。

*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\
**程式庫：** 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](/zh-TW/reference/system/xstore/xstore_members)


## Related topics

- [XStoreShowProductPageUIAsync](/reference/system/xstore/functions/xstoreshowproductpageuiasync.md)
- [XStoreShowProductPageUIResult](/reference/system/xstore/functions/xstoreshowproductpageuiresult.md)
- [XStore](/reference/system/xstore/xstore_members.md)
- [XStoreShowAssociatedProductsUIAsync](/reference/system/xstore/functions/xstoreshowassociatedproductsuiasync.md)
