Thanks @marcov
I have replaced GetWindowLong() and SetWindowLong(), by GetWindowLongPtr() and SetWindowLongPtr(), but when executing, Windows shows the message "Application cannot start correctly (0xc000007)"
I have tested using GetWindowLongPtrA(),SetWindowLongPtrA(); GetWindowLongPtrW() and SetWindowLongPtrW(), executing like Admid, and the result is the same.
The code when replacing is:
procedure TVideo.Hook;
begin
OldProc := TMWndProc(Windows.GetWindowLongPtr(Handle, GWL_WNDPROC));
Windows.SetWindowLongPtr(Handle, GWL_WNDPROC, LongInt(@MsgProc));
end;
procedure TVideo.Unhook;
begin
if Assigned(OldProc) then
Windows.SetWindowLongPtr(Handle, GWL_WNDPROC, LongInt(OldProc));
OldProc := nil;
end;
It gives me some warnings on conversion between ordinal and pointers.