When we compile an application and put its dependent complied dlls in the same folder of the exe file, the application should run without any problem. But why do we still need to register those dependent dlls using regsvr32 command? I am getting lost here.
Asked
Active
Viewed 2,555 times
0
-
2This might be what you're looking for: http://stackoverflow.com/questions/620858/what-does-registering-a-dll-do – dotNET Apr 08 '16 at 06:14
-
Actually this one answers your questions precisely: http://stackoverflow.com/questions/394388/in-net-is-there-a-need-to-register-the-dll – dotNET Apr 08 '16 at 06:15
-
@dotNET - I picked the first one as that is more related to the COM aspect. – H H Apr 08 '16 at 06:22
1 Answers
4
Short answer is that you don't need to register DLLs in order to use them. The only exception to this is COM and ActiveX DLLs which need to add certain keys to the registry. For a normal DLL (including .NET class libraries), all you need to know is the path to the DLL.
dotNET
- 33,414
- 24
- 162
- 251
-
-
@MKYung: COM dlls contain an implementation of `DllRegisterServer` that performs component registration (basically it adds component GUIDs to HKEY_CLASSES_ROOT registry key) to allow `CoCreateInstance` to find correct server component. You can find more details in the first link I have posted in the OP. – dotNET Oct 03 '19 at 06:17