Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically accessing the Windows file allocation table

Tags:

windows

fat

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.

like image 648
Anirudh Goel Avatar asked Jul 22 '26 07:07

Anirudh Goel


1 Answers

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.

like image 58
Nick Meyer Avatar answered Jul 23 '26 20:07

Nick Meyer