* change dllparam into PtrInt, this is required for 64 bit systems, patch based on Gennadiy's patch in , resolves

git-svn-id: trunk@20079 -
This commit is contained in:
florian 2012-01-14 20:21:52 +00:00
parent fde1695961
commit 562932a2c9
7 changed files with 24 additions and 23 deletions

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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;