Use APTD to communicate with ATA devices in Windows.

This commit is contained in:
2021-09-15 23:55:06 +01:00
parent 8a5040fd56
commit a615cde12e
3 changed files with 115 additions and 137 deletions

View File

@@ -68,7 +68,7 @@ namespace Aaru.Devices.Windows
}
[StructLayout(LayoutKind.Sequential), SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
internal struct AtaPassThroughEx
internal struct AtaPassThroughDirect
{
/// <summary>Length in bytes of this structure</summary>
public ushort Length;
@@ -98,8 +98,8 @@ namespace Aaru.Devices.Windows
/// <summary>Reserved</summary>
public uint ReservedAsUlong;
/// <summary>Pointer to data buffer relative to start of this structure</summary>
public IntPtr DataBufferOffset;
/// <summary>Pointer to data buffer</summary>
public IntPtr DataBuffer;
/// <summary>Previous ATA registers, for LBA48</summary>
public AtaTaskFile PreviousTaskFile;
@@ -108,16 +108,6 @@ namespace Aaru.Devices.Windows
public AtaTaskFile CurrentTaskFile;
}
[StructLayout(LayoutKind.Sequential), SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
internal struct AtaPassThroughExBuffer
{
public AtaPassThroughEx aptd;
public uint filler;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 64 * 512)]
public byte[] dataBuffer;
}
[StructLayout(LayoutKind.Explicit), SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
internal struct AtaTaskFile
{