crward
asked on
Low level disk i/o in C++ for editing the metafiles
I currently own two Maxtor hard drives--both of which I've experienced at one time or another a failure or corruption of the master file table (\$MFT). As a result of this I frequently have backed up the drives metafiles using R-Studio NTFS, but have no way to restore the backed up files without typing in each byte from the backed up file. Frustrated by this, I decided to design a C++ program that would both read and write these metafiles, however I do not know how to do low-level disk I/O in C++ under Windows 2000. Can anyone point me in the right direction to how I might do low-level disk reads and writes in a Windows 2000 C++ environment so that I can save and restore my drives metafiles?
Thanks,
Chris
Thanks,
Chris
Look at DeviceIoControl API function
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can open up any disk device with some funny drive name incantation, see the drive paths that scroll up your screen when you do a "safe mode" boot. Put those in a call to CreateFile() and you shoul dbe good to go.
Look at this question related to writting directly to system I/O ports.
https://www.experts-exchange.com/questions/21045309/Controll-of-PC-speaker-on-windows-XP-embedde-system.html