I've got a COM object (for Goldmine) that I need to add to my project. I ran regsvr32 on the objects DLL and put it's other DLL in my system folder. Then I added this code to my project:
// Import the type library
#import "k:\gmobject\gmobject.dll" no_namespace
// Create a smart pointer to the ISQL interface
// Create an instance of the object
At this point it compiles and I can see all the members through VC's IntelliSense. When the application is executed however I get an error returned from CreateInstance:
hr = 80040154h (REGDB_E_CLASSNOTREG: Class not registered)
Goldmine of course has no information on how to use their object so if anyone has had more experience with usiong the #import directive in VC6 to load objects I'd love to hear some suggestions. I've only used it to with ADO at this point and that works.