| Dart Home | PowerTCP Winsock for ActiveX | Custom Development | Reply | PowerTCP Winsock for ActiveX Topics | Forums |
| Author | Forum: PowerTCP Winsock for ActiveX Topic: RAS Connect / Disconnect from different Apps |
| SolR From: Rome, NY USA Posts: 4 Member Since: 08/07/03 |
posted August 7, 2003 1:08 AM We have purchased the Winsock tool to use the RAS functionality in our applications. We have two components in our app that need to make and close RAS connections - A windows (C# WinForms) GUI, and a standard NT service. The question is how can we ensure we do not collide with each other. Example: 1) NT Service connects, and starts doing something (large download) 2) User GUI tries to make connection while still connected from #1 -will this fail? Will the control be smart enough to know it is connected already? 3) GUI now tries to disconnect since it is done with its task - But NT Service is still working on download, and needs the RAS connection still. Does the connection get dropped - or does it know another control is using it still? There are several other scenarios where things like this could happen, and we need a way to ensure the connection is always handled right, not closed by the wrong app, etc... Any suggestions? We have started looking at developing another NT service to make all the connections with, but the service is not able to respond back to the calling app with a state or event. Any thoughts appreciated. -Ed |
| SolR From: Rome, NY USA Posts: 4 Member Since: 08/07/03 |
posted August 7, 2003 1:09 AM PS- These two app are completely seperate processes, and cannot communicate with eachother directy. |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted August 7, 2003 8:44 AM Once the connection process begins, attempts to use the same RAS device will elicit an error. You'd have to put code in to keep trying until the error stops occuring. |
| SolR From: Rome, NY USA Posts: 4 Member Since: 08/07/03 |
posted August 7, 2003 10:41 AM Tony - Thanks for the quick response. If I understnd you correctly, the following should work: 1) App A (Windows Svc) connects and starts download 2) App B (GUI) attempts to connect 3) App B gets error code, and know app A must already be connected. (We'll validated with Ping etc..) 4) App B does something, and shuts down, not trying to disconnect, since it was not the one making the connection 5)App A finishes and closes connection Is the above correct (at a high level)? If so, what errors should we be looking for in step 3 above? Thanks again, -Ed |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted August 7, 2003 10:46 AM This is not something I can answer without writing the app and trying it myself, which unfortunately I can't do. I suggest you run a few tests and see what happens. Also, the possible error codes are listed in the online help so you may want to look there for more info. |
| Reply | PowerTCP Winsock for ActiveX Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|