> ## 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 将直接打开商店应用到所提供的 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](/reference/system/xstore/functions/xstorecreatecontext) 为用户返回的商店上下文句柄。

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

产品的 ID。

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

定义正在完成的异步工作的 [XAsyncBlock](/reference/system/xasync/structs/xasyncblock)。[XAsyncBlock](/reference/system/xasync/structs/xasyncblock) 可用于轮询调用的状态并检索调用结果。有关详细信息，请参阅 [XAsyncBlock](/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](/reference/system/xstore/xstore_members)


## Related topics

- [XStoreShowProductPageUIResult](/zh-CN/reference/system/xstore/functions/xstoreshowproductpageuiresult.md)
- [XStore](/zh-CN/reference/system/xstore/xstore_members.md)
- [面向 GDK 的 Unity C# API 包装器](/zh-CN/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XStoreShowAssociatedProductsUIAsync](/zh-CN/reference/system/xstore/functions/xstoreshowassociatedproductsuiasync.md)
- [XStoreProductsQueryNextPageAsync](/zh-CN/reference/system/xstore/functions/xstoreproductsquerynextpageasync.md)
