Welcome to the XPCOM page. This area is intended to be a central clearinghouse for information related to XPCOM.
- 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.
nsCOMPtrdescribes a 'smart-pointer' class for XPCOM.
nsCOMPtrhomepage. has even more on nsCOMPtr
nsIWeakReferenceUser 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
QueryInterfaceshows one good way to implement
- 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.
- 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
- 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
- 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.
- Essential COM by Don Box hardcopy book that explains the rationale behind COM's design
- C++ portability guide general guidelines for writing portable code