Re: Exception from Managed Component being swallowed in Interop
From: Christian Fröschlin (froeschlin_at_mvtec.com)
Date: 10/06/04
- Next message: Luis Abreu: "Re: Implementing COM interfaces in MC++"
- Previous message: GT: ""regasm xxx.dll" vs "regasm xxx.dll /regfile""
- In reply to: Ian Tompsett: "Exception from Managed Component being swallowed in Interop"
- Next in thread: Ian Tompsett: "Re: Exception from Managed Component being swallowed in Interop"
- Reply: Ian Tompsett: "Re: Exception from Managed Component being swallowed in Interop"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 06 Oct 2004 10:25:06 +0200
Ian Tompsett wrote:
> That is, my C# is calling VB6 code, which is raising an event caught by C#
> code, which then throws an exception (meant to be caught by the original C#
> code).
AFAIK, errors raised in event handlers for COM
objects are silently ignored by .NET. Note that
it is often not a good idea to raise an error
in an event handler, because it may break the
object which raised the event.
You could mimick the behavior of the original
control by raising an *event* yourself, or you
could set an error flag and throw the exception
later from the method originally called by
the C# application.
- Next message: Luis Abreu: "Re: Implementing COM interfaces in MC++"
- Previous message: GT: ""regasm xxx.dll" vs "regasm xxx.dll /regfile""
- In reply to: Ian Tompsett: "Exception from Managed Component being swallowed in Interop"
- Next in thread: Ian Tompsett: "Re: Exception from Managed Component being swallowed in Interop"
- Reply: Ian Tompsett: "Re: Exception from Managed Component being swallowed in Interop"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|