mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-12 17:09:35 +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;
|
||||
begin
|
||||
Result:=LoadLibrary(LPCSTR(AnsiString(Name)));
|
||||
Result:=WinLoadLibrary(LPCSTR(AnsiString(Name)));
|
||||
if Result<=HINSTANCE_ERROR then
|
||||
begin
|
||||
LastLoadLibraryError:=Result;
|
||||
@ -30,7 +30,7 @@ end;
|
||||
|
||||
function SysLoadLibraryA(const Name: RawByteString) : TLibHandle;
|
||||
begin
|
||||
Result:=LoadLibrary(LPCSTR(Name));
|
||||
Result:=WinLoadLibrary(LPCSTR(Name));
|
||||
if Result<=HINSTANCE_ERROR then
|
||||
begin
|
||||
LastLoadLibraryError:=Result;
|
||||
@ -40,20 +40,20 @@ end;
|
||||
|
||||
function SysGetProcedureAddress(Lib : TLibHandle; const ProcName : AnsiString) : FarPointer;
|
||||
begin
|
||||
Result:=GetProcAddress(Lib,LPCSTR(ProcName));
|
||||
Result:=WinGetProcAddress(Lib,LPCSTR(ProcName));
|
||||
end;
|
||||
|
||||
{$push}
|
||||
{$warn 4056 off}
|
||||
function SysGetProcedureAddressOrdinal(Lib : TLibHandle; Ordinal : TOrdinalEntry) : FarPointer;
|
||||
begin
|
||||
Result:=GetProcAddress(Lib,LPCSTR(Ordinal));
|
||||
Result:=WinGetProcAddress(Lib,LPCSTR(Ordinal));
|
||||
end;
|
||||
{$pop}
|
||||
|
||||
function SysUnloadLibrary(Lib : TLibHandle) : Boolean;
|
||||
begin
|
||||
FreeLibrary(Lib);
|
||||
WinFreeLibrary(Lib);
|
||||
Result:=true;
|
||||
end;
|
||||
|
||||
|
@ -61,8 +61,8 @@ procedure SwitchStackTo(StackSegment, StackPointer, StackTop: UINT); external 'K
|
||||
function LoadModule(ModuleName: LPCSTR; ParameterName: LPVOID): HINST; external 'KERNEL';
|
||||
function FreeModule(Module: HINST): BOOL; external 'KERNEL';
|
||||
|
||||
function LoadLibrary(LibFileName: LPCSTR): HINST; external 'KERNEL';
|
||||
procedure FreeLibrary(LibModule: HINST); external 'KERNEL';
|
||||
function WinLoadLibrary(LibFileName: LPCSTR): HINST; external 'KERNEL' name 'LoadLibrary';
|
||||
procedure WinFreeLibrary(LibModule: HINST); external 'KERNEL' name 'FreeLibrary';
|
||||
|
||||
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 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';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user