kaloyan
asked on
How to...
How to disconnect a Dial-up connection
using Delphi 3 procedure or s.th. else?
using Delphi 3 procedure or s.th. else?
ASKER
The connection is build by other programm...
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(@RASCon n, bsize, Count) = 0 then
if Count > 0 then RASHangUp(RASConn.hRasConn );
end;
i will have a look were trasconn is then get back :-)
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(@RASCon
if Count > 0 then RASHangUp(RASConn.hRasConn
end;
i will have a look were trasconn is then get back :-)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hello i just tested it works perfect :-)
Happy Hanging up
Regards Barry
Happy Hanging up
Regards Barry
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