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

# XStoreCloseLicenseHandle

> XStoreCloseLicenseHandle

Closes the specified store license handle.

## Syntax

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

### Parameters

*storeLicenseHandle*   \_In\_\
Type: XStoreLicenseHandle

The handle to close.

### Return value

Type: void

## Remarks

This function is safe to call on a time-sensitive thread.

This function closes the **XStoreLicenseHandle** returned by [XStoreAcquireLicenseForPackageResult](https://docs.xbox.com/reference/system/xstore/functions/xstoreacquirelicenseforpackageresult.md). Make sure to close each **XStoreLicenseHandle** when it is no longer being used to avoid a memory leak. See [XStoreAcquireLicenseForPackageAsync](https://docs.xbox.com/reference/system/xstore/functions/xstoreacquirelicenseforpackageasync.md) for a usage example.

## Requirements

**Header:** XStore.h (included in XGameRuntime.h)

**Library:** xgameruntime.lib

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## Conceptual documentation

* [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)
* [Granting players access to add-on content](https://docs.xbox.com/publishing/xstore-commerce/xstore-granting-access.md)

## See also

[XStore](https://docs.xbox.com/reference/system/xstore/xstore_members.md)\
[XStoreAcquireLicenseForPackageAsync](https://docs.xbox.com/reference/system/xstore/functions/xstoreacquirelicenseforpackageasync.md)\
[XStoreAcquireLicenseForPackageResult](https://docs.xbox.com/reference/system/xstore/functions/xstoreacquirelicenseforpackageresult.md)\
[XStoreIsLicenseValid](https://docs.xbox.com/reference/system/xstore/functions/xstoreislicensevalid.md)\
[XStoreCloseLicenseHandle](https://docs.xbox.com/reference/system/xstore/functions/xstorecloselicensehandle.md)\
[XStoreRegisterPackageLicenseLost](https://docs.xbox.com/reference/system/xstore/functions/xstoreregisterpackagelicenselost.md)\
[XStoreUnregisterPackageLicenseLost](https://docs.xbox.com/reference/system/xstore/functions/xstoreunregisterpackagelicenselost.md)


## Related topics

- [XStoreIsLicenseValid](https://docs.xbox.com/reference/system/xstore/functions/xstoreislicensevalid.md)
- [XStoreAcquireLicenseForPackageResult](https://docs.xbox.com/reference/system/xstore/functions/xstoreacquirelicenseforpackageresult.md)
- [XStoreRegisterPackageLicenseLost](https://docs.xbox.com/reference/system/xstore/functions/xstoreregisterpackagelicenselost.md)
- [XStoreUnregisterPackageLicenseLost](https://docs.xbox.com/reference/system/xstore/functions/xstoreunregisterpackagelicenselost.md)
- [XStoreAcquireLicenseForPackageAsync](https://docs.xbox.com/reference/system/xstore/functions/xstoreacquirelicenseforpackageasync.md)
