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.

274 lines
9.0 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. ntddft2.h
  5. Abstract:
  6. This header file defines new IOCTLs for the FTDISK driver to support
  7. the new FT API.
  8. Author:
  9. Norbert Kusters 13-July-1996
  10. Notes:
  11. Revision History:
  12. --*/
  13. #ifndef _NTDDFT2_
  14. #define _NTDDFT2_
  15. #if _MSC_VER > 1000
  16. #pragma once
  17. #endif
  18. #include <fttypes.h>
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. //
  23. // The name of the control device for the FT disk driver.
  24. //
  25. #define DD_FT_CONTROL_DEVICE_NAME L"\\Device\\FtControl"
  26. #define DD_DOS_FT_CONTROL_NAME L"\\\\.\\FtControl"
  27. //
  28. // Control codes handled by the 'FtControl' device.
  29. //
  30. #define FTCONTROLTYPE ((ULONG) 'g')
  31. #define FT_CREATE_LOGICAL_DISK CTL_CODE(FTCONTROLTYPE, 0, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
  32. #define FT_BREAK_LOGICAL_DISK CTL_CODE(FTCONTROLTYPE, 1, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
  33. #define FT_ENUMERATE_LOGICAL_DISKS CTL_CODE(FTCONTROLTYPE, 2, METHOD_BUFFERED, FILE_READ_ACCESS)
  34. #define FT_QUERY_LOGICAL_DISK_INFORMATION CTL_CODE(FTCONTROLTYPE, 3, METHOD_BUFFERED, FILE_READ_ACCESS)
  35. #define FT_ORPHAN_LOGICAL_DISK_MEMBER CTL_CODE(FTCONTROLTYPE, 4, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
  36. #define FT_REPLACE_LOGICAL_DISK_MEMBER CTL_CODE(FTCONTROLTYPE, 5, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
  37. #define FT_QUERY_NT_DEVICE_NAME_FOR_LOGICAL_DISK CTL_CODE(FTCONTROLTYPE, 6, METHOD_BUFFERED, FILE_READ_ACCESS)
  38. #define FT_INITIALIZE_LOGICAL_DISK CTL_CODE(FTCONTROLTYPE, 7, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
  39. #define FT_QUERY_DRIVE_LETTER_FOR_LOGICAL_DISK CTL_CODE(FTCONTROLTYPE, 8, METHOD_BUFFERED, FILE_READ_ACCESS)
  40. #define FT_CHECK_IO CTL_CODE(FTCONTROLTYPE, 9, METHOD_BUFFERED, FILE_READ_ACCESS)
  41. #define FT_SET_DRIVE_LETTER_FOR_LOGICAL_DISK CTL_CODE(FTCONTROLTYPE, 10, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
  42. #define FT_QUERY_NT_DEVICE_NAME_FOR_PARTITION CTL_CODE(FTCONTROLTYPE, 12, METHOD_BUFFERED, FILE_READ_ACCESS)
  43. #define FT_CHANGE_NOTIFY CTL_CODE(FTCONTROLTYPE, 13, METHOD_BUFFERED, FILE_READ_ACCESS)
  44. #define FT_STOP_SYNC_OPERATIONS CTL_CODE(FTCONTROLTYPE, 14, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
  45. //
  46. // Control codes handles by FT logical disks.
  47. //
  48. #define FT_QUERY_LOGICAL_DISK_ID CTL_CODE(FTCONTROLTYPE, 100, METHOD_BUFFERED, FILE_READ_ACCESS)
  49. #define FT_CREATE_PARTITION_LOGICAL_DISK CTL_CODE(FTCONTROLTYPE, 101, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
  50. //
  51. // Input parameter for FT_CREATE_LOGICAL_DISK.
  52. //
  53. typedef struct _FT_CREATE_LOGICAL_DISK_INPUT {
  54. FT_LOGICAL_DISK_TYPE LogicalDiskType;
  55. USHORT NumberOfMembers;
  56. USHORT ConfigurationInformationSize;
  57. FT_LOGICAL_DISK_ID MemberArray[1];
  58. } FT_CREATE_LOGICAL_DISK_INPUT, *PFT_CREATE_LOGICAL_DISK_INPUT;
  59. //
  60. // Output parameter for FT_CREATE_LOGICAL_DISK.
  61. //
  62. typedef struct _FT_CREATE_LOGICAL_DISK_OUTPUT {
  63. FT_LOGICAL_DISK_ID NewLogicalDiskId;
  64. } FT_CREATE_LOGICAL_DISK_OUTPUT, *PFT_CREATE_LOGICAL_DISK_OUTPUT;
  65. //
  66. // Input parameter for FT_BREAK_LOGICAL_DISK.
  67. //
  68. typedef struct _FT_BREAK_LOGICAL_DISK_INPUT {
  69. FT_LOGICAL_DISK_ID RootLogicalDiskId;
  70. } FT_BREAK_LOGICAL_DISK_INPUT, *PFT_BREAK_LOGICAL_DISK_INPUT;
  71. //
  72. // Output parameter for FT_ENUMERATE_LOGICAL_DISKS.
  73. //
  74. typedef struct _FT_ENUMERATE_LOGICAL_DISKS_OUTPUT {
  75. ULONG NumberOfRootLogicalDisks;
  76. ULONG Reserved;
  77. FT_LOGICAL_DISK_ID RootLogicalDiskIds[1];
  78. } FT_ENUMERATE_LOGICAL_DISKS_OUTPUT, *PFT_ENUMERATE_LOGICAL_DISKS_OUTPUT;
  79. //
  80. // Input parameter for FT_QUERY_LOGICAL_DISK_INFORMATION.
  81. //
  82. typedef struct _FT_QUERY_LOGICAL_DISK_INFORMATION_INPUT {
  83. FT_LOGICAL_DISK_ID LogicalDiskId;
  84. } FT_QUERY_LOGICAL_DISK_INFORMATION_INPUT, *PFT_QUERY_LOGICAL_DISK_INFORMATION_INPUT;
  85. //
  86. // Output parameter for FT_QUERY_LOGICAL_DISK_INFORMATION.
  87. //
  88. typedef struct _FT_QUERY_LOGICAL_DISK_INFORMATION_OUTPUT {
  89. FT_LOGICAL_DISK_TYPE LogicalDiskType;
  90. LONGLONG VolumeSize;
  91. USHORT NumberOfMembers;
  92. USHORT ConfigurationInformationSize;
  93. USHORT StateInformationSize;
  94. USHORT Reserved;
  95. FT_LOGICAL_DISK_ID MemberArray[1];
  96. } FT_QUERY_LOGICAL_DISK_INFORMATION_OUTPUT, *PFT_QUERY_LOGICAL_DISK_INFORMATION_OUTPUT;
  97. //
  98. // Input parameter for FT_ORPHAN_LOGICAL_DISK_MEMBER.
  99. //
  100. typedef struct _FT_ORPHAN_LOGICAL_DISK_MEMBER_INPUT {
  101. FT_LOGICAL_DISK_ID LogicalDiskId;
  102. USHORT MemberNumberToOrphan;
  103. USHORT Reserved[3];
  104. } FT_ORPHAN_LOGICAL_DISK_MEMBER_INPUT, *PFT_ORPHAN_LOGICAL_DISK_MEMBER_INPUT;
  105. //
  106. // Input parameter for FT_REPLACE_LOGICAL_DISK_MEMBER.
  107. //
  108. typedef struct _FT_REPLACE_LOGICAL_DISK_MEMBER_INPUT {
  109. FT_LOGICAL_DISK_ID LogicalDiskId;
  110. USHORT MemberNumberToReplace;
  111. USHORT Reserved[3];
  112. FT_LOGICAL_DISK_ID NewMemberLogicalDiskId;
  113. } FT_REPLACE_LOGICAL_DISK_MEMBER_INPUT, *PFT_REPLACE_LOGICAL_DISK_MEMBER_INPUT;
  114. //
  115. // Output parameter for FT_REPLACE_LOGICAL_DISK_MEMBER.
  116. //
  117. typedef struct _FT_REPLACE_LOGICAL_DISK_MEMBER_OUTPUT {
  118. FT_LOGICAL_DISK_ID NewLogicalDiskId;
  119. } FT_REPLACE_LOGICAL_DISK_MEMBER_OUTPUT, *PFT_REPLACE_LOGICAL_DISK_MEMBER_OUTPUT;
  120. //
  121. // Input parameter for FT_QUERY_NT_DEVICE_NAME_FOR_LOGICAL_DISK.
  122. //
  123. typedef struct _FT_QUERY_NT_DEVICE_NAME_FOR_LOGICAL_DISK_INPUT {
  124. FT_LOGICAL_DISK_ID RootLogicalDiskId;
  125. } FT_QUERY_NT_DEVICE_NAME_FOR_LOGICAL_DISK_INPUT, *PFT_QUERY_NT_DEVICE_NAME_FOR_LOGICAL_DISK_INPUT;
  126. //
  127. // Output parameter for FT_QUERY_NT_DEVICE_NAME_FOR_LOGICAL_DISK.
  128. //
  129. typedef struct _FT_QUERY_NT_DEVICE_NAME_FOR_LOGICAL_DISK_OUTPUT {
  130. USHORT NumberOfCharactersInNtDeviceName;
  131. WCHAR NtDeviceName[1];
  132. } FT_QUERY_NT_DEVICE_NAME_FOR_LOGICAL_DISK_OUTPUT, *PFT_QUERY_NT_DEVICE_NAME_FOR_LOGICAL_DISK_OUTPUT;
  133. //
  134. // Input parameter for FT_INITIALIZE_LOGICAL_DISK.
  135. //
  136. typedef struct _FT_INITIALIZE_LOGICAL_DISK_INPUT {
  137. FT_LOGICAL_DISK_ID RootLogicalDiskId;
  138. BOOLEAN RegenerateOrphans;
  139. } FT_INITIALIZE_LOGICAL_DISK_INPUT, *PFT_INITIALIZE_LOGICAL_DISK_INPUT;
  140. //
  141. // Input parameter for FT_QUERY_DRIVE_LETTER_FOR_LOGICAL_DISK.
  142. //
  143. typedef struct _FT_QUERY_DRIVE_LETTER_FOR_LOGICAL_DISK_INPUT {
  144. FT_LOGICAL_DISK_ID RootLogicalDiskId;
  145. } FT_QUERY_DRIVE_LETTER_FOR_LOGICAL_DISK_INPUT, *PFT_QUERY_DRIVE_LETTER_FOR_LOGICAL_DISK_INPUT;
  146. //
  147. // Output parameter for FT_QUERY_DRIVE_LETTER_FOR_LOGICAL_DISK.
  148. //
  149. typedef struct _FT_QUERY_DRIVE_LETTER_FOR_LOGICAL_DISK_OUTPUT {
  150. UCHAR DriveLetter;
  151. } FT_QUERY_DRIVE_LETTER_FOR_LOGICAL_DISK_OUTPUT, *PFT_QUERY_DRIVE_LETTER_FOR_LOGICAL_DISK_OUTPUT;
  152. //
  153. // Input parameter for FT_CHECK_IO.
  154. //
  155. typedef struct _FT_CHECK_IO_INPUT {
  156. FT_LOGICAL_DISK_ID LogicalDiskId;
  157. } FT_CHECK_IO_INPUT, *PFT_CHECK_IO_INPUT;
  158. //
  159. // Output parameter for FT_CHECK_IO.
  160. //
  161. typedef struct _FT_CHECK_IO_OUTPUT {
  162. BOOLEAN IsIoOk;
  163. } FT_CHECK_IO_OUTPUT, *PFT_CHECK_IO_OUTPUT;
  164. //
  165. // Input parameter for FT_SET_DRIVE_LETTER_FOR_LOGICAL_DISK.
  166. //
  167. typedef struct _FT_SET_DRIVE_LETTER_FOR_LOGICAL_DISK_INPUT {
  168. FT_LOGICAL_DISK_ID RootLogicalDiskId;
  169. UCHAR DriveLetter;
  170. } FT_SET_DRIVE_LETTER_FOR_LOGICAL_DISK_INPUT, *PFT_SET_DRIVE_LETTER_FOR_LOGICAL_DISK_INPUT;
  171. //
  172. // Input parameter for FT_QUERY_NT_DEVICE_NAME_FOR_PARTITION.
  173. //
  174. typedef struct _FT_QUERY_NT_DEVICE_NAME_FOR_PARTITION_INPUT {
  175. ULONG Signature;
  176. ULONG Reserved;
  177. LONGLONG Offset;
  178. } FT_QUERY_NT_DEVICE_NAME_FOR_PARTITION_INPUT, *PFT_QUERY_NT_DEVICE_NAME_FOR_PARTITION_INPUT;
  179. //
  180. // Output parameter for FT_QUERY_NT_DEVICE_NAME_FOR_PARTITION.
  181. //
  182. typedef struct _FT_QUERY_NT_DEVICE_NAME_FOR_PARTITION_OUTPUT {
  183. USHORT NumberOfCharactersInNtDeviceName;
  184. WCHAR NtDeviceName[1];
  185. } FT_QUERY_NT_DEVICE_NAME_FOR_PARTITION_OUTPUT, *PFT_QUERY_NT_DEVICE_NAME_FOR_PARTITION_OUTPUT;
  186. //
  187. // Input parameter for FT_STOP_SYNC_OPERATIONS.
  188. //
  189. typedef struct _FT_STOP_SYNC_OPERATIONS_INPUT {
  190. FT_LOGICAL_DISK_ID RootLogicalDiskId;
  191. } FT_STOP_SYNC_OPERATIONS_INPUT, *PFT_STOP_SYNC_OPERATIONS_INPUT;
  192. //
  193. // Output parameter for FT_QUERY_LOGICAL_DISK_ID.
  194. //
  195. typedef struct _FT_QUERY_LOGICAL_DISK_ID_OUTPUT {
  196. FT_LOGICAL_DISK_ID RootLogicalDiskId;
  197. } FT_QUERY_LOGICAL_DISK_ID_OUTPUT, *PFT_QUERY_LOGICAL_DISK_ID_OUTPUT;
  198. //
  199. // Output parameter for FT_CREATE_PARTITION_LOGICAL_DISK.
  200. //
  201. typedef struct _FT_CREATE_PARTITION_LOGICAL_DISK_OUTPUT {
  202. FT_LOGICAL_DISK_ID NewLogicalDiskId;
  203. } FT_CREATE_PARTITION_LOGICAL_DISK_OUTPUT, *PFT_CREATE_PARTITION_LOGICAL_DISK_OUTPUT;
  204. #ifdef __cplusplus
  205. }
  206. #endif
  207. #endif // _NTDDFT2_