We have an application that uses several out of process COM objects for various tasks. If the user tells Windows to shut down while our application is running, then it sends all applications (top level windows) a shutdown notification, but the OoP COM objects can shut down before the parent is notified and gets chance to shut down cleanly, causing various errors in different components.
This is made worse as one of the OoP objects was created to host an unstable 3rd party object so it's automatically restarted when it crashes which now fails to restart as Windows is shuttting down.
While we can handle the errors on the parent processes, Is there a way for the ActiveX hosts to tell Windows "I'm not shutting down just yet, but will do in due course", or even better, make Windows not notify them in the first place?
Both the parent processes, the OoP objects and their hosts are in a mixture of C++ and VB6.