0
Reply

Interop assemblies generated by VS.NET???

pelledoca

pelledoca

Sep 6 2004 7:55 AM
1.7k
Hello, I need to use an OCX component in a managed project and doing the first few tests I've come up with a few things I'd like to understand better. Adding the OCX as a reference in my C# project using VS.NET I see that a new namespace (interop.libraryname) and assembly (interop.libraryname.dll) is created for me. Adding the OCX component to my VS.NET toolbar creates yet another namespace (axinterop.libraryname) and assembly (axinterop.libraryname.dll) for me. I've looked at both using both the VS.NET object browser and ILDASM and it seems that the first interop assembly is a crude wrapper over the OCX component while the second seems yet another wrapper that exposes mainly a set of classes named xxxx_OnYyyyEvent and a corresponding set of delegates named xxxx_OnYyyyEventHandler. Is the second a so called PIA (primary interop assembly)??? Also, it seems that the second assembly (the axinterop.libraryname) exposes a subset of the delegates already exposed by the first assembly. I've tried understanding why only a subset of the delegates are exposed in the second assembly but I can find no clear reason. Can anyone explain how the second assembly differs from the first one??? Bob Rock