Disconnect Internet connection

Hi all,
Is there a solution to disconnect a Internet connection - computer connected to the Internet via LAN.
Thanks in advance.
neshkovAsked:
Who is Participating?
 
pr_wainwrightCommented:
neshkov,
            Use TClientSocket & TServerSocket. Write a server application to be run on the PC with the modem that can connect/disconnect to the internet. The client application can then be used to remotely connect/disconnect the modem. I use this at my home to disconnect a LAN modem.

http://users.pandora.be/dirk.claessens2/   
for the socket source code.

http://www.kyler.com/pubs/ddj9855.php 
for the RAS source code. (Just add a TServerSocket).

Regards
Paul.

0
 
GloomyFriarCommented:
What do you mean saying "disconnect".
Unplug the network cable ;-)
0
 
neshkovAuthor Commented:
No...Terminate, disconnect.... something like "RasHangUp( )" and RASAPI32.DLL.
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

 
GloomyFriarCommented:
If you are connected "via LAN" how you can do "HangUp"?
You are disconnected till a 1. programm from your computer will send a request to a remote computer or
2. programm from remote computer will send a request to your computer.

If you want to prevent case 2 then you need some kind of firewall.
0
 
neshkovAuthor Commented:
May be there is a way to close handles that are created and used by the WinINet functions ( any Internet handle or subtree of handles of the type HINTERNET) and free any associated resources with InternetCloseHandle(). ...just a thought!
0
 
GloomyFriarCommented:
What is the 'global' idea?
What you need?
0
 
neshkovAuthor Commented:
Thanks Paul!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.