I am trying to create my first XPCOM component, and I'm having problems with regxpcom. I have run out of ideas - can someone help?
I am trying to get the simple example from http://www.iosart.com/firefox/xpcom/ running. It compiles and links fine. When I try to register it, regxpcom produces no messages of any sort, and my compreg.dat file is not changed. The interface file IMyComponent.xpt is added to the xpti.dat file. (There are about 30 pages of comments attached to this example, almost all about the same problem. People using Linux seem to be able to solve the problem, but most people using Windows do not, from what I have read.)
Is there any way to get error messages from regxpcom? Some kind of indication of what the problem is?
I am using Visual Studio 2005, running under XP, gecko-sdk-win32-msvc-1.8.0.4.zip, Firefox 2.0.0.6.
Thanks for any suggestions you can provide.
regxpcom problem
-
- Posts: 32
- Joined: December 17th, 2005, 11:58 am
I have now reverted to Visual Studio 6, which was what the sample code was originally developed for. Still the same result - regxpcom does not register the DLL, but does not give any error message or any other hint as to what the problem may be. Can anyone suggest anything that would solve this, or help me figure it out? Thanks.
-
- Posts: 32
- Joined: December 17th, 2005, 11:58 am
Some progress - I realized that I had never tried using absolute path name of every file involved. When I did that, the dll was successfully registered. I it listed in the compreg.dat file with an absolute path name, which I suspect is not good, but it should work, and the Component Viewer recognizes that it exists.
However, the interface is not. I get error:
Registration failed: <80040154> C:\Program Files\Mozilla Firefox\components\IMyComponent.xpt
From searching, I think this means that regxpcom cannot find the libraries that the component needs. However, I cannot find any information about how to tell it where they are. I found instructions for Linux, but not for Windows. Can anyone help with this? Thanks again.
However, the interface is not. I get error:
Registration failed: <80040154> C:\Program Files\Mozilla Firefox\components\IMyComponent.xpt
From searching, I think this means that regxpcom cannot find the libraries that the component needs. However, I cannot find any information about how to tell it where they are. I found instructions for Linux, but not for Windows. Can anyone help with this? Thanks again.
-
- Posts: 1752
- Joined: November 7th, 2002, 9:35 pm
Umm, so regxpcom is totally deprecated and it would be really good to just replace it with a stub binary that just says it's evil.
The best way to get things registered is to either package it in an extension, or dump it into the "components" directory of your app. If you do the second one, you have to also delete compreg.dat (for components) and xpti.dat (for interfaces) in your profile. (They get re-generated on startup)
Oh, and VC2005 is painful since you have to use the static CRT (-MT instead of -MD when compiling).
The best way to get things registered is to either package it in an extension, or dump it into the "components" directory of your app. If you do the second one, you have to also delete compreg.dat (for components) and xpti.dat (for interfaces) in your profile. (They get re-generated on startup)
Oh, and VC2005 is painful since you have to use the static CRT (-MT instead of -MD when compiling).
poot.
-
- Posts: 32
- Joined: December 17th, 2005, 11:58 am