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

# XStoreGameLicense

> XStoreGameLicense

Describes a game license.

## Syntax

```cpp theme={null}
typedef struct XStoreGameLicense {  
    char skuStoreId[STORE_SKU_ID_SIZE];  
    bool isActive;  
    bool isTrialOwnedByThisUser;  
    bool isDiscLicense;  
    bool isTrial;  
    uint32_t trialTimeRemainingInSeconds;  
    char trialUniqueId[TRIAL_UNIQUE_ID_MAX_SIZE];  
    time_t expirationDate;  
} XStoreGameLicense  
```

### Members

*skuStoreId*\
Type: char\[STORE\_SKU\_ID\_SIZE]

The store ID.

*isActive*\
Type: bool

Indicates whether the license is active.

*isTrialOwnedByThisUser*\
Type: bool

Indicates whether the trial is owned by the user associated to the XStoreContext. If on PC, this will be the currently signed in user to the Microsoft Store App.

*isDiscLicense*\
Type: bool

Indicates whether the license is a disc license.

*isTrial*\
Type: bool

Indicates whether the license is a trial license.

*trialTimeRemainingInSeconds*\
Type: uint32\_t

Amount of time remaining for the trial license.

*trialUniqueId*\
Type: char\[TRIAL\_UNIQUE\_ID\_MAX\_SIZE]

The unique ID for the trial.

*expirationDate*\
Type: time\_t

Expiration date of the license.

## Remarks

To acquire the game license call [XStoreQueryGameLicenseAsync](https://docs.xbox.com/reference/system/xstore/functions/xstorequerygamelicenseasync.md). You will find the license returned in its result function [XStoreQueryGameLicenseResult](https://docs.xbox.com/reference/system/xstore/functions/xstorequerygamelicenseresult.md). **XStoreGameLicense** is an output parameter of [XStoreQueryGameLicenseResult](https://docs.xbox.com/reference/system/xstore/functions/xstorequerygamelicenseresult.md).

## Requirements

**Header:** XStore.h (included in XGameRuntime.h)

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## Conceptual documentation

* [Implementing Trials for your game](https://docs.xbox.com/publishing/xstore-commerce/xstore-trials.md)

## See also

[XStore](https://docs.xbox.com/reference/system/xstore/xstore_members.md)\
[XStoreQueryGameLicenseAsync](https://docs.xbox.com/reference/system/xstore/functions/xstorequerygamelicenseasync.md)\
[XStoreQueryGameLicenseResult](https://docs.xbox.com/reference/system/xstore/functions/xstorequerygamelicenseresult.md)


## Related topics

- [XStoreQueryGameLicenseResult](https://docs.xbox.com/reference/system/xstore/functions/xstorequerygamelicenseresult.md)
- [Implementing Trials for your game](https://docs.xbox.com/publishing/xstore-commerce/xstore-trials.md)
- [Basic DRM and license checks](https://docs.xbox.com/publishing/xstore-commerce/xstore-basic-drm.md)
- [XStore (API contents)](https://docs.xbox.com/reference/system/xstore/xstore_members.md)
- [Detecting Xbox Game Pass subscription access from your service](https://docs.xbox.com/publishing/xstore-commerce/xstore-detecting-game-pass.md)
