nsCOMPtr<nsIPref> pPref(do_GetService(kPrefCID, &rv));
nsCOMPtr<nsIPref> pPref(do_GetService(NS_PREF_CONTRACTID, &rv));
static PRBool DIR_GetBoolPref(const char *prefRoot, const char *prefLeaf, char *scratch, PRBool defaultValue){    nsresult rv = NS_OK;    nsCOMPtr<nsIPref> pPref(do_GetService(kPrefCID, &rv));     if (NS_FAILED(rv) || !pPref) 		return defaultValue;	PRBool value;	PL_strcpy(scratch, prefRoot);	PL_strcat(scratch, ".");	PL_strcat(scratch, prefLeaf);	if (PREF_NOERROR != pPref->GetBoolPref(scratch, &value))		value = defaultValue;	return value;}