![]() |
General Programming »
Internet / Network »
General
Intermediate
License: The GNU General Public License (GPL)
Remote Control PCsBy Andy BantlyTwo projects that work together to remote control PCs across a LAN |
C++ (VC6), Windows, MFC, Dev
|
|
Advanced Search Add to IE Search |
|
|
|
||||||||||||||||
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:
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. :)
ICImageCompress and ICImageDecompress has been added
General
News
Question
Answer
Joke
Rant
Admin
|
PermaLink |
Privacy |
Terms of Use
Last Updated: 21 Oct 2009 Editor: Deeksha Shenoy |
Copyright 2000 by Andy Bantly Everything else Copyright © CodeProject, 1999-2009 Web17 | Advertise on the Code Project |