Get your COM Interop hat on becasue this is one screwed up problem.
I have a legacy C++/VB6 app (oh the shame) that is still in production (did I mention the shame?). Anyway its built on a bunch of different COM components and different COM interfaces.
Now as time has gone by I've implmented a few .NET components to implement new functionality that are built with the legacy COM interfaces and the .NET objects are COM exposed classes. To make matters worse we've built a a few newish .NET apps that use the older COM components and interfaces.
Now for the first time I have to take one of the newish .Net applications and have it use the .net components that iomplement older legacy COM interface defined by the legacy product.
So in C++ I've got a COM interface IDatacard. It is defined in a type libarary for the legacy product.
In .NET I have a component exposed to COM called A3200Datacard. It implements the IDatacard interface. The instance of the component I create is created by the old legacy code "configuration manager" via COM's CreateObject.
Here is where it get wierd:
If I run the legacy app and have it create the A3200Datacard object via the configuration manager, the legacy application works sucessfully make calls into the A3200Datacard .Net objec that implment the legacy IDatacard interface.
If I run the legacy app and have the configuration manager create a legacy object that implments IDatacard, that works too.
If I run the .NET application and have it call the configuration manager create a legacy object that implments IDatacard, that works too.
If I run the .NET application and have it call the configuration manager to create the .NET object A3200Datacard that implments the COM IDatacard interface, the application issues a Missing Method exception when calling an index property.
I'm at a complete loss how the A3200Component can implement the COM interface sucessfully to run without issue from the older VB6 legacy app, but yet running in the .NET environment it blows up throwing the missing method exception.
How can this be? How can .NET work with a legacy COM object without issue and yet the .NET object which works properly from the legacy app doesn't work from a .NET application even thoght he object implements the same interface AND the object is created in the same bit of legacy code in the configuration manager.
Has anyone seen anything similair previously?
Thanks for any help you can give, Iat a standstill in my project until I suss this bugger out. Its so confusing I don't even know how to search for it, what code is relevent.
Any ideas are welcome becasue I'm stumped.
Thanks in advance.