【问题标题】:Can HTML 5 really do Win 32call?HTML 5 真的可以做 Win 32call 吗?
【发布时间】:2010-11-11 14:58:14
【问题描述】:

在本教程http://www.codeproject.com/KB/IP/ThinVnc.aspx 中它说:

ThinVNC 不是传统的 VNC,因为 它没有实现 AT&T RFB 协议。相反,它建立在顶部 当今的 Web 标准:AJAX、JSON 和 HTML5。

但是在查看代码时,我觉得它就像是 Delphi,所以有人可以解释一下上面这句话的真正含义:HTML 5 真的能够进行 OS 调用吗?

TWin = class(TObject)
private
  Wnd : Hwnd;
  Rect : TRect;
  Pid : Cardinal;
public
  constructor Create(AWnd:HWND;ARect:TRect;APid:Cardinal);
end;

function EnumWindowsProc(Wnd: HWnd; const obj:TList<TWin>): Bool; export; stdcall;
var ProcessId : Cardinal;
  R,R1 : TRect;
  Win : TWin;
begin
  Result:=True;
  GetWindowThreadProcessId(Wnd,ProcessId);
  if IsWindowVisible(Wnd) and not IsIconic(wnd)then begin
    GetWindowRect(Wnd,R);
    IntersectRect(R1,R,Screen.DesktopRect);
    if not IsRectEmpty(R1) then begin
      win := TWin.Create(Wnd,R,ProcessId);
      obj.Add(win);
    end;
  end;
end;

procedure GetProcessWindowList(WinList:TList<TWin>);
begin
  WinList.Clear;
  EnumWindows(@EnumWindowsProc, Longint(WinList));
end;

【问题讨论】:

  • 注意:正确的拼写是HTML5

标签: c delphi winapi html


【解决方案1】:

不,HTML5 不能。您正在查看的确实是 Delphi。

在我看来,那篇文章写得相当糟糕,并没有表明您正在查看“VNC 服务器”代码而不是客户端应用程序(这将是 HTML5/JS 部分)。

【讨论】:

    【解决方案2】:

    绝对不是,HTML5 是由浏览器呈现的,它无法连接到任何操作系统内核。

    而且您的代码确实是 Delphi。通过阅读上面发布的代码,这会进行屏幕捕获。我想您必须阅读其他源代码才能了解 HTML 5 适合所有这些。

    编辑 您已经了解了 ThinVNC(HTML5 远程桌面)的屏幕捕获功能。可以在here 找到说明这一点的完整博客。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多