by Mark Mokoski (14 Submissions)
Category: DDE
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (5 Votes)
This is an example I did for another VBC member. Others might find it useful.
Simple application to demonstrate a method of inter-application communication with the use of the Winsock control. Project is in two parts.
Part one is the receive or “Host” application.
The Host listens in it’s IP address on a port that is set from the Host Form (default is port 8000).
Part two is the transmit or “Client” application.
When the “send” button is pressed, the Client connects to the Host, then sends data contained in the text box controls to the Host.
The Host receives data one “control” at a time in a Ping-Pong fashion. First the control ID is sent, then acknowledged to the Client (“ACK”), then the Client sends the controls data and the Host sends a acknowledgement. This is repeated until all control data is sent to the Host. The Client then disconnects from the host.
The “Change” event for the controls on the Host can then be used to process the newly arrived data.
Both applications can be on the same computer (use the loopback address 127.0.0.1),
On different computers on your network, or even used over the public internet (not withstanding router, firewall and NAT translation settings).
No API’s, no custom controls, just the tools that came with VB6
I hope you fine this useful.
** 21-FEB-2006 Update ** New zip with some error trap fixes
Download Winsock based inter-application communication (9 KB)