COMException error messages (part 2)
This is a follow up to an earlier post about COMException error messages. https://blogs.msdn.com/jaredpar/archive/2005/03/25/402386.aspx
In my previous post we examined the process by which an HRESULT is converted to a COMException by the CLR. Several people have asked me about the reverse, how do error messages make their way from the CLR to COM? They propagate in much the same fasion. When an exception crosses a managed to native barrier, the CLR will return a failing HRESULT to the COM object that made the call. The CLR will also support ISupportErrorInfo on the RCW so the original calling COM object can store the error information appropriately.
Comments
- Anonymous
May 10, 2005
RePost in : http://www.yeyan.cn/Programming/COMExceptionerrormessages.aspx - Anonymous
May 11, 2005
Yes this is a very interesting subject.
I wrote an article on extracting the actual .NET exception when an exception is raised to a COM client.
http://msdn.microsoft.com/msdnmag/issues/05/01/ExceptionLogging/default.aspx - Anonymous
January 21, 2009
The comment has been removed