title: Why is HRESULT 0 for success?
body: <p>I just ran into something very awkward while working with HRESULT return values, it seems that success is 0 and failure is 1. What is the logic behind this?</p>
  
  <p>I actually tried <code>if(!hr)</code> and failed miserably, wasting an hour of my life until I figured out the actual success retval is 0. I would like to call the person who thought of this an idiot, but I'll try to cool down - hoping someone will shed some light on this convention.</p>