ParseApplicationUserModelId function (appmodel.h)

Deconstructs an application user model ID to its package family name and package relative application ID (PRAID).

Syntax

LONG ParseApplicationUserModelId(
  PCWSTR applicationUserModelId,
  UINT32 *packageFamilyNameLength,
  PWSTR  packageFamilyName,
  UINT32 *packageRelativeApplicationIdLength,
  PWSTR  packageRelativeApplicationId
);

Parameters

applicationUserModelId

Type: PCWSTR

The app user model ID.

packageFamilyNameLength

Type: UINT32*

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

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

packageFamilyName

Type: PWSTR

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

packageRelativeApplicationIdLength

Type: UINT32*

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

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

packageRelativeApplicationId

Type: PWSTR

A pointer to memory space that receives the package-relative app ID (PRAID) 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_INVALID_PARAMETER
The applicationUserModelId parameter isn't valid.
ERROR_INSUFFICIENT_BUFFER
The buffer specified by packageFamilyName or packageRelativeApplicationId is not large enough to hold the data; the required buffer size, in WCHARs, is stored in the variable pointed to by packageFamilyNameLength or packageRelativeApplicationIdLength.

Requirements

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