Using VFP 5.0, we are calling a function in a DLL that we wrote. The function in C++ returns a float. We have tried to declare it as first SINGLE and the DOUBLE. In both cases, the function was called, it returned a floating point number (checked from the debugger). It both cases, the return value was truncated to an integer. Does anyone have an idea what I'm not doing correctly?
in VFP
DECLARE DOUBLE AQuAGetLineHeight IN AQuA_Lib INTEGER nInstanceID
nLineHeight = AQuAGetLineHeight(1)
wait window str(nLineHeight,10,3)
in C++
float FAR PASCAL EXPORT AQuAGetLineHeight(long nInstanceID)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
// normal function body here
return(2.2345);
}
The wait iwndow shows 2.000.
Thanks,
Karen Lahey