S
Scott Townsend
So here is a noob question..
I'm looking to have
Int16
SQLCmd Byte Array that is a Total of 256 Bytes
PARMS Byte Array that is a Total of 1080Bytes
UNUSED Byte Array that is a Total of 708Bytes
This this what I want?
<StructLayout(LayoutKind.Explicit, CharSet:=CharSet.Ansi, Pack:=1,
Size:=2048)> _
Structure SQL_COMMAND
<FieldOffset(0)> Dim PLC_Type As Int16
<FieldOffset(4), VBFixedArray(256)> Dim SQLCmd As Byte()
<FieldOffset(260), VBFixedArray(1080)> Dim PARMS As Byte()
<FieldOffset(1340), VBFixedArray(708)> Dim UNUSED As Byte()
End Structure
Or do I have to decrement the indexes By 1??
<StructLayout(LayoutKind.Explicit, CharSet:=CharSet.Ansi, Pack:=1,
Size:=2048)> _
Structure SQL_COMMAND
<FieldOffset(0)> Dim PLC_Type As Int16
<FieldOffset(4), VBFixedArray(255)> Dim SQLCmd As Byte()
<FieldOffset(260), VBFixedArray(1079)> Dim PARMS As Byte()
<FieldOffset(1340), VBFixedArray(707)> Dim UNUSED As Byte()
End Structure
I'm looking to have
Int16
SQLCmd Byte Array that is a Total of 256 Bytes
PARMS Byte Array that is a Total of 1080Bytes
UNUSED Byte Array that is a Total of 708Bytes
This this what I want?
<StructLayout(LayoutKind.Explicit, CharSet:=CharSet.Ansi, Pack:=1,
Size:=2048)> _
Structure SQL_COMMAND
<FieldOffset(0)> Dim PLC_Type As Int16
<FieldOffset(4), VBFixedArray(256)> Dim SQLCmd As Byte()
<FieldOffset(260), VBFixedArray(1080)> Dim PARMS As Byte()
<FieldOffset(1340), VBFixedArray(708)> Dim UNUSED As Byte()
End Structure
Or do I have to decrement the indexes By 1??
<StructLayout(LayoutKind.Explicit, CharSet:=CharSet.Ansi, Pack:=1,
Size:=2048)> _
Structure SQL_COMMAND
<FieldOffset(0)> Dim PLC_Type As Int16
<FieldOffset(4), VBFixedArray(255)> Dim SQLCmd As Byte()
<FieldOffset(260), VBFixedArray(1079)> Dim PARMS As Byte()
<FieldOffset(1340), VBFixedArray(707)> Dim UNUSED As Byte()
End Structure