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

# XStoreDownloadAndInstallPackagesResult

> XStoreDownloadAndInstallPackagesResult

# XStoreDownloadAndInstallPackagesResult

获取对 [XStoreDownloadAndInstallPackagesAsync](/reference/system/xstore/functions/xstoredownloadandinstallpackagesasync) 调用的结果。

## 语法

```cpp theme={null}
HRESULT XStoreDownloadAndInstallPackagesResult(  
         XAsyncBlock* async,  
         uint32_t count,  
         char packageIdentifiers[][XPACKAGE_IDENTIFIER_MAX_LENGTH]  
) noexcept;  
```

### 参数

*async*   \_Inout\_\
类型：[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*   \_In\_\
类型：uint32\_t

传递到 **packageIdentifiers** 参数的数组元素大小。

*packageIdentifiers*   \_Out\_writes\_z\_(count)\
类型：char\[]\[XPACKAGE\_IDENTIFIER\_MAX\_LENGTH]

成功时包含已下载的包的包标识符列表。有关包标识符的详细信息，请参阅[管理和授权可下载内容 (DLC)](https://learn.microsoft.com/gaming/gdk/docs/store/commerce/fundamentals/xstore-manage-and-license-optional-packages)。

### 返回值

类型：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 主机

## 概念文档

* [管理和授权可下载内容 (DLC)](https://learn.microsoft.com/gaming/gdk/docs/store/commerce/fundamentals/xstore-manage-and-license-optional-packages)

## 另请参阅

[XStore](/reference/system/xstore/xstore_members)\
[XStoreDownloadAndInstallPackagesAsync](/reference/system/xstore/functions/xstoredownloadandinstallpackagesasync)\
[XStoreDownloadAndInstallPackagesResultCount](/reference/system/xstore/functions/xstoredownloadandinstallpackagesresultcount)


## Related topics

- [XStoreDownloadAndInstallPackagesResultCount](/zh-CN/reference/system/xstore/functions/xstoredownloadandinstallpackagesresultcount.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)
- [XStoreShowAssociatedProductsUIResult](/zh-CN/reference/system/xstore/functions/xstoreshowassociatedproductsuiresult.md)
