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

# XStoreUnregisterPackageLicenseLost

> 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](/reference/system/xtaskqueue/structs/xtaskqueueregistrationtoken)

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).</Note>

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

See [XStoreAcquireLicenseForPackageAsync](/reference/system/xstore/functions/xstoreacquirelicenseforpackageasync) 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](/publishing/xstore-commerce/xstore-granting-access)

## See also

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


## Related topics

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