2
$Id: dynlibs.inc,v 1.2 2002/09/07 16:01:27 peter Exp $
3
This file is part of the Free Pascal run time library.
4
Copyright (c) 1999-2000 by the Free Pascal development team
6
Implement OS-dependent part of dynamic library loading.
8
See the file COPYING.FPC, included in this distribution,
9
for details about the copyright.
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15
**********************************************************************}
17
{$ifdef readinterface}
19
{ ---------------------------------------------------------------------
20
Interface declarations
21
---------------------------------------------------------------------}
31
{ ---------------------------------------------------------------------
32
Implementation section
33
---------------------------------------------------------------------}
37
Function LoadLibrary(Name : AnsiString) : TLibHandle;
40
Result:=dlopen(Pchar(Name),RTLD_LAZY);
43
Function GetProcedureAddress(Lib : TLibHandle; ProcName : AnsiString) : Pointer;
46
Result:=dlsym(lib,pchar(ProcName));
49
Function UnloadLibrary(Lib : TLibHandle) : Boolean;
52
Result:=dlClose(Lib)=0;
59
Revision 1.2 2002/09/07 16:01:27 peter
60
* old logs removed and tabs fixed