FormatApplicationUserModelId function (appmodel.h)
Constructs an application user model ID from the package family name and the package relative application ID (PRAID).
LONG FormatApplicationUserModelId( PCWSTR packageFamilyName, PCWSTR packageRelativeApplicationId, UINT32 *applicationUserModelIdLength, PWSTR applicationUserModelId );
The package family name.
The package-relative app ID (PRAID).
A pointer to a variable that holds the number of characters (WCHARs) in the app user model ID string, which includes the null-terminator.
First you pass NULL to applicationUserModelId to get the number of characters. You use this number to allocate memory space for applicationUserModelId. Then you pass the address of this memory space to fill applicationUserModelId.
A pointer to memory space that receives the app user model ID string, which includes the null-terminator.
If the function succeeds it returns ERROR_SUCCESS. Otherwise, the function returns an error code. The possible error codes include the following.
||The packageFamilyName or packageRelativeApplicationId parameter isn't valid.|
||The buffer specified by applicationUserModelId is not large enough to hold the data; the required buffer size, in WCHARs, is stored in the variable pointed to by applicationUserModelIdLength.|
|Minimum supported client||Windows 8.1 [desktop apps | UWP apps]|
|Minimum supported server||Windows Server 2012 R2 [desktop apps | UWP apps]|