From: <ou...@us...> - 2011-12-28 20:59:56
|
Revision: 3655 http://jcl.svn.sourceforge.net/jcl/?rev=3655&view=rev Author: outchy Date: 2011-12-28 20:59:49 +0000 (Wed, 28 Dec 2011) Log Message: ----------- Mantis 5747: 64-bit incompatibility in ExceptDlgMail.pas. Modified Paths: -------------- trunk/jcl/experts/repository/ExceptionDialog/StandardDialogs/ExceptDlg.pas trunk/jcl/experts/repository/ExceptionDialog/StandardDialogs/ExceptDlgMail.pas trunk/jcl/experts/repository/ExceptionDialog/Templates/ExceptDlg.Delphi32.pas Modified: trunk/jcl/experts/repository/ExceptionDialog/StandardDialogs/ExceptDlg.pas =================================================================== --- trunk/jcl/experts/repository/ExceptionDialog/StandardDialogs/ExceptDlg.pas 2011-12-27 22:45:48 UTC (rev 3654) +++ trunk/jcl/experts/repository/ExceptionDialog/StandardDialogs/ExceptDlg.pas 2011-12-28 20:59:49 UTC (rev 3655) @@ -171,8 +171,10 @@ function HookTApplicationHandleException: Boolean; const - CallOffset = $86; - CallOffsetDebug = $94; + CallOffset = $86; // Until D2007 + CallOffsetDebug = $94; // Until D2007 + CallOffsetWin32 = $7A; // D2009 and newer + CallOffsetWin64 = $95; // DXE2 for Win64 type PCALLInstruction = ^TCALLInstruction; TCALLInstruction = packed record @@ -208,7 +210,8 @@ SysUtilsShowExceptionAddr := PeMapImgResolvePackageThunk(@SysUtils.ShowException); if Assigned(TApplicationHandleExceptionAddr) and Assigned(SysUtilsShowExceptionAddr) then begin - Result := CheckAddressForOffset(CallOffset) or CheckAddressForOffset(CallOffsetDebug); + Result := CheckAddressForOffset(CallOffset) or CheckAddressForOffset(CallOffsetDebug) or + CheckAddressForOffset(CallOffsetWin32) or CheckAddressForOffset(CallOffsetWin64); if Result then begin CALLInstruction.Address := SizeInt(@HookShowException) - SizeInt(CallAddress) - SizeOf(CALLInstruction); @@ -303,7 +306,7 @@ ModuleName: TFileName; NtHeaders32: PImageNtHeaders32; NtHeaders64: PImageNtHeaders64; - ModuleBase: Cardinal; + ModuleBase: TJclAddr; ImageBaseStr: string; C: TWinControl; CpuInfo: TCpuInfo; Modified: trunk/jcl/experts/repository/ExceptionDialog/StandardDialogs/ExceptDlgMail.pas =================================================================== --- trunk/jcl/experts/repository/ExceptionDialog/StandardDialogs/ExceptDlgMail.pas 2011-12-27 22:45:48 UTC (rev 3654) +++ trunk/jcl/experts/repository/ExceptionDialog/StandardDialogs/ExceptDlgMail.pas 2011-12-28 20:59:49 UTC (rev 3655) @@ -173,8 +173,10 @@ function HookTApplicationHandleException: Boolean; const - CallOffset = $86; - CallOffsetDebug = $94; + CallOffset = $86; // Until D2007 + CallOffsetDebug = $94; // Until D2007 + CallOffsetWin32 = $7A; // D2009 and newer + CallOffsetWin64 = $95; // DXE2 for Win64 type PCALLInstruction = ^TCALLInstruction; TCALLInstruction = packed record @@ -210,7 +212,8 @@ SysUtilsShowExceptionAddr := PeMapImgResolvePackageThunk(@SysUtils.ShowException); if Assigned(TApplicationHandleExceptionAddr) and Assigned(SysUtilsShowExceptionAddr) then begin - Result := CheckAddressForOffset(CallOffset) or CheckAddressForOffset(CallOffsetDebug); + Result := CheckAddressForOffset(CallOffset) or CheckAddressForOffset(CallOffsetDebug) or + CheckAddressForOffset(CallOffsetWin32) or CheckAddressForOffset(CallOffsetWin64); if Result then begin CALLInstruction.Address := SizeInt(@HookShowException) - SizeInt(CallAddress) - SizeOf(CALLInstruction); @@ -326,7 +329,7 @@ ModuleName: TFileName; NtHeaders32: PImageNtHeaders32; NtHeaders64: PImageNtHeaders64; - ModuleBase: Cardinal; + ModuleBase: TJclAddr; ImageBaseStr: string; C: TWinControl; CpuInfo: TCpuInfo; Modified: trunk/jcl/experts/repository/ExceptionDialog/Templates/ExceptDlg.Delphi32.pas =================================================================== --- trunk/jcl/experts/repository/ExceptionDialog/Templates/ExceptDlg.Delphi32.pas 2011-12-27 22:45:48 UTC (rev 3654) +++ trunk/jcl/experts/repository/ExceptionDialog/Templates/ExceptDlg.Delphi32.pas 2011-12-28 20:59:49 UTC (rev 3655) @@ -174,8 +174,10 @@ function HookTApplicationHandleException: Boolean; const - CallOffset = $86; - CallOffsetDebug = $94; + CallOffset = $86; // Until D2007 + CallOffsetDebug = $94; // Until D2007 + CallOffsetWin32 = $7A; // D2009 and newer + CallOffsetWin64 = $95; // DXE2 for Win64 type PCALLInstruction = ^TCALLInstruction; TCALLInstruction = packed record @@ -211,7 +213,8 @@ SysUtilsShowExceptionAddr := PeMapImgResolvePackageThunk(@SysUtils.ShowException); if Assigned(TApplicationHandleExceptionAddr) and Assigned(SysUtilsShowExceptionAddr) then begin - Result := CheckAddressForOffset(CallOffset) or CheckAddressForOffset(CallOffsetDebug); + Result := CheckAddressForOffset(CallOffset) or CheckAddressForOffset(CallOffsetDebug) or + CheckAddressForOffset(CallOffsetWin32) or CheckAddressForOffset(CallOffsetWin64); if Result then begin CALLInstruction.Address := SizeInt(@HookShowException) - SizeInt(CallAddress) - SizeOf(CALLInstruction); @@ -334,7 +337,7 @@ ModuleName: TFileName; NtHeaders32: PImageNtHeaders32; NtHeaders64: PImageNtHeaders64; - ModuleBase: Cardinal; + ModuleBase: TJclAddr; ImageBaseStr: string;{$ENDIF} {$IFDEF ActiveControls} C: TWinControl;{$ENDIF} {$IFDEF OSInfo} CpuInfo: TCpuInfo; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |