On 26 ÑÎ×, 22:00, "dh" <d...@yahoo.comwrote:
AppA is a console application (in C#), which uses DLLs in a unmanaged code
(C++, no source available for them).
AppB is a service (in C#), which starts AppA when needed.
When an exception of Win32 (e.g. Integer Division by Zero) thrown by those
DLLs, it will pop up an errorbox waiting for responses.
Just wondering if it's possible for either AppA itself or AppB to catch such
exceptions immediately when it occurs.
In case of integer division by zero the exception should be converted
to the native .NET System.DivideByZeroException.
In general case if the exception will be converted to
System.Runtime.InteropServices.SEHException (you can look into MSDN to
see how exceptions are converted).
So I think you can catch them in AppA and probably it would be better
to check input so divide by zero exception doesn't occur.