I am having to use some old legacy code which throws HRESULTS. How do I catch these exceptions? What is the catch parameter for it?
I am having to use some old legacy code which throws HRESULTS. How do I catch these exceptions? What is the catch parameter for it?
Are you sure that they are throwing a HRESULT and not an exception like wrapper like _com_error or CAtlException?
If it's using something like this:then it is the kind of thing I use every day at work.Code:HRESULT hr = E_FAIL; _com_issue_error(hr)
You should catch it like this:Code:catch(const _com_error &e)
My homepage
Advice: Take only as directed - If symptoms persist, please see your debugger
Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"
You may be having an issue related to threading or a non-local stack.
Where is the exception being thrown from? Where are you trying to catch it?
Soma