From cddcd7483a7c472598af098e759e5d309024f606 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 26 Dec 2021 20:31:39 +0300 Subject: DWORD -> uint32_t --- plugins/Variables/src/contact.cpp | 6 +++--- plugins/Variables/src/enumprocs.cpp | 6 +++--- plugins/Variables/src/enumprocs.h | 2 +- plugins/Variables/src/parse_miranda.cpp | 2 +- plugins/Variables/src/parse_miranda.h | 2 +- plugins/Variables/src/parse_system.cpp | 8 ++++---- plugins/Variables/src/parse_variables.h | 2 +- plugins/Variables/src/stdafx.h | 2 +- plugins/Variables/src/tokenregister.cpp | 4 ++-- 9 files changed, 17 insertions(+), 17 deletions(-) (limited to 'plugins/Variables/src') diff --git a/plugins/Variables/src/contact.cpp b/plugins/Variables/src/contact.cpp index 2f1420d1e4..1eeb5e0d99 100644 --- a/plugins/Variables/src/contact.cpp +++ b/plugins/Variables/src/contact.cpp @@ -76,7 +76,7 @@ static builtinCnfs[] = /* contact cache entry */ struct CONTACTCE { - DWORD flags; + uint32_t flags; wchar_t* tszContact; MCONTACT hContact; }; @@ -140,7 +140,7 @@ wchar_t* getContactInfoT(uint8_t type, MCONTACT hContact) case CCNF_INTERNALIP: case CCNF_EXTERNALIP: { - DWORD ip = db_get_dw(hContact, szProto, (type == CCNF_INTERNALIP) ? "RealIP" : "IP", 0); + uint32_t ip = db_get_dw(hContact, szProto, (type == CCNF_INTERNALIP) ? "RealIP" : "IP", 0); if (ip != 0) { struct in_addr in; in.s_addr = htonl(ip); @@ -168,7 +168,7 @@ wchar_t* getContactInfoT(uint8_t type, MCONTACT hContact) } // MS_VARS_GETCONTACTFROMSTRING -MCONTACT getContactFromString(const wchar_t *tszContact, DWORD dwFlags, int nMatch) +MCONTACT getContactFromString(const wchar_t *tszContact, uint32_t dwFlags, int nMatch) { /* service to retrieve a contact's HANDLE from a given string */ if (tszContact == nullptr || *tszContact == 0) diff --git a/plugins/Variables/src/enumprocs.cpp b/plugins/Variables/src/enumprocs.cpp index 373904a59a..069286256f 100644 --- a/plugins/Variables/src/enumprocs.cpp +++ b/plugins/Variables/src/enumprocs.cpp @@ -21,9 +21,9 @@ struct EnumInfoStruct { - DWORD dwPID; + uint32_t dwPID; PROCENUMPROC lpProc; - DWORD lParam; + uint32_t lParam; BOOL bEnd; }; @@ -37,7 +37,7 @@ struct EnumInfoStruct // the callback routine. // // Callback function definition: -// BOOL CALLBACK Proc(DWORD dw, uint16_t w, LPCSTR lpstr, LPARAM lParam); +// BOOL CALLBACK Proc(uint32_t dw, uint16_t w, LPCSTR lpstr, LPARAM lParam); BOOL WINAPI EnumProcs(PROCENUMPROC lpProc, LPARAM lParam) { diff --git a/plugins/Variables/src/enumprocs.h b/plugins/Variables/src/enumprocs.h index c24387f39a..170705852a 100644 --- a/plugins/Variables/src/enumprocs.h +++ b/plugins/Variables/src/enumprocs.h @@ -20,5 +20,5 @@ #pragma once /*** Process names are ANSI only ***/ -typedef BOOL (CALLBACK *PROCENUMPROC)(DWORD, uint16_t, char *, LPARAM); +typedef BOOL (CALLBACK *PROCENUMPROC)(uint32_t, uint16_t, char *, LPARAM); BOOL WINAPI EnumProcs(PROCENUMPROC lpProc, LPARAM lParam); diff --git a/plugins/Variables/src/parse_miranda.cpp b/plugins/Variables/src/parse_miranda.cpp index 0373b33837..147f359045 100644 --- a/plugins/Variables/src/parse_miranda.cpp +++ b/plugins/Variables/src/parse_miranda.cpp @@ -434,7 +434,7 @@ static MEVENT findDbEvent(MCONTACT hContact, MEVENT hDbEvent, int flags) } else { MEVENT hMatchEvent = NULL, hSearchEvent = NULL; - DWORD matchTimestamp = 0, priorTimestamp = 0; + uint32_t matchTimestamp = 0, priorTimestamp = 0; DBEVENTINFO dbe = {}; if (flags & DBE_FIRST) { diff --git a/plugins/Variables/src/parse_miranda.h b/plugins/Variables/src/parse_miranda.h index 20ffab9b73..830a6420c9 100644 --- a/plugins/Variables/src/parse_miranda.h +++ b/plugins/Variables/src/parse_miranda.h @@ -69,5 +69,5 @@ #define DBE_CONTACTS 0x00000400 // pBlob = 'some format', no string #define DBE_ADDED 0x00000800 // pBlob = 'some format', no string #define DBE_AUTHREQUEST 0x00001000 // pBlob = message -#define DBE_FILE 0x00002000 // pBlob = DWORD + file + description +#define DBE_FILE 0x00002000 // pBlob = uint32_t + file + description #define DBE_OTHER 0x00008000 diff --git a/plugins/Variables/src/parse_system.cpp b/plugins/Variables/src/parse_system.cpp index c3edd3b079..339fb0077a 100644 --- a/plugins/Variables/src/parse_system.cpp +++ b/plugins/Variables/src/parse_system.cpp @@ -300,7 +300,7 @@ static wchar_t* parseEnvironmentVariable(ARGUMENTSINFO *ai) if (ai->argc != 2) return nullptr; - DWORD len = ExpandEnvironmentStrings(ai->argv.w[1], nullptr, 0); + uint32_t len = ExpandEnvironmentStrings(ai->argv.w[1], nullptr, 0); if (len <= 0) return nullptr; @@ -415,7 +415,7 @@ static wchar_t* parseListDir(ARGUMENTSINFO *ai) } #ifndef WINE -static BOOL CALLBACK MyProcessEnumerator(DWORD, uint16_t, char *szProcess, LPARAM lParam) +static BOOL CALLBACK MyProcessEnumerator(uint32_t, uint16_t, char *szProcess, LPARAM lParam) { char **szProc = (char **)lParam; if ((*szProc != nullptr) && (!_stricmp(*szProc, szProcess))) @@ -586,7 +586,7 @@ static wchar_t* parseTextFile(ARGUMENTSINFO *ai) if (hFile == INVALID_HANDLE_VALUE) return nullptr; - DWORD fileSz = GetFileSize(hFile, nullptr); + uint32_t fileSz = GetFileSize(hFile, nullptr); if (fileSz == INVALID_FILE_SIZE) { CloseHandle(hFile); return nullptr; @@ -750,7 +750,7 @@ static wchar_t* parseTextFile(ARGUMENTSINFO *ai) return res; } } - if (((DWORD)(linePos + (pCur - pBuf)) == fileSz)) { // eof + if (((uint32_t)(linePos + (pCur - pBuf)) == fileSz)) { // eof CloseHandle(hFile); if (tUC) { diff --git a/plugins/Variables/src/parse_variables.h b/plugins/Variables/src/parse_variables.h index 08b3bd71df..08acc99bed 100644 --- a/plugins/Variables/src/parse_variables.h +++ b/plugins/Variables/src/parse_variables.h @@ -23,7 +23,7 @@ struct VARIABLEREGISTER { wchar_t *szName; wchar_t *szText; - DWORD dwOwnerThread; + uint32_t dwOwnerThread; }; #define PUT L"put" diff --git a/plugins/Variables/src/stdafx.h b/plugins/Variables/src/stdafx.h index bb3e040e30..d0c550ccfc 100644 --- a/plugins/Variables/src/stdafx.h +++ b/plugins/Variables/src/stdafx.h @@ -165,7 +165,7 @@ int deinitTokenRegister(); // contact.c uint8_t getContactInfoType(wchar_t* type); wchar_t* getContactInfoT(uint8_t type, MCONTACT hContact); -MCONTACT getContactFromString(const wchar_t *tszContact, DWORD dwFlags, int nMatch = 0); +MCONTACT getContactFromString(const wchar_t *tszContact, uint32_t dwFlags, int nMatch = 0); int initContactModule(); int deinitContactModule(); // alias diff --git a/plugins/Variables/src/tokenregister.cpp b/plugins/Variables/src/tokenregister.cpp index 327df5f475..b41d408fe5 100644 --- a/plugins/Variables/src/tokenregister.cpp +++ b/plugins/Variables/src/tokenregister.cpp @@ -22,7 +22,7 @@ struct TokenRegisterEntry { TOKENREGISTEREX tr; - DWORD nameHash; + uint32_t nameHash; }; static int CompareTokens(const TokenRegisterEntry* p1, const TokenRegisterEntry* p2) @@ -91,7 +91,7 @@ int deRegisterToken(wchar_t *token) INT_PTR registerToken(WPARAM, LPARAM lParam) { - DWORD hash; + uint32_t hash; TOKENREGISTEREX *newVr = (TOKENREGISTEREX*)lParam; if (newVr == nullptr || newVr->szTokenString.w == nullptr || newVr->cbSize <= 0) -- cgit v1.2.3