Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using Ras features in wwIPStuff
Message
 
To
31/05/2001 20:23:19
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00513526
Message ID:
00514784
Views:
12
>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

The behavior you're seeing with the handle getting reset is correct - after the call to RasHangup() the handle should revert to 0 - that's how wwipstuff knows what the status of the connection is.

However, I'm not sure why the modem isn't hung up properly. It may be that the modem isn't responding correctly to the diconnection string that Windows sendds it or maybe it just takes a few moments to actually shut down - on my machine it takes about 5 seconds after the call for the connection to go away. RAS sends the request to shut it down and then system goes off and does it when it has a second.


The RAS features of wwIPStuff usually work rather well with Win2k and NT, so I'm surprised to hear this. With 98/ME there are often problems (as stated in the docs). These RAS features were never meant for client side use but rather used on the server side for accessing external content. If you need something more robust there are several other libraries here in the libs that do what you want including Christof Lange's Struct classes which has RAS as one of the examples.


+++ Rick ---
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform