VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Connect and Disconnect internet at selected time

Scott Davis  (1 Submission)   Internet/HTML   Visual Basic 5.0   Intermediate   Wed 3rd February 2021

Connect and/or Disconnect from internet at selected times. VERY GOOD anti-phone solicitor program. Set it to dial at 8:00, and disconnect at whatever time u think u'll be up. I am not finished yet, but this is what i have done, you will be able to disable one of the options with next version, but here ya go, questions email me.

Assumes
Two things, if you have the connection properties set to "Never Dial a Connection" the api will not work. Secondly, i use Juno, if i dial a connection with juno, and try to use this to disconnect, it will not. Im not sure about other services, but it will not disconnect from internet when third party software connects, and this is not possible for me to fix at this time, i will try to find a way to. It will however disconnect if you use the dialup that the program uses, which is the same as what IE uses. If i come across anything else, i will post it, if you come across something, please also post it, i will try to fix it.

API Declarations
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 Const INTERNET_AUTODIAL_FORCE_ONLINE = 1
Private Const INTERNET_AUTODIAL_FORCE_UNATTENDED = 2
'Not code from program, but examples on how to use api if you dont want to download
'Connect normally
InternetAutodial INTERNET_AUTODIAL_FORCE_ONLINE, 0
'Force connect
InternetAutodial INTERNET_AUTODIAL_FORCE_UNATTENDED,0
'Disconnect
InternetAutoDialHangup 0

Rate Connect and Disconnect internet at selected time (6(6 Vote))

Download Connect and Disconnect internet at selected time

Connect and Disconnect internet at selected time Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters