Solved

How to...

Posted on 1999-01-22
5
146 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
  • 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 30 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Mydac connection data base issue 3 157
delphi prevent click fast 2 218
Drag & Drop... Data from one grid to another 2 15
Firemonkey allowing RTL on android 6 32
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

772 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