appmgmt.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. typedef enum _INSTALLSPECTYPE {
  12. APPNAME = 1,
  13. FILEEXT,PROGID,
  14. COMCLASS
  15. } INSTALLSPECTYPE;
  16. typedef union _INSTALLSPEC {
  17. struct {
  18. WCHAR *Name;
  19. GUID GPOId;
  20. } AppName;
  21. WCHAR *FileExt;
  22. WCHAR *ProgId;
  23. struct {
  24. GUID Clsid;
  25. DWORD ClsCtx;
  26. } COMClass;
  27. } INSTALLSPEC;
  28. typedef struct _INSTALLDATA {
  29. INSTALLSPECTYPE Type;
  30. INSTALLSPEC Spec;
  31. } INSTALLDATA,*PINSTALLDATA;
  32. typedef enum {
  33. ABSENT,ASSIGNED,PUBLISHED
  34. } APPSTATE;
  35. #define LOCALSTATE_ASSIGNED 0x1
  36. #define LOCALSTATE_PUBLISHED 0x2
  37. #define LOCALSTATE_UNINSTALL_UNMANAGED 0x4
  38. #define LOCALSTATE_POLICYREMOVE_ORPHAN 0x8
  39. #define LOCALSTATE_POLICYREMOVE_UNINSTALL 0x10
  40. #define LOCALSTATE_ORPHANED 0x20
  41. #define LOCALSTATE_UNINSTALLED 0x40
  42. typedef struct _LOCALMANAGEDAPPLICATION {
  43. LPWSTR pszDeploymentName;
  44. LPWSTR pszPolicyName;
  45. LPWSTR pszProductId;
  46. DWORD dwState;
  47. } LOCALMANAGEDAPPLICATION,*PLOCALMANAGEDAPPLICATION;
  48. #define MANAGED_APPS_USERAPPLICATIONS 0x1
  49. #define MANAGED_APPS_FROMCATEGORY 0x2
  50. #define MANAGED_APPS_INFOLEVEL_DEFAULT 0x10000
  51. #define MANAGED_APPTYPE_WINDOWSINSTALLER 0x1
  52. #define MANAGED_APPTYPE_SETUPEXE 0x2
  53. #define MANAGED_APPTYPE_UNSUPPORTED 0x3
  54. typedef struct _MANAGEDAPPLICATION {
  55. LPWSTR pszPackageName;
  56. LPWSTR pszPublisher;
  57. DWORD dwVersionHi;
  58. DWORD dwVersionLo;
  59. DWORD dwRevision;
  60. GUID GpoId;
  61. LPWSTR pszPolicyName;
  62. GUID ProductId;
  63. LANGID Language;
  64. LPWSTR pszOwner;
  65. LPWSTR pszCompany;
  66. LPWSTR pszComments;
  67. LPWSTR pszContact;
  68. LPWSTR pszSupportUrl;
  69. DWORD dwPathType;
  70. WINBOOL bInstalled;
  71. } MANAGEDAPPLICATION,*PMANAGEDAPPLICATION;
  72. typedef struct _APPCATEGORYINFO {
  73. LCID Locale;
  74. LPWSTR pszDescription;
  75. GUID AppCategoryId;
  76. } APPCATEGORYINFO;
  77. typedef struct _APPCATEGORYINFOLIST {
  78. DWORD cCategory;
  79. APPCATEGORYINFO *pCategoryInfo;
  80. } APPCATEGORYINFOLIST;
  81. #ifndef WINAPI
  82. #define WINAPI __stdcall
  83. #endif
  84. DWORD WINAPI InstallApplication(PINSTALLDATA pInstallInfo);
  85. DWORD WINAPI UninstallApplication(WCHAR *ProductCode,DWORD dwStatus);
  86. DWORD WINAPI CommandLineFromMsiDescriptor(WCHAR *Descriptor,WCHAR *CommandLine,DWORD *CommandLineLength);
  87. DWORD WINAPI GetManagedApplications(GUID *pCategory,DWORD dwQueryFlags,DWORD dwInfoLevel,LPDWORD pdwApps,PMANAGEDAPPLICATION *prgManagedApps);
  88. DWORD WINAPI GetLocalManagedApplications(WINBOOL bUserApps,LPDWORD pdwApps,PLOCALMANAGEDAPPLICATION *prgLocalApps);
  89. void WINAPI GetLocalManagedApplicationData(WCHAR *ProductCode,LPWSTR *DisplayName,LPWSTR *SupportUrl);
  90. DWORD WINAPI GetManagedApplicationCategories(DWORD dwReserved,APPCATEGORYINFOLIST *pAppCategory);
  91. #ifdef __cplusplus
  92. }
  93. #endif
  94. #endif