GetResolvedPackageFullNameForPackageDependency function (appmodel.h)

Returns the package full name that would be used if the package dependency were to be resolved. This function does not add the package to the invoking process' package graph.

Syntax

HRESULT GetResolvedPackageFullNameForPackageDependency(
  PCWSTR packageDependencyId,
  PWSTR  *packageFullName
);

Parameters

packageDependencyId

Type: PCWSTR

The ID of the package dependency to be resolved. This parameter must match a package dependency defined by using the TryCreatePackageDependency function for the calling user or the system (via the CreatePackageDependencyOptions_ScopeIsSystem option), or else an error is returned.

packageFullName

Type: PCWSTR*

The full name of the package to which the dependency has been resolved. If the package dependency cannot be resolved, the function succeeds but this parameter is nullptr on output. Use the HeapAlloc function to allocate memory for this parameter, and use HeapFree to deallocate the memory.

Return value

Return code Description
E_INVALIDARG The packageDependencyId or packageFullName parameter is NULL on input.

Remarks

To add the package to the invoking process' package graph, use the AddPackageDependency function.

Requirements

Requirement Value
Minimum supported client Windows 11 (introduced in 10.0.22000.0)
Header appmodel.h

See also

TryCreatePackageDependency

AddPackageDependency