Michael Hartlef
09-09-2010, 20:58
Hi Eros,
'----------------------------------------------------------------------------
'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
How do I retrieve a return value from the function that was called. The function could look this this:
Function myFunc()
Console_PrintLine("Hello from TB->myfunc")
Function = 1
End Function
I call it inside the module like this:
num2 = thinBasic_FunctionSimpleCall(sBSTR,ret1, ret2)
but get only as a value.
'----------------------------------------------------------------------------
'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
How do I retrieve a return value from the function that was called. The function could look this this:
Function myFunc()
Console_PrintLine("Hello from TB->myfunc")
Function = 1
End Function
I call it inside the module like this:
num2 = thinBasic_FunctionSimpleCall(sBSTR,ret1, ret2)
but get only as a value.