Listener and Client Sockets/Remote Program Execution, etc. | CodeGuru

Listener and Client Sockets/Remote Program Execution, etc.

This is a simple app to demonstrate listener and client Sockets/Remote program execution, and so on. . SockListener GUI SockCommander GUI Environment: VC6, NT4, Win9x Hi Friends, First of all, let me thank all the contributors to codeguru.com; your knowledge and expertise has helped me tremendously. You will see I’m using many code snippets from […]

Written By
CodeGuru Staff
CodeGuru Staff
Jan 21, 2003
2 minute read
CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More

This is a simple app to demonstrate listener and client Sockets/Remote program execution, and so on.

.

SockListener GUI

SockCommander GUI

Environment: VC6, NT4, Win9x

Hi Friends,

First of all, let me thank all the contributors to codeguru.com; your knowledge and expertise has helped me tremendously. You will see I’m using many code snippets from them in many of my applications.

I’m submitting this simple and very basic CSocket program due to the large number of requests I receive almost every day from the codeguru VC++ discussion board. Experienced programmers will find this simple and easy to develop, but I guess the beginners will get a good introduction to CSockets and its raw power.

There are two applications I’m submitting here: SockCommander (SC) and SockListener (SL). SL acts as the server and listens on port 777. This application must be run on that PC which you intend to control (well… in a way). Take down the IP address shown there and then execute SC on that PC from where you intend to control the server. Enter the IP address you got from the server in the relevant edit box in SC and press Connect. If successful, a message will be displayed both on SC and SL, saying ‘Connected’. Now to the interesting part. You can now send commands/messages to the server from now onwards by just entering the command on the Command/Msg edit box and pressing the Send button.

At the moment commands available for SockCommander are:

Command Description
CMD: <your command> Sends a command thats to be executed at SockListener e.g CMD:Notepad.Exe will execute notepad at SL
FILEGET: <path of file to retrieve> Retrieves small files from SL. This is still under test stage, not to be used for big files. e.g FILEGET:c:\msdos.sys (don’t forget to enter a valid filepath in the File Save as edit box)
!SHUT Shuts down SL

The possibilities of these apps are tremendous in the hands of a creative/thinking programmer!

All the best and Happy coding.

Downloads

Demo and Source Code – 71 Kb

CodeGuru Logo

CodeGuru covers topics related to Microsoft-related software development, mobile development, database management, and web application programming. In addition to tutorials and how-tos that teach programmers how to code in Microsoft-related languages and frameworks like C# and .Net, we also publish articles on software development tools, the latest in developer news, and advice for project managers. Cloud services such as Microsoft Azure and database options including SQL Server and MSSQL are also frequently covered.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.