Use Cogetclassobject Instead Of Cocreateinstance While Creating COM Components
In most cases, you can use CoCreateInstance and forget about CoGetClassObject.Function CoGetClassObject returns the pointer to the desired component’s classfactory and not the component itself. The desired component is created