do_QueryInterface(element, &rv);
do_QueryInterface(thisElement, &rv);
nsMsgAccountManager::addIdentityIfUnique(nsISupports *element, void *aData){  nsresult rv;  nsCOMPtr<nsIMsgIdentity> identity = do_QueryInterface(element, &rv);  if (NS_FAILED(rv)) {    printf("addIdentityIfUnique problem\n");    return PR_TRUE;  }    nsISupportsArray *array = (nsISupportsArray*)aData;    nsXPIDLCString key;  rv = identity->GetKey(getter_Copies(key));  if (NS_FAILED(rv)) return PR_TRUE;  PRUint32 count=0;  rv = array->Count(&count);  if (NS_FAILED(rv)) return PR_TRUE;    PRBool found=PR_FALSE;  PRUint32 i;  for (i=0; i<count; i++) {    nsCOMPtr<nsISupports> thisElement;    array->GetElementAt(i, getter_AddRefs(thisElement));    nsCOMPtr<nsIMsgIdentity> thisIdentity =      do_QueryInterface(element, &rv);    if (NS_FAILED(rv)) continue;    nsXPIDLCString thisKey;    thisIdentity->GetKey(getter_Copies(thisKey));    if (PL_strcmp(key, thisKey)==0) {      found = PR_TRUE;      break;    }  }  if (!found)    array->AppendElement(identity);  return PR_TRUE;}