diff options
author | George Hazan <george.hazan@gmail.com> | 2014-07-15 12:12:59 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-07-15 12:12:59 +0000 |
commit | 21a1bd3567e3c894b8e9de69cd1f52898c5b5c92 (patch) | |
tree | 58aa724e42c19bf90aef68a63d052cf5b5979302 | |
parent | cfea373ee4ec40a6dc4b59ac8a6d221479cb5bd0 (diff) |
fix for the wrong return value type
git-svn-id: http://svn.miranda-ng.org/main/trunk@9805 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-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)
|