Results 1 to 4 of 4

Thread: Detecting Preffered Inet Connection and using it?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2002
    Location
    SE England
    Posts
    732

    Detecting Preffered Inet Connection and using it?

    Hi All,

    I am writing a program that uploads some files to the specified FTP server. This is nearly finished and uploads the files correctly etc provided the user is connected to the internet. (I have used API calls to the Wininet.dll).

    What I need to do know is how do I find out what the users default internet connection is, and open it?

    E.G.

    If they have multiple dial up connections, dial the default, or offer them a choice of connections.

    If they connection via a gateway off their network, check if this is a vailable etc.

    Any help would be greatly appreciated... Thanks.
    Leather Face is comin...


    MCSD

  2. #2
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    don't have a full solution , but in order to check if you have an internet connection, try this :

    VB Code:
    1. Private Declare Function InternetGetConnectedState Lib "wininet.dll" (ByRef lpSFlags As Long, ByVal dwReserved As Long) As Long
    2. If InternetGetConnectedState(0, 0) Then
    3.     MsgBox "Online"
    4. Else
    5.     MsgBox "Offline"
    6. End If
    -= a peet post =-

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2002
    Location
    SE England
    Posts
    732
    Thanks Peet, but I ahd already found this function...

    What I am concerned about is that at the moment the user has to maually dial up before using this section of out application. Which is a bit of a pain in the ass. Oh well i'll keep hunting..
    Leather Face is comin...


    MCSD

  4. #4
    Addicted Member chicocouk's Avatar
    Join Date
    Sep 2001
    Posts
    207
    I needed to create a dial-up networking connection and then connect through it for a project i was working on, and found a lot of useful info here

    http://home.iprimus.com.au/billmcc/P...VB/Default.htm

    Some of it is pretty heavy going, or at least for me it is anyway, and I seem to remember it's different on nt/2k boxes than it is on 9x machines

    Good luck

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