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

获取将由 [XStoreDownloadAndInstallPackagesResult](/reference/system/xstore/functions/xstoredownloadandinstallpackagesresult) 返回的结果中的项数。

## 语法

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

### 参数

*async*   \_In\_\
类型：[XAsyncBlock\*](/reference/system/xasync/structs/xasyncblock)

传递给 [XStoreDownloadAndInstallPackagesAsync](/reference/system/xstore/functions/xstoredownloadandinstallpackagesasync) 的 XAsyncBlock。可使用 [XAsyncBlock](/reference/system/xasync/structs/xasyncblock) 轮询调用状态并检索调用结果。有关详细信息，请参阅 [XAsyncBlock](/reference/system/xasync/structs/xasyncblock)。

*count*   \_Out\_\
类型：uint32\_t\*

成功时，包含将由 [XStoreDownloadAndInstallPackagesResult](/reference/system/xstore/functions/xstoredownloadandinstallpackagesresult) 返回的结果中的项数。

### 返回值

类型：HRESULT

成功时返回 S\_OK；否则返回错误代码。

## 备注

此结果函数使你能够检索调用 [XStoreDownloadAndInstallPackagesAsync](/reference/system/xstore/functions/xstoredownloadandinstallpackagesasync) 时已下载的安装包数量。因此，此函数应在调用 [XStoreDownloadAndInstallPackagesAsync](/reference/system/xstore/functions/xstoredownloadandinstallpackagesasync) 之后调用，通常在回调函数的上下文中。有关用法示例，请参阅 [XStoreDownloadAndInstallPackagesAsync](/reference/system/xstore/functions/xstoredownloadandinstallpackagesasync)。

## 要求

**头文件：** XStore.h（包含于 XGameRuntime.h 中）

**库：** xgameruntime.lib

**支持的平台：** Windows、XBOX One 系列主机和 XBOX Series 主机

## 另请参阅

[XStore](/reference/system/xstore/xstore_members)\
[XStoreDownloadAndInstallPackagesAsync](/reference/system/xstore/functions/xstoredownloadandinstallpackagesasync)\
[XStoreDownloadAndInstallPackagesResult](/reference/system/xstore/functions/xstoredownloadandinstallpackagesresult)


## Related topics

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