static void Main(string[] args) { // Create the ATL coclass. TheBrokenObjectClass b = new TheBrokenObjectClass(); // Trigger the errors. try { b.ReturnFailedHRESULT(); } catch (COMException comEx) { ReportCOMError(comEx); } try { b.ReturnComErrorObject(); } catch (COMException comEx) { ReportCOMError(comEx); } }
static void Main(string[] args) { // Create the ATL coclass. TheBrokenObjectClass b = new TheBrokenObjectClass(); // Trigger the errors. try { b.ReturnFailedHRESULT(); } catch(COMException comEx) { ReportCOMError(comEx); } try { b.ReturnComErrorObject(); } catch(COMException comEx) { ReportCOMError(comEx); } }