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

# XStoreCloseLicenseHandle

> XStoreCloseLicenseHandle

# XStoreCloseLicenseHandle

关闭指定的应用商店许可证句柄。

## 语法

```cpp theme={null}
void XStoreCloseLicenseHandle(  
         XStoreLicenseHandle storeLicenseHandle  
)  
```

### 参数

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

要关闭的句柄。

### 返回值

类型：void

## 备注

此函数可在时间敏感线程上安全调用。

此函数关闭由 [XStoreAcquireLicenseForPackageResult](/reference/system/xstore/functions/xstoreacquirelicenseforpackageresult) 返回的 **XStoreLicenseHandle**。请确保在不再使用每个 **XStoreLicenseHandle** 时将其关闭，以避免内存泄漏。有关用法示例，请参阅 [XStoreAcquireLicenseForPackageAsync](/reference/system/xstore/functions/xstoreacquirelicenseforpackageasync)。

## 要求

**头文件：** XStore.h（包含于 XGameRuntime.h 中）

**库：** xgameruntime.lib

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

## 概念文档

* [时间敏感线程](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)
* [向玩家授予附加内容的访问权限](https://learn.microsoft.com/gaming/gdk/docs/store/commerce/fundamentals/xstore-granting-access-to-content)

## 另请参阅

[XStore](/reference/system/xstore/xstore_members)\
[XStoreAcquireLicenseForPackageAsync](/reference/system/xstore/functions/xstoreacquirelicenseforpackageasync)\
[XStoreAcquireLicenseForPackageResult](/reference/system/xstore/functions/xstoreacquirelicenseforpackageresult)\
[XStoreIsLicenseValid](/reference/system/xstore/functions/xstoreislicensevalid)\
[XStoreCloseLicenseHandle](/reference/system/xstore/functions/xstorecloselicensehandle)\
[XStoreRegisterPackageLicenseLost](/reference/system/xstore/functions/xstoreregisterpackagelicenselost)\
[XStoreUnregisterPackageLicenseLost](/reference/system/xstore/functions/xstoreunregisterpackagelicenselost)


## Related topics

- [XStoreIsLicenseValid](/zh-CN/reference/system/xstore/functions/xstoreislicensevalid.md)
- [XStoreAcquireLicenseForPackageResult](/zh-CN/reference/system/xstore/functions/xstoreacquirelicenseforpackageresult.md)
- [XStoreUnregisterPackageLicenseLost](/zh-CN/reference/system/xstore/functions/xstoreunregisterpackagelicenselost.md)
- [XStoreRegisterPackageLicenseLost](/zh-CN/reference/system/xstore/functions/xstoreregisterpackagelicenselost.md)
- [XStoreAcquireLicenseForPackageAsync](/zh-CN/reference/system/xstore/functions/xstoreacquirelicenseforpackageasync.md)
