Ok,
I am trying to send a struct in VB.net like this
structure test
dim index as integer
dim int1 as integer
dim int2 as integer
dim d1 as double
dim d2 as double
dim darray() as double
dim timestamp as double
dim source as integer
end structure
dim myData as new test
The socket.send function wants a byte() array and I can not get the struct converted to a byte array. I have tried to use interopservices but I get an exception in marshal.sizeof(myData) . The error message is "Type test can not be marshaled as an unmanaged structure; no meaningful size or offset can be computed".
Any ideas on sending this structure??
I am trying to send a struct in VB.net like this
structure test
dim index as integer
dim int1 as integer
dim int2 as integer
dim d1 as double
dim d2 as double
dim darray() as double
dim timestamp as double
dim source as integer
end structure
dim myData as new test
The socket.send function wants a byte() array and I can not get the struct converted to a byte array. I have tried to use interopservices but I get an exception in marshal.sizeof(myData) . The error message is "Type test can not be marshaled as an unmanaged structure; no meaningful size or offset can be computed".
Any ideas on sending this structure??