rv = NS_InitXPCOM(&servMgr);
rv = NS_InitXPCOM(&servMgr, nsnull, nsnull);
int main(int argc, char **argv){  nsresult rv;  nsIServiceManager* servMgr;  rv = NS_InitXPCOM(&servMgr);  NS_ASSERTION(NS_SUCCEEDED(rv), "NS_InitXPCOM failed");  nsViewerApp* app = new nsNativeViewerApp();  NS_ADDREF(app);  app->Initialize(argc, argv);  int result = app->Run();  app->Exit();  // this exit is needed for the -x case where the close box is never clicked  NS_RELEASE(app);  rv = NS_ShutdownXPCOM(servMgr);  NS_ASSERTION(NS_SUCCEEDED(rv), "NS_ShutdownXPCOM failed");  NS_RELEASE(servMgr);  return result;}