Nein, ich habe aber eine Schnittstelle dafür, über die ich darauf zugreife. Die einzige Funktion, die exportiert wird ist "LadePlugIn".
Hier mal die Schnittstelle, von der die PlugIns abgeleitet sind:
Delphi-Quellcode:
unit PJV3PlugIn;
interface
type
TProJurisPlugIn =
class
private
FParent: THandle;
procedure SetParent(
const Value: THandle);
public
constructor Create(aParent: THandle);
//Laden, öffnen, schließen
procedure CreateForms;
virtual;
stdcall;
abstract;
procedure Execute;
virtual;
stdcall;
abstract;
procedure FreeForms;
virtual;
stdcall;
abstract;
//Plug-In-Infos
function GetTitel(Buffer: PChar; lenBuffer: Integer): Integer;
virtual;
stdcall;
abstract;
function GetAppKey(Buffer: PChar; lenBuffer: Integer): Integer;
virtual;
stdcall;
abstract;
function SendFormHandle: Integer;
virtual;
stdcall;
abstract;
//procedure SwitchShowStyle; virtual; stdcall; abstract;
property Parent: THandle
read FParent
write SetParent;
end;
TLadePlugIn =
function(Parent: THandle;
var PlugIn: TProJurisPlugIn): Boolean;
implementation
constructor TProJurisPlugIn.Create(aParent: THandle);
begin
inherited Create;
FParent := aParent;
end;
procedure TProJurisPlugIn.SetParent(
const Value: THandle);
begin
FParent := Value;
end;
end.
und hier nochmal das PlugIn, welches diese Maske "füllt":
Delphi-Quellcode:
library Kalender;
uses
FastMM4,
Forms,
SysUtils,
PJV3PlugIn,
Unit1 in 'Unit1.pas' {Form1};
type
TCalendar = class(TProJurisPlugIn)
public
//laden, öffnen, schließen
procedure CreateForms; override; stdcall;
procedure Execute; override; stdcall;
procedure FreeForms; override; stdcall;
//Plug-In-Info
function GetTitel(Buffer: PChar; lenBuffer: Integer): Integer; override; stdcall;
function GetAppKey(Buffer: PChar; lenBuffer: Integer): Integer; override; stdcall;
function SendFormHandle: Integer; override; stdcall;
//procedure SwitchShowStyle; override; stdcall;
end;
{$R *.res}
procedure TCalendar.CreateForms;
begin
Form1:=TForm1.Create(nil);
end;
procedure TCalendar.Execute();
begin
Form1.Show;
end;
procedure TCalendar.FreeForms;
begin
FreeAndNil(Form1);
end;
function TCalendar.SendFormHandle: Integer;
begin
result:=Form1.Handle;
end;
function TCalendar.GetTitel(Buffer: PChar; lenBuffer: Integer): Integer;
var
s: String;
begin
s:='Kalender';
if (Assigned(Buffer)) then
begin
StrLCopy(Buffer, PChar(s), lenBuffer);
end;
result:=length(s);
end;
function TCalendar.GetAppKey(Buffer: PChar; lenBuffer: Integer): Integer;
var
s: String;
begin
s:='PJ-3';
if (Assigned(Buffer)) then
begin
StrLCopy(Buffer, PChar(s), lenBuffer);
end;
result:=length(s);
end;
function LadePlugIn(Parent: THandle; var PlugIn: TProJurisPlugIn): Boolean;
begin
try
PlugIn := TCalendar.Create(Parent);
Result := True;
except
Result := False;
end;
end;
exports
LadePlugIn;
begin
end.