How to report host from non visual plugin progress?

Hi,
i want to move functionality into non visual plugin.
The host should load plugin, start plugin. Then the plugin does its job.
When it is finished, the plugin should contact the host, so that the plugin can be unloaded.

How can i archive that (.net)

KR
CBL

You can find this article useful

Thanks for the hint.

However i have difficulities bringing the pieces togehther.

Can you please provide a small example, where host and non visual plugin are written in C#.

Thanks in adavnce,

KR

CBL

Hello

Hydra ships with a .NET host sample (just ignore the projects that will fail to open, like Oxygene ones). The sample can be found in the folder

 c:\Users\Public\Documents\RemObjects Samples\Hydra for NET\Mixed Mode

The project ManagedCSharpHost. is a simple host application that supports both visual and non-visual plugins. Also Hydra provides a template for non-visual plugins. Take a look at this article, it describes how to create and use non-visual plugins: http://wiki.remobjects.com/wiki/.NET_Non-Visual_Plugins

Hope that helps

Sorry, but it seems that you misunderstood me
The request for a working example was for synchronizing non visual plugin with hist, all in C#

Thnaks in advance.

KR
CBL

You’d need to define a custom plugin interface:

Add a new Class Library project to your solution.

Define there plugin interface like

public interface IPluginModule
{
    void Execute();
    event EventHandler Completed;
}

Reference the newly added project from the plugin project and implement the interface by the non-visual plugin.

Reference the assembly containing the interface definition from the host application

Once the plugin is loaded check its type and start it:

(this.fCurrentPlugin as IPluginModule).Completed += (s, ea) => { MessageBox.Show("Done!"); };
(this.fCurrentPlugin as IPluginModule).Execute();

The plugin will be able to send a signal to the host via raising an event.

Hi,
thanks so far. I created a deno project, but all i get is debugger errir, not knowing where the problem is.

Could you please provide a complilable project for your last reply (Void Execute and Eventhandler)

KR

CBL

Hi,
where can i upload my example project ?

KR
CBL

You can attach it here or send directly to support@

Hi,

thanks, that did the trick.
Now it works as expected.

KR

CBL

A post was split to a new topic: Raising cross-patform events (.NET plugin vs Delphi host)