Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi, ALL

 

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

 

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

 

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

  • *Experts*
Posted
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.
Posted
Works for me. Are you by any chance using a router? If yes try unplugging the cable from the router' date=' instead of unplugging the router from the modem, this worked for me.[/quote']

 

 

I want to check just Local PC's connection status. A Program check at the first a connection status himself and is no connection shows a message.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...