summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/m_message.h4
-rw-r--r--include/m_protocols.h2
-rw-r--r--plugins/AVS/src/cache.cpp4
-rw-r--r--plugins/AVS/src/main.cpp2
-rw-r--r--plugins/AVS/src/options.cpp18
-rw-r--r--plugins/AVS/src/utils.cpp4
-rw-r--r--plugins/AddContactPlus/src/addcontact.cpp4
-rw-r--r--plugins/Alarms/src/alarms.cpp2
-rw-r--r--plugins/AssocMgr/src/test.cpp14
-rw-r--r--plugins/AuthState/src/main.cpp2
-rw-r--r--plugins/AuthState/src/options.cpp2
-rw-r--r--plugins/AvatarHistory/src/AvatarDlg.cpp2
-rw-r--r--plugins/AvatarHistory/src/popup.cpp4
-rw-r--r--plugins/BasicHistory/src/EventList.cpp2
-rw-r--r--plugins/BasicHistory/src/HistoryWindow.cpp4
-rw-r--r--plugins/Boltun/src/actionQueue.cpp4
-rw-r--r--plugins/BuddyExpectator/src/BuddyExpectator.cpp24
-rw-r--r--plugins/BuddyPounce/src/dialog.cpp6
-rw-r--r--plugins/BuddyPounce/src/main.cpp2
-rw-r--r--plugins/ClientChangeNotify/src/ClientChangeNotify.cpp10
-rw-r--r--plugins/Clist_modern/src/modern_clistsettings.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_viewmodebar.cpp8
-rw-r--r--plugins/Clist_mw/src/clcitems.cpp2
-rw-r--r--plugins/Clist_mw/src/contact.cpp4
-rw-r--r--plugins/Clist_nicer/src/clc.cpp2
-rw-r--r--plugins/Clist_nicer/src/clcitems.cpp6
-rw-r--r--plugins/Clist_nicer/src/clistevents.cpp4
-rw-r--r--plugins/Clist_nicer/src/clistmenus.cpp10
-rw-r--r--plugins/Clist_nicer/src/clistmod.cpp2
-rw-r--r--plugins/Clist_nicer/src/clui.cpp2
-rw-r--r--plugins/Clist_nicer/src/viewmodes.cpp8
-rw-r--r--plugins/ContactsPlus/src/main.cpp2
-rw-r--r--plugins/ContactsPlus/src/receive.cpp8
-rw-r--r--plugins/ContactsPlus/src/send.cpp2
-rw-r--r--plugins/CountryFlags/src/extraimg.cpp2
-rw-r--r--plugins/DbEditorPP/src/main_window.cpp2
-rw-r--r--plugins/DbEditorPP/src/modsettingenum.cpp4
-rw-r--r--plugins/DbEditorPP/src/moduletree.cpp4
-rw-r--r--plugins/FTPFileYM/src/dialog.cpp2
-rw-r--r--plugins/FavContacts/src/favlist.h2
-rw-r--r--plugins/FavContacts/src/http_api.cpp6
-rw-r--r--plugins/FavContacts/src/main.cpp28
-rw-r--r--plugins/FileAsMessage/src/dialog.cpp12
-rw-r--r--plugins/FingerprintNG/src/options.cpp2
-rw-r--r--plugins/FloatingContacts/src/main.cpp2
-rw-r--r--plugins/FloatingContacts/src/thumbs.cpp4
-rw-r--r--plugins/HTTPServer/src/GuiElements.cpp2
-rw-r--r--plugins/HistorySweeperLight/src/options.cpp4
-rw-r--r--plugins/IEView/src/HTMLBuilder.cpp6
-rw-r--r--plugins/IEView/src/TemplateHTMLBuilder.cpp2
-rw-r--r--plugins/IgnoreState/src/main.cpp2
-rw-r--r--plugins/KeyboardNotify/src/ignore.cpp4
-rw-r--r--plugins/KeyboardNotify/src/main.cpp2
-rw-r--r--plugins/MenuItemEx/src/main.cpp16
-rw-r--r--plugins/MetaContacts/src/meta_menu.cpp6
-rwxr-xr-xplugins/MetaContacts/src/meta_services.cpp10
-rw-r--r--plugins/MetaContacts/src/meta_utils.cpp18
-rw-r--r--plugins/MirFox/src/MirandaOptions.cpp4
-rw-r--r--plugins/MirFox/src/MirandaUtils.cpp2
-rw-r--r--plugins/MirOTR/MirOTR/src/dbfilter.cpp10
-rw-r--r--plugins/MirOTR/MirOTR/src/dllmain.cpp2
-rw-r--r--plugins/MirOTR/MirOTR/src/mirotrmenu.cpp4
-rw-r--r--plugins/MirOTR/MirOTR/src/options.cpp2
-rw-r--r--plugins/MirOTR/MirOTR/src/svcs_menu.cpp14
-rw-r--r--plugins/MirOTR/MirOTR/src/svcs_srmm.cpp4
-rw-r--r--plugins/MirOTR/MirOTR/src/utils.cpp8
-rw-r--r--plugins/MirandaG15/src/CAppletManager.cpp12
-rw-r--r--plugins/MirandaG15/src/CChatScreen.cpp2
-rw-r--r--plugins/MirandaG15/src/CContactList.cpp12
-rw-r--r--plugins/MobileState/src/main.cpp2
-rw-r--r--plugins/ModernOpt/src/mopt_ignore.cpp2
-rwxr-xr-xplugins/Msg_Export/src/utils.cpp2
-rw-r--r--plugins/NewEventNotify/src/main.cpp2
-rw-r--r--plugins/NewEventNotify/src/popup.cpp2
-rw-r--r--plugins/NewXstatusNotify/src/indsnd.cpp4
-rw-r--r--plugins/NewXstatusNotify/src/main.cpp12
-rw-r--r--plugins/NewXstatusNotify/src/popup.cpp8
-rwxr-xr-xplugins/New_GPG/src/main.cpp2
-rwxr-xr-xplugins/New_GPG/src/messages.cpp48
-rw-r--r--plugins/New_GPG/src/metacontacts.cpp14
-rwxr-xr-xplugins/New_GPG/src/options.cpp2
-rwxr-xr-xplugins/New_GPG/src/utilities.cpp6
-rw-r--r--plugins/NewsAggregator/Src/ExportImport.cpp2
-rw-r--r--plugins/NewsAggregator/Src/Options.cpp4
-rw-r--r--plugins/NoHistory/src/dllmain.cpp2
-rw-r--r--plugins/NoHistory/src/options.cpp4
-rw-r--r--plugins/Non-IM Contact/src/contactinfo.cpp4
-rw-r--r--plugins/Non-IM Contact/src/dialog.cpp12
-rw-r--r--plugins/Nudge/src/main.cpp18
-rw-r--r--plugins/PasteIt/src/PasteIt.cpp8
-rw-r--r--plugins/Popup/src/avatars.cpp2
-rw-r--r--plugins/Popup/src/avatars_gif.cpp2
-rw-r--r--plugins/Popup/src/opt_contacts.cpp4
-rw-r--r--plugins/Popup/src/popup_wnd2.cpp4
-rw-r--r--plugins/QuickContacts/src/quickcontacts.cpp4
-rw-r--r--plugins/QuickMessages/src/Utils.cpp2
-rw-r--r--plugins/RemovePersonalSettings/src/rps.cpp2
-rw-r--r--plugins/SMS/src/SMS_svc.cpp2
-rw-r--r--plugins/Scriver/src/msglog.cpp2
-rw-r--r--plugins/Scriver/src/msgoptions.cpp4
-rw-r--r--plugins/Scriver/src/msgs.cpp2
-rw-r--r--plugins/Scriver/src/msgwindow.cpp2
-rw-r--r--plugins/Scriver/src/statusicon.cpp2
-rw-r--r--plugins/SecureIM/src/crypt_icons.cpp2
-rw-r--r--plugins/SecureIM/src/crypt_lists.cpp6
-rw-r--r--plugins/SecureIM/src/crypt_metacontacts.cpp6
-rw-r--r--plugins/SecureIM/src/crypt_popups.cpp2
-rw-r--r--plugins/SeenPlugin/src/history.cpp8
-rw-r--r--plugins/SeenPlugin/src/missed.cpp2
-rw-r--r--plugins/SeenPlugin/src/utils.cpp4
-rw-r--r--plugins/Sessions/Src/Main.cpp2
-rw-r--r--plugins/Sessions/Src/Options.cpp8
-rw-r--r--plugins/ShellExt/src/shlcom.cpp2
-rw-r--r--plugins/SmileyAdd/src/general.cpp2
-rw-r--r--plugins/SmileyAdd/src/services.cpp2
-rw-r--r--plugins/SpellChecker/src/utils.cpp2
-rw-r--r--plugins/SplashScreen/src/debug.h2
-rwxr-xr-xplugins/StopSpamMod/src/stopspam.cpp2
-rw-r--r--plugins/StopSpamPlus/src/services.cpp2
-rw-r--r--plugins/TabSRMM/src/buttonsbar.cpp2
-rw-r--r--plugins/TabSRMM/src/container.cpp8
-rw-r--r--plugins/TabSRMM/src/controls.cpp2
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp2
-rw-r--r--plugins/TabSRMM/src/hotkeyhandler.cpp4
-rw-r--r--plugins/TabSRMM/src/msglog.cpp2
-rw-r--r--plugins/TabSRMM/src/msgoptions.cpp4
-rw-r--r--plugins/TabSRMM/src/sendlater.cpp2
-rw-r--r--plugins/TabSRMM/src/sendqueue.cpp4
-rw-r--r--plugins/TabSRMM/src/utils.cpp6
-rw-r--r--plugins/TipperYM/src/message_pump.cpp2
-rw-r--r--plugins/TipperYM/src/options.cpp4
-rw-r--r--plugins/TipperYM/src/popwin.cpp2
-rw-r--r--plugins/TipperYM/src/subst.cpp16
-rw-r--r--plugins/TooltipNotify/src/DbHelpers.cpp6
-rw-r--r--plugins/TooltipNotify/src/TooltipNotify.cpp4
-rw-r--r--plugins/UserInfoEx/src/classMTime.cpp2
-rw-r--r--plugins/UserInfoEx/src/dlg_propsheet.cpp2
-rw-r--r--plugins/UserInfoEx/src/mir_db.cpp6
-rw-r--r--plugins/UserInfoEx/src/psp_profile.cpp8
-rw-r--r--plugins/UserInfoEx/src/svc_avatar.cpp2
-rw-r--r--plugins/UserInfoEx/src/svc_email.cpp2
-rw-r--r--plugins/Variables/src/help.cpp2
-rw-r--r--plugins/Variables/src/parse_metacontacts.cpp6
-rw-r--r--plugins/Weather/src/weather_addstn.cpp6
-rw-r--r--plugins/Weather/src/weather_contacts.cpp2
-rw-r--r--plugins/Weather/src/weather_data.cpp2
-rw-r--r--plugins/Weather/src/weather_popup.cpp4
-rw-r--r--plugins/Weather/src/weather_update.cpp2
-rw-r--r--plugins/Weather/src/weather_userinfo.cpp4
-rw-r--r--plugins/WebView/src/webview_alerts.cpp8
-rw-r--r--plugins/WhenWasIt/src/dlg_handlers.cpp4
-rw-r--r--plugins/WinterSpeak/src/DialogConfigActive.cpp4
-rw-r--r--plugins/XSoundNotify/src/dialog.cpp2
-rw-r--r--plugins/XSoundNotify/src/options.cpp2
-rw-r--r--plugins/YAMN/src/browser/mailbrowser.cpp2
-rw-r--r--plugins/YAPP/src/options.cpp2
-rw-r--r--plugins/YahooGroups/src/utils.cpp2
-rw-r--r--protocols/AimOscar/src/chat.cpp6
-rw-r--r--protocols/AimOscar/src/links.cpp2
-rw-r--r--protocols/AimOscar/src/server.cpp14
-rw-r--r--protocols/AimOscar/src/utility.cpp2
-rw-r--r--protocols/FacebookRM/src/chat.cpp6
-rw-r--r--protocols/FacebookRM/src/contacts.cpp6
-rw-r--r--protocols/FacebookRM/src/json.cpp6
-rw-r--r--protocols/FacebookRM/src/messages.cpp2
-rw-r--r--protocols/FacebookRM/src/proto.cpp6
-rw-r--r--protocols/Gadu-Gadu/src/core.cpp2
-rw-r--r--protocols/Gadu-Gadu/src/groupchat.cpp14
-rw-r--r--protocols/Gadu-Gadu/src/links.cpp2
-rw-r--r--protocols/Gadu-Gadu/src/services.cpp2
-rw-r--r--protocols/IRCG/src/clist.cpp8
-rw-r--r--protocols/IRCG/src/input.cpp4
-rw-r--r--protocols/IRCG/src/ui_utils.cpp4
-rw-r--r--protocols/IcqOscarJ/src/fam_03buddy.cpp2
-rw-r--r--protocols/IcqOscarJ/src/fam_04message.cpp8
-rw-r--r--protocols/IcqOscarJ/src/fam_13servclist.cpp2
-rw-r--r--protocols/IcqOscarJ/src/icq_proto.cpp4
-rw-r--r--protocols/IcqOscarJ/src/icq_servlist.cpp2
-rw-r--r--protocols/IcqOscarJ/src/icq_uploadui.cpp10
-rw-r--r--protocols/IcqOscarJ/src/utilities.cpp10
-rw-r--r--protocols/JabberG/src/jabber_chat.cpp12
-rw-r--r--protocols/JabberG/src/jabber_disco.cpp6
-rw-r--r--protocols/JabberG/src/jabber_iqid.cpp2
-rw-r--r--protocols/JabberG/src/jabber_proto.cpp4
-rw-r--r--protocols/JabberG/src/jabber_rc.cpp2
-rw-r--r--protocols/JabberG/src/jabber_svc.cpp4
-rw-r--r--protocols/JabberG/src/jabber_thread.cpp16
-rw-r--r--protocols/JabberG/src/jabber_xstatus.cpp2
-rw-r--r--protocols/JabberG/src/ui_utils.cpp4
-rw-r--r--protocols/MRA/src/MraChat.cpp4
-rw-r--r--protocols/MRA/src/MraConstans.h2
-rw-r--r--protocols/MRA/src/Mra_functions.cpp10
-rw-r--r--protocols/MRA/src/Mra_menus.cpp2
-rw-r--r--protocols/MRA/src/Mra_proto.cpp8
-rw-r--r--protocols/MSN/src/msn_chat.cpp6
-rw-r--r--protocols/MSN/src/msn_commands.cpp4
-rw-r--r--protocols/MSN/src/msn_contact.cpp2
-rw-r--r--protocols/MSN/src/msn_links.cpp6
-rw-r--r--protocols/MSN/src/msn_lists.cpp2
-rw-r--r--protocols/MSN/src/msn_mail.cpp4
-rw-r--r--protocols/MSN/src/msn_menu.cpp2
-rw-r--r--protocols/MSN/src/msn_misc.cpp6
-rw-r--r--protocols/MSN/src/msn_proto.cpp2
-rw-r--r--protocols/MSN/src/msn_svcs.cpp2
-rw-r--r--protocols/Skype/src/skype_contacts.cpp2
-rw-r--r--protocols/Skype/src/skype_dialogs.cpp2
-rw-r--r--protocols/Skype/src/skype_events.cpp2
-rw-r--r--protocols/Skype/src/skype_instances.cpp2
-rw-r--r--protocols/Skype/src/skype_proto.cpp4
-rw-r--r--protocols/SkypeClassic/src/contacts.cpp10
-rw-r--r--protocols/SkypeClassic/src/gchat.cpp16
-rw-r--r--protocols/SkypeClassic/src/skype.cpp26
-rw-r--r--protocols/SkypeClassic/src/skypeapi.cpp6
-rw-r--r--protocols/SkypeClassic/src/skypeopt.cpp2
-rw-r--r--protocols/SkypeClassic/src/voiceservice.cpp2
-rw-r--r--protocols/Tlen/src/tlen_iqid.cpp2
-rw-r--r--protocols/Tlen/src/tlen_thread.cpp4
-rw-r--r--protocols/Twitter/src/contacts.cpp4
-rw-r--r--protocols/VKontakte/src/vk_chats.cpp6
-rw-r--r--protocols/VKontakte/src/vk_thread.cpp2
-rw-r--r--protocols/Yahoo/src/im.cpp2
-rw-r--r--protocols/Yahoo/src/links.cpp2
-rw-r--r--protocols/Yahoo/src/yahoo.cpp4
-rw-r--r--src/core/stdauth/authdialogs.cpp2
-rw-r--r--src/core/stdfile/filerecvdlg.cpp2
-rw-r--r--src/core/stdmsg/src/globals.cpp2
-rw-r--r--src/core/stdmsg/src/msgoptions.cpp2
-rw-r--r--src/core/stdmsg/src/statusicon.cpp2
-rw-r--r--src/core/stduserinfo/stdinfo.cpp2
-rw-r--r--src/modules/addcontact/addcontact.cpp4
-rw-r--r--src/modules/chat/clist.cpp12
-rw-r--r--src/modules/clist/clistmod.cpp2
-rw-r--r--src/modules/clist/genmenu.cpp2
-rw-r--r--src/modules/clist/groups.cpp2
-rw-r--r--src/modules/extraicons/BaseExtraIcon.cpp2
-rw-r--r--src/modules/extraicons/CallbackExtraIcon.cpp2
-rw-r--r--src/modules/extraicons/extraicons.cpp4
-rw-r--r--src/modules/findadd/searchresults.cpp4
-rw-r--r--src/modules/ignore/ignore.cpp6
-rw-r--r--src/modules/protocols/protoint.cpp2
-rw-r--r--src/modules/utils/path.cpp4
-rw-r--r--src/modules/visibility/visibility.cpp4
242 files changed, 595 insertions, 595 deletions
diff --git a/include/m_message.h b/include/m_message.h
index cd16d59d58..f5ba26ea07 100644
--- a/include/m_message.h
+++ b/include/m_message.h
@@ -214,7 +214,7 @@ __forceinline void Srmm_RemoveIcon(StatusIconData *sid)
#define MS_MSG_MODIFYICON "MessageAPI/ModifyIcon"
__forceinline void Srmm_ModifyIcon(MCONTACT hContact, StatusIconData *sid)
-{ CallService(MS_MSG_MODIFYICON, (WPARAM)hContact, (LPARAM)sid);
+{ CallService(MS_MSG_MODIFYICON, hContact, (LPARAM)sid);
}
// wParam = (HANDLE)hContact
@@ -223,7 +223,7 @@ __forceinline void Srmm_ModifyIcon(MCONTACT hContact, StatusIconData *sid)
// don't free this memory.
__forceinline StatusIconData* Srmm_GetNthIcon(MCONTACT hContact, int index)
-{ return (StatusIconData*)CallService("MessageAPI/GetNthIcon", (WPARAM)hContact, index);
+{ return (StatusIconData*)CallService("MessageAPI/GetNthIcon", hContact, index);
}
// wParam = (HANDLE)hContact;
diff --git a/include/m_protocols.h b/include/m_protocols.h
index 041ea2b02b..52e6107e08 100644
--- a/include/m_protocols.h
+++ b/include/m_protocols.h
@@ -233,7 +233,7 @@ typedef struct {
#define MS_PROTO_GETCONTACTBASEPROTO "Proto/GetContactBaseProto"
__forceinline char* GetContactProto(MCONTACT hContact)
-{ return (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+{ return (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, hContact, 0);
}
//determines whether the specified contact has the given protocol in its chain
diff --git a/plugins/AVS/src/cache.cpp b/plugins/AVS/src/cache.cpp
index 56a443afab..472c03e1a2 100644
--- a/plugins/AVS/src/cache.cpp
+++ b/plugins/AVS/src/cache.cpp
@@ -151,7 +151,7 @@ void NotifyMetaAware(MCONTACT hContact, CacheNode *node = NULL, AVATARCACHEENTRY
if (ace == (AVATARCACHEENTRY *)-1)
ace = &node->ace;
- NotifyEventHooks(hEventChanged, (WPARAM)hContact, (LPARAM)ace);
+ NotifyEventHooks(hEventChanged, hContact, (LPARAM)ace);
if (g_MetaAvail && (node->dwFlags & MC_ISSUBCONTACT) && db_get_b(NULL, g_szMetaName, "Enabled", 0)) {
MCONTACT hMasterContact = (MCONTACT)db_get_dw(hContact, g_szMetaName, "Handle", 0);
@@ -192,7 +192,7 @@ void NotifyMetaAware(MCONTACT hContact, CacheNode *node = NULL, AVATARCACHEENTRY
NotifyEventHooks(hEventContactAvatarChanged, (WPARAM)cacn.hContact, (LPARAM)&cacn);
}
- else NotifyEventHooks(hEventContactAvatarChanged, (WPARAM)hContact, NULL);
+ else NotifyEventHooks(hEventContactAvatarChanged, hContact, NULL);
}
}
diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp
index 9b00e6be82..aa6531e167 100644
--- a/plugins/AVS/src/main.cpp
+++ b/plugins/AVS/src/main.cpp
@@ -144,7 +144,7 @@ static int MetaChanged(WPARAM hContact, LPARAM lParam)
}
else ace = &node->ace;
- NotifyEventHooks(hEventChanged, (WPARAM)hContact, (LPARAM)ace);
+ NotifyEventHooks(hEventChanged, hContact, (LPARAM)ace);
return 0;
}
diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp
index 6d28942e5c..4622f0d1b2 100644
--- a/plugins/AVS/src/options.cpp
+++ b/plugins/AVS/src/options.cpp
@@ -507,7 +507,7 @@ INT_PTR CALLBACK DlgProcAvatarOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
hContact = lParam;
TranslateDialogDefault(hwndDlg);
if (hContact) {
- szNick = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
+ szNick = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
mir_sntprintf(szTitle, 500, TranslateT("Set avatar options for %s"), szNick);
SetWindowText(hwndDlg, szTitle);
}
@@ -564,12 +564,12 @@ INT_PTR CALLBACK DlgProcAvatarOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
case IDC_PROTECTAVATAR:
{
BOOL locked = IsDlgButtonChecked(hwndDlg, IDC_PROTECTAVATAR);
- ProtectAvatar((WPARAM)hContact, locked ? 1 : 0);
+ ProtectAvatar(hContact, locked ? 1 : 0);
}
break;
case IDC_CHANGE:
- SetAvatar((WPARAM)hContact, 0);
+ SetAvatar(hContact, 0);
SendMessage(hwndDlg, DM_SETAVATARNAME, 0, 0);
CheckDlgButton(hwndDlg, IDC_PROTECTAVATAR, db_get_b(hContact, "ContactPhoto", "Locked", 0) ? TRUE : FALSE);
break;
@@ -598,7 +598,7 @@ INT_PTR CALLBACK DlgProcAvatarOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
char *szProto = GetContactProto(hContact);
DBVARIANT dbv = {0};
- ProtectAvatar((WPARAM)hContact, 0);
+ ProtectAvatar(hContact, 0);
if (MessageBox(0, TranslateT("Delete picture file from disk (may be necessary to force a reload, but will delete local pictures)?"), TranslateT("Reset contact picture"), MB_YESNO) == IDYES) {
if ( !db_get_ts(hContact, "ContactPhoto", "File", &dbv)) {
DeleteFile(dbv.ptszVal);
@@ -623,7 +623,7 @@ INT_PTR CALLBACK DlgProcAvatarOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
case IDC_DELETE:
{
DBVARIANT dbv = {0};
- ProtectAvatar((WPARAM)hContact, 0);
+ ProtectAvatar(hContact, 0);
if (MessageBox(0, TranslateT("Delete picture file from disk (may be necessary to force a reload, but will delete local pictures)?"), TranslateT("Reset contact picture"), MB_YESNO) == IDYES) {
if ( !db_get_ts(hContact, "ContactPhoto", "File", &dbv)) {
DeleteFile(dbv.ptszVal);
@@ -812,7 +812,7 @@ static INT_PTR CALLBACK DlgProcAvatarUserInfo(HWND hwndDlg, UINT msg, WPARAM wPa
break;
case IDC_CHANGE:
- SetAvatar((WPARAM)hContact, 0);
+ SetAvatar(hContact, 0);
SendMessage(hwndDlg, DM_SETAVATARNAME, 0, 0);
CheckDlgButton(hwndDlg, IDC_PROTECTAVATAR, db_get_b(hContact, "ContactPhoto", "Locked", 0) ? TRUE : FALSE);
break;
@@ -830,7 +830,7 @@ static INT_PTR CALLBACK DlgProcAvatarUserInfo(HWND hwndDlg, UINT msg, WPARAM wPa
{
BOOL locked = IsDlgButtonChecked(hwndDlg, IDC_PROTECTAVATAR);
SaveTransparentData(hwndDlg, hContact, locked);
- ProtectAvatar((WPARAM)hContact, locked ? 1 : 0);
+ ProtectAvatar(hContact, locked ? 1 : 0);
break;
}
@@ -856,7 +856,7 @@ static INT_PTR CALLBACK DlgProcAvatarUserInfo(HWND hwndDlg, UINT msg, WPARAM wPa
char *szProto = GetContactProto(hContact);
DBVARIANT dbv = {0};
- ProtectAvatar((WPARAM)hContact, 0);
+ ProtectAvatar(hContact, 0);
if (MessageBox(0, TranslateT("Delete picture file from disk (may be necessary to force a reload, but will delete local pictures)?"), TranslateT("Reset contact picture"), MB_YESNO) == IDYES) {
if ( !db_get_ts(hContact, "ContactPhoto", "File", &dbv)) {
DeleteFile(dbv.ptszVal);
@@ -879,7 +879,7 @@ static INT_PTR CALLBACK DlgProcAvatarUserInfo(HWND hwndDlg, UINT msg, WPARAM wPa
{
DBVARIANT dbv = {0};
- ProtectAvatar((WPARAM)hContact, 0);
+ ProtectAvatar(hContact, 0);
if (MessageBox(0, TranslateT("Delete picture file from disk (may be necessary to force a reload, but will delete local pictures)?"), TranslateT("Reset contact picture"), MB_YESNO) == IDYES) {
if ( !db_get_ts(hContact, "ContactPhoto", "File", &dbv)) {
DeleteFile(dbv.ptszVal);
diff --git a/plugins/AVS/src/utils.cpp b/plugins/AVS/src/utils.cpp
index 35bebb621b..721d93282e 100644
--- a/plugins/AVS/src/utils.cpp
+++ b/plugins/AVS/src/utils.cpp
@@ -47,7 +47,7 @@ int _DebugTrace(MCONTACT hContact, const char *fmt, ...)
char *proto = NULL;
if (hContact != NULL)
{
- name = (char*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, 0);
+ name = (char*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, 0);
proto = GetContactProto(hContact);
}
@@ -514,7 +514,7 @@ MCONTACT GetContactThatHaveTheAvatar(MCONTACT hContact, int locked)
locked = db_get_b(hContact, "ContactPhoto", "Locked", 0);
if (!locked)
- hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0);
}
}
return hContact;
diff --git a/plugins/AddContactPlus/src/addcontact.cpp b/plugins/AddContactPlus/src/addcontact.cpp
index 6b0e2e99f3..bc33ab425e 100644
--- a/plugins/AddContactPlus/src/addcontact.cpp
+++ b/plugins/AddContactPlus/src/addcontact.cpp
@@ -282,7 +282,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp
int item = SendDlgItemMessage(hdlg, IDC_GROUP, CB_GETCURSEL, 0, 0);
if (item > 0) {
item = SendDlgItemMessage(hdlg, IDC_GROUP, CB_GETITEMDATA, item, 0);
- CallService(MS_CLIST_CONTACTCHANGEGROUP, (WPARAM)hContact, item);
+ CallService(MS_CLIST_CONTACTCHANGEGROUP, hContact, item);
}
if (!IsDlgButtonChecked(hdlg, IDC_ADDTEMP)) {
@@ -304,7 +304,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp
}
if (GetAsyncKeyState(VK_CONTROL))
- CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, (LPARAM)(const char*)NULL);
+ CallService(MS_MSG_SENDMESSAGE, hContact, (LPARAM)(const char*)NULL);
}
// fall through
case IDCANCEL:
diff --git a/plugins/Alarms/src/alarms.cpp b/plugins/Alarms/src/alarms.cpp
index eecc9c8bc9..a7e8e391bb 100644
--- a/plugins/Alarms/src/alarms.cpp
+++ b/plugins/Alarms/src/alarms.cpp
@@ -67,7 +67,7 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA
void ShowPopup(MCONTACT hContact, const TCHAR *msg)
{
if (ServiceExists(MS_POPUP_ADDPOPUPT)) {
- TCHAR *lpzContactName = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
+ TCHAR *lpzContactName = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
POPUPDATAT ppd = { 0 };
ppd.lchContact = hContact; //Be sure to use a GOOD handle, since this will not be checked.
diff --git a/plugins/AssocMgr/src/test.cpp b/plugins/AssocMgr/src/test.cpp
index 5031919711..924e215c11 100644
--- a/plugins/AssocMgr/src/test.cpp
+++ b/plugins/AssocMgr/src/test.cpp
@@ -145,7 +145,7 @@ static int ServiceParseAimLink(WPARAM wParam,LPARAM lParam)
db_set_b(hContact,MOD_KEY_CL,AIM_KEY_NL,1);
}
if(hContact!=NULL)
- CallService(MS_MSG_SENDMESSAGE,(WPARAM)hContact,(LPARAM)msg);
+ CallService(MS_MSG_SENDMESSAGE,hContact,(LPARAM)msg);
}
return 0;
}
@@ -304,7 +304,7 @@ static void MessageIcqUser(ICQFILEINFO *info)
if(ServiceExists(MS_MSG_SENDMESSAGE)) {
hContact=HContactFromUIN(atoi(info->uin),NULL); /* adds the contact if needed */
if(hContact!=NULL)
- CallService(MS_MSG_SENDMESSAGE,(WPARAM)hContact,0);
+ CallService(MS_MSG_SENDMESSAGE,hContact,0);
}
}
@@ -458,7 +458,7 @@ static int ServiceParseYmsgrLink(WPARAM wParam,LPARAM lParam)
if(ServiceExists(MS_MSG_SENDMESSAGE)) { /* does not yet check if sn is current user */
hContact=add_buddy(id,id,PALF_TEMPORARY); /* ensure contact is on list */
if(hContact!=NULL)
- CallService(MS_MSG_SENDMESSAGE,(WPARAM)hContact,(LPARAM)msg);
+ CallService(MS_MSG_SENDMESSAGE,hContact,(LPARAM)msg);
}
return 0;
}
@@ -575,7 +575,7 @@ static int ServiceParseMsnimLink(WPARAM wParam,LPARAM lParam)
if(ServiceExists(MS_MSG_SENDMESSAGE)) {
hContact=MSN_HContactFromEmail(email,email,TRUE,TRUE); /* does not yet check if email is current user */
if(hContact!=NULL)
- CallService(MS_MSG_SENDMESSAGE,(WPARAM)hContact,0);
+ CallService(MS_MSG_SENDMESSAGE,hContact,0);
}
return 0;
}
@@ -641,7 +641,7 @@ static int ServiceParseLink(WPARAM wParam,LPARAM lParam)
if(ServiceExists(MS_MSG_SENDMESSAGE)) {
hContact=gg_getcontact(atoi(arg),TRUE,FALSE,arg);
if(hContact!=NULL)
- CallService(MS_MSG_SENDMESSAGE,(WPARAM)hContact,0);
+ CallService(MS_MSG_SENDMESSAGE,hContact,0);
}
}
return 0;
@@ -733,7 +733,7 @@ static int ServiceParseXmppURI(WPARAM wParam,LPARAM lParam)
body=msg;
} else if(body==NULL) body=subj;
if(hContact!=NULL)
- CallService(MS_MSG_SENDMESSAGE,(WPARAM)hContact,(LPARAM)body);
+ CallService(MS_MSG_SENDMESSAGE,hContact,(LPARAM)body);
}
return 0;
}
@@ -757,7 +757,7 @@ static int ServiceParseXmppURI(WPARAM wParam,LPARAM lParam)
MCONTACT hContact;
hContact=JabberHContactFromJID(jid);
if(hContact==NULL) /* not yet implemented: show standard miranda dialog here */
- CallService(MS_DB_CONTACT_DELETE,(WPARAM)hContact,0);
+ CallService(MS_DB_CONTACT_DELETE,hContact,0);
return 0;
}
/* add user subscription */
diff --git a/plugins/AuthState/src/main.cpp b/plugins/AuthState/src/main.cpp
index f8498223b6..6d2223af71 100644
--- a/plugins/AuthState/src/main.cpp
+++ b/plugins/AuthState/src/main.cpp
@@ -173,7 +173,7 @@ int onModulesLoaded(WPARAM wParam,LPARAM lParam)
// Set initial value for all contacts
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
- onExtraImageApplying((WPARAM)hContact, 1);
+ onExtraImageApplying(hContact, 1);
hOptInitialise = HookEvent(ME_OPT_INITIALISE, onOptInitialise);
if (bContactMenuItem)
diff --git a/plugins/AuthState/src/options.cpp b/plugins/AuthState/src/options.cpp
index 9e1f972f55..fafd1d115b 100644
--- a/plugins/AuthState/src/options.cpp
+++ b/plugins/AuthState/src/options.cpp
@@ -56,7 +56,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
bIconsForRecentContacts = IsDlgButtonChecked(hwndDlg, IDC_ICONSFORRECENT);
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
- onExtraImageApplying((WPARAM)hContact,0);
+ onExtraImageApplying(hContact,0);
//Store options values to DB
db_set_b(NULL, MODULENAME, "EnableAuthIcon", bUseAuthIcon);
diff --git a/plugins/AvatarHistory/src/AvatarDlg.cpp b/plugins/AvatarHistory/src/AvatarDlg.cpp
index 86fad5edce..da042e79e4 100644
--- a/plugins/AvatarHistory/src/AvatarDlg.cpp
+++ b/plugins/AvatarHistory/src/AvatarDlg.cpp
@@ -556,7 +556,7 @@ int ShowSaveDialog(HWND hwnd, TCHAR* fn, MCONTACT hContact)
lstrcpyn(file, _tcsrchr(fn, '\\')+1, sizeof(file));
ofn.lpstrFile = file;
- TCHAR *displayName = (TCHAR*) CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,GCDNF_TCHAR);
+ TCHAR *displayName = (TCHAR*) CallService(MS_CLIST_GETCONTACTDISPLAYNAME,hContact,GCDNF_TCHAR);
if (displayName)
{
TCHAR title[MAX_PATH];
diff --git a/plugins/AvatarHistory/src/popup.cpp b/plugins/AvatarHistory/src/popup.cpp
index af2de3d9ad..97e7c594b4 100644
--- a/plugins/AvatarHistory/src/popup.cpp
+++ b/plugins/AvatarHistory/src/popup.cpp
@@ -107,7 +107,7 @@ void ShowPopupEx(MCONTACT hContact, const TCHAR *title, const TCHAR *description
if (title != NULL)
lstrcpyn(ppd.lptzContactName, title, SIZEOF(ppd.lptzContactName));
else if (hContact != NULL)
- lstrcpyn(ppd.lptzContactName, (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR),
+ lstrcpyn(ppd.lptzContactName, (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR),
SIZEOF(ppd.lptzContactName));
if (description != NULL)
@@ -174,7 +174,7 @@ void ShowPopupEx(MCONTACT hContact, const TCHAR *title, const TCHAR *description
}
else
{
- MessageBox(NULL, description, title ? title : (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR),
+ MessageBox(NULL, description, title ? title : (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR),
MB_OK);
}
diff --git a/plugins/BasicHistory/src/EventList.cpp b/plugins/BasicHistory/src/EventList.cpp
index d0f63d679e..420d25072a 100644
--- a/plugins/BasicHistory/src/EventList.cpp
+++ b/plugins/BasicHistory/src/EventList.cpp
@@ -433,7 +433,7 @@ std::wstring EventList::GetMyName()
inline std::wstring GetProtocolName(MCONTACT hContact)
{
- char* ac = (char *)CallService(MS_PROTO_GETCONTACTBASEACCOUNT, (WPARAM)hContact, 0);
+ char* ac = (char *)CallService(MS_PROTO_GETCONTACTBASEACCOUNT, hContact, 0);
std::wstring proto1;
if (ac != NULL) {
PROTOACCOUNT* acnt = ProtoGetAccount(ac);
diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp
index e14e778552..19b39af3bf 100644
--- a/plugins/BasicHistory/src/HistoryWindow.cpp
+++ b/plugins/BasicHistory/src/HistoryWindow.cpp
@@ -1668,7 +1668,7 @@ void HistoryWindow::ReloadContacts()
}
if (hContact != NULL) {
- HANDLE hItem = (HANDLE)SendMessage(contactList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendMessage(contactList, CLM_FINDCONTACT, hContact, 0);
if (hItem != NULL) {
SendMessage(contactList, CLM_ENSUREVISIBLE, (WPARAM)hItem, 0);
SendMessage(contactList, CLM_SELECTITEM, (WPARAM)hItem, 0);
@@ -2130,7 +2130,7 @@ void HistoryWindow::Delete(int what)
toDelete = (int)end;
}
else {
- DeleteAllUserHistory((WPARAM)hContact, 0);
+ DeleteAllUserHistory(hContact, 0);
return;
}
diff --git a/plugins/Boltun/src/actionQueue.cpp b/plugins/Boltun/src/actionQueue.cpp
index 1c3bf5a25c..ac7e76c06e 100644
--- a/plugins/Boltun/src/actionQueue.cpp
+++ b/plugins/Boltun/src/actionQueue.cpp
@@ -120,7 +120,7 @@ static void TimerAnswer(MCONTACT hContact, const TalkBot::MessageInfo* info)
static void StartTyping(MCONTACT hContact, const TalkBot::MessageInfo*)
{
- CallService(MS_PROTO_SELFISTYPING, (WPARAM)hContact,
+ CallService(MS_PROTO_SELFISTYPING, hContact,
(LPARAM)PROTOTYPE_SELFTYPING_ON);
typingContactsLock.Enter();
typingContacts.insert(hContact);
@@ -192,7 +192,7 @@ void DoAnswer(MCONTACT hContact, const TalkBot::MessageInfo *info, bool sticky =
typingContactsLock.Enter();
if (typingContacts.find(hContact) != typingContacts.end())
{
- CallService(MS_PROTO_SELFISTYPING, (WPARAM)hContact, (LPARAM)PROTOTYPE_SELFTYPING_OFF);
+ CallService(MS_PROTO_SELFISTYPING, hContact, (LPARAM)PROTOTYPE_SELFTYPING_OFF);
typingContacts.erase(hContact);
}
typingContactsLock.Leave();
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
index 6bea40587e..23b3aa2bd2 100644
--- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp
+++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
@@ -233,7 +233,7 @@ bool isContactGoneFor(MCONTACT hContact, int days)
ppd.lchIcon = Skin_GetIcon("enabled_icon");
mir_sntprintf(ppd.lptzContactName, MAX_CONTACTNAME, TranslateT("Hiding %s (%S)"),
- CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR),
+ CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR),
GetContactProto(hContact));
mir_sntprintf(ppd.lptzText, MAX_SECONDLINE, TranslateT("%d days since last message"), daysSinceMessage);
@@ -269,7 +269,7 @@ void ReturnNotify(MCONTACT hContact, TCHAR *message)
POPUPDATAT ppd = { 0 };
ppd.lchContact = hContact;
ppd.lchIcon = hIcon;
- _tcsncpy(ppd.lptzContactName, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,GCDNF_TCHAR), MAX_CONTACTNAME);
+ _tcsncpy(ppd.lptzContactName, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,hContact,GCDNF_TCHAR), MAX_CONTACTNAME);
_tcsncpy(ppd.lptzText, message, MAX_SECONDLINE);
if (!options.iUsePopupColors) {
ppd.colorBack = options.iPopupColorBack;
@@ -288,7 +288,7 @@ void ReturnNotify(MCONTACT hContact, TCHAR *message)
cle.pszService = "BuddyExpectator/actionReturned";
cle.flags = CLEF_TCHAR;
- TCHAR* nick = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,GCDNF_TCHAR);
+ TCHAR* nick = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,hContact,GCDNF_TCHAR);
TCHAR tmpMsg[512];
mir_sntprintf(tmpMsg, 512, _T("%s %s"), nick, message);
cle.ptszTooltip = tmpMsg;
@@ -307,7 +307,7 @@ void GoneNotify(MCONTACT hContact, TCHAR *message)
POPUPDATAT ppd = {0};
ppd.lchContact = hContact;
ppd.lchIcon = hIcon;
- _tcsncpy(ppd.lptzContactName, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,GCDNF_TCHAR), MAX_CONTACTNAME);
+ _tcsncpy(ppd.lptzContactName, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,hContact,GCDNF_TCHAR), MAX_CONTACTNAME);
_tcsncpy(ppd.lptzText, message, MAX_SECONDLINE);
if (!options.iUsePopupColors) {
ppd.colorBack = options.iPopupColorBack;
@@ -326,7 +326,7 @@ void GoneNotify(MCONTACT hContact, TCHAR *message)
cle.hIcon = hIcon;
cle.pszService = "BuddyExpectator/actionStillAbsent";
- TCHAR* nick = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,GCDNF_TCHAR);
+ TCHAR* nick = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,hContact,GCDNF_TCHAR);
TCHAR tmpMsg[512];
mir_sntprintf(tmpMsg, 512, _T("%s %s"), nick, message);
cle.ptszTooltip = tmpMsg;
@@ -350,7 +350,7 @@ INT_PTR MissYouAction(WPARAM wParam, LPARAM lParam)
}
else hContact = wParam;
- CallService(MS_MSG_SENDMESSAGET, (WPARAM)hContact, 0);
+ CallService(MS_MSG_SENDMESSAGET, hContact, 0);
return 0;
}
@@ -369,10 +369,10 @@ INT_PTR ContactReturnedAction(WPARAM wParam, LPARAM lParam)
else hContact = wParam;
if (options.iShowMessageWindow>0)
- CallService(MS_MSG_SENDMESSAGET, (WPARAM)hContact, 0);
+ CallService(MS_MSG_SENDMESSAGET, hContact, 0);
if (options.iShowUDetails>0)
- CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)hContact, 0);
+ CallService(MS_USERINFO_SHOWDIALOG, hContact, 0);
setLastSeen(hContact);
return 0;
@@ -394,13 +394,13 @@ INT_PTR ContactStillAbsentAction(WPARAM wParam, LPARAM lParam)
switch (options.action2) {
case GCA_DELETE:
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
+ CallService(MS_DB_CONTACT_DELETE, hContact, 0);
break;
case GCA_UDETAILS:
- CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)hContact, 0);
+ CallService(MS_USERINFO_SHOWDIALOG, hContact, 0);
break;
case GCA_MESSAGE:
- CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
+ CallService(MS_MSG_SENDMESSAGE, hContact, 0);
break;
case GCA_NOACTION:
break;
@@ -505,7 +505,7 @@ int SettingChanged(WPARAM wParam, LPARAM lParam)
ppd.lchContact = hContact;
ppd.lchIcon = Skin_GetIcon("enabled_icon");
- _tcsncpy(ppd.lptzContactName, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,GCDNF_TCHAR), MAX_CONTACTNAME);
+ _tcsncpy(ppd.lptzContactName, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,hContact,GCDNF_TCHAR), MAX_CONTACTNAME);
_tcsncpy(ppd.lptzText, TranslateT("You awaited this contact!"), MAX_SECONDLINE);
if (!options.iUsePopupColors) {
ppd.colorBack = options.iPopupColorBack;
diff --git a/plugins/BuddyPounce/src/dialog.cpp b/plugins/BuddyPounce/src/dialog.cpp
index 3e7ccc182e..fee3cd0523 100644
--- a/plugins/BuddyPounce/src/dialog.cpp
+++ b/plugins/BuddyPounce/src/dialog.cpp
@@ -16,7 +16,7 @@ void populateContacts(MCONTACT BPhContact, HWND hwnd2CB)
char *szProto = GetContactProto(hContact);
if (szProto && (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM)) {
TCHAR name[300];
- mir_sntprintf(name, SIZEOF(name), _T("%s (%s)"), CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR), _A2T(szProto));
+ mir_sntprintf(name, SIZEOF(name), _T("%s (%s)"), CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR), _A2T(szProto));
int index = SendMessage(hwnd2CB, CB_ADDSTRING, 0, (LPARAM)name);
SendMessage(hwnd2CB, CB_SETITEMDATA, index, (LPARAM)hContact);
if (BPhContact == hContact)
@@ -613,12 +613,12 @@ void CreateMessageAcknowlegedWindow(MCONTACT hContact, int SentSuccess)
HWND hwnd = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_CONFIRMSEND), 0, PounceSentDlgProc, (LPARAM)hContact);
TCHAR msg[256];
if (SentSuccess) {
- mir_sntprintf(msg, SIZEOF(msg), TranslateT("Message successfully sent to %s"), CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR));
+ mir_sntprintf(msg, SIZEOF(msg), TranslateT("Message successfully sent to %s"), CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR));
SetWindowText(GetDlgItem(hwnd, IDOK), TranslateT("OK"));
ShowWindow(GetDlgItem(hwnd, IDCANCEL), 0);
}
else {
- mir_sntprintf(msg, SIZEOF(msg), TranslateT("Message failed to send to %s"), CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR));
+ mir_sntprintf(msg, SIZEOF(msg), TranslateT("Message failed to send to %s"), CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR));
SetWindowText(GetDlgItem(hwnd, IDOK), TranslateT("Retry"));
}
SetWindowText(GetDlgItem(hwnd, LBL_CONTACT), msg);
diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp
index dbff32ad1f..ba13bc78d9 100644
--- a/plugins/BuddyPounce/src/main.cpp
+++ b/plugins/BuddyPounce/src/main.cpp
@@ -226,7 +226,7 @@ INT_PTR AddToPounce(WPARAM wParam, LPARAM lParam)
mir_free(newPounce);
db_free(&dbv);
}
- else AddSimpleMessage((WPARAM)hContact, (LPARAM)message);
+ else AddSimpleMessage(hContact, (LPARAM)message);
return 0;
}
diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
index 5df2197e37..178c252ea9 100644
--- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
+++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
@@ -87,7 +87,7 @@ void Popup_DoAction(HWND hWnd, BYTE Action, PLUGIN_DATA *pdata)
switch (Action) {
case PCA_OPENMESSAGEWND: // open message window
if (hContact && hContact != INVALID_CONTACT_ID)
- CallServiceSync(ServiceExists("SRMsg/LaunchMessageWindow") ? "SRMsg/LaunchMessageWindow" : MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
+ CallServiceSync(ServiceExists("SRMsg/LaunchMessageWindow") ? "SRMsg/LaunchMessageWindow" : MS_MSG_SENDMESSAGE, hContact, 0);
break;
case PCA_OPENMENU: // open contact menu
@@ -97,12 +97,12 @@ void Popup_DoAction(HWND hWnd, BYTE Action, PLUGIN_DATA *pdata)
case PCA_OPENDETAILS: // open contact details window
if (hContact != INVALID_CONTACT_ID)
- CallServiceSync(MS_USERINFO_SHOWDIALOG, (WPARAM)hContact, 0);
+ CallServiceSync(MS_USERINFO_SHOWDIALOG, hContact, 0);
break;
case PCA_OPENHISTORY: // open contact history
if (hContact != INVALID_CONTACT_ID)
- CallServiceSync(MS_HISTORY_SHOWCONTACTHISTORY, (WPARAM)hContact, 0);
+ CallServiceSync(MS_HISTORY_SHOWCONTACTHISTORY, hContact, 0);
break;
case PCA_OPENLOG: // open log file
@@ -230,7 +230,7 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam)
PopupOptPage.DBToMem();
}
- MCONTACT hContactOrMeta = (hContact && bMetaContactsExists) ? (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0) : hContact;
+ MCONTACT hContactOrMeta = (hContact && bMetaContactsExists) ? (MCONTACT)CallService(MS_MC_GETMETACONTACT, hContact, 0) : hContact;
if (!hContactOrMeta)
hContactOrMeta = hContact;
@@ -286,7 +286,7 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam)
if (uid && (INT_PTR)uid != CALLSERVICE_NOTFOUND)
szUID = DBGetContactSettingAsString(hContact, szProto, uid, _T(""));
- logservice_log(LOG_ID, hContact, TCString((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR)) + _T(" (") + szUID + TranslateT(") changed client to ") + ClientName);
+ logservice_log(LOG_ID, hContact, TCString((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)) + _T(" (") + szUID + TranslateT(") changed client to ") + ClientName);
}
}
_ASSERT(sd.MirVer.GetLen()); // save the last known MirVer value even if the new one is empty
diff --git a/plugins/Clist_modern/src/modern_clistsettings.cpp b/plugins/Clist_modern/src/modern_clistsettings.cpp
index 5db5e9857f..bf06c8efda 100644
--- a/plugins/Clist_modern/src/modern_clistsettings.cpp
+++ b/plugins/Clist_modern/src/modern_clistsettings.cpp
@@ -356,7 +356,7 @@ char *GetContactCachedProtocol(MCONTACT hContact)
char* GetProtoForContact(MCONTACT hContact)
{
- return (char*)CallService(MS_PROTO_GETCONTACTBASEACCOUNT,(WPARAM)hContact,0);
+ return (char*)CallService(MS_PROTO_GETCONTACTBASEACCOUNT,hContact,0);
}
int GetStatusForContact(MCONTACT hContact,char *szProto)
diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp
index 135448605c..2dc289494b 100644
--- a/plugins/Clist_modern/src/modern_viewmodebar.cpp
+++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp
@@ -167,7 +167,7 @@ static void ShowPage(HWND hwnd, int page)
static int UpdateClistItem(MCONTACT hContact, DWORD mask)
{
for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++)
- SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_SETEXTRAIMAGE, (WPARAM)hContact, MAKELONG(i - ID_STATUS_OFFLINE,
+ SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_SETEXTRAIMAGE, hContact, MAKELONG(i - ID_STATUS_OFFLINE,
(1 << (i - ID_STATUS_OFFLINE)) & mask ? i - ID_STATUS_OFFLINE : nullImage));
return 0;
@@ -189,7 +189,7 @@ static void UpdateStickies()
int i;
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- MCONTACT hItem = (MCONTACT)SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ MCONTACT hItem = (MCONTACT)SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem)
SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, (BYTE)db_get_dw(hContact, CLVM_MODULE, g_szModename, 0) ? 1 : 0);
localMask = HIWORD(db_get_dw(hContact, CLVM_MODULE, g_szModename, 0));
@@ -451,7 +451,7 @@ void SaveState()
DWORD dwGlobalMask = GetMaskForItem(hInfoItem);
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE)SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem == NULL)
continue;
@@ -845,7 +845,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP
case IDC_CLEARALL:
{
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem)
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, 0);
}
diff --git a/plugins/Clist_mw/src/clcitems.cpp b/plugins/Clist_mw/src/clcitems.cpp
index 5bccc89885..703ae72ad4 100644
--- a/plugins/Clist_mw/src/clcitems.cpp
+++ b/plugins/Clist_mw/src/clcitems.cpp
@@ -135,7 +135,7 @@ static struct ClcContact* AddContactToGroup(struct ClcData *dat,ClcGroup *group,
group->cl.items[i]->subcontacts = NULL;
if (ProtoServiceExists(cacheEntry->szProto, PS_GETADVANCEDSTATUSICON))
- img = ProtoCallService(cacheEntry->szProto, PS_GETADVANCEDSTATUSICON, (WPARAM)hContact, 0);
+ img = ProtoCallService(cacheEntry->szProto, PS_GETADVANCEDSTATUSICON, hContact, 0);
if (img == -1 || !(LOWORD(img)))
img = pcli->pfnGetContactIcon(hContact);
diff --git a/plugins/Clist_mw/src/contact.cpp b/plugins/Clist_mw/src/contact.cpp
index 1f24968256..4f2fe4b3d7 100644
--- a/plugins/Clist_mw/src/contact.cpp
+++ b/plugins/Clist_mw/src/contact.cpp
@@ -63,8 +63,8 @@ static int GetContactStatus(MCONTACT hContact)
void ChangeContactIcon(MCONTACT hContact,int iIcon,int add)
{
//clui MS_CLUI_CONTACTADDED MS_CLUI_CONTACTSETICON this methods is null
- //CallService(add?MS_CLUI_CONTACTADDED:MS_CLUI_CONTACTSETICON,(WPARAM)hContact,iIcon);
- NotifyEventHooks(hContactIconChangedEvent,(WPARAM)hContact,iIcon);
+ //CallService(add?MS_CLUI_CONTACTADDED:MS_CLUI_CONTACTSETICON,hContact,iIcon);
+ NotifyEventHooks(hContactIconChangedEvent,hContact,iIcon);
}
static int GetStatusModeOrdering(int statusMode)
diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp
index 9f3f15c3bf..f9550d81c4 100644
--- a/plugins/Clist_nicer/src/clc.cpp
+++ b/plugins/Clist_nicer/src/clc.cpp
@@ -582,7 +582,7 @@ LBL_Def:
if (contact) {
if (ProtoServiceExists(szProto, PS_GETADVANCEDSTATUSICON)) {
- int iconId = ProtoCallService(szProto, PS_GETADVANCEDSTATUSICON, (WPARAM)hContact, 0);
+ int iconId = ProtoCallService(szProto, PS_GETADVANCEDSTATUSICON, hContact, 0);
if (iconId != -1)
contact->xStatusIcon = iconId >> 16;
}
diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp
index 856dfe77e7..421e588307 100644
--- a/plugins/Clist_nicer/src/clcitems.cpp
+++ b/plugins/Clist_nicer/src/clcitems.cpp
@@ -105,7 +105,7 @@ int AddContactToGroup(struct ClcData *dat, ClcGroup *group, MCONTACT hContact)
else
p->bIsMeta = FALSE;
if (p->bIsMeta && cfg::dat.bMetaAvail && !(cfg::dat.dwFlags & CLUI_USEMETAICONS)) {
- p->hSubContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ p->hSubContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0);
p->metaProto = GetContactProto(p->hSubContact);
p->iImage = pcli->pfnGetContactIcon(p->hSubContact);
}
@@ -266,11 +266,11 @@ BYTE GetCachedStatusMsg(TExtraCache *p, char *szProto)
CUSTOM_STATUS cst = { sizeof(cst) };
cst.flags = CSSF_MASK_STATUS;
cst.status = &xStatus;
- if (ProtoServiceExists(szProto, PS_GETCUSTOMSTATUSEX) && !ProtoCallService(szProto, PS_GETCUSTOMSTATUSEX, (WPARAM)hContact, (LPARAM)&cst) && xStatus > 0) {
+ if (ProtoServiceExists(szProto, PS_GETCUSTOMSTATUSEX) && !ProtoCallService(szProto, PS_GETCUSTOMSTATUSEX, hContact, (LPARAM)&cst) && xStatus > 0) {
cst.flags = CSSF_MASK_NAME | CSSF_DEFAULT_NAME | CSSF_TCHAR;
cst.wParam = &xStatus2;
cst.ptszName = xStatusName;
- if ( !CallProtoService(szProto, PS_GETCUSTOMSTATUSEX, (WPARAM)hContact, (LPARAM)&cst)) {
+ if ( !CallProtoService(szProto, PS_GETCUSTOMSTATUSEX, hContact, (LPARAM)&cst)) {
TCHAR *szwXstatusName = TranslateTS(xStatusName);
p->statusMsg = (TCHAR *)realloc(p->statusMsg, (lstrlen(szwXstatusName) + 2) * sizeof(TCHAR));
_tcsncpy(p->statusMsg, szwXstatusName, lstrlen(szwXstatusName) + 1);
diff --git a/plugins/Clist_nicer/src/clistevents.cpp b/plugins/Clist_nicer/src/clistevents.cpp
index 613936a45d..56ac5500b9 100644
--- a/plugins/Clist_nicer/src/clistevents.cpp
+++ b/plugins/Clist_nicer/src/clistevents.cpp
@@ -375,10 +375,10 @@ int RemoveEvent(MCONTACT hContact, HANDLE hDbEvent)
if (bUnstick) {
// clear "sticky" (sort) status
- hItem = (HANDLE)SendMessage(pcli->hwndContactTree, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ hItem = (HANDLE)SendMessage(pcli->hwndContactTree, CLM_FINDCONTACT, hContact, 0);
if (hItem) {
SendMessage(pcli->hwndContactTree, CLM_SETSTICKY, (WPARAM) hItem, 0);
- pcli->pfnClcBroadcast(INTM_PROTOCHANGED, (WPARAM)hContact, 0);
+ pcli->pfnClcBroadcast(INTM_PROTOCHANGED, hContact, 0);
} }
if (hContact == cfg::dat.hUpdateContact || (INT_PTR)hDbEvent == 1)
diff --git a/plugins/Clist_nicer/src/clistmenus.cpp b/plugins/Clist_nicer/src/clistmenus.cpp
index c71996de4c..74498cab6a 100644
--- a/plugins/Clist_nicer/src/clistmenus.cpp
+++ b/plugins/Clist_nicer/src/clistmenus.cpp
@@ -81,7 +81,7 @@ static INT_PTR CALLBACK IgnoreDialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPA
hContact = lParam;
SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)hContact);
dwMask = cfg::getDword(hContact, "Ignore", "Mask1", 0);
- SendMessage(hWnd, WM_USER + 100, (WPARAM)hContact, dwMask);
+ SendMessage(hWnd, WM_USER + 100, hContact, dwMask);
SendMessage(hWnd, WM_USER + 120, 0, 0);
TranslateDialogDefault(hWnd);
hwndAdd = GetDlgItem(hWnd, IDC_IGN_ADDPERMANENTLY); // CreateWindowEx(0, _T("CLCButtonClass"), _T("FOO"), WS_VISIBLE | BS_PUSHBUTTON | WS_CHILD | WS_TABSTOP, 200, 276, 106, 24, hWnd, (HMENU)IDC_IGN_ADDPERMANENTLY, g_hInst, NULL);
@@ -121,7 +121,7 @@ static INT_PTR CALLBACK IgnoreDialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPA
DWORD dwXMask = cfg::getDword(hContact, "CList", "CLN_xmask", 0);
int i = 0;
- mir_sntprintf(szTitle, 512, TranslateT("Contact list display and ignore options for %s"), contact ? contact->szText : (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR));
+ mir_sntprintf(szTitle, 512, TranslateT("Contact list display and ignore options for %s"), contact ? contact->szText : (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR));
SetWindowText(hWnd, szTitle);
SendMessage(hWnd, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinnedIcon(SKINICON_OTHER_MIRANDA));
@@ -167,13 +167,13 @@ static INT_PTR CALLBACK IgnoreDialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPA
case WM_COMMAND:
switch(LOWORD(wParam)) {
case IDC_IGN_PRIORITY:
- SendMessage(pcli->hwndContactTree, CLM_TOGGLEPRIORITYCONTACT, (WPARAM)hContact, 0);
+ SendMessage(pcli->hwndContactTree, CLM_TOGGLEPRIORITYCONTACT, hContact, 0);
return 0;
case IDC_IGN_ALL:
- SendMessage(hWnd, WM_USER + 100, (WPARAM)hContact, (LPARAM)0xffffffff);
+ SendMessage(hWnd, WM_USER + 100, hContact, (LPARAM)0xffffffff);
return 0;
case IDC_IGN_NONE:
- SendMessage(hWnd, WM_USER + 100, (WPARAM)hContact, 0);
+ SendMessage(hWnd, WM_USER + 100, hContact, 0);
return 0;
case IDC_IGN_ALWAYSONLINE:
if (IsDlgButtonChecked(hWnd, IDC_IGN_ALWAYSONLINE))
diff --git a/plugins/Clist_nicer/src/clistmod.cpp b/plugins/Clist_nicer/src/clistmod.cpp
index 2a838b39dc..74bb93ffad 100644
--- a/plugins/Clist_nicer/src/clistmod.cpp
+++ b/plugins/Clist_nicer/src/clistmod.cpp
@@ -55,7 +55,7 @@ int IconFromStatusMode(const char *szProto, int status, MCONTACT hContact, HICON
int finalStatus;
if (szProto != NULL && !strcmp(szProto, cfg::dat.szMetaName) && cfg::dat.bMetaAvail && hContact != 0 && !(cfg::dat.dwFlags & CLUI_USEMETAICONS)) {
- MCONTACT hSubContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ MCONTACT hSubContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0);
szFinalProto = GetContactProto(hSubContact);
finalStatus = (status == 0) ? (WORD) cfg::getWord(hSubContact, szFinalProto, "Status", ID_STATUS_OFFLINE) : status;
hContact = hSubContact;
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp
index 5772d3a0a4..763cb363cb 100644
--- a/plugins/Clist_nicer/src/clui.cpp
+++ b/plugins/Clist_nicer/src/clui.cpp
@@ -721,7 +721,7 @@ static int ServiceParamsOK(ButtonItem *item, WPARAM *wParam, LPARAM *lParam, MCO
return 0;
if (item->dwFlags & BUTTON_PASSHCONTACTW)
- *wParam = (WPARAM)hContact;
+ *wParam = hContact;
else if (item->dwFlags & BUTTON_PASSHCONTACTL)
*lParam = (LPARAM)hContact;
}
diff --git a/plugins/Clist_nicer/src/viewmodes.cpp b/plugins/Clist_nicer/src/viewmodes.cpp
index cd163a2f36..0be4ed7741 100644
--- a/plugins/Clist_nicer/src/viewmodes.cpp
+++ b/plugins/Clist_nicer/src/viewmodes.cpp
@@ -123,7 +123,7 @@ static void ShowPage(HWND hwnd, int page)
static int UpdateClistItem(MCONTACT hContact, DWORD mask)
{
for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++)
- SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_SETEXTRAIMAGE, (WPARAM)hContact, MAKELONG(i - ID_STATUS_OFFLINE,
+ SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_SETEXTRAIMAGE, hContact, MAKELONG(i - ID_STATUS_OFFLINE,
(1 << (i - ID_STATUS_OFFLINE)) & mask ? i - ID_STATUS_OFFLINE : nullImage));
return 0;
@@ -142,7 +142,7 @@ static DWORD GetMaskForItem(HANDLE hItem)
static void UpdateStickies()
{
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- MCONTACT hItem = (MCONTACT)SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ MCONTACT hItem = (MCONTACT)SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem)
SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, cfg::getByte(hContact, "CLVM", g_szModename, 0) ? 1 : 0);
DWORD localMask = HIWORD(cfg::getDword(hContact, "CLVM", g_szModename, 0));
@@ -394,7 +394,7 @@ void SaveState()
dwGlobalMask = GetMaskForItem(hInfoItem);
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- hItem = (HANDLE)SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ hItem = (HANDLE)SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem) {
if (SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) {
dwLocalMask = GetMaskForItem(hItem);
@@ -719,7 +719,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP
case IDC_CLEARALL:
{
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem)
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, 0);
}
diff --git a/plugins/ContactsPlus/src/main.cpp b/plugins/ContactsPlus/src/main.cpp
index d8812192b9..549685e941 100644
--- a/plugins/ContactsPlus/src/main.cpp
+++ b/plugins/ContactsPlus/src/main.cpp
@@ -98,7 +98,7 @@ static void ProcessUnreadEvents(void)
db_event_get(hDbEvent, &dbei);
if (!(dbei.flags & (DBEF_SENT | DBEF_READ)) && dbei.eventType == EVENTTYPE_CONTACTS) {
//process the event
- HookDBEventAdded((WPARAM)hContact, (LPARAM)hDbEvent);
+ HookDBEventAdded(hContact, (LPARAM)hDbEvent);
}
hDbEvent = db_event_next(hDbEvent);
}
diff --git a/plugins/ContactsPlus/src/receive.cpp b/plugins/ContactsPlus/src/receive.cpp
index 6b79314c20..f7564631b1 100644
--- a/plugins/ContactsPlus/src/receive.cpp
+++ b/plugins/ContactsPlus/src/receive.cpp
@@ -321,7 +321,7 @@ INT_PTR CALLBACK RecvDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
if (hContact && caGroup) {
// use newest group API if available
if (ServiceExists(MS_CLIST_CONTACTCHANGEGROUP))
- CallService(MS_CLIST_CONTACTCHANGEGROUP, (WPARAM)hContact, (LPARAM)nGroupId);
+ CallService(MS_CLIST_CONTACTCHANGEGROUP, hContact, (LPARAM)nGroupId);
else
db_set_ts(hContact, "CList", "Group", caGroup);
}
@@ -340,7 +340,7 @@ INT_PTR CALLBACK RecvDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
if (ListView_GetItemState(hLV, i, LVIS_SELECTED)) {
hContact = CreateTemporaryContactForItem(hwndDlg, wndData, i);
if (hContact)
- CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)hContact, 0);
+ CallService(MS_USERINFO_SHOWDIALOG, hContact, 0);
}
}
break;
@@ -368,13 +368,13 @@ INT_PTR CALLBACK RecvDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
case ID_POPUP_USERDETAILS:
hContact = CreateTemporaryContactForItem(hwndDlg, wndData, wndData->iPopupItem);
if (hContact)
- CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)hContact, 0 );
+ CallService(MS_USERINFO_SHOWDIALOG, hContact, 0 );
break;
case ID_POPUP_SENDMESSAGE:
hContact = CreateTemporaryContactForItem(hwndDlg, wndData, wndData->iPopupItem);
if (hContact)
- CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
+ CallService(MS_MSG_SENDMESSAGE, hContact, 0);
break;
case IDC_USERMENU:
diff --git a/plugins/ContactsPlus/src/send.cpp b/plugins/ContactsPlus/src/send.cpp
index 5913a616d2..6bc4a8e915 100644
--- a/plugins/ContactsPlus/src/send.cpp
+++ b/plugins/ContactsPlus/src/send.cpp
@@ -197,7 +197,7 @@ static MCONTACT FindNextClistContact(HWND hList, MCONTACT hContact, MCONTACT *ph
static MCONTACT FindFirstClistContact(HWND hList, MCONTACT *phItem)
{
MCONTACT hContact = db_find_first();
- MCONTACT hItem = (MCONTACT)SendMessage(hList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ MCONTACT hItem = (MCONTACT)SendMessage(hList, CLM_FINDCONTACT, hContact, 0);
if (hContact && !hItem)
return FindNextClistContact(hList, hContact, phItem);
diff --git a/plugins/CountryFlags/src/extraimg.cpp b/plugins/CountryFlags/src/extraimg.cpp
index f7961c65bb..1ada5a8372 100644
--- a/plugins/CountryFlags/src/extraimg.cpp
+++ b/plugins/CountryFlags/src/extraimg.cpp
@@ -50,7 +50,7 @@ static void CALLBACK SetExtraImage(MCONTACT hContact)
if (!bShowExtraIcon)
return;
- int countryNumber = ServiceDetectContactOriginCountry((WPARAM)hContact, 0);
+ int countryNumber = ServiceDetectContactOriginCountry(hContact, 0);
if (countryNumber == 0xFFFF && !bUseUnknown)
ExtraIcon_Clear(hExtraIcon, hContact);
else {
diff --git a/plugins/DbEditorPP/src/main_window.cpp b/plugins/DbEditorPP/src/main_window.cpp
index 02b0c98c9b..efdf5599ec 100644
--- a/plugins/DbEditorPP/src/main_window.cpp
+++ b/plugins/DbEditorPP/src/main_window.cpp
@@ -128,7 +128,7 @@ LRESULT CALLBACK ModuleTreeSubclassProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM
if (MessageBox(0,msg, Translate("Confirm Contact Delete"), MB_YESNO|MB_ICONEXCLAMATION) == IDNO)
break;
}
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact,0);
+ CallService(MS_DB_CONTACT_DELETE, hContact,0);
freeTree(hwnd,mtis->hContact);
TreeView_DeleteItem(hwnd,tvi.hItem);
}
diff --git a/plugins/DbEditorPP/src/modsettingenum.cpp b/plugins/DbEditorPP/src/modsettingenum.cpp
index 42e21b67f0..a1a49bcf42 100644
--- a/plugins/DbEditorPP/src/modsettingenum.cpp
+++ b/plugins/DbEditorPP/src/modsettingenum.cpp
@@ -65,7 +65,7 @@ int EnumSettings(MCONTACT hContact, char* module, ModuleSettingLL *msll)
dbces.lParam = (LPARAM)msll;
msll->first = 0;
msll->last = 0;
- return !CallService(MS_DB_CONTACT_ENUMSETTINGS, (WPARAM)hContact, (LPARAM)&dbces);
+ return !CallService(MS_DB_CONTACT_ENUMSETTINGS, hContact, (LPARAM)&dbces);
}
int CheckIfModuleIsEmptyProc(const char *szSetting, LPARAM lParam)
@@ -78,7 +78,7 @@ int IsModuleEmpty(MCONTACT hContact, char* szModule)
DBCONTACTENUMSETTINGS dbces;
dbces.pfnEnumProc = CheckIfModuleIsEmptyProc;
dbces.szModule = szModule;
- int retVal = CallService(MS_DB_CONTACT_ENUMSETTINGS, (WPARAM)hContact, (LPARAM)&dbces);
+ int retVal = CallService(MS_DB_CONTACT_ENUMSETTINGS, hContact, (LPARAM)&dbces);
if (retVal >= 0)
return 0;
return 1;
diff --git a/plugins/DbEditorPP/src/moduletree.cpp b/plugins/DbEditorPP/src/moduletree.cpp
index b6b150e7f5..7427e635a9 100644
--- a/plugins/DbEditorPP/src/moduletree.cpp
+++ b/plugins/DbEditorPP/src/moduletree.cpp
@@ -847,13 +847,13 @@ void moduleListRightClick(HWND hwnd, WPARAM wParam,LPARAM lParam) // hwnd here i
char msg[1024];
mir_snprintf(msg, SIZEOF(msg), Translate("Are you sure you want to delete contact \"%s\"?"), module);
if (MessageBox(0,msg, Translate("Confirm Contact Delete"), MB_YESNO|MB_ICONEXCLAMATION) == IDYES) {
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact,0);
+ CallService(MS_DB_CONTACT_DELETE, hContact,0);
freeTree(((LPNMHDR)lParam)->hwndFrom,hContact);
TreeView_DeleteItem(((LPNMHDR)lParam)->hwndFrom,tvi.hItem);
}
}
else {
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact,0);
+ CallService(MS_DB_CONTACT_DELETE, hContact,0);
freeTree(((LPNMHDR)lParam)->hwndFrom,hContact);
TreeView_DeleteItem(((LPNMHDR)lParam)->hwndFrom,tvi.hItem);
}
diff --git a/plugins/FTPFileYM/src/dialog.cpp b/plugins/FTPFileYM/src/dialog.cpp
index ccc015afcf..02c602f846 100644
--- a/plugins/FTPFileYM/src/dialog.cpp
+++ b/plugins/FTPFileYM/src/dialog.cpp
@@ -245,7 +245,7 @@ INT_PTR CALLBACK UploadDialog::UploadDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar
if (hContact != NULL)
{
RECT rc;
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)hContact, 0);
+ HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, hContact, 0);
GetWindowRect((HWND)lParam, &rc);
TrackPopupMenu(hMenu, 0, rc.left, rc.bottom, 0, hwndDlg, NULL);
DestroyMenu(hMenu);
diff --git a/plugins/FavContacts/src/favlist.h b/plugins/FavContacts/src/favlist.h
index 0f16ef8fb6..b420f49c23 100644
--- a/plugins/FavContacts/src/favlist.h
+++ b/plugins/FavContacts/src/favlist.h
@@ -19,7 +19,7 @@ public:
this->hContact = hContact;
this->bManual = bManual;
this->fRate = fRate;
- name = mir_tstrdup((TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR));
+ name = mir_tstrdup((TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR));
if (g_Options.bUseGroups && !db_get_ts(hContact, "CList", "Group", &dbv))
{
group = mir_tstrdup(dbv.ptszVal);
diff --git a/plugins/FavContacts/src/http_api.cpp b/plugins/FavContacts/src/http_api.cpp
index 693ba4cd28..38705d3927 100644
--- a/plugins/FavContacts/src/http_api.cpp
+++ b/plugins/FavContacts/src/http_api.cpp
@@ -47,7 +47,7 @@ public:
int hContact;
sscanf(s, "/fav/open/%d", &hContact);
if (CallService(MS_DB_CONTACT_IS, hContact, 0))
- CallServiceSync(MS_FAVCONTACTS_OPEN_CONTACT, (WPARAM)hContact, 0);
+ CallServiceSync(MS_FAVCONTACTS_OPEN_CONTACT, hContact, 0);
}
void SendList()
@@ -68,8 +68,8 @@ public:
for (int i = 0; i < favList.getCount(); ++i)
{
MCONTACT hContact = favList[i]->getHandle();
- TCHAR *name = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
- AVATARCACHEENTRY *avatar = (AVATARCACHEENTRY *)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)hContact, 0);
+ TCHAR *name = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
+ AVATARCACHEENTRY *avatar = (AVATARCACHEENTRY *)CallService(MS_AV_GETAVATARBITMAP, hContact, 0);
int status = db_get_w(hContact, GetContactProto(hContact), "Status", ID_STATUS_OFFLINE);
Send("SetContact(");
diff --git a/plugins/FavContacts/src/main.cpp b/plugins/FavContacts/src/main.cpp
index 3abb180e40..d51299e45c 100644
--- a/plugins/FavContacts/src/main.cpp
+++ b/plugins/FavContacts/src/main.cpp
@@ -250,7 +250,7 @@ int ProcessModulesLoaded(WPARAM wParam, LPARAM lParam)
if (ServiceExists(MS_AV_GETAVATARBITMAP)) {
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
if (db_get_b(hContact, "FavContacts", "IsFavourite", 0))
- CallService(MS_AV_GETAVATARBITMAP, (WPARAM)hContact, 0);
+ CallService(MS_AV_GETAVATARBITMAP, hContact, 0);
}
return 0;
@@ -427,7 +427,7 @@ static BOOL sttMeasureItem_Contact(LPMEASUREITEMSTRUCT lpmis, Options *options)
lpmis->itemHeight += sz.cy + 3;
}
- TCHAR *name = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
+ TCHAR *name = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
if (!options->bSysColors) SelectObject(hdc, g_Options.hfntName);
GetTextExtentPoint32(hdc, name, lstrlen(name), &sz);
@@ -442,7 +442,7 @@ static BOOL sttMeasureItem_Contact(LPMEASUREITEMSTRUCT lpmis, Options *options)
if (options->bAvatars)
{
- AVATARCACHEENTRY *ace = (AVATARCACHEENTRY *)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)hContact, 0);
+ AVATARCACHEENTRY *ace = (AVATARCACHEENTRY *)CallService(MS_AV_GETAVATARBITMAP, hContact, 0);
if (ace && (ace != (AVATARCACHEENTRY *)CALLSERVICE_NOTFOUND))
{
int avatarWidth = lpmis->itemHeight;
@@ -582,7 +582,7 @@ static BOOL sttDrawItem_Contact(LPDRAWITEMSTRUCT lpdis, Options *options = NULL)
char *proto = GetContactProto(hContact);
HIMAGELIST hIml = (HIMAGELIST)CallService(MS_CLIST_GETICONSIMAGELIST, 0, 0);
- int iIcon = CallService(MS_CLIST_GETCONTACTICON, (WPARAM)hContact, 0);
+ int iIcon = CallService(MS_CLIST_GETCONTACTICON, hContact, 0);
if (db_get_dw(hContact, proto, "IdleTS", 0)) {
ImageList_DrawDimmed(hIml, iIcon, hdcTemp,
@@ -604,7 +604,7 @@ static BOOL sttDrawItem_Contact(LPDRAWITEMSTRUCT lpdis, Options *options = NULL)
}
if (options->bAvatars) {
- AVATARCACHEENTRY *ace = (AVATARCACHEENTRY *)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)hContact, 0);
+ AVATARCACHEENTRY *ace = (AVATARCACHEENTRY *)CallService(MS_AV_GETAVATARBITMAP, hContact, 0);
if (ace && (ace != (AVATARCACHEENTRY *)CALLSERVICE_NOTFOUND)) {
int avatarWidth = lpdis->rcItem.bottom - lpdis->rcItem.top;
if (ace->bmWidth < ace->bmHeight)
@@ -641,7 +641,7 @@ static BOOL sttDrawItem_Contact(LPDRAWITEMSTRUCT lpdis, Options *options = NULL)
}
if (true) {
- TCHAR *name = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
+ TCHAR *name = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
if (!options->bSysColors) SelectObject(hdcTemp, g_Options.hfntName);
SetTextColor(hdcTemp, clLine1);
@@ -767,7 +767,7 @@ static LRESULT CALLBACK MenuHostWndProc(HWND hwnd, UINT message, WPARAM wParam,
MCONTACT hContact = (MCONTACT)mii.dwItemData;
if (!CallService(MS_DB_CONTACT_IS, mii.dwItemData, 0)) return FALSE;
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)hContact, 0);
+ HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, hContact, 0);
POINT pt;
GetCursorPos(&pt);
@@ -873,7 +873,7 @@ int sttShowMenu(bool centered)
DestroyMenu(hMenu);
if (hContact)
- CallService(MS_CLIST_CONTACTDOUBLECLICKED, (WPARAM)hContact, 0);
+ CallService(MS_CLIST_CONTACTDOUBLECLICKED, hContact, 0);
return 0;
}
@@ -946,7 +946,7 @@ int ProcessSrmmIconClick(WPARAM hContact, LPARAM lParam)
if (sicd->flags & MBCF_RIGHTBUTTON) {
BYTE fav = !db_get_b(hContact, "FavContacts", "IsFavourite", 0);
db_set_b(hContact, "FavContacts", "IsFavourite", fav);
- if (fav) CallService(MS_AV_GETAVATARBITMAP, (WPARAM)hContact, 0);
+ if (fav) CallService(MS_AV_GETAVATARBITMAP, hContact, 0);
StatusIconData sid = { sizeof(sid) };
sid.szModule = "FavContacts";
@@ -1006,7 +1006,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
{
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
SendDlgItemMessage(hwnd, IDC_CLIST, CLM_SETCHECKMARK,
- SendDlgItemMessage(hwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0),
+ SendDlgItemMessage(hwnd, IDC_CLIST, CLM_FINDCONTACT, hContact, 0),
db_get_b(hContact, "FavContacts", "IsFavourite", 0));
}
@@ -1128,10 +1128,10 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
BYTE fav = SendDlgItemMessage(hwnd, IDC_CLIST, CLM_GETCHECKMARK,
- SendDlgItemMessage(hwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0), 0);
+ SendDlgItemMessage(hwnd, IDC_CLIST, CLM_FINDCONTACT, hContact, 0), 0);
if (fav != db_get_b(hContact, "FavContacts", "IsFavourite", 0))
db_set_b(hContact, "FavContacts", "IsFavourite", fav);
- if (fav) CallService(MS_AV_GETAVATARBITMAP, (WPARAM)hContact, 0);
+ if (fav) CallService(MS_AV_GETAVATARBITMAP, hContact, 0);
}
}
else if (((LPNMHDR)lParam)->idFrom == IDC_CLIST) {
@@ -1145,7 +1145,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
case CLN_NEWCONTACT:
iSelection = (int)((NMCLISTCONTROL *)lParam)->hItem;
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- if (SendDlgItemMessage(hwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0) == iSelection) {
+ if (SendDlgItemMessage(hwnd, IDC_CLIST, CLM_FINDCONTACT, hContact, 0) == iSelection) {
SendDlgItemMessage(hwnd, IDC_CLIST, CLM_SETCHECKMARK, iSelection,
db_get_b(hContact, "FavContacts", "IsFavourite", 0));
break;
@@ -1156,7 +1156,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
case CLN_CHECKCHANGED:
iSelection = (int)((NMCLISTCONTROL *)lParam)->hItem;
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- if (SendDlgItemMessage(hwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0) == iSelection) {
+ if (SendDlgItemMessage(hwnd, IDC_CLIST, CLM_FINDCONTACT, hContact, 0) == iSelection) {
hSelectedContact = hContact;
RedrawWindow(GetDlgItem(hwnd, IDC_CANVAS), NULL, NULL, RDW_INVALIDATE);
}
diff --git a/plugins/FileAsMessage/src/dialog.cpp b/plugins/FileAsMessage/src/dialog.cpp
index 9728ff95f2..f668fef130 100644
--- a/plugins/FileAsMessage/src/dialog.cpp
+++ b/plugins/FileAsMessage/src/dialog.cpp
@@ -73,7 +73,7 @@ static int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM
int indx = 0;
for(;;)
{
- if((lpcle = (CLISTEVENT*)CallService(MS_CLIST_GETEVENT, (WPARAM)hContact, indx)) == NULL)
+ if((lpcle = (CLISTEVENT*)CallService(MS_CLIST_GETEVENT, hContact, indx)) == NULL)
break;
if(lstrcmp(lpcle->pszService, SERVICE_NAME "/FERecvFile") == 0)
{
@@ -88,7 +88,7 @@ static int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM
case WM_COMMAND:
{
PUDeletePopup(hWnd);
- CallService(MS_CLIST_REMOVEEVENT, (WPARAM)hContact, 0);
+ CallService(MS_CLIST_REMOVEEVENT, hContact, 0);
if(IsWindow(hDlg))
{
@@ -123,7 +123,7 @@ void MakePopupMsg(HWND hDlg, MCONTACT hContact, char *msg)
POPUPDATA ppd = { 0 };
ppd.lchContact = hContact;
ppd.lchIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_SMALLICON));
- lstrcpy(ppd.lpzContactName, (char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, 0));
+ lstrcpy(ppd.lpzContactName, (char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, 0));
lstrcpy(ppd.lpzText, msg);
ppd.colorBack = GetSysColor(COLOR_INFOBK);
ppd.colorText = GetSysColor(COLOR_INFOTEXT);
@@ -258,7 +258,7 @@ void FILEECHO::updateTitle()
{
char newtitle[256], *contactName;
- contactName=(char*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,0);
+ contactName=(char*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,hContact,0);
if(iState == STATE_OPERATE && chunkCount != 0)
mir_snprintf(newtitle, sizeof(newtitle), "%d%% - %s: %s", chunkSent * 100 / chunkCount, Translate(szFEMode[inSend]), contactName);
else
@@ -445,7 +445,7 @@ void FILEECHO::incomeRequest(char *param)
// param == &filename
char *p = strchr(param, '?');
if(p == NULL) return; *p++ = 0;
- CallService(MS_FILE_GETRECEIVEDFILESFOLDER, (WPARAM)hContact, (LPARAM)buf);
+ CallService(MS_FILE_GETRECEIVEDFILESFOLDER, hContact, (LPARAM)buf);
strncat(buf, param, sizeof(buf));
free(filename);
filename = strdup(buf);
@@ -565,7 +565,7 @@ void FILEECHO::onRecvTimer()
if(db_get_b(NULL,"SRFile","AutoClose",0))
{
PostMessage(hDlg, WM_CLOSE, 0,0);
- CallService(MS_CLIST_REMOVEEVENT, (WPARAM)hContact, 0);
+ CallService(MS_CLIST_REMOVEEVENT, hContact, 0);
}
SkinPlaySound("FileDone");
destroyTransfer();
diff --git a/plugins/FingerprintNG/src/options.cpp b/plugins/FingerprintNG/src/options.cpp
index 74b62bacc9..137fc12836 100644
--- a/plugins/FingerprintNG/src/options.cpp
+++ b/plugins/FingerprintNG/src/options.cpp
@@ -104,7 +104,7 @@ static INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LP
RegisterIcons();
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
- OnExtraImageApply((WPARAM)hContact, 0);
+ OnExtraImageApply(hContact, 0);
}
break;
}
diff --git a/plugins/FloatingContacts/src/main.cpp b/plugins/FloatingContacts/src/main.cpp
index 2bcc042554..416aa4857f 100644
--- a/plugins/FloatingContacts/src/main.cpp
+++ b/plugins/FloatingContacts/src/main.cpp
@@ -778,7 +778,7 @@ static void LoadContact( MCONTACT hContact )
DWORD dwPos = db_get_dw( hContact, MODULE, "ThumbsPos", (DWORD)-1);
if ( dwPos != -1) {
- TCHAR *ptName = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, (LPARAM)GCDNF_TCHAR);
+ TCHAR *ptName = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, (LPARAM)GCDNF_TCHAR);
if ( ptName != NULL ) {
int nX = DB_POS_GETX( dwPos );
int nY = DB_POS_GETY( dwPos );
diff --git a/plugins/FloatingContacts/src/thumbs.cpp b/plugins/FloatingContacts/src/thumbs.cpp
index bc6b4888c7..a376d06838 100644
--- a/plugins/FloatingContacts/src/thumbs.cpp
+++ b/plugins/FloatingContacts/src/thumbs.cpp
@@ -315,7 +315,7 @@ void ThumbInfo::ResizeThumb()
void ThumbInfo::RefreshContactIcon(int iIcon)
{
if (iIcon == 0xFFFFFFFF || ImageList_GetImageCount(himlMiranda) <= iIcon)
- this->iIcon = CallService(MS_CLIST_GETCONTACTICON, (WPARAM)hContact, 0);
+ this->iIcon = CallService(MS_CLIST_GETCONTACTICON, hContact, 0);
else
this->iIcon = iIcon;
@@ -689,7 +689,7 @@ void ThumbInfo::UpdateContent()
void ThumbInfo::PopupMessageDialog( )
{
- CallService(MS_CLIST_CONTACTDOUBLECLICKED, (WPARAM)hContact, 0);
+ CallService(MS_CLIST_CONTACTDOUBLECLICKED, hContact, 0);
}
void ThumbInfo::OnTimer(BYTE idTimer)
diff --git a/plugins/HTTPServer/src/GuiElements.cpp b/plugins/HTTPServer/src/GuiElements.cpp
index 7b21ed1e8e..9e03f45127 100644
--- a/plugins/HTTPServer/src/GuiElements.cpp
+++ b/plugins/HTTPServer/src/GuiElements.cpp
@@ -1064,7 +1064,7 @@ static INT_PTR nShareNewFile(WPARAM hContact, LPARAM lParam)
else
db_unset(hContact, MODULE, "LastUsedMask");
- SendLinkToUser((WPARAM)hContact, stNewShare.pszSrvPath);
+ SendLinkToUser(hContact, stNewShare.pszSrvPath);
return 0;
}
diff --git a/plugins/HistorySweeperLight/src/options.cpp b/plugins/HistorySweeperLight/src/options.cpp
index fc6d6418e8..dac549cbf7 100644
--- a/plugins/HistorySweeperLight/src/options.cpp
+++ b/plugins/HistorySweeperLight/src/options.cpp
@@ -108,7 +108,7 @@ static void ShowAllContactIcons(HWND hwndList)
MAKELPARAM(0, db_get_b(NULL, ModuleName, "SweepSHistory", 0)));
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0);
SendMessage(hwndList, CLM_SETEXTRAIMAGE, (WPARAM)hItem,
MAKELPARAM(0, db_get_b(hContact, ModuleName, "SweepHistory", 0)));
}
@@ -175,7 +175,7 @@ void SaveSettings(HWND hwndDlg)
(BYTE)SendMessage(hwndList, CLM_GETEXTRAIMAGE, (WPARAM)hSystemHistory, 0));
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0);
st = SendMessage(hwndList, CLM_GETEXTRAIMAGE, (WPARAM)hItem, 0);
if ( st != 0 ) db_set_b(hContact, ModuleName, "SweepHistory", (BYTE)st);
diff --git a/plugins/IEView/src/HTMLBuilder.cpp b/plugins/IEView/src/HTMLBuilder.cpp
index b8fc6eb740..827c6dac52 100644
--- a/plugins/IEView/src/HTMLBuilder.cpp
+++ b/plugins/IEView/src/HTMLBuilder.cpp
@@ -149,7 +149,7 @@ char* HTMLBuilder::getRealProto(MCONTACT hContact)
char *szProto = mir_strdup(GetContactProto(hContact));
if (szProto != NULL && !strcmp(szProto, "MetaContacts")) {
- hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0);
if (hContact != NULL) {
mir_free(szProto);
szProto = mir_strdup(GetContactProto(hContact));
@@ -161,7 +161,7 @@ char* HTMLBuilder::getRealProto(MCONTACT hContact)
char *HTMLBuilder::getRealProto(MCONTACT hContact, const char *szProto)
{
if (szProto != NULL && !strcmp(szProto, "MetaContacts")) {
- hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0);
if (hContact != NULL)
return mir_strdup(GetContactProto(hContact));
}
@@ -172,7 +172,7 @@ MCONTACT HTMLBuilder::getRealContact(MCONTACT hContact)
{
char *szProto = GetContactProto(hContact);
if (szProto != NULL && !strcmp(szProto,"MetaContacts"))
- hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0);
return hContact;
}
diff --git a/plugins/IEView/src/TemplateHTMLBuilder.cpp b/plugins/IEView/src/TemplateHTMLBuilder.cpp
index b58a6beddf..e533cefae4 100644
--- a/plugins/IEView/src/TemplateHTMLBuilder.cpp
+++ b/plugins/IEView/src/TemplateHTMLBuilder.cpp
@@ -51,7 +51,7 @@ char *TemplateHTMLBuilder::getAvatar(MCONTACT hContact, const char* szProto)
if (hContact == NULL) {
ace = (struct avatarCacheEntry *)CallService(MS_AV_GETMYAVATAR, 0, (LPARAM)szProto);
} else {
- ace = (struct avatarCacheEntry *)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)hContact, 0);
+ ace = (struct avatarCacheEntry *)CallService(MS_AV_GETAVATARBITMAP, hContact, 0);
}
if (ace!=NULL) {
if ( ace->cbSize == sizeof(avatarCacheEntry))
diff --git a/plugins/IgnoreState/src/main.cpp b/plugins/IgnoreState/src/main.cpp
index ebe32c0d36..505dcfe9bf 100644
--- a/plugins/IgnoreState/src/main.cpp
+++ b/plugins/IgnoreState/src/main.cpp
@@ -84,7 +84,7 @@ INT_PTR isIgnored(MCONTACT hContact, int type)
int all = 0, filtered = 0;
if (type != IGNOREEVENT_ALL)
- return CallService(MS_IGNORE_ISIGNORED, (WPARAM)hContact, (LPARAM)type);
+ return CallService(MS_IGNORE_ISIGNORED, hContact, (LPARAM)type);
for (int i = 1; i < nII; i++)
if (isIgnored(hContact, ii[i].type))
diff --git a/plugins/KeyboardNotify/src/ignore.cpp b/plugins/KeyboardNotify/src/ignore.cpp
index b119f4cdc3..299481793b 100644
--- a/plugins/KeyboardNotify/src/ignore.cpp
+++ b/plugins/KeyboardNotify/src/ignore.cpp
@@ -187,7 +187,7 @@ static void SetAllContactIcons(HWND hwndList)
DWORD protoCaps;
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0);
if(hItem && SendMessage(hwndList, CLM_GETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(IGNOREEVENT_MAX, 0)) == EMPTY_EXTRA_ICON) {
char *szProto = GetContactProto(hContact);
if(szProto == NULL)
@@ -311,7 +311,7 @@ INT_PTR CALLBACK DlgProcIgnoreOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
case PSN_APPLY:
{
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_FINDCONTACT, hContact, 0);
if(hItem)
SaveItemMask(GetDlgItem(hwndDlg, IDC_LIST), hContact, hItem, "Mask1");
}
diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp
index ee716a6d73..690a33e4b6 100644
--- a/plugins/KeyboardNotify/src/main.cpp
+++ b/plugins/KeyboardNotify/src/main.cpp
@@ -261,7 +261,7 @@ BOOL metaCheckProtocol(char *szProto, MCONTACT hContact, WORD eventType)
MCONTACT hSubContact=NULL;
if (szMetaProto && bMetaProtoEnabled && szProto && !strcmp(szMetaProto, szProto))
- if (hSubContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0))
+ if (hSubContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0))
szProto = GetContactProto(hSubContact);
return checkProtocol(szProto) && checkIgnore(hSubContact?hSubContact:hContact, eventType);
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp
index a9bc2e5c66..cb04157a35 100644
--- a/plugins/MenuItemEx/src/main.cpp
+++ b/plugins/MenuItemEx/src/main.cpp
@@ -168,7 +168,7 @@ void RenameDbProto(MCONTACT hContact, MCONTACT hContactNew, char* oldName, char*
dbces.lParam = (LPARAM)&settinglist;
settinglist.first = 0;
settinglist.last = 0;
- CallService(MS_DB_CONTACT_ENUMSETTINGS, (WPARAM)hContact,(LPARAM)&dbces);
+ CallService(MS_DB_CONTACT_ENUMSETTINGS, hContact,(LPARAM)&dbces);
setting = settinglist.first;
while (setting) {
@@ -215,7 +215,7 @@ void ShowPopup(char* szText, TCHAR* tszText, MCONTACT hContact)
ppd.lchIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
ppd.lchContact = hContact;
- _tcsncpy(ppd.lptzContactName, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR), MAX_CONTACTNAME - 1);
+ _tcsncpy(ppd.lptzContactName, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR), MAX_CONTACTNAME - 1);
_tcsncpy(ppd.lptzText, text, MAX_SECONDLINE - 1);
ppd.iSeconds = -1;
@@ -227,7 +227,7 @@ BOOL DirectoryExists(MCONTACT hContact)
{
int attr;
char path[MAX_PATH];
- CallService(MS_FILE_GETRECEIVEDFILESFOLDER, (WPARAM)hContact, (LPARAM)&path);
+ CallService(MS_FILE_GETRECEIVEDFILESFOLDER, hContact, (LPARAM)&path);
attr = GetFileAttributesA(path);
return (attr != -1) && (attr&FILE_ATTRIBUTE_DIRECTORY);
}
@@ -274,14 +274,14 @@ BOOL isMetaContact(MCONTACT hContact)
MCONTACT getDefaultContact(MCONTACT hContact)
{
if (bMetaContacts)
- return (MCONTACT)CallService(MS_MC_GETDEFAULTCONTACT, (WPARAM)hContact, 0);
+ return (MCONTACT)CallService(MS_MC_GETDEFAULTCONTACT, hContact, 0);
return 0;
}
MCONTACT getMostOnline(MCONTACT hContact)
{
if (bMetaContacts)
- return (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ return (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0);
return 0;
}
@@ -731,7 +731,7 @@ INT_PTR onChangeProto(WPARAM wparam, LPARAM lparam)
if (CTRL_IS_PRESSED) {
hContactNew = hContact;
RenameDbProto(hContact, hContactNew, GetContactProto(hContact), (char*)lparam, 1);
- CallService(MS_PROTO_REMOVEFROMCONTACT, (WPARAM)hContact, (LPARAM)GetContactProto(hContact));
+ CallService(MS_PROTO_REMOVEFROMCONTACT, hContact, (LPARAM)GetContactProto(hContact));
CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContactNew, lparam);
}
else {
@@ -755,7 +755,7 @@ INT_PTR onChangeProto(WPARAM wparam, LPARAM lparam)
int isIgnored(MCONTACT hContact, int type)
{
if (type != IGNOREEVENT_ALL)
- return CallService(MS_IGNORE_ISIGNORED, (WPARAM)hContact, (LPARAM)type);
+ return CallService(MS_IGNORE_ISIGNORED, hContact, (LPARAM)type);
int i = 0, all = 0;
for (i = 1; i < SIZEOF(ii); i++)
@@ -963,7 +963,7 @@ static void TabsrmmButtonsModify(MCONTACT hContact)
bbd.dwButtonID = 0;
bbd.pszModuleName = MODULENAME;
bbd.bbbFlags = BBSF_DISABLED | BBSF_HIDDEN;
- CallService(MS_BB_SETBUTTONSTATE, (WPARAM)hContact, (LPARAM)&bbd);
+ CallService(MS_BB_SETBUTTONSTATE, hContact, (LPARAM)&bbd);
}
}
diff --git a/plugins/MetaContacts/src/meta_menu.cpp b/plugins/MetaContacts/src/meta_menu.cpp
index 853dc18394..0031b461ed 100644
--- a/plugins/MetaContacts/src/meta_menu.cpp
+++ b/plugins/MetaContacts/src/meta_menu.cpp
@@ -129,7 +129,7 @@ void Meta_RemoveContactNumber(MCONTACT hMeta, int number)
// stop ignoring, if we were
if (options.suppress_status)
- CallService(MS_IGNORE_UNIGNORE, (WPARAM)hContact, (WPARAM)IGNOREEVENT_USERONLINE);
+ CallService(MS_IGNORE_UNIGNORE, hContact, (WPARAM)IGNOREEVENT_USERONLINE);
}
// each contact from 'number' upwards will be moved down one
@@ -229,7 +229,7 @@ INT_PTR Meta_Delete(WPARAM wParam,LPARAM lParam)
// stop ignoring, if we were
if (options.suppress_status)
- CallService(MS_IGNORE_UNIGNORE, (WPARAM)hContact, (WPARAM)IGNOREEVENT_USERONLINE);
+ CallService(MS_IGNORE_UNIGNORE, hContact, (WPARAM)IGNOREEVENT_USERONLINE);
}
}
@@ -379,7 +379,7 @@ int Meta_ModifyMenu(WPARAM wParam, LPARAM lParam)
mi.flags |= CMIM_FLAGS | CMIM_NAME | CMIM_ICON;
- int iconIndex = CallService(MS_CLIST_GETCONTACTICON, (WPARAM)hContact, 0);
+ int iconIndex = CallService(MS_CLIST_GETCONTACTICON, hContact, 0);
mi.hIcon = ImageList_GetIcon((HIMAGELIST)CallService(MS_CLIST_GETICONSIMAGELIST, 0, 0), iconIndex, 0);
Menu_ModifyItem(hMenuContact[i], &mi);
diff --git a/plugins/MetaContacts/src/meta_services.cpp b/plugins/MetaContacts/src/meta_services.cpp
index c615a01b08..63578c17aa 100755
--- a/plugins/MetaContacts/src/meta_services.cpp
+++ b/plugins/MetaContacts/src/meta_services.cpp
@@ -793,7 +793,7 @@ int Meta_ContactDeleted(WPARAM wParam, LPARAM lParam)
// stop ignoring, if we were
if (options.suppress_status)
- CallService(MS_IGNORE_UNIGNORE, (WPARAM)hContact, (WPARAM)IGNOREEVENT_USERONLINE);
+ CallService(MS_IGNORE_UNIGNORE, hContact, (WPARAM)IGNOREEVENT_USERONLINE);
}
}
return 0;
@@ -945,7 +945,7 @@ int Meta_ClistDoubleClicked(WPARAM wParam, LPARAM lParam)
INT_PTR Meta_ClistMessageEventClicked(WPARAM wParam, LPARAM lParam)
{
MCONTACT hContact = ((CLISTEVENT *)lParam)->hContact;
- return Meta_ClistDoubleClicked((WPARAM)hContact, (LPARAM)((CLISTEVENT *)lParam)->hDbEvent);
+ return Meta_ClistDoubleClicked(hContact, (LPARAM)((CLISTEVENT *)lParam)->hDbEvent);
}
int NudgeRecieved(WPARAM wParam, LPARAM lParam)
@@ -1117,17 +1117,17 @@ INT_PTR Meta_ContactMenuFunc(WPARAM wParam, LPARAM lParam)
CallService(MS_MSG_SENDMESSAGE, wParam, 0);
} else
// protocol does not support messaging - simulate double click
- CallService(MS_CLIST_CONTACTDOUBLECLICKED, (WPARAM)hContact, 0);
+ CallService(MS_CLIST_CONTACTDOUBLECLICKED, hContact, 0);
} else
// protocol does not support messaging - simulate double click
- CallService(MS_CLIST_CONTACTDOUBLECLICKED, (WPARAM)hContact, 0);
+ CallService(MS_CLIST_CONTACTDOUBLECLICKED, hContact, 0);
} else if (options.menu_function == FT_MENU) {
// show contact's context menu
CallFunctionAsync(sttMenuThread, (void*)hContact);
} else if (options.menu_function == FT_INFO) {
// show user info for subcontact
- CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)hContact, 0);
+ CallService(MS_USERINFO_SHOWDIALOG, hContact, 0);
}
return 0;
diff --git a/plugins/MetaContacts/src/meta_utils.cpp b/plugins/MetaContacts/src/meta_utils.cpp
index 4d83038cd3..6789e21352 100644
--- a/plugins/MetaContacts/src/meta_utils.cpp
+++ b/plugins/MetaContacts/src/meta_utils.cpp
@@ -719,7 +719,7 @@ int Meta_SetHandles(void)
MessageBox(0, TranslateT("Subcontact contact number < 0 - deleting MetaContact"), nick_buffer, MB_OK | MB_ICONERROR);
//CallService(MS_DB_CONTACT_DELETE, (WPARMA)hContact, 0);
hNextContact = db_find_next(hContact);
- Meta_Delete((WPARAM)hContact, (LPARAM)1);
+ Meta_Delete(hContact, (LPARAM)1);
hContact = hNextContact;
continue;
//return 1;
@@ -758,7 +758,7 @@ int Meta_SetHandles(void)
MessageBox(0, buff, nick_buffer, MB_OK | MB_ICONERROR);
hNextContact = db_find_next(hContact);
- Meta_Delete((WPARAM)hContact, (LPARAM)1);
+ Meta_Delete(hContact, (LPARAM)1);
hContact = hNextContact;
continue;
}
@@ -781,7 +781,7 @@ int Meta_SetHandles(void)
// stop ignoring, if we were
if (options.suppress_status)
- CallService(MS_IGNORE_UNIGNORE, (WPARAM)hContact, (WPARAM)IGNOREEVENT_USERONLINE);
+ CallService(MS_IGNORE_UNIGNORE, hContact, (WPARAM)IGNOREEVENT_USERONLINE);
}
else {
@@ -809,7 +809,7 @@ int Meta_SetHandles(void)
// problem
MessageBox(0, TranslateT("MetaContact number of contacts < 0 - deleting MetaContact"), nick_buffer, MB_OK | MB_ICONERROR);
hNextContact = db_find_next(hContact);
- Meta_Delete((WPARAM)hContact, (LPARAM)1);
+ Meta_Delete(hContact, (LPARAM)1);
hContact = hNextContact;
continue;
}
@@ -818,7 +818,7 @@ int Meta_SetHandles(void)
// problem
MessageBox(0, TranslateT("MetaContact default contact number out of range - deleting MetaContact"), nick_buffer, MB_OK | MB_ICONERROR);
hNextContact = db_find_next(hContact);
- Meta_Delete((WPARAM)hContact, (LPARAM)1);
+ Meta_Delete(hContact, (LPARAM)1);
hContact = hNextContact;
continue;
}
@@ -841,7 +841,7 @@ int Meta_SetHandles(void)
_tcscat(nick_buffer, _itot(meta_id, buffer2, 10));
MessageBox(0, TranslateT("MetaContact corrupted - the number of subcontacts is incorrect.\nDeleting MetaContact."), nick_buffer, MB_OK | MB_ICONERROR);
- Meta_Delete((WPARAM)hContact, (LPARAM)1);
+ Meta_Delete(hContact, (LPARAM)1);
hContact = hNextContact;
continue;
}
@@ -950,7 +950,7 @@ int Meta_HideLinkedContacts(void) {
}
if (options.suppress_status)
- CallService(MS_IGNORE_IGNORE, (WPARAM)hContact, (WPARAM)IGNOREEVENT_USERONLINE);
+ CallService(MS_IGNORE_IGNORE, hContact, (WPARAM)IGNOREEVENT_USERONLINE);
}
hContact = db_find_next(hContact);
@@ -1122,9 +1122,9 @@ int Meta_SuppressStatus(BOOL suppress)
if (db_get_dw(hContact, META_PROTO, META_LINK,(DWORD)-1)!=(DWORD)-1) {
// is a subcontact
if (suppress)
- CallService(MS_IGNORE_IGNORE, (WPARAM)hContact, (WPARAM)IGNOREEVENT_USERONLINE);
+ CallService(MS_IGNORE_IGNORE, hContact, (WPARAM)IGNOREEVENT_USERONLINE);
else
- CallService(MS_IGNORE_UNIGNORE, (WPARAM)hContact, (WPARAM)IGNOREEVENT_USERONLINE);
+ CallService(MS_IGNORE_UNIGNORE, hContact, (WPARAM)IGNOREEVENT_USERONLINE);
}
}
diff --git a/plugins/MirFox/src/MirandaOptions.cpp b/plugins/MirFox/src/MirandaOptions.cpp
index 9492ab98a0..b8f7acda2f 100644
--- a/plugins/MirFox/src/MirandaOptions.cpp
+++ b/plugins/MirFox/src/MirandaOptions.cpp
@@ -170,7 +170,7 @@ static void setListContactIcons(HWND hwndList){
for (mirandaContactsIter = mirandaContactsPtr->begin(); mirandaContactsIter != mirandaContactsPtr->end(); mirandaContactsIter++){
MCONTACT hContact = mirandaContactsIter->contactHandle;
- HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0);
if(hItem) {
//if icon on 0th extracolumn is not set
if(SendMessage(hwndList, CLM_GETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(0,0)) == 0xFF){
@@ -486,7 +486,7 @@ INT_PTR CALLBACK DlgProcOpts_Tab2(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)){
- HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC2_CONTACTS_LIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC2_CONTACTS_LIST, CLM_FINDCONTACT, hContact, 0);
if(hItem) {
int iImage = SendDlgItemMessage(hwndDlg, IDC2_CONTACTS_LIST, CLM_GETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(0,0));
diff --git a/plugins/MirFox/src/MirandaUtils.cpp b/plugins/MirFox/src/MirandaUtils.cpp
index 3681c30251..24307322eb 100644
--- a/plugins/MirFox/src/MirandaUtils.cpp
+++ b/plugins/MirFox/src/MirandaUtils.cpp
@@ -148,7 +148,7 @@ void MirandaUtils::sendMessage(ActionThreadArgStruct* args, MFENUM_SEND_MESSAGE_
//TODO - metacontacts support - C:\MIRANDA\SOURCES\PLUGINS\popup_trunk\src\popup_wnd2.cpp : 1083
// //check for MetaContact and get szProto from subcontact
// if(strcmp(targetHandleSzProto, gszMetaProto)==0) {
- // HANDLE hSubContact = (HANDLE)CallService(MS_MC_GETDEFAULTCONTACT, (WPARAM)hContact, 0);
+ // HANDLE hSubContact = (HANDLE)CallService(MS_MC_GETDEFAULTCONTACT, hContact, 0);
// if(!hSubContact) return FALSE;
// targetHandleSzProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hSubContact, 0);
// }
diff --git a/plugins/MirOTR/MirOTR/src/dbfilter.cpp b/plugins/MirOTR/MirOTR/src/dbfilter.cpp
index 674a4965de..c3ebb7f95a 100644
--- a/plugins/MirOTR/MirOTR/src/dbfilter.cpp
+++ b/plugins/MirOTR/MirOTR/src/dbfilter.cpp
@@ -62,7 +62,7 @@ int OnDatabaseEventPreAdd(WPARAM hContact, LPARAM lParam)
return 0;
if(g_metaproto && strcmp(proto, g_metaproto) == 0) {
- hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0);
if (!hContact) return 0;
proto = contact_get_proto(hContact);
if (!proto ) return 0;
@@ -196,7 +196,7 @@ int OnDatabaseEventPreAdd(WPARAM hContact, LPARAM lParam)
if (!db_event_get((HANDLE)lParam, &info)) {
if(info.eventType == EVENTTYPE_MESSAGE) {
MCONTACT hSub;
- if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0)
+ if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0)) != 0)
hContact = hSub;
ConnContext *context = otrl_context_find_miranda(otr_user_state, hContact);
@@ -252,10 +252,10 @@ int WindowEvent(WPARAM wParam, LPARAM lParam) {
if(mwd->uType != MSG_WINDOW_EVT_OPEN) return 0;
MCONTACT hContact = mwd->hContact, hTemp;
- if(options.bHaveMetaContacts && (hTemp = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0)
+ if(options.bHaveMetaContacts && (hTemp = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0)) != 0)
hContact = hTemp;
- if (!CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)MODULENAME))
+ if (!CallService(MS_PROTO_ISPROTOONCONTACT, hContact, (LPARAM)MODULENAME))
return 0;
lib_cs_lock();
@@ -319,7 +319,7 @@ int OnContactSettingChanged(WPARAM hContact, LPARAM lParam)
// Terminate sessions with all contacts of that proto
StatusModeChange((WPARAM) ID_STATUS_OFFLINE, (LPARAM)cws->szModule);
return 0;
- }else if(CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)MODULENAME)) {
+ }else if(CallService(MS_PROTO_ISPROTOONCONTACT, hContact, (LPARAM)MODULENAME)) {
// only care about contacts to which this filter is attached
FinishSession(hContact);
}
diff --git a/plugins/MirOTR/MirOTR/src/dllmain.cpp b/plugins/MirOTR/MirOTR/src/dllmain.cpp
index 22973c7676..232751e146 100644
--- a/plugins/MirOTR/MirOTR/src/dllmain.cpp
+++ b/plugins/MirOTR/MirOTR/src/dllmain.cpp
@@ -89,7 +89,7 @@ extern "C" __declspec(dllexport) int Load(void)
// remove us as a filter to all contacts - fix filter type problem
if(db_get_b(0, MODULENAME, "FilterOrderFix", 0) != 2) {
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
- CallService(MS_PROTO_REMOVEFROMCONTACT, (WPARAM)hContact, (LPARAM)MODULENAME);
+ CallService(MS_PROTO_REMOVEFROMCONTACT, hContact, (LPARAM)MODULENAME);
db_set_b(0, MODULENAME, "FilterOrderFix", 2);
}
diff --git a/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp b/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp
index 2714a21e4f..513326712f 100644
--- a/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp
+++ b/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp
@@ -86,7 +86,7 @@ INT_PTR MirOTRMenuCheckService(WPARAM wParam,LPARAM)
return TRUE;
MCONTACT hContact = (MCONTACT)pcpp->wParam, hSub;
- if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0)
+ if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0)) != 0)
hContact = hSub;
TrustLevel level = ( TrustLevel )otr_context_get_trust(otrl_context_find_miranda(otr_user_state, hContact));
@@ -177,7 +177,7 @@ LRESULT CALLBACK PopupMenuWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM
}
void ShowOTRMenu(MCONTACT hContact, POINT pt){
- HMENU menu = (HMENU) CallService(MS_MIROTR_MENUBUILDMIROTR, (WPARAM)hContact, 0);
+ HMENU menu = (HMENU) CallService(MS_MIROTR_MENUBUILDMIROTR, hContact, 0);
SetWindowLongPtr(hDummyPaintWin, GWLP_USERDATA, (LONG_PTR)hContact);
TrackPopupMenu(menu, 0, pt.x, pt.y, 0, hDummyPaintWin, 0);
DestroyMenu(menu);
diff --git a/plugins/MirOTR/MirOTR/src/options.cpp b/plugins/MirOTR/MirOTR/src/options.cpp
index f090d9b474..613178905b 100644
--- a/plugins/MirOTR/MirOTR/src/options.cpp
+++ b/plugins/MirOTR/MirOTR/src/options.cpp
@@ -559,7 +559,7 @@ static INT_PTR CALLBACK DlgProcMirOTROptsContacts(HWND hwndDlg, UINT msg, WPARAM
TCHAR *proto_t;
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
proto = contact_get_proto(hContact);
- if(proto && db_get_b(hContact, proto, "ChatRoom", 0) == 0 && CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)MODULENAME) // ignore chatrooms
+ if(proto && db_get_b(hContact, proto, "ChatRoom", 0) == 0 && CallService(MS_PROTO_ISPROTOONCONTACT, hContact, (LPARAM)MODULENAME) // ignore chatrooms
&& (g_metaproto == 0 || strcmp(proto, g_metaproto) != 0)) // and MetaContacts
{
lvI.iItem = 0;
diff --git a/plugins/MirOTR/MirOTR/src/svcs_menu.cpp b/plugins/MirOTR/MirOTR/src/svcs_menu.cpp
index 5240337872..0db55124ea 100644
--- a/plugins/MirOTR/MirOTR/src/svcs_menu.cpp
+++ b/plugins/MirOTR/MirOTR/src/svcs_menu.cpp
@@ -26,10 +26,10 @@ int StartOTR(MCONTACT hContact) {
INT_PTR SVC_StartOTR(WPARAM hContact, LPARAM lParam)
{
MCONTACT hSub;
- if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0)
+ if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0)) != 0)
hContact = hSub;
- if ( options.bHaveSecureIM && CallService("SecureIM/IsContactSecured", (WPARAM)hContact, 0) != 0 ) {
+ if ( options.bHaveSecureIM && CallService("SecureIM/IsContactSecured", hContact, 0) != 0 ) {
TCHAR msg[512];
mir_sntprintf(msg, 512, TranslateT(LANG_OTR_SECUREIM_STARTED), contact_get_nameT(hContact));
ShowError(msg);
@@ -46,10 +46,10 @@ INT_PTR SVC_StartOTR(WPARAM hContact, LPARAM lParam)
INT_PTR SVC_RefreshOTR(WPARAM hContact, LPARAM lParam)
{
MCONTACT hSub;
- if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0)
+ if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0)) != 0)
hContact = hSub;
- if ( options.bHaveSecureIM && CallService("SecureIM/IsContactSecured", (WPARAM)hContact, 0) != 0 ) {
+ if ( options.bHaveSecureIM && CallService("SecureIM/IsContactSecured", hContact, 0) != 0 ) {
TCHAR msg[512];
mir_sntprintf(msg, 512, TranslateT(LANG_OTR_SECUREIM_STARTED), contact_get_nameT(hContact));
ShowError(msg);
@@ -69,7 +69,7 @@ INT_PTR SVC_RefreshOTR(WPARAM hContact, LPARAM lParam)
int otr_disconnect_contact(MCONTACT hContact)
{
MCONTACT hSub;
- if(ServiceExists(MS_MC_GETMOSTONLINECONTACT) && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0)
+ if(ServiceExists(MS_MC_GETMOSTONLINECONTACT) && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0)) != 0)
hContact = hSub;
const char *proto = contact_get_proto(hContact);
@@ -100,7 +100,7 @@ INT_PTR SVC_StopOTR(WPARAM hContact, LPARAM lParam)
INT_PTR SVC_VerifyOTR(WPARAM hContact, LPARAM lParam)
{
MCONTACT hSub;
- if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0)
+ if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0)) != 0)
hContact = hSub;
ConnContext *context = otrl_context_find_miranda(otr_user_state, hContact);
@@ -166,7 +166,7 @@ hide_all:
if(proto && g_metaproto && strcmp(proto, g_metaproto) == 0) {
// make menu act as per most online subcontact
- hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0);
if (!hContact)
goto hide_all;
proto = contact_get_proto(hContact);
diff --git a/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp b/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp
index e07473eb15..fcc4b5e85a 100644
--- a/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp
+++ b/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp
@@ -66,11 +66,11 @@ void SetEncryptionStatus(MCONTACT hContact, TrustLevel level)
Srmm_ModifyIcon(hContact, &sid);
Srmm_ModifyIcon(hContact, &sid2);
- if (options.bHaveButtonsBar) CallService(MS_BB_SETBUTTONSTATE, (WPARAM)hContact, (LPARAM)&button);
+ if (options.bHaveButtonsBar) CallService(MS_BB_SETBUTTONSTATE, hContact, (LPARAM)&button);
db_set_dw(hContact, MODULENAME, "TrustLevel", level);
if (!chat_room && options.bHaveMetaContacts) {
- MCONTACT hMeta = (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
+ MCONTACT hMeta = (MCONTACT)CallService(MS_MC_GETMETACONTACT, hContact, 0);
MCONTACT hMostOnline = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hMeta, 0);
if(hMeta && hContact == hMostOnline)
SetEncryptionStatus(hMeta, level);
diff --git a/plugins/MirOTR/MirOTR/src/utils.cpp b/plugins/MirOTR/MirOTR/src/utils.cpp
index 6ed4c351f9..03fdbcac7a 100644
--- a/plugins/MirOTR/MirOTR/src/utils.cpp
+++ b/plugins/MirOTR/MirOTR/src/utils.cpp
@@ -136,14 +136,14 @@ char* contact_get_id(MCONTACT hContact, bool bNameOnError) {
}
}
if (!pszUniqueID && bNameOnError) {
- char *name = (char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, 0);
+ char *name = (char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, 0);
if (name) pszUniqueID = mir_strdup(name);
}
return pszUniqueID;
}
__inline const TCHAR* contact_get_nameT(MCONTACT hContact) {
- return (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
+ return (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
}
__inline const char* contact_get_proto(MCONTACT hContact) {
@@ -152,7 +152,7 @@ __inline const char* contact_get_proto(MCONTACT hContact) {
}
__inline const char* contact_get_account(MCONTACT hContact) {
- char *uacc = (char *)CallService(MS_PROTO_GETCONTACTBASEACCOUNT, (WPARAM)hContact, 0);
+ char *uacc = (char *)CallService(MS_PROTO_GETCONTACTBASEACCOUNT, hContact, 0);
return uacc;
}
@@ -364,7 +364,7 @@ bool GetEncryptionStatus(MCONTACT hContact) {
if (!chat_room) {
if (options.bHaveMetaContacts) {
- HANDLE hMeta = (HANDLE)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
+ HANDLE hMeta = (HANDLE)CallService(MS_MC_GETMETACONTACT, hContact, 0);
if(hMeta && hContact == (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hMeta, 0)) {
//strcat(dbg_msg, "\nrecursing for meta");
return GetEncryptionStatus(hMeta);
diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp
index b8cebd541e..483c31652a 100644
--- a/plugins/MirandaG15/src/CAppletManager.cpp
+++ b/plugins/MirandaG15/src/CAppletManager.cpp
@@ -464,7 +464,7 @@ bool CAppletManager::ActivateChatScreen(MCONTACT hContact)
tstring CAppletManager::GetContactDisplayname(MCONTACT hContact,bool bShortened)
{
if(!bShortened || !CConfig::GetBoolSetting(NOTIFY_NICKCUTOFF))
- return (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
+ return (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
tstring strNick = GetContactDisplayname(hContact,false);
if(strNick.length() > (tstring::size_type)CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET))
@@ -791,7 +791,7 @@ bool CAppletManager::IsSubContact(MCONTACT hContact)
return false;
bool bIsSubcontact = db_get_b(hContact,"MetaContacts","IsSubcontact",0);
return bIsSubcontact;
- // HANDLE hMetaContact = (HANDLE)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, NULL);
+ // HANDLE hMetaContact = (HANDLE)CallService(MS_MC_GETMETACONTACT, hContact, NULL);
// return hMetaContact != NULL;
}
@@ -815,7 +815,7 @@ void CAppletManager::SendTypingNotification(MCONTACT hContact,bool bEnable)
if (!db_get_b(hContact, "SRMsg", "SupportTyping", db_get_b(NULL, "SRMsg", "DefaultTyping", 1)))
return;
- char *szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, hContact, 0);
if (!szProto)
return;
@@ -849,7 +849,7 @@ HANDLE CAppletManager::SendMessageToContact(MCONTACT hContact,tstring strMessage
pJob->dwTimestamp = GetTickCount();
pJob->hContact = hContact;
- char *szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, hContact, 0);
tstring strProto = toTstring(szProto);
CIRCConnection *pIRCCon = CAppletManager::GetInstance()->GetIRCConnection(strProto);
@@ -945,7 +945,7 @@ bool CAppletManager::IsMessageWindowOpen(MCONTACT hContact)
void CAppletManager::MarkMessageAsRead(MCONTACT hContact,HANDLE hEvent)
{
db_event_markRead(hContact, hEvent);
- CallService(MS_CLIST_REMOVEEVENT, (WPARAM)hContact, (LPARAM)hEvent);
+ CallService(MS_CLIST_REMOVEEVENT, hContact, (LPARAM)hEvent);
}
//************************************************************************
@@ -1216,7 +1216,7 @@ void CAppletManager::DeleteIRCHistory(MCONTACT hContact)
//************************************************************************
CIRCHistory *CAppletManager::CreateIRCHistory(MCONTACT hContact,tstring strChannel)
{
- char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, hContact, 0);
if(!szProto)
return NULL;
diff --git a/plugins/MirandaG15/src/CChatScreen.cpp b/plugins/MirandaG15/src/CChatScreen.cpp
index 4eef6df9b1..6fb7cd99e9 100644
--- a/plugins/MirandaG15/src/CChatScreen.cpp
+++ b/plugins/MirandaG15/src/CChatScreen.cpp
@@ -233,7 +233,7 @@ bool CChatScreen::SetContact(MCONTACT hContact)
}
// Check if the contact is valid
- char *szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, hContact, 0);
m_strProto = toTstring(szProto);
CIRCConnection *pIRCCon = CAppletManager::GetInstance()->GetIRCConnection(m_strProto);
diff --git a/plugins/MirandaG15/src/CContactList.cpp b/plugins/MirandaG15/src/CContactList.cpp
index c22859cce5..046582e2e0 100644
--- a/plugins/MirandaG15/src/CContactList.cpp
+++ b/plugins/MirandaG15/src/CContactList.cpp
@@ -83,7 +83,7 @@ tstring CContactList::GetContactGroupPath(MCONTACT hContact)
tstring strGroup = _T("");
if(db_get_b(0, "MetaContacts", "Enabled", 1) && CAppletManager::IsSubContact(hContact))
{
- MCONTACT hMetaContact = (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, NULL);
+ MCONTACT hMetaContact = (MCONTACT)CallService(MS_MC_GETMETACONTACT, hContact, NULL);
if(CConfig::GetBoolSetting(CLIST_USEGROUPS))
strGroup = CAppletManager::GetContactGroup(hMetaContact);
@@ -150,17 +150,17 @@ void CContactList::AddContact(MCONTACT hContact)
pGroup->sort(CContactList::CompareEntries);
// check that all subcontacts exist
- int numContacts = CallService(MS_MC_GETNUMCONTACTS,(WPARAM)hContact,0);
+ int numContacts = CallService(MS_MC_GETNUMCONTACTS,hContact,0);
MCONTACT hSubContact = NULL;
for(int i=0;i<numContacts;i++) {
- hSubContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, (LPARAM)i);
+ hSubContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, hContact, (LPARAM)i);
RemoveContact(hSubContact);
AddContact(hSubContact);
}
return;
}
else if(CAppletManager::IsSubContact(hContact)) {
- MCONTACT hMetaContact = (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
+ MCONTACT hMetaContact = (MCONTACT)CallService(MS_MC_GETMETACONTACT, hContact, 0);
// check that the metacontact exists
if(!FindContact(hMetaContact)) {
AddContact(hMetaContact);
@@ -279,9 +279,9 @@ void CContactList::RemoveContact(MCONTACT hContact) {
else {
pGroup->RemoveGroup(((CListContainer<CContactListEntry*,CContactListGroup*>*)pContactEntry)->GetGroupData());
// Reenumerate all subcontacts (maybe MetaContacts was disabled
- int numContacts = CallService(MS_MC_GETNUMCONTACTS,(WPARAM)hContact,0);
+ int numContacts = CallService(MS_MC_GETNUMCONTACTS,hContact,0);
for(int i=0;i<numContacts;i++) {
- MCONTACT hSubContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT,(WPARAM)hContact, (LPARAM)i);
+ MCONTACT hSubContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT,hContact, (LPARAM)i);
if(!FindContact(hSubContact))
AddContact(hSubContact);
}
diff --git a/plugins/MobileState/src/main.cpp b/plugins/MobileState/src/main.cpp
index 9130103774..afc61158f9 100644
--- a/plugins/MobileState/src/main.cpp
+++ b/plugins/MobileState/src/main.cpp
@@ -103,7 +103,7 @@ int onModulesLoaded(WPARAM wParam,LPARAM lParam)
// Set initial value for all contacts
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
- ExtraIconsApply((WPARAM)hContact, 1);
+ ExtraIconsApply(hContact, 1);
return 0;
}
diff --git a/plugins/ModernOpt/src/mopt_ignore.cpp b/plugins/ModernOpt/src/mopt_ignore.cpp
index 77437f1b74..69014d0acc 100644
--- a/plugins/ModernOpt/src/mopt_ignore.cpp
+++ b/plugins/ModernOpt/src/mopt_ignore.cpp
@@ -50,7 +50,7 @@ static void ResetListOptions(HWND hwndList)
static void SetAllContactIcons(HWND hwndList, int count)
{
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- DWORD hItem = SendMessage(hwndList,CLM_FINDCONTACT,(WPARAM)hContact,0);
+ DWORD hItem = SendMessage(hwndList,CLM_FINDCONTACT,hContact,0);
for (int i = 0; i < count; ++i)
SendMessage(hwndList,CLM_SETEXTRAIMAGE,hItem,MAKELPARAM(i, i+1));
if (!db_get_b(hContact,"CList","Hidden",0))
diff --git a/plugins/Msg_Export/src/utils.cpp b/plugins/Msg_Export/src/utils.cpp
index cfe4c7d70b..0dc51f7af1 100755
--- a/plugins/Msg_Export/src/utils.cpp
+++ b/plugins/Msg_Export/src/utils.cpp
@@ -257,7 +257,7 @@ void DisplayLastError(const TCHAR *pszError)
const TCHAR* NickFromHandle(MCONTACT hContact)
{
- const TCHAR *psz = (const TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
+ const TCHAR *psz = (const TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
if (psz )
return psz;
return pszNickError;
diff --git a/plugins/NewEventNotify/src/main.cpp b/plugins/NewEventNotify/src/main.cpp
index 440c997460..a100978f0a 100644
--- a/plugins/NewEventNotify/src/main.cpp
+++ b/plugins/NewEventNotify/src/main.cpp
@@ -71,7 +71,7 @@ int HookedNewEvent(WPARAM hContact, LPARAM lParam)
db_event_get((HANDLE)lParam, &dbe);
//do not show popups for sub-contacts
- if (hContact && ServiceExists(MS_MC_GETMETACONTACT) && CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0))
+ if (hContact && ServiceExists(MS_MC_GETMETACONTACT) && CallService(MS_MC_GETMETACONTACT, hContact, 0))
return 0;
//custom database event types
diff --git a/plugins/NewEventNotify/src/popup.cpp b/plugins/NewEventNotify/src/popup.cpp
index b12587f750..3f1ce3646a 100644
--- a/plugins/NewEventNotify/src/popup.cpp
+++ b/plugins/NewEventNotify/src/popup.cpp
@@ -463,7 +463,7 @@ int PopupShow(PLUGIN_OPTIONS* pluginOptions, MCONTACT hContact, HANDLE hEvent, U
_tcsncpy(pudw.lptzText, TranslateTS(sampleEvent), MAX_SECONDLINE);
}
else { // get the needed event data
- _tcsncpy(pudw.lptzContactName, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR), MAX_CONTACTNAME);
+ _tcsncpy(pudw.lptzContactName, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR), MAX_CONTACTNAME);
_tcsncpy(pudw.lptzText, ptrT(GetEventPreview(&dbe)), MAX_SECONDLINE);
}
diff --git a/plugins/NewXstatusNotify/src/indsnd.cpp b/plugins/NewXstatusNotify/src/indsnd.cpp
index b4c0330129..f64b225988 100644
--- a/plugins/NewXstatusNotify/src/indsnd.cpp
+++ b/plugins/NewXstatusNotify/src/indsnd.cpp
@@ -332,7 +332,7 @@ void SetAllContactsIcons(HWND hwndList)
BYTE EnableSounds, EnablePopups, EnableXStatus, EnableLogging;
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0);
if (hItem) {
char *szProto = GetContactProto(hContact);
if (szProto) {
@@ -571,7 +571,7 @@ INT_PTR CALLBACK DlgProcFiltering(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE)SendMessage(hList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendMessage(hList, CLM_FINDCONTACT, hContact, 0);
if (hItem) {
if (GetExtraImage(hList, hItem, EXTRA_IMAGE_SOUND) == EXTRA_IMAGE_SOUND)
db_unset(hContact, MODULE, "EnableSounds");
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp
index 30e5927735..6c9f024712 100644
--- a/plugins/NewXstatusNotify/src/main.cpp
+++ b/plugins/NewXstatusNotify/src/main.cpp
@@ -434,11 +434,11 @@ int ProcessStatus(DBCONTACTWRITESETTING *cws, MCONTACT hContact)
db_set_w(hContact, "UserOnline", "OldStatus", newStatus);
//If *Miranda* ignores the UserOnline event, exit!
- if (CallService(MS_IGNORE_ISIGNORED, (WPARAM)hContact, IGNOREEVENT_USERONLINE))
+ if (CallService(MS_IGNORE_ISIGNORED, hContact, IGNOREEVENT_USERONLINE))
return 0;
//If we get here, we have to notify the Hooks.
- NotifyEventHooks(hHookContactStatusChanged, (WPARAM)hContact, (LPARAM)MAKELPARAM(oldStatus, newStatus));
+ NotifyEventHooks(hHookContactStatusChanged, hContact, (LPARAM)MAKELPARAM(oldStatus, newStatus));
return 1;
}
else if ( !strcmp(cws->szModule, "CList") && !strcmp(cws->szSetting, "StatusMsg")) {
@@ -619,7 +619,7 @@ void ShowStatusChangePopup(MCONTACT hContact, char *szProto, WORD oldStatus, WOR
POPUPDATAT ppd = {0};
ppd.lchContact = hContact;
ppd.lchIcon = LoadSkinnedProtoIcon(szProto, newStatus);
- _tcsncpy(ppd.lptzContactName, (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GSMDF_TCHAR), MAX_CONTACTNAME);
+ _tcsncpy(ppd.lptzContactName, (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GSMDF_TCHAR), MAX_CONTACTNAME);
if (opt.ShowGroup) { //add group name to popup title
DBVARIANT dbv;
@@ -698,7 +698,7 @@ void BlinkIcon(MCONTACT hContact, char* szProto, WORD status)
cle.pszService = "UserOnline/Description";
cle.ptszTooltip = stzTooltip;
- TCHAR *hlpName = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
+ TCHAR *hlpName = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
mir_sntprintf(stzTooltip, SIZEOF(stzTooltip), TranslateT("%s is now %s"), hlpName, StatusList[Index(status)].lpzStandardText);
CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cle);
}
@@ -776,7 +776,7 @@ int ContactStatusChanged(WPARAM hContact, LPARAM lParam)
}
if (strcmp(szProto, szMetaModuleName) == 0) { //this contact is Meta
- MCONTACT hSubContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ MCONTACT hSubContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0);
hlpProto = GetContactProto(hSubContact);
if (hlpProto == NULL)
return 0;
@@ -842,7 +842,7 @@ int ContactStatusChanged(WPARAM hContact, LPARAM lParam)
TCHAR stzDate[MAX_STATUSTEXT], stzTime[MAX_STATUSTEXT];
TCHAR stzText[1024];
- _tcscpy(stzName, (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR));
+ _tcscpy(stzName, (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR));
_tcsncpy(stzStatus, StatusList[Index(newStatus)].lpzStandardText, MAX_STATUSTEXT);
_tcsncpy(stzOldStatus, StatusList[Index(oldStatus)].lpzStandardText, MAX_STATUSTEXT);
GetTimeFormat(LOCALE_USER_DEFAULT, 0, NULL,_T("HH':'mm"), stzTime, SIZEOF(stzTime));
diff --git a/plugins/NewXstatusNotify/src/popup.cpp b/plugins/NewXstatusNotify/src/popup.cpp
index 8d36c769ab..d691d12118 100644
--- a/plugins/NewXstatusNotify/src/popup.cpp
+++ b/plugins/NewXstatusNotify/src/popup.cpp
@@ -80,13 +80,13 @@ void PopupAction(HWND hWnd, BYTE action)
if (hContact && hContact != INVALID_CONTACT_ID) {
switch (action) {
case PCA_OPENMESSAGEWND:
- CallServiceSync(MS_MSG_SENDMESSAGET, (WPARAM)hContact, 0);
+ CallServiceSync(MS_MSG_SENDMESSAGET, hContact, 0);
break;
case PCA_OPENMENU:
{
POINT pt = {0};
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)hContact, 0);
+ HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, hContact, 0);
GetCursorPos(&pt);
TrackPopupMenu(hMenu, 0, pt.x, pt.y, 0, hWnd, NULL);
DestroyMenu(hMenu);
@@ -94,11 +94,11 @@ void PopupAction(HWND hWnd, BYTE action)
return;
case PCA_OPENDETAILS:
- CallServiceSync(MS_USERINFO_SHOWDIALOG, (WPARAM)hContact, 0);
+ CallServiceSync(MS_USERINFO_SHOWDIALOG, hContact, 0);
break;
case PCA_OPENHISTORY:
- CallServiceSync(MS_HISTORY_SHOWCONTACTHISTORY, (WPARAM)hContact, 0);
+ CallServiceSync(MS_HISTORY_SHOWCONTACTHISTORY, hContact, 0);
break;
case PCA_CLOSEPOPUP:
diff --git a/plugins/New_GPG/src/main.cpp b/plugins/New_GPG/src/main.cpp
index c145fb41b0..5117e2b418 100755
--- a/plugins/New_GPG/src/main.cpp
+++ b/plugins/New_GPG/src/main.cpp
@@ -1299,7 +1299,7 @@ static INT_PTR CALLBACK DlgProcNewKeyDialog(HWND hwndDlg, UINT msg, WPARAM wPara
mir_free(tmp);
tmp = new TCHAR [256];
_tcscpy(tmp, TranslateT("Received key from "));
- _tcscat(tmp, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, (LPARAM)GCDNF_TCHAR));
+ _tcscat(tmp, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, (LPARAM)GCDNF_TCHAR));
SetDlgItemText(hwndDlg, IDC_KEY_FROM, tmp);
delete [] tmp;
}
diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp
index 70ce62ddf5..af59cbe729 100755
--- a/plugins/New_GPG/src/messages.cpp
+++ b/plugins/New_GPG/src/messages.cpp
@@ -38,7 +38,7 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD flags
if(!isContactSecured(hContact))
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info: received encrypted message from: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR))+" with turned off encryption");
+ debuglog<<std::string(time_str()+": info: received encrypted message from: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR))+" with turned off encryption");
if(MessageBox(0, TranslateT("We received encrypted message from contact with encryption turned off.\nDo you want to turn on encryption for this contact?"), TranslateT("Warning"), MB_YESNO) == IDYES)
{
if(!isContactHaveKey(hContact))
@@ -70,7 +70,7 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD flags
}
else if(bDebugLog)
{
- debuglog<<std::string(time_str()+": info: received encrypted message from: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info: received encrypted message from: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
}
boost::algorithm::erase_all(str, "\r");
s2 += _tcslen(_T("-----END PGP MESSAGE-----"));
@@ -104,13 +104,13 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD flags
dbsetting += "_Password";
pass = UniGetContactSettingUtf(NULL, szGPGModuleName, dbsetting.c_str(), _T(""));
if(pass[0] && bDebugLog)
- debuglog<<std::string(time_str()+": info: found password in database for key ID: "+inkeyid+", trying to decrypt message from "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR))+" with password");
+ debuglog<<std::string(time_str()+": info: found password in database for key ID: "+inkeyid+", trying to decrypt message from "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR))+" with password");
}
else
{
pass = UniGetContactSettingUtf(NULL, szGPGModuleName, "szKeyPassword", _T(""));
if(pass[0] && bDebugLog)
- debuglog<<std::string(time_str()+": info: found password for all keys in database, trying to decrypt message from "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR))+" with password");
+ debuglog<<std::string(time_str()+": info: found password for all keys in database, trying to decrypt message from "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR))+" with password");
}
if(pass && pass[0])
{
@@ -120,12 +120,12 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD flags
else if(password && password[0])
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info: found password in memory, trying to decrypt message from "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR))+" with password");
+ debuglog<<std::string(time_str()+": info: found password in memory, trying to decrypt message from "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR))+" with password");
cmd.push_back(L"--passphrase");
cmd.push_back(password);
}
else if (bDebugLog)
- debuglog<<std::string(time_str()+": info: passwords not found in database or memory, trying to decrypt message from "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR))+" with out password");
+ debuglog<<std::string(time_str()+": info: passwords not found in database or memory, trying to decrypt message from "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR))+" with out password");
mir_free(pass);
mir_free(inkeyid);
}
@@ -175,7 +175,7 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD flags
while(out.find("public key decryption failed: bad passphrase") != string::npos)
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info: failed to decrypt messaage from "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR))+" password needed, trying to get one");
+ debuglog<<std::string(time_str()+": info: failed to decrypt messaage from "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR))+" password needed, trying to get one");
if(_terminate)
{
BYTE enc = db_get_b(hContact, szGPGModuleName, "GPGEncryption", 0);
@@ -200,7 +200,7 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD flags
if(password)
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info: found password in memory, trying to decrypt message from "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info: found password in memory, trying to decrypt message from "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
std::vector<wstring> tmp;
tmp.push_back(L"--passphrase");
tmp.push_back(password);
@@ -608,7 +608,7 @@ void SendMsgSvc_func(MCONTACT hContact, char *msg, DWORD flags)
if(bStripTags && bAppendTags)
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info: stripping tags in outgoing message, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info: stripping tags in outgoing message, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
strip_tags(str);
}
/* for(std::wstring::size_type i = str.find(_T("\r\n")); i != std::wstring::npos; i = str.find(_T("\r\n"), i+1))
@@ -772,14 +772,14 @@ void SendMsgSvc_func(MCONTACT hContact, char *msg, DWORD flags)
hcontact_data[metaGetContact(hContact)].msgs_to_pass.push_back(str_event);
if(bDebugLog)
{
- debuglog<<std::string(time_str() + toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR)) +"is subcontact of" + toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)metaGetContact(hContact), GCDNF_TCHAR)));
+ debuglog<<std::string(time_str() + toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)) +"is subcontact of" + toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)metaGetContact(hContact), GCDNF_TCHAR)));
debuglog<<std::string(time_str()+": adding event to metacontact: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)metaGetContact(hContact), GCDNF_TCHAR))+" on send message.");
}
HistoryLog(metaGetContact(hContact), db_event((char*)str_event.c_str(), 0,0, DBEF_SENT|dbflags));
}*/ //unneeded ?
// hcontact_data[hContact].msgs_to_pass.push_back(str_event);
if(bDebugLog)
- debuglog<<std::string(time_str()+": adding event to contact: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR))+" on send message.");
+ debuglog<<std::string(time_str()+": adding event to contact: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR))+" on send message.");
//HistoryLog(hContact, db_event((char*)str_event.c_str(), 0,0, dbflags|DBEF_SENT));
if(!(flags & PREF_UTF))
flags |= PREF_UTF;
@@ -844,13 +844,13 @@ int HookSendMsg(WPARAM w, LPARAM l)
if(isContactSecured(hContact) && strstr((char*)dbei->pBlob, "-----BEGIN PGP MESSAGE-----")) //our service data, can be double added by metacontacts e.t.c.
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info(send handler): block pgp message event, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info(send handler): block pgp message event, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
return 1;
}
if(bAutoExchange && (strstr((char*)dbei->pBlob, "-----PGP KEY RESPONSE-----") || strstr((char*)dbei->pBlob, "-----PGP KEY REQUEST-----"))) ///do not show service data in history
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info(send handler): block pgp key request/response event, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info(send handler): block pgp key request/response event, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
return 1;
}
}
@@ -860,27 +860,27 @@ int HookSendMsg(WPARAM w, LPARAM l)
if(!isContactHaveKey(hContact))
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info: contact have not key, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info: contact have not key, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
if(bAutoExchange && !strstr((char*)dbei->pBlob, "-----PGP KEY REQUEST-----") && !strstr((char*)dbei->pBlob, "-----BEGIN PGP PUBLIC KEY BLOCK-----") && gpg_valid)
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info: checking for autoexchange possibility, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info: checking for autoexchange possibility, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
LPSTR proto = GetContactProto(hContact);
DWORD uin = db_get_dw(hContact, proto, "UIN", 0);
if(uin)
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info(autoexchange): protocol looks like icq, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info(autoexchange): protocol looks like icq, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
char *proto = GetContactProto(hContact);
if( ProtoServiceExists(proto, PS_ICQ_CHECKCAPABILITY)) {
if(bDebugLog)
- debuglog<<std::string(time_str()+": info(autoexchange, icq): checking for autoexchange icq capability, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info(autoexchange, icq): checking for autoexchange icq capability, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
ICQ_CUSTOMCAP cap = {0};
strcpy(cap.caps, "GPG AutoExchange");
- if( ProtoCallService(proto, PS_ICQ_CHECKCAPABILITY, (WPARAM)hContact, (LPARAM)&cap)) {
+ if( ProtoCallService(proto, PS_ICQ_CHECKCAPABILITY, hContact, (LPARAM)&cap)) {
if(bDebugLog)
- debuglog<<std::string(time_str()+": info(autoexchange, icq): sending key requiest, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info(autoexchange, icq): sending key requiest, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
CallContactService(hContact, PSS_MESSAGE, (dbei->flags & DBEF_UTF) ? PREF_UTF : 0, (LPARAM)"-----PGP KEY REQUEST-----");
hcontact_data[hContact].msgs_to_send.push_back((char*)dbei->pBlob);
boost::thread *thr = new boost::thread(boost::bind(send_encrypted_msgs_thread, (void*)hContact));
@@ -895,7 +895,7 @@ int HookSendMsg(WPARAM w, LPARAM l)
if(jid[0])
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info(autoexchange): protocol looks like jabber, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info(autoexchange): protocol looks like jabber, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
extern list <JabberAccount*> Accounts;
list<JabberAccount*>::iterator end = Accounts.end();
for(list<JabberAccount*>::iterator p = Accounts.begin(); p != end; p++)
@@ -915,7 +915,7 @@ int HookSendMsg(WPARAM w, LPARAM l)
if(str.find(_T("GPG_Key_Auto_Exchange:0")) != string::npos)
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info(autoexchange, jabber): autoexchange capability found, sending key request, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info(autoexchange, jabber): autoexchange capability found, sending key request, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
CallContactService(hContact, PSS_MESSAGE, (dbei->flags & DBEF_UTF) ? PREF_UTF : 0, (LPARAM)"-----PGP KEY REQUEST-----");
hcontact_data[hContact].msgs_to_send.push_back((char*)dbei->pBlob);
boost::thread *thr = new boost::thread(boost::bind(send_encrypted_msgs_thread, (void*)hContact));
@@ -968,7 +968,7 @@ int HookSendMsg(WPARAM w, LPARAM l)
{
hcontact_data[hContact].msgs_to_pass.erase(i);
if(bDebugLog)
- debuglog<<std::string(time_str()+": event message: \""+(char*)dbei->pBlob+"\" passed event filter, contact "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR))+", message is in allowed list");
+ debuglog<<std::string(time_str()+": event message: \""+(char*)dbei->pBlob+"\" passed event filter, contact "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR))+", message is in allowed list");
event_processing_mutex.unlock();
return 0;
}
@@ -983,7 +983,7 @@ int HookSendMsg(WPARAM w, LPARAM l)
if(!isContactSecured(hContact))
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": event message: \""+(char*)dbei->pBlob+"\" passed event filter, contact "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR))+" is unsecured");
+ debuglog<<std::string(time_str()+": event message: \""+(char*)dbei->pBlob+"\" passed event filter, contact "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR))+" is unsecured");
return 0;
}
if(!(dbei->flags & DBEF_SENT) && metaIsProtoMetaContacts((MCONTACT)w))
@@ -994,7 +994,7 @@ int HookSendMsg(WPARAM w, LPARAM l)
if(strstr(tmp, "-----BEGIN PGP MESSAGE-----"))
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info(send handler): block pgp message event, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info(send handler): block pgp message event, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
return 1;
}
}
diff --git a/plugins/New_GPG/src/metacontacts.cpp b/plugins/New_GPG/src/metacontacts.cpp
index 31b320737c..876071191a 100644
--- a/plugins/New_GPG/src/metacontacts.cpp
+++ b/plugins/New_GPG/src/metacontacts.cpp
@@ -32,7 +32,7 @@ bool metaIsProtoMetaContacts(MCONTACT hContact)
bool metaIsDefaultSubContact(MCONTACT hContact)
{
if(bMetaContacts)
- return (MCONTACT)CallService(MS_MC_GETDEFAULTCONTACT,(WPARAM)CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0),0)==hContact;
+ return (MCONTACT)CallService(MS_MC_GETDEFAULTCONTACT,(WPARAM)CallService(MS_MC_GETMETACONTACT,hContact,0),0)==hContact;
return false;
}
@@ -40,14 +40,14 @@ MCONTACT metaGetContact(MCONTACT hContact)
{
if(bMetaContacts)
if(metaIsSubcontact(hContact))
- return (MCONTACT)CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0);
+ return (MCONTACT)CallService(MS_MC_GETMETACONTACT,hContact,0);
return NULL;
}
bool metaIsSubcontact(MCONTACT hContact)
{
if(bMetaContacts)
- return CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0) != 0;
+ return CallService(MS_MC_GETMETACONTACT,hContact,0) != 0;
return false;
}
@@ -55,7 +55,7 @@ MCONTACT metaGetMostOnline(MCONTACT hContact)
{
if(bMetaContacts)
if(metaIsProtoMetaContacts(hContact))
- return (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT,(WPARAM)hContact,0);
+ return (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT,hContact,0);
return NULL;
}
@@ -63,20 +63,20 @@ MCONTACT metaGetDefault(MCONTACT hContact)
{
if(bMetaContacts)
if(metaIsProtoMetaContacts(hContact))
- return (MCONTACT)CallService(MS_MC_GETDEFAULTCONTACT,(WPARAM)hContact,0);
+ return (MCONTACT)CallService(MS_MC_GETDEFAULTCONTACT,hContact,0);
return NULL;
}
DWORD metaGetContactsNum(MCONTACT hContact)
{
if(bMetaContacts)
- return CallService(MS_MC_GETNUMCONTACTS, (WPARAM)hContact, 0);
+ return CallService(MS_MC_GETNUMCONTACTS, hContact, 0);
return 0;
}
MCONTACT metaGetSubcontact(MCONTACT hContact, int num)
{
if(bMetaContacts)
- return (MCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, (LPARAM)num);
+ return (MCONTACT)CallService(MS_MC_GETSUBCONTACT, hContact, (LPARAM)num);
return 0;
}
diff --git a/plugins/New_GPG/src/options.cpp b/plugins/New_GPG/src/options.cpp
index 019036e6ce..cf05777171 100755
--- a/plugins/New_GPG/src/options.cpp
+++ b/plugins/New_GPG/src/options.cpp
@@ -122,7 +122,7 @@ static INT_PTR CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
int i = 1, iRow = 0;
for(MCONTACT hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact)) {
if(isContactHaveKey(hContact)) {
- TCHAR *name = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
+ TCHAR *name = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
item.mask = LVIF_TEXT;
item.iItem = i;
item.iSubItem = 0;
diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp
index c2d1be1b0f..c20a6645de 100755
--- a/plugins/New_GPG/src/utilities.cpp
+++ b/plugins/New_GPG/src/utilities.cpp
@@ -1076,7 +1076,7 @@ bool isContactSecured(MCONTACT hContact)
if(!gpg_enc)
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": encryption is turned off for "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": encryption is turned off for "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
return false;
}
if(!metaIsProtoMetaContacts(hContact))
@@ -1086,13 +1086,13 @@ bool isContactSecured(MCONTACT hContact)
{
mir_free(key);
if(bDebugLog)
- debuglog<<std::string(time_str()+": encryption is turned off for "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": encryption is turned off for "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
return false;
}
mir_free(key);
}
if(bDebugLog)
- debuglog<<std::string(time_str()+": encryption is turned on for "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": encryption is turned on for "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
return true;
}
diff --git a/plugins/NewsAggregator/Src/ExportImport.cpp b/plugins/NewsAggregator/Src/ExportImport.cpp
index 3dc225ec06..124d1981c0 100644
--- a/plugins/NewsAggregator/Src/ExportImport.cpp
+++ b/plugins/NewsAggregator/Src/ExportImport.cpp
@@ -149,7 +149,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
}
MCONTACT hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
- CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)MODULE);
+ CallService(MS_PROTO_ADDTOCONTACT, hContact, (LPARAM)MODULE);
db_set_ts(hContact, MODULE, "Nick", title);
db_set_ts(hContact, MODULE, "URL", url);
db_set_ts(hContact, MODULE, "Homepage", siteurl);
diff --git a/plugins/NewsAggregator/Src/Options.cpp b/plugins/NewsAggregator/Src/Options.cpp
index c2c64edd6b..0b9ad7ec4d 100644
--- a/plugins/NewsAggregator/Src/Options.cpp
+++ b/plugins/NewsAggregator/Src/Options.cpp
@@ -58,7 +58,7 @@ INT_PTR CALLBACK DlgProcAddFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
}
MCONTACT hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
- CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)MODULE);
+ CallService(MS_PROTO_ADDTOCONTACT, hContact, (LPARAM)MODULE);
GetDlgItemText(hwndDlg, IDC_FEEDTITLE, str, SIZEOF(str));
db_set_ts(hContact, MODULE, "Nick", str);
HWND hwndList = (HWND)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
@@ -518,7 +518,7 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
if ( lstrcmp(dbURL, url))
continue;
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
+ CallService(MS_DB_CONTACT_DELETE, hContact, 0);
ListView_DeleteItem(hwndList, sel);
break;
}
diff --git a/plugins/NoHistory/src/dllmain.cpp b/plugins/NoHistory/src/dllmain.cpp
index 6b13f688ea..82fc7ce945 100644
--- a/plugins/NoHistory/src/dllmain.cpp
+++ b/plugins/NoHistory/src/dllmain.cpp
@@ -221,7 +221,7 @@ int IconPressed(WPARAM hContact, LPARAM lParam)
char *proto = GetContactProto(hContact);
bool chat_room = (proto && db_get_b(hContact, proto, "ChatRoom", 0) != 0);
if (!chat_room)
- ServiceToggle((WPARAM)hContact, 0);
+ ServiceToggle(hContact, 0);
return 0;
}
diff --git a/plugins/NoHistory/src/options.cpp b/plugins/NoHistory/src/options.cpp
index a963e796a0..684d7bdc5a 100644
--- a/plugins/NoHistory/src/options.cpp
+++ b/plugins/NoHistory/src/options.cpp
@@ -89,7 +89,7 @@ static void SetAllContactIcons(HWND hwndList)
bool chat_room = (proto && db_get_b(hContact, proto, "ChatRoom", 0) != 0);
if (!chat_room) {
- HANDLE hItem=(HANDLE)SendMessage(hwndList,CLM_FINDCONTACT,(WPARAM)hContact,0);
+ HANDLE hItem=(HANDLE)SendMessage(hwndList,CLM_FINDCONTACT,hContact,0);
if (hItem) {
bool disabled = (db_get_b(hContact, MODULE, DBSETTING_REMOVE, 0) == 1);
SendMessage(hwndList,CLM_SETEXTRAIMAGE,(WPARAM)hItem,MAKELPARAM(0,disabled?1:0));
@@ -203,7 +203,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
bool chat_room = (proto && db_get_b(hContact, proto, "ChatRoom", 0) != 0);
if (!chat_room) {
- HANDLE hItem = (HANDLE)SendMessage(hwndList,CLM_FINDCONTACT,(WPARAM)hContact,0);
+ HANDLE hItem = (HANDLE)SendMessage(hwndList,CLM_FINDCONTACT,hContact,0);
if (hItem) {
int iImage = SendMessage(hwndList,CLM_GETEXTRAIMAGE,(WPARAM)hItem,MAKELPARAM(0,0));
db_set_b(hContact, MODULE, DBSETTING_REMOVE, iImage==1?1:0);
diff --git a/plugins/Non-IM Contact/src/contactinfo.cpp b/plugins/Non-IM Contact/src/contactinfo.cpp
index 2daea133e2..bb7da6cdd7 100644
--- a/plugins/Non-IM Contact/src/contactinfo.cpp
+++ b/plugins/Non-IM Contact/src/contactinfo.cpp
@@ -635,8 +635,8 @@ INT_PTR ImportContacts(WPARAM wParam, LPARAM lParam)
msg("contact did get created","");
continue;
}
- CallService(MS_PROTO_ADDTOCONTACT,(WPARAM)hContact,(LPARAM)MODNAME);
- CallService(MS_IGNORE_IGNORE, (WPARAM)hContact, IGNOREEVENT_USERONLINE);
+ CallService(MS_PROTO_ADDTOCONTACT,hContact,(LPARAM)MODNAME);
+ CallService(MS_IGNORE_IGNORE, hContact, IGNOREEVENT_USERONLINE);
db_set_s(hContact, MODNAME, "Nick", Translate("New Non-IM Contact"));
db_set_s(hContact, MODNAME, "Name", name);
db_set_s(hContact, MODNAME, "ProgramString", program);
diff --git a/plugins/Non-IM Contact/src/dialog.cpp b/plugins/Non-IM Contact/src/dialog.cpp
index 2cf8ce46f7..0b79653a20 100644
--- a/plugins/Non-IM Contact/src/dialog.cpp
+++ b/plugins/Non-IM Contact/src/dialog.cpp
@@ -308,12 +308,12 @@ INT_PTR addContact(WPARAM wParam,LPARAM lParam)
{
char tmp[256];
MCONTACT hContact = (MCONTACT) CallService(MS_DB_CONTACT_ADD, 0, 0);
- CallService(MS_PROTO_ADDTOCONTACT,(WPARAM)hContact,(LPARAM)MODNAME);
- CallService(MS_IGNORE_IGNORE, (WPARAM)hContact, IGNOREEVENT_USERONLINE);
+ CallService(MS_PROTO_ADDTOCONTACT,hContact,(LPARAM)MODNAME);
+ CallService(MS_IGNORE_IGNORE, hContact, IGNOREEVENT_USERONLINE);
db_set_ts(hContact, MODNAME, "Nick", TranslateT("New Non-IM Contact"));
DoPropertySheet(hContact, hInst);
if (!db_get_static(hContact, MODNAME, "Name", tmp))
- CallService(MS_DB_CONTACT_DELETE,(WPARAM)hContact,0);
+ CallService(MS_DB_CONTACT_DELETE,hContact,0);
replaceAllStrings(hContact);
return 0;
}
@@ -324,13 +324,13 @@ INT_PTR editContact(WPARAM wParam,LPARAM lParam)
char tmp[256];
if (!hContact) {
hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
- CallService(MS_PROTO_ADDTOCONTACT,(WPARAM)hContact,(LPARAM)MODNAME);
- CallService(MS_IGNORE_IGNORE, (WPARAM)hContact, IGNOREEVENT_USERONLINE);
+ CallService(MS_PROTO_ADDTOCONTACT,hContact,(LPARAM)MODNAME);
+ CallService(MS_IGNORE_IGNORE, hContact, IGNOREEVENT_USERONLINE);
db_set_s(hContact, MODNAME, "Nick", Translate("New Non-IM Contact"));
}
DoPropertySheet(hContact, hInst);
if (!db_get_static(hContact, MODNAME, "Name", tmp))
- CallService(MS_DB_CONTACT_DELETE,(WPARAM)hContact,0);
+ CallService(MS_DB_CONTACT_DELETE,hContact,0);
replaceAllStrings(hContact);
return 0;
}
diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp
index c79da2dd8c..1c19a70d78 100644
--- a/plugins/Nudge/src/main.cpp
+++ b/plugins/Nudge/src/main.cpp
@@ -259,7 +259,7 @@ void HideNudgeButton(MCONTACT hContact)
bbd.bbbFlags = BBSF_HIDDEN | BBSF_DISABLED;
bbd.pszModuleName = "Nudge";
bbd.dwButtonID = 6000;
- CallService(MS_BB_SETBUTTONSTATE, (WPARAM)hContact, (LPARAM)&bbd);
+ CallService(MS_BB_SETBUTTONSTATE, hContact, (LPARAM)&bbd);
}
}
@@ -389,9 +389,9 @@ int Preview()
if (n->item.shakeClist)
ShakeClist(0, 0);
if (n->item.openMessageWindow)
- CallService(MS_MSG_SENDMESSAGET, (WPARAM)hContact, NULL);
+ CallService(MS_MSG_SENDMESSAGET, hContact, NULL);
if (n->item.shakeChat)
- ShakeChat((WPARAM)hContact, (LPARAM)time(NULL));
+ ShakeChat(hContact, (LPARAM)time(NULL));
}
}
}
@@ -405,9 +405,9 @@ int Preview()
if (DefaultNudge.shakeClist)
ShakeClist(0, 0);
if (DefaultNudge.openMessageWindow)
- CallService(MS_MSG_SENDMESSAGET, (WPARAM)hContact, NULL);
+ CallService(MS_MSG_SENDMESSAGET, hContact, NULL);
if (DefaultNudge.shakeChat)
- ShakeChat((WPARAM)hContact, (LPARAM)time(NULL));
+ ShakeChat(hContact, (LPARAM)time(NULL));
}
}
return 0;
@@ -416,7 +416,7 @@ int Preview()
void Nudge_ShowPopup(CNudgeElement n, MCONTACT hContact, TCHAR * Message)
{
hContact = Nudge_GethContact(hContact);
- TCHAR * lpzContactName = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
+ TCHAR * lpzContactName = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
if (ServiceExists(MS_POPUP_ADDPOPUPCLASS)) {
POPUPDATACLASS NudgePopup = { 0 };
@@ -459,7 +459,7 @@ void Nudge_SentStatus(CNudgeElement n, MCONTACT hContact)
dbei.cbBlob = (DWORD)strlen(buff) + 1;
dbei.pBlob = (PBYTE)buff;
- INT_PTR res = CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0); //try to retrieve the metacontact if some
+ INT_PTR res = CallService(MS_MC_GETMETACONTACT, hContact, 0); //try to retrieve the metacontact if some
if (res != CALLSERVICE_NOTFOUND) {
MCONTACT hMetaContact = (MCONTACT)res;
if (hMetaContact != NULL) // metacontact
@@ -482,7 +482,7 @@ void Nudge_ShowStatus(CNudgeElement n, MCONTACT hContact, DWORD timestamp)
dbei.cbBlob = (DWORD)strlen(buff) + 1;
dbei.pBlob = (PBYTE)buff;
- INT_PTR res = CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0); //try to retrieve the metacontact if some
+ INT_PTR res = CallService(MS_MC_GETMETACONTACT, hContact, 0); //try to retrieve the metacontact if some
if (res != CALLSERVICE_NOTFOUND) {
MCONTACT hMetaContact = (MCONTACT)res;
if (hMetaContact != NULL) { //metacontact
@@ -497,7 +497,7 @@ void Nudge_ShowStatus(CNudgeElement n, MCONTACT hContact, DWORD timestamp)
MCONTACT Nudge_GethContact(MCONTACT hContact)
{
- INT_PTR res = CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
+ INT_PTR res = CallService(MS_MC_GETMETACONTACT, hContact, 0);
if (res != CALLSERVICE_NOTFOUND) {
MCONTACT hMetaContact = (MCONTACT)res;
if (hMetaContact != NULL)
diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp
index 05f28e0421..633ceb92f6 100644
--- a/plugins/PasteIt/src/PasteIt.cpp
+++ b/plugins/PasteIt/src/PasteIt.cpp
@@ -172,7 +172,7 @@ void PasteIt(MCONTACT hContact, int mode)
}
// Send message to focus window
- CallServiceSync(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
+ CallServiceSync(MS_MSG_SENDMESSAGE, hContact, 0);
}
else
{
@@ -192,17 +192,17 @@ void PasteIt(MCONTACT hContact, int mode)
// to focus window.
SendMessage(it->second, EM_SETSEL, -1, SendMessage(it->second, WM_GETTEXTLENGTH, 0, 0));
SendMessageA(it->second, EM_REPLACESEL, FALSE, (LPARAM)pasteToWeb->szFileLink);
- CallServiceSync(MS_MSG_SENDMESSAGE, (WPARAM)hContact, NULL);
+ CallServiceSync(MS_MSG_SENDMESSAGE, hContact, NULL);
}
else
{
// If window do not exist, maybe it is not chat
- CallServiceSync(MS_MSG_SENDMESSAGE, (WPARAM)hContact, (LPARAM)pasteToWeb->szFileLink);
+ CallServiceSync(MS_MSG_SENDMESSAGE, hContact, (LPARAM)pasteToWeb->szFileLink);
}
}
else
{
- CallServiceSync(MS_MSG_SENDMESSAGE, (WPARAM)hContact, (LPARAM)pasteToWeb->szFileLink);
+ CallServiceSync(MS_MSG_SENDMESSAGE, hContact, (LPARAM)pasteToWeb->szFileLink);
}
}
}
diff --git a/plugins/Popup/src/avatars.cpp b/plugins/Popup/src/avatars.cpp
index 2130268d52..67637b4e6b 100644
--- a/plugins/Popup/src/avatars.cpp
+++ b/plugins/Popup/src/avatars.cpp
@@ -29,7 +29,7 @@ PopupAvatar *PopupAvatar::create(MCONTACT hContact)
{
if (ServiceExists(MS_AV_GETAVATARBITMAP))
{
- avatarCacheEntry *av = (avatarCacheEntry *)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)hContact, 0);
+ avatarCacheEntry *av = (avatarCacheEntry *)CallService(MS_AV_GETAVATARBITMAP, hContact, 0);
// MessageBox(NULL, _T("00"), _T(MODULNAME_LONG), MB_OK);
if (av && (_tcslen(av->szFilename) > 4))
{
diff --git a/plugins/Popup/src/avatars_gif.cpp b/plugins/Popup/src/avatars_gif.cpp
index c672f235b5..6e55e7d60e 100644
--- a/plugins/Popup/src/avatars_gif.cpp
+++ b/plugins/Popup/src/avatars_gif.cpp
@@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
GifAvatar::GifAvatar(MCONTACT hContact): PopupAvatar((HANDLE)hContact)
{
- av = (avatarCacheEntry *)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)hContact, 0);
+ av = (avatarCacheEntry *)CallService(MS_AV_GETAVATARBITMAP, hContact, 0);
bIsAnimated = true;
bIsValid = true;
GDIPlus_GetGIFSize(av->szFilename, &this->width, &this->height);
diff --git a/plugins/Popup/src/opt_contacts.cpp b/plugins/Popup/src/opt_contacts.cpp
index 1e0fd7a01d..920c378d3a 100644
--- a/plugins/Popup/src/opt_contacts.cpp
+++ b/plugins/Popup/src/opt_contacts.cpp
@@ -86,7 +86,7 @@ INT_PTR CALLBACK DlgProcContactOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
case PSN_APPLY:
HWND hwndList = GetDlgItem(hwnd, IDC_LIST);
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0);
for (int i=0; i < 4 /*SIZEOF(sttIcons)*/; ++i) {
if (SendMessage(hwndList,CLM_GETEXTRAIMAGE,(WPARAM)hItem,MAKELPARAM(i,0))) {
db_set_b(hContact, MODULNAME, "ShowMode", i);
@@ -118,7 +118,7 @@ static void sttResetListOptions(HWND hwndList)
static void sttSetAllContactIcons(HWND hwndList)
{
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0);
DWORD dwMode = db_get_b(hContact, MODULNAME, "ShowMode", 0);
for (int i=0; i < 4 /*SIZEOF(sttIcons)*/; ++i)
//hIml element [0] = SKINICON_OTHER_SMALLDOT
diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp
index 608d0394dd..f73e3f86a1 100644
--- a/plugins/Popup/src/popup_wnd2.cpp
+++ b/plugins/Popup/src/popup_wnd2.cpp
@@ -943,7 +943,7 @@ BOOL IsUtfSendAvailable(MCONTACT hContact)
if (szProto == NULL) return FALSE;
//check for MetaContact and get szProto from subcontact
if (strcmp(szProto, gszMetaProto)==0) {
- MCONTACT hSubContact = (MCONTACT)CallService(MS_MC_GETDEFAULTCONTACT, (WPARAM)hContact, 0);
+ MCONTACT hSubContact = (MCONTACT)CallService(MS_MC_GETDEFAULTCONTACT, hContact, 0);
if (!hSubContact)
return FALSE;
szProto = GetContactProto(hSubContact);
@@ -1500,7 +1500,7 @@ LRESULT CALLBACK MenuHostWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM
{
hContact = lParam;
POINT pt = {0};
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT,(WPARAM)hContact,0);
+ HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT,hContact,0);
GetCursorPos(&pt);
HWND hwndSave = GetForegroundWindow();
SetForegroundWindow(hwnd);
diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp
index 32e17cb3a7..82c92f15cb 100644
--- a/plugins/QuickContacts/src/quickcontacts.cpp
+++ b/plugins/QuickContacts/src/quickcontacts.cpp
@@ -366,7 +366,7 @@ void LoadContacts(HWND hwndDlg, BOOL show_all)
if (metacontactsEnabled)
{
if ((!show_all && opts.hide_subcontacts) || opts.group_append)
- hMeta = (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
+ hMeta = (MCONTACT)CallService(MS_MC_GETMETACONTACT, hContact, 0);
}
else
{
@@ -489,7 +489,7 @@ void EnableButtons(HWND hwndDlg, MCONTACT hContact)
caps = CallProtoService(pszProto, PS_GETCAPS, PFLAGNUM_1, 0);
BOOL voice = (ServiceExists(MS_VOICESERVICE_CAN_CALL)
- && CallService(MS_VOICESERVICE_CAN_CALL, (WPARAM)hContact, 0) > 0);
+ && CallService(MS_VOICESERVICE_CAN_CALL, hContact, 0) > 0);
EnableWindow(GetDlgItem(hwndDlg, IDC_MESSAGE), caps & PF1_IMSEND ? TRUE : FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_VOICE), voice);
diff --git a/plugins/QuickMessages/src/Utils.cpp b/plugins/QuickMessages/src/Utils.cpp
index 2612d16950..a32da0453b 100644
--- a/plugins/QuickMessages/src/Utils.cpp
+++ b/plugins/QuickMessages/src/Utils.cpp
@@ -499,7 +499,7 @@ TCHAR* ParseString(MCONTACT hContact,TCHAR* ptszQValIn,TCHAR* ptszText,TCHAR* pt
int NameLenght=0;
TCHAR* ptszName=NULL;
- ptszName=(TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
+ ptszName=(TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
NameLenght=(int)_tcslen(ptszName);
p = (TCHAR *)realloc(tempQValue, (QVSize + NameLenght + 1)*sizeof(TCHAR));
if(p){
diff --git a/plugins/RemovePersonalSettings/src/rps.cpp b/plugins/RemovePersonalSettings/src/rps.cpp
index 449747b22d..a4d693c3ac 100644
--- a/plugins/RemovePersonalSettings/src/rps.cpp
+++ b/plugins/RemovePersonalSettings/src/rps.cpp
@@ -238,7 +238,7 @@ void RemoveUsers()
// Now delete all left-overs
hContact = db_find_first();
while(hContact != NULL) {
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
+ CallService(MS_DB_CONTACT_DELETE, hContact, 0);
hContact = db_find_first();
}
diff --git a/plugins/SMS/src/SMS_svc.cpp b/plugins/SMS/src/SMS_svc.cpp
index 09578a6dd7..67de9d801c 100644
--- a/plugins/SMS/src/SMS_svc.cpp
+++ b/plugins/SMS/src/SMS_svc.cpp
@@ -140,7 +140,7 @@ void RestoreUnreadMessageAlerts(void)
if (db_event_get(hDbEvent, &dbei) == 0)
if ((dbei.flags & (DBEF_SENT|DBEF_READ))==0 && ((dbei.eventType==ICQEVENTTYPE_SMS) || (dbei.eventType==ICQEVENTTYPE_SMSCONFIRMATION)))
if (dbei.cbBlob>MIN_SMS_DBEVENT_LEN)
- handleNewMessage((WPARAM)hContact,(LPARAM)hDbEvent);
+ handleNewMessage(hContact,(LPARAM)hDbEvent);
}
for (HANDLE hDbEvent = db_event_firstUnread(NULL); hDbEvent; hDbEvent = db_event_next(hDbEvent)) {
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp
index cb59b9b61b..247f60ceb8 100644
--- a/plugins/Scriver/src/msglog.cpp
+++ b/plugins/Scriver/src/msglog.cpp
@@ -168,7 +168,7 @@ EventData* getEventFromDB(struct SrmmWindowData *dat, MCONTACT hContact, HANDLE
evt->custom = DbEventIsCustomForMsgWindow(&dbei);
if (!(dbei.flags & DBEF_SENT) && (dbei.eventType == EVENTTYPE_MESSAGE || dbei.eventType == EVENTTYPE_URL || evt->custom)) {
db_event_markRead(hContact, hDbEvent);
- CallService(MS_CLIST_REMOVEEVENT, (WPARAM)hContact, (LPARAM)hDbEvent);
+ CallService(MS_CLIST_REMOVEEVENT, hContact, (LPARAM)hDbEvent);
}
else if (dbei.eventType == EVENTTYPE_JABBER_CHATSTATES || dbei.eventType == EVENTTYPE_JABBER_PRESENCE)
db_event_markRead(hContact, hDbEvent);
diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp
index d7413db3f1..097542c3a7 100644
--- a/plugins/Scriver/src/msgoptions.cpp
+++ b/plugins/Scriver/src/msgoptions.cpp
@@ -846,7 +846,7 @@ static void RebuildList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown)
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItemUnknown, 1);
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem && db_get_b(hContact, SRMMMOD, SRMSGSET_TYPING, defType))
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, 1);
}
@@ -861,7 +861,7 @@ static void SaveList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown)
db_set_b(NULL, SRMMMOD, SRMSGSET_TYPINGUNKNOWN, (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItemUnknown, 0) ? 1 : 0));
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem)
db_set_b(hContact, SRMMMOD, SRMSGSET_TYPING, (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0) ? 1 : 0));
}
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp
index 175e2fae32..2b9a150689 100644
--- a/plugins/Scriver/src/msgs.cpp
+++ b/plugins/Scriver/src/msgs.cpp
@@ -63,7 +63,7 @@ int IsAutoPopup(MCONTACT hContact) {
if (g_dat.flags & SMF_AUTOPOPUP) {
char *szProto = GetContactProto(hContact);
if (strcmp(szProto, "MetaContacts") == 0 ) {
- hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0);
if (hContact != NULL)
szProto = GetContactProto(hContact);
}
diff --git a/plugins/Scriver/src/msgwindow.cpp b/plugins/Scriver/src/msgwindow.cpp
index f51ea244eb..5a13a81d9d 100644
--- a/plugins/Scriver/src/msgwindow.cpp
+++ b/plugins/Scriver/src/msgwindow.cpp
@@ -67,7 +67,7 @@ TCHAR* GetWindowTitle(MCONTACT hContact, const char *szProto)
tokenLen[2] = j;
}
- accModule = (char*)CallService(MS_PROTO_GETCONTACTBASEACCOUNT, (WPARAM)hContact, 0);
+ accModule = (char*)CallService(MS_PROTO_GETCONTACTBASEACCOUNT, hContact, 0);
if (accModule != NULL) {
PROTOACCOUNT* proto = (PROTOACCOUNT*)CallService(MS_PROTO_GETACCOUNT, 0, (LPARAM)accModule);
if (proto != NULL) {
diff --git a/plugins/Scriver/src/statusicon.cpp b/plugins/Scriver/src/statusicon.cpp
index 43fade35d8..2c7ba945a6 100644
--- a/plugins/Scriver/src/statusicon.cpp
+++ b/plugins/Scriver/src/statusicon.cpp
@@ -56,7 +56,7 @@ void CheckStatusIconClick(MCONTACT hContact, HWND hwndFrom, POINT pt, RECT r, in
sicd.dwId = si->dwId;
sicd.szModule = si->szModule;
sicd.flags = click_flags;
- NotifyEventHooks(hHookIconPressedEvt, (WPARAM)hContact, (LPARAM)&sicd);
+ NotifyEventHooks(hHookIconPressedEvt, hContact, (LPARAM)&sicd);
}
static int OnSrmmIconChanged(WPARAM hContact, LPARAM)
diff --git a/plugins/SecureIM/src/crypt_icons.cpp b/plugins/SecureIM/src/crypt_icons.cpp
index f4eb6b75c2..1aa8a4f578 100644
--- a/plugins/SecureIM/src/crypt_icons.cpp
+++ b/plugins/SecureIM/src/crypt_icons.cpp
@@ -100,7 +100,7 @@ void ShowStatusIcon(MCONTACT hContact)
void ShowStatusIconNotify(MCONTACT hContact)
{
BYTE mode = isContactSecured(hContact);
- NotifyEventHooks(g_hEvent[(mode&SECURED) != 0], (WPARAM)hContact, 0);
+ NotifyEventHooks(g_hEvent[(mode&SECURED) != 0], hContact, 0);
ShowStatusIcon(hContact,mode);
}
diff --git a/plugins/SecureIM/src/crypt_lists.cpp b/plugins/SecureIM/src/crypt_lists.cpp
index c8727ed04a..ab44379d45 100644
--- a/plugins/SecureIM/src/crypt_lists.cpp
+++ b/plugins/SecureIM/src/crypt_lists.cpp
@@ -65,7 +65,7 @@ void freeSupportedProtocols()
pSupPro getSupPro(MCONTACT hContact)
{
for (int j=0; j < arProto.getCount(); j++)
- if (CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)arProto[j]->name))
+ if (CallService(MS_PROTO_ISPROTOONCONTACT, hContact, (LPARAM)arProto[j]->name))
return arProto[j];
return NULL;
@@ -199,12 +199,12 @@ void addMsg2Queue(pUinKey ptr,WPARAM wParam,LPSTR szMsg)
}
void getContactNameA(MCONTACT hContact, LPSTR szName) {
- strcpy(szName,(LPCSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,0));
+ strcpy(szName,(LPCSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,hContact,0));
}
void getContactName(MCONTACT hContact, LPSTR szName)
{
- wcscpy((LPWSTR)szName, (LPWSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GSMDF_UNICODE));
+ wcscpy((LPWSTR)szName, (LPWSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GSMDF_UNICODE));
}
void getContactUinA(MCONTACT hContact, LPSTR szUIN)
diff --git a/plugins/SecureIM/src/crypt_metacontacts.cpp b/plugins/SecureIM/src/crypt_metacontacts.cpp
index 16304cffac..e99328f1d6 100644
--- a/plugins/SecureIM/src/crypt_metacontacts.cpp
+++ b/plugins/SecureIM/src/crypt_metacontacts.cpp
@@ -13,7 +13,7 @@ BOOL isProtoMetaContacts(MCONTACT hContact)
BOOL isDefaultSubContact(MCONTACT hContact)
{
if (bMetaContacts)
- return (MCONTACT)CallService(MS_MC_GETDEFAULTCONTACT,(WPARAM)CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0),0) == hContact;
+ return (MCONTACT)CallService(MS_MC_GETDEFAULTCONTACT,(WPARAM)CallService(MS_MC_GETMETACONTACT,hContact,0),0) == hContact;
return false;
}
@@ -21,7 +21,7 @@ BOOL isDefaultSubContact(MCONTACT hContact)
MCONTACT getMetaContact(MCONTACT hContact)
{
if (bMetaContacts)
- return (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
+ return (MCONTACT)CallService(MS_MC_GETMETACONTACT, hContact, 0);
return 0;
}
@@ -29,7 +29,7 @@ MCONTACT getMetaContact(MCONTACT hContact)
MCONTACT getMostOnline(MCONTACT hContact)
{
if (bMetaContacts)
- return (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ return (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0);
return 0;
}
diff --git a/plugins/SecureIM/src/crypt_popups.cpp b/plugins/SecureIM/src/crypt_popups.cpp
index 39bca4ac55..1d368b22ca 100644
--- a/plugins/SecureIM/src/crypt_popups.cpp
+++ b/plugins/SecureIM/src/crypt_popups.cpp
@@ -41,7 +41,7 @@ void showPopup(LPCSTR lpzText,MCONTACT hContact,HICON hIcon, UINT type)
POPUPDATAW ppd = {0};
ppd.lchContact = hContact; //Be sure to use a GOOD handle, since this will not be checked.
ppd.lchIcon = hIcon;
- LPWSTR lpwzContactName = (LPWSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,GSMDF_UNICODE);
+ LPWSTR lpwzContactName = (LPWSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,hContact,GSMDF_UNICODE);
wcscpy(ppd.lpwzContactName, lpwzContactName);
LPWSTR lpwzText = mir_a2u(lpzText);
wcscpy(ppd.lpwzText, TranslateW(lpwzText));
diff --git a/plugins/SeenPlugin/src/history.cpp b/plugins/SeenPlugin/src/history.cpp
index e6faeb5ccb..c101a07537 100644
--- a/plugins/SeenPlugin/src/history.cpp
+++ b/plugins/SeenPlugin/src/history.cpp
@@ -170,7 +170,7 @@ INT_PTR CALLBACK HistoryDlgProc(HWND hwndDlg, UINT Message, WPARAM wparam, LPARA
hContact = (MCONTACT)lparam;
SetWindowLongPtr(hwndDlg,GWLP_USERDATA,lparam);
mir_sntprintf(sztemp, SIZEOF(sztemp), _T("%s: %s"),
- CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,GCDNF_TCHAR),
+ CallService(MS_CLIST_GETCONTACTDISPLAYNAME,hContact,GCDNF_TCHAR),
TranslateT("last seen history"));
SendMessage(hwndDlg, WM_SETTEXT, 0, (LPARAM)sztemp);
SendMessage(hwndDlg, WM_SETICON, (WPARAM) ICON_BIG, (LPARAM)LoadSkinnedIcon(SKINICON_OTHER_MIRANDA));
@@ -217,17 +217,17 @@ INT_PTR CALLBACK HistoryDlgProc(HWND hwndDlg, UINT Message, WPARAM wparam, LPARA
case IDC_USERMENU:
{
RECT rc;
- HMENU hMenu=(HMENU)CallService(MS_CLIST_MENUBUILDCONTACT,(WPARAM)hContact,0);
+ HMENU hMenu=(HMENU)CallService(MS_CLIST_MENUBUILDCONTACT,hContact,0);
GetWindowRect(GetDlgItem(hwndDlg,IDC_USERMENU),&rc);
TrackPopupMenu(hMenu,0,rc.left,rc.bottom,0,hwndDlg,NULL);
DestroyMenu(hMenu);
}
break;
case IDC_DETAILS:
- CallService(MS_USERINFO_SHOWDIALOG,(WPARAM)hContact,0);
+ CallService(MS_USERINFO_SHOWDIALOG,hContact,0);
break;
case IDC_SENDMSG:
- CallService(MS_MSG_SENDMESSAGE,(WPARAM)hContact,0);
+ CallService(MS_MSG_SENDMESSAGE,hContact,0);
break;
case IDC_TEST:
debug( ParseString( LPGENT("Date: %d.%m.%y(%Y) \n Date desc: %W - %w - %E - %e \n Time: %H:%M:%S (%h-%p) \n user: %n - %u \n Status: %s \n IP: %i - %r"), hContact, 0));
diff --git a/plugins/SeenPlugin/src/missed.cpp b/plugins/SeenPlugin/src/missed.cpp
index 6c32da815f..933de76846 100644
--- a/plugins/SeenPlugin/src/missed.cpp
+++ b/plugins/SeenPlugin/src/missed.cpp
@@ -52,7 +52,7 @@ int ResetMissed(void)
int CheckIfOnline(void)
{
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
- if ( CallService(MS_CLIST_GETCONTACTICON, (WPARAM)hContact, 0) != ICON_OFFLINE)
+ if ( CallService(MS_CLIST_GETCONTACTICON, hContact, 0) != ICON_OFFLINE)
db_set_b(hContact, S_MOD, "Missed", 2);
return 0;
diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp
index 6b568cab30..80b736c44f 100644
--- a/plugins/SeenPlugin/src/utils.cpp
+++ b/plugins/SeenPlugin/src/utils.cpp
@@ -455,7 +455,7 @@ LRESULT CALLBACK PopupDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
case WM_COMMAND:
if (HIWORD(wParam) == STN_CLICKED){
MCONTACT hContact = PUGetContact(hwnd);
- if (hContact > 0) CallService(MS_MSG_SENDMESSAGE,(WPARAM)hContact,0);
+ if (hContact > 0) CallService(MS_MSG_SENDMESSAGE,hContact,0);
}
case WM_CONTEXTMENU:
PUDeletePopup(hwnd);
@@ -550,7 +550,7 @@ int UpdateValues(WPARAM wparam,LPARAM lparam)
MCONTACT hContact = (MCONTACT)wparam;
DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING *)lparam;
- //if (CallService(MS_IGNORE_ISIGNORED,(WPARAM)hContact,IGNOREEVENT_USERONLINE)) return 0;
+ //if (CallService(MS_IGNORE_ISIGNORED,hContact,IGNOREEVENT_USERONLINE)) return 0;
BOOL isIdleEvent = includeIdle?(strcmp(cws->szSetting,"IdleTS")==0):0;
if (strcmp(cws->szSetting,"Status") && strcmp(cws->szSetting,"StatusTriger") && (isIdleEvent==0)) return 0;
if (!strcmp(cws->szModule,S_MOD)) {
diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp
index 41598e615b..14fbd88a4a 100644
--- a/plugins/Sessions/Src/Main.cpp
+++ b/plugins/Sessions/Src/Main.cpp
@@ -228,7 +228,7 @@ INT_PTR CALLBACK SaveSessionDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lpar
szUserSessionName[lenght+1]='\0';
if (IsDlgButtonChecked(hdlg,IDC_SELCONTACTS)&&bSC) {
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- BYTE res =(BYTE)SendMessage(hClistControl, CLM_GETCHECKMARK, SendMessage(hClistControl, CLM_FINDCONTACT, (WPARAM)hContact, 0), 0);
+ BYTE res =(BYTE)SendMessage(hClistControl, CLM_GETCHECKMARK, SendMessage(hClistControl, CLM_FINDCONTACT, hContact, 0), 0);
if (res) {
user_session_list[i] = hContact;
i++;
diff --git a/plugins/Sessions/Src/Options.cpp b/plugins/Sessions/Src/Options.cpp
index 943a92ed6a..04ade10284 100644
--- a/plugins/Sessions/Src/Options.cpp
+++ b/plugins/Sessions/Src/Options.cpp
@@ -279,7 +279,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
int iSelection = (int)((NMCLISTCONTROL *)lparam)->hItem;
MCONTACT hContact = db_find_first();
for ( ; hContact; hContact = db_find_next(hContact))
- if (SendDlgItemMessage(hdlg, IDC_EMCLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0) == iSelection)
+ if (SendDlgItemMessage(hdlg, IDC_EMCLIST, CLM_FINDCONTACT, hContact, 0) == iSelection)
break;
if (hContact)
EnableWindow(GetDlgItem(hdlg,IDC_SAVE),TRUE);
@@ -320,11 +320,11 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
EnableWindow(GetDlgItem(hdlg,IDC_DEL),TRUE);
else {
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
- SendMessage(hOpClistControl, CLM_SETCHECKMARK, (WPARAM)hContact,0);
+ SendMessage(hOpClistControl, CLM_SETCHECKMARK, hContact,0);
for (int i=0 ; session_list_t[i] > 0; i++) {
MCONTACT hContact = (MCONTACT)SendMessage(hOpClistControl, CLM_FINDCONTACT, (WPARAM)session_list_t[i], 0);
- SendMessage(hOpClistControl, CLM_SETCHECKMARK, (WPARAM)hContact, 1);
+ SendMessage(hOpClistControl, CLM_SETCHECKMARK, hContact, 1);
}
EnableWindow(GetDlgItem(hdlg,IDC_SAVE),FALSE);
}
@@ -368,7 +368,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
int i=0;
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
BYTE res =(BYTE)SendMessage(GetDlgItem(hdlg,IDC_EMCLIST), CLM_GETCHECKMARK,
- SendMessage(GetDlgItem(hdlg,IDC_EMCLIST), CLM_FINDCONTACT, (WPARAM)hContact, 0), 0);
+ SendMessage(GetDlgItem(hdlg,IDC_EMCLIST), CLM_FINDCONTACT, hContact, 0), 0);
if (res) {
SetSessionMark(hContact,1,'1',opses_count);
SetInSessionOrder(hContact,1,opses_count,i);
diff --git a/plugins/ShellExt/src/shlcom.cpp b/plugins/ShellExt/src/shlcom.cpp
index a01b05cb0d..25bd3d4d4d 100644
--- a/plugins/ShellExt/src/shlcom.cpp
+++ b/plugins/ShellExt/src/shlcom.cpp
@@ -281,7 +281,7 @@ bool ipcGetSortedContacts(THeaderIPC *ipch, int *pSlot, bool bGroupMode)
// don't show people who are "Hidden" "NotOnList" or Ignored
if (db_get_b(hContact, "CList", "Hidden", 0) == 1 ||
db_get_b(hContact, "CList", "NotOnList", 0) == 1 ||
- CallService(MS_IGNORE_ISIGNORED, (WPARAM)hContact, IGNOREEVENT_MESSAGE | IGNOREEVENT_URL | IGNOREEVENT_FILE) != 0)
+ CallService(MS_IGNORE_ISIGNORED, hContact, IGNOREEVENT_MESSAGE | IGNOREEVENT_URL | IGNOREEVENT_FILE) != 0)
continue;
}
// is HIT2 off?
diff --git a/plugins/SmileyAdd/src/general.cpp b/plugins/SmileyAdd/src/general.cpp
index ed70db98f7..68f849dc23 100644
--- a/plugins/SmileyAdd/src/general.cpp
+++ b/plugins/SmileyAdd/src/general.cpp
@@ -214,7 +214,7 @@ void DestroyGdiPlus(void)
MCONTACT DecodeMetaContact(MCONTACT hContact)
{
if (hContact == NULL) return NULL;
- MCONTACT hReal = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ MCONTACT hReal = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0);
if (hReal == NULL || hReal == (MCONTACT)CALLSERVICE_NOTFOUND)
hReal = hContact;
diff --git a/plugins/SmileyAdd/src/services.cpp b/plugins/SmileyAdd/src/services.cpp
index 1c404a7c50..776c07415e 100644
--- a/plugins/SmileyAdd/src/services.cpp
+++ b/plugins/SmileyAdd/src/services.cpp
@@ -365,7 +365,7 @@ INT_PTR CustomCatMenu(WPARAM hContact, LPARAM lParam)
if (lParam == 1) empty = _T("<None>");
opt.WriteContactCategory(hContact, empty);
}
- NotifyEventHooks(hEvent1, (WPARAM)hContact, 0);
+ NotifyEventHooks(hEvent1, hContact, 0);
}
for (int i=0; i < menuHandleArray.getCount(); i++)
diff --git a/plugins/SpellChecker/src/utils.cpp b/plugins/SpellChecker/src/utils.cpp
index 7da98ecd97..3b740f6372 100644
--- a/plugins/SpellChecker/src/utils.cpp
+++ b/plugins/SpellChecker/src/utils.cpp
@@ -731,7 +731,7 @@ void GetUserProtoLanguageSetting(Dialog *dlg, MCONTACT hContact, char *group, ch
if (caps & PF4_INFOSETTINGSVC)
rc = CallProtoService(group, PS_GETINFOSETTING, (WPARAM) hContact, (LPARAM) &cgs);
else {
- rc = CallService(MS_DB_CONTACT_GETSETTING_STR_EX, (WPARAM)hContact, (LPARAM)&cgs);
+ rc = CallService(MS_DB_CONTACT_GETSETTING_STR_EX, hContact, (LPARAM)&cgs);
if (rc == CALLSERVICE_NOTFOUND)
rc = db_get_ts(hContact, group, setting, &dbv);
}
diff --git a/plugins/SplashScreen/src/debug.h b/plugins/SplashScreen/src/debug.h
index 2db41cb734..7d52037d34 100644
--- a/plugins/SplashScreen/src/debug.h
+++ b/plugins/SplashScreen/src/debug.h
@@ -24,7 +24,7 @@ int inline _DebugPopup(MCONTACT hContact, TCHAR *fmt, ...)
ppd.lchContact = hContact;
ppd.lchIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
if(hContact != 0)
- _tcsncpy_s(ppd.lptzContactName, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR), MAX_CONTACTNAME);
+ _tcsncpy_s(ppd.lptzContactName, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR), MAX_CONTACTNAME);
else
_tcsncpy_s(ppd.lptzContactName, _T(PlugName), MAX_CONTACTNAME);
_tcsncpy_s(ppd.lptzText, debug, MAX_SECONDLINE - 20);
diff --git a/plugins/StopSpamMod/src/stopspam.cpp b/plugins/StopSpamMod/src/stopspam.cpp
index 1025a1cf49..2db2d3ef6b 100755
--- a/plugins/StopSpamMod/src/stopspam.cpp
+++ b/plugins/StopSpamMod/src/stopspam.cpp
@@ -316,7 +316,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l)
{
int i;
i = rand()%255*13;
- CallService(MS_DOS_SERVICE, (WPARAM)hContact, (LPARAM)i);
+ CallService(MS_DOS_SERVICE, hContact, (LPARAM)i);
}
} */
if(gbIgnoreContacts)
diff --git a/plugins/StopSpamPlus/src/services.cpp b/plugins/StopSpamPlus/src/services.cpp
index 83c53c3e21..7c912ef1f4 100644
--- a/plugins/StopSpamPlus/src/services.cpp
+++ b/plugins/StopSpamPlus/src/services.cpp
@@ -38,7 +38,7 @@ INT_PTR RemoveTempContacts(WPARAM wParam,LPARAM lParam)
// Set a flag so we remember to delete the contact when the protocol goes online the next time
db_set_b( hContact, "CList", "Delete", 1 );
else
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0 );
+ CallService(MS_DB_CONTACT_DELETE, hContact, 0 );
}
}
}
diff --git a/plugins/TabSRMM/src/buttonsbar.cpp b/plugins/TabSRMM/src/buttonsbar.cpp
index 0215f7dc1d..7ca7530585 100644
--- a/plugins/TabSRMM/src/buttonsbar.cpp
+++ b/plugins/TabSRMM/src/buttonsbar.cpp
@@ -113,7 +113,7 @@ static int Hlp_RemoveDatabaseSettings(MCONTACT hContact, char *szModule, char *s
dbces.pfnEnumProc = DBRemoveEnumProc;
dbces.lParam = (LPARAM)&rs;
dbces.szModule = szModule;
- if (CallService(MS_DB_CONTACT_ENUMSETTINGS, (WPARAM)hContact, (LPARAM)&dbces) == -1)
+ if (CallService(MS_DB_CONTACT_ENUMSETTINGS, hContact, (LPARAM)&dbces) == -1)
return -1;
count = 0;
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp
index b4dbc18193..05c702a382 100644
--- a/plugins/TabSRMM/src/container.cpp
+++ b/plugins/TabSRMM/src/container.cpp
@@ -45,7 +45,7 @@ static int ServiceParamsOK(ButtonItem *item, WPARAM *wParam, LPARAM *lParam, MCO
if (hContact == 0)
return 0;
if (item->dwFlags & BUTTON_PASSHCONTACTW)
- *wParam = (WPARAM)hContact;
+ *wParam = hContact;
else if (item->dwFlags & BUTTON_PASSHCONTACTL)
*lParam = (LPARAM)hContact;
return 1;
@@ -880,7 +880,7 @@ panel_found:
SendMessage(pContainer->hwndActive, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
if (hContact) {
int iSel = 0;
- hMenu = (HMENU) CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)hContact, 0);
+ hMenu = (HMENU) CallService(MS_CLIST_MENUBUILDCONTACT, hContact, 0);
iSel = TrackPopupMenu(hMenu, TPM_RETURNCMD, pt.x, pt.y, 0, hwndDlg, NULL);
if (iSel)
CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(iSel), MPCF_CONTACTMENU), (LPARAM)hContact);
@@ -1397,7 +1397,7 @@ panel_found:
if (pContainer->hwndActive) {
SendMessage(pContainer->hwndActive, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
if (hContact)
- SendMessage(hwndDlg, DM_UPDATETITLE, (WPARAM)hContact, 0);
+ SendMessage(hwndDlg, DM_UPDATETITLE, hContact, 0);
}
}
ZeroMemory(&item, sizeof(item));
@@ -1635,7 +1635,7 @@ panel_found:
hContact = 0;
SendMessage(pContainer->hwndActive, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
if (hContact)
- SendMessage(hwndDlg, DM_UPDATETITLE, (WPARAM)hContact, 0);
+ SendMessage(hwndDlg, DM_UPDATETITLE, hContact, 0);
}
SendMessage(hwndDlg, WM_SIZE, 0, 1);
BroadCastContainer(pContainer, DM_CONFIGURETOOLBAR, 0, 1);
diff --git a/plugins/TabSRMM/src/controls.cpp b/plugins/TabSRMM/src/controls.cpp
index c7ee0e98d6..5fe283f95b 100644
--- a/plugins/TabSRMM/src/controls.cpp
+++ b/plugins/TabSRMM/src/controls.cpp
@@ -401,7 +401,7 @@ void CMenuBar::invoke(const int id)
MCONTACT hContact = dat ? dat->hContact : 0;
if (index == 3 && hContact != 0) {
- hMenu = reinterpret_cast<HMENU>(::CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)hContact, 0));
+ hMenu = reinterpret_cast<HMENU>(::CallService(MS_CLIST_MENUBUILDCONTACT, hContact, 0));
m_isContactMenu = true;
} else if (index == 0) {
hMenu = reinterpret_cast<HMENU>(::CallService(MS_CLIST_MENUBUILDMAIN, 0, 0));
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index bf347b89e3..b1cfaba7dc 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -1339,7 +1339,7 @@ void TSAPI DM_NotifyTyping(TWindowData *dat, int mode)
return;
// End user check
dat->nTypeMode = mode;
- CallService(MS_PROTO_SELFISTYPING, (WPARAM)hContact, dat->nTypeMode);
+ CallService(MS_PROTO_SELFISTYPING, hContact, dat->nTypeMode);
}
void TSAPI DM_OptionsApplied(TWindowData *dat, WPARAM wParam, LPARAM lParam)
diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp
index 8b9b05d388..f0e79c78f8 100644
--- a/plugins/TabSRMM/src/hotkeyhandler.cpp
+++ b/plugins/TabSRMM/src/hotkeyhandler.cpp
@@ -107,7 +107,7 @@ void TSAPI HandleMenuEntryFromhContact(MCONTACT hContact)
pContainer->hwndSaved = 0;
SetForegroundWindow(pContainer->hwnd);
}
- else CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
+ else CallService(MS_MSG_SENDMESSAGE, hContact, 0);
return;
}
@@ -127,7 +127,7 @@ void TSAPI HandleMenuEntryFromhContact(MCONTACT hContact)
}
}
- CallService(MS_CLIST_CONTACTDOUBLECLICKED, (WPARAM)hContact, 0);
+ CallService(MS_CLIST_CONTACTDOUBLECLICKED, hContact, 0);
}
void TSAPI DrawMenuItem(DRAWITEMSTRUCT *dis, HICON hIcon, DWORD dwIdle)
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp
index 4458a32375..13642b5f72 100644
--- a/plugins/TabSRMM/src/msglog.cpp
+++ b/plugins/TabSRMM/src/msglog.cpp
@@ -637,7 +637,7 @@ static char *Template_CreateRTFFromDbEvent(TWindowData *dat, MCONTACT hContact,
if (!isSent && (bIsStatusChangeEvent || dbei.eventType == EVENTTYPE_MESSAGE || DbEventIsForMsgWindow(&dbei))) {
db_event_markRead(hContact, hDbEvent);
- CallService(MS_CLIST_REMOVEEVENT, (WPARAM)hContact, (LPARAM)hDbEvent);
+ CallService(MS_CLIST_REMOVEEVENT, hContact, (LPARAM)hDbEvent);
}
g_groupBreak = TRUE;
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp
index 55a37b8cdd..e93ec87899 100644
--- a/plugins/TabSRMM/src/msgoptions.cpp
+++ b/plugins/TabSRMM/src/msgoptions.cpp
@@ -848,7 +848,7 @@ static void RebuildList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown)
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItemUnknown, 1);
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem && db_get_b(hContact, SRMSGMOD, SRMSGSET_TYPING, defType))
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, 1);
}
@@ -863,7 +863,7 @@ static void SaveList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown)
db_set_b(0, SRMSGMOD, SRMSGSET_TYPINGUNKNOWN, (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItemUnknown, 0) ? 1 : 0));
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem)
db_set_b(hContact, SRMSGMOD, SRMSGSET_TYPING, (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0) ? 1 : 0));
}
diff --git a/plugins/TabSRMM/src/sendlater.cpp b/plugins/TabSRMM/src/sendlater.cpp
index f93c65ce53..6fda91fece 100644
--- a/plugins/TabSRMM/src/sendlater.cpp
+++ b/plugins/TabSRMM/src/sendlater.cpp
@@ -279,7 +279,7 @@ void CSendLater::processSingleContact(const MCONTACT hContact)
ces.szModule = "SendLater";
ces.lParam = (LPARAM)hContact;
- CallService(MS_DB_CONTACT_ENUMSETTINGS, (WPARAM)hContact, (LPARAM)&ces);
+ CallService(MS_DB_CONTACT_ENUMSETTINGS, hContact, (LPARAM)&ces);
}
}
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp
index 4d90ae3c42..9458148bd2 100644
--- a/plugins/TabSRMM/src/sendqueue.cpp
+++ b/plugins/TabSRMM/src/sendqueue.cpp
@@ -323,7 +323,7 @@ int SendQueue::sendQueued(TWindowData *dat, const int iEntry)
int iSendLength = getSendLength(iEntry, dat->sendMode);
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem && SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) {
CContactCache *c = CContactCache::getContactCache(hContact);
if (c)
@@ -340,7 +340,7 @@ int SendQueue::sendQueued(TWindowData *dat, const int iEntry)
}
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem && SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) {
doSendLater(iEntry, 0, hContact, false);
iJobs++;
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp
index f3e8030417..ace7b4e70a 100644
--- a/plugins/TabSRMM/src/utils.cpp
+++ b/plugins/TabSRMM/src/utils.cpp
@@ -621,11 +621,11 @@ INT_PTR CALLBACK Utils::PopupDlgProcError(HWND hWnd, UINT message, WPARAM wParam
switch (message) {
case WM_COMMAND:
- PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_HANDLECLISTEVENT, (WPARAM)hContact, 0);
+ PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_HANDLECLISTEVENT, hContact, 0);
PUDeletePopup(hWnd);
break;
case WM_CONTEXTMENU:
- PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_HANDLECLISTEVENT, (WPARAM)hContact, 0);
+ PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_HANDLECLISTEVENT, hContact, 0);
PUDeletePopup(hWnd);
break;
case WM_MOUSEWHEEL:
@@ -828,7 +828,7 @@ AVATARCACHEENTRY* Utils::loadAvatarFromAVS(const MCONTACT hContact)
if (!ServiceExists(MS_AV_GETAVATARBITMAP))
return 0;
- return (AVATARCACHEENTRY*)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)hContact, 0);
+ return (AVATARCACHEENTRY*)CallService(MS_AV_GETAVATARBITMAP, hContact, 0);
}
void Utils::getIconSize(HICON hIcon, int& sizeX, int& sizeY)
diff --git a/plugins/TipperYM/src/message_pump.cpp b/plugins/TipperYM/src/message_pump.cpp
index c7609c6f50..a969d48251 100644
--- a/plugins/TipperYM/src/message_pump.cpp
+++ b/plugins/TipperYM/src/message_pump.cpp
@@ -171,7 +171,7 @@ unsigned int CALLBACK MessagePumpThread(void *param)
PostMPMessage(MUM_CREATEPOPUP, 0, 0);
}
else if (!opt.bWaitForContent && hwndTip)
- SendMessage(hwndTip, PUM_SETSTATUSTEXT, (WPARAM)hContact, (LPARAM)swzMsg);
+ SendMessage(hwndTip, PUM_SETSTATUSTEXT, hContact, (LPARAM)swzMsg);
else if (swzMsg)
mir_free(swzMsg);
diff --git a/plugins/TipperYM/src/options.cpp b/plugins/TipperYM/src/options.cpp
index 07d22050da..41aef2fc2b 100644
--- a/plugins/TipperYM/src/options.cpp
+++ b/plugins/TipperYM/src/options.cpp
@@ -2102,7 +2102,7 @@ INT_PTR CALLBACK DlgProcFavouriteContacts(HWND hwndDlg, UINT msg, WPARAM wParam,
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETLEFTMARGIN, 2, 0);
{
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem && db_get_b(hContact, MODULE, "FavouriteContact", 0))
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, 1);
}
@@ -2119,7 +2119,7 @@ INT_PTR CALLBACK DlgProcFavouriteContacts(HWND hwndDlg, UINT msg, WPARAM wParam,
int count = 0;
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem) {
isChecked = (BYTE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0);
db_set_b(hContact, MODULE, "FavouriteContact", isChecked);
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp
index dc460c5527..8318be45e8 100644
--- a/plugins/TipperYM/src/popwin.cpp
+++ b/plugins/TipperYM/src/popwin.cpp
@@ -1667,7 +1667,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
bTitlePainted = true;
}
- TCHAR *swzNick = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
+ TCHAR *swzNick = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
if (opt.iFavoriteContFlags & FAVCONT_APPEND_PROTO) {
TCHAR *swzProto = a2t(proto);
mir_sntprintf(swzName, 256, _T("%s (%s)"), swzNick, swzProto);
diff --git a/plugins/TipperYM/src/subst.cpp b/plugins/TipperYM/src/subst.cpp
index 441897d5f0..68bf45606d 100644
--- a/plugins/TipperYM/src/subst.cpp
+++ b/plugins/TipperYM/src/subst.cpp
@@ -250,7 +250,7 @@ TCHAR *GetStatusMessageText(MCONTACT hContact)
char *szProto = GetContactProto(hContact);
if (szProto) {
if (!strcmp(szProto, szMetaModuleName))
- hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0);
else {
WORD wStatus = (int)CallProtoService(szProto, PS_GETSTATUS, 0, 0);
if (wStatus == ID_STATUS_OFFLINE)
@@ -303,7 +303,7 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff
}
else if (!_tcscmp(swzRawSpec, _T("account")))
{
- char *szProto = ( char* )CallService(MS_PROTO_GETCONTACTBASEACCOUNT, (WPARAM)hContact, 0);
+ char *szProto = ( char* )CallService(MS_PROTO_GETCONTACTBASEACCOUNT, hContact, 0);
if ((INT_PTR)szProto == CALLSERVICE_NOTFOUND)
{
return GetSysSubstText(hContact, _T("proto"), buff, bufflen);
@@ -353,7 +353,7 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff
else if (!_tcscmp(swzRawSpec, _T("meta_subname")))
{
// get contact list name of active subcontact
- HANDLE hSubContact = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ HANDLE hSubContact = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0);
if (!hSubContact || (INT_PTR)hSubContact == CALLSERVICE_NOTFOUND) return false;
TCHAR *swzNick = (TCHAR *) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hSubContact, GCDNF_TCHAR);
if (swzNick) _tcsncpy(buff, swzNick, bufflen);
@@ -361,7 +361,7 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff
}
else if (!_tcscmp(swzRawSpec, _T("meta_subuid")))
{
- MCONTACT hSubContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ MCONTACT hSubContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0);
if (!hSubContact || (INT_PTR)hSubContact == CALLSERVICE_NOTFOUND)
return false;
return Uid(hSubContact, 0, buff, bufflen);
@@ -369,7 +369,7 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff
else if (!_tcscmp(swzRawSpec, _T("meta_subproto")))
{
// get protocol of active subcontact
- MCONTACT hSubContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ MCONTACT hSubContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0);
if (!hSubContact || (INT_PTR)hSubContact == CALLSERVICE_NOTFOUND)
return false;
return GetSysSubstText(hSubContact, _T("account"), buff, bufflen);
@@ -414,13 +414,13 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff
char *szProto = GetContactProto(hContact);
if (szProto && !strcmp(szProto, szMetaModuleName))
{
- iNumber = CallService(MS_MC_GETNUMCONTACTS, (WPARAM)hContact, 0);
- hTmpContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, 0);
+ iNumber = CallService(MS_MC_GETNUMCONTACTS, hContact, 0);
+ hTmpContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, hContact, 0);
}
for (int i = 0; i < iNumber; i++) {
if (i > 0)
- hTmpContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, i);
+ hTmpContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, hContact, i);
dwRecountTs = db_get_dw(hTmpContact, MODULE, "LastCountTS", 0);
dwTime = (DWORD)time(0);
dwDiff = (dwTime - dwRecountTs);
diff --git a/plugins/TooltipNotify/src/DbHelpers.cpp b/plugins/TooltipNotify/src/DbHelpers.cpp
index 3a891bfa5e..ee64d85a3b 100644
--- a/plugins/TooltipNotify/src/DbHelpers.cpp
+++ b/plugins/TooltipNotify/src/DbHelpers.cpp
@@ -17,7 +17,7 @@ bool ModuleSettingsExists(MCONTACT hContact, const char* pszModuleName)
dbces.szModule = pszModuleName;
dbces.pfnEnumProc = EnumSettingsProc1;
- int nResult = ::CallService(MS_DB_CONTACT_ENUMSETTINGS, (WPARAM)hContact, (LPARAM)&dbces);
+ int nResult = ::CallService(MS_DB_CONTACT_ENUMSETTINGS, hContact, (LPARAM)&dbces);
return (nResult != -1);
}
@@ -36,7 +36,7 @@ void DeleteModuleSettings(MCONTACT hContact, const char* pszModuleName)
dbces.lParam = (LPARAM)&settingsList;
dbces.pfnEnumProc = EnumSettingsProc2;
- int nResult = ::CallService(MS_DB_CONTACT_ENUMSETTINGS, (WPARAM)hContact, (LPARAM)&dbces);
+ int nResult = ::CallService(MS_DB_CONTACT_ENUMSETTINGS, hContact, (LPARAM)&dbces);
if (nResult != -1)
{
for(unsigned i=0; i<settingsList.size(); i++)
@@ -65,7 +65,7 @@ void RenameModule(MCONTACT hContact, const char* pszOldName, const char* pszNewN
dbces.lParam = (LPARAM)&settingsList;
dbces.pfnEnumProc = EnumSettingsProc2;
- int nResult = ::CallService(MS_DB_CONTACT_ENUMSETTINGS, (WPARAM)hContact, (LPARAM)&dbces);
+ int nResult = ::CallService(MS_DB_CONTACT_ENUMSETTINGS, hContact, (LPARAM)&dbces);
if (nResult != -1)
{
DBVARIANT dbv;
diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp
index 304833d981..4e81ce3b10 100644
--- a/plugins/TooltipNotify/src/TooltipNotify.cpp
+++ b/plugins/TooltipNotify/src/TooltipNotify.cpp
@@ -242,7 +242,7 @@ int CTooltipNotify::ContactSettingChanged(WPARAM hContact, LPARAM lParam)
break;
case ID_STATUS_ONLINE:
- if(CallService(MS_IGNORE_ISIGNORED,(WPARAM)hContact,IGNOREEVENT_USERONLINE) && m_sOptions.bConjSOLN) return 0;
+ if(CallService(MS_IGNORE_ISIGNORED,hContact,IGNOREEVENT_USERONLINE) && m_sOptions.bConjSOLN) return 0;
if (!m_sOptions.bOnline) return 0;
SkinPlaySound(SND_ONLINE);
break;
@@ -916,7 +916,7 @@ TCHAR *CTooltipNotify::MakeTooltipString(MCONTACT hContact, int iStatus, TCHAR *
const char* szProto =
hContact==0 ? "Proto" : (char*)::GetContactProto(hContact);
const TCHAR* szContactName =
- (TCHAR *)::CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
+ (TCHAR *)::CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
memset(szString, 0, iBufSize*sizeof(TCHAR));
diff --git a/plugins/UserInfoEx/src/classMTime.cpp b/plugins/UserInfoEx/src/classMTime.cpp
index 65939b07ad..10c9d77a23 100644
--- a/plugins/UserInfoEx/src/classMTime.cpp
+++ b/plugins/UserInfoEx/src/classMTime.cpp
@@ -414,7 +414,7 @@ void MTime::GetLocalTime(MCONTACT hContact)
GetTimeUTC();
- if (!GetContactTimeZoneInformation((WPARAM)hContact, (LPARAM)&tzi)) {
+ if (!GetContactTimeZoneInformation(hContact, (LPARAM)&tzi)) {
UTCToTzSpecificLocal(&tzi);
}
}
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp
index 9cf0dd26bc..44009f8722 100644
--- a/plugins/UserInfoEx/src/dlg_propsheet.cpp
+++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp
@@ -1362,7 +1362,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
if (hContact != pPs->hContact) {
if (!myGlobals.szMetaProto)
break;
- if (pPs->hContact != (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, NULL))
+ if (pPs->hContact != (MCONTACT)CallService(MS_MC_GETMETACONTACT, hContact, NULL))
break;
if (!db_get_b(NULL, MODNAME, SET_META_SCAN, TRUE))
break;
diff --git a/plugins/UserInfoEx/src/mir_db.cpp b/plugins/UserInfoEx/src/mir_db.cpp
index a87b654658..f24496beeb 100644
--- a/plugins/UserInfoEx/src/mir_db.cpp
+++ b/plugins/UserInfoEx/src/mir_db.cpp
@@ -58,7 +58,7 @@ MCONTACT GetMeta(MCONTACT hContact)
if (!myGlobals.szMetaProto)
return NULL;
- MCONTACT result = (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
+ MCONTACT result = (MCONTACT)CallService(MS_MC_GETMETACONTACT, hContact, 0);
return (result == (MCONTACT)CALLSERVICE_NOTFOUND) ? NULL : result;
}
@@ -192,7 +192,7 @@ bool IsEmpty(MCONTACT hContact, LPCSTR pszModule)
DBCONTACTENUMSETTINGS dbces = { 0 };
dbces.pfnEnumProc = IsEmptyEnumProc;
dbces.szModule = pszModule;
- return (0 > CallService(MS_DB_CONTACT_ENUMSETTINGS, (WPARAM)hContact, (LPARAM)&dbces));
+ return (0 > CallService(MS_DB_CONTACT_ENUMSETTINGS, hContact, (LPARAM)&dbces));
}
/**
@@ -832,7 +832,7 @@ INT_PTR CEnumList::EnumSettings(MCONTACT hContact, LPCSTR pszModule)
dbces.pfnEnumProc = (DBSETTINGENUMPROC)CEnumList::EnumSettingsProc;
dbces.szModule = pszModule;
dbces.lParam = (LPARAM)this;
- return CallService(MS_DB_CONTACT_ENUMSETTINGS, (WPARAM)hContact, (LPARAM)&dbces);
+ return CallService(MS_DB_CONTACT_ENUMSETTINGS, hContact, (LPARAM)&dbces);
}
} /* namespace DB */ \ No newline at end of file
diff --git a/plugins/UserInfoEx/src/psp_profile.cpp b/plugins/UserInfoEx/src/psp_profile.cpp
index 621e913492..c63bc0e4ab 100644
--- a/plugins/UserInfoEx/src/psp_profile.cpp
+++ b/plugins/UserInfoEx/src/psp_profile.cpp
@@ -1143,22 +1143,22 @@ INT_PTR CALLBACK PSPProcContactProfile(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR
// scan all basic protocols for the subcontacts
if (DB::Module::IsMetaAndScan(pszProto)) {
- int iDefault = CallService(MS_MC_GETDEFAULTCONTACTNUM, (WPARAM)hContact, NULL);
+ int iDefault = CallService(MS_MC_GETDEFAULTCONTACTNUM, hContact, NULL);
MCONTACT hSubContact, hDefContact;
LPCSTR pszSubBaseProto;
int j, numSubs;
- if ((hDefContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, iDefault)) &&
+ if ((hDefContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, hContact, iDefault)) &&
(pszSubBaseProto = DB::Contact::Proto(hDefContact)))
{
if ((numProtoItems += ProfileList_AddItemlistFromDB(pList, iItem, idList, nList, hDefContact, pszSubBaseProto, pFmt[i].szCatFmt, pFmt[i].szValFmt, CTRLF_HASMETA|CTRLF_HASPROTO)) < 0)
return FALSE;
// copy the missing settings from the other subcontacts
- numSubs = CallService(MS_MC_GETNUMCONTACTS, (WPARAM)hContact, NULL);
+ numSubs = CallService(MS_MC_GETNUMCONTACTS, hContact, NULL);
for (j = 0; j < numSubs; j++) {
if (j == iDefault) continue;
- if (!(hSubContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, j))) continue;
+ if (!(hSubContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, hContact, j))) continue;
if (!(pszSubBaseProto = DB::Contact::Proto(hSubContact))) continue;
if ((numProtoItems += ProfileList_AddItemlistFromDB(pList, iItem, idList, nList, hSubContact, pszSubBaseProto, pFmt[i].szCatFmt, pFmt[i].szValFmt, CTRLF_HASMETA|CTRLF_HASPROTO)) < 0)
return FALSE;
diff --git a/plugins/UserInfoEx/src/svc_avatar.cpp b/plugins/UserInfoEx/src/svc_avatar.cpp
index c6edeaab85..3530f28ec1 100644
--- a/plugins/UserInfoEx/src/svc_avatar.cpp
+++ b/plugins/UserInfoEx/src/svc_avatar.cpp
@@ -70,7 +70,7 @@ namespace NServices
//GetIconInfo(zodiac.hIcon, &iinfo);
// save the bitmap to a file used as avatar later
- if (!CallService(MS_AV_SETAVATAR, (WPARAM)hContact, (LPARAM)szFileName))
+ if (!CallService(MS_AV_SETAVATAR, hContact, (LPARAM)szFileName))
db_set_b(hContact, "ContactPhoto", "IsZodiac", 1);
}
}
diff --git a/plugins/UserInfoEx/src/svc_email.cpp b/plugins/UserInfoEx/src/svc_email.cpp
index eb366250f3..1b6430df86 100644
--- a/plugins/UserInfoEx/src/svc_email.cpp
+++ b/plugins/UserInfoEx/src/svc_email.cpp
@@ -147,7 +147,7 @@ static int OnContactSettingChanged(MCONTACT hContact, DBCONTACTWRITESETTING* pdb
!mir_strncmp(pdbcws->szSetting, SET_CONTACT_COMPANY_EMAIL, 13) ||
!mir_strncmp(pdbcws->szSetting, "mye-mail0", 9)))
{
- OnCListApplyIcons((WPARAM)hContact, 0);
+ OnCListApplyIcons(hContact, 0);
}
return 0;
}
diff --git a/plugins/Variables/src/help.cpp b/plugins/Variables/src/help.cpp
index 65e2c4453b..02fe91ceb1 100644
--- a/plugins/Variables/src/help.cpp
+++ b/plugins/Variables/src/help.cpp
@@ -152,7 +152,7 @@ static INT_PTR CALLBACK clistDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM
} }
if ((hContact != INVALID_CONTACT_ID) && (hContact != NULL))
- hItem = (MCONTACT)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ hItem = (MCONTACT)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
else
hItem = NULL;
diff --git a/plugins/Variables/src/parse_metacontacts.cpp b/plugins/Variables/src/parse_metacontacts.cpp
index edb435163d..e97447f967 100644
--- a/plugins/Variables/src/parse_metacontacts.cpp
+++ b/plugins/Variables/src/parse_metacontacts.cpp
@@ -40,7 +40,7 @@ static TCHAR *parseGetParent(ARGUMENTSINFO *ai)
return NULL;
}
- hContact = (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
+ hContact = (MCONTACT)CallService(MS_MC_GETMETACONTACT, hContact, 0);
if (hContact == NULL)
return NULL;
@@ -95,7 +95,7 @@ static TCHAR *parseGetDefault(ARGUMENTSINFO *ai)
return NULL;
}
- hContact = (MCONTACT)CallService(MS_MC_GETDEFAULTCONTACT, (WPARAM)hContact, 0);
+ hContact = (MCONTACT)CallService(MS_MC_GETDEFAULTCONTACT, hContact, 0);
if (hContact == NULL)
return NULL;
@@ -150,7 +150,7 @@ static TCHAR *parseGetMostOnline(ARGUMENTSINFO *ai)
return NULL;
}
- hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0);
if (hContact == NULL)
return NULL;
diff --git a/plugins/Weather/src/weather_addstn.cpp b/plugins/Weather/src/weather_addstn.cpp
index 3e61f0d159..37bea56fd3 100644
--- a/plugins/Weather/src/weather_addstn.cpp
+++ b/plugins/Weather/src/weather_addstn.cpp
@@ -65,9 +65,9 @@ INT_PTR WeatherAddToList(WPARAM wParam, LPARAM lParam)
// if contact with the same ID was not found, add it
if (psr->cbSize < sizeof(PROTOSEARCHRESULT)) return 0;
MCONTACT hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
- CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)WEATHERPROTONAME);
+ CallService(MS_PROTO_ADDTOCONTACT, hContact, (LPARAM)WEATHERPROTONAME);
// suppress online notification for the new contact
- CallService(MS_IGNORE_IGNORE, (WPARAM)hContact, IGNOREEVENT_USERONLINE);
+ CallService(MS_IGNORE_IGNORE, hContact, IGNOREEVENT_USERONLINE);
// set contact info and settings
TCHAR svc[256];
@@ -117,7 +117,7 @@ INT_PTR WeatherAddToList(WPARAM wParam, LPARAM lParam)
db_set_ts(NULL, WEATHERPROTONAME, "Default", opt.Default);
}
// display the Edit Settings dialog box
- EditSettings((WPARAM)hContact, 0);
+ EditSettings(hContact, 0);
return (INT_PTR)hContact;
}
diff --git a/plugins/Weather/src/weather_contacts.cpp b/plugins/Weather/src/weather_contacts.cpp
index 8ced00bf78..ba04363313 100644
--- a/plugins/Weather/src/weather_contacts.cpp
+++ b/plugins/Weather/src/weather_contacts.cpp
@@ -394,7 +394,7 @@ INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
// re-enable the protocol and update the data for the station
db_set_s(hContact, WEATHERPROTONAME, "LastCondition", "None");
- UpdateSingleStation((WPARAM)hContact, 0);
+ UpdateSingleStation(hContact, 0);
case IDCANCEL: // fall through
// remove the dialog from window list and close it
diff --git a/plugins/Weather/src/weather_data.cpp b/plugins/Weather/src/weather_data.cpp
index 8d5a3bd5a8..5141f24ef3 100644
--- a/plugins/Weather/src/weather_data.cpp
+++ b/plugins/Weather/src/weather_data.cpp
@@ -433,7 +433,7 @@ void DBDataManage(MCONTACT hContact, WORD Mode, WPARAM wParam, LPARAM lParam)
dbces.lParam = (LPARAM)&arSettings;
dbces.pfnEnumProc = GetWeatherDataFromDB;
dbces.szModule = WEATHERCONDITION;
- CallService(MS_DB_CONTACT_ENUMSETTINGS, (WPARAM)hContact, (LPARAM)&dbces);
+ CallService(MS_DB_CONTACT_ENUMSETTINGS, hContact, (LPARAM)&dbces);
// begin deleting settings
for (int i = arSettings.getCount() - 1; i >= 0; i--) {
diff --git a/plugins/Weather/src/weather_popup.cpp b/plugins/Weather/src/weather_popup.cpp
index 58b2ac4da9..24b5b8cc1f 100644
--- a/plugins/Weather/src/weather_popup.cpp
+++ b/plugins/Weather/src/weather_popup.cpp
@@ -127,13 +127,13 @@ LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
case WM_COMMAND:
ID = opt.LeftClickAction;
if (ID != IDM_M7) PUDeletePopup(hWnd);
- SendMessage(hPopupWindow, ID, (WPARAM)hContact, 0);
+ SendMessage(hPopupWindow, ID, hContact, 0);
return TRUE;
case WM_CONTEXTMENU:
ID = opt.RightClickAction;
if (ID != IDM_M7) PUDeletePopup(hWnd);
- SendMessage(hPopupWindow, ID, (WPARAM)hContact, 0);
+ SendMessage(hPopupWindow, ID, hContact, 0);
return TRUE;
case UM_FREEPLUGINDATA:
diff --git a/plugins/Weather/src/weather_update.cpp b/plugins/Weather/src/weather_update.cpp
index 40a383b735..584b99f927 100644
--- a/plugins/Weather/src/weather_update.cpp
+++ b/plugins/Weather/src/weather_update.cpp
@@ -198,7 +198,7 @@ int UpdateWeather(MCONTACT hContact)
}
// show the popup
- NotifyEventHooks(hHookWeatherUpdated, (WPARAM)hContact, (LPARAM)Ch);
+ NotifyEventHooks(hHookWeatherUpdated, hContact, (LPARAM)Ch);
}
Netlib_LogfT(hNetlibUser, _T("Update Completed - Start to free memory"));
diff --git a/plugins/Weather/src/weather_userinfo.cpp b/plugins/Weather/src/weather_userinfo.cpp
index 3817599b3a..ad3b190a6d 100644
--- a/plugins/Weather/src/weather_userinfo.cpp
+++ b/plugins/Weather/src/weather_userinfo.cpp
@@ -270,12 +270,12 @@ INT_PTR CALLBACK DlgProcMoreData(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
lvi.iItem = ListView_InsertItem(hList, &lvi);
lvi.pszText = TranslateT("Retrieving new data, please wait...");
ListView_SetItemText(hList, lvi.iItem, 1, lvi.pszText);
- UpdateSingleStation((WPARAM)hContact, 0);
+ UpdateSingleStation(hContact, 0);
break;
}
case IDC_MWEBPAGE:
- LoadForecast((WPARAM)hContact, 0); // read complete forecast
+ LoadForecast(hContact, 0); // read complete forecast
break;
case IDC_MTOGGLE:
diff --git a/plugins/WebView/src/webview_alerts.cpp b/plugins/WebView/src/webview_alerts.cpp
index 2c363a0c30..21c6037a62 100644
--- a/plugins/WebView/src/webview_alerts.cpp
+++ b/plugins/WebView/src/webview_alerts.cpp
@@ -83,28 +83,28 @@ int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
/*****************************************************************************/
int WDisplayDataAlert(MCONTACT hContact)
{
- NotifyEventHooks(hHookDisplayDataAlert, (WPARAM)hContact, 0);
+ NotifyEventHooks(hHookDisplayDataAlert, hContact, 0);
return 0;
}
/*****************************************************************************/
int WAlertPopup(MCONTACT hContact, TCHAR *displaytext)
{
- NotifyEventHooks(hHookAlertPopup, (WPARAM)hContact, (LPARAM)displaytext);
+ NotifyEventHooks(hHookAlertPopup, hContact, (LPARAM)displaytext);
return 0;
}
/*****************************************************************************/
int WErrorPopup(MCONTACT hContact, TCHAR *textdisplay)
{
- NotifyEventHooks(hHookErrorPopup, (WPARAM)hContact, (LPARAM) textdisplay);
+ NotifyEventHooks(hHookErrorPopup, hContact, (LPARAM) textdisplay);
return 0;
}
/*****************************************************************************/
int WAlertOSD(MCONTACT hContact, TCHAR *displaytext)
{
- NotifyEventHooks(hHookAlertOSD, (WPARAM)hContact, (LPARAM) displaytext);
+ NotifyEventHooks(hHookAlertOSD, hContact, (LPARAM) displaytext);
return 0;
}
diff --git a/plugins/WhenWasIt/src/dlg_handlers.cpp b/plugins/WhenWasIt/src/dlg_handlers.cpp
index 4a3f6d31bf..589e4c27e0 100644
--- a/plugins/WhenWasIt/src/dlg_handlers.cpp
+++ b/plugins/WhenWasIt/src/dlg_handlers.cpp
@@ -939,8 +939,8 @@ INT_PTR CALLBACK DlgProcUpcoming(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPar
DWORD WINAPI OpenMessageWindowThread(void *data)
{
MCONTACT hContact = (MCONTACT)data;
- CallServiceSync(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
- CallServiceSync("SRMsg/LaunchMessageWindow", (WPARAM)hContact, 0);
+ CallServiceSync(MS_MSG_SENDMESSAGE, hContact, 0);
+ CallServiceSync("SRMsg/LaunchMessageWindow", hContact, 0);
return 0;
}
diff --git a/plugins/WinterSpeak/src/DialogConfigActive.cpp b/plugins/WinterSpeak/src/DialogConfigActive.cpp
index 00487967f5..1b63eaae63 100644
--- a/plugins/WinterSpeak/src/DialogConfigActive.cpp
+++ b/plugins/WinterSpeak/src/DialogConfigActive.cpp
@@ -259,7 +259,7 @@ void DialogConfigActive::SetAllContactIcons(HWND hwndList, HWND window) {
if(hContact == 0) {
} else {
- HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0);
if (hItem && SendMessage(hwndList, CLM_GETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(1, 0)) == EMPTY_EXTRA_ICON) {
this->InitialiseItem(hwndList, hItem, iter->second.message, iter->second.status);
}
@@ -332,7 +332,7 @@ void DialogConfigActive::save(HWND window)
m_db.setActiveFlag(ConfigDatabase::ActiveFlag_Invisible, (IsDlgButtonChecked(window, IDC_ACTIVE_INVISIBLE) != 0));
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE)SendDlgItemMessage(window, IDC_ACTIVE_USERS, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendDlgItemMessage(window, IDC_ACTIVE_USERS, CLM_FINDCONTACT, hContact, 0);
if (hItem)
SaveItemMask(GetDlgItem(window, IDC_ACTIVE_USERS), hContact, hItem);
}
diff --git a/plugins/XSoundNotify/src/dialog.cpp b/plugins/XSoundNotify/src/dialog.cpp
index e83a3df7bd..f77ce80ac3 100644
--- a/plugins/XSoundNotify/src/dialog.cpp
+++ b/plugins/XSoundNotify/src/dialog.cpp
@@ -40,7 +40,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP
break;
}
- TCHAR *nick = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
+ TCHAR *nick = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
TCHAR value[100];
mir_sntprintf(value, SIZEOF(value), TranslateT("Custom sound for %s (%s)"), nick, uid);
SetWindowText(hwndDlg, value);
diff --git a/plugins/XSoundNotify/src/options.cpp b/plugins/XSoundNotify/src/options.cpp
index 76143744ee..9f6dc980d4 100644
--- a/plugins/XSoundNotify/src/options.cpp
+++ b/plugins/XSoundNotify/src/options.cpp
@@ -70,7 +70,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
break;
}
- TCHAR *nick = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
+ TCHAR *nick = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
TCHAR *value = (TCHAR *)mir_alloc(sizeof(TCHAR) * (_tcslen(uid) + _tcslen(nick) + 4));
mir_sntprintf(value, _tcslen(uid) + _tcslen(nick) + 4, _T("%s (%s)"), nick, uid);
SendMessage(GetDlgItem(hwndDlg, IDC_OPT_COMBO_USERS), CB_SETITEMDATA, SendMessage(GetDlgItem(hwndDlg, IDC_OPT_COMBO_USERS), CB_ADDSTRING, 0, (LPARAM)value), (LPARAM)hContact);
diff --git a/plugins/YAMN/src/browser/mailbrowser.cpp b/plugins/YAMN/src/browser/mailbrowser.cpp
index 47f08ecc35..47db479fc0 100644
--- a/plugins/YAMN/src/browser/mailbrowser.cpp
+++ b/plugins/YAMN/src/browser/mailbrowser.cpp
@@ -891,7 +891,7 @@ LRESULT CALLBACK NewMailPopupProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam
#endif
}
if ((Account->NewMailN.Flags & YAMN_ACC_CONT) && !(Account->NewMailN.Flags & YAMN_ACC_CONTNOEVENT)) {
- CallService(MS_CLIST_REMOVEEVENT,(WPARAM)hContact,(LPARAM)hContact);
+ CallService(MS_CLIST_REMOVEEVENT,hContact,(LPARAM)hContact);
}
}
// fall through
diff --git a/plugins/YAPP/src/options.cpp b/plugins/YAPP/src/options.cpp
index 97180ba262..c679060a6b 100644
--- a/plugins/YAPP/src/options.cpp
+++ b/plugins/YAPP/src/options.cpp
@@ -101,7 +101,7 @@ void ShowExamplePopups()
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (options.av_layout != PAV_NONE && ServiceExists(MS_AV_DRAWAVATAR)) {
- AVATARCACHEENTRY *ace = (AVATARCACHEENTRY *)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)hContact, 0);
+ AVATARCACHEENTRY *ace = (AVATARCACHEENTRY *)CallService(MS_AV_GETAVATARBITMAP, hContact, 0);
if (ace && (ace->dwFlags & AVS_BITMAP_VALID)) {
pd.hContact = hContact;
pd.ptzText = TranslateT("An avatar.");
diff --git a/plugins/YahooGroups/src/utils.cpp b/plugins/YahooGroups/src/utils.cpp
index d938abbab3..686cb59363 100644
--- a/plugins/YahooGroups/src/utils.cpp
+++ b/plugins/YahooGroups/src/utils.cpp
@@ -326,7 +326,7 @@ MCONTACT GetContactFromID(TCHAR *szID, char *szProto)
GetContactProtocol(hContact, cProtocol, sizeof(cProtocol));
szHandle = GetContactID(hContact, cProtocol);
- tmp = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
+ tmp = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
_tcsncpy(dispName, tmp, SIZEOF(dispName));
if ((szHandle) && ((_tcsicmp(szHandle, szID) == 0) || (_tcsicmp(dispName, szID) == 0)) && ((szProto == NULL) || (_stricmp(szProto, cProtocol) == 0)))
diff --git a/protocols/AimOscar/src/chat.cpp b/protocols/AimOscar/src/chat.cpp
index 29b1a202dd..d1b4bb900f 100644
--- a/protocols/AimOscar/src/chat.cpp
+++ b/protocols/AimOscar/src/chat.cpp
@@ -139,7 +139,7 @@ int CAimProto::OnGCEvent(WPARAM wParam,LPARAM lParam)
char* sn = mir_t2a(gch->ptszUID);
MCONTACT hContact = contact_from_sn(sn);
mir_free(sn);
- CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
+ CallService(MS_MSG_SENDMESSAGE, hContact, 0);
}
break;
@@ -166,11 +166,11 @@ int CAimProto::OnGCEvent(WPARAM wParam,LPARAM lParam)
switch (gch->dwData)
{
case 10:
- CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)hContact, 0);
+ CallService(MS_USERINFO_SHOWDIALOG, hContact, 0);
break;
case 20:
- CallService(MS_HISTORY_SHOWCONTACTHISTORY, (WPARAM)hContact, 0);
+ CallService(MS_HISTORY_SHOWCONTACTHISTORY, hContact, 0);
break;
case 110:
diff --git a/protocols/AimOscar/src/links.cpp b/protocols/AimOscar/src/links.cpp
index 538f9e3d6d..b1c954d413 100644
--- a/protocols/AimOscar/src/links.cpp
+++ b/protocols/AimOscar/src/links.cpp
@@ -139,7 +139,7 @@ static INT_PTR ServiceParseAimLink(WPARAM,LPARAM lParam)
MCONTACT hContact = proto->contact_from_sn(sn, true, true);
if (hContact)
- CallService(MS_MSG_SENDMESSAGET, (WPARAM)hContact, (LPARAM)msg);
+ CallService(MS_MSG_SENDMESSAGET, hContact, (LPARAM)msg);
mir_free(sn);
return 0;
diff --git a/protocols/AimOscar/src/server.cpp b/protocols/AimOscar/src/server.cpp
index 4a966254a7..af9c749b44 100644
--- a/protocols/AimOscar/src/server.cpp
+++ b/protocols/AimOscar/src/server.cpp
@@ -999,7 +999,7 @@ void CAimProto::delete_ssi_list(SNAC &snac, int &offset)
}
}
if (i == 1)
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
+ CallService(MS_DB_CONTACT_DELETE, hContact, 0);
break;
case 0x0001: //group record
@@ -1594,11 +1594,11 @@ void CAimProto::snac_typing_notification(SNAC &snac)//family 0x004
{
unsigned short type=snac.ushort(11+sn_length);
if (type==0x0000)//typing finished
- CallService(MS_PROTO_CONTACTISTYPING,(WPARAM)hContact,(WPARAM)PROTOTYPE_CONTACTTYPING_OFF);
+ CallService(MS_PROTO_CONTACTISTYPING,hContact,(WPARAM)PROTOTYPE_CONTACTTYPING_OFF);
else if (type==0x0001)//typed
- CallService(MS_PROTO_CONTACTISTYPING,(WPARAM)hContact,PROTOTYPE_CONTACTTYPING_INFINITE);
+ CallService(MS_PROTO_CONTACTISTYPING,hContact,PROTOTYPE_CONTACTTYPING_INFINITE);
else if (type==0x0002)//typing
- CallService(MS_PROTO_CONTACTISTYPING,(WPARAM)hContact,(LPARAM)60);
+ CallService(MS_PROTO_CONTACTISTYPING,hContact,(LPARAM)60);
}
mir_free(sn);
}
@@ -2313,11 +2313,11 @@ void CAimProto::snac_admin_account_confirm(SNAC &snac)//family 0x0007
unsigned short* type=(unsigned short*)&buf[SNAC_SIZE*2+1+sn_length];
*type=htons(*type);
if (*type==0x0000)//typing finished
- CallService(MS_PROTO_CONTACTISTYPING,(WPARAM)hContact,(WPARAM)PROTOTYPE_CONTACTTYPING_OFF);
+ CallService(MS_PROTO_CONTACTISTYPING,hContact,(WPARAM)PROTOTYPE_CONTACTTYPING_OFF);
else if (*type==0x0001)//typed
- CallService(MS_PROTO_CONTACTISTYPING,(WPARAM)hContact,PROTOTYPE_CONTACTTYPING_INFINITE);
+ CallService(MS_PROTO_CONTACTISTYPING,hContact,PROTOTYPE_CONTACTTYPING_INFINITE);
else if (*type==0x0002)//typing
- CallService(MS_PROTO_CONTACTISTYPING,(WPARAM)hContact,(LPARAM)60);
+ CallService(MS_PROTO_CONTACTISTYPING,hContact,(LPARAM)60);
}
}
}*/
diff --git a/protocols/AimOscar/src/utility.cpp b/protocols/AimOscar/src/utility.cpp
index 119234a93c..864e4edeba 100644
--- a/protocols/AimOscar/src/utility.cpp
+++ b/protocols/AimOscar/src/utility.cpp
@@ -205,7 +205,7 @@ MCONTACT CAimProto::contact_from_sn(const char* sn, bool addIfNeeded, bool tempo
db_set_b(hContact, "CList", "NotOnList", 1);
return hContact;
}
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
+ CallService(MS_DB_CONTACT_DELETE, hContact, 0);
}
}
diff --git a/protocols/FacebookRM/src/chat.cpp b/protocols/FacebookRM/src/chat.cpp
index e2a553cbcc..93be3281a1 100644
--- a/protocols/FacebookRM/src/chat.cpp
+++ b/protocols/FacebookRM/src/chat.cpp
@@ -86,7 +86,7 @@ int FacebookProto::OnGCEvent(WPARAM wParam,LPARAM lParam)
char* sn = mir_t2a(hook->ptszUID);
MCONTACT hContact = ContactIDToHContact(sn);
mir_free(sn);
- CallService(MS_MSG_SENDMESSAGET, (WPARAM)hContact, 0);
+ CallService(MS_MSG_SENDMESSAGET, hContact, 0);
break;
}
@@ -118,11 +118,11 @@ int FacebookProto::OnGCEvent(WPARAM wParam,LPARAM lParam)
switch (hook->dwData)
{
case 10:
- CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)hContact, 0);
+ CallService(MS_USERINFO_SHOWDIALOG, hContact, 0);
break;
case 20:
- CallService(MS_HISTORY_SHOWCONTACTHISTORY, (WPARAM)hContact, 0);
+ CallService(MS_HISTORY_SHOWCONTACTHISTORY, hContact, 0);
break;
case 110:
diff --git a/protocols/FacebookRM/src/contacts.cpp b/protocols/FacebookRM/src/contacts.cpp
index 84f30411a0..d641a775af 100644
--- a/protocols/FacebookRM/src/contacts.cpp
+++ b/protocols/FacebookRM/src/contacts.cpp
@@ -153,7 +153,7 @@ MCONTACT FacebookProto::AddToContactList(facebook_user* fbu, ContactType type, b
hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
if(hContact)
{
- if(CallService(MS_PROTO_ADDTOCONTACT,(WPARAM)hContact,(LPARAM)m_szModuleName) == 0)
+ if(CallService(MS_PROTO_ADDTOCONTACT,hContact,(LPARAM)m_szModuleName) == 0)
{
setString(hContact, FACEBOOK_KEY_ID, fbu->user_id.c_str());
@@ -180,12 +180,12 @@ MCONTACT FacebookProto::AddToContactList(facebook_user* fbu, ContactType type, b
setByte(hContact, FACEBOOK_KEY_CONTACT_TYPE, type);
if (getByte(FACEBOOK_KEY_DISABLE_STATUS_NOTIFY, 0))
- CallService(MS_IGNORE_IGNORE, (WPARAM)hContact, (LPARAM)IGNOREEVENT_USERONLINE);
+ CallService(MS_IGNORE_IGNORE, hContact, (LPARAM)IGNOREEVENT_USERONLINE);
return hContact;
}
- CallService(MS_DB_CONTACT_DELETE,(WPARAM)hContact,0);
+ CallService(MS_DB_CONTACT_DELETE,hContact,0);
}
return 0;
diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp
index 8add178e11..ebb3864744 100644
--- a/protocols/FacebookRM/src/json.cpp
+++ b/protocols/FacebookRM/src/json.cpp
@@ -444,7 +444,7 @@ int facebook_json_parser::parse_messages(void* data, std::vector< facebook_messa
_tcsftime(ttime, SIZEOF(ttime), _T("%X"), utils::conversion::fbtime_to_timeinfo(json_as_float(time)));
mir_sntprintf(tstr, SIZEOF(tstr), TranslateT("Message read: %s"), ttime);
- CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hContact, (LPARAM)tstr);
+ CallService(MS_MSG_SETSTATUSTEXT, hContact, (LPARAM)tstr);
}
}
} else if (t == "deliver") {
@@ -634,9 +634,9 @@ int facebook_json_parser::parse_messages(void* data, std::vector< facebook_messa
JSONNODE *st = json_get(it, "st");
if (json_as_int(st) == 1)
- CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, (LPARAM)60);
+ CallService(MS_PROTO_CONTACTISTYPING, hContact, (LPARAM)60);
else
- CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, (LPARAM)PROTOTYPE_CONTACTTYPING_OFF);
+ CallService(MS_PROTO_CONTACTISTYPING, hContact, (LPARAM)PROTOTYPE_CONTACTTYPING_OFF);
} else if (t == "privacy_changed") {
// settings changed
diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp
index fd09bfa507..83fd36df27 100644
--- a/protocols/FacebookRM/src/messages.cpp
+++ b/protocols/FacebookRM/src/messages.cpp
@@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
int FacebookProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT *pre)
{
ForkThread(&FacebookProto::ReadMessageWorker, (void*)hContact);
- CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, (LPARAM)PROTOTYPE_CONTACTTYPING_OFF);
+ CallService(MS_PROTO_CONTACTISTYPING, hContact, (LPARAM)PROTOTYPE_CONTACTTYPING_OFF);
return Proto_RecvMessage(hContact, pre);
}
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp
index 7346774879..520d13719a 100644
--- a/protocols/FacebookRM/src/proto.cpp
+++ b/protocols/FacebookRM/src/proto.cpp
@@ -278,7 +278,7 @@ MCONTACT FacebookProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
int FacebookProto::AuthRequest(MCONTACT hContact,const PROTOCHAR *message)
{
- return RequestFriendship((WPARAM)hContact, NULL);
+ return RequestFriendship(hContact, NULL);
}
int FacebookProto::Authorize(HANDLE hDbEvent)
@@ -290,7 +290,7 @@ int FacebookProto::Authorize(HANDLE hDbEvent)
if (hContact == INVALID_CONTACT_ID)
return 1;
- return ApproveFriendship((WPARAM)hContact, NULL);
+ return ApproveFriendship(hContact, NULL);
}
int FacebookProto::AuthDeny(HANDLE hDbEvent, const PROTOCHAR *reason)
@@ -305,7 +305,7 @@ int FacebookProto::AuthDeny(HANDLE hDbEvent, const PROTOCHAR *reason)
// TODO: hide from facebook requests list
if (db_get_b(hContact, "CList", "NotOnList", 0))
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
+ CallService(MS_DB_CONTACT_DELETE, hContact, 0);
return 0;
}
diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp
index b768be5271..e5c25da860 100644
--- a/protocols/Gadu-Gadu/src/core.cpp
+++ b/protocols/Gadu-Gadu/src/core.cpp
@@ -1191,7 +1191,7 @@ retry:
debugLogA("mainthread() (%x): Typing notification from %d (%d).", this,
e->event.typing_notification.uin, e->event.typing_notification.length);
#endif
- CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact,
+ CallService(MS_PROTO_CONTACTISTYPING, hContact,
e->event.typing_notification.length > 0 ? 7 : PROTOTYPE_CONTACTTYPING_OFF);
}
break;
diff --git a/protocols/Gadu-Gadu/src/groupchat.cpp b/protocols/Gadu-Gadu/src/groupchat.cpp
index 816e1e5d9b..bf04806709 100644
--- a/protocols/Gadu-Gadu/src/groupchat.cpp
+++ b/protocols/Gadu-Gadu/src/groupchat.cpp
@@ -143,7 +143,7 @@ int GGPROTO::gc_event(WPARAM wParam, LPARAM lParam)
DBVARIANT dbv;
if (!getTString(hContact, "ChatRoomID", &dbv)) {
if (dbv.ptszVal && !_tcscmp(gch->pDest->ptszID, dbv.ptszVal))
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
+ CallService(MS_DB_CONTACT_DELETE, hContact, 0);
db_free(&dbv);
}
hContact = hNext;
@@ -195,7 +195,7 @@ int GGPROTO::gc_event(WPARAM wParam, LPARAM lParam)
{
MCONTACT hContact = NULL;
if ((uin = _ttoi(gch->ptszUID)) && (hContact = getcontact(uin, 1, 0, NULL)))
- CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
+ CallService(MS_MSG_SENDMESSAGE, hContact, 0);
}
debugLog(_T("gc_event(): Unhandled event %d, chat %x, uin %d, text \"%s\"."), gch->pDest->iType, chat, uin, gch->ptszText);
@@ -396,9 +396,9 @@ static MCONTACT gg_getsubcontact(GGPROTO* gg, MCONTACT hContact)
if (szProto && szMetaProto && (INT_PTR)szMetaProto != CALLSERVICE_NOTFOUND && !lstrcmpA(szProto, szMetaProto))
{
- int nSubContacts = (int)CallService(MS_MC_GETNUMCONTACTS, (WPARAM)hContact, 0), i;
+ int nSubContacts = (int)CallService(MS_MC_GETNUMCONTACTS, hContact, 0), i;
for (i = 0; i < nSubContacts; i++) {
- MCONTACT hMetaContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, i);
+ MCONTACT hMetaContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, hContact, i);
szProto = GetContactProto(hMetaContact);
if (szProto && !lstrcmpA(szProto, gg->m_szModuleName))
return hMetaContact;
@@ -424,7 +424,7 @@ static int gg_gc_countcheckmarks(HWND hwndList)
{
int count = 0;
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0);
if (hItem && SendMessage(hwndList, CLM_GETCHECKMARK, (WPARAM)hItem, 0))
count++;
}
@@ -476,7 +476,7 @@ static INT_PTR CALLBACK gg_gc_openconfdlg(HWND hwndDlg, UINT message, WPARAM wPa
uin_t* participants = (uin_t*)calloc(count, sizeof(uin_t));
gg->debugLogA("gg_gc_openconfdlg(): WM_COMMAND IDOK Opening new conference for %d contacts.", count);
for (MCONTACT hContact = db_find_first(); hContact && i < count; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0);
if (hItem && SendMessage(hwndList, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) {
MCONTACT hMetaContact = gg_getsubcontact(gg, hContact); // MetaContacts support
participants[i++] = db_get_dw(hMetaContact ? hMetaContact : hContact, gg->m_szModuleName, GG_KEY_UIN, 0);
@@ -525,7 +525,7 @@ static INT_PTR CALLBACK gg_gc_openconfdlg(HWND hwndDlg, UINT message, WPARAM wPa
// Delete non-gg contacts
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- MCONTACT hItem = (MCONTACT)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ MCONTACT hItem = (MCONTACT)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem) {
MCONTACT hMetaContact = gg_getsubcontact(gg, hContact); // MetaContacts support
if (hMetaContact) {
diff --git a/protocols/Gadu-Gadu/src/links.cpp b/protocols/Gadu-Gadu/src/links.cpp
index 8b46a68b80..637001281d 100644
--- a/protocols/Gadu-Gadu/src/links.cpp
+++ b/protocols/Gadu-Gadu/src/links.cpp
@@ -101,7 +101,7 @@ static INT_PTR gg_parselink(WPARAM wParam, LPARAM lParam)
{
MCONTACT hContact = gg->getcontact(uin, 1, 0, NULL);
if (hContact != NULL)
- CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
+ CallService(MS_MSG_SENDMESSAGE, hContact, 0);
}
return 0;
diff --git a/protocols/Gadu-Gadu/src/services.cpp b/protocols/Gadu-Gadu/src/services.cpp
index 5abefd614f..57fa852040 100644
--- a/protocols/Gadu-Gadu/src/services.cpp
+++ b/protocols/Gadu-Gadu/src/services.cpp
@@ -383,7 +383,7 @@ INT_PTR GGPROTO::get_acc_mgr_gui(WPARAM wParam, LPARAM lParam)
INT_PTR GGPROTO::leavechat(WPARAM hContact, LPARAM lParam)
{
if (hContact)
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
+ CallService(MS_DB_CONTACT_DELETE, hContact, 0);
return 0;
}
diff --git a/protocols/IRCG/src/clist.cpp b/protocols/IRCG/src/clist.cpp
index ff021ea86e..077e325ed7 100644
--- a/protocols/IRCG/src/clist.cpp
+++ b/protocols/IRCG/src/clist.cpp
@@ -73,9 +73,9 @@ BOOL CIrcProto::CList_AddDCCChat(const CMString& name, const CMString& hostmask,
cle.ptszTooltip = szNick;
cle.lParam = (LPARAM)pdci;
- if (CallService(MS_CLIST_GETEVENT, (WPARAM)hContact, 0))
- CallService(MS_CLIST_REMOVEEVENT, (WPARAM)hContact, (LPARAM)"dccchat");
- CallService(MS_CLIST_ADDEVENT, (WPARAM)hContact, (LPARAM)&cle);
+ if (CallService(MS_CLIST_GETEVENT, hContact, 0))
+ CallService(MS_CLIST_REMOVEEVENT, hContact, (LPARAM)"dccchat");
+ CallService(MS_CLIST_ADDEVENT, hContact, (LPARAM)&cle);
}
return TRUE;
}
@@ -99,7 +99,7 @@ MCONTACT CIrcProto::CList_AddContact(CONTACT *user, bool InList, bool SetOnline)
// here we create a new one since no one is to be found
hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
if (hContact) {
- CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)m_szModuleName);
+ CallService(MS_PROTO_ADDTOCONTACT, hContact, (LPARAM)m_szModuleName);
if (InList)
db_unset(hContact, "CList", "NotOnList");
diff --git a/protocols/IRCG/src/input.cpp b/protocols/IRCG/src/input.cpp
index 1ad5c203bf..8d7cf7138a 100644
--- a/protocols/IRCG/src/input.cpp
+++ b/protocols/IRCG/src/input.cpp
@@ -649,14 +649,14 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR* window, MCONTACT hConta
}
if (three.IsEmpty())
- CallService(MS_FILE_SENDFILE, (WPARAM)hContact, 0);
+ CallService(MS_FILE_SENDFILE, hContact, 0);
else {
CMString temp = GetWordAddress(text.c_str(), 3);
TCHAR* pp[2];
TCHAR* p = (TCHAR*)temp.c_str();
pp[0] = p;
pp[1] = NULL;
- CallService(MS_FILE_SENDSPECIFICFILES, (WPARAM)hContact, (LPARAM)pp);
+ CallService(MS_FILE_SENDSPECIFICFILES, hContact, (LPARAM)pp);
}
}
}
diff --git a/protocols/IRCG/src/ui_utils.cpp b/protocols/IRCG/src/ui_utils.cpp
index feb85074f1..fa1f5dea2d 100644
--- a/protocols/IRCG/src/ui_utils.cpp
+++ b/protocols/IRCG/src/ui_utils.cpp
@@ -630,7 +630,7 @@ BOOL CCtrlClc::OnNotify(int, NMHDR *pnmh)
}
void CCtrlClc::AddContact(MCONTACT hContact)
-{ SendMessage(m_hwnd, CLM_ADDCONTACT, (WPARAM)hContact, 0);
+{ SendMessage(m_hwnd, CLM_ADDCONTACT, hContact, 0);
}
void CCtrlClc::AddGroup(HANDLE hGroup)
@@ -662,7 +662,7 @@ void CCtrlClc::Expand(HANDLE hItem, DWORD flags)
}
HANDLE CCtrlClc::FindContact(MCONTACT hContact)
-{ return (HANDLE)SendMessage(m_hwnd, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+{ return (HANDLE)SendMessage(m_hwnd, CLM_FINDCONTACT, hContact, 0);
}
HANDLE CCtrlClc::FindGroup(HANDLE hGroup)
diff --git a/protocols/IcqOscarJ/src/fam_03buddy.cpp b/protocols/IcqOscarJ/src/fam_03buddy.cpp
index c3c8098b98..bf1a5ff66e 100644
--- a/protocols/IcqOscarJ/src/fam_03buddy.cpp
+++ b/protocols/IcqOscarJ/src/fam_03buddy.cpp
@@ -556,7 +556,7 @@ void CIcqProto::handleUserOnline(BYTE *buf, WORD wLen, serverthread_info *info)
AddToSpammerList(dwUIN);
if (getByte("PopupsSpamEnabled", DEFAULT_SPAM_POPUPS_ENABLED))
ShowPopupMsg(hContact, LPGEN("Spambot Detected"), LPGEN("Contact deleted & further events blocked."), POPTYPE_SPAM);
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
+ CallService(MS_DB_CONTACT_DELETE, hContact, 0);
debugLogA("Contact %u deleted", dwUIN);
}
diff --git a/protocols/IcqOscarJ/src/fam_04message.cpp b/protocols/IcqOscarJ/src/fam_04message.cpp
index b9c227d10b..499192fc2b 100644
--- a/protocols/IcqOscarJ/src/fam_04message.cpp
+++ b/protocols/IcqOscarJ/src/fam_04message.cpp
@@ -1688,8 +1688,8 @@ void CIcqProto::sendMessageTypesAck(MCONTACT hContact, int bUnicode, message_ack
{
if (pArgs)
{
- if ((pArgs->msgType == MTYPE_PLAIN && !CallService(MS_IGNORE_ISIGNORED, (WPARAM)hContact, IGNOREEVENT_MESSAGE))
- || (pArgs->msgType == MTYPE_URL && !CallService(MS_IGNORE_ISIGNORED, (WPARAM)hContact, IGNOREEVENT_URL))
+ if ((pArgs->msgType == MTYPE_PLAIN && !CallService(MS_IGNORE_ISIGNORED, hContact, IGNOREEVENT_MESSAGE))
+ || (pArgs->msgType == MTYPE_URL && !CallService(MS_IGNORE_ISIGNORED, hContact, IGNOREEVENT_URL))
|| pArgs->msgType == MTYPE_CONTACTS)
{
if (pArgs->bType == MAT_SERVER_ADVANCED)
@@ -2904,12 +2904,12 @@ void CIcqProto::handleTypingNotification(BYTE *buf, WORD wLen, WORD wFlags, DWOR
case MTN_FINISHED:
case MTN_TYPED:
- CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, (LPARAM)PROTOTYPE_CONTACTTYPING_OFF);
+ CallService(MS_PROTO_CONTACTISTYPING, hContact, (LPARAM)PROTOTYPE_CONTACTTYPING_OFF);
debugLogA("%s has stopped typing (ch %u).", strUID(dwUin, szUid), wChannel);
break;
case MTN_BEGUN:
- CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, (LPARAM)60);
+ CallService(MS_PROTO_CONTACTISTYPING, hContact, (LPARAM)60);
debugLogA("%s is typing a message (ch %u).", strUID(dwUin, szUid), wChannel);
break;
diff --git a/protocols/IcqOscarJ/src/fam_13servclist.cpp b/protocols/IcqOscarJ/src/fam_13servclist.cpp
index a0d238cb99..df29ad0e92 100644
--- a/protocols/IcqOscarJ/src/fam_13servclist.cpp
+++ b/protocols/IcqOscarJ/src/fam_13servclist.cpp
@@ -1295,7 +1295,7 @@ void CIcqProto::handleServerCListReply(BYTE *buf, WORD wLen, WORD wFlags, server
// Set apparent mode & ignore
setWord(hContact, "ApparentMode", ID_STATUS_OFFLINE);
// set ignore all events
- CallService(MS_IGNORE_IGNORE, (WPARAM)hContact, IGNOREEVENT_ALL);
+ CallService(MS_IGNORE_IGNORE, hContact, IGNOREEVENT_ALL);
debugLogA("Ignore-contact (%s)", szRecordName);
}
else
diff --git a/protocols/IcqOscarJ/src/icq_proto.cpp b/protocols/IcqOscarJ/src/icq_proto.cpp
index bfe5e66277..02aa469ba6 100644
--- a/protocols/IcqOscarJ/src/icq_proto.cpp
+++ b/protocols/IcqOscarJ/src/icq_proto.cpp
@@ -458,7 +458,7 @@ int CIcqProto::AuthDeny(HANDLE hDbEvent, const TCHAR* szReason)
icq_sendAuthResponseServ(uin, uid, 0, szReason);
if (db_get_b(hContact, "CList", "NotOnList", 0))
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
+ CallService(MS_DB_CONTACT_DELETE, hContact, 0);
return 0; // Success
}
@@ -1000,7 +1000,7 @@ int __cdecl CIcqProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre)
// stop contact from typing - some clients do not sent stop notify
if (CheckContactCapabilities(hContact, CAPF_TYPING))
- CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, PROTOTYPE_CONTACTTYPING_OFF);
+ CallService(MS_PROTO_CONTACTISTYPING, hContact, PROTOTYPE_CONTACTTYPING_OFF);
return 0;
}
diff --git a/protocols/IcqOscarJ/src/icq_servlist.cpp b/protocols/IcqOscarJ/src/icq_servlist.cpp
index dd0bdaa3ee..ae2497dabe 100644
--- a/protocols/IcqOscarJ/src/icq_servlist.cpp
+++ b/protocols/IcqOscarJ/src/icq_servlist.cpp
@@ -1583,7 +1583,7 @@ int CIcqProto::moveContactToCListGroup(MCONTACT hContact, const char *szGroup)
HANDLE hGroup = Clist_CreateGroup(0, ptrT( mir_utf8decodeT(szGroup)));
if (ServiceExists(MS_CLIST_CONTACTCHANGEGROUP))
- return CallService(MS_CLIST_CONTACTCHANGEGROUP, (WPARAM)hContact, (LPARAM)hGroup);
+ return CallService(MS_CLIST_CONTACTCHANGEGROUP, hContact, (LPARAM)hGroup);
else /// TODO: is this neccessary ?
return db_set_utf(hContact, "CList", "Group", szGroup);
}
diff --git a/protocols/IcqOscarJ/src/icq_uploadui.cpp b/protocols/IcqOscarJ/src/icq_uploadui.cpp
index 9f6a5d2080..5dbeef6d8e 100644
--- a/protocols/IcqOscarJ/src/icq_uploadui.cpp
+++ b/protocols/IcqOscarJ/src/icq_uploadui.cpp
@@ -65,7 +65,7 @@ static void UpdateAllContactsCheckmark(HWND hwndList, CIcqProto* ppro, HANDLE ph
MCONTACT hContact = ppro->FindFirstContact();
while (hContact)
{
- HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0);
if (hItem)
{
if (!SendMessage(hwndList, CLM_GETCHECKMARK, (WPARAM)hItem, 0))
@@ -90,7 +90,7 @@ static int UpdateCheckmarks(HWND hwndList, CIcqProto* ppro, HANDLE phItemAll)
MCONTACT hContact = ppro->FindFirstContact();
while (hContact)
{
- HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0);
if (hItem)
{
if (ppro->getWord(hContact, DBSETTING_SERVLIST_ID, 0))
@@ -113,7 +113,7 @@ static int UpdateCheckmarks(HWND hwndList, CIcqProto* ppro, HANDLE phItemAll)
static void DeleteOtherContactsFromControl(HWND hCtrl, CIcqProto* ppro)
{
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE)SendMessage(hCtrl, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendMessage(hCtrl, CLM_FINDCONTACT, hContact, 0);
if (hItem)
if (!ppro->IsICQContact(hContact))
SendMessage(hCtrl, CLM_DELETEITEM, (WPARAM)hItem, 0);
@@ -551,7 +551,7 @@ static INT_PTR CALLBACK DlgProcUploadList(HWND hwndDlg,UINT message,WPARAM wPara
{
hCurrentContact = hContact;
- hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0);
if (hItem)
{
isChecked = SendMessage(hwndList, CLM_GETCHECKMARK, (WPARAM)hItem, 0) != 0;
@@ -947,7 +947,7 @@ static INT_PTR CALLBACK DlgProcUploadList(HWND hwndDlg,UINT message,WPARAM wPara
hContact = ppro->FindFirstContact();
while (hContact)
{
- hItem = (HANDLE)SendMessage(hClist, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ hItem = (HANDLE)SendMessage(hClist, CLM_FINDCONTACT, hContact, 0);
if (hItem)
SendMessage(hClist, CLM_SETCHECKMARK, (WPARAM)hItem, check);
hContact = ppro->FindNextContact(hContact);
diff --git a/protocols/IcqOscarJ/src/utilities.cpp b/protocols/IcqOscarJ/src/utilities.cpp
index deafab4806..521a64f4fe 100644
--- a/protocols/IcqOscarJ/src/utilities.cpp
+++ b/protocols/IcqOscarJ/src/utilities.cpp
@@ -475,9 +475,9 @@ MCONTACT CIcqProto::HContactFromUIN(DWORD dwUin, int *Added)
return INVALID_CONTACT_ID;
}
- if (CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)m_szModuleName) != 0) {
+ if (CallService(MS_PROTO_ADDTOCONTACT, hContact, (LPARAM)m_szModuleName) != 0) {
// For some reason we failed to register the protocol to this contact
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
+ CallService(MS_DB_CONTACT_DELETE, hContact, 0);
debugLogA("Failed to register ICQ contact %u", dwUin);
return INVALID_CONTACT_ID;
}
@@ -541,7 +541,7 @@ MCONTACT CIcqProto::HContactFromUID(DWORD dwUin, const char *szUid, int *Added)
//not present: add
if (Added) {
hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
- CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)m_szModuleName);
+ CallService(MS_PROTO_ADDTOCONTACT, hContact, (LPARAM)m_szModuleName);
setString(hContact, UNIQUEIDSETTING, szUid);
@@ -589,7 +589,7 @@ char *NickFromHandle(MCONTACT hContact)
if (hContact == INVALID_CONTACT_ID)
return null_strdup(Translate("<invalid>"));
- return null_strdup((char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, 0));
+ return null_strdup((char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, 0));
}
char *NickFromHandleUtf(MCONTACT hContact)
@@ -597,7 +597,7 @@ char *NickFromHandleUtf(MCONTACT hContact)
if (hContact == INVALID_CONTACT_ID)
return ICQTranslateUtf(LPGEN("<invalid>"));
- return tchar_to_utf8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR));
+ return tchar_to_utf8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR));
}
char *strUID(DWORD dwUIN, char *pszUID)
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp
index f11323d14a..f6793bf76c 100644
--- a/protocols/JabberG/src/jabber_chat.cpp
+++ b/protocols/JabberG/src/jabber_chat.cpp
@@ -602,7 +602,7 @@ int CJabberProto::JabberGcMenuHook(WPARAM, LPARAM lParam)
if (MCONTACT hContact = HContactFromJID(him->m_tszRealJid)) {
gcmi->Item[3].uType = MENU_HMENU;
- gcmi->Item[3].dwID = CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)hContact, 0);
+ gcmi->Item[3].dwID = CallService(MS_CLIST_MENUBUILDCONTACT, hContact, 0);
sttShowGcMenuItems(gcmi, sttRJidItems, 0);
}
else {
@@ -743,7 +743,7 @@ public:
MCONTACT hContact = m_proto->HContactFromJID(buf);
if (hContact)
{
- int hItem = SendDlgItemMessage(m_hwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ int hItem = SendDlgItemMessage(m_hwnd, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem)
SendDlgItemMessage(m_hwnd, IDC_CLIST, CLM_SETCHECKMARK, hItem, 1);
return;
@@ -780,7 +780,7 @@ public:
if (m_proto->isChatRoom(hContact))
continue;
- if (int hItem = SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0)) {
+ if (int hItem = SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0)) {
if (SendMessage(hwndList, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) {
ptrT jid(m_proto->getTStringA(hContact, "jid"));
if (jid != NULL)
@@ -1040,7 +1040,7 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK*
ppro->ListAddResource(LIST_VCARD_TEMP, jsr.jid, him->m_iStatus, him->m_tszStatusMessage, him->m_iPriority);
MCONTACT hContact = (MCONTACT)CallProtoService(ppro->m_szModuleName, PS_ADDTOLIST, PALF_TEMPORARY, (LPARAM)&jsr);
- CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)hContact, 0);
+ CallService(MS_USERINFO_SHOWDIALOG, hContact, 0);
}
break;
@@ -1212,7 +1212,7 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK*
ppro->ListAddResource(LIST_VCARD_TEMP, jsr.jid, him->m_iStatus, him->m_tszStatusMessage, him->m_iPriority);
hContact = (MCONTACT)CallProtoService(ppro->m_szModuleName, PS_ADDTOLIST, PALF_TEMPORARY, (LPARAM)&jsr);
- CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)hContact, 0);
+ CallService(MS_USERINFO_SHOWDIALOG, hContact, 0);
}
break;
@@ -1378,7 +1378,7 @@ static void sttSendPrivateMessage(CJabberProto *ppro, JABBER_LIST_ITEM *item, co
db_set_b(hContact, "CList", "Hidden", 1);
ppro->setTString(hContact, "Nick", nick);
db_set_dw(hContact, "Ignore", "Mask1", 0);
- CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
+ CallService(MS_MSG_SENDMESSAGE, hContact, 0);
}
}
diff --git a/protocols/JabberG/src/jabber_disco.cpp b/protocols/JabberG/src/jabber_disco.cpp
index b4722a2b2b..cf78440832 100644
--- a/protocols/JabberG/src/jabber_disco.cpp
+++ b/protocols/JabberG/src/jabber_disco.cpp
@@ -1239,7 +1239,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM
if (items[i].title) {
MCONTACT hContact;
if ((items[i].action == SD_ACT_USERMENU) && (hContact = HContactFromJID(pNode->GetJid()))) {
- HMENU hContactMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)hContact, 0);
+ HMENU hContactMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, hContact, 0);
AppendMenu(hMenu, MF_STRING|MF_POPUP, (UINT_PTR)hContactMenu, TranslateTS(items[i].title));
}
else AppendMenu(hMenu, MF_STRING, items[i].action, TranslateTS(items[i].title));
@@ -1403,7 +1403,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM
JABBER_LIST_ITEM *item = ListAdd(LIST_VCARD_TEMP, pNode->GetJid());
item->bUseResource = TRUE;
}
- HMENU hContactMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)hContact, 0);
+ HMENU hContactMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, hContact, 0);
GetCursorPos(&pt);
int res = TrackPopupMenu(hContactMenu, TPM_RETURNCMD, pt.x, pt.y, 0, m_pDlgServiceDiscovery->GetHwnd(), NULL);
CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(res, MPCF_CONTACTMENU), (LPARAM)hContact);
@@ -1426,7 +1426,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM
if (item->arResources.getCount() == 0)
ListAddResource(LIST_VCARD_TEMP, jid, ID_STATUS_OFFLINE, NULL, 0);
}
- CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)hContact, 0);
+ CallService(MS_USERINFO_SHOWDIALOG, hContact, 0);
}
break;
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp
index acb1ce6fe6..5421d2f45e 100644
--- a/protocols/JabberG/src/jabber_iqid.cpp
+++ b/protocols/JabberG/src/jabber_iqid.cpp
@@ -501,7 +501,7 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo)
ptrT jid( getTStringA(hContact, "jid"));
if (jid != NULL && !ListGetItemPtr(LIST_ROSTER, jid)) {
debugLogA("Syncing roster: preparing to delete %S (hContact=0x%x)", jid, hContact);
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
+ CallService(MS_DB_CONTACT_DELETE, hContact, 0);
}
hContact = hNext;
}
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp
index b380fa7276..4c88c7ca4b 100644
--- a/protocols/JabberG/src/jabber_proto.cpp
+++ b/protocols/JabberG/src/jabber_proto.cpp
@@ -326,7 +326,7 @@ MCONTACT CJabberProto::AddToListByJID(const TCHAR *newJid, DWORD flags)
jid = mir_tstrdup(newJid);
debugLogA("Add new jid to contact jid = %S", jid);
hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
- CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)m_szModuleName);
+ CallService(MS_PROTO_ADDTOCONTACT, hContact, (LPARAM)m_szModuleName);
setTString(hContact, "jid", jid);
if ((nick=JabberNickFromJID(newJid)) == NULL)
nick = mir_tstrdup(newJid);
@@ -1427,7 +1427,7 @@ void CJabberProto::InfoFrame_OnTransport(CJabberInfoFrame_Event *evt)
{
if (evt->m_event == CJabberInfoFrame_Event::CLICK) {
MCONTACT hContact = (MCONTACT)evt->m_pUserData;
- HMENU hContactMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)hContact, 0);
+ HMENU hContactMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, hContact, 0);
POINT pt;
GetCursorPos(&pt);
int res = TrackPopupMenu(hContactMenu, TPM_RETURNCMD, pt.x, pt.y, 0, (HWND)CallService(MS_CLUI_GETHWND, 0, 0), NULL);
diff --git a/protocols/JabberG/src/jabber_rc.cpp b/protocols/JabberG/src/jabber_rc.cpp
index a4cbc67229..b1ae868e3a 100644
--- a/protocols/JabberG/src/jabber_rc.cpp
+++ b/protocols/JabberG/src/jabber_rc.cpp
@@ -605,7 +605,7 @@ int CJabberProto::AdhocForwardHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhocSe
db_event_markRead(hContact, hDbEvent);
if (bRemoveCListEvents)
- CallService(MS_CLIST_REMOVEEVENT, (WPARAM)hContact, (LPARAM)hDbEvent);
+ CallService(MS_CLIST_REMOVEEVENT, hContact, (LPARAM)hDbEvent);
}
}
diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp
index 59f9086632..dc3b1d9418 100644
--- a/protocols/JabberG/src/jabber_svc.cpp
+++ b/protocols/JabberG/src/jabber_svc.cpp
@@ -466,7 +466,7 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI(WPARAM, LPARAM lParam)
}
}
- CallService(MS_MSG_SENDMESSAGEW, (WPARAM)hContact, (LPARAM)szMsgBody);
+ CallService(MS_MSG_SENDMESSAGEW, hContact, (LPARAM)szMsgBody);
return 0;
}
@@ -525,7 +525,7 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI(WPARAM, LPARAM lParam)
hContact = DBCreateContact(szJid, szJid, TRUE, TRUE);
if (hContact == NULL)
return 1;
- CallService(MS_FILE_SENDFILE, (WPARAM)hContact, (LPARAM)NULL);
+ CallService(MS_FILE_SENDFILE, hContact, (LPARAM)NULL);
return 0;
}
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp
index 41c7238f64..1eb7a05e0a 100644
--- a/protocols/JabberG/src/jabber_thread.cpp
+++ b/protocols/JabberG/src/jabber_thread.cpp
@@ -1167,15 +1167,15 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData* info)
// chatstates composing event
if (hContact && xmlGetChildByTag(node, "composing", "xmlns", JABBER_FEAT_CHATSTATES))
- CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, 60);
+ CallService(MS_PROTO_CONTACTISTYPING, hContact, 60);
// chatstates paused event
if (hContact && xmlGetChildByTag(node, "paused", "xmlns", JABBER_FEAT_CHATSTATES))
- CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, PROTOTYPE_CONTACTTYPING_OFF);
+ CallService(MS_PROTO_CONTACTISTYPING, hContact, PROTOTYPE_CONTACTTYPING_OFF);
// chatstates inactive event
if (hContact && xmlGetChildByTag(node, "inactive", "xmlns", JABBER_FEAT_CHATSTATES)) {
- CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, PROTOTYPE_CONTACTTYPING_OFF);
+ CallService(MS_PROTO_CONTACTISTYPING, hContact, PROTOTYPE_CONTACTTYPING_OFF);
if (pFromResource)
pFromResource->m_bMessageSessionActive = false;
}
@@ -1196,7 +1196,7 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData* info)
if (!hContact)
hContact = CreateTemporaryContact(from, chatItem);
if (hContact)
- NotifyEventHooks(m_hEventNudge, (WPARAM)hContact, 0);
+ NotifyEventHooks(m_hEventNudge, hContact, 0);
}
// chatstates gone event
@@ -1290,12 +1290,12 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData* info)
}
if (hContact && xmlGetChild(xNode, "composing") != NULL)
- CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, 60);
+ CallService(MS_PROTO_CONTACTISTYPING, hContact, 60);
// Maybe a cancel to the previous composing
HXML child = xmlGetChild(xNode, 0);
if (hContact && (!child || (child && idNode != NULL)))
- CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, PROTOTYPE_CONTACTTYPING_OFF);
+ CallService(MS_PROTO_CONTACTISTYPING, hContact, PROTOTYPE_CONTACTTYPING_OFF);
}
else {
// Check whether any event is requested
@@ -1360,7 +1360,7 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData* info)
else if (!_tcscmp(action, _T("delete"))) {
MCONTACT hContact = HContactFromJID(jid);
if (hContact)
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
+ CallService(MS_DB_CONTACT_DELETE, hContact, 0);
}
}
}
@@ -1418,7 +1418,7 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData* info)
// Create a temporary contact, if needed
if (hContact == NULL)
hContact = CreateTemporaryContact(from, chatItem);
- CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, PROTOTYPE_CONTACTTYPING_OFF);
+ CallService(MS_PROTO_CONTACTISTYPING, hContact, PROTOTYPE_CONTACTTYPING_OFF);
time_t now = time(NULL);
if (!msgTime)
diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp
index 4d2bd7942e..b678dedbc2 100644
--- a/protocols/JabberG/src/jabber_xstatus.cpp
+++ b/protocols/JabberG/src/jabber_xstatus.cpp
@@ -729,7 +729,7 @@ void CPepMood::SetMood(MCONTACT hContact, const TCHAR *szMood, const TCHAR *szTe
m_proto->ResetAdvStatus(hContact, ADVSTATUS_MOOD);
}
- NotifyEventHooks(m_proto->m_hEventXStatusChanged, (WPARAM)hContact, 0);
+ NotifyEventHooks(m_proto->m_hEventXStatusChanged, hContact, 0);
}
void CPepMood::ShowSetDialog(BYTE bQuiet)
diff --git a/protocols/JabberG/src/ui_utils.cpp b/protocols/JabberG/src/ui_utils.cpp
index 45303df0bc..6847c8be3b 100644
--- a/protocols/JabberG/src/ui_utils.cpp
+++ b/protocols/JabberG/src/ui_utils.cpp
@@ -602,7 +602,7 @@ BOOL CCtrlClc::OnNotify(int, NMHDR *pnmh)
}
void CCtrlClc::AddContact(MCONTACT hContact)
-{ SendMessage(m_hwnd, CLM_ADDCONTACT, (WPARAM)hContact, 0);
+{ SendMessage(m_hwnd, CLM_ADDCONTACT, hContact, 0);
}
void CCtrlClc::AddGroup(HANDLE hGroup)
@@ -634,7 +634,7 @@ void CCtrlClc::Expand(HANDLE hItem, DWORD flags)
}
HANDLE CCtrlClc::FindContact(MCONTACT hContact)
-{ return (HANDLE)SendMessage(m_hwnd, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+{ return (HANDLE)SendMessage(m_hwnd, CLM_FINDCONTACT, hContact, 0);
}
HANDLE CCtrlClc::FindGroup(HANDLE hGroup)
diff --git a/protocols/MRA/src/MraChat.cpp b/protocols/MRA/src/MraChat.cpp
index 209d14c71c..69be898335 100644
--- a/protocols/MRA/src/MraChat.cpp
+++ b/protocols/MRA/src/MraChat.cpp
@@ -240,6 +240,6 @@ void CMraProto::MraChatSendPrivateMessage(LPSTR lpszEMail)
if (bAdded)
db_set_b(hContact, "CList", "Hidden", 1);
- CallService(MS_IGNORE_UNIGNORE, (WPARAM)hContact, IGNOREEVENT_ALL);
- CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
+ CallService(MS_IGNORE_UNIGNORE, hContact, IGNOREEVENT_ALL);
+ CallService(MS_MSG_SENDMESSAGE, hContact, 0);
}
diff --git a/protocols/MRA/src/MraConstans.h b/protocols/MRA/src/MraConstans.h
index c480cfcd75..bb9808bcd1 100644
--- a/protocols/MRA/src/MraConstans.h
+++ b/protocols/MRA/src/MraConstans.h
@@ -84,7 +84,7 @@ static const LPSTR lpcszMailRuDomains[] =
#define MRA_FORGOT_PASSWORD_URL _T("http://win.mail.ru/cgi-bin/passremind")
-// wParam = (WPARAM)hContact
+// wParam = hContact
#define MRA_REQ_AUTH "/ReqAuth"
#define MRA_REQ_AUTH_STR LPGEN("Request authorization")
#define MRA_GRANT_AUTH "/GrantAuth"
diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp
index 7d52e201ac..22def539cd 100644
--- a/protocols/MRA/src/Mra_functions.cpp
+++ b/protocols/MRA/src/Mra_functions.cpp
@@ -361,7 +361,7 @@ DWORD CMraProto::GetContactFlags(MCONTACT hContact)
break;
}
- if (CallService(MS_IGNORE_ISIGNORED, (WPARAM)hContact, IGNOREEVENT_MESSAGE)) dwRet |= CONTACT_FLAG_IGNORE;
+ if (CallService(MS_IGNORE_ISIGNORED, hContact, IGNOREEVENT_MESSAGE)) dwRet |= CONTACT_FLAG_IGNORE;
}
return(dwRet);
}
@@ -391,9 +391,9 @@ DWORD CMraProto::SetContactFlags(MCONTACT hContact, DWORD dwContactFlag)
}
if (dwContactFlag & CONTACT_FLAG_IGNORE)
- CallService(MS_IGNORE_IGNORE, (WPARAM)hContact, IGNOREEVENT_MESSAGE);
+ CallService(MS_IGNORE_IGNORE, hContact, IGNOREEVENT_MESSAGE);
else
- CallService(MS_IGNORE_UNIGNORE, (WPARAM)hContact, IGNOREEVENT_MESSAGE);
+ CallService(MS_IGNORE_UNIGNORE, hContact, IGNOREEVENT_MESSAGE);
return 0;
}
@@ -542,7 +542,7 @@ MCONTACT CMraProto::MraHContactFromEmail(const CMStringA &szEmail, BOOL bAddIfNe
}
else {
hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
- CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)m_szModuleName);
+ CallService(MS_PROTO_ADDTOCONTACT, hContact, (LPARAM)m_szModuleName);
}
if (hContact) {
@@ -711,7 +711,7 @@ bool IsHTTPSProxyUsed(HANDLE m_hNetlibUser)
// îïðåäåëÿåò ïðèíàäëåæíîñòü êîíòàêòà äàííîé êîïèè ïëàãèíà
bool CMraProto::IsContactMra(MCONTACT hContact)
{
- return CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)m_szModuleName) != 0;
+ return CallService(MS_PROTO_ISPROTOONCONTACT, hContact, (LPARAM)m_szModuleName) != 0;
}
// îïðåäåëÿåòñÿ ÿâëÿåòñÿ ëè êîíòàêò êîíòàêòîì MRA ïðîòîêîëà, íå çàâèñèìî îò òîãî êàêîìó ïëàãèíó îí ïðèíàäëåæèò
diff --git a/protocols/MRA/src/Mra_menus.cpp b/protocols/MRA/src/Mra_menus.cpp
index 2caf912b09..b7a045a62f 100644
--- a/protocols/MRA/src/Mra_menus.cpp
+++ b/protocols/MRA/src/Mra_menus.cpp
@@ -72,7 +72,7 @@ INT_PTR CMraProto::MraRequestAuthForAll(WPARAM wParam, LPARAM lParam)
DWORD dwContactSeverFlags;
if (GetContactBasicInfoW(hContact, NULL, NULL, NULL, &dwContactSeverFlags, NULL, NULL, NULL, NULL) == NO_ERROR)
if (dwContactSeverFlags & CONTACT_INTFLAG_NOT_AUTHORIZED && dwContactSeverFlags != -1)
- MraRequestAuthorization((WPARAM)hContact, 0);
+ MraRequestAuthorization(hContact, 0);
}
}
return 0;
diff --git a/protocols/MRA/src/Mra_proto.cpp b/protocols/MRA/src/Mra_proto.cpp
index eb968f9d10..1f30dff05c 100644
--- a/protocols/MRA/src/Mra_proto.cpp
+++ b/protocols/MRA/src/Mra_proto.cpp
@@ -1294,7 +1294,7 @@ bool CMraProto::CmdClist2(BinBuffer &buf)
if (dwContactSeverFlags & CONTACT_INTFLAG_NOT_AUTHORIZED)
if (getByte("AutoAuthRequestOnLogon", MRA_DEFAULT_AUTO_AUTH_REQ_ON_LOGON))
- CallProtoService(m_szModuleName, MRA_REQ_AUTH, (WPARAM)hContact, 0);
+ CallProtoService(m_szModuleName, MRA_REQ_AUTH, hContact, 0);
}
}
}
@@ -1680,9 +1680,9 @@ DWORD CMraProto::MraRecvCommand_Message(DWORD dwTime, DWORD dwFlags, CMStringA &
// user typing
if (dwFlags & MESSAGE_FLAG_NOTIFY)
- CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, MAILRU_CONTACTISTYPING_TIMEOUT);
+ CallService(MS_PROTO_CONTACTISTYPING, hContact, MAILRU_CONTACTISTYPING_TIMEOUT);
else { // text/contact/auth // typing OFF
- CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, PROTOTYPE_CONTACTTYPING_OFF);
+ CallService(MS_PROTO_CONTACTISTYPING, hContact, PROTOTYPE_CONTACTTYPING_OFF);
if (dwFlags & MESSAGE_FLAG_MULTICHAT) {
DWORD dwMultiChatEventType;
@@ -1787,7 +1787,7 @@ DWORD CMraProto::MraRecvCommand_Message(DWORD dwTime, DWORD dwFlags, CMStringA &
}
else if (dwFlags & MESSAGE_FLAG_ALARM) { // alarm
if (m_heNudgeReceived)
- NotifyEventHooks(m_heNudgeReceived, (WPARAM)hContact, NULL);
+ NotifyEventHooks(m_heNudgeReceived, hContact, NULL);
else {
pre.flags = PREF_UNICODE;
pre.szMessage = (LPSTR)TranslateTS(MRA_ALARM_MESSAGE);
diff --git a/protocols/MSN/src/msn_chat.cpp b/protocols/MSN/src/msn_chat.cpp
index 1ffd87f65d..e3bb6a54d0 100644
--- a/protocols/MSN/src/msn_chat.cpp
+++ b/protocols/MSN/src/msn_chat.cpp
@@ -362,7 +362,7 @@ int CMsnProto::MSN_GCEventHook(WPARAM, LPARAM lParam)
{
char *email = mir_t2a(gch->ptszUID);
MCONTACT hContact = MSN_HContactFromEmail(email);
- CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
+ CallService(MS_MSG_SENDMESSAGE, hContact, 0);
mir_free(email);
break;
}
@@ -390,11 +390,11 @@ int CMsnProto::MSN_GCEventHook(WPARAM, LPARAM lParam)
switch(gch->dwData)
{
case 10:
- CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)hContact, 0);
+ CallService(MS_USERINFO_SHOWDIALOG, hContact, 0);
break;
case 20:
- CallService(MS_HISTORY_SHOWCONTACTHISTORY, (WPARAM)hContact, 0);
+ CallService(MS_HISTORY_SHOWCONTACTHISTORY, hContact, 0);
break;
case 110:
diff --git a/protocols/MSN/src/msn_commands.cpp b/protocols/MSN/src/msn_commands.cpp
index c8b7e9029c..692a0df790 100644
--- a/protocols/MSN/src/msn_commands.cpp
+++ b/protocols/MSN/src/msn_commands.cpp
@@ -491,7 +491,7 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para
if (tTypingUser != NULL && info->mChatID[0] == 0 && _stricmp(email, MyOptions.szEmail)) {
MCONTACT hContact = MSN_HContactFromEmail(tTypingUser, tTypingUser);
- CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, 7);
+ CallService(MS_PROTO_CONTACTISTYPING, hContact, 7);
}
}
else if (!_strnicmp(tContentType, "text/x-msnmsgr-datacast", 23)) {
@@ -1099,7 +1099,7 @@ LBL_InvalidCommand:
// open up srmm dialog when quit while 1 person left
MCONTACT hContact = info->getContactHandle();
- if (hContact) CallServiceSync(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
+ if (hContact) CallServiceSync(MS_MSG_SENDMESSAGE, hContact, 0);
}
}
}
diff --git a/protocols/MSN/src/msn_contact.cpp b/protocols/MSN/src/msn_contact.cpp
index bb7bd6c559..fc3bef21a1 100644
--- a/protocols/MSN/src/msn_contact.cpp
+++ b/protocols/MSN/src/msn_contact.cpp
@@ -35,7 +35,7 @@ MCONTACT CMsnProto::MSN_HContactFromEmail(const char* wlid, const char* msnNick,
if (hContact == NULL && addIfNeeded) {
hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
- CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)m_szModuleName);
+ CallService(MS_PROTO_ADDTOCONTACT, hContact, (LPARAM)m_szModuleName);
setString(hContact, "e-mail", szEmail);
setStringUtf(hContact, "Nick", msnNick ? msnNick : wlid);
if (temporary)
diff --git a/protocols/MSN/src/msn_links.cpp b/protocols/MSN/src/msn_links.cpp
index e058d9194b..4c3adb0a1b 100644
--- a/protocols/MSN/src/msn_links.cpp
+++ b/protocols/MSN/src/msn_links.cpp
@@ -125,7 +125,7 @@ static INT_PTR ServiceParseMsnimLink(WPARAM, LPARAM lParam)
if (hContact != NULL)
{
- CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
+ CallService(MS_MSG_SENDMESSAGE, hContact, 0);
return 0;
}
}
@@ -137,7 +137,7 @@ static INT_PTR ServiceParseMsnimLink(WPARAM, LPARAM lParam)
if (hContact != NULL)
{
- CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
+ CallService(MS_MSG_SENDMESSAGE, hContact, 0);
return 0;
}
}
@@ -149,7 +149,7 @@ static INT_PTR ServiceParseMsnimLink(WPARAM, LPARAM lParam)
if (hContact != NULL)
{
- CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
+ CallService(MS_MSG_SENDMESSAGE, hContact, 0);
return 0;
}
}
diff --git a/protocols/MSN/src/msn_lists.cpp b/protocols/MSN/src/msn_lists.cpp
index b091510004..2e2b181113 100644
--- a/protocols/MSN/src/msn_lists.cpp
+++ b/protocols/MSN/src/msn_lists.cpp
@@ -251,7 +251,7 @@ void CMsnProto::Lists_Populate(void)
else
Lists_Add(0, NETID_UNKNOWN, szEmail, hContact);
}
- else CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
+ else CallService(MS_DB_CONTACT_DELETE, hContact, 0);
hContact = hNext;
}
}
diff --git a/protocols/MSN/src/msn_mail.cpp b/protocols/MSN/src/msn_mail.cpp
index f3c84f36af..407375bf17 100644
--- a/protocols/MSN/src/msn_mail.cpp
+++ b/protocols/MSN/src/msn_mail.cpp
@@ -296,7 +296,7 @@ void CMsnProto::sttNotificationMessage(char* msgBody, bool isInitial)
MCONTACT hContact = MSN_HContactFromEmail(MyOptions.szEmail);
if (hContact)
{
- CallService(MS_CLIST_REMOVEEVENT, (WPARAM)hContact, (LPARAM) 1);
+ CallService(MS_CLIST_REMOVEEVENT, hContact, (LPARAM) 1);
displayEmailCount(hContact);
if (ShowPopup && !getByte("DisableHotmailTray", 1))
@@ -313,7 +313,7 @@ void CMsnProto::sttNotificationMessage(char* msgBody, bool isInitial)
mir_snprintf(buf, SIZEOF(buf), "%s%s", m_szModuleName, MS_GOTO_INBOX);
cle.pszService = buf;
- CallService(MS_CLIST_ADDEVENT, (WPARAM)hContact, (LPARAM)&cle);
+ CallService(MS_CLIST_ADDEVENT, hContact, (LPARAM)&cle);
}
}
diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp
index c4abdbdcaa..3646f6dc37 100644
--- a/protocols/MSN/src/msn_menu.cpp
+++ b/protocols/MSN/src/msn_menu.cpp
@@ -50,7 +50,7 @@ INT_PTR CMsnProto::MsnBlockCommand(WPARAM hContact, LPARAM)
INT_PTR CMsnProto::MsnGotoInbox(WPARAM, LPARAM)
{
MCONTACT hContact = MSN_HContactFromEmail(MyOptions.szEmail);
- if (hContact) CallService(MS_CLIST_REMOVEEVENT, (WPARAM)hContact, (LPARAM) 1);
+ if (hContact) CallService(MS_CLIST_REMOVEEVENT, hContact, (LPARAM) 1);
MsnInvokeMyURL(true, "http://mail.live.com?rru=inbox");
return 0;
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp
index f3c74618e2..18a652801f 100644
--- a/protocols/MSN/src/msn_misc.cpp
+++ b/protocols/MSN/src/msn_misc.cpp
@@ -835,7 +835,7 @@ LRESULT CALLBACK NullWindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara
if (tData != NULL) {
if (tData->flags & MSN_HOTMAIL_POPUP) {
MCONTACT hContact = tData->proto->MSN_HContactFromEmail(tData->proto->MyOptions.szEmail, NULL);
- if (hContact) CallService(MS_CLIST_REMOVEEVENT, (WPARAM)hContact, (LPARAM) 1);
+ if (hContact) CallService(MS_CLIST_REMOVEEVENT, hContact, (LPARAM) 1);
if (tData->flags & MSN_ALLOW_ENTER)
tData->proto->MsnInvokeMyURL(true, tData->url);
}
@@ -849,7 +849,7 @@ LRESULT CALLBACK NullWindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara
if (tData != NULL && tData->flags & MSN_HOTMAIL_POPUP) {
MCONTACT hContact = tData->proto->MSN_HContactFromEmail(tData->proto->MyOptions.szEmail, NULL);
if (hContact)
- CallService(MS_CLIST_REMOVEEVENT, (WPARAM)hContact, (LPARAM) 1);
+ CallService(MS_CLIST_REMOVEEVENT, hContact, (LPARAM) 1);
}
PUDeletePopup(hWnd);
break;
@@ -1222,7 +1222,7 @@ bool MSN_MsgWndExist(MCONTACT hContact)
bool res = CallService(MS_MSG_GETWINDOWDATA, (WPARAM)&msgWinInData, (LPARAM)&msgWinData) != 0;
res = res || msgWinData.hwndWindow;
if (res) {
- msgWinInData.hContact = (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
+ msgWinInData.hContact = (MCONTACT)CallService(MS_MC_GETMETACONTACT, hContact, 0);
if (msgWinInData.hContact != NULL) {
res = CallService(MS_MSG_GETWINDOWDATA, (WPARAM)&msgWinInData, (LPARAM)&msgWinData) != 0;
res |= (msgWinData.hwndWindow == NULL);
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp
index 1c21cb445e..292bfaf8c0 100644
--- a/protocols/MSN/src/msn_proto.cpp
+++ b/protocols/MSN/src/msn_proto.cpp
@@ -399,7 +399,7 @@ int CMsnProto::AuthDeny(HANDLE hDbEvent, const TCHAR* szReason)
if (msc->hContact) CallService(MS_DB_CONTACT_DELETE, (WPARAM)msc->hContact, 0);
msc->hContact = NULL;
MCONTACT hContact = MSN_HContactFromEmail(email);
- if (hContact) CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
+ if (hContact) CallService(MS_DB_CONTACT_DELETE, hContact, 0);
}
return 0;
diff --git a/protocols/MSN/src/msn_svcs.cpp b/protocols/MSN/src/msn_svcs.cpp
index 9d1be8b0a5..9c6c61b915 100644
--- a/protocols/MSN/src/msn_svcs.cpp
+++ b/protocols/MSN/src/msn_svcs.cpp
@@ -391,7 +391,7 @@ int CMsnProto::OnContactDeleted(WPARAM hContact, LPARAM lParam)
else {
char szEmail[MSN_MAX_EMAIL_LEN];
if (MSN_IsMeByContact(hContact, szEmail))
- CallService(MS_CLIST_REMOVEEVENT, (WPARAM)hContact, (LPARAM) 1);
+ CallService(MS_CLIST_REMOVEEVENT, hContact, (LPARAM) 1);
if (szEmail[0])
{
diff --git a/protocols/Skype/src/skype_contacts.cpp b/protocols/Skype/src/skype_contacts.cpp
index 9638676e83..0561db0e04 100644
--- a/protocols/Skype/src/skype_contacts.cpp
+++ b/protocols/Skype/src/skype_contacts.cpp
@@ -202,7 +202,7 @@ MCONTACT CSkypeProto::AddContact(CContact::Ref contact, bool isTemporary)
if ( !hContact)
{
hContact = (MCONTACT)::CallService(MS_DB_CONTACT_ADD, 0, 0);
- ::CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)this->m_szModuleName);
+ ::CallService(MS_PROTO_ADDTOCONTACT, hContact, (LPARAM)this->m_szModuleName);
ptrW nick(::mir_utf8decodeW(contact->GetNick()));
diff --git a/protocols/Skype/src/skype_dialogs.cpp b/protocols/Skype/src/skype_dialogs.cpp
index 8aaa3bf433..775180ccc8 100644
--- a/protocols/Skype/src/skype_dialogs.cpp
+++ b/protocols/Skype/src/skype_dialogs.cpp
@@ -408,7 +408,7 @@ INT_PTR CALLBACK CSkypeProto::SkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam
if (hContact == NULL)
szProto = ppro->m_szModuleName;
else
- szProto = (char *)::CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ szProto = (char *)::CallService(MS_PROTO_GETCONTACTBASEPROTO, hContact, 0);
if (!szProto)
break;
diff --git a/protocols/Skype/src/skype_events.cpp b/protocols/Skype/src/skype_events.cpp
index 5d36c697e1..ba7ea1d311 100644
--- a/protocols/Skype/src/skype_events.cpp
+++ b/protocols/Skype/src/skype_events.cpp
@@ -140,7 +140,7 @@ int __cdecl CSkypeProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam)
MCONTACT hContact = (MCONTACT)lParam;
if (hContact) {
- char *szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, hContact, 0);
if (szProto != NULL && !strcmp(szProto, m_szModuleName)) {
odp.pfnDlgProc = SkypeDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO_SKYPE);
diff --git a/protocols/Skype/src/skype_instances.cpp b/protocols/Skype/src/skype_instances.cpp
index 7a571d243b..b5cf2c4494 100644
--- a/protocols/Skype/src/skype_instances.cpp
+++ b/protocols/Skype/src/skype_instances.cpp
@@ -75,7 +75,7 @@ void CSkypeProto::UninitInstances()
CSkypeProto* CSkypeProto::GetContactInstance(MCONTACT hContact)
{
- char *proto = (char *)::CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *proto = (char *)::CallService(MS_PROTO_GETCONTACTBASEPROTO, hContact, 0);
if (proto == NULL)
return NULL;
diff --git a/protocols/Skype/src/skype_proto.cpp b/protocols/Skype/src/skype_proto.cpp
index 508c0684f9..204f446c29 100644
--- a/protocols/Skype/src/skype_proto.cpp
+++ b/protocols/Skype/src/skype_proto.cpp
@@ -83,7 +83,7 @@ int __cdecl CSkypeProto::Authorize(HANDLE hDbEvent)
if (hContact == INVALID_CONTACT_ID)
return 1;
- return CSkypeProto::GrantAuth((WPARAM)hContact, NULL);
+ return CSkypeProto::GrantAuth(hContact, NULL);
}
return 1;
@@ -97,7 +97,7 @@ int __cdecl CSkypeProto::AuthDeny(HANDLE hDbEvent, const TCHAR* szReason)
if (hContact == INVALID_CONTACT_ID)
return 1;
- return CSkypeProto::RevokeAuth((WPARAM)hContact, NULL);
+ return CSkypeProto::RevokeAuth(hContact, NULL);
}
return 1;
diff --git a/protocols/SkypeClassic/src/contacts.cpp b/protocols/SkypeClassic/src/contacts.cpp
index ecc6902397..bfcd4a4319 100644
--- a/protocols/SkypeClassic/src/contacts.cpp
+++ b/protocols/SkypeClassic/src/contacts.cpp
@@ -314,7 +314,7 @@ MCONTACT find_contact(char *name)
// already on list?
for (MCONTACT hContact = db_find_first(); hContact != NULL; hContact=db_find_next(hContact))
{
- char *szProto = (char*)CallService( MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0 );
+ char *szProto = (char*)CallService( MS_PROTO_GETCONTACTBASEPROTO, hContact, 0 );
if (szProto!=NULL && !strcmp(szProto, SKYPE_PROTONAME) && db_get_b(hContact, SKYPE_PROTONAME, "ChatRoom", 0)==0)
{
if (db_get_s(hContact, SKYPE_PROTONAME, SKYPE_NAME, &dbv)) continue;
@@ -335,7 +335,7 @@ MCONTACT find_contactT(TCHAR *name)
// already on list?
for (MCONTACT hContact=db_find_first(); hContact != NULL; hContact=db_find_next(hContact))
{
- char *szProto = (char*)CallService( MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0 );
+ char *szProto = (char*)CallService( MS_PROTO_GETCONTACTBASEPROTO, hContact, 0 );
if (szProto!=NULL && !strcmp(szProto, SKYPE_PROTONAME) && db_get_b(hContact, SKYPE_PROTONAME, "ChatRoom", 0)==0)
{
if (db_get_ts(hContact, SKYPE_PROTONAME, SKYPE_NAME, &dbv)) continue;
@@ -367,9 +367,9 @@ MCONTACT add_contact(char *name, DWORD flags)
LOG(("add_contact: Adding %s", name));
hContact=(MCONTACT)CallServiceSync(MS_DB_CONTACT_ADD, 0, 0);
if (hContact) {
- if (CallServiceSync(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact,(LPARAM)SKYPE_PROTONAME)!=0) {
+ if (CallServiceSync(MS_PROTO_ADDTOCONTACT, hContact,(LPARAM)SKYPE_PROTONAME)!=0) {
LOG(("add_contact: Ouch! MS_PROTO_ADDTOCONTACT failed for some reason"));
- CallServiceSync(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
+ CallServiceSync(MS_DB_CONTACT_DELETE, hContact, 0);
return NULL;
}
if (name[0]) db_set_s(hContact, SKYPE_PROTONAME, SKYPE_NAME, name);
@@ -393,7 +393,7 @@ void logoff_contacts(BOOL bCleanup) {
LOG(("logoff_contacts: Logging off contacts."));
for (hContact=db_find_first();hContact != NULL;hContact=db_find_next(hContact)) {
- szProto = (char*)CallService( MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0 );
+ szProto = (char*)CallService( MS_PROTO_GETCONTACTBASEPROTO, hContact, 0 );
if (szProto!=NULL && !strcmp(szProto, SKYPE_PROTONAME))
{
if (db_get_w(hContact, SKYPE_PROTONAME, "Status", ID_STATUS_OFFLINE)!=ID_STATUS_OFFLINE)
diff --git a/protocols/SkypeClassic/src/gchat.cpp b/protocols/SkypeClassic/src/gchat.cpp
index 9e746244b6..64055d18c0 100644
--- a/protocols/SkypeClassic/src/gchat.cpp
+++ b/protocols/SkypeClassic/src/gchat.cpp
@@ -172,7 +172,7 @@ MCONTACT find_chat(LPCTSTR chatname) {
DBVARIANT dbv;
for (hContact=db_find_first();hContact != NULL;hContact=db_find_next(hContact)) {
- szProto = (char*)CallService( MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0 );
+ szProto = (char*)CallService( MS_PROTO_GETCONTACTBASEPROTO, hContact, 0 );
if (szProto!=NULL && !strcmp(szProto, SKYPE_PROTONAME) &&
db_get_b(hContact, SKYPE_PROTONAME, "ChatRoom", 0)==1)
{
@@ -194,7 +194,7 @@ MCONTACT find_chatA(char *chatname) {
DBVARIANT dbv;
for (hContact=db_find_first();hContact != NULL;hContact=db_find_next(hContact)) {
- szProto = (char*)CallService( MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0 );
+ szProto = (char*)CallService( MS_PROTO_GETCONTACTBASEPROTO, hContact, 0 );
if (szProto!=NULL && !strcmp(szProto, SKYPE_PROTONAME) &&
db_get_b(hContact, SKYPE_PROTONAME, "ChatRoom", 0)==1)
{
@@ -494,7 +494,7 @@ void InviteUser(const TCHAR *szChatId)
// generate a list of contact
while (hContact) {
- char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact,0 );
+ char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, hContact,0 );
if (szProto && !strcmp(SKYPE_PROTONAME, szProto) &&
!db_get_b(hContact, SKYPE_PROTONAME, "ChatRoom", 0) &&
db_get_w(hContact, SKYPE_PROTONAME, "Status", ID_STATUS_OFFLINE)!=ID_STATUS_OFFLINE)
@@ -508,7 +508,7 @@ void InviteUser(const TCHAR *szChatId)
}
if (!alreadyInSession)
AppendMenu(tMenu, MF_STRING, (UINT_PTR)hContact,
- (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR));
+ (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR));
}
hContact = db_find_next(hContact);
}
@@ -622,7 +622,7 @@ int GCEventHook(WPARAM wParam,LPARAM lParam) {
}
// Delete Chatroom from Contact list, as we don't need it anymore...?
if (hContact = find_chat(gc->szChatName))
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
+ CallService(MS_DB_CONTACT_DELETE, hContact, 0);
RemChat(gc->szChatName);
break;
@@ -692,7 +692,7 @@ int GCEventHook(WPARAM wParam,LPARAM lParam) {
break;
case GC_USER_PRIVMESS: {
MCONTACT hContact = find_contactT(gch->ptszUID);
- if (hContact) CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
+ if (hContact) CallService(MS_MSG_SENDMESSAGE, hContact, 0);
break;
}
@@ -717,8 +717,8 @@ int GCEventHook(WPARAM wParam,LPARAM lParam) {
MCONTACT hContact = find_contactT(gch->ptszUID);
switch(gch->dwData) {
- case 10:CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)hContact, 0); break;
- case 20:CallService(MS_HISTORY_SHOWCONTACTHISTORY, (WPARAM)hContact, 0); break;
+ case 10:CallService(MS_USERINFO_SHOWDIALOG, hContact, 0); break;
+ case 20:CallService(MS_HISTORY_SHOWCONTACTHISTORY, hContact, 0); break;
case 30: KickUser(hContact, gch); break;
case 110: KillChatSession(gch->pDest); break;
}
diff --git a/protocols/SkypeClassic/src/skype.cpp b/protocols/SkypeClassic/src/skype.cpp
index 5acdb42d43..1310b0bc60 100644
--- a/protocols/SkypeClassic/src/skype.cpp
+++ b/protocols/SkypeClassic/src/skype.cpp
@@ -1288,7 +1288,7 @@ void FetchMessageThread(fetchmsg_arg *pargs) {
TYP_MSGLENTRY *pme;
LOG(("FetchMessageThread Adding event"));
- if (!(dbei.szModule=(char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0)))
+ if (!(dbei.szModule=(char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, hContact, 0)))
dbei.szModule=SKYPE_PROTONAME;
dbei.cbBlob=msglen;
if (pre.flags & PREF_UNICODE)
@@ -1366,7 +1366,7 @@ void FetchMessageThreadSync(fetchmsg_arg *pargs) {
{
MCONTACT hContact;
if ((int)(hContact = (MCONTACT)CallService (MS_DB_EVENT_GETCONTACT, (WPARAM)pMsgEntry->hEvent, 0)) != -1)
- CallService (MS_DB_EVENT_MARKREAD, (WPARAM)hContact, (LPARAM)hDBEvent);
+ CallService (MS_DB_EVENT_MARKREAD, hContact, (LPARAM)hDBEvent);
}
*/
free (pargs);
@@ -1445,7 +1445,7 @@ MCONTACT GetCallerContact(char *szSkypeMsg)
MCONTACT GetMetaHandle(DWORD dwId)
{
for (MCONTACT hContact=db_find_first(); hContact != NULL; hContact=db_find_next(hContact)) {
- char *szProto = (char*)CallService( MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0 );
+ char *szProto = (char*)CallService( MS_PROTO_GETCONTACTBASEPROTO, hContact, 0 );
if (szProto!=NULL && !strcmp(szProto, "MetaContacts") &&
db_get_dw(hContact, "MetaContacts", "MetaID", MAXDWORD)==dwId)
return hContact;
@@ -1559,7 +1559,7 @@ void RingThread(char *szSkypeMsg) {
unsigned int popupBackColor, popupTextColor;
int popupTimeSec;
POPUPDATAT InCallPopup;
- TCHAR * lpzContactName = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,GCDNF_TCHAR);
+ TCHAR * lpzContactName = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,hContact,GCDNF_TCHAR);
popupTimeSec = db_get_dw(NULL, SKYPE_PROTONAME, "popupTimeSec", 4);
popupTextColor = db_get_dw(NULL, SKYPE_PROTONAME, "popupTextColor", GetSysColor(COLOR_WINDOWTEXT));
@@ -1589,7 +1589,7 @@ void RingThread(char *szSkypeMsg) {
dbei.flags=DBEF_READ;
cle.hContact=hContact;
cle.hDbEvent=db_event_add(hContact, &dbei);
- _snprintf(toolTip,sizeof(toolTip),Translate("Incoming call from %s"),(char*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,0));
+ _snprintf(toolTip,sizeof(toolTip),Translate("Incoming call from %s"),(char*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,hContact,0));
cle.pszTooltip=toolTip;
CallServiceSync(MS_CLIST_ADDEVENT,0,(LPARAM)&cle);
}
@@ -1649,7 +1649,7 @@ void EndCallThread(char *szSkypeMsg) {
db_event_get(hDbEvent, &dbei);
if (!(dbei.flags&(DBEF_SENT|DBEF_READ)) && dbei.eventType==EVENTTYPE_CALL) {
db_event_markRead(hContact,hDbEvent);
- CallService(MS_CLIST_REMOVEEVENT,(WPARAM)hContact,(LPARAM)hDbEvent);
+ CallService(MS_CLIST_REMOVEEVENT,hContact,(LPARAM)hDbEvent);
}
if (dbei.pBlob) free(dbei.pBlob);
hDbEvent=db_event_next(hDbEvent);
@@ -1658,10 +1658,10 @@ void EndCallThread(char *szSkypeMsg) {
if (!db_get_s(hContact, SKYPE_PROTONAME, "SkypeOutNr", &dbv)) {
db_free(&dbv);
- if (!strcmp((char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0), SKYPE_PROTONAME) &&
+ if (!strcmp((char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, hContact, 0), SKYPE_PROTONAME) &&
db_get_b(hContact, "CList", "NotOnList", 0)
)
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
+ CallService(MS_DB_CONTACT_DELETE, hContact, 0);
}
}
free(szSkypeMsg);
@@ -1842,7 +1842,7 @@ LONG APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam)
LPARAM lTyping = PROTOTYPE_CONTACTTYPING_OFF;
if (!strcmp(p, "PURPLE_TYPING")) lTyping=PROTOTYPE_CONTACTTYPING_INFINITE;
- CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, lTyping);
+ CallService(MS_PROTO_CONTACTISTYPING, hContact, lTyping);
break;
}
}
@@ -2048,7 +2048,7 @@ LONG APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam)
} else { // BUDDYSTATUS:
flag=0;
switch(atoi(ptr+12)) {
- case 1: if (hContact=find_contact(nick)) CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0); break;
+ case 1: if (hContact=find_contact(nick)) CallService(MS_DB_CONTACT_DELETE, hContact, 0); break;
case 0: break;
case 2: flag=PALF_TEMPORARY;
case 3: add_contact(nick, flag);
@@ -2922,7 +2922,7 @@ void CleanupNicknames(char *dummy) {
LOG(("CleanupNicknames Cleaning up..."));
for (hContact=db_find_first();hContact != NULL;hContact=db_find_next(hContact)) {
- szProto = (char*)CallService( MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0 );
+ szProto = (char*)CallService( MS_PROTO_GETCONTACTBASEPROTO, hContact, 0 );
if (szProto!=NULL && !strcmp(szProto, SKYPE_PROTONAME) &&
db_get_b(hContact, SKYPE_PROTONAME, "ChatRoom", 0)==0)
{
@@ -3052,7 +3052,7 @@ int AnySkypeusers(void)
for ( ;; ) {
memset(&pdi,0,sizeof(pdi));
- CallService(MS_DB_CONTACT_ENUMSETTINGS,(WPARAM)hContact,(LPARAM)&cns);
+ CallService(MS_DB_CONTACT_ENUMSETTINGS,hContact,(LPARAM)&cns);
// Upgrade Protocol settings to new string
if (pdi.szSettings) {
int i;
@@ -3063,7 +3063,7 @@ int AnySkypeusers(void)
cws.szModule=SKYPE_PROTONAME;
cws.szSetting=pdi.szSettings[i];
cws.value=dbv;
- if (!CallService(MS_DB_CONTACT_WRITESETTING,(WPARAM)hContact,(LPARAM)&cws))
+ if (!CallService(MS_DB_CONTACT_WRITESETTING,hContact,(LPARAM)&cws))
db_unset(hContact,OldName,pdi.szSettings[i]);
db_free(&dbv);
}
diff --git a/protocols/SkypeClassic/src/skypeapi.cpp b/protocols/SkypeClassic/src/skypeapi.cpp
index 1534a3530a..b5bd939172 100644
--- a/protocols/SkypeClassic/src/skypeapi.cpp
+++ b/protocols/SkypeClassic/src/skypeapi.cpp
@@ -782,7 +782,7 @@ static INT_PTR CALLBACK DialDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR
OUTPUTA(ptr);
free(ptr);
}
- if (TempAdded) CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
+ if (TempAdded) CallService(MS_DB_CONTACT_DELETE, hContact, 0);
}
free(msg);
}
@@ -816,7 +816,7 @@ static INT_PTR CALLBACK CallstatDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
// Check, if another call is in progress
for (hContact=db_find_first();hContact != NULL;hContact=db_find_next(hContact)) {
- char *szProto = (char*)CallService( MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0 );
+ char *szProto = (char*)CallService( MS_PROTO_GETCONTACTBASEPROTO, hContact, 0 );
if (szProto != NULL && !strcmp(szProto, SKYPE_PROTONAME) && hContact != (MCONTACT)lParam &&
db_get_b(hContact, SKYPE_PROTONAME, "ChatRoom", 0) == 0 &&
!db_get_s(hContact, SKYPE_PROTONAME, "CallId", &dbv2))
@@ -831,7 +831,7 @@ static INT_PTR CALLBACK CallstatDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
if (dbv2.pszVal)
{
char buf[256], buf2[256];
- char *szOtherCaller=(char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,0);
+ char *szOtherCaller=(char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,hContact,0);
Utils_RestoreWindowPosition(hwndDlg, NULL, SKYPE_PROTONAME, "CALLSTATdlg");
TranslateDialogDefault(hwndDlg);
diff --git a/protocols/SkypeClassic/src/skypeopt.cpp b/protocols/SkypeClassic/src/skypeopt.cpp
index 42e4f79423..a149fdaf74 100644
--- a/protocols/SkypeClassic/src/skypeopt.cpp
+++ b/protocols/SkypeClassic/src/skypeopt.cpp
@@ -163,7 +163,7 @@ INT_PTR CALLBACK OptPopupDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
TCHAR * lpzContactName;
hContact = db_find_first();
- lpzContactName = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,GCDNF_TCHAR);
+ lpzContactName = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,hContact,GCDNF_TCHAR);
InCallPopup.lchContact = hContact;
InCallPopup.lchIcon = LoadIcon(hInst,MAKEINTRESOURCE(IDI_CALL));
InCallPopup.colorBack = ! popupWindowColor ? popupBackColor : GetSysColor(COLOR_BTNFACE);
diff --git a/protocols/SkypeClassic/src/voiceservice.cpp b/protocols/SkypeClassic/src/voiceservice.cpp
index f5e97f3a53..dd49772d2a 100644
--- a/protocols/SkypeClassic/src/voiceservice.cpp
+++ b/protocols/SkypeClassic/src/voiceservice.cpp
@@ -45,7 +45,7 @@ static MCONTACT FindContactByCallId(char *callId)
MCONTACT hContact;
int iCmpRes;
for (hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact)) {
- char *szProto = (char*) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *szProto = (char*) CallService(MS_PROTO_GETCONTACTBASEPROTO, hContact, 0);
DBVARIANT dbv;
if (szProto != NULL
diff --git a/protocols/Tlen/src/tlen_iqid.cpp b/protocols/Tlen/src/tlen_iqid.cpp
index 450fc6c4a5..fe6784d5e0 100644
--- a/protocols/Tlen/src/tlen_iqid.cpp
+++ b/protocols/Tlen/src/tlen_iqid.cpp
@@ -212,7 +212,7 @@ void TlenIqResultRoster(TlenProtocol *proto, XmlNode *iqNode)
if (jid != NULL) {
if (!TlenListExist(proto, LIST_ROSTER, jid)) {
proto->debugLogA("Syncing roster: deleting 0x%x", hContact);
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
+ CallService(MS_DB_CONTACT_DELETE, hContact, 0);
}
}
hContact = hNext;
diff --git a/protocols/Tlen/src/tlen_thread.cpp b/protocols/Tlen/src/tlen_thread.cpp
index 460f3d860f..e4eafbda90 100644
--- a/protocols/Tlen/src/tlen_thread.cpp
+++ b/protocols/Tlen/src/tlen_thread.cpp
@@ -1024,13 +1024,13 @@ static void TlenProcessM(XmlNode *node, ThreadData *info)
if (!strcmp(tp, "t")) { //contact is writing
if (item != NULL ) {
item->isTyping = TRUE;
- CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, (LPARAM)PROTOTYPE_CONTACTTYPING_INFINITE);
+ CallService(MS_PROTO_CONTACTISTYPING, hContact, (LPARAM)PROTOTYPE_CONTACTTYPING_INFINITE);
}
}
else if (!strcmp(tp, "u")) {//contact stopped writing
if (item != NULL) {
item->isTyping = FALSE;
- CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, (LPARAM)PROTOTYPE_CONTACTTYPING_OFF);
+ CallService(MS_PROTO_CONTACTISTYPING, hContact, (LPARAM)PROTOTYPE_CONTACTTYPING_OFF);
}
}
else if (!strcmp(tp, "a")) {//alert was received
diff --git a/protocols/Twitter/src/contacts.cpp b/protocols/Twitter/src/contacts.cpp
index fe0fa53c58..a6538af1df 100644
--- a/protocols/Twitter/src/contacts.cpp
+++ b/protocols/Twitter/src/contacts.cpp
@@ -254,7 +254,7 @@ MCONTACT TwitterProto::AddToClientList(const char *name, const char *status)
hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
if(hContact)
{
- if(CallService(MS_PROTO_ADDTOCONTACT,(WPARAM)hContact,(LPARAM)m_szModuleName) == 0)
+ if(CallService(MS_PROTO_ADDTOCONTACT,hContact,(LPARAM)m_szModuleName) == 0)
{
db_set_s(hContact,m_szModuleName,TWITTER_KEY_UN,name);
db_set_w(hContact,m_szModuleName,"Status",ID_STATUS_ONLINE);
@@ -272,7 +272,7 @@ MCONTACT TwitterProto::AddToClientList(const char *name, const char *status)
return hContact;
}
- CallService(MS_DB_CONTACT_DELETE,(WPARAM)hContact,0);
+ CallService(MS_DB_CONTACT_DELETE,hContact,0);
}
return 0;
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp
index b8dfa1257b..8ca7238f5d 100644
--- a/protocols/VKontakte/src/vk_chats.cpp
+++ b/protocols/VKontakte/src/vk_chats.cpp
@@ -475,7 +475,7 @@ void CVkProto::NickMenuHook(CVkChatInfo *cc, GCHOOK *gch)
switch (gch->dwData) {
case IDM_INFO:
if (MCONTACT hContact = FindUser(cu->m_uid))
- CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)hContact, 0);
+ CallService(MS_USERINFO_SHOWDIALOG, hContact, 0);
break;
case IDM_KICK:
@@ -530,7 +530,7 @@ static void FilterContacts(HWND hwndDlg, CVkProto *ppro)
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
char *proto = GetContactProto(hContact);
if (lstrcmpA(proto, ppro->m_szModuleName) || ppro->isChatRoom(hContact))
- if (HANDLE hItem = (HANDLE)SendMessage(hwndClist, CLM_FINDCONTACT, (WPARAM)hContact, 0))
+ if (HANDLE hItem = (HANDLE)SendMessage(hwndClist, CLM_FINDCONTACT, hContact, 0))
SendMessage(hwndClist, CLM_DELETEITEM, (WPARAM)hItem, 0);
}
}
@@ -589,7 +589,7 @@ static INT_PTR CALLBACK GcCreateDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
if (ppro->isChatRoom(hContact))
continue;
- if (int hItem = SendMessage(hwndClist, CLM_FINDCONTACT, (WPARAM)hContact, 0)) {
+ if (int hItem = SendMessage(hwndClist, CLM_FINDCONTACT, hContact, 0)) {
if (SendMessage(hwndClist, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) {
int uid = ppro->getDword(hContact, "ID", 0);
if (uid != NULL) {
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp
index 07afed416f..d92539b22b 100644
--- a/protocols/VKontakte/src/vk_thread.cpp
+++ b/protocols/VKontakte/src/vk_thread.cpp
@@ -557,7 +557,7 @@ void CVkProto::PollUpdates(JSONNODE *pUpdates)
case VKPOLL_USR_UTN:
uid = json_as_int(json_at(pChild, 1));
if ((hContact = FindUser(uid)) != NULL)
- CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, 5);
+ CallService(MS_PROTO_CONTACTISTYPING, hContact, 5);
break;
case VKPOLL_CHAT_CHANGED:
diff --git a/protocols/Yahoo/src/im.cpp b/protocols/Yahoo/src/im.cpp
index 49b7f108ae..bee33002bc 100644
--- a/protocols/Yahoo/src/im.cpp
+++ b/protocols/Yahoo/src/im.cpp
@@ -214,7 +214,7 @@ int __cdecl CYahooProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre)
// NUDGES
if (!lstrcmpA(pre->szMessage, "<ding>") && ServiceExists("NUDGE/Send")) {
debugLogA("[YahooRecvMessage] Doing Nudge Service!");
- NotifyEventHooks(hYahooNudge, (WPARAM)hContact, pre->timestamp);
+ NotifyEventHooks(hYahooNudge, hContact, pre->timestamp);
return 0;
}
diff --git a/protocols/Yahoo/src/links.cpp b/protocols/Yahoo/src/links.cpp
index 9aef65c76b..b455b61e5c 100644
--- a/protocols/Yahoo/src/links.cpp
+++ b/protocols/Yahoo/src/links.cpp
@@ -150,7 +150,7 @@ static INT_PTR ServiceParseYmsgrLink(WPARAM wParam, LPARAM lParam)
MCONTACT hContact = proto->add_buddy(id, id, 0, PALF_TEMPORARY); /* ensure contact is on list */
if (hContact)
- CallService(MS_MSG_SENDMESSAGET, (WPARAM)hContact, (LPARAM)msg);
+ CallService(MS_MSG_SENDMESSAGET, hContact, (LPARAM)msg);
mir_free(id);
return 0;
diff --git a/protocols/Yahoo/src/yahoo.cpp b/protocols/Yahoo/src/yahoo.cpp
index fc4debb1f5..d23fa6926c 100644
--- a/protocols/Yahoo/src/yahoo.cpp
+++ b/protocols/Yahoo/src/yahoo.cpp
@@ -320,7 +320,7 @@ MCONTACT CYahooProto::add_buddy(const char *yahoo_id, const char *yahoo_name, in
//not already there: add
LOG(("[add_buddy] Adding buddy id: %s (Nick: %s), flags: %lu", yid, yahoo_name, flags));
hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
- CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact,(LPARAM)m_szModuleName);
+ CallService(MS_PROTO_ADDTOCONTACT, hContact,(LPARAM)m_szModuleName);
setString( hContact, YAHOO_LOGINID, yid );
Set_Protocol( hContact, protocol );
@@ -872,7 +872,7 @@ void CYahooProto::ext_typing_notify(const char *me, const char *who, int protoco
MCONTACT hContact = getbuddyH(who);
if (hContact)
- CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, (LPARAM)stat?10:0);
+ CallService(MS_PROTO_CONTACTISTYPING, hContact, (LPARAM)stat?10:0);
}
void CYahooProto::ext_game_notify(const char *me, const char *who, int stat, const char *msg)
diff --git a/src/core/stdauth/authdialogs.cpp b/src/core/stdauth/authdialogs.cpp
index 27a5c64107..d4584ceef9 100644
--- a/src/core/stdauth/authdialogs.cpp
+++ b/src/core/stdauth/authdialogs.cpp
@@ -119,7 +119,7 @@ INT_PTR CALLBACK DlgProcAdded(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
case IDC_DETAILS:
{
MCONTACT hContact = (MCONTACT)GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_DETAILS), GWLP_USERDATA);
- CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)hContact, 0);
+ CallService(MS_USERINFO_SHOWDIALOG, hContact, 0);
break;
}
diff --git a/src/core/stdfile/filerecvdlg.cpp b/src/core/stdfile/filerecvdlg.cpp
index f2f19d5ded..8688fa6882 100644
--- a/src/core/stdfile/filerecvdlg.cpp
+++ b/src/core/stdfile/filerecvdlg.cpp
@@ -152,7 +152,7 @@ void GetContactReceivedFilesDir(MCONTACT hContact, TCHAR *szDir, int cchDir, BOO
REPLACEVARSDATA dat = { 0 };
REPLACEVARSARRAY rvaVarsToReplace[4];
rvaVarsToReplace[0].lptzKey = _T("nick");
- rvaVarsToReplace[0].lptzValue = mir_tstrdup((TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR));
+ rvaVarsToReplace[0].lptzValue = mir_tstrdup((TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR));
rvaVarsToReplace[1].lptzKey = _T("userid");
rvaVarsToReplace[1].lptzValue = GetContactID(hContact);
rvaVarsToReplace[2].lptzKey = _T("proto");
diff --git a/src/core/stdmsg/src/globals.cpp b/src/core/stdmsg/src/globals.cpp
index a56ee6f898..eb63672e11 100644
--- a/src/core/stdmsg/src/globals.cpp
+++ b/src/core/stdmsg/src/globals.cpp
@@ -124,7 +124,7 @@ static int dbaddedevent(WPARAM hContact, LPARAM lParam)
if (hContact) {
HWND h = WindowList_Find(g_dat.hMessageWindowList, hContact);
if (h)
- SendMessage(h, HM_DBEVENTADDED, (WPARAM)hContact, lParam);
+ SendMessage(h, HM_DBEVENTADDED, hContact, lParam);
}
return 0;
}
diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp
index 21728424bb..10cd22a428 100644
--- a/src/core/stdmsg/src/msgoptions.cpp
+++ b/src/core/stdmsg/src/msgoptions.cpp
@@ -465,7 +465,7 @@ static void SaveList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown)
db_set_b(NULL, SRMMMOD, SRMSGSET_TYPINGUNKNOWN, (BYTE) (SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM) hItemUnknown, 0) ? 1 : 0));
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem)
db_set_b(hContact, SRMMMOD, SRMSGSET_TYPING, (BYTE) (SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM) hItem, 0) ? 1 : 0));
}
diff --git a/src/core/stdmsg/src/statusicon.cpp b/src/core/stdmsg/src/statusicon.cpp
index 935af689ec..6e5e530bc7 100644
--- a/src/core/stdmsg/src/statusicon.cpp
+++ b/src/core/stdmsg/src/statusicon.cpp
@@ -68,7 +68,7 @@ void CheckIconClick(MCONTACT hContact, HWND hwndFrom, POINT pt, RECT r, int gap,
sicd.szModule = sid->szModule;
sicd.flags = click_flags;
- NotifyEventHooks(hHookIconPressedEvt, (WPARAM)hContact, (LPARAM)&sicd);
+ NotifyEventHooks(hHookIconPressedEvt, hContact, (LPARAM)&sicd);
}
HANDLE hServiceIcon[3];
diff --git a/src/core/stduserinfo/stdinfo.cpp b/src/core/stduserinfo/stdinfo.cpp
index 218d58a0ca..50741b8eab 100644
--- a/src/core/stduserinfo/stdinfo.cpp
+++ b/src/core/stduserinfo/stdinfo.cpp
@@ -40,7 +40,7 @@ static int Proto_GetContactInfoSetting(MCONTACT hContact, const char *szProto, c
DBCONTACTGETSETTING cgs = {szModule, szSetting, dbv};
dbv->type = (BYTE)nType;
- return CallProtoService(szProto, PS_GETINFOSETTING, (WPARAM)hContact, (LPARAM)&cgs);
+ return CallProtoService(szProto, PS_GETINFOSETTING, hContact, (LPARAM)&cgs);
}
static void Proto_FreeInfoVariant(DBVARIANT *dbv)
diff --git a/src/modules/addcontact/addcontact.cpp b/src/modules/addcontact/addcontact.cpp
index c9cee416f5..3d43920642 100644
--- a/src/modules/addcontact/addcontact.cpp
+++ b/src/modules/addcontact/addcontact.cpp
@@ -176,7 +176,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp
int item = SendDlgItemMessage(hdlg, IDC_GROUP, CB_GETCURSEL, 0, 0);
if (item > 0) {
item = SendDlgItemMessage(hdlg, IDC_GROUP, CB_GETITEMDATA, item, 0);
- CallService(MS_CLIST_CONTACTCHANGEGROUP, (WPARAM)hContact, item);
+ CallService(MS_CLIST_CONTACTCHANGEGROUP, hContact, item);
}
db_unset(hContact, "CList", "NotOnList");
@@ -196,7 +196,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp
}
if (IsDlgButtonChecked(hdlg, IDC_OPEN_WINDOW))
- CallService(MS_CLIST_CONTACTDOUBLECLICKED, (WPARAM)hContact, 0);
+ CallService(MS_CLIST_CONTACTDOUBLECLICKED, hContact, 0);
}
// fall through
case IDCANCEL:
diff --git a/src/modules/chat/clist.cpp b/src/modules/chat/clist.cpp
index 64af00ea2c..85d6720dfe 100644
--- a/src/modules/chat/clist.cpp
+++ b/src/modules/chat/clist.cpp
@@ -59,7 +59,7 @@ MCONTACT AddRoom(const char *pszModule, const TCHAR *pszRoom, const TCHAR *pszDi
if ((hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0)) == NULL)
return NULL;
- CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)pszModule);
+ CallService(MS_PROTO_ADDTOCONTACT, hContact, (LPARAM)pszModule);
if (pszGroup && lstrlen(pszGroup) > 0)
db_set_ts(hContact, "CList", "Group", pszGroup);
else
@@ -121,7 +121,7 @@ int RoomDoubleclicked(WPARAM hContact, LPARAM lParam)
// is the "toggle visibility option set, so we need to close the window?
if (si->hWnd != NULL &&
db_get_b(NULL, CHAT_MODULE, "ToggleVisibility", 0) == 1 &&
- !CallService(MS_CLIST_GETEVENT, (WPARAM)hContact, 0) &&
+ !CallService(MS_CLIST_GETEVENT, hContact, 0) &&
IsWindowVisible(si->hWnd) && !IsIconic(si->hWnd))
{
if (ci.OnDblClickSession)
@@ -218,13 +218,13 @@ BOOL AddEvent(MCONTACT hContact, HICON hIcon, HANDLE hEvent, int type, TCHAR* fm
cle.pszService = "GChat/DblClickEvent" ;
cle.ptszTooltip = TranslateTS(szBuf);
if (type) {
- if (!CallService(MS_CLIST_GETEVENT, (WPARAM)hContact, 0))
+ if (!CallService(MS_CLIST_GETEVENT, hContact, 0))
CallService(MS_CLIST_ADDEVENT, (WPARAM) hContact, (LPARAM) &cle);
}
else {
- if (CallService(MS_CLIST_GETEVENT, (WPARAM)hContact, 0))
- CallService(MS_CLIST_REMOVEEVENT, (WPARAM)hContact, (LPARAM)GC_FAKE_EVENT);
- CallService(MS_CLIST_ADDEVENT, (WPARAM)hContact, (LPARAM)&cle);
+ if (CallService(MS_CLIST_GETEVENT, hContact, 0))
+ CallService(MS_CLIST_REMOVEEVENT, hContact, (LPARAM)GC_FAKE_EVENT);
+ CallService(MS_CLIST_ADDEVENT, hContact, (LPARAM)&cle);
}
return TRUE;
}
diff --git a/src/modules/clist/clistmod.cpp b/src/modules/clist/clistmod.cpp
index 2f845d065e..7fb4d55709 100644
--- a/src/modules/clist/clistmod.cpp
+++ b/src/modules/clist/clistmod.cpp
@@ -142,7 +142,7 @@ static int ProtocolAck(WPARAM, LPARAM lParam)
for (MCONTACT hContact = db_find_first(ack->szModule); hContact; ) {
MCONTACT hNext = db_find_next(hContact, ack->szModule);
if (db_get_b(hContact, "CList", "Delete", 0))
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
+ CallService(MS_DB_CONTACT_DELETE, hContact, 0);
hContact = hNext;
}
}
diff --git a/src/modules/clist/genmenu.cpp b/src/modules/clist/genmenu.cpp
index ad3657ab55..cad7cb1950 100644
--- a/src/modules/clist/genmenu.cpp
+++ b/src/modules/clist/genmenu.cpp
@@ -1100,7 +1100,7 @@ int TryProcessDoubleClick(MCONTACT hContact)
{
int iMenuID = GetMenuObjbyId((int)hContactMenuObject);
if (iMenuID != -1) {
- NotifyEventHooks(hPreBuildContactMenuEvent, (WPARAM)hContact, 0);
+ NotifyEventHooks(hPreBuildContactMenuEvent, hContact, 0);
PMO_IntMenuItem pimi = (PMO_IntMenuItem)MO_GetDefaultMenuItem((WPARAM)g_menus[ iMenuID ]->m_items.first, 0);
if (pimi != NULL) {
diff --git a/src/modules/clist/groups.cpp b/src/modules/clist/groups.cpp
index 3799770865..f80dd51820 100644
--- a/src/modules/clist/groups.cpp
+++ b/src/modules/clist/groups.cpp
@@ -227,7 +227,7 @@ static INT_PTR DeleteGroup(WPARAM wParam, LPARAM)
db_unset(hContact, "CList", "Group");
grpChg.pszNewName = NULL;
}
- NotifyEventHooks(hGroupChangeEvent, (WPARAM)hContact, (LPARAM)&grpChg);
+ NotifyEventHooks(hGroupChangeEvent, hContact, (LPARAM)&grpChg);
}
//shuffle list of groups up to fill gap
for (i = wParam - 1;; i++) {
diff --git a/src/modules/extraicons/BaseExtraIcon.cpp b/src/modules/extraicons/BaseExtraIcon.cpp
index 56631313e3..0d3106972c 100644
--- a/src/modules/extraicons/BaseExtraIcon.cpp
+++ b/src/modules/extraicons/BaseExtraIcon.cpp
@@ -68,7 +68,7 @@ void BaseExtraIcon::setDescIcon(const char *icon)
void BaseExtraIcon::onClick(MCONTACT hContact)
{
if (OnClick != NULL)
- OnClick((WPARAM)hContact, (LPARAM)ConvertToClistSlot(slot), onClickParam);
+ OnClick(hContact, (LPARAM)ConvertToClistSlot(slot), onClickParam);
}
int BaseExtraIcon::ClistSetExtraIcon(MCONTACT hContact, HANDLE hImage)
diff --git a/src/modules/extraicons/CallbackExtraIcon.cpp b/src/modules/extraicons/CallbackExtraIcon.cpp
index 73badf0fc9..5963b38e2b 100644
--- a/src/modules/extraicons/CallbackExtraIcon.cpp
+++ b/src/modules/extraicons/CallbackExtraIcon.cpp
@@ -58,7 +58,7 @@ void CallbackExtraIcon::applyIcon(MCONTACT hContact)
if (needToRebuild)
rebuildIcons();
- ApplyIcon((WPARAM)hContact, 0);
+ ApplyIcon(hContact, 0);
}
int CallbackExtraIcon::setIcon(int id, MCONTACT hContact, HANDLE icon)
diff --git a/src/modules/extraicons/extraicons.cpp b/src/modules/extraicons/extraicons.cpp
index 037c97e142..389b8a1e07 100644
--- a/src/modules/extraicons/extraicons.cpp
+++ b/src/modules/extraicons/extraicons.cpp
@@ -91,7 +91,7 @@ int Clist_SetExtraIcon(MCONTACT hContact, int slot, HANDLE hImage)
if (icol == -1)
return -1;
- HANDLE hItem = (HANDLE)SendMessage(cli.hwndContactTree, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendMessage(cli.hwndContactTree, CLM_FINDCONTACT, hContact, 0);
if (hItem == 0)
return -1;
@@ -332,7 +332,7 @@ void fnSetAllExtraIcons(MCONTACT hContact)
if (pdnce == NULL)
continue;
- NotifyEventHooks(hEventExtraImageApplying, (WPARAM)hContact, 0);
+ NotifyEventHooks(hEventExtraImageApplying, hContact, 0);
if (hcontgiven) break;
Sleep(0);
}
diff --git a/src/modules/findadd/searchresults.cpp b/src/modules/findadd/searchresults.cpp
index ed608a13e9..6f2b78ce8d 100644
--- a/src/modules/findadd/searchresults.cpp
+++ b/src/modules/findadd/searchresults.cpp
@@ -378,13 +378,13 @@ void ShowMoreOptionsMenu(HWND hwndDlg, int x, int y)
case IDC_DETAILS:
{
MCONTACT hContact = (MCONTACT)CallProtoServiceInt(NULL, lsr->szProto, PS_ADDTOLIST, PALF_TEMPORARY, (LPARAM)&lsr->psr);
- CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)hContact, 0);
+ CallService(MS_USERINFO_SHOWDIALOG, hContact, 0);
break;
}
case IDC_SENDMESSAGE:
{
MCONTACT hContact = (MCONTACT)CallProtoServiceInt(NULL, lsr->szProto, PS_ADDTOLIST, PALF_TEMPORARY, (LPARAM)&lsr->psr);
- CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, (LPARAM)(const char*)NULL);
+ CallService(MS_MSG_SENDMESSAGE, hContact, (LPARAM)(const char*)NULL);
break;
}
}
diff --git a/src/modules/ignore/ignore.cpp b/src/modules/ignore/ignore.cpp
index 75f79fbd57..0c1c4a6766 100644
--- a/src/modules/ignore/ignore.cpp
+++ b/src/modules/ignore/ignore.cpp
@@ -170,7 +170,7 @@ static void SaveItemMask(HWND hwndList, MCONTACT hContact, HANDLE hItem, const c
static void SetAllContactIcons(HWND hwndList)
{
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0);
if (hItem && SendMessage(hwndList, CLM_GETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(IGNOREEVENT_MAX, 0)) == EMPTY_EXTRA_ICON) {
DWORD proto1Caps, proto4Caps;
char *szProto = GetContactProto(hContact);
@@ -297,7 +297,7 @@ static INT_PTR CALLBACK DlgProcIgnoreOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_FINDCONTACT, hContact, 0);
if (hItem) SaveItemMask( GetDlgItem(hwndDlg, IDC_LIST), hContact, hItem, "Mask1");
if (SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0))
db_unset(hContact, "CList", "Hidden");
@@ -404,7 +404,7 @@ static int IgnoreAddedNotify(WPARAM, LPARAM lParam)
DBEVENTINFO *dbei = (DBEVENTINFO*)lParam;
if (dbei && dbei->eventType == EVENTTYPE_ADDED && dbei->pBlob != NULL) {
MCONTACT hContact = DbGetAuthEventContact(dbei);
- if (CallService(MS_DB_CONTACT_IS, (WPARAM)hContact, 0) && IsIgnored((WPARAM)hContact, IGNOREEVENT_YOUWEREADDED))
+ if (CallService(MS_DB_CONTACT_IS, hContact, 0) && IsIgnored(hContact, IGNOREEVENT_YOUWEREADDED))
return 1;
}
return 0;
diff --git a/src/modules/protocols/protoint.cpp b/src/modules/protocols/protoint.cpp
index a1b7ab0469..5ea1f1c371 100644
--- a/src/modules/protocols/protoint.cpp
+++ b/src/modules/protocols/protoint.cpp
@@ -260,7 +260,7 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE
int __cdecl UserIsTyping(MCONTACT hContact, int type)
{
- CCSDATA ccs = { hContact, PSS_USERISTYPING, (WPARAM)hContact, type };
+ CCSDATA ccs = { hContact, PSS_USERISTYPING, hContact, type };
return ProtoCallService(m_szModuleName, PSS_USERISTYPING, 0, (LPARAM)&ccs);
}
diff --git a/src/modules/utils/path.cpp b/src/modules/utils/path.cpp
index 3520a749b0..c67a297b8c 100644
--- a/src/modules/utils/path.cpp
+++ b/src/modules/utils/path.cpp
@@ -116,7 +116,7 @@ static __forceinline char *mir_a2x(char *, char *s) { return mir_strdup(s); }
static __forceinline char *GetContactNickX(char *, MCONTACT hContact)
{
- return mir_strdup((char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, 0));
+ return mir_strdup((char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, 0));
}
static __forceinline char *GetContactIDX(char *, MCONTACT hContact)
@@ -203,7 +203,7 @@ static __forceinline TCHAR *mir_a2x(TCHAR *, char *s) { return mir_a2t(s); }
static __forceinline TCHAR *GetContactNickX(TCHAR *, MCONTACT hContact)
{
- return mir_tstrdup((TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR));
+ return mir_tstrdup((TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR));
}
static __forceinline TCHAR *GetContactIDX(TCHAR *, MCONTACT hContact)
diff --git a/src/modules/visibility/visibility.cpp b/src/modules/visibility/visibility.cpp
index d9043ee9e3..479c476835 100644
--- a/src/modules/visibility/visibility.cpp
+++ b/src/modules/visibility/visibility.cpp
@@ -108,7 +108,7 @@ static void ResetListOptions(HWND hwndList)
static void SetAllContactIcons(HWND hwndList)
{
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0);
if (hItem == NULL)
continue;
@@ -245,7 +245,7 @@ static INT_PTR CALLBACK DlgProcVisibilityOpts(HWND hwndDlg, UINT msg, WPARAM, LP
case 0:
if (((LPNMHDR)lParam)->code == PSN_APPLY) {
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_FINDCONTACT, hContact, 0);
if (hItem == NULL)
continue;