Solved

How to...

Posted on 1999-01-22
5
144 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
This video discusses moving either the default database or any database to a new volume.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

746 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

12 Experts available now in Live!

Get 1:1 Help Now