Search code examples
visual-studio-2008comtypelib

A registered tlb file on Windows 7 (64bit) isn't usable


I have a (VS 2008) C# project that needs to use a 3rd-party COM object. For that, I'm told, I need to register the COM objects's tlb file. So I do

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\regtlibv12.exe blahblah.tlb

which gives me

Registration of FREngine.tlb successful.

But then I can't add a reference to it in the C# project, because it the type lib isn't available on the "Add Reference" dialog's COM tab. Sure enough, a registry search for blahblah comes up empty.

Anyone out there any idea what should I be poking at next?


Solution

  • Issue solved.

    Despite the success message by regtlibv12.exe, it seemed to have failed due to missing administrator rights. When I run the same command line from a console started as administrator, it worked. (Interestingly, when it worked it did reported success with a message box, which didn't show up when it didn't work, but falsely reported success at the command line.)