I have a problem with an XPCOM DLL not loading. I've been through
Troubleshooting XPCOM component registration (http://
Troubleshooting_XPCOM_components_registration), particularly "Windows-
specific hints", but I'm still stuck.
The component loads and registers successfully on all computers in my
office, except one. I tried loading firefox using dependancy walker,
as described in the page above. The output is pretty long, but I've
isolated the part that is interesting here:
\YoombaForFirefox.dll") called from "NSPR4.DLL" at address 0x600B9093.
Loaded "YOOMBAFORFIREFOX.DLL" at address 0x10000000. Successfully
Unloaded "YOOMBAFORFIREFOX.DLL" at address 0x10000000.
\YoombaForFirefox.dll") returned NULL. Error: The specified module
could not be found (126).
Dependancy walker hooks my DLL successfully, and then unloads it.
Then, for some reason, that same DLL couldn't be found!
Obviously, I checked that my DLL exists there, and it does.
Here are more lines from the Dependancy Walker log that are
\msvcp71.dll") called from "NSPR4.DLL" at address 0x600B9093.
Loaded "MSVCP71.DLL" at address 0x7C3A0000. Successfully hooked
Unloaded "MSVCP71.DLL" at address 0x7C3A0000.
\msvcp71.dll") returned NULL. Error: The specified module could not be
I also read Using Dependant Libraries in Extension Components (http://
Using_Dependent_Libraries_In_Extension_Components), since I thought it
might have something to do with MSVCP71.DLL.
But it's not as if it's not loading that DLL - Dependancy Walker can't
find my DLL at all! (at least that is what it says)...
Try compiling the DLL using the static C runtime library. Basically,
build your DLL so it does not depend on any MS C/C++ runtime DLLs
I am linking the Firefox extension against custom libraries used in
our entire project. These libraries use MS DLLs.
While I agree a Firefox extension shouldn't use MS DLLs, converting it
all now is not an option - it will take weeks.
Is there a way I can add these DLLs to my extension during setup?
(These DLLs exist anyway in our setup. I tried copying them to my
extension directory but that didn't help.)
Also, the error I described in the first post doesn't seem to relate
to MS DLLs. Dependency Walker said my DLL doesn't exist at all.
What can be the reason for that?
Thanks for the help!
Since I have the option, I manually copied these dependencies
(msvcr71.dll and msvcp71.dll) to Windows\System32, and that solved it.
I updated http://developer.mozilla.org/en/Troubleshooting_XPCOM_components_registration#Windows-specific_hints
accordingly to include these findings.
Thanks for the help.