Archive: trouble registering dll


trouble registering dll
hi all.

i'm having trouble registering my BHO DLL.

i can manually register it using "regasm /codebase file.dll" and all the appropriate registry entries are created.

however, after searching through the forums for quite some time and trying all the offered solutions for registering a DLL with nsis, i'm still stuck.

i tried the following:

SetOutPath $INSTDIR
...
File "file.dll"
RegDLL "$INSTDIR\file.dll"
but i get an error when i check with IfErrors.

i also tried using the InstallLib macro as follows:
!define LIBRARY_COM 
!insertmacro InstallLib REGDLL NOTSHARED NOREBOOT_NOTPROTECTED "path_to_local\file.dll" "$INSTDIR\file.dll" "$SYSDIR"
but this also raised the error flag. i checked the registry manually and the DLL is never being registered properly.

i don't know if it has to do with it being a COM object. i've tried installing the dependency into the same directory before registering but still no luck. it's strange, though, because regasm registers the DLL fine when the dependency is not there.

thanks for any help...

i have further compiled my dll using a strong name and it still doesn't work for either case...shrug.


RegDLL isn't the same as regasm.exe. The latter registers a .NET assembly. The first merely calls DllRegisterServer from the DLL. You'll have to manually call regasm.


that's strange because there were at least a couple of other threads in which users were asking how to circumvent having to use regasm.exe to register their .NET dlls. they were repeatedly told to use RegDLL/UnRegDLL or the InstallLib/UninstallLib macros.


does anyone know if the UpgradeDLL registers .NET assemblies?


UpgradeDLL uses RegDLL, so it doesn't.