home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
vp21beta.zip
/
AEXMPSRC.RAR
/
DLL
/
TESTDLL1.PAS
next >
Wrap
Pascal/Delphi Source File
|
2000-08-15
|
961b
|
28 lines
{█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█}
{█ █}
{█ Virtual Pascal Examples. Version 2.1. █}
{█ Simple use of DLL example █}
{█ ─────────────────────────────────────────────────█}
{█ Copyright (C) 1996-2000 vpascal.com █}
{█ █}
{▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀}
program TestDll1;
// In this example, the functions of the DLL are imported using Borland
// Pascal syntax:
procedure Test1; external 'TSTVPDLL' index 1;
procedure Test2; external 'TSTVPDLL' name 'Test2';
procedure Test3; external 'TSTVPDLL' name 'TestProc3';
function Add(a, b: Longint): Longint; cdecl; external 'TSTVPDLL' name 'TestFunc';
// And the entry points are called:
begin
Test1;
Test2;
Test3;
writeln('3 + 4 is ',Add(3,4));
end.