General information
Category:
Internet applications
Title:
Using Ras features in wwIPStuff
Hi All
I have come across a problem when using the rasdial() and rashangup() methods in wwIPStuff. Basically if I use rasdial() a second time to query whether a connection exists then issuing rashangup() returns .T. but does not hangup the connection.
This doesn't work:
o=create("wwipstuff")
?o.rasdial('Account','Username','Password') && Returns .T. connection made
** Do whatever online
** Now check if we still have connection
?o.rasdial('Account','','') && Returns .T. still have connection
?o.rashangup() && Returns .T. but does not hangup
This DOES work:
o=create("wwipstuff")
?o.rasdial('Account name','Username','Password') && Returns .T. connection made
nHandle=o.nRasHandle
** Do whatever we need to online
** Now check if we still have connection
?o.rasdial('Account name','','') && Returns .T., still have connection
?o.nRasHandle && Still same value
?o.rashangup() && Returns .T. but does not hang up
?o.nRasHandle && Gives 0
** ReAssign rashandle
o.nRasHandle=nHandle
?o.rashangup() && Returns .T. and hangs up
From what I have managed to read I think it has something to do with the handle being set to NULL before reissuing rasdial() but this happens in the wwipstuff dll.
Am I missing something here and/or is there a better way of doing this.
(using W2K SP1 , VFP6 SP5)
Cheers
Charlie
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only