clsidfromprogid

CLSIDFromProgID is successful but CreateInstace fails! Why?

帅比萌擦擦* 提交于 2019-12-24 10:56:36
问题 I am trying to create an instance of a COM object. I have the class name that implements the interface and I get a CLSID by using CLSIDFromProgID(). So since I am getting a CLSID I thought everything should be fine from now on. However when I do a call to CreateInstance and pass in the CLSID, I get an error saying "Class not registered". Also I get this error only in some computers. It runs error free on several computers. I don't understand where the problem could be. Is my registry dirty?