XPackageUninstallUWPInstance
Uninstalls a Universal Windows Platform (UWP) instance of the specified package for the current user, if one is currently installed.
Syntax
HRESULT XPackageUninstallUWPInstance(
const char* packageName
)
Parameters
packageName _In_z_
Type: char*
The name of the package to uninstall. This value must match the value of the Name
attribute for the Identity
element in the AppXManifest
for the UWP package.
Return value
Type: HRESULT
Returns S_OK
if the package was uninstalled (or was not installed for the user); otherwise, returns an HRESULT error code. Returns E_NOTIMPL
if the platform does not support this API.
Remarks
Note
This function is available only for the PC platform.
This function uninstalls a Universal Windows Platform (UWP) instance of the package specified in packageName
for the current user, if an instance is currently installed. If the current user does not have a UWP instance of the specified package currently installed, nothing happens and the function returns S_OK
.
The publisher of the package to be uninstalled must match the publisher of the package invoking this function; otherwise, an error occurs.
Requirements
Header: XPackage.h
Library: xgameruntime.lib
Supported Platforms: Windows, Xbox One family consoles and Xbox Series consoles