.NET Framework Bookmark and Share   
 index > Common Language Runtime > Problem with adding a reference to a COM library on x64 bit system
 

Problem with adding a reference to a COM library on x64 bit system

I hope this si the right forum.

I am running x64 bit Vista system. I have installed the Remote Server Administration Tools for Vista so that I can get access to the CertAdm.dll that holds the ICertView2 interface to the Microsoft Certificate Server.

That process worked and I can view my remote certificate server. However, I cannot add a the CertAdm.dll/tlb to a project reference. The best that I can determine is this is because I installed (as I had to) the x64 bit administration tools and they did not register the COM interfaces in the WOW 64 registery location for use by 32-bit processes (Visual Studio in this case). Also, if Ibrowse c:\windows\system32 from the add reference dialog in Visual Stdio, it actually displays c:\windows\SysWOW64 instead. (Not a real big surprise.)

The question becomes how can I do development against x64 bit COM objects since I can see no way to add them to a project reference.

To to double check, I repeated this process on a 32 bit machine and the CertAmd 1.0 Type Library appears in the COM tab of the Add Refence dialog as expected.

Thanks Roy
Roy in Acworth
You'll have to wait for the 64-bit version of Visual Studio. Use the 64-bit version of Tlbimp.exe in the mean time.

Hans Passant.
nobugz
You need to change your .NET application to compile as a 64bit application if you want to use the 64bit COM reference. You cannot reference a 64bit COM component from a 32bit application, even if it's running under WOW64 on a 64bit OS.

Just build your application targetting x64 instead of x86, and it should work fine.

Reed Copsey, Jr. - http://reedcopsey.com
Reed Copsey, Jr.
Yes, I understand that a 32 bit application cannot use a 64 bit COM and visa versa. That is not my issue. My issue is that I cannot add the COM reference to the projectviathe Add Reference dialog.(And just to be sure, I did change my appication from Any CPU to 64 bit and that did not help.)
Thanks Roy
Roy in Acworth
You'll have to wait for the 64-bit version of Visual Studio. Use the 64-bit version of Tlbimp.exe in the mean time.

Hans Passant.
nobugz

The information on the existance of a 64 bit version of Tlbimp appears to be just what I needed. Thanks.


Thanks Roy
Roy in Acworth

You can use google to search for other answers

Custom Search

More Threads

• Garbage collection of Bitmaps Displayed in the PictureBox.
• .NET StackTrace class and a symbol server
• get runtime variable from abstract class
• Integrating managed and unmanaged code via dll's
• Service Shutdown Level
• Instantiating Remote Object as a new Process
• assembly binding, understanding fusion log
• [Interop] dotNet object seen as COM from native code : how to catch a dotNet exception from native code?
• User vs. Admin - application hangs
• SOLVED: Embedded manifest causes client side soap extension not to run