FindPackagesByPackageFamily function (appmodel.h)
Finds the packages with the specified family name for the current user.
Syntax
LONG FindPackagesByPackageFamily(
[in] PCWSTR packageFamilyName,
[in] UINT32 packageFilters,
[in, out] UINT32 *count,
[out, optional] PWSTR *packageFullNames,
[in, out] UINT32 *bufferLength,
[out, optional] WCHAR *buffer,
[out, optional] UINT32 *packageProperties
);
Parameters
[in] packageFamilyName
Type: PCWSTR
The package family name.
[in] packageFilters
Type: UINT32
The package constants that specify how package information is retrieved. All package constants except PACKAGE_FILTER_ALL_LOADED are supported.
[in, out] count
Type: UINT32*
A pointer to a variable that holds the number of package full names that were found.
First you pass NULL to packageFullNames to get the number of package full names that were found. You use this number to allocate memory space for packageFullNames. Then you pass the address of this memory space to fill packageFullNames.
[out, optional] packageFullNames
Type: PWSTR*
A pointer to memory space that receives the strings of package full names that were found.
[in, out] bufferLength
Type: UINT32*
A pointer to a variable that holds the number of characters in the string of package full names.
First you pass NULL to buffer to get the number of characters. You use this number to allocate memory space for buffer. Then you pass the address of this memory space to fill buffer.
[out, optional] buffer
Type: WCHAR*
A pointer to memory space that receives the string of characters for all of the package full names.
[out, optional] packageProperties
Type: UINT32*
A pointer to memory space that receives the package properties for all of the packages that were found.
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 |
---|---|
|
One or more buffer is not large enough to hold the data. The required size is specified by either count or buffer. |
Requirements
Requirement | Value |
---|---|
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 |