Solved

Disconnect Internet connection

Posted on 2003-11-21
7
546 Views
Last Modified: 2010-04-05
Hi all,
Is there a solution to disconnect a Internet connection - computer connected to the Internet via LAN.
Thanks in advance.
0
Comment
Question by:neshkov
  • 3
  • 3
7 Comments
 
LVL 6

Expert Comment

by:GloomyFriar
ID: 9797240
What do you mean saying "disconnect".
Unplug the network cable ;-)
0
 

Author Comment

by:neshkov
ID: 9797333
No...Terminate, disconnect.... something like "RasHangUp( )" and RASAPI32.DLL.
0
 
LVL 6

Expert Comment

by:GloomyFriar
ID: 9797464
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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 

Author Comment

by:neshkov
ID: 9798396
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
 
LVL 6

Expert Comment

by:GloomyFriar
ID: 9799193
What is the 'global' idea?
What you need?
0
 
LVL 1

Accepted Solution

by:
pr_wainwright earned 250 total points
ID: 9842615
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
 

Author Comment

by:neshkov
ID: 9858926
Thanks Paul!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question