XStoreIsLicenseValid

Checks if the specified license is valid.

Syntax

bool XStoreIsLicenseValid(  
         const XStoreLicenseHandle storeLicenseHandle  
)  

Parameters

storeLicenseHandle   _In_
Type: XStoreLicenseHandle

A handle to the license.

Return value

Type: bool

Returns true if the license is valid; returns false otherwise.

Remarks

This API is safe to call on time-sensitive threads.

See XStoreAcquireLicenseForPackageAsync for a usage example. XStoreIsLicenseValid is used to determine if a valid license was returned by XStoreAcquireLicenseForPackageResult. If the license is proven to be valid you may proceed with further setup, like registering license activity based callback functions.

Note

This only checks the static license state when it was originally obtained from the XStoreAcquireLicense* APIs. If you register with XStoreRegisterPackageLicenseLost and the license becomes invalid, you will need to re-acquire a new license to get the correct state before calling this API again.

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
XStoreRegisterPackageLicenseLost
XStoreUnregisterPackageLicenseLost