locked
Interop problem in Windows 7 between C# and a C++ COM DLL RRS feed

  • Question

  • I've just upgraded to Windows 7 and have successfully rebuilt my C#/C++ solution with VS2005.  However when I run it, the C# can't create an instance of any COM objects from the C++ DLL, even though RegSvr32 says it's successfully registered the DLL.  The C# throws a System.Runtime.InteropServices.COMException with error 0x80040154, i.e. "Class not registered".  RegEdit shows that the registry entries are present, although some are now under Wow6432Node\CLSID rather than CLSID.  All updates for VS2005 are installed.  Everything works fine on my XP laptop.

    Can anyone help?  Thx vm, Paul

    Saturday, December 5, 2009 5:24 PM

Answers

All replies

  • Solved already!  I hadn't targetted x86 from the C# exes and dlls. 
    Saturday, December 5, 2009 6:33 PM
  • Hi! I'm having a similar problem, but I'm not sure I understand how you solved it. How do you "target x86"? I've developed my solution in VB, VS2008, but the problem is more or less identical. Sorry to bring up an old thread :)
    Thursday, January 7, 2010 1:30 PM