summaryrefslogtreecommitdiff
path: root/src/ntfsx.h
diff options
context:
space:
mode:
authorStef Walter <stef@thewalter.net>2004-01-27 18:35:29 +0000
committerStef Walter <stef@thewalter.net>2004-01-27 18:35:29 +0000
commit048987b4e95b70a4559b9163d90e57dd69097203 (patch)
treeb31fa09615d3a5862eb959a70ff87cb2a2452aa2 /src/ntfsx.h
parentedd737cd17f4e6712ba289e977c330ca3adc5495 (diff)
Fixes and changes:
- Handles Split MFT - Handles Windows XP formatted drives
Diffstat (limited to 'src/ntfsx.h')
-rw-r--r--src/ntfsx.h31
1 files changed, 28 insertions, 3 deletions
diff --git a/src/ntfsx.h b/src/ntfsx.h
index 586b36b..836f010 100644
--- a/src/ntfsx.h
+++ b/src/ntfsx.h
@@ -64,8 +64,8 @@ public:
bool New(PartitionInfo* pInfo);
bool Read(PartitionInfo* pInfo, uint64 begSector, HANDLE hIn);
- void Free()
- { if(m_pCluster) refrelease(m_pCluster); }
+ void Free();
+
uint32 m_cbCluster;
byte* m_pCluster;
@@ -95,7 +95,8 @@ protected:
uint32 m_cbMem;
};
-class NTFS_Record : public NTFS_Cluster
+class NTFS_Record :
+ public NTFS_Cluster
{
public:
NTFS_Record(PartitionInfo* pInfo);
@@ -111,4 +112,28 @@ protected:
PartitionInfo* m_pInfo;
};
+class NTFS_MFTMap
+{
+public:
+ NTFS_MFTMap(PartitionInfo* pInfo);
+ ~NTFS_MFTMap();
+
+ bool Load(NTFS_Record* pRecord, HANDLE hIn);
+
+ uint64 GetLength();
+ uint64 SectorForIndex(uint64 index);
+
+protected:
+ PartitionInfo* m_pInfo;
+
+ struct NTFS_Block
+ {
+ uint64 firstSector; // relative to the entire drive
+ uint64 length; // length in MFT records
+ };
+
+ NTFS_Block* m_pBlocks;
+ uint32 m_count;
+};
+
#endif // !defined(AFX_NTFSX__9363C7D2_D3CC_4D49_BEE0_27AD025670F2__INCLUDED_)