Page 1 of 1
float = callfunction()
Posted: Tue Sep 13, 2005 2:33 pm
by Dr. Dri
i have to do that :
Code: Select all
OpenLibrary(0, "VantagePro.dll")
f.f
CallCFunction(0, "GetDllVersion_V")
!FSTP dword [v_f]
Debug f
PureBasic should add the FSTP depending on the return variable type
Dri
Posted: Tue Sep 13, 2005 4:24 pm
by Polo
I second that, I really don't understand why we cannot get the floats out of a dll function, other programming languages manage to do it, and I think it's needed everytime when working with dll !
Re: float = callfunction()
Posted: Tue Sep 13, 2005 5:38 pm
by FloHimself
Dr. Dri wrote:PureBasic should add the FSTP depending on the return variable type
How should the CallFunction() / CallCFunction() know that the
DLL Function returns a float?
Only way i see is Fred giving us a way to declare external Functions like
in VB.
Re: float = callfunction()
Posted: Tue Sep 13, 2005 5:42 pm
by Dr. Dri
FloHimself wrote:How should the CallFunction() / CallCFunction() know that the
DLL Function returns a float?
Only way i see is Fred giving us a way to declare external Functions like
in VB.
I mean, if you use CallFunction in a purebasic local float variable, it should be automatic
Code: Select all
myFloat.f = CallFunction(lib, "function", parameters)
Dri
Posted: Wed Sep 14, 2005 11:55 am
by Froggerprogger
I mean, if you use CallFunction in a purebasic local float variable, it should be automatic
That would totally confuse! I suppose that many people use
bla.f = CallFunction(...) at the moment.
These lines would'nt work any longer, because the result would be read from the st0-register, not eax any longer.
I would prefer a simple:
CallFunctionF(...)
That has already been on the wishlist some time ago.
Posted: Thu Sep 15, 2005 10:30 pm
by Psychophanta
Froggerprogger wrote:
I would prefer a simple:
CallFunctionF(...)
That has already been on the wishlist some time ago.
What about
CallFunction.f(...) , CallFunction.b(...) , etc.
?