Hi,
I have a few ideas on how to do this, just wondering what other peoples are thoughts on the matter of writting a plugin for your own software would be.
My idea is that every plugin has one function in common with all, which returns in a structure all the functions within the plugin, these are then stored by the main program and called when they are needed. is this the best way or does anyone have thing better ?
Writting A Plugin In System
- tinman
- PureBasic Expert

- Posts: 1102
- Joined: Sat Apr 26, 2003 4:56 pm
- Location: Level 5 of Robot Hell
- Contact:
Re: Writting A Plugin In System
Well, that's what Windows DLLs do anyway. Don't know about Linux, and it is slightly different on the Amiga, but still possible to use system libraries as your plugins.Inner wrote:My idea is that every plugin has one function in common with all, which returns in a structure all the functions within the plugin, these are then stored by the main program and called when they are needed. is this the best way or does anyone have thing better ?
Windows and AmigaOS both let you specify the path to load a system library. Linux probably does too.
System libraries would not need any special tools for them to be created. Most compilers available for your platform can create them. Therefore it is easier to get other people to create plugins for your software, than if you forced them to need strange tools.
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
(WinXPhSP3 PB5.20b14)