<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16945" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN
class=171185209-22012010>Hello;</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=171185209-22012010></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=171185209-22012010>I would like to
create a Packet Table (FL) with following datatype:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=171185209-22012010></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=171185209-22012010>int size =
128;<BR>typedef struct MyStruct {<BR> long long date;<BR> int
len;<BR> unsigned short *buffer;<BR>} MyStruct;</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=171185209-22012010>MyStruct s1; //
structure for writting<BR>MyStruct s2; // structure for
reading</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=171185209-22012010>s1.date =
12345678912;<BR>s1.len = size;<BR>s1.buffer = (unsigned
short*)malloc(size*sizeof(unsigned short));<BR>for (n = 0; n < size;
n++)<BR>{<BR> s1.buffer[n] = (unsigned short) n +
1;<BR>}</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=171185209-22012010>How to write this
structure to packet table fixed length?<BR>Then how to read data back from the
packet table into the s2 structure?</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=171185209-22012010>Thanks for your
help!<BR>Regards,</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=171185209-22012010>Vincent
Herrero</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=171185209-22012010></SPAN></FONT> </DIV></BODY></HTML>