GetManagedApplications function (appmgmt.h)
The GetManagedApplications function gets a list of applications that are displayed in the Add pane of Add/Remove Programs (ARP) for a specified user context.
DWORD GetManagedApplications(
[in] GUID *pCategory,
[in] DWORD dwQueryFlags,
[in] DWORD dwInfoLevel,
[out] LPDWORD pdwApps,
[out] PMANAGEDAPPLICATION *prgManagedApps
);
[in] pCategory
A pointer to a GUID that specifies the category
of applications to be listed. If pCategory is not null, dwQueryFlags must contain MANAGED_APPS_FROMCATEGORY. If pCategory is null, dwQueryFlags cannot contain MANAGED_APPS_FROMCATEGORY.
[in] dwQueryFlags
This parameter can contain one or more of the following values.
Lists all applications that apply to the user. The parameter pCategory must be null.
Lists only applications in the category specified by pCategory. The pCategory parameter cannot be null.
[in] dwInfoLevel
This parameter must be MANAGED_APPS_INFOLEVEL_DEFAULT.
[out] pdwApps
The count of applications in the list returned by this function.
[out] prgManagedApps
This parameter is a pointer to an array of MANAGEDAPPLICATION structures. This array contains the list of applications listed in the Add pane of Add/Remove Programs (ARP). You must call LocalFree to free the array when they array is no longer required.
If the function succeeds, the return value is ERROR_SUCCESS. Otherwise, the function returns one of the system error codes. For a complete list of error codes, see System Error Codes or the header file WinError.h.
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Minimum supported server | Windows Server 2008 |
Target Platform | Windows |
Header | appmgmt.h |
Library | Advapi32.lib |
DLL | Advapi32.dll |