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

# XStoreUnregisterPackageLicenseLost

> XStoreUnregisterPackageLicenseLost

# XStoreUnregisterPackageLicenseLost

取消註冊指定的商店授權遺失回呼。

## 語法

```cpp theme={null}
bool XStoreUnregisterPackageLicenseLost(  
         XStoreLicenseHandle licenseHandle,  
         XTaskQueueRegistrationToken token,  
         bool wait  
)  
```

### 參數

*licenseHandle*   \_In\_\
類型：XStoreLicenseHandle

與回呼相關聯的授權控制代碼。

*token*   \_In\_\
類型：[XTaskQueueRegistrationToken](/zh-TW/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>

此函式會取消註冊由 [XStorePackageLicenseLostCallback](/zh-TW/reference/system/xstore/functions/xstorepackagelicenselostcallback) 定義的回呼函式。
請使用由 [XStoreRegisterPackageLicenseLost](/zh-TW/reference/system/xstore/functions/xstoreregisterpackagelicenselost) 產生的同一個 **XTaskQueueRegistrationToken** 來取消註冊回呼函式。
為了避免記憶體流失，當不再需要回呼函式時，每個以 [XStoreRegisterPackageLicenseLost](/zh-TW/reference/system/xstore/functions/xstoreregisterpackagelicenselost) 註冊的函式都必須由 **XStoreUnregisterPackageLicenseLost** 取消註冊。

如需使用範例，請參閱 [XStoreAcquireLicenseForPackageAsync](/zh-TW/reference/system/xstore/functions/xstoreacquirelicenseforpackageasync)。

## 需求

**標頭：** 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)
* [授與玩家附加元件內容的存取權](/zh-TW/publishing/xstore-commerce/xstore-granting-access)

## 另請參閱

[XStore](/zh-TW/reference/system/xstore/xstore_members)\
[XStoreAcquireLicenseForPackageAsync](/zh-TW/reference/system/xstore/functions/xstoreacquirelicenseforpackageasync)\
[XStoreAcquireLicenseForPackageResult](/zh-TW/reference/system/xstore/functions/xstoreacquirelicenseforpackageresult)\
[XStoreIsLicenseValid](/zh-TW/reference/system/xstore/functions/xstoreislicensevalid)\
[XStoreCloseLicenseHandle](/zh-TW/reference/system/xstore/functions/xstorecloselicensehandle)\
[XStoreRegisterPackageLicenseLost](/zh-TW/reference/system/xstore/functions/xstoreregisterpackagelicenselost)\
[XStorePackageLicenseLostCallback](/zh-TW/reference/system/xstore/functions/xstorepackagelicenselostcallback)\
[授與玩家附加元件內容的存取權](/zh-TW/publishing/xstore-commerce/xstore-granting-access)


## Related topics

- [XStoreUnregisterPackageLicenseLost](/es/reference/system/xstore/functions/xstoreunregisterpackagelicenselost.md)
- [XStorePackageLicenseLostCallback](/reference/system/xstore/functions/xstorepackagelicenselostcallback.md)
- [XStoreRegisterPackageLicenseLost](/reference/system/xstore/functions/xstoreregisterpackagelicenselost.md)
- [XStoreAcquireLicenseForPackageResult](/ko/reference/system/xstore/functions/xstoreacquirelicenseforpackageresult.md)
- [XStoreIsLicenseValid](/ko/reference/system/xstore/functions/xstoreislicensevalid.md)
