summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/test/library/testdll2.pp
blob: 94939d3dbb33e19feba2afa588ea1aecc4da2351 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{ %target=win32,win64 }
{ %needlibrary }
{ %norun }
{ %neededafter }
{
  Copyright (c) 1998 by Pierre Muller

  Windows DLL test.
  Check main executable EXPORT support.
}
library testdll2;


{ This library cannot be called from any other program
  as it loads EXE exported symbols }

procedure TestExeProc; external 'ttdllexe.exe' name 'TestExeProc';


var
  teststr : string;

procedure test;export;
begin
  writeln('DLL: Hello, I''m testdll2 DLL');
  teststr:='In test';
  TestExeProc;
  teststr:='After test';
end;

function GetString : string; export;
begin
  GetString := teststr;
end;

exports
 test,
 teststr,
 GetString;

end.