none
COM Library registration RRS feed

  • Question

  • Hi there,

    What is the difference between regasm.exe, Regsvr32.exe and RegTlibV12.exe? Why do they exist at all framework directories? Is it the same thing if I use the regasm.exe from v2.0.50727 or from v4.0.30319 or should I register it twice? Why RegTlibV12.exe is not always there? At a 64bit machine should I register a 32bit dll from both Framework\v2.0.50727 and Framework64\v2.0.50727?

    I am using regasm.exe to register my COM library using the following command:

    regasm.exe mylib.dll /tlb:mylib.tlb  /codebase

    is this enough?

    Recently I have register the library to a 64bit machine with windows 7 and although the library seems to be registered and a demo vb6 project that uses it worked, I was unable to see the keys at the registry. Is this possible?

    Wednesday, April 9, 2014 1:35 PM

Answers

  • Hello,

    The Regasm.exe is used to read the metadata within an assembly and adds the necessary entries to the registry, which allows COM clients to create .NET Framework classes transparently.

    Regsvr32 is a command-line utility to register and unregister OLE controls, such as DLLs and ActiveX controls in the Windows Registry. Regsvr32.exe is installed in the %systemroot%\System32 folder in Windows XP and later versions of Windows.

    Regtlibv12.exe is the tool which is used to register the type library which is installed with Visual Studio 2005.

    >>Is it the same thing if I use the regasm.exe from v2.0.50727 or from v4.0.30319 or should I register it twice?

    The regasm.exes from v2.0.50727 and v4.0.30319 are different since .Net Framework 4, it uses a new regasm.exe. For details, you can check this link:

    http://www.jagjot.com/2014/01/register-c-vb-net-dll-regasm-gacutil/

    >> At a 64bit machine should I register a 32bit dll from both Framework\v2.0.50727 and Framework64\v2.0.50727?

    It just needs us to register the dll from both Framework\v2.0.50727 since it is a 32 bit dll.

    >> I am using regasm.exe to register my COM library using the following command:

    regasm.exe mylib.dll /tlb:mylib.tlb  /codebase

    is this enough?

    Yes, it is ok.

    Since you register the dll to tlb, it should be found at:

    HKEY_CLASSES_ROOT\TypeLib\... in the regedit:

    http://msdn.microsoft.com/en-US/us-us/library/h627s4zy.aspx

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Mike_Sfd Thursday, April 10, 2014 5:28 AM
    Thursday, April 10, 2014 3:46 AM
    Moderator

All replies

  • Hello,

    The Regasm.exe is used to read the metadata within an assembly and adds the necessary entries to the registry, which allows COM clients to create .NET Framework classes transparently.

    Regsvr32 is a command-line utility to register and unregister OLE controls, such as DLLs and ActiveX controls in the Windows Registry. Regsvr32.exe is installed in the %systemroot%\System32 folder in Windows XP and later versions of Windows.

    Regtlibv12.exe is the tool which is used to register the type library which is installed with Visual Studio 2005.

    >>Is it the same thing if I use the regasm.exe from v2.0.50727 or from v4.0.30319 or should I register it twice?

    The regasm.exes from v2.0.50727 and v4.0.30319 are different since .Net Framework 4, it uses a new regasm.exe. For details, you can check this link:

    http://www.jagjot.com/2014/01/register-c-vb-net-dll-regasm-gacutil/

    >> At a 64bit machine should I register a 32bit dll from both Framework\v2.0.50727 and Framework64\v2.0.50727?

    It just needs us to register the dll from both Framework\v2.0.50727 since it is a 32 bit dll.

    >> I am using regasm.exe to register my COM library using the following command:

    regasm.exe mylib.dll /tlb:mylib.tlb  /codebase

    is this enough?

    Yes, it is ok.

    Since you register the dll to tlb, it should be found at:

    HKEY_CLASSES_ROOT\TypeLib\... in the regedit:

    http://msdn.microsoft.com/en-US/us-us/library/h627s4zy.aspx

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Mike_Sfd Thursday, April 10, 2014 5:28 AM
    Thursday, April 10, 2014 3:46 AM
    Moderator
  • Thanks for the explanations Fred...Have a nice day...
    Thursday, April 10, 2014 5:28 AM