mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-26 10:09:38 +02:00
* import library function with a name that does not conflict with the functions exported in the interface
git-svn-id: trunk@45986 -
This commit is contained in:
parent
08949c86bf
commit
ef099b2075
@ -20,7 +20,7 @@ var
|
|||||||
|
|
||||||
function SysLoadLibraryU(const Name : UnicodeString) : TlibHandle;
|
function SysLoadLibraryU(const Name : UnicodeString) : TlibHandle;
|
||||||
begin
|
begin
|
||||||
Result:=LoadLibrary(LPCSTR(AnsiString(Name)));
|
Result:=WinLoadLibrary(LPCSTR(AnsiString(Name)));
|
||||||
if Result<=HINSTANCE_ERROR then
|
if Result<=HINSTANCE_ERROR then
|
||||||
begin
|
begin
|
||||||
LastLoadLibraryError:=Result;
|
LastLoadLibraryError:=Result;
|
||||||
@ -30,7 +30,7 @@ end;
|
|||||||
|
|
||||||
function SysLoadLibraryA(const Name: RawByteString) : TLibHandle;
|
function SysLoadLibraryA(const Name: RawByteString) : TLibHandle;
|
||||||
begin
|
begin
|
||||||
Result:=LoadLibrary(LPCSTR(Name));
|
Result:=WinLoadLibrary(LPCSTR(Name));
|
||||||
if Result<=HINSTANCE_ERROR then
|
if Result<=HINSTANCE_ERROR then
|
||||||
begin
|
begin
|
||||||
LastLoadLibraryError:=Result;
|
LastLoadLibraryError:=Result;
|
||||||
@ -40,20 +40,20 @@ end;
|
|||||||
|
|
||||||
function SysGetProcedureAddress(Lib : TLibHandle; const ProcName : AnsiString) : FarPointer;
|
function SysGetProcedureAddress(Lib : TLibHandle; const ProcName : AnsiString) : FarPointer;
|
||||||
begin
|
begin
|
||||||
Result:=GetProcAddress(Lib,LPCSTR(ProcName));
|
Result:=WinGetProcAddress(Lib,LPCSTR(ProcName));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$push}
|
{$push}
|
||||||
{$warn 4056 off}
|
{$warn 4056 off}
|
||||||
function SysGetProcedureAddressOrdinal(Lib : TLibHandle; Ordinal : TOrdinalEntry) : FarPointer;
|
function SysGetProcedureAddressOrdinal(Lib : TLibHandle; Ordinal : TOrdinalEntry) : FarPointer;
|
||||||
begin
|
begin
|
||||||
Result:=GetProcAddress(Lib,LPCSTR(Ordinal));
|
Result:=WinGetProcAddress(Lib,LPCSTR(Ordinal));
|
||||||
end;
|
end;
|
||||||
{$pop}
|
{$pop}
|
||||||
|
|
||||||
function SysUnloadLibrary(Lib : TLibHandle) : Boolean;
|
function SysUnloadLibrary(Lib : TLibHandle) : Boolean;
|
||||||
begin
|
begin
|
||||||
FreeLibrary(Lib);
|
WinFreeLibrary(Lib);
|
||||||
Result:=true;
|
Result:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -61,8 +61,8 @@ procedure SwitchStackTo(StackSegment, StackPointer, StackTop: UINT); external 'K
|
|||||||
function LoadModule(ModuleName: LPCSTR; ParameterName: LPVOID): HINST; external 'KERNEL';
|
function LoadModule(ModuleName: LPCSTR; ParameterName: LPVOID): HINST; external 'KERNEL';
|
||||||
function FreeModule(Module: HINST): BOOL; external 'KERNEL';
|
function FreeModule(Module: HINST): BOOL; external 'KERNEL';
|
||||||
|
|
||||||
function LoadLibrary(LibFileName: LPCSTR): HINST; external 'KERNEL';
|
function WinLoadLibrary(LibFileName: LPCSTR): HINST; external 'KERNEL' name 'LoadLibrary';
|
||||||
procedure FreeLibrary(LibModule: HINST); external 'KERNEL';
|
procedure WinFreeLibrary(LibModule: HINST); external 'KERNEL' name 'FreeLibrary';
|
||||||
|
|
||||||
function WinExec(CmdLine: LPCSTR; CmdShow: UINT): UINT; external 'KERNEL';
|
function WinExec(CmdLine: LPCSTR; CmdShow: UINT): UINT; external 'KERNEL';
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ function GetModuleHandle(ModuleName: LPCSTR): HMODULE; external 'KERNEL';
|
|||||||
function GetModuleUsage(Module: HINST): SmallInt; external 'KERNEL';
|
function GetModuleUsage(Module: HINST): SmallInt; external 'KERNEL';
|
||||||
function GetModuleFileName(Module: HINST; FileName: LPSTR; Size: SmallInt): SmallInt; external 'KERNEL';
|
function GetModuleFileName(Module: HINST; FileName: LPSTR; Size: SmallInt): SmallInt; external 'KERNEL';
|
||||||
|
|
||||||
function GetProcAddress(Module: HINST; ProcName: LPCSTR): FARPROC; external 'KERNEL';
|
function WinGetProcAddress(Module: HINST; ProcName: LPCSTR): FARPROC; external 'KERNEL' name 'GetProcAddress';
|
||||||
|
|
||||||
function GetInstanceData(Instance: HINST; Data: PBYTE; Count: SmallInt): SmallInt; external 'KERNEL';
|
function GetInstanceData(Instance: HINST; Data: PBYTE; Count: SmallInt): SmallInt; external 'KERNEL';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user