Valhalla Legends Forums Archive | C/C++ Programming | Creating a Plugin System

AuthorMessageTime
Mephisto
Does anyone here have any links to tutorials or information regarding this creating/implementing a plugin system, both creating the plugins and the system for the plugins.  Thanks to anyone who provides.  :)
October 4, 2004, 3:50 AM
Myndfyr
[quote author=Mephisto link=topic=9003.msg83155#msg83155 date=1096861856]
Does anyone here have any links to tutorials or information regarding this creating/implementing a plugin system, both creating the plugins and the system for the plugins.  Thanks to anyone who provides.  :)
[/quote]

You should be more specific.  What kind of plugins are we talking about (for example, something core/essential to the product or extra features, such as a primary protocol vs. a protocol extension)?  What platforms are you targetting?  Etc.
October 4, 2004, 8:42 AM
Mephisto
Win32, extensions for the program (the plugins are not the program's core), and general tutorials on creating plugins.  I have a general idea on how to develop them, but I haven't been able to find any decent resources on creating them, nor example programs.
October 4, 2004, 2:21 PM
Grok
You could study COM or CORBA, both which implement a style of plugin.  Once you get the big picture you could use that knowledge to design your own system.  Generally, though, it is better to use an existing well-defined interface system than to roll your own.
October 4, 2004, 4:32 PM
Mephisto
[quote author=Grok link=topic=9003.msg83179#msg83179 date=1096907523]
You could study COM or CORBA, both which implement a style of plugin.  Once you get the big picture you could use that knowledge to design your own system.  Generally, though, it is better to use an existing well-defined interface system than to roll your own.
[/quote]

Are these already created systems free and avaliable to the public?  If so, do you know where I could attain one?
October 4, 2004, 5:54 PM
Myndfyr
[quote author=Mephisto link=topic=9003.msg83195#msg83195 date=1096912487]
[quote author=Grok link=topic=9003.msg83179#msg83179 date=1096907523]
You could study COM or CORBA, both which implement a style of plugin.  Once you get the big picture you could use that knowledge to design your own system.  Generally, though, it is better to use an existing well-defined interface system than to roll your own.
[/quote]

Are these already created systems free and avaliable to the public?  If so, do you know where I could attain one?
[/quote]

COM is part of Visual C++, implemented generally in the Active Template Library (ATL).
October 4, 2004, 7:19 PM
Skywing
[quote author=Grok link=topic=9003.msg83179#msg83179 date=1096907523]
You could study COM or CORBA, both which implement a style of plugin.  Once you get the big picture you could use that knowledge to design your own system.  Generally, though, it is better to use an existing well-defined interface system than to roll your own.
[/quote]
Note that COM is extremely painful to use from a language that doesn't have built-in support for it (e.g. VB, C#, ...).
October 4, 2004, 7:34 PM
St0rm.iD
I had to do a ton of webcam/directshow COM programming, and let me tell you, it SUCKS. It's mainly a documentation issue, though.
October 4, 2004, 7:36 PM
Grok
[quote author=Banana fanna fo fanna link=topic=9003.msg83206#msg83206 date=1096918576]
I had to do a ton of webcam/directshow COM programming, and let me tell you, it SUCKS. It's mainly a documentation issue, though.
[/quote]

A particular implementation of a library is way off topic to whether COM or CORBA is a suitable plugin platform.
October 4, 2004, 9:10 PM
Grok
[quote author=Skywing link=topic=9003.msg83205#msg83205 date=1096918470]
[quote author=Grok link=topic=9003.msg83179#msg83179 date=1096907523]
You could study COM or CORBA, both which implement a style of plugin.  Once you get the big picture you could use that knowledge to design your own system.  Generally, though, it is better to use an existing well-defined interface system than to roll your own.
[/quote]
Note that COM is extremely painful to use from a language that doesn't have built-in support for it (e.g. VB, C#, ...).
[/quote]

Probably.  Now that I think about it, COM or CORBA might not be an answer to the question.  COM/CORBA are designed to provide self-describing interfaces between unfamiliar code objects.

Now I think the request was to provide a well-known interface, so COM might only be an available mechanism, not a predefined interface.  If he wants a well-known plugin interface, I do not have an answer for him.  Does he want one with callbacks?
October 4, 2004, 9:20 PM
Myndfyr
[quote author=Skywing link=topic=9003.msg83205#msg83205 date=1096918470]
Note that COM is extremely painful to use from a language that doesn't have built-in support for it (e.g. VB, C#, ...).
[/quote]

I thought VB *does* have built-in support via ActiveX.  I could be off.  But VB7 and C# do have nearly-built-in support via RCWs.  All you have to do is import it into your VS.NET project, or use the command-line tool to generate an assembly.
October 4, 2004, 9:43 PM
Skywing
[quote author=MyndFyre link=topic=9003.msg83239#msg83239 date=1096926205]
[quote author=Skywing link=topic=9003.msg83205#msg83205 date=1096918470]
Note that COM is extremely painful to use from a language that doesn't have built-in support for it (e.g. VB, C#, ...).
[/quote]

I thought VB *does* have built-in support via ActiveX.  I could be off.  But VB7 and C# do have nearly-built-in support via RCWs.  All you have to do is import it into your VS.NET project, or use the command-line tool to generate an assembly.
[/quote]
Rephrasing:

Note that COM is extremely painful to use from a language that doesn't have built-in support for it (like for instance VB and C# do).
October 5, 2004, 4:03 AM
St0rm.iD
Is COM available for Linux?
October 6, 2004, 12:43 AM
thetempest
COM is just "C Object Modle" I fogot what C stands for, anyways, the methodolgy is easy to do on linux...

the problem, i dont think you can get your COM to work with M$.  I used to do COM but it's been a while.

Sorry, wish i could be of more help, if i get some freetime, i'll see what i can digup.

Good luck
October 13, 2004, 3:09 PM
Myndfyr
[quote author=thetempest link=topic=9003.msg84204#msg84204 date=1097680163]
COM is just "C Object Modle" I fogot what C stands for, anyways, the methodolgy is easy to do on linux...

the problem, i dont think you can get your COM to work with M$.  I used to do COM but it's been a while.

Sorry, wish i could be of more help, if i get some freetime, i'll see what i can digup.

Good luck
[/quote]

COM is "Component Object Model".  COM is not available for Linux, unless it was implemented with Wine, which I highly doubt.  It's generally messy, a pain, and requires a lot of work; it's supposed to provide language interoperability.  I don't know what in hell you're talking about, tempest, with it working easily for Linux and not for Windows...
October 13, 2004, 6:56 PM
Skywing
There was at one time COM for UNIX like there was IE for UNIX...
October 13, 2004, 10:22 PM

Search