2015-10-05 21:20:25 +01:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
|
|
|
|
|
|
|
namespace DiscImageChef.Devices.Windows
|
|
|
|
|
|
{
|
|
|
|
|
|
static class Structs
|
|
|
|
|
|
{
|
|
|
|
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
|
|
|
|
internal struct SCSI_PASS_THROUGH_DIRECT
|
|
|
|
|
|
{
|
|
|
|
|
|
public ushort Length;
|
|
|
|
|
|
public byte ScsiStatus;
|
|
|
|
|
|
public byte PathId;
|
|
|
|
|
|
public byte TargetId;
|
|
|
|
|
|
public byte Lun;
|
|
|
|
|
|
public byte CdbLength;
|
|
|
|
|
|
public byte SenseInfoLength;
|
2015-10-06 18:27:38 +01:00
|
|
|
|
[MarshalAs(UnmanagedType.U1)]
|
|
|
|
|
|
public ScsiIoctlDirection DataIn;
|
2015-10-05 21:20:25 +01:00
|
|
|
|
public uint DataTransferLength;
|
|
|
|
|
|
public uint TimeOutValue;
|
|
|
|
|
|
public IntPtr DataBuffer;
|
|
|
|
|
|
public uint SenseInfoOffset;
|
|
|
|
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
|
|
|
|
|
|
public byte[] Cdb;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
|
|
|
|
internal struct SCSI_PASS_THROUGH_DIRECT_AND_SENSE_BUFFER {
|
|
|
|
|
|
public SCSI_PASS_THROUGH_DIRECT sptd;
|
|
|
|
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
|
|
|
|
|
|
public byte[] SenseBuf;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|