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

# XStoreDownloadPackageUpdatesAsync

> XStoreDownloadPackageUpdatesAsync

# XStoreDownloadPackageUpdatesAsync

指定されたパッケージの更新をダウンロードしますが、インストールは行いません。これにより、ゲームは更新のインストールが発生するタイミングを制御でき、ユーザーのプレイ中にゲームがシャットダウンするのを防ぐことができます。

## 構文

```cpp theme={null}
HRESULT XStoreDownloadPackageUpdatesAsync(  
         const XStoreContextHandle storeContextHandle,  
         const char** packageIdentifiers,  
         size_t packageIdentifiersCount,  
         XAsyncBlock* async  
)  
```

### パラメーター

*storeContextHandle*   \_In\_\
Type: XStoreContextHandle

[XStoreCreateContext](/reference/system/xstore/functions/xstorecreatecontext) から返される、ユーザーのストア コンテキスト ハンドル。

*packageIdentifiers*   \_In\_z\_count\_(packageIdentifiersCount)\
Type: char\*\*

パッケージ識別子のリスト。
パッケージ識別子は、Microsoft Store パッケージの一意の ID 文字列です。パッケージ識別子の詳細については、[ダウンロード可能なコンテンツ (DLC) の管理とライセンス](https://learn.microsoft.com/gaming/gdk/docs/store/commerce/fundamentals/xstore-manage-and-license-optional-packages)を参照してください。

*packageIdentifiersCount*   \_In\_\
Type: size\_t

**packageIdentifiers** 内の識別子の数。

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

実行中の非同期処理を定義する [XAsyncBlock](/reference/system/xasync/structs/xasyncblock)。[XAsyncBlock](/reference/system/xasync/structs/xasyncblock) は、呼び出しの状態のポーリングと呼び出し結果の取得に使用できます。詳細については、[XAsyncBlock](/reference/system/xasync/structs/xasyncblock) を参照してください。

### 戻り値

Type: [HRESULT](https://learn.microsoft.com/openspecs/windows_protocols/ms-erref/0642cb2f-2075-4469-918c-4441e69c548a)

成功した場合は **S\_OK** を返します。それ以外の場合はエラー コードが返されます。

## 解説

この関数は更新をダウンロードするだけで、インストールは行いません。1 回の呼び出しで更新をダウンロードしてインストールするには、[XStoreDownloadAndInstallPackageUpdatesAsync](/reference/system/xstore/functions/xstoredownloadandinstallpackageupdatesasync) 関数を使用します。この関数の結果を取得するには、この関数を呼び出した後に [XStoreDownloadPackageUpdatesResult](/reference/system/xstore/functions/xstoredownloadpackageupdatesresult) を呼び出します。使用例については、[XStoreQueryGameAndDlcPackageUpdatesAsync](/reference/system/xstore/functions/xstorequerygameanddlcpackageupdatesasync) を参照してください。

この API が実行中のゲームから呼び出されると、ダウンロードは高優先度と見なされ、この API の storeIds パラメーターで指定された順序でキューの先頭に配置されます。

## 要件

**ヘッダー:** XStore.h (XGameRuntime.h に含まれる)

**ライブラリ:** xgameruntime.lib

**サポートされているプラットフォーム:** Windows、XBOX One 本体および XBOX Series 本体

## 関連項目

[XStore](/reference/system/xstore/xstore_members)\
[XStoreDownloadPackageUpdatesResult](/reference/system/xstore/functions/xstoredownloadpackageupdatesresult)\
[XStoreDownloadAndInstallPackageUpdatesAsync](/reference/system/xstore/functions/xstoredownloadandinstallpackageupdatesasync)


## Related topics

- [XStoreDownloadPackageUpdatesResult](/ja-jp/reference/system/xstore/functions/xstoredownloadpackageupdatesresult.md)
- [XStore](/ja-jp/reference/system/xstore/xstore_members.md)
- [GDK 向け Unity C# API ラッパー](/ja-jp/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XStoreDownloadAndInstallPackageUpdatesAsync](/ja-jp/reference/system/xstore/functions/xstoredownloadandinstallpackageupdatesasync.md)
- [XStoreDownloadAndInstallPackageUpdatesResult](/ja-jp/reference/system/xstore/functions/xstoredownloadandinstallpackageupdatesresult.md)
