diff options
Diffstat (limited to 'plugins/New_GPG/src')
-rw-r--r-- | plugins/New_GPG/src/gpg_wrapper.h | 2 | ||||
-rwxr-xr-x | plugins/New_GPG/src/main.cpp | 2 | ||||
-rwxr-xr-x | plugins/New_GPG/src/messages.cpp | 8 | ||||
-rwxr-xr-x | plugins/New_GPG/src/utilities.cpp | 16 | ||||
-rwxr-xr-x | plugins/New_GPG/src/utilities.h | 4 |
5 files changed, 16 insertions, 16 deletions
diff --git a/plugins/New_GPG/src/gpg_wrapper.h b/plugins/New_GPG/src/gpg_wrapper.h index 8eb39a6d41..1a428804ab 100644 --- a/plugins/New_GPG/src/gpg_wrapper.h +++ b/plugins/New_GPG/src/gpg_wrapper.h @@ -39,7 +39,7 @@ struct gpg_execution_params std::vector<std::wstring> aargv; CMStringA out; - DWORD code = 0; + uint32_t code = 0; int bNoOutput = false; pxResult result = pxSuccess; boost::process::child *child = nullptr; diff --git a/plugins/New_GPG/src/main.cpp b/plugins/New_GPG/src/main.cpp index 99a1143a64..e2bbae74f4 100755 --- a/plugins/New_GPG/src/main.cpp +++ b/plugins/New_GPG/src/main.cpp @@ -407,7 +407,7 @@ void InitCheck() } { CMStringW path(g_plugin.getMStringW("szHomePath")); - DWORD dwFileAttr = GetFileAttributes(path); + uint32_t dwFileAttr = GetFileAttributes(path); if (dwFileAttr != INVALID_FILE_ATTRIBUTES) { dwFileAttr &= ~FILE_ATTRIBUTE_READONLY; SetFileAttributes(path, dwFileAttr); diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp index 2d0ac82b36..e14fa6bc19 100755 --- a/plugins/New_GPG/src/messages.cpp +++ b/plugins/New_GPG/src/messages.cpp @@ -20,7 +20,7 @@ std::list<HANDLE> sent_msgs; struct RecvParams { - RecvParams(MCONTACT _p1, std::wstring _p2, const char *_p3, DWORD _p4) : + RecvParams(MCONTACT _p1, std::wstring _p2, const char *_p3, uint32_t _p4) : hContact(_p1), str(_p2), msg(_p3), @@ -30,7 +30,7 @@ struct RecvParams MCONTACT hContact; std::wstring str; std::string msg; - DWORD timestamp; + uint32_t timestamp; }; static void RecvMsgSvc_func(RecvParams *param) @@ -501,7 +501,7 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l) return 0; } -void SendMsgSvc_func(MCONTACT hContact, char *msg, DWORD flags) +void SendMsgSvc_func(MCONTACT hContact, char *msg, uint32_t flags) { string str = msg; if (g_plugin.bStripTags && g_plugin.bAppendTags) { @@ -762,7 +762,7 @@ int HookSendMsg(WPARAM w, LPARAM l) str_event.insert(0, toUTF8(globals.wszOutopentag.c_str())); str_event.append(toUTF8(globals.wszOutclosetag.c_str())); dbei->pBlob = (uint8_t*)mir_strdup(str_event.c_str()); - dbei->cbBlob = (DWORD)str_event.length() + 1; + dbei->cbBlob = (uint32_t)str_event.length() + 1; } return 0; diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp index e8f3ad030e..62f6d16a69 100755 --- a/plugins/New_GPG/src/utilities.cpp +++ b/plugins/New_GPG/src/utilities.cpp @@ -469,25 +469,25 @@ INT_PTR onSendFile(WPARAM w, LPARAM l) return Proto_ChainSend(w, ccs); } -void HistoryLog(MCONTACT hContact, const char *msg, DWORD _time, DWORD flags) +void HistoryLog(MCONTACT hContact, const char *msg, uint32_t _time, uint32_t flags) { DBEVENTINFO dbei = {}; dbei.szModule = MODULENAME; dbei.flags = DBEF_UTF | flags; - dbei.timestamp = (_time) ? _time : (DWORD)time(0); - dbei.cbBlob = (DWORD)mir_strlen(msg) + 1; + dbei.timestamp = (_time) ? _time : (uint32_t)time(0); + dbei.cbBlob = (uint32_t)mir_strlen(msg) + 1; dbei.pBlob = (uint8_t*)msg; db_event_add(hContact, &dbei); } -static int ControlAddStringUtf(HWND ctrl, DWORD msg, const wchar_t *szString) +static int ControlAddStringUtf(HWND ctrl, uint32_t msg, const wchar_t *szString) { int item = -1; item = SendMessage(ctrl, msg, 0, (LPARAM)szString); return item; } -int ComboBoxAddStringUtf(HWND hCombo, const wchar_t *szString, DWORD data) +int ComboBoxAddStringUtf(HWND hCombo, const wchar_t *szString, uint32_t data) { int item = ControlAddStringUtf(hCombo, CB_ADDSTRING, szString); SendMessage(hCombo, CB_SETITEMDATA, item, data); @@ -867,8 +867,8 @@ const bool StriStr(const char *str, const char *substr) char *str_up = NEWTSTR_MALLOC(str); char *substr_up = NEWTSTR_MALLOC(substr); - CharUpperBuffA(str_up, (DWORD)mir_strlen(str_up)); - CharUpperBuffA(substr_up, (DWORD)mir_strlen(substr_up)); + CharUpperBuffA(str_up, (uint32_t)mir_strlen(str_up)); + CharUpperBuffA(substr_up, (uint32_t)mir_strlen(substr_up)); if (strstr(str_up, substr_up)) i = true; @@ -1334,7 +1334,7 @@ bool gpg_validate_paths(wchar_t *gpg_bin_path, wchar_t *gpg_home_path) } { CMStringW path = g_plugin.getMStringW("szHomePath"); - DWORD dwFileAttr = GetFileAttributes(path); + uint32_t dwFileAttr = GetFileAttributes(path); if (dwFileAttr != INVALID_FILE_ATTRIBUTES) { dwFileAttr &= ~FILE_ATTRIBUTE_READONLY; SetFileAttributes(path, dwFileAttr); diff --git a/plugins/New_GPG/src/utilities.h b/plugins/New_GPG/src/utilities.h index 748225669a..5da77a2fdd 100755 --- a/plugins/New_GPG/src/utilities.h +++ b/plugins/New_GPG/src/utilities.h @@ -25,7 +25,7 @@ void setSrmmIcon(MCONTACT); void send_encrypted_msgs_thread(void*); -int ComboBoxAddStringUtf(HWND hCombo, const wchar_t *szString, DWORD data); +int ComboBoxAddStringUtf(HWND hCombo, const wchar_t *szString, uint32_t data); bool isContactSecured(MCONTACT hContact); bool isContactHaveKey(MCONTACT hContact); bool isGPGKeyExist(); @@ -41,7 +41,7 @@ string toUTF8(wstring str); wstring toUTF16(string str); string get_random(int length); -void HistoryLog(MCONTACT, const char *msg, DWORD _time = 0, DWORD _flags = 0); +void HistoryLog(MCONTACT, const char *msg, uint32_t _time = 0, uint32_t _flags = 0); void fix_line_term(std::string &s); void strip_line_term(std::wstring &s); void strip_line_term(std::string &s); |