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>
* Windows/Extern.cs:

View File

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

View File

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