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.

151 lines
4.5 KiB

  1. //-----------------------------------------------------------------------------
  2. // File: appregdef.h
  3. //
  4. // Copyright: Copyright (c) Microsoft Corporation
  5. //
  6. // Contents: Header file for Application Registration
  7. //
  8. // Comments: 23-May-2000
  9. // Application registration for MDAC Rollback
  10. //
  11. //-----------------------------------------------------------------------------
  12. #ifndef _APPREGDEF_H_ODBCCONF
  13. #define _APPREGDEF_H_ODBCCONF
  14. // Application Registration Data structure
  15. // Field definitions:
  16. // dwSize Size of the structure (in bytes)
  17. // ApplicationGuid Guid assigned to application. Guid should only
  18. // change if it is possible to install two+ versions
  19. // of the application on a single machine (side-by-side).
  20. // wApplicationVersionMajor Major version of the application (ie. Office 9; Major would be 9)
  21. // wApplcationVersionMinor Minor version of the application (ie. Office 9 SR1; Minor would be 1 ???)
  22. // wMinimumVersionMajor Major version of the minimum required version of the component
  23. // (ie. SQL Server 2000 requires MDAC 2.60; Major would be 2)
  24. // wMinimumVersionMinor Minor version of the minimum require version of the component
  25. // (ie. SQL Server 2000 requires MDAC 2.60; Minor would be 60)
  26. // wInstalledVersionMajor Major version of the component which the application installed
  27. // (ie. SQL Server 2000 installs MDAC 2.60; Major would be 2)
  28. // wInstalledVersionMinor Minor version of the component which the application installed
  29. // (ie. SQL Server 2000 installs MDAC 2.60; Minor would be 60)
  30. // bInstalledComponent TRUE if the application installed the component, FALSE if the component
  31. // is a pre-requisite of the application
  32. // bEnforceMinimum TRUE if the wizard should double check the minimum version, and disable
  33. // rollback if a rollback would restore a version that was less than the minimum
  34. typedef struct
  35. {
  36. DWORD dwSize;
  37. GUID ApplicationGuid;
  38. char szApplicationName[MAX_PATH];
  39. DWORD dwReserved1;
  40. DWORD dwReserved2;
  41. DWORD dwApplicationVersionMajor;
  42. DWORD dwApplicationVersionMinor;
  43. DWORD dwMinimumVersionMajor;
  44. DWORD dwMinimumVersionMinor;
  45. DWORD dwInstalledVersionMajor;
  46. DWORD dwInstalledVersionMinor;
  47. BOOL bInstalledComponent;
  48. BOOL bEnforceMinimum;
  49. } APPREGDATA, *PAPPREGDATA;
  50. //AppReg Enumeration Handle
  51. typedef void *HAPPREGENUM;
  52. typedef BOOL (WINAPI *PFN_REGISTERAPPLICATION)(PAPPREGDATA, BOOL);
  53. typedef BOOL (WINAPI *PFN_UNREGISTERAPPLICATION)(LPGUID);
  54. typedef BOOL (WINAPI *PFN_QUERYAPPLICATION)(LPGUID, PAPPREGDATA);
  55. typedef HAPPREGENUM (WINAPI *PFN_OPENAPPREGENUM)(void);
  56. typedef BOOL (WINAPI *PFN_APPREGENUM)(HAPPREGENUM, DWORD, PAPPREGDATA);
  57. typedef BOOL (WINAPI *PFN_REFRESHAPPREGENUM)(HAPPREGENUM);
  58. typedef BOOL (WINAPI *PFN_CLOSEAPPREGENUM)(HAPPREGENUM);
  59. #define SZ_REGISTERAPPLICATION "RegisterApplication"
  60. #define SZ_UNREGISTERAPPLICATION "UnregisterApplication"
  61. #define SZ_QUERYAPPLICATION "QueryApplication"
  62. #define SZ_OPENAPPREGENUM "OpenAppRegEnum"
  63. #define SZ_CLOSEAPPREGENUM "CloseAppRegEnum"
  64. #define SZ_REFRESHAPPREGENUM "RefreshAppRegEnum"
  65. #define SZ_APPREGENUM "AppRegEnum"
  66. /******************** Exports ********************/
  67. //RegisterApplication
  68. // IN - PAPPREGDATA pAppRegData
  69. //
  70. BOOL
  71. WINAPI
  72. RegisterApplication(
  73. PAPPREGDATA pAppRegData,
  74. BOOL fOverWrite);
  75. //UnregisterApplication
  76. // IN - LPGUID pApplicationGuid
  77. //
  78. BOOL
  79. WINAPI
  80. UnregisterApplication(
  81. LPGUID pApplicationGuid);
  82. //OpenAppRegEnum
  83. // Comments: Opens an Enumeraion Handle and returns the handle
  84. //
  85. HAPPREGENUM
  86. WINAPI
  87. OpenAppRegEnum(
  88. void);
  89. //CloseAppRegEnum
  90. // IN - HAPPREGENUM hEnum
  91. //
  92. // Comments: Closes an Enumeraion Handle
  93. //
  94. BOOL
  95. WINAPI
  96. CloseAppRegEnum(
  97. HAPPREGENUM hEnum);
  98. //QueryApplication
  99. // IN - LPGUID pApplicationGuid
  100. // OUT - PAPPREGDATA pAppRegData
  101. //
  102. BOOL
  103. WINAPI
  104. QueryApplication(
  105. LPGUID pApplicationGuid,
  106. PAPPREGDATA pAppRegData);
  107. // valid values for AppRegEnum dwAction
  108. #define APPREG_MOVEFIRST 1
  109. #define APPREG_MOVENEXT 2
  110. #define APPREG_MOVEPREV 3
  111. #define APPREG_MOVELAST 4
  112. //AppRegEnum
  113. // IN - HAPPREGENUM hEnum
  114. // IN - DWORD dwAction
  115. // OUT - PAPPREGDATA pAppRegData
  116. //
  117. // Comments: Enumerates the list of Registered Applications
  118. //
  119. BOOL
  120. WINAPI
  121. AppRegEnum(
  122. HAPPREGENUM hEnum,
  123. DWORD dwAction,
  124. PAPPREGDATA pAppRegData);
  125. //RefreshAppRegEnum
  126. // IN - HAPPREGENUM hEnum
  127. //
  128. BOOL
  129. WINAPI
  130. RefreshAppRegEnum(
  131. HAPPREGENUM hEnum);
  132. #endif // _APPREFDEF_H_ODBCCONF