Reformatted.

This commit is contained in:
2016-04-19 02:11:47 +01:00
parent 6a8499f8ed
commit f8bc81d4f5
149 changed files with 6983 additions and 6970 deletions

View File

@@ -63,7 +63,7 @@ namespace DiscImageChef.Devices.Windows
duration = 0;
sense = false;
if (buffer == null)
if(buffer == null)
return -1;
ScsiPassThroughDirectAndSenseBuffer sptd_sb = new ScsiPassThroughDirectAndSenseBuffer();
@@ -88,7 +88,7 @@ namespace DiscImageChef.Devices.Windows
(uint)Marshal.SizeOf(sptd_sb), ref k, IntPtr.Zero);
DateTime end = DateTime.Now;
if (hasError)
if(hasError)
error = Marshal.GetLastWin32Error();
Marshal.Copy(sptd_sb.sptd.DataBuffer, buffer, 0, buffer.Length);

View File

@@ -54,7 +54,7 @@ namespace DiscImageChef.Devices.Windows
[MarshalAs(UnmanagedType.U4)] FileAttributes flagsAndAttributes,
IntPtr templateFile);
[DllImport("Kernel32.dll", SetLastError = true, EntryPoint="ioctl", CharSet = CharSet.Auto)]
[DllImport("Kernel32.dll", SetLastError = true, EntryPoint = "ioctl", CharSet = CharSet.Auto)]
internal static extern bool DeviceIoControlScsi(
SafeFileHandle hDevice,
WindowsIoctl IoControlCode,
@@ -66,7 +66,7 @@ namespace DiscImageChef.Devices.Windows
IntPtr Overlapped
);
[DllImport("Kernel32.dll", SetLastError = true, EntryPoint="ioctl", CharSet = CharSet.Auto)]
[DllImport("Kernel32.dll", SetLastError = true, EntryPoint = "ioctl", CharSet = CharSet.Auto)]
internal static extern bool DeviceIoControlAta(
SafeFileHandle hDevice,
WindowsIoctl IoControlCode,

View File

@@ -89,20 +89,30 @@ namespace DiscImageChef.Devices.Windows
struct AtaTaskFile
{
// Fields for commands sent
[FieldOffset(0)] public byte Features;
[FieldOffset(6)] public byte Command;
[FieldOffset(0)]
public byte Features;
[FieldOffset(6)]
public byte Command;
// Fields on command return
[FieldOffset(0)] public byte Error;
[FieldOffset(6)] public byte Status;
[FieldOffset(0)]
public byte Error;
[FieldOffset(6)]
public byte Status;
// Common fields
[FieldOffset(1)] public byte SectorCount;
[FieldOffset(2)] public byte SectorNumber;
[FieldOffset(3)] public byte CylinderLow;
[FieldOffset(4)] public byte CylinderHigh;
[FieldOffset(5)] public byte DeviceHead;
[FieldOffset(7)] public byte Reserved;
[FieldOffset(1)]
public byte SectorCount;
[FieldOffset(2)]
public byte SectorNumber;
[FieldOffset(3)]
public byte CylinderLow;
[FieldOffset(4)]
public byte CylinderHigh;
[FieldOffset(5)]
public byte DeviceHead;
[FieldOffset(7)]
public byte Reserved;
}
}