Re: Plugin Enabled Applications

From: Peter Below (TeamB) (100113.1101_at_compuXXserve.com)
Date: 10/24/03


Date: Fri, 24 Oct 2003 20:42:45 +0200

In article <3f993010@newsgroups.borland.com>, NightWalk wrote:
> I want to include plug-in support into my application. I don't know where
> should i start and there is some design questions in my mind. For example,
> is plug-in system useful for every kind of code modules ? Which should i
> choose packages or DLLs.. Can you give me a roadmap about to develop plug-in
> enabled applications in Delphi ?

If you can live with a Delphi-only solution use packages.

Plugin frameworks
 http://www.uil.net/uProducts/TheUILPluginFramework.html
 http://www.athrasoft.com (SmartPlugin)
Runtime Packages Frame Work
 http://www.obsof.com/delphi_tips/delphi_tips.html
 http://jvcl.sourceforge.net/ has plugin stuff as well

If you need to support plug-ins written in other languages you have to use
DLLs. Define an interface between plug-in DLL and app in terms of a set of
COM interfaces, e.g. DLL has to export a function of name GetPlugin that
returns an interface reference of type IPLugin (which you define). One method
of this interface can be used to pass an interface from the app to the DLL to
allow it to access certain functionality in the EXE. IPLugin would then offer
methods to create a plugin, for example, passing in a window handle to use as
parent (if the plugin should be a child of your host form instead of a
top-level window), and so on. If you stick to COM compatible data types and
calling conventions (stdcall or safecall if you use IDispatch-based
interfaces) most languages that can be used to build Windows apps will be
usable for plugin development.

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


Relevant Pages

  • Re: Access base window class (FromHandlePermanent)
    ... The way I handle this is to specify a "plugin interface". ... The DLL, to be a valid plugin, must export a number of functions that are called by the ... fact that the hosting app might be statically linked, ...
    (microsoft.public.vc.mfc)
  • Re: Question about loading class elements dynamically
    ... Do I define my interface in a seperate class file that will be ... What kinds of informatition do I need to put in my interface class? ... Any given plugin will contain a bunch of Windows Forms that will ... the user and then call from2 (also contained in this external dll). ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Question about loading class elements dynamically
    ... No it should be in a seperate dll the interface must be included with the ... Any given plugin will contain a bunch of Windows Forms that will ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Dynamic Class loading and if () statements
    ... Matt Humphrey wrote: ... Furthermore, the interface will have a class file, but it will ... The implementation of the plug-in will rely on the ... another third-party plugin, which i never heared about, in this optional ...
    (comp.lang.java.help)
  • InvalidCastExcetion after AppDomain.CreateInstanceFromAndUnwrap
    ... This exception is driving me crazy for now ... ... the plugin support is added with the help of C# interfaces. ... This tiny class is compiled in the dll "IPBlocklist.dll" ... directory dll that exposes class implementing interface IMyAppPlugin. ...
    (microsoft.public.dotnet.framework)