summaryrefslogtreecommitdiff
path: root/src/modules/addcontact
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-30 17:32:39 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-30 17:32:39 +0000
commit109877a3c75cb290c55755dcfc88794d2453669d (patch)
tree3ede8b9170b2fc3f6f35dc2cea6742d44b19d631 /src/modules/addcontact
parentfee8d991bdf4a59b563d1b92165ea0ed2f7bacb8 (diff)
MS_DB_EVENT_* services remained, but their calls removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@4255 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/addcontact')
-rw-r--r--src/modules/addcontact/addcontact.cpp22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/modules/addcontact/addcontact.cpp b/src/modules/addcontact/addcontact.cpp
index 89d0b2d15a..f8a755f9ce 100644
--- a/src/modules/addcontact/addcontact.cpp
+++ b/src/modules/addcontact/addcontact.cpp
@@ -38,11 +38,10 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp
Window_SetIcon_IcoLib(hdlg, SKINICON_OTHER_ADDCONTACT);
if (acs->handleType == HANDLE_EVENT) {
DWORD dwUin;
- DBEVENTINFO dbei = { 0 };
- dbei.cbSize = sizeof(dbei);
+ DBEVENTINFO dbei = { sizeof(dbei) };
dbei.cbBlob = sizeof(DWORD);
dbei.pBlob = (PBYTE)&dwUin;
- CallService(MS_DB_EVENT_GET, (WPARAM)acs->handle, (LPARAM)&dbei);
+ db_event_get(acs->handle, &dbei);
_ltoa(dwUin, szUin, 10);
acs->szProto = dbei.szModule;
}
@@ -54,15 +53,11 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp
int isSet = 0;
if (acs->handleType == HANDLE_EVENT) {
- DBEVENTINFO dbei;
- HANDLE hcontact;
-
- ZeroMemory(&dbei, sizeof(dbei));
- dbei.cbSize = sizeof(dbei);
- dbei.cbBlob = CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)acs->handle, 0);
+ DBEVENTINFO dbei = { sizeof(dbei) };
+ dbei.cbBlob = db_event_getBlobSize(acs->handle);
dbei.pBlob = (PBYTE)mir_alloc(dbei.cbBlob);
- CallService(MS_DB_EVENT_GET, (WPARAM)acs->handle, (LPARAM)&dbei);
- hcontact = *((PHANDLE)(dbei.pBlob+sizeof(DWORD)));
+ db_event_get(acs->handle, &dbei);
+ HANDLE hcontact = *((PHANDLE)(dbei.pBlob+sizeof(DWORD)));
mir_free(dbei.pBlob);
if (hcontact != INVALID_HANDLE_VALUE) {
szName = cli.pfnGetContactDisplayName(hcontact, 0);
@@ -155,9 +150,8 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp
{
case HANDLE_EVENT:
{
- DBEVENTINFO dbei = { 0 };
- dbei.cbSize = sizeof(dbei);
- CallService(MS_DB_EVENT_GET, (WPARAM)acs->handle, (LPARAM)&dbei);
+ DBEVENTINFO dbei = { sizeof(dbei) };
+ db_event_get(acs->handle, &dbei);
hContact = (HANDLE)CallProtoServiceInt(NULL,dbei.szModule, PS_ADDTOLISTBYEVENT, 0, (LPARAM)acs->handle);
}
break;