#BAD DLL CALLING CONVENTI
04-Oct-91 18:32:59
Sb: #BAD DLL CALLING CONVENTI
Fm: T.O. 70524,3723
To: Jonathan Zuck (UFI) 76702,1605
Tried your suggestion with Borland C++ re DLL function that returns a
double and could not make it work. The following code shows you how to do
it.
My DLL C function looks like this
void FAR PASCAL MyDouble(char *ASCnum, double *dval)
{
*dval = 3216.78; (or whatever)
}
and my Vis Basic declaration looks like this:
Declare Sub MyDouble Lib "mylib.dll" (Byval ASCnum$, DVal#)
and then in the Basic proc
Dim DoubleVal as Double
DoubleVal = 0
Call MyDouble("12345", DoubleVal)
and voila! DoubleVal has 3216.78 in it!
hope this helps!
There is 1 Reply.