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

# XPackageUpdateInstallationMonitor

> XPackageUpdateInstallationMonitor

# XPackageUpdateInstallationMonitor

[XPackageGetInstallationProgress](/reference/system/xpackage/functions/xpackagegetinstallationprogress) から返される進行状況を更新します。

## Syntax

```cpp theme={null}
bool XPackageUpdateInstallationMonitor(  
         XPackageInstallationMonitorHandle installationMonitor  
)  
```

### Parameters

*installationMonitor*   \_In\_\
型: XPackageInstallationMonitorHandle

更新するインストール モニターのハンドル。

### Return value

型: bool

進行状況のスナップショットに何らかの変更があった場合は true を返します。それ以外の場合は false を返します。

## Remarks

<Note>この関数はタイム センシティブ スレッドで呼び出すのは安全ではありません。詳細については、[タイム センシティブ スレッド](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads) を参照してください。</Note>

**XPackageUpdateInstallationMonitor** を呼び出すと、[XPackageGetInstallationProgress](/reference/system/xpackage/functions/xpackagegetinstallationprogress) から返される進行状況を更新できます。インストール モニターの更新頻度が 0 でない場合、この API はタイマー スレッドから更新頻度で自動的に呼び出されます。進行状況を更新するスレッドを制御するには、頻度を 0 に設定して自身で呼び出します。**XPackageUpdateInstallationMonitor** は、進行状況のスナップショットに何らかの変更があった場合に true を返します。

以下は、**XPackageUpdateInstallationMonitor** を使用してインストール モニターを手動でポーリングし、ゲームのインストールが完了したかどうかを判定する例です。インストール完了後、このコードはモニターのハンドルを閉じます。

```cpp theme={null}
bool CheckIfInstalled(XPackageInstallationMonitorHandle monitor)
{
    XPackageInstallationProgress progress;
    XPackageGetInstallationProgress(monitor, &progress);

    if (!progress.completed && XPackageUpdateInstallationMonitor(monitor))
    {
        XPackageGetInstallationProgress(monitor, &progress);
    }

    if (progress.completed)
    {
        XPackageCloseInstallationMonitorHandle(monitor);
    }

    return progress.completed;
}
```

## Requirements

**ヘッダー:** XPackage.h

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

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

## Conceptual documentation

* [タイム センシティブ スレッド](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## See also

[XPackage](/reference/system/xpackage/xpackage_members)\
[ストリーミング インストールとインテリジェント デリバリー](/build/core-features/common/packaging/overviews/streaming_install-intelligent_delivery)\
[XPackageGetInstallationProgress](/reference/system/xpackage/functions/xpackagegetinstallationprogress)


## Related topics

- [XPackage](/ja-jp/reference/system/xpackage/xpackage_members.md)
- [GDK 向け Unity C# API ラッパー](/ja-jp/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XPackageCreateInstallationMonitor](/ja-jp/reference/system/xpackage/functions/xpackagecreateinstallationmonitor.md)
- [XPackageCloseInstallationMonitorHandle](/ja-jp/reference/system/xpackage/functions/xpackagecloseinstallationmonitorhandle.md)
- [XPackageGetInstallationProgress](/ja-jp/reference/system/xpackage/functions/xpackagegetinstallationprogress.md)
