views:

31

answers:

1

I have a .NET 2.0 project that needs to use a COM component (specifically Redemption). In Visual Studio 2010 I add a reference to the COM dll as I would in all prior VS versions (right click project->Add Reference->COM tab->select product->Ok). When I build and try and run the app I keep getting the following error:

Creating an instance of the COM component with CLSID {29AB7A12-B531-450E-8F7A-EA94C2F3C05F} from the IClassFactory failed due to the following error: 80004005.

I haven't had much luck figuring out what is up with this error.

I have already verified that the machine the app is running on does have the COM dll registered via regsvr32.exe.

The only thing I could think of is that this has something to do with Visual Studio 2010 importing COM components differently (maybe?) than previous versions? Any direction on this would be extremely helpful.

Thanks in advance.

EDIT: Code used to instantiate the COM class.

RDOSession session = new RDOSessionClass();

+1  A: 

That's E_FAIL, "Unspecified error". It's an utterly useless error code but not uncommon for COM servers. The programmer took a shortcut, couldn't find a better error code and didn't want to create his own. It is very doubtful that it has anything to do with the interop library, you never got to the point of actually using it.

Maybe some kind of config that the COM server needs, maybe an installation problem. But these are just wild guesses. Ultimately you probably need help from the component vendor or author to get past this hump.

Hans Passant
@Hans Passant: Ah, gotta love that. This has helped more than you might think. Running the app on a different machine is working so it looks like it is definitely machine/configuration related.
Adam