int ChangeAvatar(MCONTACT hContact, bool fLoad, bool fNotifyHist, int pa_format) { if (g_shutDown) return 0; hContact = GetContactThatHaveTheAvatar(hContact); // Get the node CacheNode *node = FindAvatarInCache(hContact, g_AvatarHistoryAvail && fNotifyHist, true); if (node == NULL) return 0; if (fNotifyHist) node->dwFlags |= AVH_MUSTNOTIFY; node->pa_format = pa_format; if (fLoad) { PushAvatarRequest(node); SetEvent(hLoaderEvent); } else node->wipeInfo(); return 0; }
INT_PTR GetAvatarBitmap(WPARAM hContact, LPARAM) { if (hContact == 0 || g_shutDown || fei == NULL) return 0; hContact = GetContactThatHaveTheAvatar(hContact); // Get the node CacheNode *node = FindAvatarInCache(hContact, TRUE); if (node == NULL || !node->loaded) return (INT_PTR)GetProtoDefaultAvatar(hContact); return (INT_PTR)node; }
INT_PTR GetAvatarBitmap(WPARAM wParam, LPARAM lParam) { if (wParam == 0 || g_shutDown || fei == NULL) return 0; HANDLE hContact = (HANDLE) wParam; hContact = GetContactThatHaveTheAvatar(hContact); // Get the node CacheNode *node = FindAvatarInCache(hContact, TRUE); if (node == NULL || !node->loaded) return (INT_PTR) GetProtoDefaultAvatar(hContact); else return (INT_PTR) &node->ace; }