FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour structure inside structure
Posts: 22
Joined: Mon May 19, 2008 08:54 PM
structure inside structure
Posted: Wed Aug 20, 2008 03:31 PM
Hey guys,

I'm still working with that dll and now i faced another problem.

One parameter is a structure that one of the member is a structure.

i tried this:

STRUCT payload
   MEMBER Length                AS DWORD
   MEMBER Data                  AS LONG
ENDSTRUCT

STRUCT textfir
   MEMBER IsWideChar            AS BOOL
   MEMBER TextFIR                 AS payload
ENDSTRUCT


I declared the member textfir as payload structure, but it didnt work.

I was suppose to change the tstruct class but before I prefered post my problem here!


thanks again for any help!
regards,



Diego Imenes
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
structure inside structure
Posted: Thu Aug 21, 2008 06:51 AM

You can declare the nested structure as a STRING with a length of its structure:

MEMBER TextFIR AS STRING LEN payload:SizeOf()

Will you provide data in such structure or will you receive data from it ?

In both cases, you can use payload:cBuffer to transfer the info to/from TextFIR

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 22
Joined: Mon May 19, 2008 08:54 PM
structure inside structure
Posted: Thu Aug 21, 2008 04:14 PM

i got it!
I'm gonna receive data from this structure....

One more time thanks again!

regards,



Diego Imenes
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
structure inside structure
Posted: Thu Aug 21, 2008 06:47 PM

Diego,

you are welcome :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion