XPCOM DLL fails to load

73 views
Skip to first unread message

jona...@yoomba.com

unread,
Aug 31, 2008, 6:25:15 AM8/31/08
to
Hi.

I have a problem with an XPCOM DLL not loading. I've been through
Troubleshooting XPCOM component registration (http://
developer.mozilla.org/En/
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:

...
LoadLibraryW("C:\Program Files\Yoomba\fir...@yoomba.com\components
\YoombaForFirefox.dll") called from "NSPR4.DLL" at address 0x600B9093.
Loaded "YOOMBAFORFIREFOX.DLL" at address 0x10000000. Successfully
hooked module.
Unloaded "YOOMBAFORFIREFOX.DLL" at address 0x10000000.
LoadLibraryW("C:\Program Files\Yoomba\fir...@yoomba.com\components
\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!
Very odd.
Obviously, I checked that my DLL exists there, and it does.

Here are more lines from the Dependancy Walker log that are
interesting:

...
LoadLibraryW("C:\Program Files\Yoomba\fir...@yoomba.com\components
\msvcp71.dll") called from "NSPR4.DLL" at address 0x600B9093.
Loaded "MSVCP71.DLL" at address 0x7C3A0000. Successfully hooked
module.
Unloaded "MSVCP71.DLL" at address 0x7C3A0000.
LoadLibraryW("C:\Program Files\Yoomba\fir...@yoomba.com\components
\msvcp71.dll") returned NULL. Error: The specified module could not be
found (126).
...

I also read Using Dependant Libraries in Extension Components (http://
developer.mozilla.org/en/
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)...

Thanks

Mark Finkle

unread,
Aug 31, 2008, 10:45:05 AM8/31/08
to
On Aug 31, 6:25 am, jonath...@yoomba.com wrote:
> I have a problem with an XPCOM DLL not loading. I've been through
> Troubleshooting XPCOM component registration (http://
> developer.mozilla.org/En/
> 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:
>
> ...
> LoadLibraryW("C:\Program Files\Yoomba\fire...@yoomba.com\components

> \msvcp71.dll") called from "NSPR4.DLL" at address 0x600B9093.
> Loaded "MSVCP71.DLL" at address 0x7C3A0000.  Successfully hooked
> module.
> Unloaded "MSVCP71.DLL" at address 0x7C3A0000.
> LoadLibraryW("C:\Program Files\Yoomba\fire...@yoomba.com\components

> \msvcp71.dll") returned NULL. Error: The specified module could not be
> found (126).

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

jona...@yoomba.com

unread,
Aug 31, 2008, 12:15:17 PM8/31/08
to

Hey,

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!

jona...@yoomba.com

unread,
Sep 1, 2008, 5:32:16 AM9/1/08
to

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.

PM

unread,
Sep 2, 2008, 2:10:22 AM9/2/08
to
Better soluton is to link staticaly againt libcmt.lib LIBCPMT.LIB. Then
you don't have to copy MS dll's.

PM

Reply all
Reply to author
Forward
0 new messages