In addition to @Matthew Wetmore's correct answer, the usual thing that happens, is that it registers all COM components in that dll.
Specifically it creates two keys (+subkeys) in the Windows registry.
E.g. consider a dll: dao360.dll
, which has multiple COM objects inside it. For each the first key is something like:
HKLM\SOFTWARE\Classes\DAO.TableDef.36
for the DAO Table Defintion object, the name of the Key is the ProgID of the COM object that programmers would refer to in their code.
Under the key is usually a single key with a default value:
HKLM\SOFTWARE\Classes\DAO.TableDef.36\CLSID
in this case:
{00000103-0000-0010-8000-00AA006D2EA4}
this is the Class ID or CLSID for the COM object, it tells us where the second key is located:
HKLM\SOFTWARE\Classes\CLSID{00000103-0000-0010-8000-00AA006D2EA4}
This key with its subkeys and values has additional information about the COM object.
One value to notice is the default value under:
HKLM\SOFTWARE\Classes\Wow6432Node\CLSID{00000103-0000-0010-8000-00AA006D2EA4}\InprocServer32
it has the file path of the exe/dll that hosts the COM object, in our example:
%CommonProgramFiles%\Microsoft Shared\DAO\dao360.dll
This is the correct file path when regsvr32.exe was used to register this COM object. If you move the file manually, the COM object will no longer work because this registry value now references a missing file.
So before using regsvr32.exe on a DLL, move it to its final location and don't move the DLL after registering it.