Could there be a compatibility problem between DLLs compiled for windows XP
and windows 2000, or is this more likely a registration problem?
About registration, the fact is that my component is in the app/components
folder, comprising a comp.dll and comp.xpt file.
In order to register the component, I just increased the build number.
Also, the goal is to make a standalone application, so I am thinking to
package xulrunner inside the application, so at the moment XULrunner is in
the xulrunner subfolder of the application.
So basically the folder structure looks like:
app/
|- chrome/
| |- contents/
| |- skin/
| |- locale/
|- components/
| |- comp.xpt
| |- comp.dll
|- xulrunner/
|- defaults/
|- updates/
|- extensions/
|- application.ini
|- xulrunner-stub.exe
I previously followed a tutorial saying that upgrading the application build
ID in application.ini would cause the components to be registered properly,
and that worked under windows XP.
When testing on another computer, I just zipped the above files, and
unzipped the file on another computer.
So on another computer running windows XP, the component was registered
properly when executing the application, and I could load and call its
methods without problem.
But under windows 2000, I get the error mentionned previously... and I don't
know what went wrong?
I tried also to put regxpcom.exe from the sdk in the xulrunner folder, and
call it to force register the components.
I also tried by registering xulrunner with xulrunner --register-global.
Knowing that I didn't need those steps on another windows XP computer I am
very troubled here. Is the problem coming from the DLL itself???
PS: Firefox is working properly in the windows 2000 environment.
Thank you in advance for any answer that may help,
Kind Regards.
I actually had the finger on it: the dll was the problem.
If other people have this kind of problem here is what worked for me:
Just set the Visual Studio project to statically link runtime libraries (/MT
option): under C/C++ project settings, by default "Multithreaded library
(/MD)" is selected. Set it to Mutithreaded (/MT) only. This statically links
the libraries (though the option label/options are not really clear).
PS: In order to find the problem, I used "Dependency Walker", which is a
really handful application, thanks to Steve P. Miller!
Glad to understand a little bit more of XPCOM now.
Cheers, and Happy new Year all!