Why does COM require output pointers to be initialized even on failure?
One of the rules of COM is that if a parameter is marked as an output pointer, then you have to initialize the thing it points to, even if your function failed and you have nothing to return. For example, we saw the problems that can occur if you forget to set the output pointer to NULL in the IUnknown::QueryInterface method
Read more from the original source:
Why does COM require output pointers to be initialized even on failure?


