Hi Maxim,the code in one line is a bit hard on the eyes, do you think you could break it to lines?
thinBasic_FunctionGetPtr is function, which serves to retrieve something like code pointer to function defined in ThinBASIC code, but it is not synonym of classic CODEPTR in compiled code. The value returned by
thinBasic_FunctionGetPtr is designed to be used with
thinBasic_FunctionSimpleCall_ByPtr or
thinBasic_FunctionCall_ByPtr.Please have a look to your ThinBASIC/SDK directory, unzip the ZIP file, and check out for example the sample module in thinBasic\SDK\thinBasic BASIC SDK\PB\.You will see the function referenced by function pointer must perform the parsing of parameters on its own, via stuff calls to things like
thinBasic_ParseNumber and so on, you cannot directly wrap functions from DLL this way.It also seems you are trying to use SDK functions in ThinBASIC code. It is possible, but you won't create module this way. You need some compiler, such as PowerBASIC, to produce the module DLL.If you want to create Module Class, you currently need to create the class internally as COM class, and then wrap it.I hope this text helped you a bit. If not please do not hesitate to ask, but please do it in the dedicated thread in
ThinBASIC SDK forum, to not interfere with effort of Largo_Winch.
Petr
Bookmarks