Solved

Disconnect Internet connection

Posted on 2003-11-21
7
544 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Using FastMM4... should I enable MMX option? 9 75
calling Tcolordialog in dll make the form disappear 8 103
Delphi cmd execution 6 55
Convert MS Word document to a PDF file 9 60
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

932 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

13 Experts available now in Live!

Get 1:1 Help Now