Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stumped by a DLL
Message
De
04/10/2005 13:56:16
 
 
À
03/10/2005 16:53:52
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:
01055971
Vues:
33
Hi Christian,

I wish it were that simple. Now, this DLL is complicated and takes a lot of parameters. When looking at the CPP code, I realized that it could set the value of the Double parameter to the value of an array passed.

Now, this array is inited in VFP and typically has values like 48.00, 0.00, 45.50.....and is sometimes set = to the value of an element in the array.

Is it possible that the DLL is not reading the VFP array correctly? Bear in mind that this is *not* COM so I can't use COMARRAY.

Thanks.



>Hello,
>
>i've tested the marshaling of doubles on my own dll ... works flawlessly ..
>
>e.g.
>
>int _stdcall FooDouble(double *myP1, double *myP2)
>{
>*myP1 = 3.333;
>*myP2 = 4.444;
>return 1;
>}
>
>DECLARE INTEGER FooDouble IN myDll.dll DOUBLE @, DOUBLE @
>
>lnNum1 = 0
>lnNum2 = 0
>?FooDouble(@lnNum1,@lnNum2)
>
>one strange thing is that the ? operator (to put the variable on screen) shows only as many digits as the variable were defined with
>
>? lnNum1 && shows only "3" instead of "3.333"
>but
>? STR(lnNum1,10,10) && shows "3.333000000.."
>
>so the actual marshaling of the values works just fine ..
>maybe the ? "bug" tricks you ..
>
>Regards
>Christian
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform