View Issue Details

IDProjectCategoryView StatusLast Update
0006074JEDI VCL00 JVCL Componentspublic2015-09-14 13:20
ReporterbheAssigned ToAHUser 
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Product VersionDaily / GIT 
Target VersionFixed in Version3.48 
Summary0006074: Bad type definition in TJvDeviceInfo crashed x64 target
DescriptionTJvDeviceInfo uses Longword instead of HDC which leads to crashes in x64 builds.
See attached patch.
TagsNo tags attached.

Activities

2013-01-22 14:41

 

JvPrvwDoc.pas.patch (2,122 bytes)
Index: JvPrvwDoc.pas
===================================================================
--- JvPrvwDoc.pas	(revision 13494)
+++ JvPrvwDoc.pas	(working copy)
@@ -111,8 +111,8 @@
     FPageWidth: Cardinal;
     FLogPixelsX: Cardinal;
     FOnChange: TNotifyEvent;
-    FScreenDC: Longword;
-    FReferenceHandle: Longword;
+    FScreenDC: HDC;
+    FReferenceHandle: HDC;
     FPhysicalHeight: Cardinal;
     FPhysicalWidth: Cardinal;
     procedure SetLogPixelsY(const Value: Cardinal);
@@ -122,13 +122,13 @@
     procedure SetPageHeight(const Value: Cardinal);
     procedure SetPageWidth(const Value: Cardinal);
     procedure DefaultDeviceInfo;
-    procedure SetReferenceHandle(const Value: Longword);
+    procedure SetReferenceHandle(const Value: HDC);
     procedure SetPhysicalHeight(const Value: Cardinal);
     procedure SetPhysicalWidth(const Value: Cardinal);
     procedure SetOffsetBottom(const Value: Cardinal);
     procedure SetOffsetRight(const Value: Cardinal);
   protected
-    function GetScreenDC: Longword;
+    function GetScreenDC: HDC;
     procedure Change;
   public
     constructor Create;
@@ -143,7 +143,7 @@
     function MMToYPx(MM: Single): Integer;
     property OnChange: TNotifyEvent read FOnChange write FOnChange;
   published
-    property ReferenceHandle: Longword read FReferenceHandle write SetReferenceHandle;
+    property ReferenceHandle: HDC read FReferenceHandle write SetReferenceHandle;
     property LogPixelsX: Cardinal read FLogPixelsX write SetLogPixesX;
     property LogPixelsY: Cardinal read FLogPixelsY write SetLogPixelsY;
     property PhysicalWidth: Cardinal read FPhysicalWidth write SetPhysicalWidth;
@@ -695,7 +695,7 @@
     FOnChange(Self);
 end;
 
-function TJvDeviceInfo.GetScreenDC: Longword;
+function TJvDeviceInfo.GetScreenDC: HDC;
 begin
   if FScreenDC <> 0 then
     ReleaseDC(HWND_DESKTOP, FScreenDC);
@@ -813,7 +813,7 @@
   end;
 end;
 
-procedure TJvDeviceInfo.SetReferenceHandle(const Value: Longword);
+procedure TJvDeviceInfo.SetReferenceHandle(const Value: HDC);
 begin
   FReferenceHandle := Value;
   if FReferenceHandle = 0 then
JvPrvwDoc.pas.patch (2,122 bytes)

AHUser

2013-05-25 15:54

developer   ~0020510

Fixed in svn revision 13523.

Issue History

Date Modified Username Field Change
2013-01-22 14:41 bhe New Issue
2013-01-22 14:41 bhe File Added: JvPrvwDoc.pas.patch
2013-05-25 15:54 AHUser Note Added: 0020510
2013-05-25 15:54 AHUser Status new => resolved
2013-05-25 15:54 AHUser Fixed in Version => Daily / SVN
2013-05-25 15:54 AHUser Resolution open => fixed
2013-05-25 15:54 AHUser Assigned To => AHUser
2015-09-14 13:20 obones Fixed in Version Daily / GIT => 3.48