Didn't get to spend a lot of time reading it - although I know I read it when published - but this is not what hresult is like.
 
It's basically used like:
 
 
    stlsoft::ref_ptr<IDispatch>  disp;
    comstl::hresult hr = comstl::co_create_instance("Pantheios.COM.LoggerManager", disp);
 
If hr is initialised with a failure code - FAILED(hr) - it throws an exception.
 
"Adi Shavit" <adish@gentech.co.il> wrote in message news:eru0pn$1ept$1@digitalmars.com...
The article I was referring to is "Automate Error Checking with Debugging Macros" By Larry Leonard.
It can be found here: <http://tinyurl.com/yvwy7w>
Adi

Adi Shavit wrote:
Hi,

Some more questions about COMSTL:
  1. When and where should/would one use any and all of the COMSTL exceptions?
  2. Have you considered having exception throwing versions of COMSTL creation (or other) functions?
  3. Related to (2), has anyone got an alternative to using if(FAILED(...))? I remember an old column in WDJ that had a MACRO based framework for checking return values, but I was wondering if anyone has any other approaches.
Thanks,
Adi