I have been unable to generate the Primary Interop Assembly for a COM object.
The COM object has been developed with Visual Basic 6 by our company that
encapsulates common business functionality. One method returns an ADO
connection (msado25.tlb). At this time, it is not an option to re-write the
object with a .NET language, rather we want to use an interop assembly.
Using the Type Library Importer (Tlbimp.EXE) there is the following error
message: “TlbImp error: System.ApplicationException – Reference type library
‘ADODB’ does not have a primary interop assembly registered.”
I attempted to generate the primary interop assembly again with the
/reference:"C:\Program Files\Microsoft.NET\Primary Interop
Assemblies\adodb.dll" option with the same result.
I am able to create an interop assembly with the Tlbimp.Exe successfully
when the PIA is not generated (not using the /primary option). An assembly
also created in the same directory named ADODB.DLL.
The question is then, how does one generate a Primary Interop Assembly when
the source COM object uses ADO?
Thanks
Hi
I think you may try to build a ADODB.DLL PIA for .net 1.1 framework
yourself. You may try to use the similar with below.
tlbimp msado15.dll /out:Interop.ADODB.dll /keyFile:MSMQ.snk
And then use the generated PIA with your vb6 component.
You may have a try and let me know the result.
Best regards,
Perter Huang
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
Scott - 09 Dec 2004 19:29 GMT
Peter,
I followed your suggestion by creating a PIA for the ADO (msado25.tlb).
With that PIA I was able to successful create a PIA for the COM object which
returned an ADO connection.
Thanks,
Scott
"Peter Huang" [MSFT] - 10 Dec 2004 02:52 GMT
Hi
I am glad that that works for you!
Cheers!
Best regards,
Perter Huang
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
Brian R. - 20 Dec 2004 18:47 GMT
There is a PIA for MS ADO in the 1.1 framework for the 2.5 version of ADO.
It sounds like your suggestion is that the client sign their own version and
make their own PIA.
Is this MS's position that if a PIA is not provided by MS, customers should
create their own?
> Hi
>
[quoted text clipped - 13 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "AS IS" with no warranties, and confers no rights.