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

@@ -64,6 +64,7 @@ namespace DiscImageChef.Devices.Windows
public byte[] SenseBuf;
}
[StructLayout(LayoutKind.Sequential)]
struct AtaPassThroughDirect
{
/// <summary>
@@ -145,5 +146,43 @@ namespace DiscImageChef.Devices.Windows
[FieldOffset(7)]
public byte Reserved;
}
[StructLayout(LayoutKind.Sequential)]
struct StoragePropertyQuery
{
[MarshalAs(UnmanagedType.U4)]
public StoragePropertyId PropertyId;
[MarshalAs(UnmanagedType.U4)]
public StorageQueryType QueryType;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)]
public byte[] AdditionalParameters;
}
[StructLayout(LayoutKind.Sequential)]
struct StorageDescriptorHeader
{
public uint Version;
public uint Size;
}
[StructLayout(LayoutKind.Sequential)]
struct StorageDeviceDescriptor
{
public uint Version;
public uint Size;
public byte DeviceType;
public byte DeviceTypeModifier;
[MarshalAs(UnmanagedType.U1)]
public bool RemovableMedia;
[MarshalAs(UnmanagedType.U1)]
public bool CommandQueueing;
public uint VendorIdOffset;
public uint ProductIdOffset;
public uint ProductRevisionOffset;
public uint SerialNumberOffset;
public StorageBusType BusType;
public uint RawPropertiesLength;
public byte[] RawDeviceProperties;
}
}