DeletePackageDependency function (appmodel.h)
Deletes the install-time reference for the framework package dependency you created earlier by using the TryCreatePackageDependency method. This method informs the OS that it is safe to remove the framework package if no other apps have a dependency on it.
Syntax
HRESULT DeletePackageDependency(
PCWSTR packageDependencyId
);
Parameters
packageDependencyId
Type: PCWSTR
The ID of the package dependency to remove.
Return value
Return code | Description |
---|---|
E_INVALIDARG | The packageDependencyId parameter is NULL on input. |
Remarks
Removing a package dependency is typically done when an app is uninstalled. A package dependency is implicitly removed if its lifetime artifact (specified via the lifetimeArtifact parameter of the TryCreatePackageDependency function) is deleted. Package dependencies that are not referenced by other packages are elegible to be removed.
The caller of this function must have administrative privileges if the package dependency was created using CreatePackageDependencyOptions_ScopeIsSystem.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 11 (introduced in 10.0.22000.0) |
Header | appmodel.h |
See also
Use the dynamic dependency API to reference MSIX packages at run time