[Mono-bugs] [Bug 496138] [PATCH] Mono not converting native COM exceptions (HResults) to C# Exceptions correctly.
    bugzilla_noreply at novell.com 
    bugzilla_noreply at novell.com
       
    Thu Jun  4 17:54:39 EDT 2009
    
    
  
http://bugzilla.novell.com/show_bug.cgi?id=496138
User tom_hindle at sil.org added comment
http://bugzilla.novell.com/show_bug.cgi?id=496138#c4
--- Comment #4 from tom hindle <tom_hindle at sil.org>  2009-06-04 15:54:39 MDT ---
The final thing to do in the GetExceptionForHr method is to use the optional
COM object IErrorInfo, to provide better Error information to the ComException.
something like:
string desc = String.Empty;
if (errorInfo != IntPtr.Zero)
{
    object o = Marshal.GetObjectForIUnknown(errorInfo);
    IErrorInfo i = mErrorInfo as IErrorInfo;
    if (i != null)
        i.GetDescription();
}
if (errorCode < 0)
    return new COMException (desc, errorCode);
return null;
However we don't have a IErrorInfo interop defined in mono,
msdn suggests its in namespace Microsoft.VisualStudio.Shell.Interop in dll:
Microsoft.VisualStudio.Shell.Interop.8.0.dll
-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
    
    
More information about the mono-bugs
mailing list