Solved

Disconnect Internet connection

Posted on 2003-11-21
7
543 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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now