Skip to main content

Posts

Showing posts from June, 2010

Interop Assemblies

What the hell are these Interop Assemblies, Primary Interop Assemblies (PIAs)? You'll see these assemblies from time to time pulled in as references in you projects, but I never really cared why they were called Interop and what it meant, I'll explain. Interop is short for interoperability meaning how to get .NET to talk to COM. Primary Interop Assembly (PIA): A PIA is an interop assembly that is signed by the originator to mark it as the one and only assembly to use to get the Type information. It's used to avoid conflicting Types. The assembly is signed in a particular way using the tlbimp.exe and then used by the client to resolve Types. http://msdn.microsoft.com/en-us/library/aa302338.aspx What have they got to do with COM? So implementations and Types available through COM is not accessible itself through .NET itself in the usual manner i.e. you cannot new up objects etc because you do not know the Type names. To get over this the COM Types are wrapped into an Interop ...