From 048987b4e95b70a4559b9163d90e57dd69097203 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Tue, 27 Jan 2004 18:35:29 +0000 Subject: Fixes and changes: - Handles Split MFT - Handles Windows XP formatted drives --- src/ntfsx.h | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'src/ntfsx.h') 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_) -- cgit v1.2.3