I am integrating a third party C-based SDK into my .NET application. The application will run as a Windows service on a server, so it should not interact with the user in any way.
Unfortunately, in certain error conditions it insists on calling MessageBoxA, presumably to report that something bad has happened. When this happens, the service stops responding. I am guessing that it is waiting for someone to press Ok?
It is not possible to have the vendor change their code for me.
Is there a way I can make this call into a no-op so my code can deal with the situation automatically?
EDIT: It may be important to mention that in my particular case the service would automatically restart if it crashed. A graceful (as possible) and sudden exit is probably the best resolution for a situation where a MessageBox is displayed in my case.