[Curt wrote] > > If I recall correctly, I ended up having to google around quite a bit to figure out how to accept > udp network packets in VB, and then I couldn't find anything directly analogous to a C structure in > VB, so I think I ended up writting some pretty low level looking VB code to extract the byte > sequences, order them correctly, and convert them to VB numbers.
If you are lucky, then a User Defined Type in VB can have the same byte order as a similar structure in C. Obviously you need to consider the size of each element carefully, but it is possible. Sometimes you need to do low level byte and bit bashing to reconstruct values, but the floating point numbers are IEEE at both ends, so they go through without any problems, all flavours of ints are usually OK. uints are more of a problem since VB doesn't have any unsigned data types. I think my solution for uints was to read a 16bit uint into a 16bit signed int in VB, assign it to a 32nit int, then check for it being <0 and if so add 2^16. Good luck. Richard ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Flightgear-users mailing list Flightgear-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-users