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

# XStoreDownloadAndInstallPackagesResultCount

> XStoreDownloadAndInstallPackagesResultCount

# XStoreDownloadAndInstallPackagesResultCount

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

## Syntax

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

### Parameters

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

The XAsyncBlock that was passed to [XStoreDownloadAndInstallPackagesAsync](/reference/system/xstore/functions/xstoredownloadandinstallpackagesasync). 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.

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

On success, contains the count of items in the result that will be returned by [XStoreDownloadAndInstallPackagesResult](/reference/system/xstore/functions/xstoredownloadandinstallpackagesresult).

### 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](/reference/system/xstore/functions/xstoredownloadandinstallpackagesasync) was called. As such, this function should be called after [XStoreDownloadAndInstallPackagesAsync](/reference/system/xstore/functions/xstoredownloadandinstallpackagesasync) has been called, usually in the context of a callback function. See [XStoreDownloadAndInstallPackagesAsync](/reference/system/xstore/functions/xstoredownloadandinstallpackagesasync) 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](/reference/system/xstore/xstore_members)\
[XStoreDownloadAndInstallPackagesAsync](/reference/system/xstore/functions/xstoredownloadandinstallpackagesasync)\
[XStoreDownloadAndInstallPackagesResult](/reference/system/xstore/functions/xstoredownloadandinstallpackagesresult)


## Related topics

- [XStoreDownloadAndInstallPackagesResult](/reference/system/xstore/functions/xstoredownloadandinstallpackagesresult.md)
- [XStoreDownloadAndInstallPackagesAsync](/reference/system/xstore/functions/xstoredownloadandinstallpackagesasync.md)
- [XStoreQueryPackageIdentifier](/reference/system/xstore/functions/xstorequerypackageidentifier.md)
- [XStoreShowProductPageUIResult](/reference/system/xstore/functions/xstoreshowproductpageuiresult.md)
- [XStore](/reference/system/xstore/xstore_members.md)
