After getting so much information about retrieving .MBR from a storage device, conclusion is to use P/Invoke to call CreateFile
.
But how this can be done in C#? Please illustrate! Your help will be greatly appreciated!!!
After getting so much information about retrieving .MBR from a storage device, conclusion is to use P/Invoke to call CreateFile
.
But how this can be done in C#? Please illustrate! Your help will be greatly appreciated!!!
[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
);