Creating a C++ XPCOM component

什么是XPCOM XPCOM解决方案 XPCOM允许开发者把软件项目分解成模块,这就是所谓的组建,在运行时被组装在一起。XPCOM的目标就是使得各个模块可以独立开发。为了组件在程序中的互操作性,XPCOM把组件的实现和接口分离。但是XPCOM也提供一些工具和库用于加载和操作组件和服务,使得开发者能写出支持版本和跨平台的代码,这样组件就可以被替换或升级而不是重建程序。使用XPCOM,开发者开发的组件可以在不同的 阅读详情

Creating a C++ XPCOM component

About

This is a step-by-step tutorial on creating, building and registering an XPCOM component on Linux and MS Windows.

Download

The complete source code for this tutorial can be downloaded from here.

Creating the component

  1. Download the Gecko SDK for your platform.
    1. You can find it at http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7/.
    2. You can choose a different Mozilla release if you like.
    3. Extract the SDK to a local directory.
  2. Create a GUID for your main interface.
    • On Windows you can use the guidgen utility.
    • On Linux you can use the uuidgen utility.
  3. Create the interface definition file - IMyComponent.idl
    1. Use the following template, add methods and attributes to the interface.
    2. Fill in the GUID you have generated.
    	
    #include "nsISupports.idl"
    
    [scriptable, uuid(_YOUR_INTERFACE_GUID_)]
    interface IMyComponent : nsISupports
    {
      long Add(in long a, in long b);
    };
    	
    	
  4. Generate the interface header and typelib files out of the interface definition file.
    • Use the xpidl utility that comes with Gecko SDK.
    • Substitute the "_DIR_" in the following commands with the full path to the xpcom/idl directory found under your Gecko SDK main directory.
    • xpidl -m header -I_DIR_ IMyComponent.idl will create the IMyComponent.h header file.
    • xpidl -m typelib -I_DIR_ IMyComponent.idl will create the IMyComponent.xpt typelib file.
  5. The interface header file IMyComponent.h contains templates for building your component header and implementation files. You can copy and paste the templates to create these files, changing only your component name.
  6. Create your component header file - MyComponent.h.
    1. Start by inserting double inclusion protection code (#ifndef _MY_COMPONENT_H_ ....).
    2. Add #include "IMyComponent.h" to include the interface definition.
    3. Create a GUID for your component.
    4. Add the following lines, which define your component name, contract ID, and GUID:
      
      #define MY_COMPONENT_CONTRACTID "@mydomain.com/XPCOMSample/MyComponent;1"
      #define MY_COMPONENT_CLASSNAME "A Simple XPCOM Sample"
      #define MY_COMPONENT_CID _YOUR_COMPONENT_GUID_ 
      
      
    5. Copy the header template from IMyComponent.h (starting with /* Header file */) into the MyComponent.h file.
    6. Replace all the instances of _MYCLASS_ with the name of your component.
  7. Create your component implementation file - MyComponent.cpp.
    1. Add #include "MyComponent.h" to include your component definitions.
    2. Copy the implementation template from IMyComponent.h (starting with /* Implementation file */) into the MyComponent.cpp file.
    3. Replace all the instances of _MYCLASS_ with the name of your component.
    4. Add method implementation code.
  8. Create your module definitions file - MyComponentModule.cpp.
    1. Add #include "nsIGenericFactory.h" to include Mozilla GenericFactory definitions.
    2. Add #include "MyComponent.h" to include your component definitions.
    3. Add NS_GENERIC_FACTORY_CONSTRUCTOR(MyComponent) to define the constructor for your component.
    4. Add
      
      static nsModuleComponentInfo components[] =
      {
          {
             MY_COMPONENT_CLASSNAME, 
             MY_COMPONENT_CID,
             MY_COMPONENT_CONTRACTID,
             MyComponentConstructor,
          }
      };
      
      
      to define the class name, contract ID and GUID of your component.
    5. Add NS_IMPL_NSGETMODULE("MyComponentsModule", components) to export the above information to Mozilla.
  9. Create the makefiles and/or projects.
    • You can use the templates provided with this sample to create your custom makefile.
    • Alternatively, you can create a Visual C++ project with similar settings (on Windows).
Building the sample

  1. Download the sample code from here.
    • Extract the sample to a local directory.
  2. Edit the makefile.
    1. The makefile is located in the src directory of the sample.
    2. It is named Makefile for Linux, MyComponent.mak for Windows
    3. Edit the makefile, changing the GECKO_SDK_PATH variable to point to your Gecko SDK directory.
    4. Added: When using the included Visual Studio project:
      1. Open the project settings: Project > Settings...
      2. Choose Settings For: All Configurations in the upper left corner.
      3. Open the C/C++ tab and choose Preprocessor in the Category drop-down list.
      4. Make sure that "Additional include directories" points to your Gecko SDK.
      5. Open the Link tab and choose Input in the Category drop-down list.
      6. Make sure that the "Additional library path" points to your Gecko SDK.
  3. Build the sample.
    1. Open a command shell (cmd on Windows; tcsh, bash, xterm etc. on Linux).
    2. Navigate to the sample src directory.
    3. On Linux issue a make command. MyComponent.so file is created.
    4. On Windows issue a nmake /f MyComponent.mak command. Debug\MyComponent.dll is created.
    5. Alternatively, on Windows, issue a nmake /f "MyComponent.mak" CFG="MyComponent - Win32 Release" command for a release build. Release\MyComponent.dll is created.
    6. Added: When using the included Visual Studio project:
      1. Select the wanted configuration (Debug/Release) in Build > Set Active Configuration...
      2. Choose Build > Build MyComponent.dll
  4. Register the new component with Mozilla.
    1. Copy MyComponent.so/MyComponent.dll and IMyComponent.xpt file to the Mozilla components directory.
    2. On Windows this directory is typically located at:
      C:\Program Files\Mozilla Firefox\components.
    3. On Linux this directory is typically located at ~/firefox/components (or ~/mozilla/components).
    4. Run the regxpcom command supplied with the Gecko SDK to register the new component.
    5. You might need to provide an additional parameter:
      regxpcom -x _COMPONENTS_DIR_ where _COMPONENTS_DIR_ is the components directory.
    6. Delete the xpti.dat and compreg.dat files from your Mozilla profile directory.
      These files will be automatically rebuilt by Mozilla the next time it is restarted.
      Added: Alternatively you can "touch" (either create or update) a file called .autoreg in the main Mozilla/Firefox installation directory.
    7. The profile directory is typically located at:
      • ~/.mozilla/firefox/default.??? on Linux.
      • C:\Documents and Settings\USERNAME\Application Data\Mozilla\Firefox\Profiles\default.??? on Windows.
  5. Test the new component.
    1. Restart Mozilla.
    2. Open the MyComponentTest.html file provided with the sample and click the "Go" button.
    3. If everything is OK you should see a dialog saying "3 + 4 = 7".
Links and Resources

Revision History

  • June 3, 2005
  1. Modified the Windows makefile (MyComponent.mak) to work with the latest Gecko SDK. The old version of the sample can be found here.
  2. Added Visual Studio 6 project file to the sample.
  3. Added a tip about using the ".autoreg" file for registering new components.


Get Firefox

Comments

Dave wrote:
Hi there,

That really clears things up a good bit regarding XPCOM components!

Just a small question, Ive sucessfully built and registered the component, but when I try to test it out I get a popup window saying:

Type error: Components.classes[cid] has no properties!

Any ideas?

Thanks
Dave
19-Nov-2004 05:44:06

Kevin McAllister wrote:
The link to part 5 of the IBM dw article is broken, the correct link is: http://www-128.ibm.com/developerworks/webservices/library/co-xpcom5.html
01-Dec-2004 22:26:56

Nat Brown wrote:
great example, great article, and great links. i wish mozilla/mozdev had more simple examples like these. thanks for writing this down alex.
21-Dec-2004 17:37:57

Jesse Watson wrote:
Finally got everything to compile and link up, but when I hit the "Go" button, Firefox crashes. I tried to make it an extension instead, packaging the DLL and xpt file inside the components directory (I imitated ColorZilla), but same result... When I call the Javascript function, FireFox always crashes on this line:
obj = Components.classes[cid].createInstance();

Been at this for almost two weeks now and I'm out of ideas... Any thoughts? Is there a tool out there for debugging XPCOM components?
05-Jan-2005 23:21:40

free_zy wrote:
First a huge and great thank you for the "hello world" because the "official" weblock example is really too complex to make it works.

But i think that with the documentation of weblock and this exemple you can make great things

Ok just here is some details/correction :

- an error makes me lost a lot of time :
contrarly against that it is written down the -x option of regxpcom is not the components directory but xcom library directory (from gecko sdk).
So the command line would be something like regxpcom -x C:\gecko-sdk\bin

- you can use a free extention to visualize the components istalled (an interfaces) on you firefox browser. It is downloadabled by clicking here :
http://www.xulfr.org/outils/extensions/cview-0.6.5.xpi

04-Mar-2005 09:57:19

Anand Balaji wrote:
Thanks for the great demo. I was finally able to do something productive. :)

Could you provide me with any information as to how this component could be packaged and deployed via the Internet?

Thanks in advance.
08-Mar-2005 05:50:22

