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

# XStoreGameLicenseChangedCallback

> XStoreGameLicenseChangedCallback

# XStoreGameLicenseChangedCallback

A game defined callback for the game license changed event.

## Syntax

```cpp theme={null}
void XStoreGameLicenseChangedCallback(  
         void* context  
)  
```

### Parameters

*context*   \_In\_\
Type: void\*

A game defined context to be passed to the callback.

### Return value

Type: void

## Remarks

A game license change event happens when a purchase related to the current game takes place on this device or when the game's license is refreshed and the game moves from a trial license to a full license. The **XStoreGameLicenseChangedCallback** will be called when such an event occurs. In order for this game defined function to be called, it must first be registered with the [XStoreRegisterGameLicenseChanged](/reference/system/xstore/functions/xstoreregistergamelicensechanged) function. The function must match the return type and parameters of **XStoreGameLicenseChangedCallback**. In order to avoid a memory leak you must call [XStoreUnregisterGameLicenseChanged](/reference/system/xstore/functions/xstoreunregistergamelicensechanged) when you are finished with the callback function.

## Requirements

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

**Library:** xgameruntime.lib

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

## See also

[XStore](/reference/system/xstore/xstore_members)\
[XStoreRegisterGameLicenseChanged](/reference/system/xstore/functions/xstoreregistergamelicensechanged)\
[XStoreUnregisterGameLicenseChanged](/reference/system/xstore/functions/xstoreunregistergamelicensechanged)


## Related topics

- [XStoreRegisterGameLicenseChanged](/reference/system/xstore/functions/xstoreregistergamelicensechanged.md)
- [XStoreUnregisterGameLicenseChanged](/reference/system/xstore/functions/xstoreunregistergamelicensechanged.md)
- [XStore](/reference/system/xstore/xstore_members.md)
- [XTaskQueueRegistrationToken](/reference/system/xtaskqueue/structs/xtaskqueueregistrationtoken.md)
- [XStorePackageLicenseLostCallback](/reference/system/xstore/functions/xstorepackagelicenselostcallback.md)
