他这里传输的画面差异值,传输数据较小,因而更高效。根据提供的几个record(相互之间是包含关系,自己理一下),你可以依据取到的坐标(在CHANGES_RECORD中)和颜色值,去填充画布或bitmap...循环处理....。

解决方案 »

  1.   


    版主,看了你回复后,我写了下代码,不知为什么总是不对,麻烦看看代码有什么错误之处,还请指出,谢谢
    首先,我把原单元注册表的路径修改了下,
    MINIPORT_REGISTRY_PATH = 'SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services';
    然后,我的调用方法如下var
     i:Integer;
     a:TVideoDriver;
     b:bool;
     c:trect;
    begin
        a:=TVideoDriver.Create;
        b:=True;
        c.Left:=0;
        c.Top:=0;
        c.right:=screen.Width;
        c.Bottom:=screen.Height;
        a.Activate(b,@c);
        a.MapSharedbuffers(b);     for i:=0 to a.bufdata.buffer.counter -1 do
         begin
           with a.bufdata.buffer.pointrect[i] do
           begin
             image1.Picture.Bitmap.Canvas.brush.color:= color;
             Image1.Picture.Bitmap.Canvas.FillRect(rect);
             //Memo1.Lines.Add(IntToStr(rect.Top)+' '+IntToStr(rect.Left)+' '+IntToStr(rect.Right)+' '+IntToStr(rect.Bottom)+' '+ ColorToString(color));
           end;
         end;
      Image1.Refresh;
      a.UnMapSharedbuffers;
      a.Deactivate;
    end;出来的图是黑色,或者是乱色,麻烦各位大哥指点下,谢谢!