It would be ideal to have thinBasic SDK function allowing to do this, the syntax for ThinBASIC language itself could be arranged later and customized by module creators.
Something like:
thinBasic_GetTypeHandle( ByVal sType As String ) As Dword ' -- For decoding type from string
thinBasic_GetFunctionHandle( ByVal sFunction As String ) As Dword ' -- For decoding function from string
TYPE thinBasic_Param
valuePassingType As Long ' -- Byval/Byref
valueType As Long ' -- TypeOf thing, returned by thinBasic_GetTypeHandle
valuePointer As DWord ' -- Pointer to actual data
END TYPE
thinBasic_FunctionCallUDT ( ByRef variable As Any, functionHandle As DWord, params() As thinBasic_Param ) As DWord ' -- Allows using UDT variable directly or via ByVal pointer override, params passed as array of them. Returns pointer to return value
Petr
Bookmarks