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

# XStoreUnregisterGameLicenseChanged

> 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](/reference/system/xstore/functions/xstorecreatecontext).

*token*   \_In\_\
Type: [XTaskQueueRegistrationToken](/reference/system/xtaskqueue/structs/xtaskqueueregistrationtoken)

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

This function unregisters the callback function defined by [XStoreGameLicenseChangedCallback](/reference/system/xstore/functions/xstoregamelicensechangedcallback). You will use the same **XTaskQueueRegistrationToken** generated by [XStoreRegisterGameLicenseChanged](/reference/system/xstore/functions/xstoreregistergamelicensechanged) to unregister the callback function. In order to avoid a memory leak each function registered with [XStoreRegisterGameLicenseChanged](/reference/system/xstore/functions/xstoreregistergamelicensechanged) must be unregistered by **XStoreUnregisterGameLicenseChanged** when the callback function is no longer needed.

See [XStoreCreateContext](/reference/system/xstore/functions/xstorecreatecontext) 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](/reference/system/xstore/xstore_members)\
[XStoreRegisterGameLicenseChanged](/reference/system/xstore/functions/xstoreregistergamelicensechanged)\
[XStoreGameLicenseChangedCallback](/reference/system/xstore/functions/xstoregamelicensechangedcallback)


## Related topics

- [XStoreGameLicenseChangedCallback](/reference/system/xstore/functions/xstoregamelicensechangedcallback.md)
- [XStoreRegisterGameLicenseChanged](/reference/system/xstore/functions/xstoreregistergamelicensechanged.md)
- [XTaskQueueRegistrationToken](/reference/system/xtaskqueue/structs/xtaskqueueregistrationtoken.md)
- [XStore](/reference/system/xstore/xstore_members.md)
- [Unity C# API wrappers for the GDK](/build/gdk-and-engines/unity/unity-api-wrappers.md)
