Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing arrays to a DLL
Message
De
14/07/2000 11:12:38
Jonathan Cochran
Alion Science and Technology
Maryland, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00391892
Message ID:
00392447
Vues:
8
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform