unit TestDLL;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Forms,
Dialogs, StdCtrls, Controls;
type
TForm1 =
class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure FormClose(Sender: TObject;
var Action: TCloseAction);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
function ShowFormAdministration(sUser, sEnvironment :
String) : Integer;
stdcall;
external '
TEST.dll';
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
ShowFormAdministration(UpperCase(GetEnvironmentVariable('
USERNAME')), '
TEST');
end;
procedure TForm1.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
// FreeAndNil(Sender);
end;
end.