Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing arrays to a DLL
Message
From
14/07/2000 11:10:04
Jonathan Cochran
Alion Science and Technology
Maryland, United States
 
 
To
13/07/2000 13:56:49
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00391892
Message ID:
00392445
Views:
10
Erik,

Thanks for your help. I download the Structure class and was able to use Convert.fll to convert the numbers to strings and build a concatenated string to represent the array. It's working fine. We are running into some kind of memory leak issue, but I've been testing the call from VB also, and we are getting the same type of crashes after calling the DLL several times. Therefore, I think it's something in the ADA DLL.

Thanks again,
Jonathan

>>The DLL is not a COM object. It is a standard DLL that was written in ADA. Would COMARRAY have any affect here?
>>
>
>Sorry, I misunderstood. No, COMARRAY would not have an effect here, and you are correct in that you can pass them by passing a string. If the array is single dimensioned, you can pass it by converting your numerics into the character representation of a LONGs and DOUBLEs, 'stringing' them together, and passing the string to the function.
>
>For more information on how to convert to C data types, I recommend that you download Christof Lange's Structure class from the files section here. Along with an excellent essay on these topics, is a set of conversion routines that you can use to do this for you.
>
>
>>Thanks
>>
>>>>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.
>>>
>>>This is not true- see the VFP documentation for COMARRAY. Maybe what you saw was that you cannot assign a VFP array to a COM object property, which is true.
Previous
Reply
Map
View

Click here to load this message in the networking platform