M
Mateusz [PEYN] Adamus
Hi.
I have a problem. I'm creating a structure - looks like this:
<c#>
[StructLayout(LayoutKind.Sequential, Pack=2)]
internal struct TwEnumeration
{
public ushort ItemType;
public uint NumItems;
public uint CurrentIndex;
public uint DefaultIndex;
[MarshalAs(UnmanagedType.ByValArray, SizeConst=10)]
public short[] ItemList;
}
</c#>
It works OK but I have a problem with it:
1. How can I make its size flexible? Now if I'll get 11 results they
wan't fit into an array. And if I'll get 9 results one field in array
will be blank. How can I declare a dynamic array?
2. Can I put there an Array type? If so how?
TIA
best regards
Mateusz [PEYN] Adamus
I have a problem. I'm creating a structure - looks like this:
<c#>
[StructLayout(LayoutKind.Sequential, Pack=2)]
internal struct TwEnumeration
{
public ushort ItemType;
public uint NumItems;
public uint CurrentIndex;
public uint DefaultIndex;
[MarshalAs(UnmanagedType.ByValArray, SizeConst=10)]
public short[] ItemList;
}
</c#>
It works OK but I have a problem with it:
1. How can I make its size flexible? Now if I'll get 11 results they
wan't fit into an array. And if I'll get 9 results one field in array
will be blank. How can I declare a dynamic array?
2. Can I put there an Array type? If so how?

TIA
best regards
Mateusz [PEYN] Adamus