NS_ENSURE_ARG_POINTER(searchDir); *searchDir = nsnull;  nsCOMPtr<nsIFile> aDir; nsresult rv = NS_GetSpecialDirectory(NS_APP_SEARCH_DIR, getter_AddRefs(aDir)); if (NS_FAILED(rv)) return rv;  *searchDir = aDir; NS_ADDREF(*searchDir); return NS_OK;
nsresult		rv; NS_WITH_SERVICE(nsIFileLocator, locator, kFileLocatorCID, &rv); if (NS_FAILED(rv) || !locator)	return NS_ERROR_FAILURE;  nsCOMPtr<nsIFileSpec>	dirSpec; if (NS_FAILED(rv = GetConvertedChromeURL("chrome: getter_AddRefs(dirSpec)))) return rv;  if (NS_FAILED(rv = dirSpec->GetFileSpec(&spec)))	return(rv);  #ifdef XP_MAC spec += "Search Plugins"; #else spec += "searchplugins"; #endif  return(NS_OK);
InternetSearchDataSource::GetSearchFolder(nsIFile **searchDir){  NS_ENSURE_ARG_POINTER(searchDir);  *searchDir = nsnull;	  nsCOMPtr<nsIFile> aDir;  nsresult rv = NS_GetSpecialDirectory(NS_APP_SEARCH_DIR, getter_AddRefs(aDir));  if (NS_FAILED(rv)) return rv;    *searchDir = aDir;  NS_ADDREF(*searchDir);  return NS_OK;}