Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DECLARE DLL problem
Message
De
12/11/2001 07:24:16
 
 
À
12/11/2001 04:45:28
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00580332
Message ID:
00580402
Vues:
21
>Alejandro,
>When passing arrays to API make your array a string. ie: a 6 doubles array :
>
>lcDoubleArray = replicate(chr(0),8*6)
>
>myDLL(..., @lcDoubleArray..)

Your approach is correct, but he'll need the UDFs contained in ClsHeap to then convert each 8 byte segment of the string from a string to a double, specifically DoubleToNum(). You can download ClsHeap from the Files Section; the source code for DoubleToNum() is:
FUNCTION DoubleToNum
LPARAMETER cDoubleInString
DECLARE RtlMoveMemory IN WIN32API AS RtlCopyDbl ;
	DOUBLE @DestNumeric, ;
	STRING @pVoidSource, ;
	INTEGER nLength
LOCAL nNum
* Note - the limit of decimal precision is established by the decimal precision
* of the pre-initialized numeric variable receiving the value
nNum = 0.0000000000000000000000000
=RtlCopyDbl(@nNum, cDoubleInString, 8)
RETURN nNum
I'm not certain if I've posted the latest version of ClsHeap with revised coinversion UDFs or not.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform