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

# XPackage

> XPackage

# XPackage

Reference material for XPackage APIs.

## Functions

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

## Structures

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

## Enumerations

| Enumeration                                                                             | Description                                                                                     |
| --------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| [XPackageChunkAvailability](/reference/system/xpackage/enums/xpackagechunkavailability) | Indicates the availability of installation chunks.                                              |
| [XPackageChunkSelectorType](/reference/system/xpackage/enums/xpackagechunkselectortype) | Indicates the selector type.                                                                    |
| [XPackageEnumerationScope](/reference/system/xpackage/enums/xpackageenumerationscope)   | Indicates the scope of packages to be returned when installation packages are being enumerated. |
| [XPackageKind](/reference/system/xpackage/enums/xpackagekind)                           | 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](/reference/errorcodes).

| 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](/publishing/xstore-commerce/xstore-checking-updates)
* [XStore grant access to content](/publishing/xstore-commerce/xstore-granting-access)
* [XStore manage and license optional packages](/publishing/xstore-commerce/xstore-dlc)

## See also

[System API reference](/reference/system/gc-reference-system-toc)\
[XStore API reference](/reference/system/xstore/xstore_members)


## Related topics

- [XPackageEnumeratePackages](/reference/system/xpackage/functions/xpackageenumeratepackages.md)
- [XPackageUninstallPackage](/reference/system/xpackage/functions/xpackageuninstallpackage.md)
- [XPackageUnregisterPackageInstalled](/reference/system/xpackage/functions/xpackageunregisterpackageinstalled.md)
- [XPackageRegisterPackageInstalled](/reference/system/xpackage/functions/xpackageregisterpackageinstalled.md)
- [XPackageDetails](/reference/system/xpackage/structs/xpackagedetails.md)
