tags:

views:

35

answers:

1

My application is written in C++ and uses the Qt framework. I use the QAxWidget class to access an active x component. Now I need some kind of mechanism that notifies my application each time the active x component

  1. has crashed or
  2. does not respond any more (due to dead lock or infinite loop).

(1) can easily been done by watching the external process of the active x component. But maybe there is a more elegant approach?

But how can (2) be implemented?

A: 

One simple solution would be to have the ActiveX widget listen to a UDP port and basically implement some kind of ping mechanism. Then you ping the port and if you get nothing back you can assume there is trouble.

Or you could use QLocalServer.

Mark Beckwith