views:

181

answers:

1

After upgrading a VB 6 based application exposing a COM interface, COM Clients (in .NET) built against the previous version receive E_NOINTERFACE errors.

The error message (translated) Cannot convert COM-object of type AProduct.AClass to interface of type AProduct._AClass ...

What went wrong here?

What is the cause of the E_NOINTERFACE error?

I thought that once an interface was published to COM it cannot be changed; a new interface (with unique UUID) should be published which can inherit the old one, thus i reasoned that the interface might have been updated (extended) incorrectly.

+1  A: 

What is the Version Compatibility setting in your VB 6.0 project? (See the Component tab of your project properties)

If it's not Binary Compatibility then the GUIDs for the interfaces and events exposed by your component may have been changed when you compiled the DLL.

Check out these resources for more information

How To Use Project and Binary Compatibility

Setting up a COM component project in Visual Basic 6.0

Rob Windsor
Thanks for Pointing these out, it seems that this has actually happened (the VB6 App is from an external vendor).Is there any possibility of patching a Runtime Callable Wrapper in order to work around changed GUIDs?