This message serves for Google indexing. It only includes the first message of each thread from technical forums. To see the entire thread, the solutions and the technical content related to each message, you need to log in by going to the main page. This can be done at http://www.universalthread.com. If you do not have an account, we encourage you to create one now and start participating in Microsoft .NET and SQL Server related technology forums, just to name a few. Our database contains nearly two millions valuable high end technical messages. Thanks for the generous contribution to everyone who participated on the site so far, including MVP, Microsoft employees and many other well known contributors. The valuable content of the Universal Thread has created a history of 16 years of high end technical content which has helped many consultants, developers and many others in the industry on a daily basis. The site also offers a subscription option that greatly enhances your site experience.


View message
From09/07/1997 15:06:51
Karen Lahey #003002
Huron Valley Software Consulting LLC
Ann Arbor, Michigan, United States
To  
All


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
Karen E. Lahey
Huron Valley Software Consulting LLC
klahey@hvsc.com