Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Variant and SafeArray
Message
De
12/10/2011 03:06:32
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01525234
Message ID:
01526107
Vues:
65
OK, thanks Rick. Will look at getting wrapper built.


>Ah yes the good old problem of FoxPro and arrays that won't travel over COM :-) VFP arrays suck - the single worst feature in the FoxPro language.
>
>I remember struggling with this some time ago as well, and never found an acceptable solution. FoxPro can't properly create COM array types because FoxPro arrays are laid out differently. FoxPro can READ SafeArrays with the help of COMClassInfo but it can't create arrays that travel well over COM. For some reason I thought VFP 9 added some SYS() function that helped with this but I can't seem to find it in the help file now.
>
>I'm with Thomas on this: Create a wrapper in VB or C code and use that to build up a safe array and pass that through.
>
>While you're at it you might as well make that a generic SafeArray class that holds the array in VB (or whatever you use). I've done something similar for .NET interop in wwDotNetBridge here:
>
>http://www.west-wind.com/webconnection/wwClient_docs/_2mq0jxk83.htm
>
>Maybe the interface will give you some ideas...
>
>+++ Rick ---
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform