Tu Shengjun wrote:
> hi:
> Can anyone tell me how to use XPCOM without
> all mozilla environment.
Take a look at the main() function in the source code for
xpcshell - it's a command line program that allows executing
hand-typed javascript commands including code to load and
test your component.
Also, do a search on mozzilla.org for "standalone" ...
Here's another set of XPCOM resources ...
http://www-106.ibm.com/developerworks/components/library/co-xpcom.html
http://www-106.ibm.com/developerworks/components/library/co-xpcom2.html
http://www-106.ibm.com/developerworks/components/library/co-xpcom3.html
http://www-106.ibm.com/developerworks/components/library/co-xpcom4.html
http://www-106.ibm.com/developerworks/components/library/co-xpcom5.html
Try reading the section "Enabling XPCOM in an Application"
http://www-106.ibm.com/developerworks/components/library/co-xpcom3.html#12
Regards,
Rick