intelliproject logo

Location: Desktop development - C/C++    License: The Intelliproject Open License (IPOL)

Remote control PC's across a LAN

Posted by Silviu Caragea

This is a basic remote control application for Windows.

Skill: Advanced

Posted: 03/10/2008

Views: 750

Rating: 5.00 /5

Popularity: 1.51

Sign Up to vote for this article

Introduction

This is a basic remote control application for Windows formed from two modules. One that runs as server and listen to ports 5001 and 5002 (5001 used for image transfer and 5002 for mouse commands, keyboard is not implemented), and the second one which runs as client.

The application was written in c++ and compiled using Microsoft Visual Studio. NET 2003 (7.1).It can still be compiled using Microsoft Visual Studio. NET 2002 but you should edit ".vcproj" file (change Version="7.10" with Version="7.00").

As technology has been used MFC (Microsoft Foundation Classes), API (Application Programming Interface), ATL (Active Template Library), COM (Component Object Model), + GDI (Graphical Device Interface +) and STL (Standard Template Library).

The operating principle is very simple: The server application is intended to send screenshots to any client that it connects and also to receive the packages that are sent by client (packages containing events from the mouse).

Generic MFC Classes that may prove Useful to You

CriticalSection - Critical sections are useful when only one thread at a time can be allowed to modify data or some other controlled resource. You can also use CCriticalSection from MFC.

CSocket – A very useful socket wrapper class. I extended from IUnknown because I used it as smart pointer. CComPtr wraps any interface pointer and will call AddRef() and Release() properly. That is, you don't need to worry about the life cycle of your COM interface pointer.

CIStreamImpl - The IStream interface lets you read and write data to stream objects. Stream objects contain the data in a structured storage object, where storages provide the structure. Simple data can be written directly to a stream but, most frequently, streams are elements nested within a storage object. They are similar to standard files. CIstreamImpl is extended form IStream and use an internal buffer CBuffer and CBufferReader. Both implemented in istreamImpl.h.

Conclusion

This application is just a basic example. If you want something more advanced you can opt for VNC, an open source remote desktop application.

License

This article, along with any associated source code and files, is licensed under The Intelliproject Open License (IPOL)

About the author

Silviu Caragea

Silviu Caragea is the Founder, Administrator and Chief Editor who wrote and runs The IntelliProject.

He's been programming since 2000 and now he's student at The Faculty of Economic Cybernetics, Statistics and Informatics from Bucharest. In the same time he's working as software developer at Cratima Software, a Romanian software and web design company that activates both on the local and foreign market, providing its customers with software development services, internet and intranet solutions, web design, graphic design and IT consultancy.

His programming experience includes:
- C,C++, Visual C++(Win32 API, MFC, ADO, STL, DAO, ODBC, ATL, COM, DirectShow, DirectDraw, WTL)
- Open Source libraries :CURL & Boost
- HTML, CSS
- Java (SE,ME)
- JavaScript, Ajax, Google Web Toolkit (GWT)
- Php, MySQL
-Oracle, PL SQL
- C# .NET
-Objective C, IPhone SDK, Cocoa

Location: Romania
Ocupation: Software Engineer
Home page: http://www.intelliproject.net

Sign up to post message on the article message board!