-
Direct Disk Read/Write
Is there a way to direcly read and write the physical data to the drive sectors through windows?
I've been looking at DeviceIOControl(), but msdn doesnt seem to list any control codes for actually reading and writing the data, just for partition info, etc. What I'm looking for is direct RAW access to the volume's sector data. Doing this in DOS was fairly easy using INT 0x13, but I want to update an old project to a windows application.
-
http://support.microsoft.com/kb/100027
Use SetFilePointer() to a particular sector, then ReadFile() or WriteFile(). The memory that you read or write to/from has to be sector aligned. Memory from VirtualAlloc is always at least sector aligned.
gg
-
-