Question

How can I programmatically access the file allocation entries (FAT) in Windows? I have read the articles which mention reading entries at a particular address in the harddisk, but how can I read those entries from the harddisk. I can try in C, C++, C# or VB.

The tutorials on http://www.ntfs.com were helpful in understanding what to read on the FAT, but didn't clarify how to do so programmatically.

Was it helpful?

Solution

You can open the hard drive itself with the file I/O functions like CreateFile and ReadFile. You can open the disk using CreateFile, seek to the appropriate sector using SetFilePointer, and then read using ReadFile.

See this KB article for more details about reading data directly from the disk.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top