FormatApplicationUserModelId function (appmodel.h)
Constructs an application user model ID from the package family name and the package relative application ID (PRAID).
Syntax
LONG FormatApplicationUserModelId(
[in] PCWSTR packageFamilyName,
[in] PCWSTR packageRelativeApplicationId,
[in, out] UINT32 *applicationUserModelIdLength,
[out, optional] PWSTR applicationUserModelId
);
Parameters
[in] packageFamilyName
Type: PCWSTR
The package family name.
[in] packageRelativeApplicationId
Type: PCWSTR
The package-relative app ID (PRAID).
[in, out] applicationUserModelIdLength
Type: UINT32*
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.
[out, optional] applicationUserModelId
Type: PWSTR
A pointer to memory space that receives the app user model ID 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 |
---|---|
|
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. |
Requirements
Requirement | Value |
---|---|
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 |