Using C struct referenced by address in clarion

Hi All
I’m trying to interact with a C dll.
The C has a struct that it creates in one function and returns a pointer to it.
How do you reference the structure in clarion?

struct  theStruct
int   fieldA
int fieldB;

   code
   struct theStruct *my_structl;
    my_struct = Z_Create();

How do I reference and use fieldA and fieldB ??

TheStructType Group,TYPE
fieldA long
fieldB long
    END

TheStruct &TheStructType
  CODE
 TheStruct &= 0 + Z_Create()

 message('FieldA[' & TheStruct.FieldA & ']')
1 Like

Thanks Mark.

Between this and the replies on the newsgroups I’ve managed to get this going.

It’s for a Barcode library and I’m impressed that I got it to go :slight_smile: