Is it bad idea to have static CComPtr member variables in an application. Since we cannt control destruction of static variable and it can happen after CoUninitialze .
Provided you take the appropriate precautions, then using a CComPtr
as a static member is not inherently evil.
By "appropriate precautions", I mean you should consider:
CComPtr::Release
is called in your class' own FinalRelease
method when the instance count reaches zero.