Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stumped by a DLL
Message
De
04/10/2005 15:02:26
 
 
À
04/10/2005 13:56:16
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01052286
Message ID:
01056007
Vues:
33
Hello,

i assume you're currently passing the array in a character variable and DECLAREing the array parameter as STRING type, maybe your DoubleArrayToString routine has some faults?

you may have a look at download #28338, it contains a class called "CDoubleArray" in the file "vfp2c.prg" which is a wrapper around a real C style array of doubles

you may use it like:
&& init library as described in help ..
LOCAL ArrayWithYourValues[20], loCArray, lnParm1, lnParm2
&& init ArrayWithYourValues from somewhere ...
loCArray = CREATEOBJECT('CDoubleArray')
loCArray.MarshalArray(@ArrayWithYourValues)
&& now loCArray has created a copy of your array as an C style array
&& you can pass to your DLL function
DECLARE INTEGER foo IN foo.dll DOUBLE @ someParm1, DOUBLE @ someParm2, INTEGER theArray

lnParm1 = 0.0
lnParm2 = 0.0
?Foo(@lnParm1,@lnParm2,loCArray.Address)
&& loCArray.Address contains the real memory address of the C style array ..
that's the only thing that currently comes to my mind ... since your question was somewhat "generic" in nature ..

Regards
Christian
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform