Results 1 to 3 of 3

Thread: [RESOLVED] Which Connection?

  1. #1

    Thread Starter
    Addicted Member aa9gg's Avatar
    Join Date
    Apr 2009
    Location
    Chicagoland
    Posts
    184

    Resolved [RESOLVED] Which Connection?

    Hi...
    I'm working on a program in VB6 that is using winsock. The program connects my computer to a device via a WIFI AdHoc connection. This all works fine. The problem is...if you are NOT connected to this correct AdHoc network the program crashes. How can I tell, using VB6, where I am currently connected?

    My "device" IP is hard-coded at 192.168.10.100, so I have RemoteHost set to 192.168.10.100, RemotePort needs to be 10002, and LocalPort = 0.

    I guess what I'm looking for is the SSID that I'm currently connected to.

    Ideas?
    Last edited by aa9gg; Aug 18th, 2009 at 01:51 PM. Reason: more content
    FCC Section 97.313(a) “At all times, an amateur station must use the minimum transmitter power necessary to carry out the desired communications.”

    I'd rather run a "Killer-Watt" than a KiloWatt - QRP Rules!!!

  2. #2

    Thread Starter
    Addicted Member aa9gg's Avatar
    Join Date
    Apr 2009
    Location
    Chicagoland
    Posts
    184

    Thumbs up Re: Which Connection?

    Not EXACTLY what I was looking for, but it DOES solve my problem.

    http://www.vbforums.com/showthread.p...hlight=winsock
    FCC Section 97.313(a) “At all times, an amateur station must use the minimum transmitter power necessary to carry out the desired communications.”

    I'd rather run a "Killer-Watt" than a KiloWatt - QRP Rules!!!

  3. #3
    Member
    Join Date
    Mar 2006
    Posts
    46

    Re: [RESOLVED] Which Connection?

    AA9GG, this is what you needed. You just needed some error correction.
    However try this. Port = 1234 Address 192.168.10.11
    sub connect()
    on error goto handleit
    winsock.connect address,port
    do
    Doevents
    loop until winsock.state=7 'connected

    Handlit:
    if err.number<>0 then
    msgbox err.description
    winsock.close
    exit sub

    73, KC0GQT

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