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.

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