代码之家  ›  专栏  ›  技术社区  ›  user310291

HTML 5真的能赢得32Call吗?

  •  2
  • user310291  · 技术社区  · 14 年前

    在本教程中 http://www.codeproject.com/KB/IP/ThinVnc.aspx 上面写着:

    thinvnc不是传统的vnc,因为 它不执行AT&T RFB 协议。而是建在上面 当今的Web标准:Ajax、JSON 和HTML5。

    但是在我看来,当查看代码时,它就像Delphi,所以有人能解释一下上面这句话的真正含义吗:HTML5真的能够进行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;
    
    2 回复  |  直到 14 年前
        1
  •  4
  •   Buhake Sindi Tesnep    14 年前

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

    你的代码就是德尔菲。通过阅读上面发布的代码,可以进行屏幕捕获。我想你必须阅读其他的源代码,才能知道HTML5在所有这些方面的适用性。

    编辑 您已经看到了thinvnc(HTML5远程桌面)的屏幕捕获功能。这个 满的 可以找到说明这一点的博客 here .

        2
  •  6
  •   Justin Niessner    14 年前

    不,HTML5不能。你所看到的,确实是德尔菲。

    在我看来,这篇文章写得相当糟糕,并且没有明确指出您所关注的是“VNC服务器”代码,而不是客户机应用程序(这将是HTML5/JS部分)。