Skip to main content
Email Password   helpLost your password?

Introduction

Here are the original two projects that work together to remote control PCs across the LAN. The projects work under Windows NT 4.0 and Windows 95 (with proper socket setup). It is not completely stable, but it serves as a learning aid.

Project 1, ServerWindow, is a Microsoft VC 6.0 project that is the Server component.
Project 2, ClientWindow, is a Microsoft VC 6.0 project that is the Client component.

There are many goals of the project:

  1. To show an implementation of sockets version 2.0 programming
  2. To show how to write an object oriented C++ project using the Win 32 SDK
  3. To show how to mix C/C++ source code
  4. To show how to utilize a powerful component of Windows message handling using Message Crackers, in an object oriented environment
  5. To show how to capture a desktop display in a device dependant bitmap (DDB) format and convert it to a device independent bitmap (DIB) format
  6. To show how to implement two types of data compression schemes, in assembly language, that work well for graphics and are very fast
  7. To combine all these aspects together in a project that allows remote controlling of a remote PC

Update

Here is the updated solution that contains two projects that work together to remote control PCs across the LAN. These projects work with Windows XP and above. This is a working system that is a redux of the two articles:

The system relies heavily upon Windows message based processing. At the network layer, CTCPSocket relies on SOCKET events as provided by the O/S and it then forwards them onto the message pump of the window that is expecting those messages. It has operator overloading, using << and >>, for sending and receiving data. The data is described by its own class and is strongly typed. The client captures the keyboard and mouse and deploys it using the API function SendInput. The system takes a simplistic approach to detecting updates in the desktop. It divides the screen into 64 rectangles and uses WM_TIMER to process a single rectangle. It was designed for future integration with a mirror driver; however it does really well on its own, for what it is. The graphics are wrapped up in a class that simplifies the programs boilerplate interaction with the boring aspects of bitmaps. This includes operators that allow you using the variable directly in GDI based functions. I even added in my own take of an adaptive Arithmetic Encoding algorithm. It achieves adaptive status by being a 2 pass algorithm. In the first pass, it generates the frequency table for the symbols. In the second pass, it encodes each symbol and then removes the symbol from the frequency table. This has the effect of always giving the most frequent data the shortest bit width, and that is the nature of an adaptive algorithm. Eventually, I plan on adding in support to make use of the Video For Windows functions of ICImageCompress and ICImageDecompress. The Arithmetic Encoding was the fruit of another effort. If you see my previous articles, then you will know that I like to write compression and decompression routines. In the previous articles, I coded Huffman and RLE as assembly level functions. I stopped my assembly work when 64 bit compilers stopped supporting inline assembly :(. There is no support for those previous compressors, though they are faster. I also don't have the time to write in assembler anymore and I never was anything more than just dangerous with it.  

I hope you enjoy reading the source code as much as I have enjoyed writing it. The code should be easy on the eyes; I strive for simplistic code. I don't subscribe to the hard to write / hard to read philosophy.  

* Disclaimer: I have never put much effort into the proper use of the C++ keywords public, private, protected, friend, and const.  If you are personally offended by my stylistic approach or believe that I should make proper use of these keywords, please present your thoughts as constructional criticism.  :)  

History

You must Sign In to use this message board.
 
 
Per page   
 FirstPrevNext
GeneralUpdate to the article Pin
Andy Bantly
11:52 5 Oct '09  
GeneralRe: Update to the article Pin
aspdotnetdev
13:43 14 Oct '09  
GeneralRe: Update to the article Pin
Andy Bantly
18:36 14 Oct '09  
GeneralRe: Update to the article Pin
aspdotnetdev
18:39 14 Oct '09  
GeneralModern Update to the Remote Control System Pin
andybantly
5:36 4 Oct '09  
GeneralRe: Modern Update to the Remote Control System Pin
Hari Om Prakash Sharma
20:12 15 Oct '09  
GeneralRe: Modern Update to the Remote Control System Pin
Andy Bantly
3:07 16 Oct '09  
GeneralMy vote of 1 Pin
gzlonghair
0:40 25 May '09  
QuestionHow to apply IME...? Pin
layus
23:19 22 Apr '09  
General[Message Deleted] Pin
it.ragester
23:00 2 Apr '09  
Generalthank you for Andy Bantly Pin
henry3695
22:22 18 Nov '08  
GeneralDoes it work on XP ? Pin
gndnet
17:39 20 Apr '08  
GeneralRe: Does it work on XP ? Pin
wyb2872
5:44 8 Jun '08  
GeneralRe: Does it work on XP ? Pin
henry3695
22:16 18 Nov '08  
Questionhow to get copy file from another node..? Pin
Khathar
1:36 7 May '07  
GeneralReally amazing! Can you give me a copy of the project comment document? Pin
SuperChen1111
20:36 30 Jan '07  
GeneralRe: Really amazing! Can you give me a copy of the project comment document? Pin
henry3695
22:18 18 Nov '08  
QuestionRemote PC Pin
han qiao
16:20 17 Jan '07  
QuestionDll Convert Pin
Code_Warrior
3:56 4 Dec '06  
Generalshouldn't this be in the Free Tools section? Pin
Mihai Moga
2:02 17 Apr '06  
GeneralCan anyone help me? Pin
Petiao
15:56 23 Feb '06  
Generalthx for sharing!! Pin
Petiao
16:18 22 Feb '06  
GeneralReally amazing Pin
Laxman9
23:33 16 Jan '06  
GeneralVery Nice Work Andy - One question Pin
Swelborn
7:39 20 Oct '05  
GeneralCAN YOU HELP ME Pin
_REU_
12:59 24 Jun '05  


Last Updated 21 Oct 2009 | Advertise | Privacy | Terms of Use | Copyright © CodeProject, 1999-2009