PDA

View Full Version : tB + VS working together?



LCSims
10-07-2012, 02:17
A general question, of which I think the answer is no, but does thinBasic allow for working with a .Net .DLL file?

The .DLL file exposes some data while a game is running that I want to capture. I can also use it to write new data for the game's use, in my efforts to extract data. But it is set up as a .Net program and that would require me to get familiar with Visual Basic 2010, which I do have installed. I've done some very basic (no pun intended...) code and now need to get into more involved. I have a small degree of success and comfort with thinBasic and would like to try to utilize it, but I don't see any references to linking with a .Net file.

Is thinBasic an option? Or must I grit my teeth and try to learn what's necessary to work with VB2010?

Petr Schreiber
10-07-2012, 08:59
This is an interesting question. While ThinBASIC does not allow accessing .NET directly, it can work with COM objects.
If you are the creator of the .NET DLL, you might be able to produce COM wrapper to your .NET assembly from Visual Studio.

Then, you can work with the COM object as demonstrated in SampleScripts/COM/ examples.

The process of producing the COM from .NET is roughly described for example here:
http://support.microsoft.com/default.aspx?scid=kb;en-us;817248&Product=vb6

Here how to call the result from VBA:
http://support.microsoft.com/default.aspx?scid=kb;en-us;317535

And you can invoke VBA script from ThinBASIC as demonstrated in:
SampleScripts/COM/VBScript_Test.tBasic

So... to put it short:

It should be possible
But it will be more work than handling the case from VS directly



Petr

LCSims
10-07-2012, 19:40
Thank you for the reply, Petr. I'm not the originator of the code, just someone who wants to utilize it with the least amount of work/learning with another variant of BASIC. I'll figure out how to extract what I want and then come back to the familiarity of thinBasic to proceed with the work.

Lance

ErosOlmi
10-07-2012, 21:28
Definitely something I would like to work on in order to improve thinBasic usage of COM objects in a more "native way"
But not something just round the corner, sorry