Open main menu

CDOT Wiki β

Changes

Real World Mozilla First XPCOM Component

8 bytes added, 12:42, 28 February 2007
Module Code
The final line, the constructor, is the name of the constructor automatically generated by '''NS_GENERIC_FACTORY_CONSTRUCTOR'''. It will be the name of your concrete class followed by "Constructor," in our case '''FirstXpcomConstructor'''.
And that's it for the module/factory code. Now all we need  == FirstXpcom.cpp == All that remains is our implementation of the methods. Here is the final version of '''FirstXpcom.cpp''' (emphasis added to highlight changes):
'''#include <stdio.h> // for printf()'''