|
-
Dec 4th, 2007, 05:48 PM
#1
Thread Starter
Addicted Member
Close all Internet connections
i was working on a security program... and kinda got stuck in middle when i had to suspend all internet connections when user doesnt want any internet traffic on there computer... i tired searching couldn't find any code...or method that vb can use to disconnect from internet and then reconnect...
-
Dec 4th, 2007, 08:48 PM
#2
Re: Close all Internet connections
This has been asked before and it seems there isn't a good solution for that. The easiest way would probably be using IPConfig.
Disconnect: Shell "cmd.exe /c IPCONFIG /RELEASE", vbHide
Connect: Shell "cmd /c IPCONFIG /RENEW", vbHide
Or checking the TCP Table with a timer and disconnecting already established connections.
-
Dec 4th, 2007, 09:42 PM
#3
Thread Starter
Addicted Member
Re: Close all Internet connections
Disconnect: Shell "cmd.exe /c IPCONFIG /RELEASE", vbHide
Connect: Shell "cmd /c IPCONFIG /RENEW", vbHide
this works.. but not extaclly what i am looking for =/ cuz i dont want to do it using cmd
Or checking the TCP Table with a timer and disconnecting already established connections.
how do i do that
-
Dec 5th, 2007, 10:03 AM
#4
Re: Close all Internet connections
There was a good example on vbip.com, but that website seems to be down.
http://www.vbip.com/iphelper/get_tcp_table.asp
Here's another example, use SetTcpEntry to stop the connections.
http://vbnet.mvps.org/index.html?cod...ctiontable.htm
But like I said, you can only disconnect already established connections, so it's worthless for a security application.
-
Dec 7th, 2007, 08:50 AM
#5
Frenzied Member
Re: Close all Internet connections
-
Dec 7th, 2007, 03:12 PM
#6
Thread Starter
Addicted Member
Re: Close all Internet connections
 Originally Posted by Chris001
yea that is kinda what i was looking for... i got the code to work but i dont know how to disconnect as u said use SetTcpEntry.. what is that? how to use that
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|