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

# XStoreShowPurchaseUIResult

> XStoreShowPurchaseUIResult

# XStoreShowPurchaseUIResult

取得 [XStoreShowPurchaseUIAsync](https://docs.xbox.com/zh-TW/reference/system/xstore/functions/xstoreshowpurchaseuiasync.md) 呼叫的結果。

## 語法

```cpp theme={null}
HRESULT XStoreShowPurchaseUIResult(  
         XAsyncBlock* async  
)  
```

### 參數

*async*   \_Inout\_\
類型：[XAsyncBlock\*](https://docs.xbox.com/zh-TW/reference/system/xasync/structs/xasyncblock.md)

傳遞給 [XStoreShowPurchaseUIAsync](https://docs.xbox.com/zh-TW/reference/system/xstore/functions/xstoreshowpurchaseuiasync.md) 的 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)。

### 傳回值

類型：HRESULT

HRESULT 成功或錯誤碼。

S\_OK 表示購買已完成，但在授與內容存取權之前，您一律應重新整理使用者的授權和收藏資料

E\_ABORT 表示使用者已取消購買流程。

## 備註

此結果函式可讓您擷取 [XStoreShowPurchaseUIAsync](https://docs.xbox.com/zh-TW/reference/system/xstore/functions/xstoreshowpurchaseuiasync.md) 的執行結果。因此，應在呼叫 [XStoreShowPurchaseUIAsync](https://docs.xbox.com/zh-TW/reference/system/xstore/functions/xstoreshowpurchaseuiasync.md) 之後呼叫此函式，通常是在回呼函式的內容中。在失敗的情況下，此函式特別有助於找出未顯示 UI 的原因。

如需使用範例，請參閱 [XStoreShowPurchaseUIAsync](https://docs.xbox.com/zh-TW/reference/system/xstore/functions/xstoreshowpurchaseuiasync.md)。

## 需求

**標頭：** XStore.h (包含在 XGameRuntime.h 中)

**程式庫：** xgameruntime.lib

**支援的平台：** Windows、XBOX One 系列主機和 XBOX Series 主機

## 另請參閱

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


## Related topics

- [XStoreShowPurchaseUIAsync](https://docs.xbox.com/zh-TW/reference/system/xstore/functions/xstoreshowpurchaseuiasync.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)
- [XStoreShowGiftingUIResult](https://docs.xbox.com/zh-TW/reference/system/xstore/functions/xstoreshowgiftinguiresult.md)
- [XStoreGetUserPurchaseIdResult](https://docs.xbox.com/zh-TW/reference/system/xstore/functions/xstoregetuserpurchaseidresult.md)
