mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-08 22:49:27 +02:00
Add popuperr unit on tests
git-svn-id: trunk@16759 -
This commit is contained in:
parent
c5b2096f40
commit
e7dcc27cd9
@ -2,6 +2,8 @@
|
||||
{ %norun }
|
||||
library tw12987a;
|
||||
|
||||
uses
|
||||
popuperr;
|
||||
|
||||
procedure test;
|
||||
var
|
||||
|
@ -1,5 +1,9 @@
|
||||
{ %target=win32,win64,wince,os2 }
|
||||
{ %needlibrary }
|
||||
|
||||
uses
|
||||
popuperr;
|
||||
|
||||
procedure test;external 'tw12987a' name 'test';
|
||||
|
||||
function ThreadTest(p : pointer) : PtrInt;
|
||||
|
@ -1,9 +1,10 @@
|
||||
{ %norun }
|
||||
|
||||
library tw13628a;
|
||||
library tw13628a;
|
||||
|
||||
uses
|
||||
SysUtils;
|
||||
popuperr,
|
||||
SysUtils;
|
||||
|
||||
begin
|
||||
end.
|
||||
|
@ -1,8 +1,9 @@
|
||||
{ %needlibrary }
|
||||
|
||||
program loadmodule;
|
||||
program loadmodule;
|
||||
|
||||
uses
|
||||
popuperr,
|
||||
dynlibs;
|
||||
|
||||
const
|
||||
@ -19,7 +20,7 @@ const
|
||||
{$endif windows}
|
||||
|
||||
var
|
||||
hdl: TLibHandle;
|
||||
hdl: TLibHandle;
|
||||
begin
|
||||
hdl := loadlibrary(libname);
|
||||
if (hdl=nilhandle) then
|
||||
|
@ -2,6 +2,10 @@
|
||||
{ %opt=-gh }
|
||||
{ %norun }
|
||||
library dll1;
|
||||
|
||||
uses
|
||||
popuperr;
|
||||
|
||||
begin
|
||||
IsMultiThread:=True;
|
||||
end.
|
||||
|
@ -2,6 +2,10 @@
|
||||
{ %opt=-gh }
|
||||
{ %norun }
|
||||
library dll2;
|
||||
|
||||
uses
|
||||
popuperr;
|
||||
|
||||
begin
|
||||
IsMultiThread:=True;
|
||||
end.
|
||||
|
@ -1,7 +1,9 @@
|
||||
{ %target=win32,wince,win64 }
|
||||
{ %opt=-gh }
|
||||
{$AppType CONSOLE}
|
||||
uses Windows;
|
||||
uses
|
||||
popuperr,
|
||||
Windows;
|
||||
{$C+}
|
||||
|
||||
|
||||
|
@ -3,6 +3,7 @@ library tw6822a;
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
popuperr,
|
||||
uw6822a;
|
||||
|
||||
begin
|
||||
|
@ -4,6 +4,7 @@ program loader;
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
popuperr,
|
||||
dynlibs;
|
||||
var
|
||||
h: TLibHandle;
|
||||
|
@ -4,7 +4,8 @@ program prog;
|
||||
{$mode objfpc}
|
||||
|
||||
uses
|
||||
dynlibs;
|
||||
popuperr,
|
||||
dynlibs;
|
||||
|
||||
// this function is exported from the EXE
|
||||
function exetest: longint; {public name 'exetest';}
|
||||
@ -42,7 +43,7 @@ begin
|
||||
end;
|
||||
pointer(dllf):= getprocaddress(lh, 'dllf'); // get function from dll
|
||||
|
||||
// call function in dll, which calls function in exe, and then prints
|
||||
// call function in dll, which calls function in exe, and then prints
|
||||
// a result number 5
|
||||
if (dllf()<>5) then
|
||||
halt(1);
|
||||
|
Loading…
Reference in New Issue
Block a user