Register type library x64 regtlib

2019-06-24 10:33发布

I'm running Windows 7 x64, and need to register a type library file (.tlb). I've done this previously (on a Vista x64 machine) but neglected to take notes as to how I achieved it...

There is no regtlib.exe / regtlibv12.exe on the system. I have copied across the regtlibv12.exe from a Windows XP system, however this will "not run".

I have also attempted to register the TLB via "regsvr32" (tried using both the 32 and 64 bit versions) however always get the "Windows system mismatch" error.

I have been performing these operations using an elevated privilege command prompt.

Can anyone help?

4条回答
Luminary・发光体
2楼-- · 2019-06-24 11:09

Old question, I know, but I thought I'd share what worked for me in case it helps anyone else out.

I needed to register a TLB on Windows Server 2008. I installed the .NET 4.0 framework to get the regtlibv12.exe and that worked. I believe the regtlibv12.exe is also available in the Windows SDK.

查看更多
Juvenile、少年°
3楼-- · 2019-06-24 11:13
We Are One
4楼-- · 2019-06-24 11:27

regtlibv12.exe is not available on Win10 platforms. It has been replaced with TlbExp.exe as found in the corresponding .NET SDK (e.g. "%ProgramFiles(x86)%\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools\x64\TlbExp.exe" "$(TargetDir)$(TargetFileName)" see https://docs.microsoft.com/en-us/dotnet/framework/tools/tlbexp-exe-type-library-exporter).

查看更多
我命由我不由天
5楼-- · 2019-06-24 11:31

Regasm only works for TLB files generated for .NET assemblies. So, you have to use regtlibv12.exe You can find this file in C:\Windows\Microsoft.NET\Framework\v4.0.30319 if you have Visual Studion 2010 installed.

查看更多
登录 后发表回答