XStoreRegisterGameLicenseChanged

Registers a callback for the title license changed event. This only applies to changes to the running title's license, and not any durable (DLC) licenses.

Syntax

HRESULT XStoreRegisterGameLicenseChanged(  
         XStoreContextHandle storeContextHandle,  
         XTaskQueueHandle queue,  
         void* context,  
         XStoreGameLicenseChangedCallback* callback,  
         XTaskQueueRegistrationToken* token  
)  

Parameters

storeContextHandle   _In_
Type: XStoreContextHandle

The store context handle for the user returned by XStoreCreateContext.

queue   _In_
Type: XTaskQueueHandle

Async queue to handle asynchronous work.

context   _In_opt_
Type: void*

Game defined context to be passed to the callback.

callback   _In_
Type: XStoreGameLicenseChangedCallback*

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 XStoreGameLicenseChangedCallback. The registered function will be called when the next game license change event occurs. This event occurs when a purchase related to the current game takes place on this device or when the game's license is refreshed and the game moves from a trial license to a full license. The registered function will not be called by the act of registration. In order to avoid a memory leak you must call XStoreUnregisterGameLicenseChanged when you are finished with the callback function.

See XStoreCreateContext 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
XStoreGameLicenseChangedCallback
XStoreUnregisterGameLicenseChanged