Jump to content
  • Advertisement
Sign in to follow this  
Uphoreum

[.net] .NET Direct Disk Access

This topic is 3883 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does .NET provide any APIs for direct disk access? For example, writing raw sectors onto a floppy disk? I kind of doubt that it allows for this kind of low-level access, but I thought I would check. I couldn't find anything in MSDN.

Share this post


Link to post
Share on other sites
Advertisement
Not likely. You'll probably be PInvoking to Win32 -- or even raw NT syscalls -- for this one.

Share this post


Link to post
Share on other sites
Something like this _may_ work, however, it's not tested or tried.


Dim fs As System.IO.FileStream = New system.IO.FileStream("\\.\PhysicalDriveN",IO.FileMode.Open,IO.FileAccess.ReadWrite)
Dim bw As New System.IO.BinaryWriter(fs)
' Do work here
bw.Flush()
bw.Close()
fs.Close()


see this link for a bit more info: http://support.microsoft.com/kb/q100027/

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!