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

# XPackageUnregisterInstallationProgressChanged

> XPackageUnregisterInstallationProgressChanged

# XPackageUnregisterInstallationProgressChanged

Unregisters a previously registered installation progress changed callback.

## Syntax

```cpp theme={null}
bool XPackageUnregisterInstallationProgressChanged(  
         XPackageInstallationMonitorHandle installationMonitor,  
         XTaskQueueRegistrationToken token,  
         bool wait  
)  
```

### Parameters

*installationMonitor*   \_In\_\
Type: XPackageInstallationMonitorHandle

The installation monitor from which the specified callback is to be removed.

*token*   \_In\_\
Type: [XTaskQueueRegistrationToken](/reference/system/xtaskqueue/structs/xtaskqueueregistrationtoken)

The token returned by [XPackageRegisterInstallationProgressChanged](/reference/system/xpackage/functions/xpackageregisterinstallationprogresschanged).

*wait*   \_In\_\
Type: bool

Indicates whether to block until any pending callbacks are completed.

### Return value

Type: bool

If *wait* is false and unregistration is pending, returns false. Otherwise, returns true.

## 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).</Note>

Unregistration of a notification behaves as follows:

* From the set of registered callbacks, unregistration removes the callback associated with the token.
* If no callbacks are executing for that callback token, the call returns true.
* If callbacks are executing and *wait* is true, the call will block until the executing callback has finished.
* If callbacks are executing and *wait* is false, the call will not block but will return false. After the callback for the token is completed, the token is unregistered automatically.

This mechanism allows for the following coding patterns:

1. You can block on unregistration to ensure your callbacks are never invoked after a call to unregister.
2. You can choose not to block. To ensure that your callbacks are completed before deleting data, periodically call unregister with false for *wait*. When it finally returns true, all your callbacks are done and you can delete the state.
3. If your callback doesn't care whether it's being invoked during an unregister call, you can just pass false for *wait* and ignore the return value.

Example:

```cpp theme={null}
XPackageUnregisterInstallationProgressChanged(monitor, token, false); 
```

## 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](/reference/system/xpackage/xpackage_members)\
[Streaming Installation and Intelligent Delivery](/build/core-features/common/packaging/overviews/streaming_install-intelligent_delivery)


## Related topics

- [XPackageRegisterInstallationProgressChanged](/reference/system/xpackage/functions/xpackageregisterinstallationprogresschanged.md)
- [XPackage](/reference/system/xpackage/xpackage_members.md)
- [XTaskQueueRegistrationToken](/reference/system/xtaskqueue/structs/xtaskqueueregistrationtoken.md)
- [Unity C# API wrappers for the GDK](/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XPackageInstallationProgressCallback](/reference/system/xpackage/functions/xpackageinstallationprogresscallback.md)
