structure inside structure

structure inside structure

Postby dempty » Wed Aug 20, 2008 3: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:

Code: Select all  Expand view  RUN
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!
dempty
 
Posts: 22
Joined: Mon May 19, 2008 8:54 pm

Postby Antonio Linares » Thu Aug 21, 2008 6: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42125
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby dempty » Thu Aug 21, 2008 4:14 pm

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

One more time thanks again!
regards,

Diego Imenes
dempty
 
Posts: 22
Joined: Mon May 19, 2008 8:54 pm

Postby Antonio Linares » Thu Aug 21, 2008 6:47 pm

Diego,

you are welcome :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42125
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 41 guests