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.

253 lines
8.3 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1999-2000 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // Common.h
  7. //
  8. // Description:
  9. // Definition of schema defined strings
  10. //
  11. // Author:
  12. // Jim Benton (jbenton) 15-Oct-2001
  13. //
  14. // Notes:
  15. //
  16. //////////////////////////////////////////////////////////////////////////////
  17. #pragma once
  18. typedef enum _DISMOUNT_ERROR
  19. {
  20. DISMOUNT_RC_NO_ERROR = 0,
  21. DISMOUNT_RC_ACCESS_DENIED,
  22. DISMOUNT_RC_VOLUME_HAS_MOUNT_POINTS,
  23. DISMOUNT_RC_NOT_SUPPORTED,
  24. DISMOUNT_RC_FORCE_OPTION_REQUIRED,
  25. DISMOUNT_RC_UNEXPECTED,
  26. } DISMOUNT_ERROR, *PDISMOUNT_ERROR;
  27. typedef enum _MOUNT_ERROR
  28. {
  29. MOUNT_RC_NO_ERROR = 0,
  30. MOUNT_RC_ACCESS_DENIED,
  31. MOUNT_RC_UNEXPECTED,
  32. } MOUNT_ERROR, *PMOUNT_ERROR;
  33. typedef enum _MOUNTPOINT_ERROR
  34. {
  35. MOUNTPOINT_RC_NO_ERROR = 0,
  36. MOUNTPOINT_RC_ACCESS_DENIED,
  37. MOUNTPOINT_RC_INVALID_ARG,
  38. MOUNTPOINT_RC_DIRECTORY_NOT_EMPTY,
  39. MOUNTPOINT_RC_FILE_NOT_FOUND,
  40. MOUNTPOINT_RC_NOT_SUPPORTED,
  41. MOUNTPOINT_RC_UNEXPECTED,
  42. } MOUNTPOINT_ERROR, *PMOUNTPOINT_ERROR;
  43. typedef enum _CHKDSK_ERROR
  44. {
  45. CHKDSK_RC_NO_ERROR = 0,
  46. CHKDSK_RC_VOLUME_LOCKED,
  47. CHKDSK_RC_UNSUPPORTED_FS,
  48. CHKDSK_RC_UNKNOWN_FS,
  49. CHKDSK_RC_NO_MEDIA,
  50. CHKDSK_RC_UNEXPECTED
  51. } CHKDSK_ERROR, *PCHKDSK_ERROR;
  52. typedef enum _AUTOCHK_ERROR
  53. {
  54. AUTOCHK_RC_NO_ERROR = 0,
  55. AUTOCHK_RC_NETWORK_DRIVE,
  56. AUTOCHK_RC_REMOVABLE_DRIVE,
  57. AUTOCHK_RC_NOT_ROOT_DIRECTORY,
  58. AUTOCHK_RC_UNKNOWN_DRIVE,
  59. AUTOCHK_RC_UNEXPECTED
  60. } AUTOCHK_ERROR, *PAUTOCHK_ERROR;
  61. typedef enum _FORMAT_ERROR
  62. {
  63. FORMAT_RC_NO_ERROR = 0,
  64. FORMAT_RC_UNSUPPORTED_FS,
  65. FORMAT_RC_INCOMPATIBLE_MEDIA,
  66. FORMAT_RC_ACCESS_DENIED,
  67. FORMAT_RC_CALL_CANCELLED,
  68. FORMAT_RC_CANCEL_TOO_LATE,
  69. FORMAT_RC_WRITE_PROTECTED,
  70. FORMAT_RC_CANT_LOCK,
  71. FORMAT_RC_CANT_QUICKFORMAT,
  72. FORMAT_RC_IO_ERROR,
  73. FORMAT_RC_BAD_LABEL,
  74. FORMAT_RC_NO_MEDIA,
  75. FORMAT_RC_VOLUME_TOO_SMALL,
  76. FORMAT_RC_VOLUME_TOO_BIG,
  77. FORMAT_RC_VOLUME_NOT_MOUNTED,
  78. FORMAT_RC_CLUSTER_SIZE_TOO_SMALL,
  79. FORMAT_RC_CLUSTER_SIZE_TOO_BIG,
  80. FORMAT_RC_CLUSTER_COUNT_BEYOND_32BITS,
  81. FORMAT_RC_UNEXPECTED
  82. } FORMAT_ERROR, *PFORMAT_ERROR;
  83. typedef enum _DEFRAG_ERROR
  84. {
  85. DEFRAG_RC_NO_ERROR = 0,
  86. DEFRAG_RC_ACCESS_DENIED,
  87. DEFRAG_RC_NOT_SUPPORTED,
  88. DEFRAG_RC_DIRTY_BIT_SET,
  89. DEFRAG_RC_LOW_FREESPACE,
  90. DEFRAG_RC_CORRUPT_MFT,
  91. DEFRAG_RC_CALL_CANCELLED,
  92. DEFRAG_RC_CANCEL_TOO_LATE,
  93. DEFRAG_RC_ALREADY_RUNNING,
  94. DEFRAG_RC_ENGINE_CONNECT,
  95. DEFRAG_RC_ENGINE_ERROR,
  96. DEFRAG_RC_UNEXPECTED
  97. } DEFRAG_ERROR, *PDEFRAG_ERROR;
  98. const int g_cchFileSystemNameMax = 32;
  99. const int g_cchDriveName = 4;
  100. const int g_cchVolumeLabelMax = 32;
  101. const int g_cchAccountNameMax = 256;
  102. extern const WCHAR * const g_wszDfrgifsDLL;
  103. extern const CHAR * const g_szDfrgifsDefrag;
  104. extern const WCHAR* const g_wszScheduleAutoChkCommand;
  105. extern const WCHAR* const g_wszExcludeAutoChkCommand;
  106. //
  107. // Class
  108. //
  109. extern const WCHAR * const PVDR_CLASS_DEFRAGANALYSIS;
  110. extern const WCHAR * const PVDR_CLASS_DIRECTORY;
  111. extern const WCHAR * const PVDR_CLASS_MOUNTPOINT;
  112. extern const WCHAR * const PVDR_CLASS_VOLUME;
  113. extern const WCHAR * const PVDR_CLASS_VOLUMEQUOTA;
  114. extern const WCHAR * const PVDR_CLASS_VOLUMEUSERQUOTA;
  115. extern const WCHAR * const PVDR_CLASS_QUOTASETTING;
  116. extern const WCHAR * const PVDR_CLASS_ACCOUNT;
  117. //
  118. // Methods
  119. //
  120. extern const WCHAR * const PVDR_MTHD_ADDMOUNTPOINT;
  121. extern const WCHAR * const PVDR_MTHD_DEFRAG;
  122. extern const WCHAR * const PVDR_MTHD_DEFRAGANALYSIS;
  123. extern const WCHAR * const PVDR_MTHD_DISMOUNT;
  124. extern const WCHAR * const PVDR_MTHD_FORMAT;
  125. extern const WCHAR * const PVDR_MTHD_MOUNT;
  126. extern const WCHAR * const PVDR_MTHD_CHKDSK;
  127. extern const WCHAR * const PVDR_MTHD_SCHEDULECHK;
  128. extern const WCHAR * const PVDR_MTHD_EXCLUDECHK;
  129. //
  130. // Properties
  131. //
  132. // Volume properties
  133. extern const WCHAR * const PVDR_PROP_BLOCKSIZE;
  134. extern const WCHAR * const PVDR_PROP_BOOTVOLUME;
  135. extern const WCHAR * const PVDR_PROP_CAPACITY;
  136. extern const WCHAR * const PVDR_PROP_CAPTION;
  137. extern const WCHAR * const PVDR_PROP_COMPRESSED;
  138. extern const WCHAR * const PVDR_PROP_CRASHDUMP;
  139. extern const WCHAR * const PVDR_PROP_DESCRIPTION;
  140. extern const WCHAR * const PVDR_PROP_DEVICEID;
  141. extern const WCHAR * const PVDR_PROP_DIRECTORY;
  142. extern const WCHAR * const PVDR_PROP_DIRTYBITSET;
  143. extern const WCHAR * const PVDR_PROP_DRIVELETTER;
  144. extern const WCHAR * const PVDR_PROP_DRIVETYPE;
  145. extern const WCHAR * const PVDR_PROP_FILESYSTEM;
  146. extern const WCHAR * const PVDR_PROP_FREESPACE;
  147. extern const WCHAR * const PVDR_PROP_INDEXINGENABLED;
  148. extern const WCHAR * const PVDR_PROP_ISDIRTY;
  149. extern const WCHAR * const PVDR_PROP_LABEL;
  150. extern const WCHAR * const PVDR_PROP_MAXIMUMFILENAMELENGTH;
  151. extern const WCHAR * const PVDR_PROP_MOUNTABLE;
  152. extern const WCHAR * const PVDR_PROP_MOUNTED;
  153. extern const WCHAR * const PVDR_PROP_NAME;
  154. extern const WCHAR * const PVDR_PROP_PAGEFILE;
  155. extern const WCHAR * const PVDR_PROP_QUOTASENABLED;
  156. extern const WCHAR * const PVDR_PROP_QUOTASINCOMPLETE;
  157. extern const WCHAR * const PVDR_PROP_QUOTASREBUILDING;
  158. extern const WCHAR * const PVDR_PROP_SERIALNUMBER;
  159. extern const WCHAR * const PVDR_PROP_SUPPORTSDISKQUOTAS;
  160. extern const WCHAR * const PVDR_PROP_SUPPORTSFILEBASEDCOMPRESSION;
  161. extern const WCHAR * const PVDR_PROP_SYSTEMNAME;
  162. extern const WCHAR * const PVDR_PROP_SYSTEMVOLUME;
  163. extern const WCHAR * const PVDR_PROP_VOLUME;
  164. // Defrag properties
  165. extern const WCHAR * const PVDR_PROP_DEFRAGANALYSIS;
  166. extern const WCHAR * const PVDR_PROP_DEFRAGRECOMMENDED;
  167. extern const WCHAR * const PVDR_PROP_VOLUMESIZE;
  168. extern const WCHAR * const PVDR_PROP_CLUSTERSIZE;
  169. extern const WCHAR * const PVDR_PROP_USEDSPACE;
  170. extern const WCHAR * const PVDR_PROP_FRAGFREEPCT;
  171. extern const WCHAR * const PVDR_PROP_FRAGTOTALPCT;
  172. extern const WCHAR * const PVDR_PROP_FILESFRAGPCT;
  173. extern const WCHAR * const PVDR_PROP_FREEFRAGPCT;
  174. extern const WCHAR * const PVDR_PROP_FILESTOTAL;
  175. extern const WCHAR * const PVDR_PROP_FILESIZEAVG;
  176. extern const WCHAR * const PVDR_PROP_FILESFRAGTOTAL;
  177. extern const WCHAR * const PVDR_PROP_EXCESSFRAGTOTAL;
  178. extern const WCHAR * const PVDR_PROP_FILESFRAGAVG;
  179. extern const WCHAR * const PVDR_PROP_PAGEFILESIZE;
  180. extern const WCHAR * const PVDR_PROP_PAGEFILEFRAG;
  181. extern const WCHAR * const PVDR_PROP_FOLDERSTOTAL;
  182. extern const WCHAR * const PVDR_PROP_FOLDERSFRAG;
  183. extern const WCHAR * const PVDR_PROP_FOLDERSFRAGEXCESS;
  184. extern const WCHAR * const PVDR_PROP_MFTSIZE;
  185. extern const WCHAR * const PVDR_PROP_MFTRECORDS;
  186. extern const WCHAR * const PVDR_PROP_MFTINUSEPCT;
  187. extern const WCHAR * const PVDR_PROP_MFTFRAGTOTAL;
  188. // Others
  189. extern const WCHAR * const PVDR_PROP_PERMANENT;
  190. extern const WCHAR * const PVDR_PROP_FORCE;
  191. extern const WCHAR * const PVDR_PROP_SETTING;
  192. extern const WCHAR * const PVDR_PROP_VOLUMEPATH;
  193. extern const WCHAR * const PVDR_PROP_ACCOUNT;
  194. extern const WCHAR * const PVDR_PROP_DOMAIN;
  195. extern const WCHAR * const PVDR_PROP_DISKSPACEUSED;
  196. extern const WCHAR * const PVDR_PROP_LIMIT;
  197. extern const WCHAR * const PVDR_PROP_STATUS;
  198. extern const WCHAR * const PVDR_PROP_WARNINGLIMIT;
  199. extern const WCHAR * const PVDR_PROP_FIXERRORS;
  200. extern const WCHAR * const PVDR_PROP_VIGOROUSINDEXCHECK;
  201. extern const WCHAR * const PVDR_PROP_SKIPFOLDERCYCLE;
  202. extern const WCHAR * const PVDR_PROP_FORCEDISMOUNT;
  203. extern const WCHAR * const PVDR_PROP_RECOVERBADSECTORS;
  204. extern const WCHAR * const PVDR_PROP_OKTORUNATBOOTUP;
  205. extern const WCHAR * const PVDR_PROP_CHKONLYIFDIRTY;
  206. extern const WCHAR * const PVDR_PROP_QUICKFORMAT;
  207. extern const WCHAR * const PVDR_PROP_ENABLECOMPRESSION;
  208. // Message Id: MSG_ERROR_DRIVELETTER_UNAVAIL
  209. //
  210. // Message Text:
  211. //
  212. // The drive letter is unavailable until reboot.
  213. //
  214. const HRESULT VDSWMI_E_DRIVELETTER_UNAVAIL = 0x80044500L;
  215. // Message Id: MSG_ERROR_DRIVELETTER_IN_USE
  216. //
  217. // Message Text:
  218. //
  219. // The drive letter is assigned to another volume.
  220. //
  221. const HRESULT VDSWMI_E_DRIVELETTER_IN_USE = 0x80044501L;
  222. // Message Id: MSG_ERROR_DRIVELETTER_CANT_DELETE
  223. //
  224. // Message Text:
  225. //
  226. // Drive letter deletion not supported for boot, system and pagefile volumes.
  227. //
  228. const HRESULT VDSWMI_E_DRIVELETTER_CANT_DELETE = 0x80044502L;