Saber si mi PC está conectado a internet
Artículo por Club Developers · 11 May 2006
2206 vistas
			
		Vamos a usar la función InternetGetConnectedState de la dll win32 wininet.dll
 
		
		vbnet
using System.Runtime.InteropServices;
' declaración de la API
Private Declare Function InternetGetConnectedState Lib "wininet.dll" ( _
ByRef lpdwFlags As Integer, _
ByVal dwReserved As Integer) As Boolean
' Uso del API
Public Function IsConnected() as Boolean
Dim Desc As Integer
return InternetGetConnectedState(Desc, 0)
End Function



