by Arne Elster (23 Submissions)
Category: OLE/COM/DCOM/Active-X
Difficulty: Advanced
Date Added: Wed 3rd February 2021
Rating: (13 Votes)
This class finds and loads plugins, you just specify the interface the plugins have to implement.
//// How it works: You create a new ActiveX DLL, add a class to it, and enter all the properties and functions your plugins have to implement (you design the plugin interface). After compiling, you create a plugin (again an ActiveX DLL) which implements ('Implements' keyword) the interface, and add some code to it. After compiling this DLL you tell the Plugin Framework which interface your plugins implement and let it search for it. The Framework will look in the directory you specified, register all DLLs and if one of the classes in a DLL implements the plugin interface, the Framework will return it to you. No need for CreateObject anymore. /// How to get this demo working: Compile the plugins in the "plugins" directory, and place the DLLs there. Then simply run "Projekt1.vbp", but make sure you referenced the typelib in the "typelib" directory.
Download Plugin Framework (192 KB)