在获得有关从存储设备检索.MBR的大量信息之后,结论是使用P/Invoke来调用CreateFile.
但是如何在C#中完成这项工作?请说明!对你的帮助表示感谢!!!
Dav*_*own 19
[DllImport("kernel32.dll", CharSet = CharSet.Auto,
CallingConvention = CallingConvention.StdCall,
SetLastError = true)]
public static extern SafeFileHandle CreateFile(
string lpFileName,
uint dwDesiredAccess,
uint dwShareMode,
IntPtr SecurityAttributes,
uint dwCreationDisposition,
uint dwFlagsAndAttributes,
IntPtr hTemplateFile
);
Run Code Online (Sandbox Code Playgroud)
http://pinvoke.net/default.aspx/kernel32/CreateFile.html