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

# XStoreAcquireLicenseForDurablesResult

> XStoreAcquireLicenseForDurablesResult

# XStoreAcquireLicenseForDurablesResult

擷取 [XStoreAcquireLicenseForDurablesAsync](/zh-TW/reference/system/xstore/functions/xstoreacquirelicensefordurablesasync) 呼叫的結果。

<a id="syntaxSection" />

## 語法

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

<a id="parametersSection" />

### 參數

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

傳遞給 [XStoreAcquireLicenseForDurablesAsync](/zh-TW/reference/system/xstore/functions/xstoreacquirelicensefordurablesasync) 的 `XAsyncBlock` 物件。

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

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

<a id="retvalSection" />

### 傳回值

類型：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 次。 |

<a id="remarksSection" />

## 備註

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

[XAsyncBlock](/zh-TW/reference/system/xasync/structs/xasyncblock) 結構包含呼叫的結果。
使用 [XAsyncBlock](/zh-TW/reference/system/xasync/structs/xasyncblock) 物件來輪詢函式呼叫狀態並擷取結果。
若要取得指定耐久性產品的授權，請呼叫 [XStoreAcquireLicenseForDurablesAsync](/zh-TW/reference/system/xstore/functions/xstoreacquirelicensefordurablesasync)。

<a id="requirementsSection" />

## 需求

**標頭：** XStore.h

**程式庫：** xgameruntime.lib

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

<a id="seealsoSection" />

## 概念文件

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

## 另請參閱

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


## Related topics

- [XStoreAcquireLicenseForDurablesResult](/reference/system/xstore/functions/xstoreacquirelicensefordurablesresult.md)
- [XStoreAcquireLicenseForDurablesAsync](/reference/system/xstore/functions/xstoreacquirelicensefordurablesasync.md)
- [XStoreIsLicenseValid](/reference/system/xstore/functions/xstoreislicensevalid.md)
- [XStore](/reference/system/xstore/xstore_members.md)
- [XStoreCanAcquireLicenseForStoreIdResult](/reference/system/xstore/functions/xstorecanacquirelicenseforstoreidresult.md)
