use*_*291 2 c delphi winapi html5
在本教程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;
Run Code Online (Sandbox Code Playgroud)