Components: fixed ActiveX compilation on Win64, patch by Ludo Brands, bug #22049

git-svn-id: trunk@37295 -
This commit is contained in:
maxim 2012-05-16 19:56:30 +00:00
parent 9990ed11e7
commit 7ec194ec8f

View File

@ -584,8 +584,8 @@ procedure TActiveXContainer.Attach;
var var
size:TPOINT; size:TPOINT;
begin begin
SetWindowLong(Handle,GWLP_USERDATA, ptruint(Self)); SetWindowLongPtr(Handle,GWLP_USERDATA, PtrInt(Self));
FPrevWndProc:=Windows.WNDPROC(SetWindowLong(Handle,GWL_WNDPROC,PtrInt(@WndCallback))); FPrevWndProc:=Windows.WNDPROC(SetWindowLongPtr(Handle,GWL_WNDPROC,PtrInt(@WndCallback)));
FAttached:=true; FAttached:=true;
olecheck((FOleObject as IOleObject).SetClientSite(Self as IOleClientSite)); olecheck((FOleObject as IOleObject).SetClientSite(Self as IOleClientSite));
olecheck((FOleObject as IOleObject).SetHostNames(PWideChar(name),PWideChar(name))); olecheck((FOleObject as IOleObject).SetHostNames(PWideChar(name),PWideChar(name)));
@ -601,8 +601,8 @@ const
begin begin
if FAttached then if FAttached then
begin begin
SetWindowLong(Handle,GWL_WNDPROC,PtrUInt(@FPrevWndProc)); SetWindowLongPtr(Handle,GWL_WNDPROC,PtrInt(@FPrevWndProc));
SetWindowLong(Handle,GWLP_USERDATA, 0); SetWindowLongPtr(Handle,GWLP_USERDATA, 0);
end; end;
if assigned(FOleObject) then if assigned(FOleObject) then
begin begin