
Originally Posted by
gddeluca
Eros:
If I put the module's DLL in a /Bin directory under the EXEPath directory, then thinBasic does not seem to find the DLL at all.
If I put the module's DLL directly IN the EXEPath directory, then the DLL is found and a call to a function within it works perfectly.
e.g. my app calls thinBasic to run the script, the script successfully USES and calls a function in the module's DLL, and the script terminates normally via a STOP command.
If I then, without restarting my main app, repeat the call to run the script, the call to the DLL module fails.
If I restart my app again, I can invoke the script, with its USES DLL call once and only once. As I indicated earlier, the error is returned by the USES command (the USES fails with a return code of -3 saying the module is already loaded), which seems to indicate that thinBasic has not quite cleaned up the linkages from the first use of the DLL.
George
Dear George,
I just released thinBasic Beta 1.9.6.0
With this release I hope I fixed the problem you mentioned.
I also added two options that can be useful.
When you call thinBasic_RUN please indicate as Option parameter the following: 1 Or 2
Option parameter is a bit flag used to pass multiple options.
1 Or 2 means switch bit 1 and 2
1 = to consider as base directory the one of the executable running thinBasic_Run and not thinBasic itself
2 = in case of script run-time error, do not close calling application too. If this option is omitted, thinBasic runtime error engine will fire a PostQuitMessage in case of runtime error.
Below an example:
thinBasic_RUN( _
0& , _ 'Will be used in future release
sEmbedded_Script_Main , _ 'File name or string Buffer
1& , _ '0 = previous string is a File Name, 1 = previous string is a string Buffer
1 Or 2 , _ 'Options, set it to zero
%FALSE , _ 'Debug Mode %TRUE/%FALSE
%FALSE , _ 'Log Mode %TRUE/%FALSE
%FALSE , _ 'Obfuscate Mode %TRUE/%FALSE
0& , _ 'Calling Program 1=thinBasic, 2=Console
%FALSE _ 'Dependancy Mode %TRUE/%FALSE
) To lRet
Let me know if problems related to modules are now solved.
Remember to put modules you want to distribute into one of the following path:
- <yourapplicationpath>\mod\
- <yourapplicationpath>\lib\
Ciao
Eros