/usr/share/doc/fp-compiler/2.6.4/win32/dlltest.pp is in fp-compiler-2.6.4 2.6.4+dfsg-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | {
Copyright (c) 1998 by Pierre Muller
Win32 DLL usage example. It needs testdll.pp
}
program dlltest;
procedure p1(var S : string);
external 'testdll' name 'P1';
procedure proc2(x:longint);
external 'testdll' name 'Proc2';
var
s : string;external 'testdll' name 'FPC_string';
s2 : string;
begin
writeln('Main: Hello!');
s2:='Test before';
p1(s2);
if s2<>'New value' then
begin
Writeln('Error while calling P1');
Halt(1);
end;
writeln('Main: ',Hinstance,' ',Hprevinst);
writeln('Main: testdll s string = ',s);
s:='Changed by program';
proc2(1234);
writeln('Main: press enter');
readln;
end.
|