Freigeben über


XStoreRegisterPackageLicenseLost

Registers a callback for the license lost event. This can be used to register for licenses obtained for both Durables with a package through XStoreAcquireLicenseForPackageAsync and Durables without a package (aka Durable add-ons) obtained through XStoreAcquireLicenseForDurablesAsync.

Syntax

HRESULT XStoreRegisterPackageLicenseLost(  
         XStoreLicenseHandle licenseHandle,  
         XTaskQueueHandle queue,  
         void* context,  
         XStorePackageLicenseLostCallback* callback,  
         XTaskQueueRegistrationToken* token  
)  

Parameters

licenseHandle   _In_
Type: XStoreLicenseHandle

The license handle to register the callback for.

queue   _In_
Type: XTaskQueueHandle

Async queue to handle asynchronous work.

context   _In_opt_
Type: void*

Title defined context to pass to the callback.

callback   _In_
Type: XStorePackageLicenseLostCallback*

The callback to register.

token   _Out_
Type: XTaskQueueRegistrationToken*

On success contains a token used to identify the callback.

Return value

Type: HRESULT

HRESULT success or error code.

Remarks

This function registers the callback function defined by XStorePackageLicenseLostCallback. The registered function will be called when the next game license change event occurs. The registered function will not be called by the act of registration. Most commonly this function will fire when the user exceeds their concurrency limits for the specified package. This usually occurs when the user opens the package on an additional roaming device. In order to avoid a memory leak you must call XStoreUnregisterPackageLicenseLost when you are finished with the callback function.

See XStoreAcquireLicenseForPackageAsync for a usage example.

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
XStoreAcquireLicenseForPackageAsync
XStoreAcquireLicenseForPackageResult
XStoreIsLicenseValid
XStoreCloseLicenseHandle
XStorePackageLicenseLostCallback
XStoreUnregisterPackageLicenseLost