我如何直接读取磁盘与.net? [英] How do I read a disk directly with .Net?
问题描述
时可以直接与.net磁盘读取?通过直接我通过设备绕过文件系统的意思。我想我会去通过打开设备某种程度上\设备\ IDE \ IdeDeviceP2T0L0-1为例。
Is is possible to read a disk directly with .Net? By directly I mean via the device bypassing the file system. I think I would go about this by opening the device some way "\Device\Ide\IdeDeviceP2T0L0-1" for example.
如果我不能用.NET API知道哪些Win32 API的使用将有助于打开设备。
If I can't open the device with a .NET api knowing which Win32 API to use would be helpful.
推荐答案
的CreateFile 具有直接磁盘访问支持。阅读笔记下的物理磁盘和卷。你应该可以的P / Invoke调用。
CreateFile has support for direct disk access. Read the notes under "Physical Disks and Volumes". You should be able to P/Invoke the call.
注意,Vista和Server 2008中有无严格限制这一点。
Note that Vista and Server 2008 have severely restricted this.
这篇关于我如何直接读取磁盘与.net?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!