|
-
Aug 9th, 2002, 03:05 AM
#1
Thread Starter
Fanatic Member
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
-
Aug 9th, 2002, 03:10 AM
#2
-= B u g S l a y e r =-
don't have a full solution , but in order to check if you have an internet connection, try this :
VB Code:
Private Declare Function InternetGetConnectedState Lib "wininet.dll" (ByRef lpSFlags As Long, ByVal dwReserved As Long) As Long
If InternetGetConnectedState(0, 0) Then
MsgBox "Online"
Else
MsgBox "Offline"
End If
-
Aug 9th, 2002, 03:16 AM
#3
Thread Starter
Fanatic Member
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
-
Aug 9th, 2002, 05:50 AM
#4
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|