Thanks for the idea.
I had thought about passing the value back as a string and then converting it to a numeric. However, since I really only needed 3 decimal places of precision, I am multiplying the result by 1000.0 in the DLL and divided by 1000.0 in the VFP code. I don't like putting in workarounds since they can make the code more difficult to maintain.
I still wonder why returning floats doesn't work.
>DOUBLE is a 4-byte (64-bit) floating point type both in C/C++ and VFP. DWORD is a 4-byte unsigned integer. The internal format is different.
>
>Vlad
>
>>Hi!
>>
>>Did you tried declare your function as String instead of Double (Can I
>>assume that it is DWORD in C++?) and then convert result to decimal value?
>>
>>Have a happy day
>>Vladimir Shevchenko
>>
>>> I had already tried setting nLineWidth to a float. It made no
>>difference.
>>> In particular. I had put
>>> nLineHeight = 1.1
>>> after the DECLARE DOUBLE line.
>>>
>>> >> in VFP
>>> >> DECLARE DOUBLE AQuAGetLineHeight IN AQuA_Lib INTEGER nInstanceID
>>> >> nLineHeight = AQuAGetLineHeight(1)
>>> >> wait window str(nLineHeight,10,3)