| Dart Home | PowerTCP Winsock for ActiveX | Custom Development | Reply | PowerTCP Winsock for ActiveX Topics | Forums |
| Author | Forum: PowerTCP Winsock for ActiveX Topic: How to get last error from Ping, using C++ |
| thodgson From: Doylestown, PA USA Posts: 19 Member Since: 09/08/04 |
posted September 8, 2004 1:50 PM I am using Visual C++ and would like to know how to get the last error when doing a Ping. Do I have to handle an event? If so, how? If not, how can I just get the last error? |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted September 8, 2004 1:52 PM First, have you looked at the sample app? That should show you how. If you are still having trouble, please let me know. |
| thodgson From: Doylestown, PA USA Posts: 19 Member Since: 09/08/04 |
posted September 8, 2004 1:57 PM The sample app PingClient does not handle events. |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted September 8, 2004 2:38 PM That's true, since it is blocking. But errors still are caught. If you do it non-blocking, then you would need to add an Error event and a Response event. Unfortunately I don't have a non-blocking VC sample to give you, but you should be able to figure out what events you need to create by looking at the IPing files in the sample. |
| thodgson From: Doylestown, PA USA Posts: 19 Member Since: 09/08/04 |
posted September 8, 2004 2:44 PM Using the PingClient example (as an example), what type of exception is the component throwing? How would one get a relevant error message from the exception? |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted September 8, 2004 2:49 PM Here's how I do it: catch(_com_error e) { AfxMessageBox(e.Description()); } |
| thodgson From: Doylestown, PA USA Posts: 19 Member Since: 09/08/04 |
posted September 8, 2004 3:15 PM That works for me Tony. Thanks for your help. |
| Reply | PowerTCP Winsock for ActiveX Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|