View Issue Details

IDProjectCategoryView StatusLast Update
0022049LazarusLCLpublic2012-05-16 22:20
ReporterbolekAssigned ToMaxim Ganetsky 
PrioritynormalSeverityblockReproducibilityhave not tried
Status closedResolutionfixed 
Product Version1.1 (SVN)Product Build 
Target VersionFixed in Version1.1 (SVN) 
Summary0022049: Cant compile activexcontainer
Descriptionwin64 error

 line 588
FPrevWndProc:=Windows.WNDPROC(SetWindowLong(Handle,GWL_WNDPROC,PtrInt(@WndCallback)));

should be

FPrevWndProc:=Windows.WNDPROC(PtrInt(SetWindowLong(Handle,GWL_WNDPROC,PtrInt(@WndCallback))));

 
TagsNo tags attached.
Fixed in Revision37295
LazTarget-
WidgetsetWin32/Win64
Attached Files
  • AXcontainer.diff (1,046 bytes)
    Index: activexcontainer.pas
    ===================================================================
    --- activexcontainer.pas	(revision 37273)
    +++ activexcontainer.pas	(working copy)
    @@ -584,8 +584,8 @@
     var
       size:TPOINT;
     begin
    -  SetWindowLong(Handle,GWLP_USERDATA, ptruint(Self));
    -  FPrevWndProc:=Windows.WNDPROC(SetWindowLong(Handle,GWL_WNDPROC,PtrInt(@WndCallback)));
    +  SetWindowLongPtr(Handle,GWLP_USERDATA, PtrInt(Self));
    +  FPrevWndProc:=Windows.WNDPROC(SetWindowLongPtr(Handle,GWL_WNDPROC,PtrInt(@WndCallback)));
       FAttached:=true;
       olecheck((FOleObject as IOleObject).SetClientSite(Self as IOleClientSite));
       olecheck((FOleObject as IOleObject).SetHostNames(PWideChar(name),PWideChar(name)));
    @@ -601,8 +601,8 @@
     begin
       if FAttached then
         begin
    -    SetWindowLong(Handle,GWL_WNDPROC,PtrUInt(@FPrevWndProc));
    -    SetWindowLong(Handle,GWLP_USERDATA, 0);
    +    SetWindowLongPtr(Handle,GWL_WNDPROC,PtrInt(@FPrevWndProc));
    +    SetWindowLongPtr(Handle,GWLP_USERDATA, 0);
         end;
       if assigned(FOleObject) then
         begin
    
    AXcontainer.diff (1,046 bytes)

Activities

Ludo Brands

2012-05-16 12:36

developer   ~0059645

Last edited: 2012-05-16 12:42

The correct solution is:

FPrevWndProc:=Windows.WNDPROC(SetWindowLongPtr(Handle,GWL_WNDPROC,PtrInt(@WndCallback)));

Patch attached.

2012-05-16 12:47

 

AXcontainer.diff (1,046 bytes)
Index: activexcontainer.pas
===================================================================
--- activexcontainer.pas	(revision 37273)
+++ activexcontainer.pas	(working copy)
@@ -584,8 +584,8 @@
 var
   size:TPOINT;
 begin
-  SetWindowLong(Handle,GWLP_USERDATA, ptruint(Self));
-  FPrevWndProc:=Windows.WNDPROC(SetWindowLong(Handle,GWL_WNDPROC,PtrInt(@WndCallback)));
+  SetWindowLongPtr(Handle,GWLP_USERDATA, PtrInt(Self));
+  FPrevWndProc:=Windows.WNDPROC(SetWindowLongPtr(Handle,GWL_WNDPROC,PtrInt(@WndCallback)));
   FAttached:=true;
   olecheck((FOleObject as IOleObject).SetClientSite(Self as IOleClientSite));
   olecheck((FOleObject as IOleObject).SetHostNames(PWideChar(name),PWideChar(name)));
@@ -601,8 +601,8 @@
 begin
   if FAttached then
     begin
-    SetWindowLong(Handle,GWL_WNDPROC,PtrUInt(@FPrevWndProc));
-    SetWindowLong(Handle,GWLP_USERDATA, 0);
+    SetWindowLongPtr(Handle,GWL_WNDPROC,PtrInt(@FPrevWndProc));
+    SetWindowLongPtr(Handle,GWLP_USERDATA, 0);
     end;
   if assigned(FOleObject) then
     begin
AXcontainer.diff (1,046 bytes)

bolek

2012-05-16 13:19

reporter   ~0059646

thank you

Maxim Ganetsky

2012-05-16 21:57

developer   ~0059655

Last edited: 2012-05-16 21:57

Applied, thanks.

Please test and close if ok.

Issue History

Date Modified Username Field Change
2012-05-16 11:50 bolek New Issue
2012-05-16 11:50 bolek Widgetset => Win32/Win64
2012-05-16 12:36 Ludo Brands Note Added: 0059645
2012-05-16 12:42 Ludo Brands Note Edited: 0059645
2012-05-16 12:47 Ludo Brands File Added: AXcontainer.diff
2012-05-16 13:19 bolek Note Added: 0059646
2012-05-16 21:57 Maxim Ganetsky Fixed in Revision => 37295
2012-05-16 21:57 Maxim Ganetsky LazTarget => -
2012-05-16 21:57 Maxim Ganetsky Status new => resolved
2012-05-16 21:57 Maxim Ganetsky Fixed in Version => 1.1 (SVN)
2012-05-16 21:57 Maxim Ganetsky Resolution open => fixed
2012-05-16 21:57 Maxim Ganetsky Assigned To => Maxim Ganetsky
2012-05-16 21:57 Maxim Ganetsky Note Added: 0059655
2012-05-16 21:57 Maxim Ganetsky Note Edited: 0059655
2012-05-16 22:20 bolek Status resolved => closed