How to access unprocessed disk sector in XP using c program?

I want to know how to access the hard disk sector in Windows XP using program C?

+4
source share
1 answer

You will need to open the raw disk device, ideally, using the Windows API, and not with any part of the standard C file I / O library. Then you should use the Windows API to read and write (but only if you are careful) the raw sectors. To gain write access, the drive is usually not mounted. To do this, you need privileges granted to administrators.

Start with the MSDN documentation for CreateFile() and pay particular attention to the "Physical disks and volumes" section. Pages on file naming and DOS device names can also be interesting.

+3
source

All Articles