Reputation: 11
How can I read a sector of a hard disk drive, access the file system and block or cluster of a file, list of bad blocks (FAT) or cluster file (NTFS)? Or access the list of free blocks (FAT) or cluster bitmap (NTFS)?
Upvotes: 1
Views: 2340
Reputation: 3505
Examining FAT boot sector: Extract Floppy Disk Geometry from the Boot Sector
FAT Root Directory Structure on Floppy Disk and File Information
Long File Name (LFN) Entries in the FAT Root Directory of Floppy Disks in win32.
Upvotes: 0
Reputation: 24180
You can use the CreateFile API to open a physical disk by specifying a special file name (e.g. "\\.\PhysicalDrive0"
) -- see the section "Physical Disks and Volumes" in the CreateFile MSDN documentation.
Be very careful though, especially with write operations -- you can easily trash your entire system this way.
Upvotes: 3