02-14-2007 10:58 AM
02-15-2007 04:16 AM - edited 02-15-2007 04:16 AM
My Delphi knowledge approximates 0 and the last time I have used Pascal was when it was still called Turbo Pascal, so this may be not what you are looking for.
@marekm wrote:My problem is with Labview code compiled into a DLL.I have several VI's compiled into one DLL as seperate functions.I can pass values (such as doubles, with no problem)The problem is that I cannot pass an array into the DLL from Pascal.I have tried many different methods (pointers/not pointers etc.)I am trying to pass an array of doubles and the length as a long int.Please see the attached code. I have spent 3 days on this already so anyone that solves this gets a jam doughnut in the post 🙂The exe is the compiled Delphi code.RegardsMarek
Message Edited by rolfk on 02-15-2007 11:23 AM
02-15-2007 11:03 AM
Thanks for your reply!
The handles part of the code is actually commented out, that was something we tried earlier.
Someone mentioned to me that Labview is big endian and Delphi may be passing a little endian array which maybe causing my access violations. I presume this would explain why I can read single values but not arrays?
02-15-2007 12:41 PM
I see! Guessed so much but curly braces for comments is really something I didn't remember anymore.
@marekm wrote:
Thanks for your reply!
The handles part of the code is actually commented out, that was something we tried earlier.
Someone mentioned to me that Labview is big endian and Delphi may be passing a little endian array which maybe causing my access violations. I presume this would explain why I can read single values but not arrays?
02-16-2007 05:45 AM
02-16-2007 07:59 AM
Ok I just looked at Add25.vi and Array_Add10.vi as I don't have the Anritsu Instrument driver. Frist the writing of the result to a local variable of the input makes no sense at all. Probably shouldn't really hurt but it does definitely not help.
@marekm wrote:
Hi again, here is the Labview code and bld file. I am raising the stakes, if anyone can get this working I will buy them 2 doughnuts and a cream cake!PS I had to rename the RAR to a ZIP (incase of probs opening!)
02-19-2007 07:49 AM
02-19-2007 10:21 AM
Na! Just give me five stars. That's enough!
@marekm wrote:
Rolf,
Thanks for your very helpful reply. Thanks to you the problem is now solved. If you send me your paypal email, I will quite happily send you the doughnuts and the cream cake.
Regards
Marek
03-24-2007 09:40 PM