Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DECLARE DLL problem
Message
From
12/11/2001 07:24:16
 
 
To
12/11/2001 04:45:28
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00580332
Message ID:
00580402
Views:
20
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform