From 85c0b6a96f366bdf0ca334ee7cb1877fb3f2288c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 16 Jan 2015 17:49:54 +0000 Subject: MEVENT - the strict type for events, they are not HANDLE anymore git-svn-id: http://svn.miranda-ng.org/main/trunk@11866 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/core/stdfile/src/file.cpp | 11 +++++------ src/core/stdfile/src/file.h | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'src/core/stdfile') diff --git a/src/core/stdfile/src/file.cpp b/src/core/stdfile/src/file.cpp index 0363ebc851..f61378f3ca 100644 --- a/src/core/stdfile/src/file.cpp +++ b/src/core/stdfile/src/file.cpp @@ -109,7 +109,7 @@ static INT_PTR RecvFileCommand(WPARAM, LPARAM lParam) return 0; } -void PushFileEvent(MCONTACT hContact, HANDLE hdbe, LPARAM lParam) +void PushFileEvent(MCONTACT hContact, MEVENT hdbe, LPARAM lParam) { CLISTEVENT cle = { 0 }; cle.cbSize = sizeof(cle); @@ -140,11 +140,11 @@ static int FileEventAdded(WPARAM wParam, LPARAM lParam) DBEVENTINFO dbei = { sizeof(dbei) }; dbei.cbBlob = sizeof(DWORD); dbei.pBlob = (PBYTE)&dwSignature; - db_event_get((HANDLE)lParam, &dbei); + db_event_get(lParam, &dbei); if (dbei.flags & (DBEF_SENT | DBEF_READ) || dbei.eventType != EVENTTYPE_FILE || dwSignature == 0) return 0; - PushFileEvent(wParam, (HANDLE)lParam, 0); + PushFileEvent(wParam, lParam, 0); return 0; } @@ -287,7 +287,7 @@ void UpdateProtoFileTransferStatus(PROTOFILETRANSFERSTATUS *dest, PROTOFILETRANS static void RemoveUnreadFileEvents(void) { for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { - HANDLE hDbEvent = db_event_firstUnread(hContact); + MEVENT hDbEvent = db_event_firstUnread(hContact); while (hDbEvent) { DBEVENTINFO dbei = { sizeof(dbei) }; db_event_get(hDbEvent, &dbei); @@ -399,8 +399,7 @@ static INT_PTR Proto_RecvFileT(WPARAM, LPARAM lParam) mir_free(pszFiles[i]); mir_free(szDescr); - HANDLE hdbe = db_event_add(ccs->hContact, &dbei); - + MEVENT hdbe = db_event_add(ccs->hContact, &dbei); PushFileEvent(ccs->hContact, hdbe, pre->lParam); mir_free(dbei.pBlob); return 0; diff --git a/src/core/stdfile/src/file.h b/src/core/stdfile/src/file.h index 4231cef5e0..1d0c8322b7 100644 --- a/src/core/stdfile/src/file.h +++ b/src/core/stdfile/src/file.h @@ -49,7 +49,7 @@ struct FileDlgData HWND hwndTransfer; HANDLE fs; MCONTACT hContact; - HANDLE hDbEvent; + MEVENT hDbEvent; HANDLE hNotifyEvent; TCHAR **files; int send; -- cgit v1.2.3