fpc/tests/webtbs/tw13628b.pp
Tomas Hajny 2e2ca8684d * add resolution of DLL name under OS/2
git-svn-id: trunk@29689 -
2015-02-13 22:36:49 +00:00

36 lines
531 B
ObjectPascal

{ %needlibrary }
{ %delfiles=tw13628a }
program loadmodule;
uses
popuperr,
dynlibs;
const
{$ifdef unix}
libname = './libtw13628a.'+SharedSuffix;
{$endif unix}
{$ifdef windows}
{$DEFINE NODLLPREFIX}
{$endif windows}
{$ifdef os2}
{$DEFINE NODLLPREFIX}
{$endif os2}
{$IFDEF NODLLPREFIX}
libname = 'tw13628a.' + SharedSuffix;
{$ENDIF NODLLPREFIX}
var
hdl: TLibHandle;
begin
hdl := loadlibrary(libname);
if (hdl=nilhandle) then
halt(1);
if not UnloadLibrary(hdl) then
halt(2);;
end.