Hi Eros,
[code=thinbasic]
'----------------------------------------------------------------------------
'thinBasic_FunctionSimpleCall
'----------------------------------------------------------------------------
' Call a script function and optionally returns it value (numeric or string)
'----------------------------------------------------------------------------
Declare Function thinBasic_FunctionSimpleCall _
Lib "thinCore.DLL" _
Alias "thinBasic_FunctionSimpleCall" _
( _
ByVal FunctionName As String, _ '---Name of the function
Optional _
ByVal ptrEXT As Ext Ptr, _ '---Used to get back from the called function a numeric value
ByVal ptrSTR As String Ptr _ '---Used to get back from the called function a string value
) As Long
[/code]
How do I retrieve a return value from the function that was called. The function could look this this:
[code=thinbasic]
Function myFunc()
Console_PrintLine("Hello from TB->myfunc")
Function = 1
End Function
[/code]
I call it inside the module like this:
[code=freebasic]
num2 = thinBasic_FunctionSimpleCall(sBSTR,ret1, ret2)
[/code]
but get only as a value.
Bookmarks