I use visual plugins without runtime packages. In some of these plugins I use DevExpress components and some require the Application.Handle parameter to be set. What is the correct logic in this condition to pass the handle from the host to the plugin?
You can create a custom interface from IHYCrossPlatformHost that will return Application.Handle.
later from plugin side you can cast plugin.CrossPlatformHost to your custom interface and ask for that value.
but I can set the Application.Handle (and other params) in modulecontroller?
I would like to centralize some parameters that I need when the plugin is loaded. In the OnSetHost event I will set the values. I tried to pass values in the HostParameters property. They arrive to me correctly but then it raises an access violation. I think it is related to it being a TStrings object and not using the packages raises the error. Correct?
You can’t pass delphi objects or delphi strings between host and plugin when shared runtime packages aren’t used.
Note: You can’t use Hydra/VCL interfaces (interfaces from Hydra.VCL.Interfaces.pas) because they pass objects & strings.
By other hand, you can use cross platform interfaces (interfaces from Hydra.Core.Interfaces.pas). They use interfaces and WideStrings for communication