Home | History | Annotate | Download | only in include
      1 /**
      2  * This file has no copyright assigned and is placed in the Public Domain.
      3  * This file is part of the mingw-w64 runtime package.
      4  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
      5  */
      6 #ifndef _APPMGMT_H_
      7 #define _APPMGMT_H_
      8 
      9 #ifdef __cplusplus
     10 extern "C" {
     11 #endif
     12 
     13   typedef enum _INSTALLSPECTYPE {
     14     APPNAME = 1,
     15     FILEEXT,PROGID,
     16     COMCLASS
     17   } INSTALLSPECTYPE;
     18 
     19   typedef union _INSTALLSPEC {
     20     struct {
     21       WCHAR *Name;
     22       GUID GPOId;
     23     } AppName;
     24     WCHAR *FileExt;
     25     WCHAR *ProgId;
     26     struct {
     27       GUID Clsid;
     28       DWORD ClsCtx;
     29     } COMClass;
     30   } INSTALLSPEC;
     31 
     32   typedef struct _INSTALLDATA {
     33     INSTALLSPECTYPE Type;
     34     INSTALLSPEC Spec;
     35   } INSTALLDATA,*PINSTALLDATA;
     36 
     37   typedef enum {
     38     ABSENT,ASSIGNED,PUBLISHED
     39   } APPSTATE;
     40 
     41 #define LOCALSTATE_ASSIGNED 0x1
     42 #define LOCALSTATE_PUBLISHED 0x2
     43 #define LOCALSTATE_UNINSTALL_UNMANAGED 0x4
     44 #define LOCALSTATE_POLICYREMOVE_ORPHAN 0x8
     45 #define LOCALSTATE_POLICYREMOVE_UNINSTALL 0x10
     46 #define LOCALSTATE_ORPHANED 0x20
     47 #define LOCALSTATE_UNINSTALLED 0x40
     48 
     49   typedef struct _LOCALMANAGEDAPPLICATION {
     50     LPWSTR pszDeploymentName;
     51     LPWSTR pszPolicyName;
     52     LPWSTR pszProductId;
     53     DWORD dwState;
     54   } LOCALMANAGEDAPPLICATION,*PLOCALMANAGEDAPPLICATION;
     55 
     56 #define MANAGED_APPS_USERAPPLICATIONS 0x1
     57 #define MANAGED_APPS_FROMCATEGORY 0x2
     58 #define MANAGED_APPS_INFOLEVEL_DEFAULT 0x10000
     59 
     60 #define MANAGED_APPTYPE_WINDOWSINSTALLER 0x1
     61 #define MANAGED_APPTYPE_SETUPEXE 0x2
     62 #define MANAGED_APPTYPE_UNSUPPORTED 0x3
     63 
     64   typedef struct _MANAGEDAPPLICATION {
     65     LPWSTR pszPackageName;
     66     LPWSTR pszPublisher;
     67     DWORD dwVersionHi;
     68     DWORD dwVersionLo;
     69     DWORD dwRevision;
     70     GUID GpoId;
     71     LPWSTR pszPolicyName;
     72     GUID ProductId;
     73     LANGID Language;
     74     LPWSTR pszOwner;
     75     LPWSTR pszCompany;
     76     LPWSTR pszComments;
     77     LPWSTR pszContact;
     78     LPWSTR pszSupportUrl;
     79     DWORD dwPathType;
     80     WINBOOL bInstalled;
     81   } MANAGEDAPPLICATION,*PMANAGEDAPPLICATION;
     82 
     83   typedef struct _APPCATEGORYINFO {
     84     LCID Locale;
     85     LPWSTR pszDescription;
     86     GUID AppCategoryId;
     87   } APPCATEGORYINFO;
     88 
     89   typedef struct _APPCATEGORYINFOLIST {
     90     DWORD cCategory;
     91     APPCATEGORYINFO *pCategoryInfo;
     92   } APPCATEGORYINFOLIST;
     93 
     94 #ifndef WINAPI
     95 #define WINAPI  __stdcall
     96 #endif
     97 
     98   DWORD WINAPI InstallApplication(PINSTALLDATA pInstallInfo);
     99   DWORD WINAPI UninstallApplication(WCHAR *ProductCode,DWORD dwStatus);
    100   DWORD WINAPI CommandLineFromMsiDescriptor(WCHAR *Descriptor,WCHAR *CommandLine,DWORD *CommandLineLength);
    101   DWORD WINAPI GetManagedApplications(GUID *pCategory,DWORD dwQueryFlags,DWORD dwInfoLevel,LPDWORD pdwApps,PMANAGEDAPPLICATION *prgManagedApps);
    102   DWORD WINAPI GetLocalManagedApplications(WINBOOL bUserApps,LPDWORD pdwApps,PLOCALMANAGEDAPPLICATION *prgLocalApps);
    103   void WINAPI GetLocalManagedApplicationData(WCHAR *ProductCode,LPWSTR *DisplayName,LPWSTR *SupportUrl);
    104   DWORD WINAPI GetManagedApplicationCategories(DWORD dwReserved,APPCATEGORYINFOLIST *pAppCategory);
    105 
    106 #ifdef __cplusplus
    107 }
    108 #endif
    109 #endif
    110