Roman wrote:
Hello, thanks for great sample! Do you know why 'contet-policy' notification does not work under FireFox?
09-Mar-2005 12:38:27

Stan wrote:
Very clear explanation. However, the sample doesn't build with nmake 1.5 (the free version). :(
17-Mar-2005 03:53:34

J wrote:

Hello,

Great example.

The following worked using Firefox 1.02 on Linux.

unzipped the code
regxpcom -x /usr/lib/mozilla-firefox/components
cd ~/.mozilla/firefox/wtwlh2xt.default
rm xpti.dat compreg.dat

reran mozilla with the webpage, hurrah, 7!

Also xpti.dat and compreg.dat recreated as promised.
03-Apr-2005 05:49:00

G.Naudts wrote:
The makefile MyComponent.mak makes reference to files as: $(GECKO_SDK_PATH)\embedstring\bin that are not present in the gecko sdk distribution you mention in your article???
08-Apr-2005 08:25:41

Stan wrote:
I second the comment of G.Naudts. MyComponent.mak references directories in the gecko stdk that just don't exist in the Gecko 1.7 sdk, e.g. embedstring, xpcom. Is this make file meant for a different version of the sdk?
10-Apr-2005 18:52:15

anonymous wrote:
The make file doesn't compile on my system and didn't even find CL.exe and link.exe files. Though I linked it by specifying the path of these files in the make file, but the link flags are not being located by the nmake utility.
Is there any way to link these files automatically
10-May-2005 02:05:07

anonymous wrote:
Thanks for the nice and short article.

To compile/build, I had to also download buildtools.zip from mozilla.

If I define MOZILLA_STRICT_API as suggested by some tutorial, I get a bunch of errors. So, I turn it of for now.

Any idea?
16-May-2005 06:56:00

ragevietnow wrote:
Thanks for the easy example with code that works! I also got this to run under thunderbird for anyone that is interested. You just have to put the .so and .xpt files in the thunderbird/components directory instead and call the javascript function from an overlay in a xul file. simple if you know how to do overlays!
20-May-2005 20:01:16

Santosh Ahuja wrote:
Nice tutorial. Got me started after a week's pondering over the docs at mozilla. I did get the problem Dave was mentioning about ....

Type error: Components.classes[cid] has no properties!

I checked in the profile directory and found that the compreg.dat and xpti.dat were not being created. Also found that 1 or more instances of firefox were running . Closed all instances and started firefox again and it worked.

hmm other problems.. regxpcom always complained about not finding nspr4.dll. So put \program files\Mozilla Firefox in the path and that worked as well.

I used windowsXP and Gecko SDK version 8 the latest. The make files did'nt work for me. So I created a Vc++ project and added the files to compile the dll.All's well now :)
29-May-2005 08:10:16

Diego wrote:
I've tried to compile the source code, but nmake returns a Fatal Error.
I have Visual Studio 6 installed... i need VC 2003 or other c++ compilers, such CYGWIN?
30-May-2005 05:08:26

Santosh Ahuja wrote:
Drop me an email and I can send you the VC 6.0 .dsw project. If that'll help.
Updated by Alex: I've now updated the tutorial and the sample and included a VC 6.0 project file. Thanks.
03-Jun-2005 04:29:01

Ivo Stoyanoff wrote:
Thanks for the update. I had to tweak the library list for link to complete.
Here is my change (in project - settings - link)
... nspr4_s.lib plds4_s.lib plc4_s.lib xpcom.lib xpcomglue.lib
I had some problems with registration - I don't see MyComponent.xpt but IMyComponent.xpt.
I had to add firefox dir to my path for nspr4.dll to be found.
Not sure if that's the correct one - after tweaking/renaming my Firefox started crashing.
I deleted dll/xpt, rerun regxpcom, deleted profile dat files, touched autoreg - no help.
Still crashing...
I am using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
and gecko sdk 1.7
Is this some version problem? How to "unregister"?
03-Jun-2005 13:16:22

Alex wrote:
I've updated the tutorial and the sample. The sample now works with the latest Gecko SDK and contains a Visual Studio 6.0 project.
03-Jun-2005 04:17:19

Corina wrote:
Hi,
I followed the example on Windows, the component was registered, but in run-time I get this error that I cannot figure it out.

(NS_ERROR_XPC_CI_RETURNED_FAILURE) [nsIJSCID.CreateInstance]

Any ideas? Thanks.

15-Jun-2005 07:39:36

Corina wrote:
Hi,
I followed the example on Windows, the component was registered, but in run-time I get this error that I cannot figure it out.

(NS_ERROR_XPC_CI_RETURNED_FAILURE) [nsIJSCID.CreateInstance]

Any ideas? Thanks.

15-Jun-2005 07:39:56

pierro81 wrote:
hello,

