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

# XStorePackageLicenseLostCallback

> XStorePackageLicenseLostCallback

# XStorePackageLicenseLostCallback

Game defined callback for the license lost event.

## Syntax

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

### Parameters

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

Game defined context to pass to the callback.

### Return value

Type: void

## Remarks

In order for this game defined function to be called, it must first be registered with the [XStoreRegisterPackageLicenseLost](/reference/system/xstore/functions/xstoreregisterpackagelicenselost) function. The function must match the return type and parameters of **XStorePackageLicenseLostCallback**. In order to avoid a memory leak you must call [XStoreUnregisterPackageLicenseLost](/reference/system/xstore/functions/xstoreunregisterpackagelicenselost) 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)\
[XStoreRegisterPackageLicenseLost](/reference/system/xstore/functions/xstoreregisterpackagelicenselost)\
[XStoreUnregisterPackageLicenseLost](/reference/system/xstore/functions/xstoreunregisterpackagelicenselost)


## Related topics

- [XStoreUnregisterPackageLicenseLost](/reference/system/xstore/functions/xstoreunregisterpackagelicenselost.md)
- [XStoreRegisterPackageLicenseLost](/reference/system/xstore/functions/xstoreregisterpackagelicenselost.md)
- [XStore](/reference/system/xstore/xstore_members.md)
- [XStoreIsLicenseValid](/reference/system/xstore/functions/xstoreislicensevalid.md)
- [XStoreAcquireLicenseForPackageResult](/reference/system/xstore/functions/xstoreacquirelicenseforpackageresult.md)
