nsCOMPtr<nsIPref> prefs(do_GetService(kPrefCID, &res)); if (NS_SUCCEEDED(res) && prefs) res = prefs->GetBoolPref("mail.unknown", &xlate);
nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID, &res)); if(NS_SUCCEEDED(res)) prefBranch->GetBoolPref("mail.unknown", &xlate);
GetMailXlateionPreference(void){  nsresult res;  PRBool   xlate = PR_FALSE;   nsCOMPtr<nsIPref> prefs(do_GetService(kPrefCID, &res));   if (NS_SUCCEEDED(res) && prefs)    res = prefs->GetBoolPref("mail.unknown", &xlate);    return xlate;}