> ## Documentation Index
> Fetch the complete documentation index at: https://docs.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](https://docs.xbox.com/zh-TW/reference/system/xtaskqueue/structs/xtaskqueueregistrationtoken.md)

識別要取消註冊之回呼的權杖。

*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)。

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

如需使用範例，請參閱 [XStoreAcquireLicenseForPackageAsync](https://docs.xbox.com/zh-TW/reference/system/xstore/functions/xstoreacquirelicenseforpackageasync.md)。

## 需求

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

## 另請參閱

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


## Related topics

- [XStorePackageLicenseLostCallback](https://docs.xbox.com/zh-TW/reference/system/xstore/functions/xstorepackagelicenselostcallback.md)
- [XStoreRegisterPackageLicenseLost](https://docs.xbox.com/zh-TW/reference/system/xstore/functions/xstoreregisterpackagelicenselost.md)
- [XStoreAcquireLicenseForPackageResult](https://docs.xbox.com/zh-TW/reference/system/xstore/functions/xstoreacquirelicenseforpackageresult.md)
- [XStoreCloseLicenseHandle](https://docs.xbox.com/zh-TW/reference/system/xstore/functions/xstorecloselicensehandle.md)
- [XStoreIsLicenseValid](https://docs.xbox.com/zh-TW/reference/system/xstore/functions/xstoreislicensevalid.md)
