XPCOM
Welcome to the XPCOM page. This area is intended to be a central clearinghouse for information related to XPCOM.
General
- Creating XPCOM Components written by Doug Turner and Ian Oeschger that introduces XPCOM and illustrates how to create XPCOM components for Gecko-based applications.
- An introduction to XPCOM on IBM's website by Rick Parrish.
- Presentation: Introduction To XPCOM, Alec Flett (Feb 4, 2002)
- Presentation: The XPCOM Library, Alec Flett (Feb 11, 2002)
- Standalone XPCOM : Document on building xpcom standalone.
- Information on the built-in support for detecting memory leaks.
Rules and guidelines for writing new code
- IDL Interface Rules - Guidelines for writing interfaces. Requirements for freezing.
- Rules we break lists and comments on xpcom rules being broken in our codebase
Smart Pointers and Ownership
- Some COM Ownership Guidelines gives a brief set of guidelines to help you build a supportable ownership model.
-
Using
nsCOMPtr
describes a 'smart-pointer' class for XPCOM. -
The
nsCOMPtr
homepage. has even more on nsCOMPtr -
nsIWeakReference
User Manual describes one implementation of a safe, non-dangling, non-owning pointer you can use with XPCOM.
Manuals and Guides
- Strings - The mozilla string guide
- Hashtables - The mozilla hashtable guide
- Arrays - The mozilla array guide
- Generic Factories - don't write factory code yourself
-
A Reference
Implementation of
QueryInterface
shows one good way to implementQueryInterface()
. - nsISupport Proxies describes how to use thread-crossing XPCOM proxies.
- General Overview of nsIClassInfo infrastructure
- Use the Console Service to log script errors and other user-visible messages.
Technotes
- Statement on binary compatibility of XPCOM interfaces across compiler versions.
XPIDL, XPConnect and friends
- Roadmap for XPCOM, XPConnect, XPTCall, and XPIDL describes how they all fit together
- XPConnect describes how XPCOM based classes can be accessed through JavaScript.
- XPIDL is the XP Interface Description Language used to specify XPCOM interface classes
-
xptcall is a library that
supports invoking methods on arbitrary xpcom objects and implementing classes
whose objects can impersonate an xpcom interface
- porting status lists the currently supported platforms. There are currently many platforms that we need help on.
- porting guide describes the assembly code that is needed to implement xptcall
-
Type Library Format describe
the type libraries (.xpt files) that are binary representations of XPCOM
interfaces
- Tools for Typelibs - xpt_dump dumps the information in a typelib to the screen and xpt_link merges typelib files
Soon to be removed
- Modularization Techniques describes XPCOM and how to use it.
See Also
- Essential COM by Don Box hardcopy book that explains the rationale behind COM's design
- C++ portability guide general guidelines for writing portable code