|
-
Jun 25th, 2000, 10:31 AM
#1
Thread Starter
Lively Member
How do check if the internet is connected through my lan connection or modem?
-
Jun 25th, 2000, 12:29 PM
#2
Addicted Member
I believe there is a code snippet for this posted in the tips area of this site.
Do a search and you should find it
Regards
Regards
Matt Brown
Hamilton, NZ
VB6 C++ in Visual Studio 6sp4
VB.net Beta 1
-
Jun 27th, 2000, 07:35 AM
#3
Thread Starter
Lively Member
Unfortunatly, I tried that already and it doesn't work right! It always says True for being Online, and True for being connected Online thru Lan. Thanks anyway.
-
Jul 1st, 2000, 01:11 PM
#4
Frenzied Member
I kept getting errors in the module for that tip.
-
Jul 1st, 2000, 09:04 PM
#5
Addicted Member
Make sure you are looking at the right tip
http://www.vb-world.net/internet/tip467.html
Is the correct tip
There are others there as well but they do not handle LAN connectivity
Regards
Regards
Matt Brown
Hamilton, NZ
VB6 C++ in Visual Studio 6sp4
VB.net Beta 1
-
Jul 2nd, 2000, 11:03 AM
#6
Frenzied Member
Thats the one I used but I couldn't get it to work. I got errors in the module all over the place.
-
Jul 2nd, 2000, 05:38 PM
#7
Addicted Member
I'll have a look at the code
Hmmmmm,
I triedabout 5 months ago and it worked fine on a computer with a LAN and Modem connection. I'll have a look at it now.
I've only got a modem connection available to me here, so i can't vouch for the LAN side of it.
Catch you soon
Regards
Regards
Matt Brown
Hamilton, NZ
VB6 C++ in Visual Studio 6sp4
VB.net Beta 1
-
Jul 2nd, 2000, 05:58 PM
#8
Addicted Member
Duplicate Declaration
There is a duplicate declaration in the start of the module
Remove the second instance of
Code:
Public Declare Function InternetGetConnectedState _
Lib "wininet.dll" (ByRef lpSFlags As Long, _
ByVal dwReserved As Long) As Long
and everything should work properly.
I ran it and got True for online() True for viaModem() and False for viaLAN() which is correct for my computer. I can send you the project I made if you would like
Regards
Regards
Matt Brown
Hamilton, NZ
VB6 C++ in Visual Studio 6sp4
VB.net Beta 1
-
Jul 2nd, 2000, 06:40 PM
#9
Frenzied Member
Your kidding.....Thats it? IM GONNA KICK MYSELF!
-
Jul 2nd, 2000, 08:59 PM
#10
Thread Starter
Lively Member
I deleted the second instance of it before, and it still doesn't work correctly for me.
-
Jul 3rd, 2000, 12:55 AM
#11
Addicted Member
Hmmmmm
Exactly what error are you getting Xero?
Regards
Regards
Matt Brown
Hamilton, NZ
VB6 C++ in Visual Studio 6sp4
VB.net Beta 1
-
Jul 3rd, 2000, 10:02 AM
#12
Frenzied Member
What error are you getting?
I just tried it and it works fine. What error are you getting?
-
Jul 7th, 2000, 11:43 PM
#13
Thread Starter
Lively Member
Thats the thing, I'm not getting any error. It just shows up the wrong values.
-
Jul 7th, 2000, 11:45 PM
#14
Addicted Member
Can you give some specifics?
What exactly are the wrong values?
What is your system configuration etc.
Regards
Regards
Matt Brown
Hamilton, NZ
VB6 C++ in Visual Studio 6sp4
VB.net Beta 1
-
Jul 8th, 2000, 12:02 AM
#15
Thread Starter
Lively Member
As I said before, it always returns Online as True and Lan as True and Modem as False. I'm connected through Windows Proxy Server(the one that comes with Windows98 SE and Win2k). I'm using Windows 2000, btw.
And any other specs I don't believe pertain to the problem, other than that the modem on the server computer is 56k, but that shouldn't mean anything.
My current believe is that is has not been tested in Win2k, but I cannot be sure.
Anyway, I'm gonna go to bed now... 1:05 Am... ack... I gotta learn to sleep when I'm supposed too...
-
Jul 8th, 2000, 12:06 AM
#16
Addicted Member
That would be a correct response then.
Unless the modem is physically connected to your computer you are technically accessing the internet over a LAN.
The way I see it your computer is connected through a network card to a server which has a modem connected to the internet. Correct?
This module only returns the status for your computer.
If you want to find out what type of connection is behind the proxy you will have to employ other means
Regards
Regards
Matt Brown
Hamilton, NZ
VB6 C++ in Visual Studio 6sp4
VB.net Beta 1
-
Jul 8th, 2000, 12:12 AM
#17
Thread Starter
Lively Member
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
|