jonbhanson
15th December 2009 18:15 UTC
DLL won't register.
In my install script, I have the following line that registers a custom DLL:
!insertmacro InstallLib REGDLL NOTSHARED NOREBOOT_PROTECTED "TVRes2.dll" "TVRes2.dll" "$SYSDIR"
The DLL lands in the correct spot, but it doesn't seem to be registered. If I try to run my app, I get an error. If I register the DLL manually
regsvr32 TVRes2.dll
The application works correctly. Can anyone give me some insight of what I might be overlooking? I also tried using REGDLLTLB, but no luck. Thanks.
- Jon
kichik
15th December 2009 18:18 UTC
Maybe you extract some of its dependencies only after trying to register it. Try putting a message box after that line and use Dependency Walker to find missing dependencies for your DLL.
jonbhanson
15th December 2009 18:45 UTC
kichik -
Thanks for the fast response! That was a good call, but unfortunately it wasn't the source of the problem. As you suggested, I put a message box after the line. It didn't look like there were any missing dependencies (First time using Dependency Walker). I tried registering the DLL manually while the message box was up, and after I hit ok and the install finished, the app worked fine.
Just to be save, I moved that line to the end of the script and tried it again... still no luck. Any other suggestions?
Jon
Originally posted by kichik
Maybe you extract some of its dependencies only after trying to register it. Try putting a message box after that line and use Dependency Walker to find missing dependencies for your DLL.
jonbhanson
15th December 2009 19:01 UTC
Found it. I needed to reference the output location explicitly, even though I had SetOutPath above.
insertmacro InstallLib REGDLL NOTSHARED NOREBOOT_PROTECTED "TVRes2.dll" "$INSTDIR\TVRes2.dll" "$SYSDIR"
Again, thanks for the help. Dependency Walker is killer. How'd I get along without that before?
- Jon