Struct de-class

This commit is contained in:
2015-10-06 18:29:15 +01:00
parent 4aef27f3d3
commit c083f45ece
3 changed files with 31 additions and 28 deletions

View File

@@ -1,3 +1,9 @@
2015-10-06 Natalia Portillo <claunia@claunia.com>
* Windows/Extern.cs:
* Windows/Structs.cs:
Struct de-class
2015-10-06 Natalia Portillo <claunia@claunia.com> 2015-10-06 Natalia Portillo <claunia@claunia.com>
* Windows/Extern.cs: * Windows/Extern.cs:

View File

@@ -20,9 +20,9 @@ namespace DiscImageChef.Devices.Windows
public static extern bool DeviceIoControl( public static extern bool DeviceIoControl(
SafeFileHandle hDevice, SafeFileHandle hDevice,
uint IoControlCode, uint IoControlCode,
ref Structs.SCSI_PASS_THROUGH_DIRECT_AND_SENSE_BUFFER InBuffer, ref ScsiPassThroughDirectAndSenseBuffer InBuffer,
uint nInBufferSize, uint nInBufferSize,
ref Structs.SCSI_PASS_THROUGH_DIRECT_AND_SENSE_BUFFER OutBuffer, ref ScsiPassThroughDirectAndSenseBuffer OutBuffer,
uint nOutBufferSize, uint nOutBufferSize,
ref uint pBytesReturned, ref uint pBytesReturned,
IntPtr Overlapped IntPtr Overlapped

View File

@@ -2,11 +2,9 @@
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace DiscImageChef.Devices.Windows namespace DiscImageChef.Devices.Windows
{
static class Structs
{ {
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
internal struct SCSI_PASS_THROUGH_DIRECT struct ScsiPassThroughDirect
{ {
public ushort Length; public ushort Length;
public byte ScsiStatus; public byte ScsiStatus;
@@ -26,11 +24,10 @@ namespace DiscImageChef.Devices.Windows
}; };
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
internal struct SCSI_PASS_THROUGH_DIRECT_AND_SENSE_BUFFER { struct ScsiPassThroughDirectAndSenseBuffer {
public SCSI_PASS_THROUGH_DIRECT sptd; public ScsiPassThroughDirect sptd;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
public byte[] SenseBuf; public byte[] SenseBuf;
} }
} }
}