unit probe;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls, wwriched,
DB, DBAccess, Uni, UniProvider,
MySQLUniProvider, MemDS, AdvGlowButton;
type
TAufrufDLL = procedure (WasAuchImmerZuUebergebenist:string);stdcall;
TForm1 = class(TForm)
wwDBRichEdit1: TwwDBRichEdit;
UniQuery1: TUniQuery;
MySQLUniProvider1: TMySQLUniProvider;
UniDataSource1: TUniDataSource;
UniConnection1: TUniConnection;
Button_AufrufDLL: TAdvGlowButton;
procedure FormShow(Sender: TObject);
procedure Button_AufrufDLLClick(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormShow(Sender: TObject);
begin
UniQuery1.Open; //
Query zum öffnen der Datenbank und anzeigen der Daten im TwwDBRichEdit - Öffnen des RichEditDialogs über F2 funktioniert tadellos
end;
procedure TForm1.Button_AufrufDLLClick(Sender: TObject);
var
Handle : THandle;
pfad : string;
ProcAufruf : TAufrufDLL;
begin
pfad := 'C:\PROBELAUF\Probedll.dll';
Handle:=LoadLibrary(PChar(pfad));
if
Handle <> 0 then
begin
@ProcAufruf := GetProcAddress(
Handle, 'ShowProbeDLL');
if @ProcAufruf <> nil then
begin
ProcAufruf('blabla');
end;
FreeLibrary(
Handle);
end;
end;
end.