Added support for SecureDigital / MultiMediaCard on Windows.

This commit is contained in:
2017-12-06 23:05:59 +00:00
parent d660ec93d1
commit 4cd0ec53e9
6 changed files with 274 additions and 27 deletions

View File

@@ -98,7 +98,6 @@ namespace DiscImageChef.Devices.Windows
IntPtr Overlapped
);
[DllImport("Kernel32.dll", SetLastError = true, EntryPoint = "DeviceIoControl", CharSet = CharSet.Auto)]
internal static extern bool DeviceIoControlGetDeviceNumber(
SafeFileHandle hDevice,
@@ -111,6 +110,22 @@ namespace DiscImageChef.Devices.Windows
IntPtr Overlapped
);
[DllImport("Kernel32.dll", SetLastError = true, EntryPoint = "DeviceIoControl", CharSet = CharSet.Auto)]
internal static extern bool DeviceIoControl(
SafeFileHandle hDevice,
WindowsIoctl IoControlCode,
IntPtr InBuffer,
uint nInBufferSize,
ref SffdiskQueryDeviceProtocolData OutBuffer,
uint nOutBufferSize,
out uint pBytesReturned,
IntPtr Overlapped
);
[DllImport("Kernel32.dll", SetLastError = true, EntryPoint = "DeviceIoControl", CharSet = CharSet.Auto)]
internal static extern bool DeviceIoControl(SafeFileHandle hDevice, WindowsIoctl IoControlCode, byte[] InBuffer,
uint nInBufferSize, byte[] OutBuffer, uint nOutBufferSize, out uint pBytesReturned, IntPtr Overlapped);
[DllImport("setupapi.dll", CharSet = CharSet.Auto)]
internal static extern SafeFileHandle SetupDiGetClassDevs(
ref Guid ClassGuid,