Index: msgdlgutils.c =================================================================== --- msgdlgutils.c (revision 4332) +++ msgdlgutils.c (working copy) @@ -843,17 +843,21 @@ /* * checks, if there is a valid smileypack installed for the given protocol */ - +// This API have been depricated in favor of MS_SMILEYADD_GETINFO2 +#define MS_SMILEYADD_GETINFO "SmileyAdd/GetInfo" +BOOL SMADD_useGetInfo2 = FALSE; //Does SmileyAdd Support new GETINFO2? int CheckValidSmileyPack(char *szProto, HANDLE hContact, HICON *hButtonIcon) { SMADD_INFO2 smainfo = {0}; if(myGlobals.g_SmileyAddAvail) { - smainfo.cbSize = sizeof(smainfo); + SMADD_useGetInfo2 = ServiceExists(MS_SMILEYADD_GETINFO2); + smainfo.cbSize = SMADD_useGetInfo2?sizeof(SMADD_INFO2):sizeof(SMADD_INFO2)-4; smainfo.Protocolname = szProto; - CallService(MS_SMILEYADD_GETINFO2, 0, (LPARAM)&smainfo); - if(hButtonIcon) - *hButtonIcon = smainfo.ButtonIcon; + if (SMADD_useGetInfo2) CallService(MS_SMILEYADD_GETINFO2, 0, (LPARAM)&smainfo); + else CallService(MS_SMILEYADD_GETINFO, 0, (LPARAM)&smainfo); + if(hButtonIcon) + *hButtonIcon = smainfo.ButtonIcon; return smainfo.NumberOfVisibleSmileys; } else @@ -2683,12 +2687,12 @@ if(hButtonIcon == 0 || myGlobals.m_SmileyButtonOverride) { dat->hSmileyIcon = 0; SendDlgItemMessage(hwndDlg, iItemID, BM_SETIMAGE, IMAGE_ICON, (LPARAM) myGlobals.g_buttonBarIcons[11]); - if(hButtonIcon) + if (SMADD_useGetInfo2) if(hButtonIcon) DestroyIcon(hButtonIcon); } else { SendDlgItemMessage(hwndDlg, iItemID, BM_SETIMAGE, IMAGE_ICON, (LPARAM) hButtonIcon); - dat->hSmileyIcon = hButtonIcon; + dat->hSmileyIcon = SMADD_useGetInfo2?hButtonIcon:0; } } Index: chat/window.c =================================================================== --- chat/window.c (revision 4332) +++ chat/window.c (working copy) @@ -44,6 +44,9 @@ extern int g_sessionshutdown; extern char* szWarnClose; +extern BOOL SMADD_useGetInfo2; + + extern WNDPROC OldSplitterProc; static WNDPROC OldMessageProc; static WNDPROC OldNicklistProc; @@ -2939,7 +2942,7 @@ if (myGlobals.g_hMenuTrayUnread) DeleteMenu(myGlobals.g_hMenuTrayUnread, (UINT_PTR)dat->hContact, MF_BYCOMMAND); - if (dat->hSmileyIcon) + if (SMADD_useGetInfo2) if(dat->hSmileyIcon) DestroyIcon(dat->hSmileyIcon); i = GetTabIndexFromHWND(hwndTab, hwndDlg); Index: msgdialog.c =================================================================== --- msgdialog.c (revision 4332) +++ msgdialog.c (working copy) @@ -69,7 +69,7 @@ "Music", "Business", "Camera", "Funny", "Phone", "Games", "College", "Shopping", "Sick", "Sleeping", "Surfing", "@Internet", "Engineering", "Typing", "Eating... yummy", "Having fun", "Chit chatting", "Crashing", "Going to toilet", "", "", ""}; - +extern BOOL SMADD_useGetInfo2; static DWORD CALLBACK StreamOut(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG * pcb); TCHAR *pszIDCSAVE_close = 0, *pszIDCSAVE_save = 0; @@ -4101,7 +4101,7 @@ smaddInfo.hwndParent = hwndContainer; smaddInfo.hContact = hContact; CallService(MS_SMILEYADD_SHOWSELECTION, (WPARAM)hwndContainer, (LPARAM) &smaddInfo); - if(hButtonIcon != 0) + if (SMADD_useGetInfo2)if(hButtonIcon != 0) DestroyIcon(hButtonIcon); } } @@ -5703,7 +5703,7 @@ } if (dat->hSmileyIcon) - DestroyIcon(dat->hSmileyIcon); + if (SMADD_useGetInfo2) DestroyIcon(dat->hSmileyIcon); else DeleteObject(dat->hSmileyIcon); if (dat->hClientIcon) DestroyIcon(dat->hClientIcon);