fpc/tests/webtbs/tw6822b.pp
2012-04-11 18:06:43 +00:00

30 lines
422 B
ObjectPascal

{ %needlibrary }
program loader;
{$mode objfpc}{$H+}
uses
popuperr,
dynlibs;
var
h: TLibHandle;
const
{$ifdef unix}
libname = './libtw6822a.'+SharedSuffix;
{$endif unix}
{$ifdef windows}
libname = 'tw6822a.dll';
{$endif windows}
begin
writeln('hello from loader program');
h:= loadlibrary(libname);
if h = nilhandle then
begin
write('could not load library');
exit;
end;
freelibrary(h);
end.