Float parameter problem when making a DLL
Posted: Mon Dec 12, 2005 11:22 am
Hi Everyone,
I made a very tiny DLL just to test if I could do it.
The source seemed something like the example one in the help
ProcedureDLL.f own_msg(p_msg.s, p_value.f)
l_value.f = p_value * 2
Result = MessageRequester(p_msg, p_msg + " " + str(p_value), #PB_MessageRequester_Ok)
ProcedureReturn(l_value)
EndProcedure
The caller was
If OpenLibrary(0, "test.dll")
Rvalue.f = CallFunction(0, "own_msg", "Hi there", 1)
EndIf
It worked fine except that the DLL procedure received 0 through the parameter p_value. If I changed the p_value type to p_value.l (long),
it worked.
Does anybody met something before? Or should I know something specific about this? It can be worked around really, but...
I made a very tiny DLL just to test if I could do it.
The source seemed something like the example one in the help
ProcedureDLL.f own_msg(p_msg.s, p_value.f)
l_value.f = p_value * 2
Result = MessageRequester(p_msg, p_msg + " " + str(p_value), #PB_MessageRequester_Ok)
ProcedureReturn(l_value)
EndProcedure
The caller was
If OpenLibrary(0, "test.dll")
Rvalue.f = CallFunction(0, "own_msg", "Hi there", 1)
EndIf
It worked fine except that the DLL procedure received 0 through the parameter p_value. If I changed the p_value type to p_value.l (long),
it worked.
Does anybody met something before? Or should I know something specific about this? It can be worked around really, but...