here pierro (escuse my english i'm french), i want to know how and can you make xpcom component without mozilla, and so develop with only the gecko sdk?

thanks.

22-Jun-2005 04:52:58

Nick wrote:
Joe, I ran into your problem and resolved it by adding xpcom.lib to the list of libraries in Visual Studio. Hope this helps some one
26-Sep-2005 11:03:01

stl wrote:
I've been trying to make your example work for PRFloat64 (double) numbers instead of integers... by changing the last arg type in the Add function... but doesn't work.

Am I missing something???
03-Oct-2005 17:00:52

sky_water wrote:
hi,guys
i compiled and installed but it don't work

Type error: Components.classes[cid] has no properties!

i tried on redhat9.0 with mozilla1.2.1 and redhat 7.3 with mozilla1.3
the same error!
any idea?
thanks!
15-Jul-2005 22:23:59

Tobias Wehrum wrote:
Hi,

I have the same problem as Jesse Watson and Corina. If anyone has an idea what could be the reason, please email me or post it here. Thanks...
28-Jul-2005 12:14:44

Joe wrote:
I tried your example on Windows XP but could not compile properly.

Could you pls advise? Thanks.

Linking...
Creating library .\Release/MyComponent.lib and object .\Release/MyComponent.exp
xpcomglue_s.lib(nsGenericFactory.obj) : error LNK2019: unresolved external symbol __imp__PR_AtomicIncrement referenced in function "public: virtual unsigned long __stdcall nsGenericFactory::AddRef(void)" (?AddRef@nsGenericFactory@@UAGKXZ)
xpcomglue_s.lib(nsGenericFactory.obj) : error LNK2019: unresolved external symbol __imp__PR_AtomicDecrement referenced in function "public: virtual unsigned long __stdcall nsGenericFactory::Release(void)" (?Release@nsGenericFactory@@UAGKXZ)
xpcomglue_s.lib(nsComponentManagerUtils.obj) : error LNK2019: unresolved external symbol _NS_GetComponentManager referenced in function "public: virtual unsigned int __thiscall nsCreateInstanceByCID::operator()(struct nsID const &,void * *)const " (??RnsCreateInstanceByCID@@UBEIABUnsID@@PAPAX@Z)
xpcomglue_s.lib(nsComponentManagerUtils.obj) : error LNK2019: unresolved external symbol _NS_GetServiceManager referenced in function "public: virtual unsigned int __thiscall nsGetServiceByCID::operator()(struct nsID const &,void * *)const " (??RnsGetServiceByCID@@UBEIABUnsID@@PAPAX@Z)
xpcomglue_s.lib(nsMemory.obj) : error LNK2019: unresolved external symbol _NS_RegisterXPCOMExitRoutine referenced in function "class nsIMemory * __cdecl SetupGlobalMemory(void)" (?SetupGlobalMemory@@YAPAVnsIMemory@@XZ)
xpcomglue_s.lib(nsMemory.obj) : error LNK2019: unresolved external symbol _NS_GetMemoryManager referenced in function "class nsIMemory * __cdecl SetupGlobalMemory(void)" (?SetupGlobalMemory@@YAPAVnsIMemory@@XZ)
.\Release/MyComponent.dll : fatal error LNK1120: 6 unresolved externals

04-Sep-2005 04:27:17

Aditya wrote:
really helpful document !!
gr8 job alex.
thanks to kyr0 too.
21-Sep-2005 04:59:38

kyr0 wrote:
If you want to make it runnable in firefox you only have to remove the ~/.mozilla/firefox/components/comreg.dat (Firefox will reconfigure it) and then copy the .so and .xpt to $FIREFOX_PATH/components. Then start the .html with firefox and it will run!

Attention:
I used gecko-sdk from mozilla 1.8 beta1!
There is NO need to register the components with trhe gecko-sdk tool.

Attention2:
copy the gecko-sdk INTO the /src directory of this sample code!
Then run(from src-dir):
gecko-sdk/bin/xpidl -m header IMyComponent.idl

and

gecko-sdk/bin/xpidl -m typelib IMyComponent.idl

this will work!

Attention3:
if the gecko-sdk binarys fails on not founded librarys:

install:
mozilla-dev librarys (under suse linux i.e. mozilla-dev)

Attention4:
Failure: "(NS_ERROR_XPC_CI_RETURNED_FAILURE) [nsIJSCID.CreateInstance]"
you need to copy the generated .xpt file in the firefox-components directory!

Attention5:
Components.classes[cid] has no properties!
The same: you need to copy the generated .xpt file in the firefox-components directory! AND: look for syntax errors in your idl!! the function name MUST be lowercase. (In CPP the function name must be UPPERCASE) -

Attention6:
I will write a better documentation of this all soon on kyr0.org
14-Sep-2005 05:16:28

Christian Wartena wrote:
I tried to compile the example with gcc (from cygwin) under WindowsXP. There was an undefined reference to
NS_NewGenericModule2. Does anyone have an idea what library could provide this function?

/cygdrive/c/DOCUME~1/wartena/LOCALS~1/Temp/ccy5Bdsa.o:MyComponentModule.cpp:(.text+0x68): undefined reference to `NS_NewGenericModule2(nsModuleInfo*, nsIModule**)'
collect2: ld returned 1 exit status
13-Oct-2005 08:50:05

benjamin wrote:
when you get the "Components.classes[cid] has no properties!"-error:

make sure that you have the same versions of the xulrunner and the gecko-sdk, it seams that they don't have to be exactly the same.

using
gecko-sdk-i586-pc-msvc-1.8b1.zip and
xulrunner-1.8b5.en-US.win32.zip works

using
gecko-sdk-i586-pc-msvc-1.8b1.zip and
xulrunner-1.9a1.en-US.win32.zip works not.

took me a hard time to figure that out, the error message is indeed not very helpfull ;(

by the way, does anybody know how i install xpi packages with the xulrunner, it would be nice to have the dom-inspector running for debugging purposes.

by the second way: when i start the xulrunner with
xulrunner application.ini -jsconsole the java-script-console pops up, but in there apear only messages from html-like stuff, not the java-script programming errors that i make in the xul-app.
how do i catch errors that look like this:

<button id="b1" label="Java Script error" oncommand="inexistent_func();"/>

when i run xulrunner with the -console command line arg, the console apears but it stays blanc ;(

thanks in regards and i hope that will help somebody.
10-Mar-2007 16:01:10

Jan Wagner wrote:
Otherwise a nice intro, but, how do you get it to compile in VC++.NET on XP SP2!?

What I've done up till now:

1) installed gecko 1.7 final SDK, updated VStudio project filepath settings => complaints

about lidIDL not being present

2) had to get http://downloads.mozdev.org/www/notes/base.zip for the libIDL and xpidl.exe

bits

3) now the linker can't find nspr4.lib, .dll, etc (not part of gecko 1.7!), had to change

the linker params to nspr4_s.lib etc

4) lot's of unresolved symbols, had to add xpcom.lib and xpcomglue_s.lib to the linker

params

5) now building terminates with the linker errors

xpcomglue_s.lib(nsGenericFactory.obj) : error LNK2019: unresolved external symbol

__imp__PR_AtomicIncrement referenced in function "public: virtual unsigned long __stdcall

nsGenericFactory::AddRef(void)" (?AddRef@nsGenericFactory@@UAGKXZ)
xpcomglue_s.lib(nsGenericFactory.obj) : error LNK2019: unresolved external symbol

__imp__PR_AtomicDecrement referenced in function "public: virtual unsigned long __stdcall

nsGenericFactory::Release(void)" (?Release@nsGenericFactory@@UAGKXZ)
.\Debug/MyComponent.dll : fatal error LNK1120: 2 unresolved externals

So what's up with this, now?
(Makes me wonder how it is possible that a release-version SDK is this self inconsistent and

flawed?)

6) downloaded and installed (overwriting parts of gecko 1.7 sdk) the Netscape Portable

Runtime v4.6 final:
ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.6/WINNT5.0_OPT.OBJ/
and renamed all lib*.lib to *.lib, and copied headers to gecko include dir

7) now your XPCOM sample compiles and links fine! The previously generated (xpidl.exe) .xpt

and new .dll placed in firefox\components, plus deleted xpti.dat and compreg.dat.
Sample html file "go" now gives:

(NS_ERROR_XPC_CI_RETURNED_FAILURE) [nsIJSCID.CreateInstance]


Pretty frustrating...

I'd very much appreciate ideas what to do next. Did I maybe go wrong somewhere?



Or, anyone know of some other step-by-step instructions for building a simple xpcom

component, including what all external SDK's and packages you'd have to install on your

system before you can get going?

- Jan
20-Oct-2005 03:37:25

Jan Wagner wrote:
About the above, never mind...

The problem was that offical/final gecko from http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7/ did not contain all required files in ./lib!!! On the other hand the final nightly http://ftp.mozilla.org/pub/mozilla.org/mozilla/nightly/latest-1.7/gecko-sdk-i586-pc-msvc.zip contains all necessary libs, and your xpcom sample now works :-)

It might be worth changing the download link under "1. Download the Gecko SDK for your platform." to point to the correct SDK release?
21-Oct-2005 07:58:24

vishesh wrote:
The make file doesn't compile on my system and didn't even find CL.exe and link.exe files. Is there any way to link these files automatically.
08-Nov-2005 21:50:50

Freddie wrote:
Sadly, I get the same exception MSBox...

// Start
Exception... "Component returned failure code: 0x80570015
(NS_ERROR_XPC_CI_RETURNED_FAILURE) [nsIJSCID.createInstance]" nresult: "0x80570015
// END

I have MSVC c++ 2003 / WinXP SP2.
What goes wrong ??
22-Nov-2005 15:04:43

anonymous wrote:
Is there a problem with new versions of Mozilla ? I use Firefox 1.07 and a developer in newsgroup uses FF 1.06. My System is MSVC++ 2003/WinXP, he uses Linux 9.0/ mingw....

Hm... any ideas ?
23-Nov-2005 03:09:43

Dan wrote:

If you planning on deploying your components as an XPI, make sure you build your component DLL in release mode. If you don't, Firefox will (silently) fail to register your component because of missing dependencies on msvcrtd.dll and msvcp60d.dll. It will, of course, work on your machine since you have Visual Studio installed.

It's probably best just to change the project to link with the Multithreaded DLL version of the C runtime even in Debug mode, rather than Debug Multithreaded DLL.

It would be nice if Firefox alerted the user when it fails to load a component's DLL rather than silently ignore the component!

BTW, debugging with Visual Studio 6.0 works great. Just set the exectuable to firefox, set your breakpoints, hit F5, and it works perfectly.
15-Dec-2005 14:47:09

Sabarinathan wrote:
Hai,

To make my component compatible with Firefox 1.5, i tried to compile it against firefox 1.5 Gecko SDK.

I have created a XPCOM Component against Gecko-SDK which was taken from http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.8b1/gecko-sdk-i686-pc-linux-gnu-1.8b1.tar.gz . I have compiled Successfully .

For Registering the component with Firefox 1.5 , I did the following steps
1. Copied my component .so to firefoxInstallationDirectory/components/
2. Copied my xpt file to firefoxInstallationDirectory/components/
3. Executed touch .autoreg
4.Invoked the firefox

While Invoking firefox i am getting the following error message

./firefox-bin: symbol lookup error: /advent/advent1/srinivasar/firefox/1.5rel/firefox/components/libqecomp_FIREFOX_1.so: undefined symbol: _Z20NS_NewGenericModule2P12nsModuleInfoPP9nsIModule

Please let me know how i can resolve this.


Regards
Sabarinathan.P
02-Jan-2006 00:03:01

anonymous wrote:
I used the same latest gecko (1.8b1) and followed the steps in the description and didn't have any problems running it in Firefox 1.5
04-Jan-2006 11:40:25

noohgnas wrote:
This is great tip to make first xpcom example. =)
05-Jan-2006 05:39:41

omar wrote:
Hi, good tutorial, but i can`t run correctly, the infamous dialog with Components.classes[cid] has no properties showme, may be the people that could run correctly the tutorial, could list the tools that they used ? I try over Firefox 1.5 with Gecko SDK 1.7 running over a Red Hat 9.

Thanks in advance.
12-Jan-2006 14:42:41

anony wrote:
works on ff 1.0.2 gecko 1.7 ....no troubles but the classic error on ff 1.5
23-Jan-2006 07:25:53

anonymous wrote:
Using Mozilla Firefox 1.5 and following the steps it works fine.

Using netscape 7.0 i receive a message box with this error.

// Start
Exception... "Component returned failure code: 0x80570015
(NS_ERROR_XPC_CI_RETURNED_FAILURE) [nsIJSCID.createInstance]" nresult: "0x80570015
// END

Netscape is a gecko based browser so i expected it to work as well. I don't know enough about the differences between netscape and firefox to say why this happens.
23-Jan-2006 10:45:56

anony wrote:
Used Fedora Core,Firefox 1.5---

1. To make it compatible with firefox 1.5, download the latest browser code from mozilla CVS.
http://www.linuxquestions.org/linux/answers/Jeremys_Magazine_Articles/Downloading_Source_Trees_101
(for instructions on using CVS)
2. Build it,latest sdk will appear in /dist/sdk
3. Link against this sdk(edit the Makefile) and follow the instructions in this tutorial
4. All should work now (Didn't work with gecko-sdk 1.8b1 for me)

Good tutorial for first timers.
26-Jan-2006 08:40:25

Marco wrote:
I've got some problems with the regxpcom command. When I try to do it I receive this message: Cannot initialize XPCOM Glue, Can not aquire component registrar, Registration failed: <c1f30001> Firefox\component. What's wrong?!?! please help me
10-Mar-2007 16:00:14

Geraint Edwards wrote:
For Firefox 1.5 there is a VERY EASY way to do the component registration. Just add a components directory to a simple extension, put the dll and xpt files there, close and restart Firefox and it all works (NO MORE STEPS REQUIRED!) :-).

p.s. I couldn't get regxpcom or xpidl to work in Windows XP so use xpidl in linux to generate my header files etc. and was forced to look for an alternative to regxpcom - hence my discovery!
25-Feb-2006 03:51:06

Phan Van Tuan wrote:
I have build your example. But I want to write a client in C++ which use that XPCOM. I have build it with KDevelop but have an error follow when I excute my sample:

error while loading shared libraries: libxpcom.so: cannot open shared object file: No such file or directory

can you help me.
13-Mar-2006 19:21:05

anonymous wrote:
anyone can help me to create a simple app that use XPCOM totally. Especially, how to run this example on Linux
13-Mar-2006 19:24:36

pvtuan wrote:
Anyone can help me to register a new XPCOM Component.

I have use command: regxpcom but appear error:

[asterisk@tuanphan bin]$ regxpcom libxpcom.so
Can not initialize XPCOM Glue
Can not aquire component registrar
Registration failed: (c1f30001) libxpcom.so
[asterisk@tuanphan bin]$ regxpcom .
Can not initialize XPCOM Glue
Can not aquire component registrar
Registration failed: (c1f30001) .

Anyone can help me.

Thanks in advance
pvtuan
15-Mar-2006 03:47:04

alexis sepane wrote:
I tested alex's complete code example.
Fortunately it did compile.

But unfortunately it didn't run.

So I started to figure out WHY NOT. Here we go:

1) I don't know how the registering of the components works in the mozilla suite, but if you are using the firefox branch, you have to decrement the buildID by one day in the compatibility.ini (located in your firefox's user profile directory) BEFORE you start firefox. Only then the compreg.dat file will be rewritten by firefox. Thanks to Nigel McFarlane for this (from hack #82 in O'reilly: Firefox Hacks)!

2) When I finally figured out this point , I could find OTHER XPCOM examples (written in Javascript) being registered in the compreg.dat, but alex's new MyComponent.so/ MyComponent.xpt (I am working on linux) component could NOT be found in compreg.dat.
So there must be something going wrong during registration of alex's example OR c++ components in general (which I don't expect).
So, as some might have guessed: I am getting the error: "Type error: Components.classes[cid] has no properties" (which was discussed several times above, but none of the presented solutions worked (at least for me)).
I tested Firefox 1.0.4 AND 1.5. The same result.

