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

取消注册指定的游戏许可证更改回调。

## 语法

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

### 参数

*storeContextHandle*   \_In\_\
类型：XStoreContextHandle

[XStoreCreateContext](/reference/system/xstore/functions/xstorecreatecontext) 为用户返回的商店上下文句柄。

*token*   \_In\_\
类型：[XTaskQueueRegistrationToken](/reference/system/xtaskqueue/structs/xtaskqueueregistrationtoken)

标识要取消注册的回调的令牌。

*wait*   \_In\_\
类型：bool

等待任何待处理的事件回调完成。

### 返回值

类型：bool

如果 *wait* 为 false 且取消注册待处理，则返回 false。否则返回 true。

## 备注

<Note>在时间敏感型线程上调用此函数不安全。有关详细信息，请参阅[时间敏感型线程](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)。</Note>

此函数取消注册由 [XStoreGameLicenseChangedCallback](/reference/system/xstore/functions/xstoregamelicensechangedcallback) 定义的回调函数。你将使用 [XStoreRegisterGameLicenseChanged](/reference/system/xstore/functions/xstoreregistergamelicensechanged) 生成的相同 **XTaskQueueRegistrationToken** 来取消注册回调函数。为避免内存泄漏，每个使用 [XStoreRegisterGameLicenseChanged](/reference/system/xstore/functions/xstoreregistergamelicensechanged) 注册的函数在不再需要回调函数时必须通过 **XStoreUnregisterGameLicenseChanged** 取消注册。

有关使用示例，请参阅 [XStoreCreateContext](/reference/system/xstore/functions/xstorecreatecontext)。

## 要求

**头文件：** XStore.h（包含在 XGameRuntime.h 中）

**库：** xgameruntime.lib

**支持的平台：** Windows、XBOX One 系列主机和 XBOX Series 主机

## 概念文档

* [时间敏感型线程](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## 另请参阅

[XStore](/reference/system/xstore/xstore_members)\
[XStoreRegisterGameLicenseChanged](/reference/system/xstore/functions/xstoreregistergamelicensechanged)\
[XStoreGameLicenseChangedCallback](/reference/system/xstore/functions/xstoregamelicensechangedcallback)
