diff options
-rw-r--r-- | include/m_db_int.h | 4 | ||||
-rw-r--r-- | plugins/Db3x_mmap/src/dbcontacts.cpp | 4 | ||||
-rw-r--r-- | plugins/Db3x_mmap/src/dbintf.h | 2 | ||||
-rw-r--r-- | src/modules/database/dbintf.cpp | 4 |
4 files changed, 8 insertions, 6 deletions
diff --git a/include/m_db_int.h b/include/m_db_int.h index 4763d2bec8..1d2b45282a 100644 --- a/include/m_db_int.h +++ b/include/m_db_int.h @@ -82,11 +82,11 @@ interface MIDatabase STDMETHOD_(void, SetCacheSafetyMode)(BOOL) PURE;
STDMETHOD_(LONG, GetContactCount)(void) PURE;
- STDMETHOD_(MCONTACT,FindFirstContact)(const char *szProto = NULL) PURE;
+ STDMETHOD_(MCONTACT, FindFirstContact)(const char *szProto = NULL) PURE;
STDMETHOD_(MCONTACT, FindNextContact)(MCONTACT contactID, const char *szProto = NULL) PURE;
STDMETHOD_(LONG, DeleteContact)(MCONTACT contactID) PURE;
- STDMETHOD_(HANDLE, AddContact)(void) PURE;
+ STDMETHOD_(MCONTACT, AddContact)(void)PURE;
STDMETHOD_(BOOL, IsDbContact)(MCONTACT contactID) PURE;
STDMETHOD_(LONG, GetEventCount)(MCONTACT contactID) PURE;
diff --git a/plugins/Db3x_mmap/src/dbcontacts.cpp b/plugins/Db3x_mmap/src/dbcontacts.cpp index 31261c1d98..218080763a 100644 --- a/plugins/Db3x_mmap/src/dbcontacts.cpp +++ b/plugins/Db3x_mmap/src/dbcontacts.cpp @@ -154,7 +154,7 @@ STDMETHODIMP_(LONG) CDb3Mmap::DeleteContact(MCONTACT contactID) return 0;
}
-STDMETHODIMP_(HANDLE) CDb3Mmap::AddContact()
+STDMETHODIMP_(MCONTACT) CDb3Mmap::AddContact()
{
DWORD ofsNew;
log0("add contact");
@@ -178,7 +178,7 @@ STDMETHODIMP_(HANDLE) CDb3Mmap::AddContact() cc->dwDriverData = ofsNew;
NotifyEventHooks(hContactAddedEvent, dbc.dwContactID, 0);
- return (HANDLE)dbc.dwContactID;
+ return dbc.dwContactID;
}
STDMETHODIMP_(BOOL) CDb3Mmap::IsDbContact(MCONTACT contactID)
diff --git a/plugins/Db3x_mmap/src/dbintf.h b/plugins/Db3x_mmap/src/dbintf.h index e0c5b43ebb..1477bf27f2 100644 --- a/plugins/Db3x_mmap/src/dbintf.h +++ b/plugins/Db3x_mmap/src/dbintf.h @@ -213,7 +213,7 @@ public: STDMETHODIMP_(MCONTACT) FindFirstContact(const char *szProto = NULL);
STDMETHODIMP_(MCONTACT) FindNextContact(MCONTACT contactID, const char *szProto = NULL);
STDMETHODIMP_(LONG) DeleteContact(MCONTACT contactID);
- STDMETHODIMP_(HANDLE) AddContact(void);
+ STDMETHODIMP_(MCONTACT) AddContact(void);
STDMETHODIMP_(BOOL) IsDbContact(MCONTACT contactID);
STDMETHODIMP_(LONG) GetEventCount(MCONTACT contactID);
diff --git a/src/modules/database/dbintf.cpp b/src/modules/database/dbintf.cpp index 322355f2c4..6a3c332ed4 100644 --- a/src/modules/database/dbintf.cpp +++ b/src/modules/database/dbintf.cpp @@ -57,7 +57,9 @@ static INT_PTR srvDeleteContact(WPARAM wParam, LPARAM) static INT_PTR srvAddContact(WPARAM wParam, LPARAM)
{
- return (currDb) ? (INT_PTR)currDb->AddContact() : 0;
+ MCONTACT hNew = (currDb) ? currDb->AddContact() : 0;
+ Netlib_Logf(NULL, "New contact created: %d", hNew);
+ return hNew;
}
static INT_PTR srvIsDbContact(WPARAM wParam, LPARAM)
|