Use the winsock control's bind method.
This program uses the VB6 SP5 version of the Winsock control because that is the version I have on my machine. If you have VB4, remove the control and replace it with the VB4 version.
Note that this method seems to get confused if your machine is a network server. In particular if the machine is a personal Web server, the routine thinks you are connected to the network.
|