How can I access raw disk data from vb.net?

How can I access raw disk data in vb.net? I plan to create a file system, but I need access to a raw disk.

I mean something like this:

Dim data(255) As Byte data = ReadSector("C:", 5) data(125) = asc("h") data(126) = asc("e") data(127) = asc("l") data(128) = asc("l") data(129) = asc("o") WriteSector("C:", 5, data) 

Where ReadSector has arguments (As String drive, As Long sector) and WriteSector has (As String drive, As Long sector, data () As Byte).

This will say hello on the 126th character of the 5th sector on drive C.

+4
source share
1 answer

Which OS is important because after Windows 95 direct access to the disk was removed from the programs. You could build a module outside of vb and possibly a link to it.

0
source

Source: https://habr.com/ru/post/1445873/


All Articles