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

# XStoreAcquireLicenseForDurablesResult

> XStoreAcquireLicenseForDurablesResult

# XStoreAcquireLicenseForDurablesResult

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

## 語法

```cpp theme={null}
HRESULT XStoreAcquireLicenseForDurablesResult(
         XAsyncBlock* async,
         XStoreLicenseHandle* storeLicenseHandle
)
```

### 參數

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

傳遞給 [XStoreAcquireLicenseForDurablesAsync](https://docs.xbox.com/zh-TW/reference/system/xstore/functions/xstoreacquirelicensefordurablesasync.md) 的 `XAsyncBlock` 物件。

*storeLicenseHandle*   \_Out\_\
類型：XStoreLicenseHandle\*

成功時，包含市集授權的控制代碼。
將取得的授權控制代碼傳入 [XStoreIsLicenseValid](https://docs.xbox.com/zh-TW/reference/system/xstore/functions/xstoreislicensevalid.md)，以檢查授權是否有效。

### 傳回值

類型：HRESULT

如果成功，則傳回 **S\_OK**，否則傳回錯誤碼。

`XStoreAcquireLicenseForDurablesResult` 可能傳回下列錯誤碼：

| 錯誤碼 | 描述 |
| - | - |
| 0x87E10BC6 `LM_E_CONTENT_NOT_IN_CATALOG` | 在目錄中找不到此產品。 |
| 0x803F8001 `LM_E_CONTENT_NOT_OWNED` | 未擁有此產品。 |
| 0x803F8008 `LM_E_PREDOWNLOAD_LICENSE_NOT_YET_AVAILABLE` | 已擁有此產品，但因為尚未發行而無法授權。 |
| 0x803F9006 `LM_E_ENTITLED_USER_SIGNED_OUT` | 產品的擁有者未登入。 |
| 0x89245305 `E_GAMESTORE_LICENSE_ACTION_THROTTLED` | 遊戲過度查詢此產品的授權，現已受到節流。限制為同一產品在 10 分鐘內最多嘗試授權 30 次。 |

## 備註

請在時間敏感執行緒上呼叫此函式。

[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) 物件來輪詢函式呼叫狀態並擷取結果。
若要取得指定耐久性產品的授權，請呼叫 [XStoreAcquireLicenseForDurablesAsync](https://docs.xbox.com/zh-TW/reference/system/xstore/functions/xstoreacquirelicensefordurablesasync.md)。

## 需求

**標頭：** XStore.h

**程式庫：** xgameruntime.lib

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

## 概念文件

* [授予玩家附加元件內容的存取權](https://docs.xbox.com/zh-TW/publishing/xstore-commerce/xstore-granting-access.md)

## 另請參閱

[XStore](https://docs.xbox.com/zh-TW/reference/system/xstore/xstore_members.md)\
[XAsyncBlock](https://docs.xbox.com/zh-TW/reference/system/xasync/structs/xasyncblock.md)\
[XStoreAcquireLicenseForDurablesAsync](https://docs.xbox.com/zh-TW/reference/system/xstore/functions/xstoreacquirelicensefordurablesasync.md)\
[如何使用不含套件的耐久性產品](https://docs.xbox.com/zh-TW/publishing/xstore-commerce/xstore-dwob.md)\
[授予玩家附加元件內容的存取權](https://docs.xbox.com/zh-TW/publishing/xstore-commerce/xstore-granting-access.md)


## Related topics

- [XStoreAcquireLicenseForDurablesAsync](https://docs.xbox.com/zh-TW/reference/system/xstore/functions/xstoreacquirelicensefordurablesasync.md)
- [XStoreIsLicenseValid](https://docs.xbox.com/zh-TW/reference/system/xstore/functions/xstoreislicensevalid.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)
- [XStoreCanAcquireLicenseResult](https://docs.xbox.com/zh-TW/reference/system/xstore/structs/xstorecanacquirelicenseresult.md)
