1
votes

I have .net console application and com object I want to instantiate via:

var t = Type.GetTypeFromProgID("myProgID");
var o = Activator.CreateInstance(t);

everything works fine when client platform is .net framework 3.5, but crashes when I upgrade version number to 4.0 with

Retrieving the COM class factory for component with CLSID {xxx-xxx} failed due to the following error: 80004005 (E_FAIL)?

COM object is built with .Net Framework 3.5

What shall I do to make my Com object usable?

Thank you in advance!

3
Are you on a 64-bit version of Windows? And it works again when you switch back to .NET 3.5?Dirk Vollmar
No. It's Windows XP on 32-bit platformAndrew Florko

3 Answers

1
votes

The error message is hopeless, you'll need to debug the COM server to see what is going wrong. If you don't have the source code for it then you may get something out of the trace you get from SysInternals' ProcMon. Realistically, you need help from the component vendor or author.

1
votes

The answer was - Avira Antivirus !

Another problem with Antivirus is described here: (SEH)Exception initializing Nlog

I deinstalled that and found out that everything became ok !

0
votes

Seems like the GUID changed. Are you sure that it's looking for the correct GUID, and that the COM object is registered with that GUID?