nsComponentManager::RegisterComponent(kRDFServiceCID, nsnull, nsnull, RDF_DLL, PR_TRUE, PR_TRUE);
int main(){	nsINetService * pNetService;    nsCOMPtr<nsIEventQueue> queue;    nsresult result;    nsComponentManager::RegisterComponent(kNetServiceCID, NULL, NULL, NETLIB_DLL, PR_FALSE, PR_FALSE);	nsComponentManager::RegisterComponent(kEventQueueServiceCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE);	nsComponentManager::RegisterComponent(kRDFServiceCID, nsnull, nsnull, RDF_DLL, PR_TRUE, PR_TRUE);	nsComponentManager::RegisterComponent(kPrefCID, nsnull, nsnull, PREF_DLL, PR_TRUE, PR_TRUE);	nsComponentManager::RegisterComponent(kCMailboxServiceCID, nsnull, nsnull, LOCAL_DLL, PR_TRUE, PR_TRUE);    // make sure prefs get initialized and loaded..    // mscott - this is just a bad bad bad hack right now until prefs    // has the ability to take nsnull as a parameter. Once that happens,    // prefs will do the work of figuring out which prefs file to load...    NS_WITH_SERVICE(nsIPref, prefs, kPrefCID, &result);    if (NS_FAILED(result) || !prefs) {        exit(result);    }      // Create the Event Queue for this thread...    nsIEventQueueService* pEventQService;    result = nsServiceManager::GetService(kEventQueueServiceCID,                                          nsIEventQueueService::GetIID(),                                          (nsISupports**)&pEventQService);	if (NS_FAILED(result)) return result;    result = pEventQService->CreateThreadEventQueue();	if (NS_FAILED(result)) return result;	// ask the net lib service for a nsINetStream:	result = NS_NewINetService(&pNetService, NULL);	if (NS_FAILED(result) || !pNetService)	{		printf("unable to initialize net serivce. \n");		return 1;	}    pEventQService->GetThreadEventQueue(PR_GetCurrentThread(),getter_AddRefs(queue));    if (NS_FAILED(result) || !queue) {        printf("unable to get event queue.\n");        return 1;    }	// bienvenu -- this is where you replace my creation of a stub mailbox parser with one of your own	// that gets passed into the mailbox test driver and it binds your parser to the mailbox url you run	// through the driver.	nsIStreamListener * mailboxParser = nsnull;	nsComponentManager::CreateInstance(kCMailboxParser, nsnull, nsIStreamListener::GetIID(), (void **) &mailboxParser);	// NS_NewMsgParser(&mailboxParser);    	// okay, everything is set up, now we just need to create a test driver and run it...	nsMailboxTestDriver * driver = new nsMailboxTestDriver(queue, mailboxParser);	if (driver)	{		NS_ADDREF(driver);		driver->RunDriver();		// when it kicks out...it is done....so delete it...		NS_RELEASE(driver);	}	// shut down:	NS_IF_RELEASE(mailboxParser);	NS_IF_RELEASE(pNetService);        return 0;}