Thanks Petr.
Can you do MSVC same or other minimal example for module class? Perhaps FreeBASIC?
As the ThinBASIC 1.8.8.0 introduced the module class concept, and some users start to experiment with it, I attach here very simple example of module exposing class.
- The PowerBASIC module code, contained in thinBasic_Vector3D.bas, defines the Vector3D class with constructor, destructor and single "normal" method, called ToString
- The ThinBASIC test code, represented by thinBasic_Vector3D_Test.tBasic, shows how to instantiate and use the created object
It is very simple project just to demonstrate few important steps in module class creation:
- creating internal COM representation
- creating visible interface to it via thinBasic_Class* SDK functions
- creating wrapper functions/subs for methods, taking care of instantiation, release and parameter parsing (same as in normal modules)
Petr
Last edited by Petr Schreiber; 03-07-2011 at 11:48.
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Thanks Petr.
Can you do MSVC same or other minimal example for module class? Perhaps FreeBASIC?
Hi Maxim,
I am sadly not familiar with C or FreeBASIC approach to create COM classes, maybe other guys will know better.
I know that you can create classic modules (without classes) quite easily with FB, C (as seen in ThinBASIC/SDK samples), but the classes are new thing to the SDK, so no examples are present at the moment.
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Thanks Petr.
One of the guys you advise?
Bookmarks