02-21-2006 02:20 PM
In your explanation you dont make the full distinction between a few things. In C there is a difference between a fixed size string or array inside a structure and a pointer to a string or array. The fixed size strings or arrays are simply inlined whereas the pointer accesses a separate memory area to that of the structure. The first can be easily simulated in LabVIEW with creating a cluster of a fixed number of elements inside the main cluster as has been shown by you. The second is not easily handled without an external wrapper library.
@tbob wrote:
I wasn't talking about flat data, I was comparing the way Labview stores a cluster to the way C stores a structure. What I mean is that Labview may store the number of elements first, then the elements, and so on. I am not quite sure exactly how LV does it but I do know that C stores structures differently. If it did, it would be quite easy to pass a Labview cluster to a C structure.
Whatever the case, I am able to pass LV clusters successfully to and from C structures in a DLL using the methods I described earlier, without use a wrapper. Again it may depend on the DLL and how it was written.
02-21-2006 04:16 PM