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.

188 lines
6.7 KiB

  1. /*++
  2. Copyright (c) 1990 Microsoft Corporation
  3. Module Name:
  4. ifsentry.hxx
  5. Abstract:
  6. Contains prototypes for entry points to the IFS
  7. utility DLLs.
  8. Environment:
  9. User Mode
  10. --*/
  11. #if !defined ( _IFS_ENTRY_ )
  12. #define _IFS_ENTRY_
  13. #if !defined(_IFS_SERV_)
  14. //
  15. // Internal definitions for Flags field in CHKDSKEX_FN_PARAM
  16. //
  17. #define CHKDSK_RECOVER_FREE_SPACE 0x00000002UL
  18. #define CHKDSK_RECOVER_ALLOC_SPACE 0x00000004UL
  19. //
  20. // External definitions for Flags field in CHKDSKEX_FN_PARAM
  21. //
  22. // CHKDSK_VERBOSE
  23. // - For FAT, chkdsk will print every filename being processed
  24. // - For NTFS, chkdsk will print clean up messages
  25. // CHKDSK_RECOVER
  26. // - Perform sector checking on free and allocated space
  27. // CHKDSK_EXTEND
  28. // - For NTFS, chkdsk will extend a volume
  29. // CHKDSK_DOWNGRADE (for NT 5 or later but obsolete anyway)
  30. // - For NTFS, this downgrade a volume from most recent NTFS version
  31. // CHKDSK_ENABLE_UPGRADE (for NT 5 or later but obsolete anyway)
  32. // - For NTFS, this upgrades a volume to most recent NTFS version
  33. // CHKDSK_RESIZE_LOGFILE
  34. // - For NTFS, this changes the size of the logfile
  35. // CHKDSK_CHECK_IF_DIRTY
  36. // - Perform consistency check only if the volume is dirty
  37. // CHKDSK_FORCE
  38. // - Forces the volume to dismount first if necessary (implies /F)
  39. // CHKDSK_SKIP_INDEX_SCAN
  40. // - Skip the scanning of each index entry
  41. // CHKDSK_SKIP_CYCLE_SCAN
  42. // - Skip the checking of cycles within the directory tree
  43. #define CHKDSK_VERBOSE 0x00000001UL
  44. #define CHKDSK_RECOVER (CHKDSK_RECOVER_FREE_SPACE | \
  45. CHKDSK_RECOVER_ALLOC_SPACE)
  46. #define CHKDSK_EXTEND 0x00000008UL
  47. #define CHKDSK_DOWNGRADE 0x00000010UL
  48. #define CHKDSK_ENABLE_UPGRADE 0x00000020UL
  49. #define CHKDSK_RESIZE_LOGFILE 0x00000040UL
  50. #define CHKDSK_CHECK_IF_DIRTY 0x00000080UL
  51. #define CHKDSK_FORCE 0x00000100UL
  52. #define CHKDSK_SKIP_INDEX_SCAN 0x00000200UL
  53. #define CHKDSK_SKIP_CYCLE_SCAN 0x00000400UL
  54. typedef struct _CHKDSKEX_FN_PARAM {
  55. UCHAR Major; // initial version is 1.0
  56. UCHAR Minor;
  57. ULONG Flags;
  58. ULONG LogFileSize;
  59. PPATH PathToCheck; // path including mount points
  60. PPATH RootPath; // path from the root of the actual drive
  61. } CHKDSKEX_FN_PARAM, *PCHKDSKEX_FN_PARAM;
  62. //
  63. // External definitions for Flags field in FORMATEX_FN_PARAM
  64. //
  65. #define FORMAT_QUICK 0x00000001UL
  66. #define FORMAT_BACKWARD_COMPATIBLE 0x00000002UL
  67. #define FORMAT_FORCE 0x00000004UL
  68. // FORMAT_QUICK
  69. // - Performs a quick format
  70. // FORMAT_BACKWARD_COMPATIBLE
  71. // - Formats a volume to be backward compatible to an older version of NTFS volume
  72. // FORMAT_FORCE
  73. // - Forces the volume to dismount first if necessary
  74. typedef struct _FORMATEX_FN_PARAM {
  75. UCHAR Major; // initial version is 1.0
  76. UCHAR Minor;
  77. ULONG Flags;
  78. PCWSTRING LabelString; // supplies the volume's label
  79. ULONG ClusterSize; // supplies the cluster size for the volume
  80. } FORMATEX_FN_PARAM, *PFORMATEX_FN_PARAM;
  81. #endif // _IFS_SERV_
  82. #if ( defined( _AUTOCHECK_ ) || defined( _EFICHECK_ ) ) && !defined( _SETUP_LOADER_ )
  83. #define FAR
  84. #define WINAPI __stdcall
  85. #define APIENTRY WINAPI
  86. #endif // _AUTOCHECK_ || _SETUP_LOADER_
  87. typedef BOOLEAN(FAR APIENTRY * CHKDSK_FN)( PCWSTRING DriveName,
  88. PMESSAGE Message,
  89. BOOLEAN Fix,
  90. BOOLEAN Verbose,
  91. BOOLEAN OnlyIfDirty,
  92. BOOLEAN Recover,
  93. PPATH PathToCheck,
  94. BOOLEAN Extend,
  95. BOOLEAN ResizeLogFile,
  96. ULONG LogFileSize,
  97. PULONG ExitStatus);
  98. typedef BOOLEAN(FAR APIENTRY * CHKDSKEX_FN)( PCWSTRING DriveName,
  99. PMESSAGE Message,
  100. BOOLEAN Fix,
  101. PCHKDSKEX_FN_PARAM Param,
  102. PULONG ExitStatus );
  103. typedef BOOLEAN(FAR APIENTRY * FORMAT_FN)( PCWSTRING,
  104. PMESSAGE,
  105. BOOLEAN,
  106. BOOLEAN,
  107. MEDIA_TYPE,
  108. PCWSTRING,
  109. ULONG );
  110. typedef BOOLEAN(FAR APIENTRY * FORMATEX_FN)( PCWSTRING,
  111. PMESSAGE,
  112. PFORMATEX_FN_PARAM,
  113. MEDIA_TYPE );
  114. typedef BOOLEAN(FAR APIENTRY * RECOVER_FN)( PPATH, PMESSAGE );
  115. typedef BOOLEAN (FAR APIENTRY * EXTEND_FN)(PCWSTRING, PMESSAGE, BOOLEAN Verify);
  116. #if !defined(_IFS_SERV_)
  117. //
  118. // Convert status code
  119. //
  120. typedef enum _CONVERT_STATUS {
  121. CONVERT_STATUS_CONVERTED,
  122. CONVERT_STATUS_INVALID_FILESYSTEM,
  123. CONVERT_STATUS_CONVERSION_NOT_AVAILABLE,
  124. CONVERT_STATUS_CANNOT_LOCK_DRIVE,
  125. CONVERT_STATUS_ERROR,
  126. CONVERT_STATUS_INSUFFICIENT_SPACE,
  127. CONVERT_STATUS_NTFS_RESERVED_NAMES,
  128. CONVERT_STATUS_DRIVE_IS_DIRTY,
  129. CONVERT_STATUS_INSUFFICIENT_FREE_SPACE
  130. } CONVERT_STATUS, *PCONVERT_STATUS;
  131. #endif // _IFS_SERV_
  132. typedef BOOLEAN(FAR APIENTRY * CONVERT_FN)( PCWSTRING,
  133. PCWSTRING,
  134. PMESSAGE,
  135. BOOLEAN,
  136. BOOLEAN,
  137. PCONVERT_STATUS );
  138. typedef BOOLEAN (FAR APIENTRY * CHECKSPACE_FN)(
  139. PCWSTRING,
  140. PCWSTRING,
  141. PMESSAGE,
  142. BOOLEAN,
  143. BOOLEAN,
  144. BOOLEAN );
  145. typedef BOOLEAN(FAR APIENTRY * NAMETABLE_FN)( PCWSTRING,
  146. PCWSTRING,
  147. PMESSAGE );
  148. #endif // _IFS_ENTRY_