Results 1 to 40 of 66

Thread: Socket Issue[Resolved]

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2004
    Posts
    279

    Resolved Socket Issue[Resolved]

    VB Code:
    1. Function IsServerOnline() As Long
    2. Dim MySocket As Long
    3. MySocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)
    4.  
    5.     Dim server As String
    6.     server = "66.66.66.66" ' example ip
    7.     [b]If (Connect(MySocket, server, Len(server))) = SOCKET_ERROR Then[/b]
    8.         MsgBox "Cannot Connect to Server", vbCritical, "Error"
    9.         Unload Me
    10.         End
    11.         IsServerOnline = 0
    12.     Else
    13.         MsgBox "Connected", vbInformation
    14.     End If
    15. End Function
    It errors "Type mismatch" on the bold line on "server"

    What am I doing wrong? (yes I have the API's declared)
    Last edited by Tantrum3k; Aug 16th, 2005 at 11:10 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width