> ## 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](/zh-TW/reference/system/xstore/functions/xstoreacquirelicenseforpackageresult) 傳回的 **XStoreLicenseHandle**。請務必在每個 **XStoreLicenseHandle** 不再使用時將其關閉，以避免記憶體流失。如需使用範例，請參閱 [XStoreAcquireLicenseForPackageAsync](/zh-TW/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)
* [授予玩家附加元件內容的存取權](/zh-TW/publishing/xstore-commerce/xstore-granting-access)

## 另請參閱

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


## Related topics

- [XStoreCloseLicenseHandle](/reference/system/xstore/functions/xstorecloselicensehandle.md)
- [XStoreIsLicenseValid](/reference/system/xstore/functions/xstoreislicensevalid.md)
- [XStoreAcquireLicenseForPackageResult](/reference/system/xstore/functions/xstoreacquirelicenseforpackageresult.md)
