COM COM classes implemented in C ++ cannot have a constructor that takes an argument. The CoCreateObject () function, the primary way to instantiate a coclass, has no way to pass arguments. Same thing with IClassFactory :: CreateInstance (), the main method.
So yes, this is not possible, you will need the Initialize () method. And the code to verify that it was called, E_UNEXPECTED with a decent message IErrorInfo is a template.
source share