Hello,

Does anybody know how programs like Remote admin, PCAnywhere etc, allow you to see the remote Desktop throught a network?

any articles, ideas, examples are welcomed.
Posted on 2002-02-01 07:35:22 by Ray
I guess they capture it as a bitmap, compress it, and send it to the host after...
Posted on 2002-02-01 07:55:50 by JCP
Hi!

I'm also VERY interested in this topic!

>I guess they capture it as a bitmap, compress it, and send it to the host after...

Nope! Take a look at PC-DUO (or pcAnywhere etc.). They have REALTIME view with a 0 sec delay! If I make a screenshot of my desktop, it's about 5 Meg in size (32 bit background picture, 1280x1024). Compressing with WinRAR takes it down to about 600kb... but it needs a few seconds...

This can't be the only way!

At my school the use a system wich works with QuickTime MOV Videos. They also capture the desktop, compress it to a 1 Frame MOV file, send it to the host and merge all frames to a complete movie... stupid solution, wich has a 20 - 30 sec delay on a 10mbit network.

If anyone could provide *any* information, how programs like pcAnywhere or Remcon PC-DUO transfer the Visual Data, please post it here!


Thanks in advance,
bAZiK

P.S.: And please don't come with stupid Webbrowser driven Open-Source solutions :-)
Posted on 2002-02-01 08:11:54 by bazik
The one I use (Windows Remote) does that... (decrease the color depth to gray levels, compresse it, and send it).

I know there's other way (I don't know them, though), but it is the easiest
Posted on 2002-02-01 08:16:52 by JCP
I should take a closer look at "Microsoft's Terminal Server Client"... it's only 400k in size and enables Remote Viewing of a Win2K Terminal Server... great stuff =)

But, let us do some brainstorming!

Sending a Bitmap is the first idea...
Posted on 2002-02-01 08:23:58 by bazik
First idea: only send parts of the screen that are updated
Second idea: send positions of windows and controls, their captions / texts / and bitmaps.
Posted on 2002-02-01 08:29:14 by Qweerdy
I think only sending the updated parts is what is used to give the bigest speed increase I remember using Netmeeting to view a desktop over the internet with my 56k and sections would go grey while they were being updated
Posted on 2002-02-01 09:07:21 by Quantum
Qweerdy,
WinVNC ( http://www.uk.research.att.com/vnc/ )uses method1, and it seems to work well.

Everyoneelse,
You might want to check out the source to VNC (see above link) it does just this and is open source :) ( Visual C Warning )
*EDIT*
Oh, yeah also check out the source for a BackOrifice Plugin called BoPeep, it does this in a much simpler and less bandwidth intensive way (greyscale images)
( http://sourceforge.net/project/showfiles.php?group_id=4487 )
Posted on 2002-02-01 09:36:17 by emonk
Hi,

I've been planning a utility to do something like this for when I give lectures, it would be a great way to show a whole class on how to do something using their own computers sorta like a realtime animation of the process on 30 computers at the same time in the lab... What I was thinking about doing to avoid the big file transfers was to section the screen into a grid, then where ever the mouse moved or where areas are redrawn I would do a screen cap and send only the sections of the grid that were affected by the change.

I never did get past the planning stage being so busy and all, but if anyone has worked on it I'd really enjoy seeing in action.


Oops... :rolleyes: Rereading the thread, it seems I must have skip a reading a few posts... ahh well... back to work.

Chiao,
James
Posted on 2002-02-01 12:30:00 by JamesE
www.tightvnc.com this will give the best ideas :)
Posted on 2002-02-01 13:23:11 by Hiroshimator
well... doesn't checking the screen for changes involve some serious calculation time?

I know PCduo, it's great.

Doesn't each menu, window, control etc has got its own hwnd? So maybe we should check for a change on these, but only on those which are displayable, but I don't know if this is possible with the win32api.

Maybe we should try hooking the gdi-draw functions (if possible). Then catch each drawing on the screen. What do you think?
Posted on 2003-04-04 12:54:14 by nyook
I use Radmin and in 2000/xp, they say there is the possibility to hook to the video display.

Checking in the PC-Duo version, a quote from their site (Stunning Performance, High Reliability):
http://www.vector-networks.com/pcduo-enterprise/remote-control/index.htm
"PC-Duo Remote Control is GDI Intercept based and uses a Mirror Driver on W2K and above."

