Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

193 lines
4.1 KiB

  1. //*************************************************************
  2. //
  3. // appmgmt.h
  4. //
  5. // APIs for operations on MSI applications which are deployed
  6. // and managed in the NT Directory.
  7. //
  8. // Copyright (c) Microsoft Corporation 1998-1999
  9. // All rights reserved
  10. //
  11. //*************************************************************
  12. #ifndef _APPMGMT_H_
  13. #define _APPMGMT_H_
  14. #if _MSC_VER > 1000
  15. #pragma once
  16. #endif
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. typedef enum _INSTALLSPECTYPE
  21. {
  22. APPNAME = 1,
  23. FILEEXT,
  24. PROGID,
  25. COMCLASS
  26. } INSTALLSPECTYPE;
  27. typedef union _INSTALLSPEC
  28. {
  29. struct
  30. {
  31. WCHAR * Name;
  32. GUID GPOId;
  33. } AppName;
  34. WCHAR * FileExt;
  35. WCHAR * ProgId;
  36. struct
  37. {
  38. GUID Clsid;
  39. DWORD ClsCtx;
  40. } COMClass;
  41. } INSTALLSPEC;
  42. typedef struct _INSTALLDATA
  43. {
  44. INSTALLSPECTYPE Type;
  45. INSTALLSPEC Spec;
  46. } INSTALLDATA, *PINSTALLDATA;
  47. typedef enum
  48. {
  49. ABSENT,
  50. ASSIGNED,
  51. PUBLISHED
  52. } APPSTATE;
  53. #define LOCALSTATE_ASSIGNED 0x1 // app is assigned
  54. #define LOCALSTATE_PUBLISHED 0x2 // app is published
  55. #define LOCALSTATE_UNINSTALL_UNMANAGED 0x4 // uninstall any unmanaged version before assigning
  56. #define LOCALSTATE_POLICYREMOVE_ORPHAN 0x8 // app is orphaned when policy removed
  57. #define LOCALSTATE_POLICYREMOVE_UNINSTALL 0x10 // app is uninstalled when policy removed
  58. #define LOCALSTATE_ORPHANED 0x20 // app is orphaned after being applied
  59. #define LOCALSTATE_UNINSTALLED 0x40 // app is uninstalled after being applied
  60. typedef struct _LOCALMANAGEDAPPLICATION
  61. {
  62. LPWSTR pszDeploymentName;
  63. LPWSTR pszPolicyName;
  64. LPWSTR pszProductId;
  65. DWORD dwState;
  66. } LOCALMANAGEDAPPLICATION, *PLOCALMANAGEDAPPLICATION;
  67. #define MANAGED_APPS_USERAPPLICATIONS 0x1
  68. #define MANAGED_APPS_FROMCATEGORY 0x2
  69. #define MANAGED_APPS_INFOLEVEL_DEFAULT 0x10000
  70. #define MANAGED_APPTYPE_WINDOWSINSTALLER 0x1
  71. #define MANAGED_APPTYPE_SETUPEXE 0x2
  72. #define MANAGED_APPTYPE_UNSUPPORTED 0x3
  73. typedef struct _MANAGEDAPPLICATION
  74. {
  75. LPWSTR pszPackageName;
  76. LPWSTR pszPublisher;
  77. DWORD dwVersionHi;
  78. DWORD dwVersionLo;
  79. DWORD dwRevision;
  80. GUID GpoId;
  81. LPWSTR pszPolicyName;
  82. GUID ProductId;
  83. LANGID Language;
  84. LPWSTR pszOwner;
  85. LPWSTR pszCompany;
  86. LPWSTR pszComments;
  87. LPWSTR pszContact;
  88. LPWSTR pszSupportUrl;
  89. DWORD dwPathType;
  90. BOOL bInstalled;
  91. } MANAGEDAPPLICATION, *PMANAGEDAPPLICATION;
  92. typedef struct _APPCATEGORYINFO
  93. {
  94. LCID Locale;
  95. LPWSTR pszDescription;
  96. GUID AppCategoryId;
  97. } APPCATEGORYINFO;
  98. typedef struct _APPCATEGORYINFOLIST
  99. {
  100. DWORD cCategory;
  101. #ifdef MIDL_PASS
  102. [size_is(cCategory)]
  103. #endif
  104. APPCATEGORYINFO * pCategoryInfo;
  105. } APPCATEGORYINFOLIST;
  106. #ifndef WINAPI
  107. #define WINAPI
  108. #endif
  109. DWORD WINAPI
  110. InstallApplication(
  111. PINSTALLDATA pInstallInfo
  112. );
  113. DWORD WINAPI
  114. UninstallApplication(
  115. WCHAR * ProductCode,
  116. DWORD dwStatus
  117. );
  118. DWORD WINAPI
  119. CommandLineFromMsiDescriptor(
  120. WCHAR * Descriptor,
  121. WCHAR * CommandLine,
  122. DWORD * CommandLineLength
  123. );
  124. DWORD WINAPI
  125. GetManagedApplications(
  126. GUID * pCategory,
  127. DWORD dwQueryFlags,
  128. DWORD dwInfoLevel,
  129. LPDWORD pdwApps,
  130. PMANAGEDAPPLICATION* prgManagedApps
  131. );
  132. DWORD WINAPI
  133. GetLocalManagedApplications(
  134. BOOL bUserApps,
  135. LPDWORD pdwApps,
  136. PLOCALMANAGEDAPPLICATION* prgLocalApps
  137. );
  138. void WINAPI
  139. GetLocalManagedApplicationData(
  140. WCHAR * ProductCode,
  141. LPWSTR * DisplayName,
  142. LPWSTR * SupportUrl
  143. );
  144. DWORD WINAPI
  145. GetManagedApplicationCategories(
  146. DWORD dwReserved,
  147. APPCATEGORYINFOLIST* pAppCategory
  148. );
  149. #ifdef __cplusplus
  150. }
  151. #endif
  152. #endif