get_struct_field

Definition: include cffi.e
atom v = get_struct_field(integer id, atom pStruct, string fieldname)
Description: get a named field from some previously allocated structure, which (ie pStruct) is most likely to be the result of an earlier call to allocate_struct().
Comments: The return value is always an atom. You may need to use say peek_string() or even get_struct_field() itself again, on some results.
Example:
include cffi.e
constant idMBP = define_struct(...)
atom pMBP = allocate_struct(idMBP)
.. <set contents of pMBP>
atom pTitle = get_struct_field(idMBP,pMBP,"lpszText")
?peek_string(pTitle)
See Also: allocate_struct, set_struct_field, peek_string