HTML 5真的可以Win 32call吗?

时间:2010-11-11 14:58:14

标签: c delphi winapi html5

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

  

ThinVNC不是传统的VNC,因为   它没有实现AT& T RFB   协议。相反,它建立在顶部   今天的网络标准: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;

2 个答案:

答案 0 :(得分:6)

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

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

答案 1 :(得分:4)

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

你的代码确实是Delphi。通过阅读上面发布的代码,这可以进行屏幕捕获。我想你必须阅读其他源代码才能看到HTML 5适合所有这些。

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

相关问题