none
What type of DLL's are to be registered with the regsvr32 RRS feed

  • Question

  • I am not sure what type of dlls are supposed to be registered with the registry. why are they supposed to be registered? is it something a language specific ? like c# dlls are supposed to be registered!! something like that!! Please help me. Thanks in advance
    Wednesday, November 25, 2015 7:11 AM

Answers

  • All COM libraries are supposed to be registered with regsvr32.

    You can determine whether it need to run that command by using "dumpbin /exports <DLL filename>" and look for "DllRegisterServer". (dumpbin.exe is a utility located in "VC\bin" folder of your Visual Studio installation)

    C:\Windows\SysWOW64>dumpbin /exports FM20.DLL
    Microsoft (R) COFF/PE Dumper Version 9.00.30729.01
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
    
    Dump of file FM20.DLL
    
    File Type: DLL
    
      Section contains the following exports for fm20.dll
    
        00000000 characteristics
        558A07E5 time date stamp Wed Jun 24 09:29:09 2015
            0.00 version
              29 ordinal base
              78 number of functions
               9 number of names
    
        ordinal hint RVA      name
    
             31    0 00022DD3 DllCanUnloadNow
             32    1 000239CC DllGetClassObject
             33    2 00023977 DllRegisterServer
             34    3 0002391B DllRegisterServerSetup
             35    4 000237E5 DllUnregisterServer
             36    5 00074647 FormsCheckUFIControls
             37    6 00087218 FormsCloseParentUnit
             38    7 0008750E FormsOpenParentUnit
             39    8 000230B5 FormsSetLCID
             29      0006AF69 [NONAME]
             30      0006AFF0 [NONAME]
             50      000B273F [NONAME]
             51      000B26F2 [NONAME]
             52      000B2A58 [NONAME]
            100      000CCBB7 [NONAME]
            101      00023982 [NONAME]
            102      000C3928 [NONAME]
            103      000AD2CC [NONAME]
            104      0007042F [NONAME]
            105      00070268 [NONAME]
            106      0006B151 [NONAME]
    
      Summary
    
            E000 .data
           11000 .reloc
           3E000 .rsrc
           D0000 .text
    
    C:\Windows\SysWOW64>


    Wednesday, November 25, 2015 9:02 AM
    Answerer
  • Hi Shravan,

    The registry is a database which we can store application setting. The reason of using the registry is unified access interface and improve access performance. Every application on windows can use registry. Since .NET applications contain metadata, it doesn't recommended to use registry in .net application. Metadata is also a database which can describes every type and member defined in your code in a language-neutral manner.
    https://msdn.microsoft.com/en-us/library/xcd8txaw%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396

    Best Regards,
    Li Wang


    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.

    Thursday, November 26, 2015 2:14 AM
    Moderator

All replies

  • All COM libraries are supposed to be registered with regsvr32.

    You can determine whether it need to run that command by using "dumpbin /exports <DLL filename>" and look for "DllRegisterServer". (dumpbin.exe is a utility located in "VC\bin" folder of your Visual Studio installation)

    C:\Windows\SysWOW64>dumpbin /exports FM20.DLL
    Microsoft (R) COFF/PE Dumper Version 9.00.30729.01
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
    
    Dump of file FM20.DLL
    
    File Type: DLL
    
      Section contains the following exports for fm20.dll
    
        00000000 characteristics
        558A07E5 time date stamp Wed Jun 24 09:29:09 2015
            0.00 version
              29 ordinal base
              78 number of functions
               9 number of names
    
        ordinal hint RVA      name
    
             31    0 00022DD3 DllCanUnloadNow
             32    1 000239CC DllGetClassObject
             33    2 00023977 DllRegisterServer
             34    3 0002391B DllRegisterServerSetup
             35    4 000237E5 DllUnregisterServer
             36    5 00074647 FormsCheckUFIControls
             37    6 00087218 FormsCloseParentUnit
             38    7 0008750E FormsOpenParentUnit
             39    8 000230B5 FormsSetLCID
             29      0006AF69 [NONAME]
             30      0006AFF0 [NONAME]
             50      000B273F [NONAME]
             51      000B26F2 [NONAME]
             52      000B2A58 [NONAME]
            100      000CCBB7 [NONAME]
            101      00023982 [NONAME]
            102      000C3928 [NONAME]
            103      000AD2CC [NONAME]
            104      0007042F [NONAME]
            105      00070268 [NONAME]
            106      0006B151 [NONAME]
    
      Summary
    
            E000 .data
           11000 .reloc
           3E000 .rsrc
           D0000 .text
    
    C:\Windows\SysWOW64>


    Wednesday, November 25, 2015 9:02 AM
    Answerer
  • Only old-style "COM" libraries need to be registered in such a way. These may also be referred to as OLE controls, OCX control or ActiveX controls (because one name is never enough!).

    You can see if a DLL meets this criteria using the method cheong00 noted above (or, if a 3rd-party library, seeing if it calls it by any of the above names or describes it's installation requirements in the documentation).

    It should be noted that a pure C# DLL assembly does not need to be registered in this way, although you can use C# to create COM libraries if you want for compatibility with other non-.NET applications, but in this case they must be registered with the regasm utility instead.


    • Edited by RJP1973 Wednesday, November 25, 2015 1:43 PM
    Wednesday, November 25, 2015 1:42 PM
  • One clarification - it's not old style COM libraries that needs it, it's COM libraries that not written in JIT-ed assemblies which needs it. "regsvr32" is still the standard way to register a COM component for modern unmanaged (i.e. non-.NET) C++ libraries.
    Wednesday, November 25, 2015 11:39 PM
    Answerer
  • Hi Shravan,

    The registry is a database which we can store application setting. The reason of using the registry is unified access interface and improve access performance. Every application on windows can use registry. Since .NET applications contain metadata, it doesn't recommended to use registry in .net application. Metadata is also a database which can describes every type and member defined in your code in a language-neutral manner.
    https://msdn.microsoft.com/en-us/library/xcd8txaw%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396

    Best Regards,
    Li Wang


    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.

    Thursday, November 26, 2015 2:14 AM
    Moderator