?
Solved

How to...

Posted on 1999-01-22
5
Medium Priority
?
153 Views
Last Modified: 2010-04-06
How to disconnect a Dial-up connection
using Delphi 3 procedure or s.th. else?
0
Comment
Question by:kaloyan
[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
  • 4
5 Comments
 
LVL 17

Expert Comment

by:inthe
ID: 1362833
hi,
are you using f.piette's components or something else?
there is a api
 RASHANGUP(1);
you could try ,but better to say which components you are using to connect
Regards Barry

0
 

Author Comment

by:kaloyan
ID: 1362834
The connection is build by other programm...
0
 
LVL 17

Expert Comment

by:inthe
ID: 1362835
you'll probably have to use RasEnumConnections to find the RAS connection handle that you want to hang up, and then call RasHangUp with that handle
 Regards Barry

ps i found an example for you with a component called TRasConn

Procedure HangupRAS;
var
  RasConn  : TRasConn;
  bsize    : DWORD;
  Count    :  DWORD;

begin
  RasConn.dwSize := SizeOf(TRasConn);
  bsize := SizeOf(RASConn);
  if RASEnumConnections(@RASConn, bsize, Count) = 0 then
     if Count > 0 then RASHangUp(RASConn.hRasConn);
end;

i will have a look were trasconn is then get back :-)

0
 
LVL 17

Accepted Solution

by:
inthe earned 120 total points
ID: 1362836
http://www.delphipages.com/
under comm/winsock section download Ras Header v2.11
install and add ras to your uses section on form  then the routine i posted earlier should do what your after
Regards Barry
0
 
LVL 17

Expert Comment

by:inthe
ID: 1362837
Hello i just tested it works perfect :-)

Happy Hanging up
Regards Barry
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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 this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

777 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