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

# XPackage (API contents)

> XPackage

Reference material for XPackage APIs.

## Functions

| Function | Description |
| - | - |
| [XPackageChangeChunkInstallOrder](https://docs.xbox.com/reference/system/xpackage/functions/xpackagechangechunkinstallorder.md) | Sets the selected chunks to install first. |
| [XPackageChunkAvailabilityCallback](https://docs.xbox.com/reference/system/xpackage/functions/xpackagechunkavailabilitycallback.md) | A user-defined callback used by [XPackageEnumerateChunkAvailability](https://docs.xbox.com/reference/system/xpackage/functions/xpackageenumeratechunkavailability.md). |
| [XPackageCloseInstallationMonitorHandle](https://docs.xbox.com/reference/system/xpackage/functions/xpackagecloseinstallationmonitorhandle.md) | Closes a specified installation monitor. |
| [XPackageCloseMountHandle](https://docs.xbox.com/reference/system/xpackage/functions/xpackageclosemounthandle.md) | Closes the specified mount handle. |
| [XPackageCreateInstallationMonitor](https://docs.xbox.com/reference/system/xpackage/functions/xpackagecreateinstallationmonitor.md) | Creates a monitor of the state of an installation. |
| [XPackageEnumerateChunkAvailability](https://docs.xbox.com/reference/system/xpackage/functions/xpackageenumeratechunkavailability.md) | Examines the installation package and enumerates the availability of all chunks that match the specified selectors. |
| [XPackageEnumerateFeatures](https://docs.xbox.com/reference/system/xpackage/functions/xpackageenumeratefeatures.md) | Enumerates features defined in the package's layout file. |
| [XPackageEnumeratePackages](https://docs.xbox.com/reference/system/xpackage/functions/xpackageenumeratepackages.md) | Finds installed or installing packages related to the calling process. |
| [XPackageEnumerationCallback](https://docs.xbox.com/reference/system/xpackage/functions/xpackageenumerationcallback.md) | A callback used by [XPackageEnumeratePackages](https://docs.xbox.com/reference/system/xpackage/functions/xpackageenumeratepackages.md). |
| [XPackageEstimateDownloadSize](https://docs.xbox.com/reference/system/xpackage/functions/xpackageestimatedownloadsize.md) | Computes the download size of the chunks that match the specified installation selectors. |
| [XPackageFeatureEnumerationCallback](https://docs.xbox.com/reference/system/xpackage/functions/xpackagefeatureenumerationcallback.md) | The callback used by XPackageEnumerateFeatures to enumerate each feature. |
| [XPackageFindChunkAvailability](https://docs.xbox.com/reference/system/xpackage/functions/xpackagefindchunkavailability.md) | Returns the minimum availability for the collection of chunks that match the specified selectors. |
| [XPackageGetCurrentProcessPackageIdentifier](https://docs.xbox.com/reference/system/xpackage/functions/xpackagegetcurrentprocesspackageidentifier.md) | Returns an installation identity string that identifies the installation for this process. |
| [XPackageGetInstallationProgress](https://docs.xbox.com/reference/system/xpackage/functions/xpackagegetinstallationprogress.md) | Returns the current progress of an installation. |
| [XPackageGetMountPath](https://docs.xbox.com/reference/system/xpackage/functions/xpackagegetmountpath.md) | Gets the path to a mounted installation. |
| [XPackageGetPackageKind](https://docs.xbox.com/reference/system/xpackage/functions/xpackagegetpackagekind.md) | Returns the [XPackageKind](https://docs.xbox.com/reference/system/xpackage/enums/xpackagekind.md) of a package. |
| [XPackageGetMountPathSize](https://docs.xbox.com/reference/system/xpackage/functions/xpackagegetmountpathsize.md) | Gets the size required for an array to hold a mount path returned by [XPackageGetMountPath](https://docs.xbox.com/reference/system/xpackage/functions/xpackagegetmountpath.md). |
| [XPackageGetUserLocale](https://docs.xbox.com/reference/system/xpackage/functions/xpackagegetuserlocale.md) | Gets the current user locale. |
| [XPackageGetWriteStats](https://docs.xbox.com/reference/system/xpackage/functions/xpackagegetwritestats.md) | Gets the output write statistics (writeStats). |
| [XPackageInstallationProgressCallback](https://docs.xbox.com/reference/system/xpackage/functions/xpackageinstallationprogresscallback.md) | A callback used by [XPackageRegisterInstallationProgressChanged](https://docs.xbox.com/reference/system/xpackage/functions/xpackageregisterinstallationprogresschanged.md). |
| [XPackageInstallChunks](https://docs.xbox.com/reference/system/xpackage/functions/xpackageinstallchunks.md) | Starts the installation of chunks. |
| [XPackageInstallChunksAsync](https://docs.xbox.com/reference/system/xpackage/functions/xpackageinstallchunksasync.md) | Starts installation of chunks. |
| [XPackageInstallChunksResult](https://docs.xbox.com/reference/system/xpackage/functions/xpackageinstallchunksresult.md) | Retrieves the result of a call to [XPackageInstallChunksAsync](https://docs.xbox.com/reference/system/xpackage/functions/xpackageinstallchunksasync.md). |
| [XPackageInstalledCallback](https://docs.xbox.com/reference/system/xpackage/functions/xpackageinstalledcallback.md) | A user-defined callback used by the XPackageRegisterPackageInstalled function. |
| [XPackageIsPackagedProcess](https://docs.xbox.com/reference/system/xpackage/functions/xpackageispackagedprocess.md) | Returns a Boolean that indicates whether the current process has an installation identity. |
| [XPackageMount](https://docs.xbox.com/reference/system/xpackage/functions/xpackagemount.md) | This function is now deprecated. Use XPackageMountWithUiAsync instead. |
| [XPackageMountWithUiAsync](https://docs.xbox.com/reference/system/xpackage/functions/xpackagemountwithuiasync.md) | Asynchronously mounts the installation of specified content, and returns a mount handle to it. |
| [XPackageMountWithUiResult](https://docs.xbox.com/reference/system/xpackage/functions/xpackagemountwithuiresult.md) | Gets the results of a call to XPackageMountWithUIAsync. |
| [XPackageRegisterInstallationProgressChanged](https://docs.xbox.com/reference/system/xpackage/functions/xpackageregisterinstallationprogresschanged.md) | Registers a callback to be called when installation progress changes. |
| [XPackageRegisterPackageInstalled](https://docs.xbox.com/reference/system/xpackage/functions/xpackageregisterpackageinstalled.md) | Registers a callback to be called when an installation is completed. |
| [XPackageUninstallPackage](https://docs.xbox.com/reference/system/xpackage/functions/xpackageuninstallpackage.md) | Uninstalls a given package. |
| [XPackageUninstallChunks](https://docs.xbox.com/reference/system/xpackage/functions/xpackageuninstallchunks.md) | Uninstalls chunks that match the specified selectors. |
| [XPackageUninstallUWPInstance](https://docs.xbox.com/reference/system/xpackage/functions/xpackageuninstalluwpinstance.md) | Uninstalls a Universal Windows Platform (UWP) instance of a particular package for the current user if one is currently installed. |
| [XPackageUnregisterInstallationProgressChanged](https://docs.xbox.com/reference/system/xpackage/functions/xpackageunregisterinstallationprogresschanged.md) | Unregisters a previously registered install progress changed callback. |
| [XPackageUnregisterPackageInstalled](https://docs.xbox.com/reference/system/xpackage/functions/xpackageunregisterpackageinstalled.md) | Unregisters a previously registered install complete callback. |
| [XPackageUpdateInstallationMonitor](https://docs.xbox.com/reference/system/xpackage/functions/xpackageupdateinstallationmonitor.md) | Refreshes the progress returned from [XPackageGetInstallationProgress](https://docs.xbox.com/reference/system/xpackage/functions/xpackagegetinstallationprogress.md). |

## Structures

| Structure | Description |
| - | - |
| [XPackageChunkSelector](https://docs.xbox.com/reference/system/xpackage/structs/xpackagechunkselector.md) | Defines the criteria for selecting a set of chunks. |
| [XPackageDetails](https://docs.xbox.com/reference/system/xpackage/structs/xpackagedetails.md) | Contains details about an installation. |
| [XPackageFeature](https://docs.xbox.com/reference/system/xpackage/structs/xpackagefeature.md) | Describes a feature. |
| [XPackageInstallationProgress](https://docs.xbox.com/reference/system/xpackage/structs/xpackageinstallationprogress.md) | Contains information about the progress of an installation. |
| [XPackageWriteStats](https://docs.xbox.com/reference/system/xpackage/structs/xpackagewritestats.md) | Contains the output write statistics (writeStats). |

## Enumerations

| Enumeration | Description |
| - | - |
| [XPackageChunkAvailability](https://docs.xbox.com/reference/system/xpackage/enums/xpackagechunkavailability.md) | Indicates the availability of installation chunks. |
| [XPackageChunkSelectorType](https://docs.xbox.com/reference/system/xpackage/enums/xpackagechunkselectortype.md) | Indicates the selector type. |
| [XPackageEnumerationScope](https://docs.xbox.com/reference/system/xpackage/enums/xpackageenumerationscope.md) | Indicates the scope of packages to be returned when installation packages are being enumerated. |
| [XPackageKind](https://docs.xbox.com/reference/system/xpackage/enums/xpackagekind.md) | Indicates the type of the installation package. |

## Error codes

The following error codes may be returned by XPackage APIs. For a complete list, see [Error codes](https://docs.xbox.com/reference/errorcodes.md).

| Code | Value | Description |
| - | - | - |
| E\_GAMEPACKAGE\_APP\_NOT\_PACKAGED | 0x89245200 | The game is not packaged in a container. |
| E\_GAMEPACKAGE\_NO\_INSTALLED\_LANGUAGES | 0x89245201 | The game uses Intelligent Delivery to selectively install languages, but none are installed. |
| E\_GAMEPACKAGE\_NO\_STORE\_ID | 0x89245202 | The StoreId attribute must be set in the application's game config. |
| E\_GAMEPACKAGE\_INVALID\_SELECTOR | 0x89245203 | A chunk selector was provided that does not resolve to a chunk in the package. |
| E\_GAMEPACKAGE\_DOWNLOAD\_REQUIRED | 0x89245204 | One or more required chunks must be downloaded to mount the package on this device. |
| E\_GAMEPACKAGE\_NO\_TAG\_CHANGE | 0x89245205 | Change installed chunks in this package using Features, not tags. |
| E\_GAMEPACKAGE\_DLC\_NOT\_SUPPORTED | 0x89245206 | Game does not support the DLC package. Ensure correct DLC compatibility in the game config. |
| E\_GAMEPACKAGE\_DUPLICATE\_ID\_VALUES | 0x89245207 | The package contains more than one executable mapping to the same 'ID' attribute. Check for duplicate 'ID' attributes in the 'Executable' elements. |
| E\_GAMEPACKAGE\_NO\_PACKAGE\_IDENTIFIER | 0x89245208 | Could not resolve an identifier for the package. The package might not be installed. |

## Conceptual documentation

* [XStore checking for updates](https://docs.xbox.com/publishing/xstore-commerce/xstore-checking-updates.md)
* [XStore grant access to content](https://docs.xbox.com/publishing/xstore-commerce/xstore-granting-access.md)
* [XStore manage and license optional packages](https://docs.xbox.com/publishing/xstore-commerce/xstore-dlc.md)

## See also

[System API reference](https://docs.xbox.com/reference/system/gc-reference-system-toc.md)\
[XStore API reference](https://docs.xbox.com/reference/system/xstore/xstore_members.md)


## Related topics

- [GDK downloadable content (DLC) packages](https://docs.xbox.com/build/core-features/common/packaging/packaging-downloadable-content-dlc.md)
- [Packaging (contents)](https://docs.xbox.com/build/core-features/common/packaging/gc-packaging-toc.md)
- [Intelligent Delivery: OnDemand content](https://docs.xbox.com/build/core-features/common/packaging/intelligentdelivery-ondemand.md)
- [XPackageEnumeratePackages](https://docs.xbox.com/reference/system/xpackage/functions/xpackageenumeratepackages.md)
- [XPackageKind](https://docs.xbox.com/reference/system/xpackage/enums/xpackagekind.md)
