Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RASERROR602... PORT ALREADY OPEN!

0 views
Skip to first unread message

Jean-Claude Bertrand

unread,
Dec 30, 1999, 3:00:00 AM12/30/99
to
HI ALL!

I still have the problem with the disconnection caused by others programs
already connected... these programs are not importants compared to the one
I am building right now... so if there's an active connection, it just have
to be killed by MYAPP (the new app should have the "RAS-privilege" on any
others programs).

I have seen the error 602 Port ALREADY OPEN... I have try to disconnected
correcly (RASEnumConn), but I think I need a rought means (like talk direcly
to the modem and say bye, is it possible?).

DO you have an idea how to close the port when it's already open... then
myAPP would have the possibility to be get connected (in all situation).
Any idea would be appreciate!

Thanks for your help and HAPPY NEW YEAR!!!!
Jean-Claude Bertrand

Bill McCarthy

unread,
Dec 31, 1999, 3:00:00 AM12/31/99
to
Ras can take a while to release resources after initiating the hangup
command. When you call rashangup on a connection, you should wait a fair
while before trying to hangup any other connections. Eg:
Do while VbRasEnumConnection(myConns()) > 0
rtn = rasHangUp(myConns(0).hRasConn)
If rtn <> 0 Then Goto ErrorHandler
Sleep 1000
Loop

or something like that.
--
Bill McCarthy, MVP VB
Total Environment
www.TotalEnviro.com/PlatformVB


"Jean-Claude Bertrand" <bertr...@hotmail.com> wrote in message
news:wbRa4.72285$X47.3...@quark.idirect.com...

Ray Mercer

unread,
Jan 7, 2000, 3:00:00 AM1/7/00
to
The MSDN specifically recommends waiting 3 seconds (probably overkill) or
calling RasGetConnectStatus continually in a loop until the handle becomes
invalid before continuing. See my other post entitled "Re: The RasDial
Function" today for an URL to DL a sample that uses the latter method...

Ray Mercer
MS-MVP Visual Basic
www.shrinkwrapvb.com

Bill McCarthy <bil...@gsat.edu.au> wrote in message
news:e1HmDJ0U$GA.221@cppssbbsa04...

0 new messages