Code |
Odd COM Concept - successful failures?
Posted by Jason on Wednesday December 15, 2004 04:30 PM
|
Permalink
Every once in a while, usualy after getting luled into a false sense of understanding and confidence, Microsoft's functions and COM interfaces smack me on the back side of the head as if to say
"hey idiot - you forgot to read the fine print on this interface and mysticly infer that while the function, whose sole purpose is to get a valid interface pointer, did not fail simply because it returned a NULL interface pointer"
Excuse me, but Huh?
It would be as if you had a
HRESULT IColorWheel::GetPanatoneObject(IPanatone** ppPanatoneResult);
That returned
S_OK but
ppPanatoneResult was invalid (
null).
All I can conclude is that it's a successful failure?
::sigh::
Update: I'm a dumbass - I was forgetting about S_FALSE (0x00000001), and it was the cause of my successfull failure.