> ## 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](/reference/system/xstore/functions/xstoreacquirelicensefordurablesasync) 调用的结果。

<a id="syntaxSection" />

## 语法

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

<a id="parametersSection" />

### 参数

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

传递给 [XStoreAcquireLicenseForDurablesAsync](/reference/system/xstore/functions/xstoreacquirelicensefordurablesasync) 的 `XAsyncBlock` 对象。

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

成功时，包含商店许可证的句柄。
将获取的许可证句柄传递给 [XStoreIsLicenseValid](/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](/reference/system/xasync/structs/xasyncblock) 结构包含调用的结果。
使用 [XAsyncBlock](/reference/system/xasync/structs/xasyncblock) 对象轮询函数调用状态并检索结果。
要为指定的耐用型产品获取许可证，请调用 [XStoreAcquireLicenseForDurablesAsync](/reference/system/xstore/functions/xstoreacquirelicensefordurablesasync)。

<a id="requirementsSection" />

## 要求

**头文件：** XStore.h

**库：** xgameruntime.lib

**支持的平台**：Windows、XBOX One 系列主机和 XBOX Series 主机

<a id="seealsoSection" />

## 概念文档

* [授予玩家访问加载项内容的权限](https://learn.microsoft.com/gaming/gdk/docs/store/commerce/fundamentals/xstore-granting-access-to-content)

## 另请参阅

[XStore](/reference/system/xstore/xstore_members)\
[XAsyncBlock](/reference/system/xasync/structs/xasyncblock)\
[XStoreAcquireLicenseForDurablesAsync](/reference/system/xstore/functions/xstoreacquirelicensefordurablesasync)\
[如何使用不带包的耐用型产品](https://learn.microsoft.com/gaming/gdk/docs/store/commerce/fundamentals/xstore-dwobs)\
[授予玩家访问加载项内容的权限](https://learn.microsoft.com/gaming/gdk/docs/store/commerce/fundamentals/xstore-granting-access-to-content)


## Related topics

- [XStoreAcquireLicenseForDurablesAsync](/zh-CN/reference/system/xstore/functions/xstoreacquirelicensefordurablesasync.md)
- [XStoreIsLicenseValid](/zh-CN/reference/system/xstore/functions/xstoreislicensevalid.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)
- [XStoreCanAcquireLicenseForStoreIdResult](/zh-CN/reference/system/xstore/functions/xstorecanacquirelicenseforstoreidresult.md)
