Call a host command and several forms in a plug-in


I'm finally trying to get going with the plug-in system and have two questions...

Can the plug-in call a host command? What I would like to do is to call several functions in the host to create the menu system when loaded. As I will use the TAdvToolBarPager, I need to create a page and several tool-bars with commands. I guess a inherited components is a way to go, so I could add page and toolbar settings in there? Any thoughts on how this is best done?

Secondly, can the plug-in hold several forms? Mostly I need a main form for the module, a setup form and some forms for dialogues and so on in each plug-in.

A nice, more complex, demo project would have been nice to have in the plugin package to get started, especially how to properly use it with other TMS components like the TAdvToolBarPager.

Any help or ides is very much appreciated! Or if I'm just trying to do it the wrong way ;-)


In demo 4, it is shown how an ICustomAppServices interface is created (that the plugin can use to call host service) and a custom ICustomPluginInfo interface that the host can use to call a plugin service.
With these two custom interfaces, you can add bidirectional customization for the plugin framework.
A plugin can hold multiple forms. Not sure how / when you want to invoke these forms from the host, but there shouldn't be a limitation to add multiple forms.

I missed that sample! That should make it fairly easy to populate a TAdvToolBarPager menu from the plug-in.