<p>I have a <strong>DLL</strong> with some <strong>COM objects</strong>. Sometimes, this objects <strong>crashes</strong> and register an error event in the Windows Event Log with lots of hexadecimal informations. I have no clue why this crashes happens. </p>

<p>So, How can I trace those COM objects exceptions?</p>

[{'answer_id': 10969, 'author': 'Jay Mooney', 'author_id': 733, 'author_profile': 'https://Stackoverflow.com/users/733', 'pm_score': 3, 'selected': True, 'text': "<p>The first step is to lookup the Fail code's hex value (E.G. E_FAIL 0x80004005).  I've had really good luck with posting that value in Google to get a sense of what the error code means.  </p>\n\n<p>Then, I just use trial and error to try to isolate the location in code that's failing, and the root cause of the failure.  </p>\n"}, {'answer_id': 11019, 'author': 'Matt Dillard', 'author_id': 863, 'author_profile': 'https://Stackoverflow.com/users/863', 'pm_score': 1, 'selected': False, 'text': '<p>If you just want a really quick way to find out what the error code means, you could use the "Error Lookup" tool packaged with Visual Studio (details <a href="http://msdn.microsoft.com/en-us/library/akay62ya(VS.80).aspx" rel="nofollow noreferrer">here</a>).  Enter the hex value, and it will give you the string describing that error code.</p>\n\n<p>Of course, once you know that, you\'ve still got to figure out why it\'s happening.</p>\n'}, {'answer_id': 13280, 'author': 'Nick', 'author_id': 1490, 'author_profile': 'https://Stackoverflow.com/users/1490', 'pm_score': 1, 'selected': False, 'text': '<p>A good way to look up error (hresult) codes is HResult Plus or welt.exe (Windows Error Lookup Tool).</p>\n\n<p>I use logging internally in the COM-classes to see what is going on.  Also, once the COM-class is loaded by the executable, you can attach the VS debugger to it and debug the COM code with breakpoints, watches, and all that fun stuff.</p>\n'}, {'answer_id': 13315, 'author': 'Brad Wilson', 'author_id': 1554, 'author_profile': 'https://Stackoverflow.com/users/1554', 'pm_score': 1, 'selected': False, 'text': "<p>COM objects don't throw exceptions. They return HRESULTs, most of which indicate a failure. So if you're looking for the equivalent of an exception stack trace, you're out of luck. You're going to have to walk through the code by hand and figure out what's going on.</p>\n"}]
['https://Stackoverflow.com/questions/10935', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1100/']