Added support for ATA commands using Windows 2000/XP undocumented

IOCTL that predates Windows 2003 documented one.
This commit is contained in:
2017-09-10 23:20:59 +01:00
parent d60060d266
commit fe1c3e13b4
5 changed files with 185 additions and 1 deletions

View File

@@ -84,7 +84,19 @@ namespace DiscImageChef.Devices.Windows
uint nOutBufferSize,
ref uint pBytesReturned,
IntPtr Overlapped
);
);
[DllImport("Kernel32.dll", SetLastError = true, EntryPoint = "DeviceIoControl", CharSet = CharSet.Auto)]
internal static extern bool DeviceIoControlIde(
SafeFileHandle hDevice,
WindowsIoctl IoControlCode,
ref IdePassThroughDirect InBuffer,
uint nInBufferSize,
ref IdePassThroughDirect OutBuffer,
uint nOutBufferSize,
ref uint pBytesReturned,
IntPtr Overlapped
);
[DllImport("Kernel32.dll", SetLastError = true, CharSet = CharSet.Auto)]
internal static extern bool CloseHandle(SafeFileHandle hDevice);