Not all objects expose an Automation interface. This error has the following cause and solution:
You can't write code to control an object's behavior unless it has been exposed for Automation. Check the documentation of the application that created the object for limitations on the use of Automation with this class of object.
This is caused by the combination of project compatibility and changing a project from an .exe to a .dll. In project compatibility, the CLSID is preserved, but not the IID. Since the CLSID is preserved, the class ends up being registered with two servers—one an in-process server, the other a local server. When an instance is created, the in-process one is chosen. When the querying of the interface occurs, the .dll does not support the IID because it's new.
For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).