Remote desktop using .NET Remoting layer.

Hey all!
I searched this forum for related topic but found none. So here is my query.

I have to create a Remote desktop application (yes, something similar to LogMeIn Remote Desktop.) but over lan.
I dont know how the commercially available application do it as the lag is very less & it seems very much real time.
My idea is based on taking screen shots of the remote computer and send it to the computer monitoring it. Send the mouse location, clicks and keyboard presses from the monitoring pc to the remote computer.

I think this can be done using Serialization and .NET Remoting layer. And i thought of using C# for code development.I am currently studying more about it. But it would be nice if i got inputs from someone as to how to proceed. I dont want to walk down the wrong road(.NET Remoting) as i dont have a lot of time.

any input and help will be greatly appreciated.
Thanks in advance!!!


  • I tink .NET Remoting is a good selection,but I have 2 question about this matter, u have to put a service on target computer to listen to messages from clients? and 2.Is it necessary to have some skills in Windows System programming?if yes,which resource can be used for "Windows System Programming"?
  • 1. A service is a good option. You can also have a console based or a GUI based server listening for the clients.
    2. No, you dont need to know windows system programming. What you should know is object oriented programming.
  • Thank you very much,But if we don't have to know any thing about Windows system programming how we can catch mouse or keyboard events of different windows and applications which are active in Windows environment?I think we have to to monitor almost all messages which are sent to different applications by Windows on the remote computer and if it's necessary,send that message to the connected computer to simulate that message handling.Is it right?
  • Firstly, i am sorry, i thought you were talking about .net remoting in general, not about my project and that's why i said you dont need to know system programming.
    Normally you would need to know that BUT check this out:

    I havent had time to go through the code but i think that author has found a way to monitor mouse and keyboard activities using .NET! This will be VERY useful on the client side. BUT, on the server side you MAY need to use system programming(at least for my project since i have to forcefully move the mouse pointer to the desired location, thats the whole concept of remote desktop, controlling a remote pc). Well, you have a solution for monitoring, just need a solution for controlling!

    I'll be happy to answer any other queries you have. :)
  • Thak you very much.:)
  • Interestingly enough, I'm working on the same idea - a remote desktop application like TeamViewer, UltraVNC, and the like. But I'm stuck on transferring the remote screen.

    It's not as simple as spamming screenshots across a TCP or UDP channel to the monitoring client. If the server has a 1280 x 1024 size monitor, you'll be transferring 1,310,720 bytes (with the header and overhead) as fast as possible each second - impractical and ineffecient. If you want near-realtime screen updates, a mirror driver would be the best solution. A mirror driver works at a very low-level, notifying your application of any screen changes (this is exactly what UltraVNC uses as described on their homepage). The mirror driver in question is called DF Mirage Mirror Driver, except it seems to be written in C and I don't know how to use it in C#. Not to discourage you, but you need to find a more efficient method than rapidly sending full size screenshots across the channel.

    I would suggest sending only the changed portions of the screen. You could make a custom Pixel class with two fields - location, and color. You can make a custom Picture class which contains a 2-dimensional array of Pixel. However, when I tried this, serialization and compression literally took 40 seconds each with my program memory usage shooting beyond 300K. If you can think of a solution, don't forget to post it here for everybody's benefit!
  • that was some really good information! thanks for your reply!
    Yeah, sending whole screen shots is very inefficient and it wastes a lot of bandwidth. Sending only the changed part of the screen is a better option and i have to implement it soon.

    My progress till now: What i have done is very little. I have written code to take screen shot, save it into memory stream using .png format, convert it into byte array and transfer it over the network, reconstruct the image and display it on a form. I have made the thread which makes the remote calls for the screen shot sleep for 500ms b/w each call and the lag is very little.

    Could be kind enough to tell a bit about your implementation like what language you are using, what features you have provided and what features you intend to provide? What are you doing about the mouse and the keyboard?
    I have specified a url to a page which uses global hooks to monitor the mouse and keyboard and that is what i plan on using.

    I have 1 and a half months to complete this project and i dont know if that is enough...

  • Hey have you done your project? Can you share some knowledge with me ?
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!