Open main menu

CDOT Wiki β

Changes

Real World Mozilla First XPCOM Component

1 byte added, 21:06, 27 February 2007
Module Code
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsYourConcreteClassName, Init)
Next, we need to create proper identification for our component's module so that it can be passed to the module implementation macro, '''NS_IMPL_NSGETMODULE'''. This macro takes an array of '''nsModuleComponentInfo''' so that you can define more than one component per module (remember that a module is a collection of components, and every component belongs to a module so it can get loaded by the system).
Start by generating another '''uuid''', which will be used for identifying our component/class (i.e., we can't re-use our interface's uuid), for example: