Thanks, but thats no use. Thats a dynamic array where I need a static fixed array.. the problem is thus:
VB Code:
Structure MyStruct Public MyArray() As Integer Public MyInt As Integer End Structure Sub UseStruct() Dim Struct As MyStruct ReDim Struct.MyArray(9) ' Dimension as 10 elements Struct.MyArray(2) = 777 ' Use the array. End Sub
would in fact produce something like the following behind the sceens:
Pointer MyArray (this uses up 4 bytes of data)
Integer MyInt (this uses up 4 bytes of data)
Somewhere else in memory a block of 10 bytes of memory is allocated and the variable MyArray references it
In contrast
VB Code:
Type MyStruct MyArray(9) As Integer MyInt As Integer End Type
would produce something like the following behind the sceens:
Integer *10 MyArray (this uses up 4*10 bytes of data = 40)
Integer MyInt (this uses up 4 bytes of data)
So as you can see there is a big difference in terms of where the data is stored in memory, and the DLL im interfacing with will only accept the data in the format produced by the Type definition.
Thanks for any more help on this




Reply With Quote