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.
T.O.,
I thought you were trying to create a *function* that returned a
DOUBLE. If that is the case, the DLOUBLE to which I was referring is
appended by VB YOU DON'T PUT IT IN YOUR DECLARE LIST. You put it in your
paramter list in BC++ however, and return that address as your function
result. Does that make sense? -=- Jonathan