Remote PC Control

This is a discussion on Remote PC Control within the Windows Programming forums, part of the Platform Specific Boards category; A while back I wrote a program to take control of a remote computer (sort of like "PC Anywhere"). The ...

  1. #1
    Magically delicious LuckY's Avatar
    Join Date
    Oct 2001
    Posts
    856

    Remote PC Control

    A while back I wrote a program to take control of a remote computer (sort of like "PC Anywhere"). The server just allowed a client to connect and had a simple dialog. The client had a fullscreen dialog and within the window, I drew the screen that the server had visible. The part I never completed was the actual remote control.
    I planned on allowing a client move over the server screen to move the servers cursor, and other such stuff.
    Anyway, the problem I was unable to overcome and forced me to desert the project is the time it takes to capture the screen and send it to the client.
    I tried many things to speed up the process, but I couldn't figure a way to do it. There must be a quick way somehow...
    When I abandoned it, the program was doing this:
    -every 1 second server captures the screen to a DIB (using DibLib)
    -then it is converted to jpeg (using jpeglib) because the DIB is massive in size (actually the jpeg is still many kB as I remember)
    -then it is compressed (using zlib)
    -then it is sent (via a socket of course) to the client where it is decompressed, converted from jpg->dib, then painted to the screen
    It may seem like overkill, but I really was trying everything I could to speed up the process. As you can imagine, doing all this didn't speed things up much and all those steps once a second isn't very useful.

    Any tips you can offer will be greatly appreciated. With any luck someone can give me good enough info that I can work on the project again. Otherwise, *shrugs shoulders with palms facing up* eh.
    Last edited by LuckY; 03-25-2003 at 09:24 AM.

  2. #2
    Registered User
    Join Date
    Mar 2003
    Location
    UK
    Posts
    169
    Instead of sending the hole screen capture, just send the changes or differences. i.e. if part of the screen is updated since the last capture send the rect of that part of the screen etc...

    You could try sub classing all windows on the desktop and intercept the WM_PAINT's and keep a record of coordinates of the rectangle that encloses the update region's etc... Then capture and send only the retangle bitmaps after the region is painted.

  3. #3
    Registered User
    Join Date
    Feb 2002
    Posts
    329
    Or you could study the VncViewer code

  4. #4
    Magically delicious LuckY's Avatar
    Join Date
    Oct 2001
    Posts
    856
    That is a very good idea Scarlet.. A good fresh thought I wasn't able to come up with on my own...

    I have never heard of realvnc before, knutso.. I was pleasantly surprised to find what that link has to offer.

    Thanks much to both of you. Much obliged.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Remote debug not working in Visual Studio 2003
    By Bassquake in forum Tech Board
    Replies: 12
    Last Post: 08-22-2008, 12:11 PM
  2. Howto make own application for remote control handling
    By s-men in forum Windows Programming
    Replies: 16
    Last Post: 08-16-2008, 04:22 PM
  3. TV remote control software for PC
    By spank in forum Tech Board
    Replies: 1
    Last Post: 08-26-2007, 06:37 AM
  4. Button handler
    By Nephiroth in forum Windows Programming
    Replies: 8
    Last Post: 03-12-2006, 05:23 AM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21