For the other (javascript) examples I have tested (and which have been registered successfully) I though cannot call 'createInstance()'.
Already the call

obj = Components.classes[cid].createInstance()

will leave obj 'undefined' because Components.classes does NOT contain the requested cid (problems with the registration).

Can anyone reproduce the error and/ or give some advice?

Thanx in advance and Successful Coding for you!

alexis
28-Mar-2006 09:56:11

roland wrote:
Has anyone had problems forcing firefox to load the dll? I cannot figure out why some instances of firefox (all v1.5.0.1) work great and others will NOT load the dll (test fails on checking for Components.classes["@mydomain.com/XPCOM..."] which can only mean the dll was never loaded into the firefox process space. I made sure .autoreg is set and that both the dat files are deleted but still no load.
28-Mar-2006 13:00:40

Jay wrote:
I'm having similiar problems trying to load the .so file for Thunderbird 1.5. I'm able to compile this example as well as my own code based on the weblock example. I place my xpt and so file is the components directory (I've tried the main thunderbird components directory as well as my own under extensions). When I start Thunderbird my xpt file gets registered in xpti.dat, but I don't see anything in compreg.dat. Now when I try to use my component I get the "has no properties!" error. I've tried the 1.7 and the 1.8b1 version of the gecko sdk with the same results. Does anyone have any idea where to go from here? Some people have stated that Firefox (or Thunderbird, in my case) fails silently when it can't register a dll/so file. Are there any log files / debug utilities that would should this failure and why it is happening? Thanks for any help!
28-Mar-2006 19:13:26

roland wrote:
For those having the dreaded "cid" problem ... after 3 days of attempting to resolve this I finally found the culprit (although I am not convinced the method doesn't pose risks). The issue is with the dll itself. If firefox decides it can't load the dll, it will NOT load it into compreg.dat (but you should see it in xpti.dat). This was compiled in Windows, so I am not 100% sure what needs to be done for linux distros, however, I changed the run-time library from multithreaded to singlethreaded and everything was fine.

Furthermore, if you wrap this up into an extension, make sure to create an install.js file for that extension and put the dll and xpt into a "Components" directory within the xpi. Firefox will ALWAYS scan the extensions/ext_name/components directories pulling every dll it can. I attached an install template for those of you who care. Hope this helps.

var err = initInstall("_product_name_", "_product_name_", 1.0);
var componentsDir = getFolder("Components");
var chromeDir = getFolder("Chrome");

addFile ("_dll_name_.dll", 1.0,
"_dll_name_.dll", componentsDir, "");

addFile ("_xpt_name_.xpt", "1.0",
"_xpt_name_.xpt", componentsDir, "");

err = addDirectory ("_directory_name_", "1.0",
"", chromeDir, "")

if (err==SUCCESS)
performInstall();
else
{
cancelInstall(err);
alert(err);
}
30-Mar-2006 15:19:29

roland wrote:
I forgot to add that developer.mozilla.org specifies to build as multi-threaded in big bold letters, then proceeds to say "(this needs clarification)". So I am not sure of the ramifications.
30-Mar-2006 15:43:54

EKenDo wrote:
anyone getting the following after doing a "release" build from the javascript:

(NS_ERROR_XPC_CI_RETURNED_FAILURE) [nsIJSCID.CreateInstance]

should see Jan's post about a funky gecko SDK. THANX JAN, saved me crazy time. The example works for me under XP, ff 1.5 using this SDK
http://ftp.mozilla.org/pub/mozilla.org/mozilla/nightly/latest-1.7/gecko-sdk-i586-pc-msvc.zip
04-May-2006 08:16:48

tom wrote:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
This example is just NOT WORKING!!!

As everyone can see: the comments list with unanswered questions is much longer than the instructions of the example.
It seems, that Alex Sirota is too busy with his job as that he could correct the example to a working version.
I guess everybody who IS expecting an example is expecting a WORKING example on a webpage, but this site unfortunately could NOT serve this!

There are several people (including me) who tried to make the example work for several days.

Alex: please remove this example because more people will WASTE TIME with a broken example OR fix it to a working version!
Anything else would be UNFAIR!

I agree with the first comment, that the world needs such a compact tutorial on XPCOM components, but it needs a working one! When it is going to work, it will definately be a greet help for many programmers!

Until then: Everybody is hereby given advice to try the example (to have the chance to learn s.th. or use the chance, that it works on your system, but if you get the error

Type error: Components.classes[cid] has no properties!

do stop working IMMEDIATELY. This example then REALLY DOES NOT WORK on your system (as on many if not all other systems)!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

FYI: I for myself tested on Linux, Firefox versions 1.0.4, 1.5rc1, 1.5 and 1.5.0.1. None worked!

Let the internet be a fair place!
Only then can it stay valuable for each one of us!
03-Apr-2006 17:02:11

tom wrote:
After yet another long coding night I found out, that the sample works with firefox 1.0.2 but not with 1.0.4 and above. So, what is going wrong there? Are there these big changes in firefox?? I can't believe it!
03-Apr-2006 21:21:36

tom wrote:
sorry, sample works with ff1.0.2 and ff1.0.4 but NOT with 1.5+
03-Apr-2006 21:41:42

Boris wrote:
Thanks for the sample, it works great for me with ff 1.5.0.1, WinXP and compiled with Visual C++. Does anyone now how to deploy automatically such a librarie on a client browser when he access a webpage?
04-Apr-2006 13:39:05

alexis sepane wrote:
Hi,

so it seems the example is working for firefox 1.5 on windows but not on linux. Something is going wrong with component registration there?! The new component shows up in my xpti.dat file but not in compreg.dat. I tried nearly any registration method I found on the web. I thought it should be so easy...

Greetings,
alexis
06-Apr-2006 11:56:24

huazilin wrote:
I cann't regxpcom successfully.But it also works for firefox 1.5.0.1 on windows compiled with VC6,I don't why.Does it not necessarily registered.Please give some reply.
06-Apr-2006 17:49:30

anonymous wrote:
09-Apr-2006 03:58:45

Cool_dude wrote:
Cant able to register XPCOM component on linux. The insterfac is visible in xpti.dat but the component is not getting displayed in compreg.dat. The component is not getting loaded when firefox starts up.

Can anyone help me out.

Thanks in advance.
09-Apr-2006 04:07:00

Todd wrote:
On Linux I changed the makefile to link in libxpcom.so and libxpcom_s.a based on the information at; http://developer.mozilla.org/en/docs/XPCOM_Glue#Using_Frozen_linkage_.28dependent_on_xpcom.dll.29

GECKO_LDFLAGS = -L $(GECKO_SDK_PATH)/lib \
-lxpcom \
-lnspr4 \
-lplds4

I also changed the link order, which is apparently VERY important on Linux;

$(FILES) $(GECKO_SDK_PATH)/lib/libxpcomglue_s.a $(GECKO_LDFLAGS)

This will cause NS_NewGenericModule2 to be defined, rather than undefined.

12-Apr-2006 10:34:42

Todd wrote:
Oh yeah, I also removed the -DXPCOM_GLUE and added -DMOZILLA_STRICT_API.
12-Apr-2006 10:37:04

Jibril wrote:
Works for me (at last). Follow the advice given by kyrO.
13-Apr-2006 00:31:02

cool_dude wrote:
After changing the make file also, I am not able to register the component in linux. I tried using both gecko-sdk 1.7 and 1.8. But no luck so far. Is there any version dependency of firefox on gecko-sdk.

Can anyone successful on registring the sample on linux please post their make file?

Thanks in advamnce
17-Apr-2006 00:56:39

anonymous wrote:
DId you change the order of files? I think that one is the most important one:

remove -lxpcomglue from GECKO_LDFLAGS

put $(FILE) and libxpcomglue_s.a in front of GECKO_LDFLAGS
19-Apr-2006 18:07:57

anonymous wrote:
Makefile:

[code]
CXX = c++
CPPFLAGS += -fno-rtti \
-fno-exceptions \
-shared

# Change this to point at your Gecko SDK directory.
GECKO_SDK_PATH = /home/username/gecko-sdk

# GCC only define which allows us to not have to #include mozilla-config
# in every .cpp file. If your not using GCC remove this line and add
# #include "mozilla-config.h" to each of your .cpp files.
GECKO_CONFIG_INCLUDE = -include mozilla-config.h

GECKO_DEFINES = -DXPCOM_GLUE

GECKO_INCLUDES = -I $(GECKO_SDK_PATH)/include

GECKO_LDFLAGS = -L $(GECKO_SDK_PATH)/lib \
-lnspr4 \
-lplds4

FILES = MyComponent.cpp MyComponentModule.cpp

TARGET = MyComponent.so

build:
$(CXX) -Wall -Os -o $(TARGET) $(GECKO_CONFIG_INCLUDE) $(GECKO_DEFINES) $(GECKO_INCLUDES) $(FILES) $(GECKO_SDK_PATH)/lib/libxpcomglue_s.a $(GECKO_LDFLAGS) $(CPPFLAGS) $(CXXFLAGS)
chmod +x $(TARGET)
strip $(TARGET)

clean:
rm $(TARGET)
[/code]
19-Apr-2006 18:51:43

Andrea wrote:
Finally, made it work on Firefox 1.5.0.3 and linux.
I was getting the "Components.classes[cid] has no properties" error.
To make it work, don't use gecko-sdk 1.8.
Download mozilla source and build it.
ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.5.0.3/source/
To build follow instructions here:
http://developer.mozilla.org/en/docs/Build_and_Install
Then in the directory: /mozilla/obj-i686-pc-linux-gnu/dist/sdk,
you will find the same tools, libs and headers that are in gecko-sdk 1.8.
Link your xpcom component against the libs that you just compiled and it will work.
Today date: 08 May 2006.
08-May-2006 03:03:01

Cool_dude wrote:
Thanks for your response.
finally, made it to work on firefox 1.5.0.2 and linux.
08-May-2006 07:03:03

girish wrote:
Hi, I am developing an extension for firefox 1.5+ (for both windows and linux OS). I developed an C++ XPCOM component with Gecko SDK 1.7 and it worked fine (on windows), when I build the same component with Gecko SDK 1.8a1 it doesn't work.
Can anyone tell me what could be the problem?? Also me suggest the best version of Gecko-sdk (with all the libs,idl and header files) that suits my requirement and also where from where I can download (since many versions are available).

Thanks in Adavance
11-May-2006 01:01:31

Andrea wrote:
I have no idea about Windows.
On Linux with Firefox 1.5.0.* i tried different versions of Gecko-sdk but non worked for me.
So i downloaded mozilla source, build it, and linked with the (gecko) sdk found in:
/where-you-downloaded/mozilla/obj-i686-pc-linux-gnu/dist/sdk

11-May-2006
11-May-2006 08:05:22

girish wrote:
The component which was built with gecko-sdk 1.7 works on both linux and windows (firefox 1.5.0.2). But when I tried the ame component with gecko-sdk 1.8a1 it fails to register (entry is not appeared in compreg.dat but appears in xpti.dat) on windows. I haven't tried it on linux.

can anyone tell me what could be the problem with 1.8a1 version of gecko-sdk?
11-May-2006 09:07:32

sciascid wrote:
hi guys, my problem is that i can't compile using the provided makefile. i always get the following error:
c++ -Os -o MyComponent.so -DMOZILLA_STRICT_API -I../../mozilla/dist/sdk/include -fno-rtti -fno-exceptions MyComponent.cpp MyComponentModule.cpp ../../mozilla/dist/sdk/lib/libxpcomglue_s.a -L../../mozilla/dist/sdk/lib -lxpcom -lnspr4 -lplds4
/usr/bin/ld: warning can't open dynamic library: @executable_path/libxpcom_core.dylib referenced from: ../../mozilla/dist/sdk/lib/libxpcom.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2) .... (long list of undefined things)
i can't figure out what's happening! some ideas?
31-Aug-2006 17:28:08

varmag wrote:
Hi all,

I working on a XPCOM development. I am able to build a XPCOM component on Windows and I am able to access the component through Java script. Can any body tell how to build XPCOM components on Mac OSX. I tried to build the component as per the steps given for linux. I am able to create the component but I am unable to call it from Java Script. When I tried to explore the component through XPCOM component viewer , no iterfaces are getting displayed. i am thinking that it may be aproblem with make file. I am new to Mac environment. Please guide me how to proceed, If possible please send me sample make file on Mac.
Thanks and Regards
Varmag
31-Aug-2006 04:17:34

Sarjeet Singh wrote:
Hi,
I tried to create a sample XPCOM component through Visual C++ SDK.
I encountered an error while compiling the
the project:
"error MIDL2025 : syntax error : expecting an interface name or DispatchInterfaceName or CoclassName or ModuleName or a COM object name or LibraryName or a type specification near "%" "
This error is pointing to nsrootidl.idl(44) file.
Can anybody help me out please? I am new
to XPCOM :)
20-Jul-2006 07:15:28

cool_dude wrote:
Hi All,
Can anyone help me in building mozilla from source on windows XP. If someone already done it please post the steps to built it.

Thanks in advance,
23-Aug-2006 03:51:25

anonymous wrote:
Hi All,
Can anyone help me in building mozilla from source on windows XP. If someone already done it please post the steps to built it.

Thanks in advance,
23-Aug-2006 03:50:49

balaji patil wrote:
any one tell me . what should i do to create my own component in linux
thanx in advance......
22-Jun-2006 02:10:18

Andrew wrote:
For all of you out there who are having problems with the sample not registering with Firefox (one of the symptoms is the infamous "Type error: Components.classes[cid] has no properties!"), be informed that after several days of three people trying to build and install the extension with VS 2005, we reverted back to VS 6.0 with the required service packs (see: http://developer.mozilla.org/en/docs/Windows_Build_Prerequisites_on_the_1.7_and_1.8_Branches#Compiler_.26_Linker) and things magically started working! So, as luck would have it, you must use just the right version of development tools and libraries to get things to work.

So here's what you need: gecko-sdk-1.7.13 and VS 6.0 with sp5.

Good luck!
18-Aug-2006 13:40:03

anonymous wrote:
Just a small question, Ive sucessfully built and registered the component, but when I try to test it out I get a popup window saying:

Type error: Components.classes[cid] has no properties!

Any ideas?
21-Jun-2006 16:23:44

anonymous wrote:
Just a small question, Ive sucessfully built and registered the component, but when I try to test it out I get a popup window saying:

Type error: Components.classes[cid] has no properties!

Any ideas?
21-Jun-2006 16:24:05

Adi KR wrote:
----------

I want to update my last post.

1.-I have solved my first error "OK" Solution:
I used to using components like this:
#define MY_COMPONENT_CONTRACTID "ITTS/itts"
I change the above to:
#define MY_COMPONENT_CONTRACTID "@ITTS.com/itts"
And made change in extension usage, and my first error is solved.

2.-Second error not solved yet: Where does the Mozilla search for components. Maybe my .dll path locating B.TTS is miss.

B.TTS is supposed to be searched in the same directory (APPLICATION DIR) with my .dll. I have put it all in the components directory. But Mozilla still asking this file.

- My E-mail: adikr@telkom.net.
- Posted: 20-June-2006

----------
20-Jun-2006 06:32:48

Adi KR wrote:
First of all, thanks for the tutorial. It can make mozilla reads my component.

-------------------------I Want to ask questions:

I got these following error after trying this example on Mozilla Firefox 1.5 and using nightly-build sdk 1.7.

1.-First Error:

[Exception… “Component returned failure code: 0x80570015
(NS_ERROR_XPC_CI_RETURNED_FAILURE)[nsIJSCID.createInstance]” nsresult: “0x80570015
(NS_ERROR_XPC_CI_RETURNED_FAILURE)” location: “JS frame :: chrome://indotts/content/wordcapture

This Error occurs every after open and close after running my .xpi. (Only first installation succeeds –the component recognized).
(I have done the above instruction and add a .js to add to components directory):

-------------
var err = initInstall("IndoTTS", "indotts", 1.0);

addFile("MyComponent.dll", "1.0" , "MyComponent.dll", componentsDir, "")
addFile("IMyComponent.idl", "1.0" , "IMyComponent.idl", componentsDir, "")
addFile("A.tts", "1.0" , "A.tts", componentsDir, "")
addFile("B.tts", "1.0" , "B.tts", componentsDir, "")
addFile("C.tts", "1.0" , "C.tts", componentsDir, "")
addFile("ITTS_DLL.dll", "1.0" , "C.tts", componentsDir, "")

var componentsDir = getFolder("Components");
var cf = getFolder("Chrome");
err = addDirectory ("indotts", "1.0",
"", chromeDir, "")

if (err==SUCCESS) {
performInstall();
alert(err);
}
else {
cancelInstall(err);
alert(err);
}
-------------
( I have even tried to copy all of the file to \Program Files\Mozilla Firefox\Plugins and Components Directory)

-Summary of What I Want To Ask:
How to register a component “forever” in Mozilla.

-My Current Solution:
Delete the compreg.dat and xpti.dat everytime the Mozilla closed.

-My “OK” Solution:
Not Yet Known.

2.-Second Error: (after the component is ready)

Error: File B.TTS does not exist. (Mozilla doesn’t know where this file, which my dll needs, although I already have it copied to:
\Application Data\Mozilla\Firefox\Profiles\y19u8p4v.default\extensions\indotts@indotts\components\)

( I have also copy all of the file to \Program Files\Mozilla Firefox\Plugins and Components Directory)

-Summary of What I Want To Ask:
Where does the Mozilla search for all components.

-My Current Solution:
None.

-------------------------Thanks all for the solution.
20-Jun-2006 05:35:58

anonymous wrote:
While i am registering new component on linux folowing error occur what will be screw in that

[root@l13-46 mozilla-1.7.12]# /usr/gecko-sdk/bin/regxpcom 'x- /usr/lib/mozilla-1.7.2/components'
Can not initialize XPCOM Glue
Can not aquire component registrar
Registration failed: (c1f30001) x- /usr/lib/mozilla-1.7.2/components
[root@l13-46 mozilla-1.7.12]#
10-Sep-2006 23:07:48

Abhishek Kohli wrote:
The sample is working on Linux 2.6.15-23-386. I was getting the same error as many others-
Type error: Components.classes[cid] has no properties!

I am using Firefox 1.5.0.3. I found out that i was using the wrong gecko-sdk version(Gecko 1.7). i downloaded the correct version, that is Gecko 1.8, and it worked!

The link to download Gecko 1.8 is
http://developer.mozilla.org/en/docs/Gecko_SDK
13-Sep-2006 12:01:54

Abhishek Kohli wrote:
has anyone tried to package and deploy the component over the Internet? Any working example like this would be of great help.
20-Sep-2006 15:03:17

Colin wrote:
Thank you!
http://ehleypnm.com/azqc/cpku.html | http://xthgsbzs.com/nuco/kezr.html
21-Sep-2006 01:36:18

JDong wrote:
Originally, I tried the author's code on
Red Hat AS 4 and Firefox 1.5.0.3. and gecko-sdk 1.7. It failed and show error message: Components.classes[cid] has no properties.

Then I follow the suggestion from Andrea
I include his suggestion below "

Download mozilla source and build it.
ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.5.0.3/source/
To build follow instructions here:
http://developer.mozilla.org/en/docs/Build_and_Install
Then in the directory: /mozilla/obj-i686-pc-linux-gnu/dist/sdk,
"
When you compile the author's code, you need to change the Makefile and link the library in mozilla/obj-i686-pc-linux-gnu/dist/sdk,
"

It works !!!

27-Sep-2006 18:44:36

JDong wrote:
Finally I figure out the cause of this error message "

Components.classes[cid] has no properties."

The reason is that the wrong gecko-sdk is used. If you use firefox 1.5 or above, you have to use Gecko-SDK 1.8. This is why the author's sample works when you use Gecko-sdk 1.8 or SDK compiled from mozilla source.
27-Sep-2006 19:05:49

Abhishek kohli wrote:
JdDng, did you skip my post? :)
29-Sep-2006 11:49:00

George Akpoly wrote:
any idea regarding the error below:

Creating library Debug/MyComponent.lib and object Debug/MyComponent.exp
MyComponentModule.obj : error LNK2001: unresolved external symbol "unsigned int __cdecl NS_NewGenericModule2(struct nsModuleInfo const *,class nsIModule * *)" (?NS_NewGenericModule2@@YAIPBUnsModuleInfo@@PAPAVnsIModule@@@Z)
Debug/MyComponent.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
09-Oct-2006 16:45:57

Farkbert wrote:
George, I had the same error. I think the problem is that the version of the gecko-sdk you are using is different than the one that works with the authors example (I used the gecko-sdk for xulrunner 1.8.0.4 and had the same exact problem). You need to change the link line a bit to make it work:

For example, change the definition of link32_flags = (...a bunch of windows libs...) xpcomglue.lib (...a bunch more stuff)

to the following:

link32_flags = (...a bunch of windows libs...) xpcom.lib xpcomglue_s.lib (...a bunch more stuff)

...that worked for me. Don't forget that link32_flags is defined twice in the makefile...once for each of the Debug and Release versions. You should change both.

Hope that helps.

(Now of course..If I could get my own component to register with XULRunner that would just make my night...)

10-Oct-2006 15:03:55

Sam Lie wrote:
for those of you who keep getting the
'components.classes[cid] has no properties' problem. i had an xpcom that
was working on mozilla 1.7 then moved to firefox 1.5 and had this problem.
basically firefox really expected the xpcom to be in the directory 'components'.
so if you dont put your component in that directory the browser never found nor registered your component.

[REMOVED XML CODE]


notice i added prefix="components" for the component line.

hope that helps.
10-Mar-2007 16:00:14

anonymous wrote:
my ant build.xml script which specifies the component to be in the 'components' directory :

{?xml version="1.0"?}
{project name="MYXP" default="createxpi"}
{target name="createjar"}
{zip destfile="myxp.jar" basedir="."
includes="content/**" /}
{/target}
{target name="createxpi" depends="createjar"}
{zip destfile="c:\myxp\myxp.xpi"}
{zipfileset dir="." includes="SAT.jar"
prefix="chrome" /}
{zipfileset dir="." includes="myxp.dll" prefix="components" /}
{zipfileset dir="." includes="imyxp.xpt" prefix="components" /}
{zipfileset dir="." includes="install.rdf" /}
{zipfileset dir="." includes="install.js" /}
{/zip}
{/target}
{/project}



note : replace {} with <>
10-Mar-2007 16:00:14

anonymous wrote:
the solution 'put your components' in the components directory has alreeady been mentioned few times already.. except somehow the message wasn't explicit enough.. so yeah put the bloody components in a sub-directory called components or you will get the
'components.classes[cid] has no properties' freaken error.
12-Oct-2006 03:30:14

Sam Lie wrote:
another major problem that i encountered
was XPCOM linking issues, my previous
xpcom on Mozilla 1.7 used the following
libraries :

nspr4.lib plds4.lib plc4.lib xpcomglue.lib

and everything was fine. when i moved to firefox i started having linking problems until i changed the libraries to :

nspr4.lib plds4.lib plc4.lib xpcom.lib xpcomglue_s.lib

(removed xpcomglue_s.lib and added xpcom.lib and xpcomglue_s.lib)

and now no link problems.

this msg from moz developer here helped.
http://www.mail-archive.com/mozilla-xpcom@mozilla.org/msg05096.html


12-Oct-2006 05:23:27

Farkbert wrote:
I just want to add an update. I was originally using VC8 (2005 .NET Express) to build my component and it would not register with XULRunner 1.8.0.4 or with FF1.5. After a whole wasted day of trying, I finally scrounged up a copy of VC7.1 and now everything works.

I'd say, if you want to use VC8 to build your component, you'll have to get a build of your run-time environment built with VC8 in order to get everything working. Since the older builds (the 1.8.0 branch, FF1.5) won't build with VC8....you may be forced to work with a newer version.
18-Oct-2006 08:36:15

abhishek kohli wrote:
i have a working xpcom component on windows XP. what i want to do is add a value to the PATH variable in windows through my component. i know i have to instantiate nsIEnvironment and use the "Set" method. But i don't know where to get started about that. Any ideas?

thanks
26-Oct-2006 11:48:06

iunx frblki wrote:
cehxbfdj qvjgi mzuwbv dljqvn xgjcu lkpxauofe ozcnflbt
11-Feb-2007 12:20:17

cysl mhor wrote:
oycfthl biwyus vzgeahi stcvlrqe srugnitw zcgjdxeu mlrdp http://www.wfhklrc.fzmolvn.com
11-Feb-2007 12:20:25

cysl mhor wrote:
oycfthl biwyus vzgeahi stcvlrqe srugnitw zcgjdxeu mlrdp http://www.wfhklrc.fzmolvn.com
11-Feb-2007 12:20:26

cysl mhor wrote:
oycfthl biwyus vzgeahi stcvlrqe srugnitw zcgjdxeu mlrdp http://www.wfhklrc.fzmolvn.com
11-Feb-2007 12:21:27

Mike wrote:
Hmm, I can't get it to compile either. I get this output:

Microsoft (R) Program Maintenance Utility Version 8.00.50727.42
Copyright (C) Microsoft Corporation. All rights reserved.

No configuration specified. Defaulting to MyComponent - Win32 Debug.
cl.exe /nologo /MDd /W3 /Gm /ZI /Od /I "C:\gecko-sdk\include" /FI"C:\ge
cko-sdk\include\mozilla-config.h" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS
" /D "_USRDLL" /D "XPCOM_GLUE" /FR".\Debug\\" /Fp".\Debug\MyComponent.pch" /YX /
Fo".\Debug\\" /Fd".\Debug\\" /FD /GZ /c .\MyComponent.cpp
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\bin\c
l.exe"' : return code '0xc0000135'
Stop.

Anybody have any suggestions as to what I'm doin wrong?
04-Nov-2006 10:31:20

Peous wrote:
Under Windows (Visual 2005), FireFox2.0

- Use SDK 1.7.13
http://releases.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7.13/gecko-sdk-i586-pc-msvc-1.7.13.zip

- Listen to Free_Zy: an error makes me lost a lot of time : contrarly against that it is written down the -x option of regxpcom is not the components directory but xcom library directory (from gecko sdk).
So the command line would be something like regxpcom -x C:\gecko-sdk\bin

Here you are !
(It works for me)
13-Nov-2006 09:17:29

Garrett wrote:
On Linux (mine is Fedora Core 6) with SELinux enabled, my /var/log/audit/audit.log was showing:
avc: denied { execmod } for pid=4645
comm="firefox-bin" name="MyComponent.so" dev=dm-0 ino=8941119 scontext=user_u:sy
stem_r:unconfined_t:s0 tcontext=user_u:object_r:lib_t:s0 tclass=file

So, I did chcon system_u:object_r:textrel_shlib_t MyComponent.so .


That, along with many of the other tips here got me up and running successfully.

Thanks for this tutorial. I really like the minimal approach to get started with.

16-Nov-2006 08:28:44

Dave Kok wrote:
If anyone is having problems, eg getting unresolved references than check this webpage http://developer.mozilla.org/en/docs/XPCOM_Glue.
Look up dependent glue in the table and use the settings there. Make sure you don't have XPCOM_GLUE defined in your makefile like in the above example. This is only for standalone glue which properly not what you want. Also in the example mozilla-config.h is included in the makefile. Change this to xpcom-config.h as stated on the webpage.
24-Mar-2007 04:21:35

Gouchi wrote:

Some feedback :

Firefox
Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.8.1.2) Gecko/20060601
Firefox/2.0.0.2)

Gecko SDK
gecko-sdk-i686-pc-linux-gnu-1.8.0.4.tar.bz2 OK without change
gecko-sdk-i686-pc-linux-gnu-gtk2+xft-1.8b1.tar.gz KO with/out change
28-Mar-2007 12:32:23

Dan wrote:
How to *really* get the sample working on
WinXP SP2 VS2005, gecko 1.7
---------------------------------------

1. Download and extract the sample:
http://www.iosart.com/firefox/xpcom/xpcom-sample.zip

2. Download and extract this 1.7 nightly sdk:
http://ftp.mozilla.org/pub/mozilla.org/mozilla/nightly/latest-1.7/gecko-sdk-i586-pc-msvc.zip

3. Open sample project in VS2005 and make the following modifications.
Add the sdk \include to C++-General-Additional Include Directories
Add the sdk \lib to Linker-General-Additional Library Directories
Add xpcomglue_s.lib to Linker-Input_Additional Dependencies

4. Build project in Release configuration and copy resulting src\Release\MyComponent.dll and src\IMyComponent.xpt to c:\Program Files\Mozilla Firefox\components

5. Open and resave file c:\Program Files\Mozilla Firefox\.autoreg

6. Restart firefox and open MyComponentTest.html

-dan
23-Mar-2007 05:25:01

Dan wrote:
How to *really* get the sample working on
WinXP SP2 VS2005, gecko 1.7
---------------------------------------

1. Download and extract the sample:
http://www.iosart.com/firefox/xpcom/xpcom-sample.zip

2. Download and extract this 1.7 nightly sdk:
http://ftp.mozilla.org/pub/mozilla.org/mozilla/nightly/latest-1.7/gecko-sdk-i586-pc-msvc.zip

3. Open sample project in VS2005 and make the following modifications.
Add the sdk \include to C++-General-Additional Include Directories
Add the sdk \lib to Linker-General-Additional Library Directories
Add xpcomglue_s.lib to Linker-Input_Additional Dependencies

4. Build project in Release configuration and copy resulting src\Release\MyComponent.dll and src\IMyComponent.xpt to c:\Program Files\Mozilla Firefox\components

5. Open and resave file c:\Program Files\Mozilla Firefox\.autoreg

6. Restart firefox and open MyComponentTest.html

-dan
23-Mar-2007 05:27:16

test wrote:
are comments closed or something?
23-Mar-2007 05:27:58

ajay wrote:
can anyone tell me build firefox source on RedhatLinux9.0 with Gcc3.2.2 .or send me .mozconfig file , so that i can cross check that file.
13-Mar-2007 01:45:00

M7OT2Ft0Tl wrote:
iwwB4JWIALaQKK EhxGGe6fl3r pbizpWH1yq
23-Nov-2006 08:04:05

Ian Malone wrote:
AFAICT "Components.classes[cid] has no properties!" will turn up whenever the component wasn't added.
On Fedora Core (FC5), I had to shuffle the Makefile so $(GECKO_LDFLAGS) came after everything else (otherwise the stuff in xpcomglue isn't linked).
23-Nov-2006 14:52:56

sandor cristian wrote:
szopjatok le
07-Dec-2006 07:06:13

sandor cristian wrote:
szopjatok le
07-Dec-2006 07:06:26

Tomekk wrote:
Sam Lie can you tell me where you find out that for thunderbird it is neede to change the lib´s.

Now It works
thx Sam Lie
14-Dec-2006 07:45:41

Man From Russia wrote:
Can not initialize XPCOM Glue
Can not aquire component registrar
Registration failed: (c1f30001) and
Can not initialize XPCOM Glue
Can not aquire component registrar
Registration failed: (c1f30001) Settings\User\My
Can not initialize XPCOM Glue
Can not aquire component registrar

How can I resolve this problem????
27-Dec-2006 01:28:39

Dev wrote:
Components.classes[cid] has no properties

I have looked all topics in this article and nothing help me.
How can I resolve this problem????
27-Dec-2006 06:17:18

Dev wrote:
After three days attepmted IT'S WORKS!
I have WinXP SP2, VS2005, ff1.5 & 2.0, gecko 1.8 from http://developer.mozilla.org/en/docs/Gecko_SDK
base from
http://downloads.mozdev.org/www/notes/base.zip
It works fine!
28-Dec-2006 00:28:20

PMT wrote:
I can't wrap this up into an extension. Can anyone send me an example?
My email: pmtyim@yahoo.com
01-Jan-2007 01:23:16

PMT wrote:
I can't wrap this up into an extension. Can anyone send me an example?
My email: pmtyim@yahoo.com
01-Jan-2007 01:23:21
本人整理的xpcom资料合集 本人近两年整理的xpcom资料合集,包括接口资料以及相应教学资料 立即下载

相关推荐

创建XPCOM组件Creating XPCOM Components

这是一本有关Gecko的书,Gecko是所有Mozilla品牌的软件及其衍生产品中使用的开源Web浏览器布局引擎,以及有关为基于Gecko的应用程序创建XPCOM组件的书。

xulrunner中Mozilla XPCOM C++组件示例Sample在VC中的配置方法

xulrunner中Mozilla XPCOM C++组件示例Sample在VC中的配置方法一、组件的配置1.在http://mxr.mozilla.org/mozilla-central/source/xpcom/sample/中提取下列文件并将其放在一个新建的目录比如d:/Sample下    nsISample.idl    nsSample.cpp    nsSample.h    nsSampleModule.cpp2.在ftp://ftp.mozilla.org/pub/xulrunner/re

老顽童的技术足迹 2701

抖音短视频数据抓取实战系列(一)——模拟器性能对比与优化配置

本文是抖音短视频数据抓取实战系列的开篇,重点探讨了模拟器选型与优化配置。通过对比雷电、夜神、逍遥三大主流模拟器在性能、抖音兼容性及抓包友好度上的表现,文章指出雷电模拟器因其稳定的桥接网络模式和良好的兼容性,是数据抓取的优选。并提供了雷电模拟器从安装、网络桥接到系统优化的详细配置指南,旨在帮助读者构建稳定高效的抓取环境。

weixin_29230901的博客 251

XPCOM简介

      Cross Platform Component Object Module (XPCOM) 是一个允许开发人员把一个大的工程划分成小的模块的框架. 这些小模块称为组件, 它们在运行时刻组装在一起. XPCOM 的目标是使软件的不同部分分别开发, 相互独立. 为了是应用的不同组件之间能够互操作, XPCOM 把组件的实现与接口(后面讨论接口)分开. 同时 XPCOM 还提供了加载...

iteye_16714的博客 787

SAGA GIS英文版进行地形分析,计算常用的地形因子等

SAGA GIS中文版是一款专业的自动化地球科学分析系统软件。SAGA GIS最新版界面简洁,操作简便,用户使用时输入要分割的影像,选择要计算特征的影像或者波段,设置越大,得到的斑块越大;反之,则越小,点击Okay,得到分割影像图。SAGA GIS中文版主要通过选择适合你影像的格式,加载影像。 SAGA GIS全称是System for Automated Geoscientific Analyses,是一种用于编辑空间数据的地理信息系统(GIS)计算机程序,它是免费的开源软件,SAGA GIS旨在为科学家

qq_35794085的博客 5652

检索生成(RAG) vs 长文本大模型:实际应用中如何选择?

大模型的上下文理解能力直接影响到 LLMs 在复杂任务和长对话中的表现。本期内容聚焦于两种主流技术:长上下文(Large Context Windows)和检索增强生成(RAG)。这两种技术各有何优势?在实际应用中,我们又该如何权衡选择?文章不仅详细阐述了这两种技术的工作原理,还深入分析了它们在效率、准确性和实施成本等方面的差异。文章特别提到了在执行重复性任务时使用 Context Caching 优化长上下文的优势,然而,缓存策略的效果很大程度上取决于提示词的可预测性。

2401_85782938的博客 1256

XPCOM指南-1_XPCOM概述

XPCOM概览 本章为XPCOM的快速导览,对XPCOM和组件开发的基础思想和技术做了说明,这些说明从较高层次来描述的,只是为了熟悉一下本指南需要的一些背景知识。 1. XPCOM 解决方案 XPCOM ( Cross Platform Component Object Model),是一个跨平台的软件框架,它使开发人员把一个大的软件工程分解成各个小的独立的模块,然后再运行

阿波的专栏 8237

手把手教你用QEMU虚拟化华为路由器固件(附完整网络配置指南)

本文提供了一份详尽的QEMU虚拟化华为路由器固件的实战指南。从固件解包、网络桥接配置到QEMU虚拟机启动,手把手教你搭建完整的嵌入式设备沙箱环境,特别适合安全研究、逆向分析和学习嵌入式系统工作原理。

tgb3456789的博客 948

解决Firefox无法打开问题,提示Couldn’d load XPCOM【完美解决】

先说一下原因: 这是因为浏览器注册的组件出错所致。为了解决这个问题,可以尝试充分卸载火狐浏览器后再重新安装。 请注意:所谓的彻底卸载是指包括清除所有之前火狐浏览器的安装信息,包括注册表信息。 我个人是卸载后又安装到导致的这个情况,百度了许久也没有找到一个完整的解决流程,于是自己摸索了一下。   首先,需要完全删除火狐: 1、在电脑桌面,打开“开始”菜单,选择“所有程序”这一项,然后在其...

Suprit's blog 6万+

告别IMEI!手把手教你用UUID实现Android设备唯一标识(兼容Android 10-13)

本文详细探讨了在Android 10及以上版本中,如何构建合规且高可用的设备唯一标识方案以替代被限制访问的IMEI。文章深入分析了Android设备标识符的演变,并提供了基于UUID/GUID的完整实现策略,包括生成算法、多级持久化存储方案(如MediaStore)、权限处理以及版本兼容性实践,帮助开发者应对Android 10-13的隐私政策变化。

weixin_28339967的博客 589

从零开始STM32cubeide学习

使用的是正点原子的精英版,单片机是STM32F103ZET6,详细讲解完成跑马灯实验

weixin_44077208的博客 2291

创建windows下的第一个C++ XPCOM组件

这是一个step-by-step的入门教程,讲述在Windows下创建,构建和注册一个XPCOM 组件的过程。 本文涉及的源代码可以从我的资源里面下载。 创建组件 1. 下载 gecko-sdk-i586-pc-msvc-1.7.zip,解压到本地。 2. 为主接口创建GUID: Windows下用guidgen (Visual Studio 2003/2005 工具->创建GU

HITXuQin的专栏 1636

嵌入式面经(2)——央企篇

前文得知我只投央企,不投国企,有面试的央企大致有三类:感兴趣的同学可以和我私聊军工央企相关(航空航天,兵器兵工)制造央企相关(三桶油,装备制造)金融运维相关(信通集团,国有银行)接下来我将对我有的面试中询问的面经进行总结。

coldmood77的博客 474

利用C++创建XPCOM组件(英文)

转自:http://www.iosart.com/firefox/xpcom/About This is a step-by-step tutorial on creating, building and registering an XPCOM component on Linux and MS Windows. Download The complete source

温研的专栏 (探索OS内核的奥秘) 2980

PCL 直通滤波器【2026最新版】

PCL直通滤波器函数详解以及用于多字段滤波、强度滤波、获取某一时间范围内的点等高阶用法案例分享。博客长期更新,本文最近一次更新时间为:2026年3月11日。

点云侠的博客 40万+

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

gecko: xpcom: 利用C++创建XPCOM组件(英文)

转自:http://www.iosart.com/firefox/xpcom/About This is a step-by-step tutorial on creating, building and registering an XPCOM component on Linux and MS Wi...

hunter 461

efm32 入门.pdf

本PDF共计22页,介绍的是操作驱动API,下载与否自己斟酌。

火狐 load xpcom_为Firefox浏览器创建并实现XPCOM组件

跨平台组件对象模型(XPCOM)是Mozilla的跨平台组件模型,类似于CORBA和Microsoft®COM。 它具有多种语言绑定和IDL描述,因此XPCOM组件可以在JavaScript,Java™语言,Python和C ++中使用和实现。 您可以将自定义函数插入框架,并将它们与其他组件连接。 XPCOM支持Windows®和Linux®平台。 在本文中,所有指令,环境变量和命令行都将...

cusi77914的博客 2516

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

XPCOM (Cross Platform Component Object Model)

XPCOM,跨平台组件对象模型,让Gaia访问Gecko实现好的功能。 涉及技术有:组件管理、文件抽象、对象消息传递、内存管理等等。

zsw0314的专栏 1087

独立使用XPCOM

   XPCOM(CrossPlatform Component ObjectModel)是一种跨平台组件模型,是Mozilla技术的核心。通过Mozilla提供的SDK,我们可以在我们自己的程序里独立使用xpcom。    下面以vs2008的一个简单控制台程序来演示如何使用XPCOM。

riag的专栏 5186

解决Firefox无法打开问题,提示Couldn‘dload XPCOM

解决Firefox无法打开问题,提示Couldn'dload XPCOM

m0_64631726的博客 4503

XPCOM指南-5_使用XPCOM实用工具简化你的生活

本章回顾你已经在教程第一部分建立的代码 (see webLock1.cpp in the previous chapter) 并且使用 XPCOM 工具类让代码更容易更有效. 同时,介绍一个在XPCOM和Gecko API中广泛使用基本的字符串类型。 作为起点,第一部分描述可以替代webLock1.cpp中的很多代码的C++ 宏. 很多用来完成软件组织和组件注册的代码都可以缩减为精简的数据结构和

阿波的专栏 3112

xpcom简介

xpcom可以看作是开源版的Microsoft COM,但是目前应用的范围比较有限,主要是firefox的gecko引擎在使用。xpcom不是浏览器的插件,而是浏览器本身。火狐浏览器就是一堆的xpcom组件构成的。在火狐里面,基本上所有与浏览器相关的功能都被定义成了组件的形式,包括网页间的跳转,窗口管理,cookie 管理,书签,安全,搜索,润色等等的其他功能, 这些功能都是由组件的接口提供的...

weixin_30919919的博客 416

firefox附加组件开发者指南(四)——使用XPCOM:实现高级处理

本章描述如何利用javascript脚本语言使用XPCOM来实现高级的处理。 概述 Javascript没有类似于用来打开文件以及进行字符编码转换的函数。要实现这些功能需要采用其他机制。IE使用activex来处理,在firefox中我们使用XPCOM(跨平台组件对象模型)。 关于XPCOM XPCOM是用来开发独立于平台的组件的一个框架(framework)。在这个框架下开发的组

JumuFENG's blog 5667

xpcom:思想理解,思考总结

1.xpcom的思想核心,将接口与实现分开,接口写在固定的idl文件。具体的实现则是相应的c++或js文件。 这样的目的是使得所定义的接口可在全范围内使用,只要引了.idl???是这样吗? 2.所以创建一个xpcom 组件的方法是什么呢??? idl file. js implement file.这是实现部分???如何使用呢?? 通过xpcom.component.xxx来注册使用。所以...

hunter 1804

第一章:什么是xpcom(1)

      CHAPTER 1 What Is XPCOM?     This is a book about XPCOM. The book is written in the form of a tutorial about creating XPCOM components, but it covers all major aspects, concepts, and termi

xwjbs的专栏 2394

《XPCOM组件开发》笔记(四)

通用型XPCOM模块宏 宏 作用 NS_IMPL_NSGETMODULE(name, components) 实现IModule接口 NS_IMPL_NSGETMODULE_WITH_CTOR(name, components, ctor) 同上,但允许指定模块创建时调用一个特定函数 NS_IMPL_NSGETMODULE_WITH...

weixin_33795833的博客 180
上一篇: 转:MS COM技术
下一篇: 转: Linux:32/64位程序(应用程序、共享库、内核模块)
nedwons
博客等级 码龄9年 311粉丝 572原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值