nsCOMPtr<nsIPref> pPref(do_GetService(kPrefCID, &rv));
nsCOMPtr<nsIPref> pPref(do_GetService(NS_PREF_CONTRACTID, &rv));
nsresult DIR_GetDirServers(){    nsresult rv = NS_OK;	if (!dir_ServerList)	{        nsCOMPtr<nsIPref> pPref(do_GetService(kPrefCID, &rv));         if (NS_FAILED(rv) || !pPref)     		return NS_ERROR_FAILURE;		/* we need to build the DIR_Server list */ 		rv = DIR_GetServerPreferences(&dir_ServerList);		/* Register the preference call back if necessary. */		if (NS_SUCCEEDED(rv) && (!dir_ServerPrefCallbackRegistered))		{			dir_ServerPrefCallbackRegistered = PR_TRUE;        	pPref->RegisterCallback(PREF_LDAP_SERVER_TREE_NAME, dir_ServerPrefCallback, nsnull);		}	}	return rv;}