Close Internet Connection
Posted on 2003-11-14
Is there any api to close Internet connection in vb6? I tried to find it but unsuccessfully. I just want to click a button and then the program disconnects me from Internet. That's all.
this is all what I found:
Const Internet_Autodial_Force_Unattended As Long = 2
Private Declare Function InternetAutodial Lib "wininet.dll" (ByVal dwFlags As Long, ByVal dwReserved As Long) As Long
Private Declare Function InternetAutodialHangup Lib "wininet.dll" (ByVal dwReserved As Long) As Long
Private Sub Command1_Click()
Dim lResult As Long
lResult = InternetAutodialHangup(0&)
but it didn't work. why? any other suggestions?