home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2003 January
/
Chip_2003-01_cd1.bin
/
zkuste
/
delphi
/
nastroje
/
d234567
/
PRODEL.ZIP
/
DLLSUPP.ZIP
/
DYNAMAIN.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
2000-05-19
|
961b
|
52 lines
unit DYNAMAIN;
{ Unit with all User-procedures:
The procedure 'LetsDoIt' is called, whenever you click the button
'Start'
}
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure LetsDoit(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
// The procedure, which has to be measured, is in the DLL 'EXDLL'
VAR
Start : FUNCTION : Integer;
Lib : THANDLE;
Loaded : Boolean;
procedure TForm1.LetsDoit(Sender: TObject);
begin
Start;
Start;
end;
INITIALIZATION
Loaded := FALSE;
Lib := LoadLibrary('EXDLL.DLL');
IF Lib <> 0 THEN BEGIN
Start := GetProcAddress(Lib, 'Start');
Loaded := TRUE;
END;
FINALIZATION
IF Loaded = TRUE THEN
FreeLibrary(Lib);
END.