T
ThomasR
Hi together,
I have following little problem with a structure which I need for unmanaged
code:
Public Structure Info
Public Header As HeaderInfo
<System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst:=256)> _
Public Notes As Integer()
End Structure
The above structure will fix the Array Size for Notes to 256 elements.
But I need this Info structure with a variable Notes array of 4, 8 or 256
elements.
Is there a way how this could be done in code to have a dynamic Notes size ?
I could define 3 separat Info structures but this would result in e.g.
Info4, Info8 and Info256 definitions which I can't use (makes my code to
complicated).
I would like to keep the Info structure as shown above but later I want to
define the nessesary array size.
One last question:
Do I need to create such a structure with NEW ? (e.g. Dim Test as New Info)
Cheers
Thomas
hint:
Unfortunately I posted this question the first time to the vb.com queue, but
I think this queue is better for VB.NET questions. Please forgive me for this
double posting
I have following little problem with a structure which I need for unmanaged
code:
Public Structure Info
Public Header As HeaderInfo
<System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst:=256)> _
Public Notes As Integer()
End Structure
The above structure will fix the Array Size for Notes to 256 elements.
But I need this Info structure with a variable Notes array of 4, 8 or 256
elements.
Is there a way how this could be done in code to have a dynamic Notes size ?
I could define 3 separat Info structures but this would result in e.g.
Info4, Info8 and Info256 definitions which I can't use (makes my code to
complicated).
I would like to keep the Info structure as shown above but later I want to
define the nessesary array size.
One last question:
Do I need to create such a structure with NEW ? (e.g. Dim Test as New Info)
Cheers
Thomas
hint:
Unfortunately I posted this question the first time to the vb.com queue, but
I think this queue is better for VB.NET questions. Please forgive me for this
double posting