12-15-2005 02:38 PM
12-16-2005 09:21 AM
Hi OJG,
marshalling complex structures through platform invoke calls can be tricky. There are some great references for this online at msdn. I'd suggest starting here:
http://msdn2.microsoft.com/en-us/library/fzhhdwae.aspx
for an overview of platform invoke data marshaling, and then focus in on
Marshaling Classes, Structures, and Unions, especially the part on "Structure with a pointer to another structure."
12-16-2005 02:59 PM
Orlando,
The first thing I would recommend would be to break up the cluster coming out of your VI. Marshaling your data can be pretty tricky, but if you break it up you can bypass this problem. You seem to have been able to bring one array into the code without any trouble. You can follow the same procedure for the one inside the cluster once you have unbundled it in your VI. The f0 and d0 will pass without much trouble as regular Doubles.
Also, don't forget to add the input parameter "device (0)" to your function call. I don't see it in your C header file.
Regards,
Santiago D