Network connection Status

Erdenemandal

Well-known member
Joined
Jul 5, 2004
Messages
63
Location
Deutschland
Hi, ALL

I have a problem to get "Network status". I use

Code:
 Private Declare Function InternetGetConnectedState Lib "wininet.dll" ( _
                ByRef lpSFlags As Long, _
                ByVal dwReserved As Long) _
        As Boolean

 Private Declare Function InternetGetConnectedState Lib "wininet.dll" ( _
                ByRef lpdwFlags As Integer, _
                ByVal dwReserved As Integer) _
        As Boolean

and check function

Code:
Public Function IsConnectedLife() As Boolean
                Dim dwflags As Integer
                Returns true if there is any internet connection. 
                IsConnectedLife = InternetGetConnectedState(dwflags, 0)

        End Function


and I always returns me "TRUE", even I took a network cable out.

Please, help me HOW I can get REAL network connection STATUS.

Thanks,
Erdenemandal
 
Works for me. Are you by any chance using a router? If yes try unplugging the cable from the router, instead of unplugging the router from the modem, this worked for me.
 
mutant said:
Works for me. Are you by any chance using a router? If yes try unplugging the cable from the router, instead of unplugging the router from the modem, this worked for me.


I want to check just Local PCs connection status. A Program check at the first a connection status himself and is no connection shows a message.
 
Back
Top