nsresult result;  nsComponentManager::RegisterComponent(kPrefCID, nsnull, nsnull, PREF_DLL, PR_TRUE, PR_TRUE); nsComponentManager::RegisterComponent(kFileLocatorCID,  NULL, NULL, APPSHELL_DLL, PR_FALSE, PR_FALSE);     NS_WITH_SERVICE(nsIPref, prefs, kPrefCID, &result); if (NS_FAILED(result) || prefs == nsnull) { exit(result); }
int main(){    newsTestDriver * driver = new newsTestDriver();	if (driver)	{		driver->RunDriver();		// when it kicks out...it is done....so delete it...		delete driver;        driver = nsnull;	}	// shut down:    return 0;}