RE: C struct

new topic     » topic index » view thread      » older message » newer message

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_000_01C2165E.FA4862E0
 charset=iso-8859-2

Here is my version Tone...

  node_name = allot( {8, Byte}),  -- char[8] means fixed size of 8 bytes
  node_parm = allot(Ptr),   -- struct node *parm[MAXP] means a pointer to an
array of MAXP node structures.
  node_tag = allot(Word),
  node_value = allot( {8, Byte}), --  double means double-precision floating
point value
 node_sx     = allot( Word ),
 node_sy     = allot( Word ),
 node_px     = allot( Word ),
 node_py     = allot( Word ),
 node_ay     = allot( Word ),
 node_kind   = allot( Word ),
 node_nump   = allot( Word ),
 node_msg    = allot( Lpsz ),
 node_next   = allot( Ptr ),
 sizeof_node = allotted_size()

> -----Original Message-----
> From: tone.skoda at gmx.net [mailto:tone.skoda at gmx.net]
> Sent: Tuesday, 18 June 2002 10:01
> To: EUforum
> Subject: C struct
> 
> 
> 
> Did I wrap this C structure right. I get Windows error when 
> trying to use
> function from
> dll.
> 
> MAXP = 5
> typedef struct node {
>   char name[8];
>   struct node *parm[MAXP];
>   short tag;
>   double value;
>   short sx,sy;       /* size */
>   short px,py;      /* location on scrn */
>   short ay;         /* adjust y */
>   short kind;
>   short nump;
>   char *msg;
>   struct node *next;
> } node;
> 
> node_name   = allot( {8, Strz} ),
> node_parm   = allot( {MAXP * 4, Strz} ),
> node_tag    = allot( Word ),
> node_value  = allot( DWord ),
> node_sx     = allot( Word ),
> node_sy     = allot( Word ),
> node_px     = allot( Word ),
> node_py     = allot( Word ),
> node_ay     = allot( Word ),
> node_kind   = allot( Word ),
> node_nump   = allot( Word ),
> node_msg    = allot( Lpsz ),
> node_next   = allot( Ptr ),
> sizeof_node = allotted_size(),
> 
> 
> 
> 

==================================================================
De informatie opgenomen in dit bericht kan vertrouwelijk zijn en 
is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht 
onterecht ontvangt wordt u verzocht de inhoud niet te gebruiken en 
de afzender direct te informeren door het bericht te retourneren. 
==================================================================
The information contained in this message may be confidential 
and is intended to be exclusively for the addressee. Should you 
receive this message unintentionally, please do not use the contents 
herein and notify the sender immediately by return e-mail.


==================================================================

------_=_NextPart_000_01C2165E.FA4862E0
Content-Type: application/ms-tnef

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu