[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to...

Posted on 1999-01-22
5
Medium Priority
?
157 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 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Integration Management Part 2
Suggested Courses
Course of the Month19 days, 17 hours left to enroll

872 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