Einzelnen Beitrag anzeigen

sebi87
(Gast)

n/a Beiträge
 
#17

Re: Formular in DLL

  Alt 31. Jan 2010, 11:16
Ich kapier es irgendwie nicht...

Habe den Code jetzt geändert

DLL:
Delphi-Quellcode:
procedure PluginForm ;
var
  PluginForm : TForm ;
begin
  PluginForm := TForm1.Create(nil) ;
  try
    PluginForm.ShowModal ;
  finally
    PluginForm.Release ;
    PluginForm := nil ;
  end ;
end ;
und den Aufruf:
Delphi-Quellcode:
  AHandle := LoadLibrary(PChar(ExtractFilePath(Application.ExeName)+'\Plugins\Project2.dll'));
  if AHandle <> 0 then begin
    @PluginForm := GetProcAddress(AHandle, 'PluginForm');
    if @PluginForm <> nil then
    begin
      PluginForm ;
    end;
    FreeLibrary(AHandle);
  end;
Aber es funktionier immer noch nicht
  Mit Zitat antworten Zitat