> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XStoreQueryLicenseTokenResult

> XStoreQueryLicenseTokenResult

# XStoreQueryLicenseTokenResult

Retrieves the results of a call to [XStoreQueryLicenseTokenAsync](/reference/system/xstore/functions/xstorequerylicensetokenasync).  See [License Tokens Overview](/publishing/xstore-commerce/xstore-license-tokens) for more information.

## Syntax

```cpp theme={null}
HRESULT XStoreQueryLicenseTokenResult(  
         XAsyncBlock* async,  
         size_t size,  
         char* result  
)  
```

### Parameters

*async*   \_Inout\_\
Type: [XAsyncBlock\*](/reference/system/xasync/structs/xasyncblock)

The XAsyncBlock passed to [XStoreQueryLicenseTokenAsync](/reference/system/xstore/functions/xstorequerylicensetokenasync). The [XAsyncBlock](/reference/system/xasync/structs/xasyncblock) can be used to poll for the call's status and retrieve call results. See [XAsyncBlock](/reference/system/xasync/structs/xasyncblock) for more information.

*size*   \_In\_\
Type: size\_t

The size of the array passed into **result**.

*result*   \_Out\_writes\_z\_(size)\
Type: char\*

On success contains the retrieved license token.

### Return value

Type: HRESULT

HRESULT success or error code.

## Remarks

This result function allows you to retrieve the execution results of [XStoreQueryLicenseTokenAsync](/reference/system/xstore/functions/xstorequerylicensetokenasync), as well as the JSON web token called for if the execution was successful. As such, this function should be called after [XStoreQueryLicenseTokenAsync](/reference/system/xstore/functions/xstorequerylicensetokenasync) has been called, usually in the context of a callback function.

See [XStoreQueryLicenseTokenAsync](/reference/system/xstore/functions/xstorequerylicensetokenasync) 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

## Conceptual documentation

* [Granting players access to add-on content](/publishing/xstore-commerce/xstore-granting-access)
* [Using License Tokens to validate licensing on your services](/publishing/xstore-commerce/xstore-license-tokens)

## See also

[XStore](/reference/system/xstore/xstore_members)

[License Tokens Overview](/publishing/xstore-commerce/xstore-license-tokens)

[XStoreQueryLicenseTokenAsync](/reference/system/xstore/functions/xstorequerylicensetokenasync)

[XStoreQueryLicenseTokenResultSize](/reference/system/xstore/functions/xstorequerylicensetokenresultsize)


## Related topics

- [XStoreQueryLicenseTokenResultSize](/reference/system/xstore/functions/xstorequerylicensetokenresultsize.md)
- [XStoreQueryLicenseTokenAsync](/reference/system/xstore/functions/xstorequerylicensetokenasync.md)
- [XStore](/reference/system/xstore/xstore_members.md)
- [Unity C# API wrappers for the GDK](/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XStoreQueryGameLicenseResult](/reference/system/xstore/functions/xstorequerygamelicenseresult.md)
