I have a Master/Slave application that I am writing. Currently the Master application needs the user to manually enter the IP addresses of Slave PC's. I would like to automate this process, so that the Slave sends it's IP to the Master. Following this, the Client will wait for the Master to respond.
Here is what I have so far:
Private Sub Form_Load()
'Determine the IP address of the Client Machine
'and send this information to the Master Machine / Application
Dim ThisIP As String
ThisIP = Me.tcpClient.LocalIP
'Set the LocalPort proplerty to an integer
'Then invoke the Listen method.
tcpClient.LocalPort = 1001
Where I am having problems... tcpClient.SendData (ThisIP)
1. Why am I getting errors (wrong type of declaration)?
2. How can I accomplish this task?
P.S. Here is the error that I am getting:
Run time error 40006
Wrong protocol or connection state for the requested transaction or request.