Added support for "list-devices" command on Windows.

This commit is contained in:
2017-08-22 03:40:43 +01:00
parent dbdcad4ddd
commit 3e02dd82ea
6 changed files with 282 additions and 12 deletions

View File

@@ -74,6 +74,18 @@ namespace DiscImageChef.Devices.Windows
IntPtr Overlapped
);
[DllImport("Kernel32.dll", SetLastError = true, EntryPoint = "DeviceIoControl", CharSet = CharSet.Auto)]
internal static extern bool DeviceIoControlStorageQuery(
SafeFileHandle hDevice,
WindowsIoctl IoControlCode,
ref StoragePropertyQuery InBuffer,
uint nInBufferSize,
IntPtr OutBuffer,
uint nOutBufferSize,
ref uint pBytesReturned,
IntPtr Overlapped
);
[DllImport("Kernel32.dll", SetLastError = true, CharSet = CharSet.Auto)]
internal static extern bool CloseHandle(SafeFileHandle hDevice);
}