GetPackagePathByFullName function (appmodel.h)

Gets the path of the specified package.

Syntax

LONG GetPackagePathByFullName(
  PCWSTR packageFullName,
  UINT32 *pathLength,
  PWSTR  path
);

Parameters

packageFullName

Type: PCWSTR

The full name of the package.

pathLength

Type: UINT32*

A pointer to a variable that holds the number of characters (WCHARs) in the package path string, which includes the null-terminator.

First you pass NULL to path to get the number of characters. You use this number to allocate memory space for path. Then you pass the address of this memory space to fill path.

path

Type: PWSTR

A pointer to memory space that receives the package path string, which includes the null-terminator.

Return value

Type: LONG

If the function succeeds it returns ERROR_SUCCESS. Otherwise, the function returns an error code. The possible error codes include the following.

Return code Description
ERROR_INSUFFICIENT_BUFFER
The buffer specified by path is not large enough to hold the data. The required size is specified by pathLength.

Requirements

   
Minimum supported client Windows 8.1 [desktop apps only]
Minimum supported server Windows Server 2012 R2 [desktop apps only]
Target Platform Windows
Header appmodel.h
Library Kernel32.lib
DLL Kernel32.dll

See also

GetPackagePathByFullName2