> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XPackageUpdateInstallationMonitor

> XPackageUpdateInstallationMonitor

Refreshes the progress returned from [XPackageGetInstallationProgress](https://docs.xbox.com/reference/system/xpackage/functions/xpackagegetinstallationprogress.md).

## Syntax

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

### Parameters

*installationMonitor*   \_In\_\
Type: XPackageInstallationMonitorHandle

The handle to the installation monitor to be updated.

### Return value

Type: bool

If any aspect of the progress snapshot has changed, returns true. Otherwise, returns false.

## Remarks

> [!NOTE]
>
> This function isn't safe to call on a time-sensitive thread. For more information, see [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads).

**XPackageUpdateInstallationMonitor** can be called to refresh the progress returned from [XPackageGetInstallationProgress](https://docs.xbox.com/reference/system/xpackage/functions/xpackagegetinstallationprogress.md). If the installation monitor's refresh cadence is not zero, this API will be automatically called on the refresh cadence from a timer thread. To control which thread updates the progress, set the cadence to zero and call this yourself. **XPackageUpdateInstallationMonitor** returns true if any aspect of the progress snapshot has changed.

The following is an example of using **XPackageUpdateInstallationMonitor** to manually poll an installation monitor to determine whether installation of a game is completed. After installation is completed, this code closes the monitor handle.

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

**Header:** XPackage.h

**Library:** xgameruntime.lib

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## Conceptual documentation

* [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## See also

[XPackage](https://docs.xbox.com/reference/system/xpackage/xpackage_members.md)\
[Streaming Installation and Intelligent Delivery](https://docs.xbox.com/build/core-features/common/packaging/overviews/streaming_install-intelligent_delivery.md)\
[XPackageGetInstallationProgress](https://docs.xbox.com/reference/system/xpackage/functions/xpackagegetinstallationprogress.md)


## Related topics

- [XPackage (API contents)](https://docs.xbox.com/reference/system/xpackage/xpackage_members.md)
- [Using C# wrappers for GDK APIs in your Unity project](https://docs.xbox.com/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XPackageCreateInstallationMonitor](https://docs.xbox.com/reference/system/xpackage/functions/xpackagecreateinstallationmonitor.md)
- [XPackageCloseInstallationMonitorHandle](https://docs.xbox.com/reference/system/xpackage/functions/xpackagecloseinstallationmonitorhandle.md)
- [XPackageGetInstallationProgress](https://docs.xbox.com/reference/system/xpackage/functions/xpackagegetinstallationprogress.md)
