Conectarte a Internet desde Visual Basic:
‘ Conectarse a Internet utilizando el WinInet.dll
‘ Declaraciones
‘
Const Internet_Autodial_Force_Unattended As Long = 2
Public Declare Function InternetAutodial Lib "wininet.dll" (ByVal dwFlags As Long, ByVal dwReserved As Long) As Long
Public Declare Function InternetAutodialHangup Lib "wininet.dll" (ByVal dwReserved As Long) As Long
‘ Código
‘
Dim lResult As Long
lResult = InternetAutodial(Internet_Autodial_Force_Unattended, 0&)
Como desconectarse a Internet:
‘
‘ Ejemplo de como puede desconectarse de Internet utilizando el WinInet.dll
‘
Const Internet_Autodial_Force_Unattended As Long = 2
Public Declare Function InternetAutodial Lib "wininet.dll" (ByVal dwFlags As Long, ByVal dwReserved As Long) As Long
Public Declare Function InternetAutodialHangup Lib "wininet.dll" (ByVal dwReserved As Long) As Long
‘
‘ Código
‘
Dim lResult As Long
lResult = InternetAutodialHangup(0&)
Espero que te sirva.
Saludos,
Roberto García