Re: MFC and COM with WMI

Tech-Archive recommends: Fix windows errors by optimizing your registry




Thanks gentlemen. Half the battle is over. My application is single
threaded. As I expected, COM is initialized only once.

To tackle the other half, why is it not functioning properly when
calling a Private Member function/method? That is, if I do not call
CoInitilize inside the private member function definition, it fails
upon executing CoCreateInstance. In other words, same application is
initializing COM more than once which contradicts the correct approach
of having to initialize COM library only once in the same single-
threaded application. Again as I mentioned before, my PUBLIC MEMBER
function of the class work fine with having COM library being
initialized just once.

Keep the good tips comin' !

Thanks



.