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

# XStoreUnregisterPackageLicenseLost

> XStoreUnregisterPackageLicenseLost

Unregisters the specified store license lost callback.

## Syntax

```cpp theme={null}
bool XStoreUnregisterPackageLicenseLost(  
         XStoreLicenseHandle licenseHandle,  
         XTaskQueueRegistrationToken token,  
         bool wait  
)  
```

### Parameters

*licenseHandle*   \_In\_\
Type: XStoreLicenseHandle

The license handle the callback is associated with.

*token*   \_In\_\
Type: [XTaskQueueRegistrationToken](https://docs.xbox.com/reference/system/xtaskqueue/structs/xtaskqueueregistrationtoken.md)

Token identifying the callback to be unregistered.

*wait*   \_In\_\
Type: bool

Wait for any pending event callbacks to complete.

### Return value

Type: bool

Returns false if *wait* is false and the callback is pending unregistration.
Returns true otherwise.

## Remarks

> [!NOTE]
>
> This function isn't safe to call on a time-sensitive thread.
> For more information, see [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads).

This function unregisters the callback function defined by [XStorePackageLicenseLostCallback](https://docs.xbox.com/reference/system/xstore/functions/xstorepackagelicenselostcallback.md).
Use the same **XTaskQueueRegistrationToken** generated by [XStoreRegisterPackageLicenseLost](https://docs.xbox.com/reference/system/xstore/functions/xstoreregisterpackagelicenselost.md) to unregister the callback function.
To avoid a memory leak, each function registered with [XStoreRegisterPackageLicenseLost](https://docs.xbox.com/reference/system/xstore/functions/xstoreregisterpackagelicenselost.md) must be unregistered by **XStoreUnregisterPackageLicenseLost** when the callback function is no longer needed.

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)\
[XStorePackageLicenseLostCallback](https://docs.xbox.com/reference/system/xstore/functions/xstorepackagelicenselostcallback.md)\
[Granting players access to add-on content](https://docs.xbox.com/publishing/xstore-commerce/xstore-granting-access.md)


## Related topics

- [XStorePackageLicenseLostCallback](https://docs.xbox.com/reference/system/xstore/functions/xstorepackagelicenselostcallback.md)
- [XStoreRegisterPackageLicenseLost](https://docs.xbox.com/reference/system/xstore/functions/xstoreregisterpackagelicenselost.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)
