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

# XStoreUnregisterGameLicenseChanged

> XStoreUnregisterGameLicenseChanged

Unregisters the specified title license changed callback.

## Syntax

```cpp theme={null}
bool XStoreUnregisterGameLicenseChanged(  
         XStoreContextHandle storeContextHandle,  
         XTaskQueueRegistrationToken token,  
         bool wait  
)  
```

### Parameters

*storeContextHandle*   \_In\_\
Type: XStoreContextHandle

The store context handle for the user returned by [XStoreCreateContext](https://docs.xbox.com/reference/system/xstore/functions/xstorecreatecontext.md).

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

A token identifying the callback to unregister.

*wait*   \_In\_\
Type: bool

Wait for any pending event callbacks to complete.

### Return value

Type: bool

Returns false if *wait* is false and the unregister is pending. 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 [XStoreGameLicenseChangedCallback](https://docs.xbox.com/reference/system/xstore/functions/xstoregamelicensechangedcallback.md). You will use the same **XTaskQueueRegistrationToken** generated by [XStoreRegisterGameLicenseChanged](https://docs.xbox.com/reference/system/xstore/functions/xstoreregistergamelicensechanged.md) to unregister the callback function. In order to avoid a memory leak each function registered with [XStoreRegisterGameLicenseChanged](https://docs.xbox.com/reference/system/xstore/functions/xstoreregistergamelicensechanged.md) must be unregistered by **XStoreUnregisterGameLicenseChanged** when the callback function is no longer needed.

See [XStoreCreateContext](https://docs.xbox.com/reference/system/xstore/functions/xstorecreatecontext.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)

## See also

[XStore](https://docs.xbox.com/reference/system/xstore/xstore_members.md)\
[XStoreRegisterGameLicenseChanged](https://docs.xbox.com/reference/system/xstore/functions/xstoreregistergamelicensechanged.md)\
[XStoreGameLicenseChangedCallback](https://docs.xbox.com/reference/system/xstore/functions/xstoregamelicensechangedcallback.md)


## Related topics

- [XStoreGameLicenseChangedCallback](https://docs.xbox.com/reference/system/xstore/functions/xstoregamelicensechangedcallback.md)
- [XStoreRegisterGameLicenseChanged](https://docs.xbox.com/reference/system/xstore/functions/xstoreregistergamelicensechanged.md)
- [XTaskQueueRegistrationToken](https://docs.xbox.com/reference/system/xtaskqueue/structs/xtaskqueueregistrationtoken.md)
- [XStore (API contents)](https://docs.xbox.com/reference/system/xstore/xstore_members.md)
- [Using C# wrappers for GDK APIs in your Unity project](https://docs.xbox.com/build/gdk-and-engines/unity/unity-api-wrappers.md)
