D
Doug Haber
Hi All,
I know this probably sounds pretty obvious, but lets say I have a function
like:
HRESULT getDevice(IWMDMDevice3* pIDevice)
If it returns E_FAIL, then the pointer may be in an invalid state (but
non-NULL). Is it common practice for the function to clean up the pointer
or is it the responsibility of the caller (since the result failed)? Also,
what does clean up mean (since it's a COM object) Call Release()? Set it to
NULL? Both?
Thanks!
-D
I know this probably sounds pretty obvious, but lets say I have a function
like:
HRESULT getDevice(IWMDMDevice3* pIDevice)
If it returns E_FAIL, then the pointer may be in an invalid state (but
non-NULL). Is it common practice for the function to clean up the pointer
or is it the responsibility of the caller (since the result failed)? Also,
what does clean up mean (since it's a COM object) Call Release()? Set it to
NULL? Both?
Thanks!
-D