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