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.

221 lines
5.0 KiB

  1. /*++
  2. Copyright (c) 1996-1999 Microsoft Corporation
  3. Module Name:
  4. ftapi.h
  5. Abstract:
  6. This header file defines the FT API to be used as the interface to
  7. user mode programs for creating and administering FT sets.
  8. Author:
  9. Norbert Kusters 13-July-1996
  10. Notes:
  11. Revision History:
  12. --*/
  13. #ifndef __FTAPI_H__
  14. #define __FRAPI_H__
  15. #if _MSC_VER > 1000
  16. #pragma once
  17. #endif
  18. #include <fttypes.h>
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. typedef int BOOL;
  23. typedef BOOL *PBOOL;
  24. //
  25. // This API creates a logical disk id for a given partition.
  26. //
  27. BOOL
  28. FtCreatePartitionLogicalDisk(
  29. IN HANDLE PartitionHandle,
  30. OUT PFT_LOGICAL_DISK_ID NewLogicalDiskId
  31. );
  32. //
  33. // The create logical disk API is used to construct a new logical disk.
  34. //
  35. BOOL
  36. FtCreateLogicalDisk(
  37. IN FT_LOGICAL_DISK_TYPE LogicalDiskType,
  38. IN USHORT NumberOfMembers,
  39. IN PFT_LOGICAL_DISK_ID RootLogicalDiskIds,
  40. IN USHORT ConfigurationInformationSize,
  41. IN PVOID ConfigurationInformation,
  42. OUT PFT_LOGICAL_DISK_ID NewLogicalDiskId
  43. );
  44. //
  45. // The initialize logical disk API triggers the initialization of a new
  46. // logical disk. This API is separate from the create logical disk API
  47. // so that complex logical disks may be constructed and put together before
  48. // starting initialization.
  49. //
  50. BOOL
  51. FtInitializeLogicalDisk(
  52. IN FT_LOGICAL_DISK_ID RootLogicalDiskId,
  53. IN BOOL RegenerateOrphans
  54. );
  55. //
  56. // This API breaks up a logical disk into its sub-components.
  57. //
  58. BOOL
  59. FtBreakLogicalDisk(
  60. IN FT_LOGICAL_DISK_ID RootLogicalDiskId
  61. );
  62. //
  63. // This API returns an array with all of the logical disk ids for all
  64. // of the root logical disks in the system. When 'ArraySize' is passed in
  65. // as 0, the array is not returned but the number of root logical disk ids
  66. // is returned in 'NumberOfRootLogicalDiskIds'.
  67. //
  68. BOOL
  69. FtEnumerateLogicalDisks(
  70. IN ULONG ArraySize,
  71. OUT PFT_LOGICAL_DISK_ID RootLogicalDiskIds, /* OPTIONAL */
  72. OUT PULONG NumberOfRootLogicalDiskIds
  73. );
  74. //
  75. // This API returns information about a given logical disk.
  76. //
  77. BOOL
  78. FtQueryLogicalDiskInformation(
  79. IN FT_LOGICAL_DISK_ID LogicalDiskId,
  80. OUT PFT_LOGICAL_DISK_TYPE LogicalDiskType, /* OPTIONAL */
  81. OUT PLONGLONG VolumeSize, /* OPTIONAL */
  82. IN USHORT MembersArraySize,
  83. OUT PFT_LOGICAL_DISK_ID Members, /* OPTIONAL */
  84. OUT PUSHORT NumberOfMembers, /* OPTIONAL */
  85. IN USHORT ConfigurationInformationSize,
  86. OUT PVOID ConfigurationInformation, /* OPTIONAL */
  87. IN USHORT StateInformationSize,
  88. OUT PVOID StateInformation /* OPTIONAL */
  89. );
  90. //
  91. // This API orphans a member of a logical disk.
  92. //
  93. BOOL
  94. FtOrphanLogicalDiskMember(
  95. IN FT_LOGICAL_DISK_ID LogicalDiskId,
  96. IN USHORT MemberNumberToOrphan
  97. );
  98. //
  99. // This API replaces a member of a logical disk.
  100. //
  101. BOOL
  102. FtReplaceLogicalDiskMember(
  103. IN FT_LOGICAL_DISK_ID LogicalDiskId,
  104. IN USHORT MemberNumberToReplace,
  105. IN FT_LOGICAL_DISK_ID NewMemberLogicalDiskId,
  106. OUT PFT_LOGICAL_DISK_ID NewLogicalDiskId /* OPTIONAL */
  107. );
  108. //
  109. // This API returns the logical disk id for a given logical disk handle.
  110. //
  111. BOOL
  112. FtQueryLogicalDiskId(
  113. IN HANDLE RootLogicalDiskHandle,
  114. OUT PFT_LOGICAL_DISK_ID RootLogicalDiskId
  115. );
  116. //
  117. // This API opens a partition, given a signature and offset.
  118. //
  119. HANDLE
  120. FtOpenPartition(
  121. IN ULONG Signature,
  122. IN LONGLONG Offset
  123. );
  124. //
  125. // This API returns when there is a change to the overall FT state.
  126. //
  127. BOOL
  128. FtChangeNotify(
  129. );
  130. //
  131. // This API stops all sync operations on the given logical disk.
  132. //
  133. BOOL
  134. FtStopSyncOperations(
  135. IN FT_LOGICAL_DISK_ID RootLogicalDiskId
  136. );
  137. //
  138. // This API queries the sticky drive letter for the given root logical disk.
  139. //
  140. BOOL
  141. FtQueryStickyDriveLetter(
  142. IN FT_LOGICAL_DISK_ID RootLogicalDiskId,
  143. OUT PUCHAR DriveLetter
  144. );
  145. //
  146. // This API sets the sticky drive letter for the given root logical disk.
  147. //
  148. BOOL
  149. FtSetStickyDriveLetter(
  150. IN FT_LOGICAL_DISK_ID RootLogicalDiskId,
  151. IN UCHAR DriveLetter
  152. );
  153. //
  154. // This API returns whether or not enough members of the given logical
  155. // disk are online so that IO is possible on all parts of the volume.
  156. //
  157. BOOL
  158. FtCheckIo(
  159. IN FT_LOGICAL_DISK_ID LogicalDiskId,
  160. OUT PBOOL IsIoOk
  161. );
  162. //
  163. // This API returns whether or not the FTDISK driver is loaded.
  164. //
  165. BOOL
  166. FtCheckDriver(
  167. OUT PBOOL IsDriverLoaded
  168. );
  169. #ifdef __cplusplus
  170. }
  171. #endif
  172. #endif