diff options
author | marco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2007-07-09 08:07:42 +0000 |
---|---|---|
committer | marco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2007-07-09 08:07:42 +0000 |
commit | dd06f22dfc3bcee0961c0e2c91162a0e4ec2ecdb (patch) | |
tree | c26cc0342f1540683db1d555c51c5e9969975f11 /rtl/inc/dynlibs.pas | |
parent | 537a9f3fc99d3dc959f805381b6ce966fe064d78 (diff) | |
download | fpc-dd06f22dfc3bcee0961c0e2c91162a0e4ec2ecdb.tar.gz |
* Safeloadlibrary
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@7985 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'rtl/inc/dynlibs.pas')
-rw-r--r-- | rtl/inc/dynlibs.pas | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/rtl/inc/dynlibs.pas b/rtl/inc/dynlibs.pas index 2b0568d83d..7dea84c60e 100644 --- a/rtl/inc/dynlibs.pas +++ b/rtl/inc/dynlibs.pas @@ -33,6 +33,7 @@ interface ---------------------------------------------------------------------} +Function SafeLoadLibrary(Name : AnsiString) : TLibHandle; Function LoadLibrary(Name : AnsiString) : TLibHandle; Function GetProcedureAddress(Lib : TlibHandle; ProcName : AnsiString) : Pointer; Function UnloadLibrary(Lib : TLibHandle) : Boolean; @@ -65,4 +66,22 @@ begin Result:=GetProcedureAddress(Lib,Procname); end; +Function SafeLoadLibrary(Name : AnsiString) : TLibHandle; + +{$ifdef i386} + var w : word; +{$endif} + + +Begin +{$ifdef i386} + w:=get8087cw; +{$endif} + result:=loadlibrary(name); + +{$ifdef i386} + set8087cw(w); +{$endif} +End; + end. |