Primary Interop Assemblies

There is a major complication associated with generating an Interop assembly for a COM component. The problem occurs when you attempt to import a type library that references other type libraries. A type library (type library A) references another type library (type library B) when the COM component associated with type library A uses types from type library B in its interface. For instance, I may want to define an upgraded version of my financial COM component that can also issue stock quotes. To provide this functionality, I could implement the IStockMonitor interface that I defined in the Stock Server earlier in this chapter. The GetPrice method in this interface will allow me to return stock quotes, and I could ...

Get .NET and COM Interoperability Handbook, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.