Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing arrays to a DLL
Message
From
14/07/2000 11:12:38
Jonathan Cochran
Alion Science and Technology
Maryland, United States
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00391892
Message ID:
00392447
Views:
9
Thanks, Rick. Erik Moore pointed me to Christof Lange's Structure class, and I was able to use that to convert the numbers to character representations and build a concatenated string to represent the array.

Jonathan

>VFP arrays are not real binary arrays, so no you can't call DLL functions with an array parameter directly. However, you can simulate the array with a properly padded string that contains the elements in the right binary order.
>
>+++ Rick ---
>
>
>>VFP 6.0 SP3
>>
>>We are trying to call a DLL (written in ADA) that takes arrays as parameters. It doesn't modify the arrays, it just takes them as input parameters. I've done some searching and found that you can't pass arrays to DLLs directly from FoxPro. However, I did see some mentions of being able to use a string in place of the array. I haven't seen any examples of doing this, so I was wondering if anyone has done something like this in the past and could give me a hand, if it is even possible.
>>
>>We have an example of the function call from Visual Basic. There are four arrays passed: two arrays of Double and two of Long. If it's possible to use a string to pass these arrays of numbers to the DLL function, does anyone know how I would fill the string with data to pass to the DLL?
>>
>>Thanks,
>>Jonathan Cochran
Previous
Reply
Map
View

Click here to load this message in the networking platform