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.

311 lines
4.9 KiB

  1. /*++
  2. Copyright (c) 1993 Microsoft Corporation
  3. Module Name:
  4. spppart3.h
  5. Abstract:
  6. Private header file for partitioning engine and UI.
  7. Author:
  8. Matt Holle (matth) 1-December-1999
  9. Revision History:
  10. Minor clean up - Vijay Jayaseelan (vijayj)
  11. --*/
  12. #ifndef _SPPART3_H_
  13. #define _SPPART3_H_
  14. //
  15. // MACROS
  16. //
  17. //
  18. // Data structures.
  19. //
  20. //
  21. // Function prototypes.
  22. //
  23. extern VOID
  24. SpPtMenuCallback(
  25. IN ULONG_PTR UserData
  26. );
  27. NTSTATUS
  28. SpPtnInitializeDiskDrive(
  29. IN ULONG DiskId
  30. );
  31. extern NTSTATUS
  32. SpPtnInitializeDiskDrives(
  33. VOID
  34. );
  35. extern NTSTATUS
  36. SpPtnInitializeDiskAreas(
  37. IN ULONG DiskNumber
  38. );
  39. extern NTSTATUS
  40. SpPtnSortDiskAreas(
  41. IN ULONG DiskNumber
  42. );
  43. extern NTSTATUS
  44. SpPtnFillDiskFreeSpaceAreas(
  45. IN ULONG DiskNumber
  46. );
  47. extern NTSTATUS
  48. SpPtnPrepareDisks(
  49. IN PVOID SifHandle,
  50. OUT PDISK_REGION *InstallRegion,
  51. OUT PDISK_REGION *SystemPartitionRegion,
  52. IN PWSTR SetupSourceDevicePath,
  53. IN PWSTR DirectoryOnSetupSource,
  54. IN BOOLEAN RemoteBootRepartition
  55. );
  56. extern BOOLEAN
  57. SpPtnGenerateDiskMenu(
  58. IN PVOID Menu,
  59. IN ULONG DiskNumber,
  60. OUT PDISK_REGION *FirstDiskRegion
  61. );
  62. PDISK_REGION
  63. SpPtnValidSystemPartition(
  64. VOID
  65. );
  66. PDISK_REGION
  67. SpPtnValidSystemPartitionArc(
  68. IN PVOID SifHandle,
  69. IN PWSTR SetupSourceDevicePath,
  70. IN PWSTR DirectoryOnSetupSource,
  71. IN BOOLEAN SysPartNeeded
  72. );
  73. BOOLEAN
  74. SpPtnValidSystemPartitionArcRegion(
  75. IN PVOID SifHandle,
  76. IN PDISK_REGION Region
  77. );
  78. NTSTATUS
  79. SpPtnInitRegionFromDisk(
  80. IN ULONG DiskNumber,
  81. OUT PDISK_REGION Region
  82. );
  83. NTSTATUS
  84. SpPtnInitializeDiskStyle(
  85. IN ULONG DiskId,
  86. IN PARTITION_STYLE Style,
  87. IN PCREATE_DISK DiskInfo OPTIONAL
  88. );
  89. VOID
  90. SpPtnFreeDiskRegions(
  91. IN ULONG DiskId
  92. );
  93. NTSTATUS
  94. SpPtnMarkLogicalDrives(
  95. IN ULONG DiskId
  96. );
  97. BOOLEAN
  98. SpPtnDoCreate(
  99. IN PDISK_REGION pRegion,
  100. OUT PDISK_REGION *pActualRegion, OPTIONAL
  101. IN BOOLEAN ForNT,
  102. IN ULONGLONG DesiredMB OPTIONAL,
  103. IN PPARTITION_INFORMATION_EX PartInfo OPTIONAL,
  104. IN BOOLEAN ConfirmIt
  105. );
  106. BOOLEAN
  107. SpPtnDoDelete(
  108. IN PDISK_REGION pRegion,
  109. IN PWSTR RegionDescription,
  110. IN BOOLEAN ConfirmIt
  111. );
  112. ValidationValue
  113. SpPtnGetSizeCB(
  114. IN ULONG Key
  115. );
  116. ULONG
  117. SpPtnGetOrdinal(
  118. IN PDISK_REGION Region,
  119. IN PartitionOrdinalType OrdinalType
  120. );
  121. VOID
  122. SpPtnGetSectorLayoutInformation(
  123. IN PDISK_REGION Region,
  124. OUT PULONGLONG HiddenSectors,
  125. OUT PULONGLONG VolumeSectorCount
  126. );
  127. BOOLEAN
  128. SpPtnCreate(
  129. IN ULONG DiskNumber,
  130. IN ULONGLONG StartSector,
  131. IN ULONGLONG SizeInSectors,
  132. IN ULONGLONG SizeMB,
  133. IN BOOLEAN InExtended,
  134. IN BOOLEAN AlignToCylinder,
  135. IN PPARTITION_INFORMATION_EX PartInfo,
  136. OUT PDISK_REGION *ActualDiskRegion OPTIONAL
  137. );
  138. BOOLEAN
  139. SpPtnDelete(
  140. IN ULONG DiskNumber,
  141. IN ULONGLONG StartSector
  142. );
  143. BOOL
  144. SpPtnIsSystemPartitionRecognizable(
  145. VOID
  146. );
  147. VOID
  148. SpPtnMakeRegionActive(
  149. IN PDISK_REGION Region
  150. );
  151. NTSTATUS
  152. SpPtnCommitChanges(
  153. IN ULONG DiskNumber,
  154. OUT PBOOLEAN AnyChanges
  155. );
  156. NTSTATUS
  157. SpMasterBootCode(
  158. IN ULONG DiskNumber,
  159. IN HANDLE Partition0Handle,
  160. OUT PULONG NewNTFTSignature
  161. );
  162. BOOLEAN
  163. SpPtMakeDiskRaw(
  164. IN ULONG DiskNumber
  165. );
  166. NTSTATUS
  167. SpPtnUnlockDevice(
  168. IN PWSTR DeviceName
  169. );
  170. VOID
  171. SpPtnAssignOrdinals(
  172. IN ULONG DiskNumber
  173. );
  174. VOID
  175. SpPtnDeletePartitionsForRemoteBoot(
  176. PPARTITIONED_DISK pDisk,
  177. PDISK_REGION startRegion,
  178. PDISK_REGION endRegion,
  179. BOOLEAN Extended
  180. );
  181. VOID
  182. SpPtnLocateDiskSystemPartitions(
  183. IN ULONG DiskNumber
  184. );
  185. VOID
  186. SpPtnLocateSystemPartitions(
  187. VOID
  188. );
  189. BOOLEAN
  190. SpPtnIsDiskStyleChangeAllowed(
  191. IN ULONG DiskNumber
  192. );
  193. VOID
  194. SpPtnPromptForSysPart(
  195. IN PVOID SifHandle
  196. );
  197. NTSTATUS
  198. SpPtnMakeRegionArcSysPart(
  199. IN PDISK_REGION Region
  200. );
  201. ULONG
  202. SpPtnGetPartitionCountDisk(
  203. IN ULONG DiskId
  204. );
  205. ULONG
  206. SpPtnCountPartitionsByFSType(
  207. IN ULONG DiskId,
  208. IN FilesystemType FsType
  209. );
  210. BOOLEAN
  211. SpPtnIsDeleteAllowedForRegion(
  212. IN PDISK_REGION Region
  213. );
  214. PWSTR
  215. SpPtnGetPartitionName(
  216. IN PDISK_REGION Region,
  217. IN OUT PWSTR NameBuffer,
  218. IN ULONG NameBufferSize
  219. );
  220. NTSTATUS
  221. SpPtnGetGuidNameForPartition(
  222. IN PWSTR NtPartitionName,
  223. IN OUT PWSTR VolumeName
  224. );
  225. NTSTATUS
  226. SpPtnCreateESP(
  227. IN BOOLEAN PromptUser
  228. );
  229. NTSTATUS
  230. SpPtnInitializeGPTDisk(
  231. IN ULONG DiskNumber
  232. );
  233. NTSTATUS
  234. SpPtnInitializeGPTDisks(
  235. VOID
  236. );
  237. NTSTATUS
  238. SpPtnRepartitionGPTDisk(
  239. IN ULONG DiskId,
  240. IN ULONG MinimumFreeSpaceKB,
  241. OUT PDISK_REGION *RegionToInstall
  242. );
  243. BOOLEAN
  244. SpPtnIsDynamicDisk(
  245. IN ULONG DiskIndex
  246. );
  247. #endif // _SPPART3_H_