extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager *servMgr, nsIFile* aPath, nsIModule** return_cobj) { nsresult rv = NS_OK;  NS_ASSERTION(return_cobj, "Null argument"); NS_ASSERTION(gModule == NULL, "nsMimeModule: Module already created.");   nsMimeModule *module = new nsMimeModule(); if (!module) return NS_ERROR_OUT_OF_MEMORY;   rv = module->QueryInterface(NS_GET_IID(nsIModule), (void**)return_cobj); if (NS_FAILED(rv)) { delete module; module = nsnull; } gModule = module; return rv; }
NS_IMPL_NSGETMODULE("mime services", gComponents)
extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager *servMgr,                                          nsIFile* aPath,                                          nsIModule** return_cobj){    nsresult rv = NS_OK;    NS_ASSERTION(return_cobj, "Null argument");    NS_ASSERTION(gModule == NULL, "nsMimeModule: Module already created.");    // Create an initialize the imap module instance    nsMimeModule *module = new nsMimeModule();    if (!module)        return NS_ERROR_OUT_OF_MEMORY;    // Increase refcnt and store away nsIModule interface to m in return_cobj    rv = module->QueryInterface(NS_GET_IID(nsIModule), (void**)return_cobj);    if (NS_FAILED(rv))     {        delete module;        module = nsnull;    }    gModule = module;                  // WARNING: Weak Reference    return rv;}