nsService<nsIPref> prefs(kPrefCID, &rv);
nsIPref* prefs; rv = nsServiceManager::GetService(kPrefCID, nsIPref::GetIID(), (nsISupports**)&prefs);
nsGetMailboxRoot(nsFileSpec &result){  nsresult rv = NS_OK;  if (gMailboxRoot == nsnull) {    // get mailbox root preference and cache it permanently - this    // is extremely temporary...I'm waiting for hubie to check in the     // new preferences service stuff.#if 1    nsService<nsIPref> prefs(kPrefCID, &rv);    if (NS_FAILED(rv)) return rv;     if (prefs && NS_SUCCEEDED(rv)) {      rv = prefs->Startup("prefs.js");      if (NS_FAILED(rv)) return rv;       rv = prefs->CopyPathPref(kMsgRootFolderPref, &gMailboxRoot);      if (NS_FAILED(rv)) return rv;    }#else    gMailboxRoot = nsCRT::strdup("d:\\program files\\netscape\\users\\warren\\mail");#endif  }  result = gMailboxRoot;  // XXX free gMailboxRoot somewhere (on shutdown?)  return rv; }