Help! Delphi Host + .NET Core 8 (WinForms) Plugin

Can someone help me to point out where can I find a DEMO illustrating Delphi Host + .NET Core (WinForms) ?

Thank you

Hi,

I’ve attached example:
30981.zip (29.2 KB)

Delphi host requires runtime packages in trial version. in full version, it can be created w/o runtime packages for using with .net plugins.

.NET plugin should be registered with regsvr32 ClassLibrary1.comhost.dll.
Note: it will require admin rights for launching regsvr32.

1 Like

Thank you @EvgenyK

I wonder how the Application domain is handled for the .NET core visual plugin?
Is VisualPlugin.pas where I should look at?

Hi,

.NET Core plugins are consumed as COM objects.
so Delphi host knows nothing about Application domain and it loads plugin via WinAPI CreateComObject method.

it’s a reason why .NET Core plugin should be registered with

regsvr32 ClassLibrary1.comhost.dll

@EvgenyK Thank you.

What about the following case - Application Domain would still not an issue right?

.NET host + .NET Visual Plugin
Delphi host + **multiple** .NET Core Visual Plugins

Hi,

I can suggest to read Exposing .NET Core components to COM - .NET | Microsoft Learn article

1 Like

@EvgenyK Thank you for the advice and suggestions.

For the .NET Core WinForms Plugin, where can I set the “HighDPI” settings, for example “Per Monitor v2”? Or this is handled by Delphi host seamlessly?

Thanks again

Hi,

You can set “Per Monitor v2” in Delphi IDE:

1 Like