Page 1 of 1

double float in CallCFunction

Posted: Thu Oct 28, 2004 6:38 am
by pj
I am trying to use PureBasic to call a number of 3rd party dlls using
CallCFunction (to drive a digital camera). Unfortunately, one of them requires that I pass a 64-bit (double) floating point variable (representing
integration time in seconds). Is there a straightforward way to convert a 32-bit floating point to get around the lack of 64-bit representation in Pure Basic?

Posted: Thu Oct 28, 2004 9:47 am
by Manolo

Posted: Thu Oct 28, 2004 12:52 pm
by Moonshine
That might not work, OpenGL wouldnt accept F64 doubles...

Posted: Fri Oct 29, 2004 12:06 am
by jack
the Dll probably expects a double value rather than a pointer to a double, try this:

Code: Select all

x.double
CallFunction( #DLL,"Function", x\a,x\b)
do that for all double arguments.