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

# XStoreQueryAddOnLicensesResultCount

> XStoreQueryAddOnLicensesResultCount

Gets the number of licenses retrieved by [XStoreQueryAddonLicensesAsync](https://docs.xbox.com/reference/system/xstore/functions/xstorequeryaddonlicensesasync.md).

## Syntax

```cpp theme={null}
HRESULT XStoreQueryAddOnLicensesResultCount(  
         XAsyncBlock* async,  
         uint32_t* count  
)  
```

### Parameters

*async*   \_In\_\
Type: [XAsyncBlock\*](https://docs.xbox.com/reference/system/xasync/structs/xasyncblock.md)

The XAsyncBlock passed to [XStoreQueryAddonLicensesAsync](https://docs.xbox.com/reference/system/xstore/functions/xstorequeryaddonlicensesasync.md). The [XAsyncBlock](https://docs.xbox.com/reference/system/xasync/structs/xasyncblock.md) can be used to poll for the call's status and retrieve call results. See [XAsyncBlock](https://docs.xbox.com/reference/system/xasync/structs/xasyncblock.md) for more information.

*count*   \_Out\_\
Type: uint32\_t\*

On success contains the number of licenses retrieved.

### Return value

Type: HRESULT

HRESULT success or error code.

## Remarks

This result function allows you to retrieve the number of add-on licenses acquired when [XStoreQueryAddonLicensesAsync](https://docs.xbox.com/reference/system/xstore/functions/xstorequeryaddonlicensesasync.md) was called. As such, this function should be called after [XStoreQueryAddonLicensesAsync](https://docs.xbox.com/reference/system/xstore/functions/xstorequeryaddonlicensesasync.md) has been called, usually in the context of a callback function.

See [XStoreQueryAddonLicensesAsync](https://docs.xbox.com/reference/system/xstore/functions/xstorequeryaddonlicensesasync.md) 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](https://docs.xbox.com/reference/system/xstore/xstore_members.md)\
[XStoreQueryAddonLicensesAsync](https://docs.xbox.com/reference/system/xstore/functions/xstorequeryaddonlicensesasync.md)\
[XStoreQueryAddonLicensesResult](https://docs.xbox.com/reference/system/xstore/functions/xstorequeryaddonlicensesresult.md)


## Related topics

- [XStore (API contents)](https://docs.xbox.com/reference/system/xstore/xstore_members.md)
- [Using C# wrappers for GDK APIs in your Unity project](https://docs.xbox.com/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XStoreQueryAddOnLicensesResult](https://docs.xbox.com/reference/system/xstore/functions/xstorequeryaddonlicensesresult.md)
- [XStoreQueryAddOnLicensesAsync](https://docs.xbox.com/reference/system/xstore/functions/xstorequeryaddonlicensesasync.md)
- [XStoreQueryPackageUpdatesResultCount](https://docs.xbox.com/reference/system/xstore/functions/xstorequerypackageupdatesresultcount.md)
