I have a basic Plugin app built with C# and I have a Host app in D2010.
The Plugin has a Map Control from “Great Maps for Windows” (http://greatmaps.codeplex.com/releases/view/20235).
My Delphi code is below. It loads the plugin module fine, but it throws the exception when it tries to do CreateVisualPlugin().
If I remove the Great Maps component and put other components (e.g. Buttons, checkboxes, etc.), it loads and displays the plugin just fine.
The strange thing is that this has worked for a couple of years with this particular Map Control and I have not updated it at all.
When I updated to Hydra v4.0.71.1093.exe recently, however, it no longer works.
Please help.
Thanks,
Shane
unit fMain;
interface
uses
Windows,
Messages,
SysUtils,
Variants,
Classes,
Graphics,
Controls,
Forms,
Dialogs,
uHYModuleManager,
uHYIntf,
StdCtrls,
ExtCtrls;
type
TMainForm = class(TForm)
HYMM: THYModuleManager;
pnlTop: TPanel;
pnlMap: TPanel;
btnLoad: TButton;
procedure btnLoadClick(Sender: TObject);
private
FMapVisualPlugin: IHYVisualPlugin;
public
{ Public declarations }
end;
var
MainForm: TMainForm;
const
MapModuleName = ‘TestPlugin.dll’;
MapPluginName = ‘TestPlugin.ThePlugin’;
implementation
{$R *.dfm}
procedure TMainForm.btnLoadClick(Sender: TObject);
begin
HYMM.LoadModule(MapModuleName);
HYMM.CreateVisualPlugin(MapPluginName, FMapVisualPlugin, pnlMap);
end;