Board index » delphi » [ ot ] plugins & rtti

[ ot ] plugins & rtti


2005-12-05 02:42:57 AM
delphi196
hello,
It's little bit off topic, I Know...sorry.
Let's say, I have own application, that supports
plugins (in other words, it has own folder called
i.e."plugins", and OnCreate my application, will
scan this folder, and try to find files with the '*.dll;
extension ), the plugin module can stores any objects,
with own properties....my question is, if that plugin DLL
will be made in any C++ compilers, does the RTTI work ??
Won't it raise any exceptions ??
thanks a lot...
Ivan
 
 

Re:[ ot ] plugins & rtti

In article <43933876$XXXX@XXXXX.COM>, Ivan Sivak Jr. writes:
Quote
Let's say, I have own application, that supports
plugins (in other words, it has own folder called
i.e."plugins", and OnCreate my application, will
scan this folder, and try to find files with the '*.dll;
extension ), the plugin module can stores any objects,
with own properties....my question is, if that plugin DLL
will be made in any C++ compilers, does the RTTI work ??
No, the RTTI structure Borland uses is specific to Borland compilers,
in this case Delphi and C++ Builder. Unless you are talking .NET, of
course.
Quote
Won't it raise any exceptions ??
If you want to share objects between modules you have only three
choices (well, four if you're picky <g>, but using pure abstract base
classes is basically the same as using interfaces, minus the reference
counting, and it is not language-neutral):
- you can build both modules with run-time packages to share the
Delphi RTL and VCL and your own classes code, where required,
through shared packages. This limits the tools that can be used
to build the plugins to Delphi and C++ Builder.
- you can use interfaces instead of object references to share stuff
between the modules. Use COM DLLs, for example. If you limit yourself
to COM/API compatible data types in the parameters you use that
allows you to use basically any tool that can build COM DLLs for the
plugins.
- you can use a Windows-API style plugin interface, with a procedural
interface for the DLL (a set of exported functions that take an
opaque handle/pointer parameter representing a DLL object).
Peter Below (TeamB)
Use the newsgroup archives :
www.mers.com/searchsite.html
www.tamaracka.com/search.htm
groups.google.com
www.prolix.be
 

Re:[ ot ] plugins & rtti

thanks a lot peter...
"Peter Below (TeamB)" <XXXX@XXXXX.COM>píse v diskusním
príspevku news:XXXX@XXXXX.COM...
Quote
In article <43933876$XXXX@XXXXX.COM>, Ivan Sivak Jr. writes:
>Let's say, I have own application, that supports
>plugins (in other words, it has own folder called
>i.e."plugins", and OnCreate my application, will
>scan this folder, and try to find files with the '*.dll;
>extension ), the plugin module can stores any objects,
>with own properties....my question is, if that plugin DLL
>will be made in any C++ compilers, does the RTTI work ??

No, the RTTI structure Borland uses is specific to Borland compilers,
in this case Delphi and C++ Builder. Unless you are talking .NET, of
course.

>Won't it raise any exceptions ??

If you want to share objects between modules you have only three
choices (well, four if you're picky <g>, but using pure abstract base
classes is basically the same as using interfaces, minus the reference
counting, and it is not language-neutral):

- you can build both modules with run-time packages to share the
Delphi RTL and VCL and your own classes code, where required,
through shared packages. This limits the tools that can be used
to build the plugins to Delphi and C++ Builder.

- you can use interfaces instead of object references to share stuff
between the modules. Use COM DLLs, for example. If you limit yourself
to COM/API compatible data types in the parameters you use that
allows you to use basically any tool that can build COM DLLs for the
plugins.

- you can use a Windows-API style plugin interface, with a procedural
interface for the DLL (a set of exported functions that take an
opaque handle/pointer parameter representing a DLL object).



--
Peter Below (TeamB)
Use the newsgroup archives :
www.mers.com/searchsite.html
www.tamaracka.com/search.htm
groups.google.com
www.prolix.be