diff options
author | George Hazan <ghazan@miranda.im> | 2021-12-26 20:31:39 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-12-26 20:31:39 +0300 |
commit | cddcd7483a7c472598af098e759e5d309024f606 (patch) | |
tree | b0a227d6e087c41958cc84d27bc323353248aae5 /protocols/LotusNotify | |
parent | 1039b2829a264280493ba0fa979214fe024dc70c (diff) |
DWORD -> uint32_t
Diffstat (limited to 'protocols/LotusNotify')
-rw-r--r-- | protocols/LotusNotify/src/LotusNotify.cpp | 36 | ||||
-rw-r--r-- | protocols/LotusNotify/src/LotusNotify.h | 4 | ||||
-rw-r--r-- | protocols/LotusNotify/src/lotusnotes.cpp | 12 | ||||
-rw-r--r-- | protocols/LotusNotify/src/lotusnotes.h | 9 |
4 files changed, 27 insertions, 34 deletions
diff --git a/protocols/LotusNotify/src/LotusNotify.cpp b/protocols/LotusNotify/src/LotusNotify.cpp index 28bf497693..2f7bb85054 100644 --- a/protocols/LotusNotify/src/LotusNotify.cpp +++ b/protocols/LotusNotify/src/LotusNotify.cpp @@ -42,7 +42,7 @@ wchar_t settingFilterSubject[MAX_SETTING_STR] = TEXT(""), settingFilterSender[MA COLORREF settingBgColor, settingFgColor; int settingInterval = 0, settingInterval1 = 0; -DWORD settingNewestID = 0; +uint32_t settingNewestID = 0; uint8_t settingSetColours = 0, settingShowError = 1, settingIniAnswer = -1, settingIniCheck = 0, settingOnceOnly = 0, settingNonClickedOnly = 0, settingNewest = 0, settingEvenNonClicked = 0, settingKeepConnection = 1; BOOL settingStatus[STATUS_COUNT]; @@ -93,8 +93,8 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC STATUS LNPUBLIC __stdcall EMCallBack (EMRECORD * pData) { VARARG_PTR pArgs; - DWORD maxPwdLen; - DWORD * retLength; + uint32_t maxPwdLen; + uint32_t * retLength; char * retPassword; char * fileName; char * ownerName; @@ -103,14 +103,14 @@ STATUS LNPUBLIC __stdcall EMCallBack (EMRECORD * pData) if (pData->Status != NOERROR) return (ERR_EM_CONTINUE); pArgs= pData->Ap; - maxPwdLen = VARARG_GET (pArgs, DWORD); - retLength = VARARG_GET (pArgs, DWORD *); + maxPwdLen = VARARG_GET (pArgs, uint32_t); + retLength = VARARG_GET (pArgs, uint32_t *); retPassword = VARARG_GET (pArgs, char *); fileName = VARARG_GET (pArgs, char *); ownerName = VARARG_GET (pArgs, char *); strncpy(retPassword, settingPassword, mir_strlen(settingPassword)); //set our password retPassword[mir_strlen(settingPassword)]='\0'; - *retLength = (DWORD)mir_strlen(retPassword);//and his length + *retLength = (uint32_t)mir_strlen(retPassword);//and his length return ERR_BSAFE_EXTERNAL_PASSWORD; } @@ -144,7 +144,7 @@ void ExtClear() //check if msg was clicked and exists on msgs list -struct HISTORIA* getEl(DWORD id) +struct HISTORIA* getEl(uint32_t id) { for(struct HISTORIA *cur = first; cur != nullptr; cur = cur->next) { @@ -156,7 +156,7 @@ struct HISTORIA* getEl(DWORD id) //creates new entry on list of msgs -void addNewId(DWORD id) +void addNewId(uint32_t id) { struct HISTORIA* nowy = (struct HISTORIA*)mir_alloc(sizeof(struct HISTORIA)) ; assert(nowy); @@ -169,7 +169,7 @@ void addNewId(DWORD id) //add popup handle. This queue is used to close popups with same msg -void addPopup(DWORD id,HWND hWnd) +void addPopup(uint32_t id,HWND hWnd) { struct POPUPSQUEUE* nowy = (struct POPUPSQUEUE*)mir_alloc(sizeof(struct POPUPSQUEUE)) ; struct HISTORIA *elem = getEl(id); @@ -444,7 +444,7 @@ BOOL checkNotesIniFile(BOOL bInfo) //popup plugin to show popup function -void showMsg(wchar_t* sender,wchar_t* text, DWORD id, char *strUID) +void showMsg(wchar_t* sender,wchar_t* text, uint32_t id, char *strUID) { POPUPATT * mpd = (POPUPATT*)malloc(sizeof(POPUPATT)); mpd->id = id; @@ -544,7 +544,7 @@ void checkthread(void*) char UserName[MAXUSERNAME + 1]; HANDLE hTable; - DWORD noteID = 0L; + uint32_t noteID = 0L; BOOL fFirst = TRUE; NOTEHANDLE note_handle; @@ -623,8 +623,8 @@ void checkthread(void*) uint16_t Att; BLOCKID bhAttachment; - DWORD cSize = 0; - DWORD attSize = 0; + uint32_t cSize = 0; + uint32_t attSize = 0; OID retNoteOID; TIMEDATE retModified; /* modified timedate */ uint16_t retNoteClass; /* note class */ @@ -993,11 +993,11 @@ static void LoadSettings() settingNonClickedOnly = g_plugin.getByte("LNNonClickedOnly", 1); settingShowError = g_plugin.getByte("LNShowError", 1); settingSetColours = g_plugin.getByte("LNSetColours", 0); - settingBgColor = (COLORREF)g_plugin.getDword("LNBgColor", (DWORD)0xFFFFFF); - settingFgColor = (COLORREF)g_plugin.getDword("LNFgColor", (DWORD)0x000000); + settingBgColor = (COLORREF)g_plugin.getDword("LNBgColor", (uint32_t)0xFFFFFF); + settingFgColor = (COLORREF)g_plugin.getDword("LNFgColor", (uint32_t)0x000000); settingNewest = g_plugin.getByte("LNNewest", 0); settingEvenNonClicked = g_plugin.getByte("LNEvenNonClicked", 0); - settingNewestID = (DWORD)g_plugin.getDword("LNNewestID", 0); + settingNewestID = (uint32_t)g_plugin.getDword("LNNewestID", 0); settingIniAnswer = g_plugin.getByte("LNIniAnswer", 0); settingIniCheck = g_plugin.getByte("LNIniCheck", 0); @@ -1026,8 +1026,8 @@ static void SaveSettings(HWND hwndDlg) g_plugin.setByte("LNNonClickedOnly", settingNonClickedOnly); g_plugin.setByte("LNShowError", settingShowError); g_plugin.setByte("LNSetColours", settingSetColours); - g_plugin.setDword("LNBgColor", (DWORD)settingBgColor); - g_plugin.setDword("LNFgColor", (DWORD)settingFgColor); + g_plugin.setDword("LNBgColor", (uint32_t)settingBgColor); + g_plugin.setDword("LNFgColor", (uint32_t)settingFgColor); g_plugin.setByte("LNNewest", settingNewest); g_plugin.setByte("LNEvenNonClicked", settingEvenNonClicked); g_plugin.setByte("LNIniCheck", settingIniCheck); diff --git a/protocols/LotusNotify/src/LotusNotify.h b/protocols/LotusNotify/src/LotusNotify.h index 90f455e34f..e9e85a45e2 100644 --- a/protocols/LotusNotify/src/LotusNotify.h +++ b/protocols/LotusNotify/src/LotusNotify.h @@ -2,7 +2,7 @@ struct HISTORIA { - DWORD noteID; + uint32_t noteID; BOOL clicked; BOOL again; struct HISTORIA *next; @@ -18,7 +18,7 @@ struct POPUPSQUEUE // structure contines only LN msg id to send to popup typedef struct { - DWORD id; + uint32_t id; char strNote[4*16]; } POPUPATT; diff --git a/protocols/LotusNotify/src/lotusnotes.cpp b/protocols/LotusNotify/src/lotusnotes.cpp index 4867d094bb..5ab49b6a4d 100644 --- a/protocols/LotusNotify/src/lotusnotes.cpp +++ b/protocols/LotusNotify/src/lotusnotes.cpp @@ -68,16 +68,12 @@ BOOL HookLotusFunctions() void GetLotusPath(wchar_t *sTemp, DWORD size) { - DWORD rc; HKEY dmKey; + DWORD rc = RegOpenKeyEx( HKEY_LOCAL_MACHINE , TEXT("Software\\Lotus\\Notes") ,0, KEY_QUERY_VALUE, &dmKey ); + if (rc != ERROR_SUCCESS) + return; - rc = RegOpenKeyEx( HKEY_LOCAL_MACHINE , TEXT("Software\\Lotus\\Notes") ,0, KEY_QUERY_VALUE, &dmKey ); - - if (rc != ERROR_SUCCESS) { - return; - } - - RegQueryValueEx( dmKey, TEXT("Path"), nullptr, nullptr, (uint8_t*)sTemp, &size ); + RegQueryValueEx( dmKey, TEXT("Path"), nullptr, nullptr, (uint8_t*)sTemp, &size); RegCloseKey(dmKey); return; } diff --git a/protocols/LotusNotify/src/lotusnotes.h b/protocols/LotusNotify/src/lotusnotes.h index ba8288a014..8a2a00c650 100644 --- a/protocols/LotusNotify/src/lotusnotes.h +++ b/protocols/LotusNotify/src/lotusnotes.h @@ -40,7 +40,7 @@ extern NSFDBUPDATEUNREAD NSFDbUpdateUnread1; typedef BOOL (CALLBACK LNPUBLIC *IDSCAN)( HANDLE hTable,///DHANDLE BOOL fFirst, - DWORD far *retID); + uint32_t far *retID); extern IDSCAN IDScan1; typedef STATUS (CALLBACK LNPUBLIC *NSFNOTEOPEN)( @@ -93,7 +93,7 @@ typedef BOOL (CALLBACK LNPUBLIC *MAILGETMESSAGEATTACHMENTINFO)( uint16_t Num, BLOCKID far *bhItem, char far *FileName, - DWORD far *FileSize, + uint32_t far *FileSize, uint16_t far *FileAttributes, uint16_t far *FileHostType, TIMEDATE *FileCreated, @@ -152,7 +152,7 @@ extern OSMEMFREE OSMemFree1; typedef STATUS (CALLBACK LNPUBLIC *EMREGISTER)( EID EmID, - DWORD Flags, + uint32_t Flags, EMHANDLER Proc, uint16_t RecursionID, HEMREGISTRATION far *rethRegistration); @@ -168,9 +168,6 @@ extern NOTESINITTHREAD NotesInitThread1; typedef void (CALLBACK LNPUBLIC *NOTESTERMTHREAD)(void); extern NOTESTERMTHREAD NotesTermThread1; - - - BOOL HookLotusFunctions(); void GetLotusPath(wchar_t *sTemp, DWORD size); |