Solved

Disconnect Internet connection

Posted on 2003-11-21
7
550 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying 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 Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Suggested Courses
Course of the Month8 days, 7 hours left to enroll

617 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