I.e. I want the process to crash in a way that will have the actual crash
be in the dump being sent to Microsoft.
We've implemented __try/__except handlers on a medium to large
scale project and it's fairly manageable. It takes discipline of course,
to have all interface methods do nothing but call a helper within
the __try/__except block. The latter is obviously done using
a macro. You can write a code generator to automate this task
if you want, though we haven't gone that far.
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@mvps.org
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
"Pieter" <alias@noemail.noemail> wrote in message
news:eyjRO9g1GHA.480@TK2MSFTNGP06.phx.gbl...
Eugene
Eugene wrote: "Wrap all remoted methods in __try/__except..."
That is not really feasible due to the size of the projects, and unlike
a single per process unhandled exception filter, every developer must
modify every method on every object.
More importantly, any crashes that are outside of a COM object method
call, e.g. access violation while RPC touches a corrupt COM object
pointer, will still be handled by COM and propagated to the client
instead of crashing the server process.
I was considering using vectored exception handling (VEH) but I don't
know to determine if the VEH is being called before the COM SEH or
before some other intentional __try/__except block.
Any other ideas?
Pieter
"Eugene Gershnik" <gershnik@hotmail.com> wrote in message
news:ev8lGug1GHA.4228@TK2MSFTNGP06.phx.gbl...
Pieter wrote:
When an out-of-process client makes a RPC or COM call into a RPC or
COM server process,
and the call results in an exception generated due to buggy code,
the RPC/COM marshaling code handles the exception,
and returns a generic RPC_E_SERVERFAULT error to the client,
resulting in programming bugs going unnoticed.
I want the server process to to trigger the process unhandled
exception filter, dump, and crash.
How can I control the RPC/COM server behavior to not catch
exceptions, or to notify me on exceptions?
Wrap all remoted methods in __try/__except and crash the server using
FatalExit (typing from memory) or some such.
Doing anything else at this point (like trying to send exception to the
client) is dangerous and usually useless.
--
Eugene
http://www.gershnik.com