Results 1 to 6 of 6

Thread: Detecting if AOL is connected?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Posts
    2

    Question

    Hi,

    I'm writing a VB internet-enabled app and no matter what I do I can't my app to correctly identify if the computer is logged onto the Internet if the dial-up being used is AOL. I've tried numerous different methods, using API calls, the winsock control, the inet control etc. etc. OK, I can call a web page using AOL (using wininet.dll for instance) but if it's not connected it can take ages for the app to come back and say it's not connected, e.g. about 2 mins. This just isn't good - I can't expect people to wait that long.

    It works fine for all other dial-ups, lans, cable modems or adsl lines but not for AOL.

    Anybody got anuy ideas? This is driving me round the twist.

    Cheers

    Gareth

  2. #2
    Guest
    To detect if AOL is open and online, search for the Welcome screen.

    Code:
    Private Function AOL() As Boolean
        Dim aolframe As Long, mdiclient As Long, aolchild As Long
        aolframe = FindWindow("aol frame25", vbNullString)
        mdiclient = FindWindowEx(aolframe, 0&, "mdiclient", vbNullString)
        aolchild = FindWindowEx(mdiclient, 0&, "aol child", vbNullString)
        aolchild = FindWindowEx(mdiclient, aolchild, "aol child", vbNullString)
    
        If aolchild <> 0 Then
            AOL = True
        Else
            AOL = False
        End If
    End Function
    
    
    Usage
    
    
    Private Sub Command1_Click()
    
        If AOL() Then
            MsgBox "Connected",64,"AOL"
        Else
            MsgBox "Not Connected",16,"AOL"
        End If
    
    End Sub

  3. #3
    Guest
    Oops...forgot to include the API functions that you need to be abled to run that code.

    Code:
    Private Declare Function FindWindow Lib "user32" _
    Alias "FindWindowA" (ByVal lpClassName As String, ByVal _
    lpWindowName As String) As Long
    
    Private Declare Function FindWindowEx Lib "user32" _
    Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As _
    Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long

  4. #4

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Posts
    2

    I tried that...

    Hi,

    I found that on a previous post after I'd posted my message but I'm afraid to say that it doesn't appear to work with AOL 4 or 5. I will double-check the code but I'm sure it was done right and I obviously added the API declerations.

    Any ideas?

    Gareth

  5. #5
    Guest
    AOL 4.0 it should work.

    I can't help you with 5+ versions because I cannot/will not download them.

    I download/installed AOL 5.0 and my computer crashed.
    I stopped at 4.0..I don't use AOL a whole lot.
    And VB6, I'm not taking any chances.

    Get a Windows/API Spy and find the AOL Welcome window and then you can tell whether AOL is signed on or not.

  6. #6
    Guest
    Here is the code I got from VB6. After I reformatted my computer, I decided to dump Netzero (piece of crap) and FreeLane Excite (piece of crap also) and just use AOL 6.0 . It's crap, but it's a whole lot better than the free crap that is starting to charge.


    Code:
    Dim aolframe As Long, mdiclient As Long, aolchild As Long
    aolframe = FindWindow("aol frame25", vbNullString)
    mdiclient = FindWindowEx(aolframe, 0&, "mdiclient", vbNullString)
    aolchild = FindWindowEx(mdiclient, 0&, "aol child", vbNullString)

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