Although it's easier to get screenshots, hooking the GDI or creating another display driver seems to be the way to go faster than screenshots. Speaking of which, I've already tried to make a screenshot based remote control and on a local network, it's not that bad.
Posted on 2003-04-04 16:45:56 by Silas
Are you saying that it's possible to access video hardware via a GDI hook?
If you can read the video ram this way, think it possible to write also?
Anyone familiar with NT native api know of any non GDI methods?
Posted on 2003-04-04 23:01:07 by Homer
i dont know, but the idea of only iupdate one art of a bitmap sound OK, also i think you need first make a like setup for the screen (take a whole screen shoot of the monitor), then if you can install a like hook but for the specific Message WN_PAINT you have now what you need for update that part of the screen in specific the region that wil be updated.

Is more like a filter for messages, but if you can hook is best.

This maybe be the replace for
well... doesn't checking the screen for changes involve some serious calculation time?


some like a little algo

In startup

capture the screen ->compress or any that you can do
Install a filter or a hook for WM_PAINT.... maybe need hook the mouse and the kb i think WM_PAINT cover this cases

In process

yep, process the message :) (get the region that is updated)

______________

Also if you want make some diferent than a bitmap, maybe this can be like a editor for resources, and send the commands to the other computer directly.. amm i am refering to some like a VM for process messages like WM_CREATE, PAINT, SETTEXT, GETTEXT... see only process and send the messages refering to some in the monitor for PAINT some and not the pricture

i think some like:

In startup:

Obtain the process three (?rbol)
see what of this aplications have a GUI and
only catch the messages for this applications and manipulate only the messages refering to the screen and get the values like pointer to strings, pointer to bitmaps, etc.. dunno :S

In process
See if some new application have a GUI or if some was destroyed
send the correct messages to the other computer (this need interpret the incomming commands)

maybe can be a combination of boot ideas.



Have nice day.
Posted on 2003-04-05 17:50:28 by rea
Originally posted by hgb install a like hook but for the specific Message WN_PAINT you have now what you need for update that part of the screen in specific the region that wil be updated.



see what of this aplications have a GUI and
only catch the messages for this applications and manipulate only the messages refering to the screen and get the values like pointer to strings, pointer to bitmaps, etc.. dunno :S


yea, but then we need checking for new apps. isn't it possible to hook all wm_paint messages, regardless of their source?

But a WM_PAINT message is just like a request to redraw parts of the screen, right (sry, still a newbie)? So we should catch the WM_Paint messages _after_ it passed the application. otherwise we just can catch the old content (or always wait 0.5secs and then get the region bitmap but this kinda sucks :))


get the values like pointer to strings, pointer to bitmaps, etc.. dunno :S


well, but usually we haven't access to other programm's memory. at least i did think so :D
Posted on 2003-04-08 14:01:23 by nyook
I lso think it is getting a "bitmap" reduced via fast compressing and color dropping and sending only updates via internet (also dropping some updates if unable to do them in time ..ie this frame) ...

Theoretcaly it whould be somehow posible to sync 2 machines and send only GDI commands from then on...but with wndows--it needs a restart to update its own variables :D so i guess it is possible in theory but quit impossible in practice ...cough on windows

Besides such "send only commands" would mean we will not see owner draw stuff like Winamp or we should have same bitmaps /applications (eacxtly the same) on both computers... quite imposible IMHO

So basically what is left is to find a way to send as little as possible via network/dial-up/whatever and still update the screen on remote location :P
Posted on 2003-04-08 14:17:18 by BogdanOntanu
na?ve implementation: keep a screen copy, update XX times a second, scan for update deltas. lame.

another: hook windows messages globally, trap WM_PAINT, send only updated rectangles (can be improved with a bit of delta as well, as many programs update their full client rect on paint. much better than lame approach).

another: hook GDI. forget about 9x as 9x sucks, code for NT. Will probably require driver, but should be able to run pretty swell.
Posted on 2003-04-08 14:25:44 by f0dder
1) Take a screen shot on startup, SAVE it, compress and send it.

2) Every so often, take another screen shot, compare it to the SAVED one, compress and send only the changed parts.

3) Replace the old saved shot with the current one.

4) Go to 2.

:grin:
Posted on 2003-04-08 14:39:06 by S/390
S/390, that's the "na?ve" implementation I proposed. it sucks.
Posted on 2003-04-08 14:42:44 by f0dder
well, i think catching wm_paint would suit our needs.
any advantages in hooking gdi?

so what is left now for me is how-to-hook. i think you now how to, but i think i'll have to google quite a few times (or read the forum faq).

how you send the data is then open to the implementor.
Posted on 2003-04-08 14:55:48 by nyook