Source code of Windows XP (NT5)
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.

260 lines
5.6 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. ifssys.hxx
  5. Abstract:
  6. This module contains the definition for the IFS_SYSTEM class.
  7. The IFS_SYSTEM class is an abstract class which offers an
  8. interface for communicating with the underlying operating system
  9. on specific IFS issues.
  10. --*/
  11. #if ! defined( _IFS_SYSTEM_ )
  12. #define _IFS_SYSTEM_
  13. #include "drive.hxx"
  14. #if defined ( _AUTOCHECK_ ) || defined( _EFICHECK_ )
  15. #define IFSUTIL_EXPORT
  16. #elif defined ( _IFSUTIL_MEMBER_ )
  17. #define IFSUTIL_EXPORT __declspec(dllexport)
  18. #else
  19. #define IFSUTIL_EXPORT __declspec(dllimport)
  20. #endif
  21. DECLARE_CLASS( CANNED_SECURITY );
  22. DECLARE_CLASS( WSTRING );
  23. DECLARE_CLASS( BIG_INT );
  24. DECLARE_CLASS( IFS_SYSTEM );
  25. class IFS_SYSTEM {
  26. public:
  27. STATIC
  28. IFSUTIL_EXPORT
  29. BOOLEAN
  30. QueryNtfsVersion(
  31. OUT PUCHAR Major,
  32. OUT PUCHAR Minor,
  33. IN PLOG_IO_DP_DRIVE Drive,
  34. IN PVOID BootSectorData
  35. );
  36. STATIC
  37. IFSUTIL_EXPORT
  38. BOOLEAN
  39. QueryFileSystemName(
  40. IN PCWSTRING NtDriveName,
  41. OUT PWSTRING FileSystemName,
  42. OUT PNTSTATUS ErrorCode DEFAULT NULL,
  43. OUT PWSTRING FileSystemNameAndVersion DEFAULT NULL
  44. );
  45. STATIC
  46. IFSUTIL_EXPORT
  47. BOOLEAN
  48. DosDriveNameToNtDriveName(
  49. IN PCWSTRING DosDriveName,
  50. OUT PWSTRING NtDriveName
  51. );
  52. STATIC
  53. IFSUTIL_EXPORT
  54. BOOLEAN
  55. NtDriveNameToDosDriveName(
  56. IN PCWSTRING NtDriveName,
  57. OUT PWSTRING DosDriveName
  58. );
  59. STATIC
  60. IFSUTIL_EXPORT
  61. BOOLEAN
  62. QueryFreeDiskSpace(
  63. IN PCWSTRING DosDriveName,
  64. OUT PBIG_INT BytesFree
  65. );
  66. STATIC
  67. IFSUTIL_EXPORT
  68. VOID
  69. QueryNtfsTime(
  70. OUT PLARGE_INTEGER NtfsTime
  71. );
  72. STATIC
  73. VOID
  74. Reboot(
  75. IN BOOLEAN PowerOff DEFAULT FALSE
  76. );
  77. STATIC
  78. IFSUTIL_EXPORT
  79. PCANNED_SECURITY
  80. GetCannedSecurity(
  81. );
  82. STATIC
  83. IFSUTIL_EXPORT
  84. BOOLEAN
  85. EnableFileSystem(
  86. IN PCWSTRING FileSystemName
  87. );
  88. STATIC
  89. IFSUTIL_EXPORT
  90. BOOLEAN
  91. IsFileSystemEnabled(
  92. IN PCWSTRING FileSystemName,
  93. OUT PBOOLEAN Error DEFAULT NULL
  94. );
  95. STATIC
  96. IFSUTIL_EXPORT
  97. ULONG
  98. QueryPageSize(
  99. );
  100. STATIC
  101. IFSUTIL_EXPORT
  102. BOOLEAN
  103. QueryCanonicalNtDriveName(
  104. IN PCWSTRING NtDriveName,
  105. OUT PWSTRING CanonicalNtDriveName
  106. );
  107. STATIC
  108. BOOLEAN
  109. QueryNtSystemDriveName(
  110. OUT PWSTRING NtSystemDriveName
  111. );
  112. STATIC
  113. BOOLEAN
  114. QuerySystemEnvironmentVariableValue(
  115. IN PWSTRING VariableName,
  116. IN ULONG ValueBufferLength,
  117. OUT PVOID ValueBuffer,
  118. OUT PUSHORT ValueLength
  119. );
  120. STATIC
  121. IFSUTIL_EXPORT
  122. BOOLEAN
  123. IsArcSystemPartition(
  124. IN PCWSTRING NtDriveName,
  125. OUT PBOOLEAN Error
  126. );
  127. STATIC
  128. BOOLEAN
  129. IsThisFat(
  130. IN BIG_INT Sectors,
  131. IN PVOID BootSectorData
  132. );
  133. STATIC
  134. BOOLEAN
  135. IsThisFat32(
  136. IN BIG_INT Sectors,
  137. IN PVOID BootSectorData
  138. );
  139. STATIC
  140. BOOLEAN
  141. IsThisHpfs(
  142. IN BIG_INT Sectors,
  143. IN PVOID BootSectorData,
  144. IN PULONG SuperBlock,
  145. IN PULONG SpareBlock
  146. );
  147. STATIC
  148. IFSUTIL_EXPORT
  149. BOOLEAN
  150. IsThisNtfs(
  151. IN BIG_INT Sectors,
  152. IN ULONG SectorSize,
  153. IN PVOID BootSectorData
  154. );
  155. STATIC
  156. IFSUTIL_EXPORT
  157. BOOLEAN
  158. FileSetAttributes(
  159. IN PCWSTRING FileName,
  160. IN ULONG NewFileAttributes,
  161. OUT PULONG OldAttributes
  162. );
  163. STATIC
  164. BOOLEAN
  165. FileSetAttributes(
  166. IN HANDLE FileHandle,
  167. IN ULONG NewFileAttributes,
  168. OUT PULONG OldAttributes
  169. );
  170. STATIC
  171. IFSUTIL_EXPORT
  172. BOOLEAN
  173. WriteToFile(
  174. IN PCWSTRING QualifiedFileName,
  175. IN PVOID Data,
  176. IN ULONG DataLength,
  177. IN BOOLEAN Append
  178. );
  179. STATIC
  180. IFSUTIL_EXPORT
  181. BOOLEAN
  182. EnableVolumeCompression(
  183. IN PCWSTRING NtDriveName
  184. );
  185. STATIC
  186. IFSUTIL_EXPORT
  187. BOOLEAN
  188. EnableVolumeUpgrade(
  189. IN PCWSTRING NtDriveName
  190. );
  191. STATIC
  192. IFSUTIL_EXPORT
  193. BOOLEAN
  194. DismountVolume(
  195. IN PCWSTRING NtDriveName
  196. );
  197. STATIC
  198. IFSUTIL_EXPORT
  199. BOOLEAN
  200. CheckValidSecurityDescriptor(
  201. IN ULONG Length,
  202. IN PISECURITY_DESCRIPTOR_RELATIVE SecurityDescriptor
  203. );
  204. STATIC
  205. IFSUTIL_EXPORT
  206. BOOLEAN
  207. IsVolumeDirty(
  208. IN PWSTRING NtDriveName,
  209. OUT PBOOLEAN Result
  210. );
  211. private:
  212. STATIC PCANNED_SECURITY _CannedSecurity;
  213. };
  214. #endif // _IFS_SYSTEM_