mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-17 07:59:48 +02:00
* change dllparam into PtrInt, this is required for 64 bit systems, patch based on Gennadiy's patch in #21089, resolves #21089
git-svn-id: trunk@20079 -
This commit is contained in:
parent
fde1695961
commit
562932a2c9
rtl
tests/test/library
@ -83,12 +83,12 @@ unit sysinitcyg;
|
||||
end;
|
||||
|
||||
|
||||
procedure _FPC_DLLMainCRTStartup(_hinstance,_dllreason,_dllparam:longint);stdcall;public name '_DLLMainCRTStartup';
|
||||
procedure _FPC_DLLMainCRTStartup(_hinstance : longint;_dllreason : dword;_dllparam:Pointer);stdcall;public name '_DLLMainCRTStartup';
|
||||
begin
|
||||
IsConsole:=true;
|
||||
sysinstance:=_hinstance;
|
||||
dllreason:=_dllreason;
|
||||
dllparam:=_dllparam;
|
||||
dllparam:=PtrInt(_dllparam);
|
||||
asm
|
||||
subl $0x8,%esp
|
||||
andl $0xfffffff0,%esp
|
||||
@ -97,12 +97,12 @@ unit sysinitcyg;
|
||||
end;
|
||||
|
||||
|
||||
procedure _FPC_DLLWinMainCRTStartup(_hinstance,_dllreason,_dllparam:longint);stdcall;public name '_DLLWinMainCRTStartup';
|
||||
procedure _FPC_DLLWinMainCRTStartup(_hinstance : longint;_dllreason : dword;_dllparam:Pointer);stdcall;public name '_DLLWinMainCRTStartup';
|
||||
begin
|
||||
IsConsole:=false;
|
||||
sysinstance:=_hinstance;
|
||||
dllreason:=_dllreason;
|
||||
dllparam:=_dllparam;
|
||||
dllparam:=PtrInt(_dllparam);
|
||||
asm
|
||||
subl $0x8,%esp
|
||||
andl $0xfffffff0,%esp
|
||||
|
@ -118,12 +118,12 @@ unit sysinitgprof;
|
||||
end;
|
||||
|
||||
|
||||
procedure _FPC_DLLMainCRTStartup(_hinstance,_dllreason,_dllparam:longint);stdcall;public name '_DLLMainCRTStartup';
|
||||
procedure _FPC_DLLMainCRTStartup(_hinstance : longint;_dllreason : dword;_dllparam:Pointer);stdcall;public name '_DLLMainCRTStartup';
|
||||
begin
|
||||
IsConsole:=true;
|
||||
sysinstance:=_hinstance;
|
||||
dllreason:=_dllreason;
|
||||
dllparam:=_dllparam;
|
||||
dllparam:=PtrInt(_dllparam);
|
||||
asm
|
||||
subl $0x8,%esp
|
||||
andl $0xfffffff0,%esp
|
||||
@ -132,12 +132,12 @@ unit sysinitgprof;
|
||||
end;
|
||||
|
||||
|
||||
procedure _FPC_DLLWinMainCRTStartup(_hinstance,_dllreason,_dllparam:longint);stdcall;public name '_DLLWinMainCRTStartup';
|
||||
procedure _FPC_DLLWinMainCRTStartup(_hinstance : longint;_dllreason : dword;_dllparam:Pointer);stdcall;public name '_DLLWinMainCRTStartup';
|
||||
begin
|
||||
IsConsole:=false;
|
||||
sysinstance:=_hinstance;
|
||||
dllreason:=_dllreason;
|
||||
dllparam:=_dllparam;
|
||||
dllparam:=PtrInt(_dllparam);
|
||||
asm
|
||||
subl $0x8,%esp
|
||||
andl $0xfffffff0,%esp
|
||||
|
@ -50,23 +50,23 @@ unit sysinitpas;
|
||||
end;
|
||||
|
||||
|
||||
procedure _FPC_DLLMainCRTStartup(_hinstance,_dllreason,_dllparam:longint);stdcall;public name '_DLLMainCRTStartup';
|
||||
procedure _FPC_DLLMainCRTStartup(_hinstance : longint;_dllreason : dword;_dllparam:Pointer);stdcall;public name '_DLLMainCRTStartup';
|
||||
begin
|
||||
IsConsole:=true;
|
||||
sysinstance:=_hinstance;
|
||||
dllreason:=_dllreason;
|
||||
dllparam:=_dllparam;
|
||||
dllparam:=PtrInt(_dllparam);
|
||||
SetupEntryInformation;
|
||||
DLL_Entry(SysInitEntryInformation);
|
||||
end;
|
||||
|
||||
|
||||
procedure _FPC_DLLWinMainCRTStartup(_hinstance,_dllreason,_dllparam:longint);stdcall;public name '_DLLWinMainCRTStartup';
|
||||
procedure _FPC_DLLWinMainCRTStartup(_hinstance : longint;_dllreason : dword;_dllparam:Pointer);stdcall;public name '_DLLWinMainCRTStartup';
|
||||
begin
|
||||
IsConsole:=false;
|
||||
sysinstance:=_hinstance;
|
||||
dllreason:=_dllreason;
|
||||
dllparam:=_dllparam;
|
||||
dllparam:=PtrInt(_dllparam);
|
||||
SetupEntryInformation;
|
||||
DLL_Entry(SysInitEntryInformation);
|
||||
end;
|
||||
|
@ -99,14 +99,14 @@ var
|
||||
startupinfo : tstartupinfo;
|
||||
MainInstance,
|
||||
cmdshow : longint;
|
||||
DLLreason : longint; public name 'operatingsystem_dllreason';
|
||||
DLLparam : longint; public name 'operatingsystem_dllparam';
|
||||
DLLreason : dword; public name 'operatingsystem_dllreason';
|
||||
DLLparam : PtrInt; public name 'operatingsystem_dllparam';
|
||||
StartupConsoleMode : DWORD;
|
||||
const
|
||||
hprevinst: longint=0;
|
||||
|
||||
type
|
||||
TDLL_Entry_Hook = procedure (dllparam : longint);
|
||||
TDLL_Entry_Hook = procedure (dllparam : PtrInt);
|
||||
|
||||
const
|
||||
Dll_Process_Detach_Hook : TDLL_Entry_Hook = nil;
|
||||
|
@ -95,11 +95,12 @@ var
|
||||
StartupConsoleMode : dword;
|
||||
MainInstance : qword;
|
||||
cmdshow : longint;
|
||||
DLLreason,DLLparam:longint;
|
||||
DLLreason : dword;
|
||||
DLLparam : PtrInt;
|
||||
const
|
||||
hprevinst: qword=0;
|
||||
type
|
||||
TDLL_Entry_Hook = procedure (dllparam : longint);
|
||||
TDLL_Entry_Hook = procedure (dllparam : PtrInt);
|
||||
|
||||
const
|
||||
Dll_Process_Detach_Hook : TDLL_Entry_Hook = nil;
|
||||
@ -196,22 +197,22 @@ function Dll_entry{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}(const info : TEntry
|
||||
|
||||
|
||||
|
||||
procedure _FPC_DLLMainCRTStartup(_hinstance : qword;_dllreason,_dllparam:longint);stdcall;public name '_DLLMainCRTStartup';
|
||||
procedure _FPC_DLLMainCRTStartup(_hinstance : qword;_dllreason : dword;_dllparam:Pointer);stdcall;public name '_DLLMainCRTStartup';
|
||||
begin
|
||||
IsConsole:=true;
|
||||
sysinstance:=_hinstance;
|
||||
dllreason:=_dllreason;
|
||||
dllparam:=_dllparam;
|
||||
dllparam:=PtrInt(_dllparam);
|
||||
DLL_Entry;
|
||||
end;
|
||||
|
||||
|
||||
procedure _FPC_DLLWinMainCRTStartup(_hinstance : qword;_dllreason,_dllparam:longint);stdcall;public name '_DLLWinMainCRTStartup';
|
||||
procedure _FPC_DLLWinMainCRTStartup(_hinstance : qword;_dllreason : dword;_dllparam:Pointer);stdcall;public name '_DLLWinMainCRTStartup';
|
||||
begin
|
||||
IsConsole:=false;
|
||||
sysinstance:=_hinstance;
|
||||
dllreason:=_dllreason;
|
||||
dllparam:=_dllparam;
|
||||
dllparam:=PtrInt(_dllparam);
|
||||
DLL_Entry;
|
||||
end;
|
||||
|
||||
|
@ -65,7 +65,7 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
procedure MyDllHook(DllParma : longint);
|
||||
procedure MyDllHook(DllParma : PtrInt);
|
||||
begin
|
||||
Writeln('DLL: Thread Detach Hook called with DLLParam=',DllParam);
|
||||
Writeln('DLL: Thread Id is ',GetCurrentThreadId);
|
||||
|
@ -62,7 +62,7 @@ var
|
||||
s2 : string;
|
||||
|
||||
|
||||
procedure MyMainHook(DllParma : longint);
|
||||
procedure MyMainHook(DllParma : PtrInt);
|
||||
begin
|
||||
Writeln('Main: Thread Detach Hook called with DLLParam=',DllParam);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user