rv = db->CompareCollationKeys((*p1)->key,(*p1)->info.len,(*p2)->key,(*p2)->info.len,&retVal);
if (! (*p1)->key || ! (*p2)->key) retVal = (*p1)->key ? 1 : ((*p2)->key ? -1 : 0); else rv = db->CompareCollationKeys((*p1)->key,(*p1)->info.len,(*p2)->key,(*p2)->info.len,&retVal);
FnSortIdKeyPtr(const void *pItem1, const void *pItem2, void *privateData){    PRInt32 retVal = 0;    nsresult rv;    IdKeyPtr** p1 = (IdKeyPtr**)pItem1;    IdKeyPtr** p2 = (IdKeyPtr**)pItem2;    nsIMsgDatabase *db = (nsIMsgDatabase *)privateData;    rv = db->CompareCollationKeys((*p1)->key,(*p1)->info.len,(*p2)->key,(*p2)->info.len,&retVal);    NS_ASSERTION(NS_SUCCEEDED(rv),"compare failed");    if (retVal != 0)        return(retVal);    if ((*p1)->info.id >= (*p2)->info.id)        return(1);    else        return(-1);}