I don't understand the last sentence of that paragraph. I'm trying to do this:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm l/cpconproducingprimaryinteropassemblies.asp -----Original Message----- From: Discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Vince P Sent: Sunday, December 18, 2005 8:51 PM To: [email protected] Subject: Re: [ADVANCED-DOTNET] trying to generate a cdo primary interop assembly (pia) You're incorrect, Read the last sentence of the 2nd paragraph. (Vs2005 Docs: .Net Development | Articles and Overviews | .Net General | Primary Interop Assemblies General Questions about PIAs What is a PIA? Like any other managed assembly, an interop assembly is a collection of types that are deployed, versioned, and configured as a single unit. However, unlike other managed assemblies, an interop assembly contains type definitions (not implementation) of types that have already been defined in COM. These type definitions allow managed applications to bind to the COM types at compile time and provide information to the common language runtime about how the types should be marshaled at run time. While any number of interop assemblies may exist that describe a given COM type, only one interop assembly is labeled the PIA. The PIA contains the official description of the types as defined by the publisher of those types. The PIA may contain certain customizations that make the types easier to use from managed code. The PIA is always signed by the publisher of the original COM type. Any interop assembly that is not provided by the publisher of the COM types is considered unofficial and should be avoided. Because the types defined in such an assembly are not to be signed by the publisher of the PIA, they are incompatible with the definitions provided in the PIA. -----Original Message----- From: Discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Alex Smotritsky Sent: Sunday, December 18, 2005 7:04 PM To: [email protected] Subject: Re: [ADVANCED-DOTNET] trying to generate a cdo primary interop assembly (pia) That's incorrect. A PIA is a strongly named interop assembly that you can generate using Tlbimp as long as the file you are generating it from either is a type library or has a type library in it as is the case with CDO. It can also be done manually but I'm not messing with that. My problem is that when I try to generate a PIA off CDO it looks for ADODB which is a dependency and it can't find it. The documentation for generating PIAs with Tlbimp covers referencing dependencies but I still haven't been able to solve this problem so far. I'm gonna try generating my own adodb pia again, explicitly give it the ADODB namespace and then see if I can generate the CDO one which wants ADODB (referencing the adodb pia I made). -----Original Message----- From: Discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Vince P Sent: Sunday, December 18, 2005 6:48 PM To: [email protected] Subject: Re: [ADVANCED-DOTNET] trying to generate a cdo primary interop assembly (pia) You can not generate a PIA of a COM library that isn't yours. Only the publisher of the original COM object can generate a PIA. You can of course generate a wrapper for a COM library by merely referencing a COM object on the COM tab. Which is the same method you would use to reference a COM library for you which you installed a PIA. So to make a long story short, just reference the COM library on the COM tab and if you have the PIA installed properly, it will be used as the wrapper. If there is no PIA, the Visual Studio will make a wrapper assembly for you. In your project's references if you view the properties of the COM references , there should be a property that tells you if the wrapper is a PIA -----Original Message----- From: Discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Alex Smotritsky Sent: Sunday, December 18, 2005 5:21 PM To: [email protected] Subject: [ADVANCED-DOTNET] trying to generate a cdo primary interop assembly (pia) I'm trying to generate a cdo pia using Tlbimp and keep getting the error: Referenced type library 'ADODB' does not have a primary interop assembly registered. There is an ADODB assembly in my gac. I've also tried referenceing C:\Program Files\Microsoft.NET\Primary Interop Assemblies\adodb.dll and have successfully created my own adodb pia from the Microsoft adodb com object but have not been able to generate a cdo pia because I always get that error. =================================== This list is hosted by DevelopMentor. http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentor. http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentor. http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentor. http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
