-
DLL Plugin system
Concerning design methods for my 3D Engine, I have tested several, but I think that a plugin system would be excellent. However, I don't know from where to start! I have experience in making DLLs, but i don't know how to make a plugin system.
If anyone can help me out here, I'd appreciate it a lot.
Thanks!
-
if you've ever messed with activeX or netscape plugins you would see a concept of standard interfaces.
a standard interface is one that should be enough for any plugin. It's a series of function calls that your dll will have to implement in order to work. plus you may want to include a standard callback interface for the main app.
-
Can you point me to some tutorials? Cause I've never worked with ActiveX or netscape plugins, just win32 DLLs.
-
I am not familiar with any tutorials really but it's a simple concept.
ask yourself, what you want a plugin to be allowed to do. Then define the interface it must have. an interface can be a series of exported functions in the dll or a pointer to a class interface or even (as in NS plugins) a pointer to a struct full of function pointers.
-
Then just have some registration process. A plugin is assiciated with some file type or something. Either that has to be "installed" or it can be done when the program loads. For instance a function called GetPluginInfo() can be called on every dll in the plugin directory when your main app loads.
-
I surely can export a class out of a plugin (I don't know if i say this correctly), cause I need to.
Do you have any sample plugin code? ANything smalla dns imple to get me started?
Thanks
-