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.

116 lines
2.1 KiB

  1. #include <mytypes.h>
  2. #include <partio.h>
  3. #include <msgfile.h>
  4. #include <misclib.h>
  5. #include <partimag.h>
  6. #include <stdio.h>
  7. #include <string.h>
  8. #include <dos.h>
  9. extern FPVOID IoBuffer;
  10. extern char *textPartOpenError;
  11. extern char *textFileWriteError;
  12. extern char *textFileReadFailed;
  13. extern char *textReadFailedAtSector;
  14. extern char *textOOM;
  15. extern char *textScanningFat;
  16. extern char *textNtfsUnsupportedConfig;
  17. extern char *textNtfsCorrupt;
  18. extern char *textInitNtfsDataStruct;
  19. extern char *textNtfsBuildingBitmap;
  20. extern char *textProcessingNtfsBitmap;
  21. extern char *textUnsupportedFs;
  22. typedef enum {
  23. FilesystemFat,
  24. FilesystemNtfs,
  25. FilesystemOther
  26. } FilesystemType;
  27. BOOL
  28. BuildClusterBitmap(
  29. IN FilesystemType FsType,
  30. IN HPARTITION PartitionHandle,
  31. IN UINT FileHandle,
  32. IN PARTITION_IMAGE *PartitionImage
  33. );
  34. VOID
  35. InitClusterBuffer(
  36. IN FPBYTE _512ByteBuffer,
  37. IN UINT FileHandle
  38. );
  39. BOOL
  40. MarkClusterUsed(
  41. IN ULONG Cluster
  42. );
  43. BOOL
  44. FlushClusterBuffer(
  45. VOID
  46. );
  47. BOOL
  48. InitClusterMap(
  49. OUT FPBYTE _512ByteBuffer,
  50. IN UINT FileHandle,
  51. IN ULONG LastUsedCluster
  52. );
  53. BOOL
  54. GetNextClusterRun(
  55. OUT ULONG *StartCluster,
  56. OUT ULONG *ClusterCount
  57. );
  58. BOOL
  59. FatIsFat(
  60. IN HPARTITION PartitionHandle
  61. );
  62. BOOL
  63. FatInitializeVolumeData(
  64. IN HPARTITION PartitionHandle,
  65. OUT ULONG *TotalSectorCount,
  66. OUT ULONG *NonClusterSectors,
  67. OUT ULONG *ClusterCount,
  68. OUT BYTE *SectorsPerCluster
  69. );
  70. BOOL
  71. FatBuildClusterBitmap(
  72. IN HPARTITION PartitionHandle,
  73. IN UINT FileHandle,
  74. IN OUT PARTITION_IMAGE *PartitionImage
  75. );
  76. BOOL
  77. NtfsIsNtfs(
  78. IN HPARTITION PartitionHandle
  79. );
  80. BOOL
  81. NtfsInitializeVolumeData(
  82. IN HPARTITION PartitionHandle,
  83. OUT ULONG *TotalSectorCount,
  84. OUT ULONG *NonClusterSectors,
  85. OUT ULONG *ClusterCount,
  86. OUT BYTE *SectorsPerCluster
  87. );
  88. BOOL
  89. NtfsBuildClusterBitmap(
  90. IN HPARTITION PartitionHandle,
  91. IN UINT FileHandle,
  92. IN OUT PARTITION_IMAGE *PartitionImage
  93. );