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

# XStoreDownloadAndInstallPackagesResultCount

> XStoreDownloadAndInstallPackagesResultCount

Gets the number of items in the result that will be returned by [XStoreDownloadAndInstallPackagesResult](https://docs.xbox.com/reference/system/xstore/functions/xstoredownloadandinstallpackagesresult.md).

## Syntax

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

### Parameters

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

The XAsyncBlock that was passed to [XStoreDownloadAndInstallPackagesAsync](https://docs.xbox.com/reference/system/xstore/functions/xstoredownloadandinstallpackagesasync.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 count of items in the result that will be returned by [XStoreDownloadAndInstallPackagesResult](https://docs.xbox.com/reference/system/xstore/functions/xstoredownloadandinstallpackagesresult.md).

### Return value

Type: HRESULT

S\_OK on success; otherwise, returns an error code.

## Remarks

This result function allows you to retrieve the number of install packages downloaded when [XStoreDownloadAndInstallPackagesAsync](https://docs.xbox.com/reference/system/xstore/functions/xstoredownloadandinstallpackagesasync.md) was called. As such, this function should be called after [XStoreDownloadAndInstallPackagesAsync](https://docs.xbox.com/reference/system/xstore/functions/xstoredownloadandinstallpackagesasync.md) has been called, usually in the context of a callback function. See [XStoreDownloadAndInstallPackagesAsync](https://docs.xbox.com/reference/system/xstore/functions/xstoredownloadandinstallpackagesasync.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)\
[XStoreDownloadAndInstallPackagesAsync](https://docs.xbox.com/reference/system/xstore/functions/xstoredownloadandinstallpackagesasync.md)\
[XStoreDownloadAndInstallPackagesResult](https://docs.xbox.com/reference/system/xstore/functions/xstoredownloadandinstallpackagesresult.md)


## Related topics

- [XStoreDownloadAndInstallPackagesResult](https://docs.xbox.com/reference/system/xstore/functions/xstoredownloadandinstallpackagesresult.md)
- [XStoreDownloadAndInstallPackagesAsync](https://docs.xbox.com/reference/system/xstore/functions/xstoredownloadandinstallpackagesasync.md)
- [XStoreQueryPackageIdentifier](https://docs.xbox.com/reference/system/xstore/functions/xstorequerypackageidentifier.md)
- [XStoreShowProductPageUIResult](https://docs.xbox.com/reference/system/xstore/functions/xstoreshowproductpageuiresult.md)
- [XStore (API contents)](https://docs.xbox.com/reference/system/xstore/xstore_members.md)
