Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


RUN TIME Error message '10049' when connecting to remote pc

sonu_amitsonu_amit Member Posts: 37
i have started making a chat machine for my organisation.
I have been facing problem. When I press Send Command Button I get a [red]RUN TIME Error message '10049'. Address is not available from the local machine.[/red]
How do i correct it?
All I have done is [blue]
1. Taken the Address of the Remote Machine
2. In the send command button
Winsock1.RemoteHost strRemoteIP,strRemotePort
Winsock1.SendData strMsg


  • the walrusthe walrus Member Posts: 249
    [italic]RemoteHost[/italic] is a property. use [b]Connect[/b] to connect to a remote host (assuming you're using TCP). here's an example showing how to connect to a host and send a string:

    Private Sub Form_Load()
    Dim strRemoteIP As String, lngRemotePort As Long

    strRemoteIP = "" 'Make this the ip address of the machine you want to connect to
    lngRemotePort = 5190 'Whatever port the remote machine is listenning on

    Winsock1.Connect strRemoteIP, lngRemotePort
    End Sub

    Private Sub Winsock1_Connect()
    Winsock1.SendData "test string"
    End Sub

    you'll have to have another program set up to listen on this port and display the string. if you want to use UDP, use the [b]Bind[/b] method instead of [b]Connect[/b].
Sign In or Register to comment.