diff options
Diffstat (limited to 'src')
121 files changed, 512 insertions, 510 deletions
diff --git a/src/core/stdautoaway/src/idle.cpp b/src/core/stdautoaway/src/idle.cpp index ff793f4ede..94641ac40a 100644 --- a/src/core/stdautoaway/src/idle.cpp +++ b/src/core/stdautoaway/src/idle.cpp @@ -31,7 +31,7 @@ int IdleOptInit(WPARAM wParam, LPARAM); static int IdleObject_IsUserIdle() { if (g_plugin.bIdleMethod) { - DWORD dwTick = Miranda_GetIdle(); + uint32_t dwTick = Miranda_GetIdle(); return GetTickCount() - dwTick > (g_plugin.iIdleTime1st * 60 * 1000); } diff --git a/src/core/stdautoaway/src/stdafx.h b/src/core/stdautoaway/src/stdafx.h index 4471a6ddf2..b44077e280 100644 --- a/src/core/stdautoaway/src/stdafx.h +++ b/src/core/stdautoaway/src/stdafx.h @@ -80,7 +80,7 @@ struct CMPlugin : public PLUGIN<CMPlugin> CMOption<uint8_t> bIdlePrivate, bIdleSoundsOff, bIdleOnTerminal, bIdleStatusLock;
CMOption<uint8_t> bAAEnable;
CMOption<uint16_t> bAAStatus;
- CMOption<DWORD> iIdleTime1st;
+ CMOption<uint32_t> iIdleTime1st;
};
void IdleObject_Destroy();
diff --git a/src/core/stdaway/src/sendmsg.cpp b/src/core/stdaway/src/sendmsg.cpp index 0f3c6032de..d6d0f29663 100644 --- a/src/core/stdaway/src/sendmsg.cpp +++ b/src/core/stdaway/src/sendmsg.cpp @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
-DWORD protoModeMsgFlags;
+uint32_t protoModeMsgFlags;
static HWND hwndStatusMsg;
const wchar_t* GetDefaultMessage(int status)
@@ -133,7 +133,7 @@ static LRESULT CALLBACK MessageEditSubclassProc(HWND hwnd, UINT msg, WPARAM wPar }
if (wParam == 127 && GetKeyState(VK_CONTROL) & 0x8000) //ctrl-backspace
{
- DWORD start, end;
+ uint32_t start, end;
SendMessage(hwnd, EM_GETSEL, (WPARAM)&end, 0);
SendMessage(hwnd, WM_KEYDOWN, VK_LEFT, 0);
SendMessage(hwnd, EM_GETSEL, (WPARAM)&start, 0);
diff --git a/src/core/stdaway/src/stdafx.h b/src/core/stdaway/src/stdafx.h index 1e9dc9a08f..f3749e104a 100644 --- a/src/core/stdaway/src/stdafx.h +++ b/src/core/stdaway/src/stdafx.h @@ -68,7 +68,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define MODULENAME "SRAway"
-extern DWORD protoModeMsgFlags;
+extern uint32_t protoModeMsgFlags;
int AwayMsgOptInitialise(WPARAM wParam, LPARAM);
diff --git a/src/core/stdclist/src/clcopts.cpp b/src/core/stdclist/src/clcopts.cpp index 24ebb16c9f..a0bce51c75 100644 --- a/src/core/stdclist/src/clcopts.cpp +++ b/src/core/stdclist/src/clcopts.cpp @@ -31,7 +31,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct CheckBoxToStyleEx_t
{
int id;
- DWORD flag;
+ uint32_t flag;
int not;
}
@@ -53,7 +53,7 @@ static const checkBoxToStyleEx[] = struct CheckBoxValues_t
{
- DWORD style;
+ uint32_t style;
wchar_t* szDescr;
}
static const greyoutValues[] =
@@ -69,7 +69,7 @@ static const greyoutValues[] = { PF2_INVISIBLE, LPGENW("Invisible") }
};
-static void FillCheckBoxTree(HWND hwndTree, const struct CheckBoxValues_t *values, int nValues, DWORD style)
+static void FillCheckBoxTree(HWND hwndTree, const struct CheckBoxValues_t *values, int nValues, uint32_t style)
{
TVINSERTSTRUCT tvis;
tvis.hParent = nullptr;
@@ -84,9 +84,9 @@ static void FillCheckBoxTree(HWND hwndTree, const struct CheckBoxValues_t *value }
}
-static DWORD MakeCheckBoxTreeFlags(HWND hwndTree)
+static uint32_t MakeCheckBoxTreeFlags(HWND hwndTree)
{
- DWORD flags = 0;
+ uint32_t flags = 0;
TVITEM tvi;
tvi.mask = TVIF_HANDLE | TVIF_PARAM | TVIF_STATE;
@@ -130,7 +130,7 @@ static INT_PTR CALLBACK DlgProcClcMainOpts(HWND hwndDlg, UINT msg, WPARAM wParam SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS), GWL_STYLE,
GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS), GWL_STYLE) | TVS_NOHSCROLL | TVS_CHECKBOXES);
{
- DWORD exStyle = db_get_dw(0, "CLC", "ExStyle", Clist_GetDefaultExStyle());
+ uint32_t exStyle = db_get_dw(0, "CLC", "ExStyle", Clist_GetDefaultExStyle());
for (auto &it : checkBoxToStyleEx)
CheckDlgButton(hwndDlg, it.id, (exStyle & it.flag) ^ (it.flag * it.not) ? BST_CHECKED : BST_UNCHECKED);
}
@@ -217,14 +217,14 @@ static INT_PTR CALLBACK DlgProcClcMainOpts(HWND hwndDlg, UINT msg, WPARAM wParam case 0:
if (((LPNMHDR)lParam)->code == PSN_APPLY) {
- DWORD exStyle = 0;
+ uint32_t exStyle = 0;
for (auto &it : checkBoxToStyleEx)
if ((IsDlgButtonChecked(hwndDlg, it.id) == 0) == it.not)
exStyle |= it.flag;
db_set_dw(0, "CLC", "ExStyle", exStyle);
{
- DWORD fullGreyoutFlags = MakeCheckBoxTreeFlags(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS));
+ uint32_t fullGreyoutFlags = MakeCheckBoxTreeFlags(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS));
db_set_dw(0, "CLC", "FullGreyoutFlags", fullGreyoutFlags);
if (IsDlgButtonChecked(hwndDlg, IDC_GREYOUT))
db_set_dw(0, "CLC", "GreyoutFlags", fullGreyoutFlags);
diff --git a/src/core/stdclist/src/clcpaint.cpp b/src/core/stdclist/src/clcpaint.cpp index f967443e37..5aa308ab60 100644 --- a/src/core/stdclist/src/clcpaint.cpp +++ b/src/core/stdclist/src/clcpaint.cpp @@ -91,7 +91,7 @@ static void __inline SetHotTrackColour(HDC hdc, struct ClcData *dat) void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint)
{
- DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
+ uint32_t style = GetWindowLongPtr(hwnd, GWL_STYLE);
int status = Clist_GetGeneralizedStatus();
// yes I know about GetSysColorBrush()
COLORREF tmpbkcolour = style & CLS_CONTACTLIST ? (dat->bUseWindowsColours ? GetSysColor(COLOR_3DFACE) : dat->bkColour) : dat->bkColour;
diff --git a/src/core/stdcrypt/src/stdcrypt.h b/src/core/stdcrypt/src/stdcrypt.h index 03a10bcd83..6a0e240b45 100644 --- a/src/core/stdcrypt/src/stdcrypt.h +++ b/src/core/stdcrypt/src/stdcrypt.h @@ -29,8 +29,8 @@ with this program; if not, write to the Free Software Foundation, Inc., struct ExternalKey
{
uint8_t m_key[KEY_LENGTH];
- DWORD m_crc32;
- uint8_t slack[BLOCK_SIZE - sizeof(DWORD)];
+ uint32_t m_crc32;
+ uint8_t slack[BLOCK_SIZE - sizeof(uint32_t)];
};
struct CStdCrypt : public MICryptoEngine, public MZeroedObject
diff --git a/src/core/stdcrypt/src/utils.cpp b/src/core/stdcrypt/src/utils.cpp index bb334edbdb..ab8dbfb95a 100644 --- a/src/core/stdcrypt/src/utils.cpp +++ b/src/core/stdcrypt/src/utils.cpp @@ -31,7 +31,7 @@ bool getRandomBytes(uint8_t *buf, size_t bufLen) ::CryptAcquireContext(&hProvider, nullptr, MS_STRONG_PROV, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT) ||
::CryptAcquireContext(&hProvider, nullptr, nullptr, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT))
{
- ::CryptGenRandom(hProvider, DWORD(bufLen), buf);
+ ::CryptGenRandom(hProvider, uint32_t(bufLen), buf);
::CryptReleaseContext(hProvider, 0);
}
// no luck? try to use Windows NT RTL
@@ -41,7 +41,7 @@ bool getRandomBytes(uint8_t *buf, size_t bufLen) if (fnGetRandom == nullptr)
return false;
- fnGetRandom(buf, DWORD(bufLen));
+ fnGetRandom(buf, uint32_t(bufLen));
}
return true;
}
diff --git a/src/core/stdfile/src/file.cpp b/src/core/stdfile/src/file.cpp index 2a57485eb0..16846c02f0 100644 --- a/src/core/stdfile/src/file.cpp +++ b/src/core/stdfile/src/file.cpp @@ -120,10 +120,10 @@ void PushFileEvent(MCONTACT hContact, MEVENT hdbe, LPARAM lParam) static int FileEventAdded(WPARAM wParam, LPARAM lParam)
{
- DWORD dwSignature;
+ uint32_t dwSignature;
DBEVENTINFO dbei = {};
- dbei.cbBlob = sizeof(DWORD);
+ dbei.cbBlob = sizeof(uint32_t);
dbei.pBlob = (uint8_t*)&dwSignature;
db_event_get(lParam, &dbei);
if (dbei.flags & (DBEF_SENT | DBEF_READ) || dbei.eventType != EVENTTYPE_FILE || dwSignature == 0)
@@ -381,7 +381,7 @@ static INT_PTR Proto_RecvFileT(WPARAM, LPARAM lParam) szDescr = pre->descr.a;
}
- dbei.cbBlob = sizeof(DWORD);
+ dbei.cbBlob = sizeof(uint32_t);
for (int i = 0; i < pre->fileCount; i++)
dbei.cbBlob += (int)mir_strlen(pszFiles[i]) + 1;
@@ -391,8 +391,8 @@ static INT_PTR Proto_RecvFileT(WPARAM, LPARAM lParam) if ((dbei.pBlob = (uint8_t*)mir_alloc(dbei.cbBlob)) == nullptr)
return 0;
- *(DWORD*)dbei.pBlob = 0;
- uint8_t* p = dbei.pBlob + sizeof(DWORD);
+ *(uint32_t*)dbei.pBlob = 0;
+ uint8_t* p = dbei.pBlob + sizeof(uint32_t);
for (int i = 0; i < pre->fileCount; i++) {
mir_strcpy((char*)p, pszFiles[i]);
p += mir_strlen(pszFiles[i]) + 1;
diff --git a/src/core/stdfile/src/file.h b/src/core/stdfile/src/file.h index 7b8cce531e..63a71dd8ac 100644 --- a/src/core/stdfile/src/file.h +++ b/src/core/stdfile/src/file.h @@ -63,7 +63,7 @@ struct FileDlgData PROTOFILETRANSFERSTATUS transferStatus;
int *fileVirusScanned;
HANDLE hPreshutdownEvent;
- DWORD dwTicks;
+ uint32_t dwTicks;
wchar_t szSavePath[MAX_PATH];
wchar_t szMsg[450], szFilenames[1024];
diff --git a/src/core/stdfile/src/filerecvdlg.cpp b/src/core/stdfile/src/filerecvdlg.cpp index a1e11bafb5..5bfc1f6a9f 100644 --- a/src/core/stdfile/src/filerecvdlg.cpp +++ b/src/core/stdfile/src/filerecvdlg.cpp @@ -35,7 +35,7 @@ static BOOL CALLBACK ClipSiblingsChildEnumProc(HWND hwnd, LPARAM) static void GetLowestExistingDirName(const wchar_t *szTestDir, wchar_t *szExistingDir, int cchExistingDir)
{
- DWORD dwAttributes;
+ uint32_t dwAttributes;
wchar_t *pszLastBackslash;
mir_wstrncpy(szExistingDir, szTestDir, cchExistingDir);
diff --git a/src/core/stdfile/src/filesenddlg.cpp b/src/core/stdfile/src/filesenddlg.cpp index fcd8ed0b9b..fa18e1f532 100644 --- a/src/core/stdfile/src/filesenddlg.cpp +++ b/src/core/stdfile/src/filesenddlg.cpp @@ -73,7 +73,7 @@ static void FilenameToFileList(HWND hwndDlg, FileDlgData* dat, const wchar_t *bu FreeFilesMatrix(&dat->files);
// Get the file attributes of selection
- DWORD dwFileAttributes = GetFileAttributes(buf);
+ uint32_t dwFileAttributes = GetFileAttributes(buf);
if (dwFileAttributes == INVALID_FILE_ATTRIBUTES)
return;
diff --git a/src/core/stdfile/src/filexferdlg.cpp b/src/core/stdfile/src/filexferdlg.cpp index ed445a5907..454658c147 100644 --- a/src/core/stdfile/src/filexferdlg.cpp +++ b/src/core/stdfile/src/filexferdlg.cpp @@ -82,11 +82,11 @@ void FillSendData(FileDlgData *dat, DBEVENTINFO& dbei) char *szFileNames = mir_utf8encodeW(dat->szFilenames), *szMsg = mir_utf8encodeW(dat->szMsg); dbei.flags |= DBEF_UTF; - dbei.cbBlob = int(sizeof(DWORD) + mir_strlen(szFileNames) + mir_strlen(szMsg) + 2); + dbei.cbBlob = int(sizeof(uint32_t) + mir_strlen(szFileNames) + mir_strlen(szMsg) + 2); dbei.pBlob = (uint8_t*)mir_alloc(dbei.cbBlob); *(PDWORD)dbei.pBlob = 0; - mir_strcpy((char*)dbei.pBlob + sizeof(DWORD), szFileNames); - mir_strcpy((char*)dbei.pBlob + sizeof(DWORD) + mir_strlen(szFileNames) + 1, szMsg); + mir_strcpy((char*)dbei.pBlob + sizeof(uint32_t), szFileNames); + mir_strcpy((char*)dbei.pBlob + sizeof(uint32_t) + mir_strlen(szFileNames) + 1, szMsg); mir_free(szFileNames), mir_free(szMsg); } diff --git a/src/core/stdmsg/src/chat_options.cpp b/src/core/stdmsg/src/chat_options.cpp index 62936a6fdb..cd1be53735 100644 --- a/src/core/stdmsg/src/chat_options.cpp +++ b/src/core/stdmsg/src/chat_options.cpp @@ -197,7 +197,7 @@ class COptMainDlg : public CDlgBase return res; } - void FillBranch(HTREEITEM hParent, branch_t *branch, int nValues, DWORD defaultval) + void FillBranch(HTREEITEM hParent, branch_t *branch, int nValues, uint32_t defaultval) { int iState; @@ -235,7 +235,7 @@ class COptMainDlg : public CDlgBase iState |= branch->iMode; if (iState & GC_EVENT_ADDSTATUS) iState |= GC_EVENT_REMOVESTATUS; - db_set_dw(0, CHAT_MODULE, branch->szDBName, (DWORD)iState); + db_set_dw(0, CHAT_MODULE, branch->szDBName, (uint32_t)iState); } else db_set_b(0, CHAT_MODULE, branch->szDBName, bChecked); } diff --git a/src/core/stdmsg/src/cmdlist.cpp b/src/core/stdmsg/src/cmdlist.cpp index 50c9302f36..c6d5103d7b 100644 --- a/src/core/stdmsg/src/cmdlist.cpp +++ b/src/core/stdmsg/src/cmdlist.cpp @@ -93,7 +93,7 @@ void msgQueue_processack(MCONTACT hContact, int id, BOOL success, LPARAM lParam) dbei.flags = DBEF_SENT | DBEF_UTF | (p->flags & PREF_RTL ? DBEF_RTL : 0);
dbei.szModule = Proto_GetBaseAccountName(hContact);
dbei.timestamp = time(0);
- dbei.cbBlob = (DWORD)(mir_strlen(p->szMsg) + 1);
+ dbei.cbBlob = (uint32_t)(mir_strlen(p->szMsg) + 1);
dbei.pBlob = (uint8_t*)p->szMsg;
dbei.szId = (char *)lParam;
diff --git a/src/core/stdmsg/src/globals.h b/src/core/stdmsg/src/globals.h index 12d06a65cf..0d33315663 100644 --- a/src/core/stdmsg/src/globals.h +++ b/src/core/stdmsg/src/globals.h @@ -57,9 +57,9 @@ struct GlobalMessageData CMOption<bool> bLimitAvatarHeight;
CMOption<uint16_t> iAvatarHeight;
- CMOption<DWORD> popupFlags;
- CMOption<DWORD> msgTimeout;
- CMOption<DWORD> nFlashMax;
+ CMOption<uint32_t> popupFlags;
+ CMOption<uint32_t> msgTimeout;
+ CMOption<uint32_t> nFlashMax;
CMOption<uint8_t> iGap;
CMOption<uint8_t> iLoadHistory;
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index 12746815e4..946ca9c72b 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -172,11 +172,11 @@ bool CMsgDialog::OnInitDialog() case LOADHISTORY_TIME:
DBEVENTINFO dbei = {};
if (m_hDbEventFirst == 0)
- dbei.timestamp = (DWORD)time(0);
+ dbei.timestamp = (uint32_t)time(0);
else
db_event_get(m_hDbEventFirst, &dbei);
- DWORD firstTime = dbei.timestamp - 60 * g_dat.nLoadTime;
+ uint32_t firstTime = dbei.timestamp - 60 * g_dat.nLoadTime;
while (MEVENT hPrevEvent = pCursor.FetchNext()) {
dbei.cbBlob = 0;
db_event_get(hPrevEvent, &dbei);
@@ -1427,7 +1427,7 @@ void CMsgDialog::NotifyTyping(int mode) if (!m_szProto)
return;
- DWORD typeCaps = CallProtoService(m_szProto, PS_GETCAPS, PFLAGNUM_4, 0);
+ uint32_t typeCaps = CallProtoService(m_szProto, PS_GETCAPS, PFLAGNUM_4, 0);
if (!(typeCaps & PF4_SUPPORTTYPING))
return;
@@ -1440,7 +1440,7 @@ void CMsgDialog::NotifyTyping(int mode) Chat_DoEventHook(m_si, GC_USER_TYPNOTIFY, 0, 0, m_nTypeMode);
}
else {
- DWORD protoCaps = CallProtoService(m_szProto, PS_GETCAPS, PFLAGNUM_1, 0);
+ uint32_t protoCaps = CallProtoService(m_szProto, PS_GETCAPS, PFLAGNUM_1, 0);
if (protoCaps & PF1_VISLIST && db_get_w(m_hContact, m_szProto, "ApparentMode", 0) == ID_STATUS_OFFLINE)
return;
diff --git a/src/core/stdmsg/src/msglog.cpp b/src/core/stdmsg/src/msglog.cpp index 73315ce746..147b107caf 100644 --- a/src/core/stdmsg/src/msglog.cpp +++ b/src/core/stdmsg/src/msglog.cpp @@ -306,7 +306,7 @@ static bool CreateRTFFromDbEvent(LogStreamData *dat) case EVENTTYPE_FILE:
{
- char *filename = (char*)dbei.pBlob + sizeof(DWORD);
+ char *filename = (char*)dbei.pBlob + sizeof(uint32_t);
char *descr = filename + mir_strlen(filename) + 1;
SetToStyle(MSGFONTID_NOTICE, buf);
diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp index 6bf23d43fa..cda2453b64 100644 --- a/src/core/stdmsg/src/msgoptions.cpp +++ b/src/core/stdmsg/src/msgoptions.cpp @@ -128,7 +128,7 @@ void RegisterSRMMFonts(void) struct CheckBoxValues_t
{
- DWORD style;
+ uint32_t style;
wchar_t* szDescr;
}
statusValues[] =
@@ -153,7 +153,7 @@ class COptionMainDlg : public CDlgBase CCtrlTreeView tree;
- void FillCheckBoxTree(DWORD style)
+ void FillCheckBoxTree(uint32_t style)
{
TVINSERTSTRUCT tvis;
tvis.hParent = nullptr;
@@ -168,9 +168,9 @@ class COptionMainDlg : public CDlgBase }
}
- DWORD MakeCheckBoxTreeFlags()
+ uint32_t MakeCheckBoxTreeFlags()
{
- DWORD flags = 0;
+ uint32_t flags = 0;
TVITEMEX tvi;
tvi.mask = TVIF_HANDLE | TVIF_PARAM | TVIF_IMAGE;
@@ -242,7 +242,7 @@ public: {
FillCheckBoxTree(g_dat.popupFlags);
- DWORD msgTimeout = g_dat.msgTimeout;
+ uint32_t msgTimeout = g_dat.msgTimeout;
edtSecs.SetInt((msgTimeout >= 5000) ? msgTimeout / 1000 : 5);
chkCascade.Enable(!g_dat.bSavePerContact);
@@ -254,7 +254,7 @@ public: {
g_dat.popupFlags = MakeCheckBoxTreeFlags();
- DWORD msgTimeout = edtSecs.GetInt() * 1000;
+ uint32_t msgTimeout = edtSecs.GetInt() * 1000;
if (msgTimeout < 5000)
msgTimeout = 5000;
g_dat.msgTimeout = msgTimeout;
diff --git a/src/core/stdmsg/src/msgs.h b/src/core/stdmsg/src/msgs.h index 304ada7afb..eac5d63eea 100644 --- a/src/core/stdmsg/src/msgs.h +++ b/src/core/stdmsg/src/msgs.h @@ -73,7 +73,7 @@ class CMsgDialog : public CSrmmBaseDialog void OnType(CTimer *);
CTabbedWindow *m_pOwner;
- DWORD m_nFlash = 0;
+ uint32_t m_nFlash = 0;
char *m_szProto = nullptr;
// splitters
@@ -95,7 +95,7 @@ class CMsgDialog : public CSrmmBaseDialog HFONT m_hFont = nullptr;
int m_limitAvatarH = 0;
- DWORD m_lastMessage = 0;
+ uint32_t m_lastMessage = 0;
HANDLE m_hTimeZone = 0;
uint16_t m_wStatus = ID_STATUS_OFFLINE, m_wOldStatus = ID_STATUS_OFFLINE;
uint16_t m_wMinute = 0;
diff --git a/src/core/stdpopup/src/options.cpp b/src/core/stdpopup/src/options.cpp index adc8283b4e..40c51c372d 100644 --- a/src/core/stdpopup/src/options.cpp +++ b/src/core/stdpopup/src/options.cpp @@ -458,9 +458,9 @@ static INT_PTR CALLBACK DlgProcOptsClasses(HWND hwndDlg, UINT msg, WPARAM wParam mir_snprintf(setting, "%s/Timeout", pc->pszName); g_plugin.setWord(setting, pc->iSeconds); mir_snprintf(setting, "%s/TextCol", pc->pszName); - g_plugin.setDword(setting, (DWORD)pc->colorText); + g_plugin.setDword(setting, (uint32_t)pc->colorText); mir_snprintf(setting, "%s/BgCol", pc->pszName); - g_plugin.setDword(setting, (DWORD)pc->colorBack); + g_plugin.setDword(setting, (uint32_t)pc->colorBack); } return TRUE; } diff --git a/src/core/stdpopup/src/popwin.cpp b/src/core/stdpopup/src/popwin.cpp index a314f61730..a9fd8ee2d9 100644 --- a/src/core/stdpopup/src/popwin.cpp +++ b/src/core/stdpopup/src/popwin.cpp @@ -3,7 +3,7 @@ #define ID_CLOSETIMER 0x0101 #define ID_MOVETIMER 0x0102 -DWORD pop_start_x, pop_start_y; +uint32_t pop_start_x, pop_start_y; int global_mouse_in = 0; void trimW(wchar_t *str) @@ -222,7 +222,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa if (pwd->custom_col) { pwd->bkBrush = CreateSolidBrush(pd->colorBack); - DWORD darkBg = pd->colorBack - ((pd->colorBack >> 2) & 0x3f3f3f); // 3/4 of current individual RGB components + uint32_t darkBg = pd->colorBack - ((pd->colorBack >> 2) & 0x3f3f3f); // 3/4 of current individual RGB components pwd->barBrush = CreateSolidBrush(darkBg); // make sidebar a dark version of the bg pwd->underlineBrush = CreateSolidBrush(pd->colorBack); // make sidebar a dark version of the bg } diff --git a/src/core/stdpopup/src/services.cpp b/src/core/stdpopup/src/services.cpp index e6a1be8e7b..b743e173df 100644 --- a/src/core/stdpopup/src/services.cpp +++ b/src/core/stdpopup/src/services.cpp @@ -306,9 +306,9 @@ static INT_PTR RegisterPopupClass(WPARAM, LPARAM lParam) pc->iSeconds = g_plugin.getWord(setting, pc->iSeconds); if (pc->iSeconds == (uint16_t)-1) pc->iSeconds = -1; mir_snprintf(setting, "%s/TextCol", pc->pszName); - pc->colorText = (COLORREF)g_plugin.getDword(setting, (DWORD)pc->colorText); + pc->colorText = (COLORREF)g_plugin.getDword(setting, (uint32_t)pc->colorText); mir_snprintf(setting, "%s/BgCol", pc->pszName); - pc->colorBack = (COLORREF)g_plugin.getDword(setting, (DWORD)pc->colorBack); + pc->colorBack = (COLORREF)g_plugin.getDword(setting, (uint32_t)pc->colorBack); arClasses.insert(pc); return (INT_PTR)pc; diff --git a/src/core/stdpopup/src/yapp_history.h b/src/core/stdpopup/src/yapp_history.h index 89c7957166..f824862bf7 100644 --- a/src/core/stdpopup/src/yapp_history.h +++ b/src/core/stdpopup/src/yapp_history.h @@ -36,7 +36,7 @@ struct PopupHistoryData { - DWORD flags; //PHDF_* flags + uint32_t flags; //PHDF_* flags wchar_t *messageW; wchar_t *titleW; time_t timestamp; diff --git a/src/core/stdpopup/src/yapp_history_dlg.cpp b/src/core/stdpopup/src/yapp_history_dlg.cpp index 0e51efb3af..ff8fd4122b 100644 --- a/src/core/stdpopup/src/yapp_history_dlg.cpp +++ b/src/core/stdpopup/src/yapp_history_dlg.cpp @@ -306,7 +306,7 @@ IEVIEWEVENTDATA *CreateAndFillEventData(PopupHistoryData *popupItem) eventData->szNick.w = popupItem->titleW; eventData->szText.w = popupItem->messageW; - eventData->time = (DWORD)popupItem->timestamp; + eventData->time = (uint32_t)popupItem->timestamp; eventData->next = nullptr; } diff --git a/src/core/stduserinfo/src/userinfo.cpp b/src/core/stduserinfo/src/userinfo.cpp index 1ff026c4c3..025502f5fb 100644 --- a/src/core/stduserinfo/src/userinfo.cpp +++ b/src/core/stduserinfo/src/userinfo.cpp @@ -47,7 +47,7 @@ struct DetailsPageData : public MNonCopyable HTREEITEM hItem;
HPLUGIN pPlugin;
int changed;
- DWORD dwFlags;
+ uint32_t dwFlags;
wchar_t *pwszTitle, *pwszTab;
~DetailsPageData()
diff --git a/src/core/stduseronline/src/useronline.cpp b/src/core/stduseronline/src/useronline.cpp index 173269f7f4..1c85295e37 100644 --- a/src/core/stduseronline/src/useronline.cpp +++ b/src/core/stduseronline/src/useronline.cpp @@ -47,7 +47,7 @@ static int UserOnlineSettingChanged(WPARAM hContact, LPARAM lParam) }
if ((newStatus == ID_STATUS_ONLINE || newStatus == ID_STATUS_FREECHAT) && oldStatus != ID_STATUS_ONLINE && oldStatus != ID_STATUS_FREECHAT) {
- DWORD ticked = g_plugin.getDword(cws->szModule, GetTickCount());
+ uint32_t ticked = g_plugin.getDword(cws->szModule, GetTickCount());
// only play the sound (or show event) if this event happens at least 10 secs after the proto went from offline
if (GetTickCount() - ticked > (1000 * 10)) {
wchar_t tooltip[256];
diff --git a/src/mir_app/src/Docking.cpp b/src/mir_app/src/Docking.cpp index 7fb467ac51..fd15094f05 100644 --- a/src/mir_app/src/Docking.cpp +++ b/src/mir_app/src/Docking.cpp @@ -140,8 +140,8 @@ int fnDocking_ProcessWindowMessage(WPARAM wParam, LPARAM lParam) if (msg->message == WM_DESTROY) {
if (docked) {
db_set_b(0, "CList", "Docked", (uint8_t)docked);
- db_set_dw(0, "CList", "DockX", (DWORD)dockPos.x);
- db_set_dw(0, "CList", "DockY", (DWORD)dockPos.y);
+ db_set_dw(0, "CList", "DockX", (uint32_t)dockPos.x);
+ db_set_dw(0, "CList", "DockY", (uint32_t)dockPos.y);
}
else {
db_unset(0, "CList", "Docked");
@@ -258,7 +258,7 @@ int fnDocking_ProcessWindowMessage(WPARAM wParam, LPARAM lParam) // GetMessagePos() is no good, position is always unsigned
// GetCursorPos(&ptCursor);
- DWORD pos = GetMessagePos();
+ uint32_t pos = GetMessagePos();
ptCursor.x = GET_X_LPARAM(pos);
ptCursor.y = GET_Y_LPARAM(pos);
Docking_GetMonitorRectFromPoint(&ptCursor, &rcMonitor);
diff --git a/src/mir_app/src/FontOptions.cpp b/src/mir_app/src/FontOptions.cpp index 8f7b4d0582..86445f0366 100644 --- a/src/mir_app/src/FontOptions.cpp +++ b/src/mir_app/src/FontOptions.cpp @@ -225,7 +225,7 @@ static BOOL ExportSettings(HWND hwndDlg, const wchar_t *filename, OBJLIST<FontIn ColourInternal *C = (ColourInternal*)it;
if (clist.indexOf(C) != -1) {
- fprintf(out, "%s=d%d\n", C->setting, (DWORD)C->value);
+ fprintf(out, "%s=d%d\n", C->setting, (uint32_t)C->value);
continue;
}
@@ -409,7 +409,7 @@ static void sttSaveCollapseState(HWND hwndTree) tvi.mask = TVIF_STATE | TVIF_HANDLE | TVIF_CHILDREN | TVIF_PARAM;
tvi.hItem = hti;
- tvi.stateMask = (DWORD)-1;
+ tvi.stateMask = (uint32_t)-1;
TreeView_GetItem(hwndTree, &tvi);
if (tvi.cChildren > 0) {
diff --git a/src/mir_app/src/FontService.cpp b/src/mir_app/src/FontService.cpp index 534ac261a5..f4ff33db17 100644 --- a/src/mir_app/src/FontService.cpp +++ b/src/mir_app/src/FontService.cpp @@ -117,7 +117,7 @@ static void GetDefaultFontSetting(LOGFONT *lf, COLORREF *colour) ReleaseDC(nullptr, hdc);
}
-int GetFontSettingFromDB(char *settings_group, char *prefix, LOGFONT *lf, COLORREF *colour, DWORD flags)
+int GetFontSettingFromDB(char *settings_group, char *prefix, LOGFONT *lf, COLORREF *colour, uint32_t flags)
{
GetDefaultFontSetting(lf, colour);
diff --git a/src/mir_app/src/IcoLib.h b/src/mir_app/src/IcoLib.h index 4d33977422..5878f7695f 100644 --- a/src/mir_app/src/IcoLib.h +++ b/src/mir_app/src/IcoLib.h @@ -80,7 +80,7 @@ public: struct IcolibItem : public MZeroedObject
{
char* name;
- DWORD signature = ICOLIB_MAGIC;
+ uint32_t signature = ICOLIB_MAGIC;
SectionItem* section;
int orderID;
wchar_t* description;
diff --git a/src/mir_app/src/addcontact.cpp b/src/mir_app/src/addcontact.cpp index 83f2d9f77d..49c9dae4ed 100644 --- a/src/mir_app/src/addcontact.cpp +++ b/src/mir_app/src/addcontact.cpp @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
-static wchar_t* sttDecodeString(DWORD dwFlags, MAllStrings &src)
+static wchar_t* sttDecodeString(uint32_t dwFlags, MAllStrings &src)
{
if (dwFlags & PSR_UNICODE)
return mir_wstrdup(src.w);
@@ -89,7 +89,7 @@ public: if (db_get_b(0, "Miranda", "AuthOpenWindow", 1))
m_chkOpen.SetState(true);
- DWORD flags = (m_szProto) ? CallProtoServiceInt(0, m_szProto, PS_GETCAPS, PFLAGNUM_4, 0) : 0;
+ uint32_t flags = (m_szProto) ? CallProtoServiceInt(0, m_szProto, PS_GETCAPS, PFLAGNUM_4, 0) : 0;
if (flags & PF4_FORCEAUTH) // force auth requests for this protocol
m_chkAuth.Enable(false);
@@ -126,7 +126,7 @@ public: Contact_PutOnList(hContact);
if (m_chkAuth.GetState()) {
- DWORD flags = CallProtoServiceInt(0, m_szProto, PS_GETCAPS, PFLAGNUM_4, 0);
+ uint32_t flags = CallProtoServiceInt(0, m_szProto, PS_GETCAPS, PFLAGNUM_4, 0);
if (flags & PF4_NOCUSTOMAUTH)
ProtoChainSend(hContact, PSS_AUTHREQUEST, 0, 0);
else
@@ -145,7 +145,7 @@ public: void OnAuthClicked(CCtrlButton*)
{
- DWORD flags = CallProtoServiceInt(0, m_szProto, PS_GETCAPS, PFLAGNUM_4, 0);
+ uint32_t flags = CallProtoServiceInt(0, m_szProto, PS_GETCAPS, PFLAGNUM_4, 0);
if (flags & PF4_NOCUSTOMAUTH)
m_authReq.Enable(false);
else
@@ -190,7 +190,7 @@ MIR_APP_DLL(void) Contact_AddByEvent(MEVENT hEvent, HWND hwndParent) {
m_hDbEvent = hEvent;
- DWORD dwData[2];
+ uint32_t dwData[2];
DBEVENTINFO dbei = {};
dbei.cbBlob = sizeof(dwData);
dbei.pBlob = (uint8_t*)&dwData;
diff --git a/src/mir_app/src/auth.cpp b/src/mir_app/src/auth.cpp index c861bf57cb..e7a687b45a 100644 --- a/src/mir_app/src/auth.cpp +++ b/src/mir_app/src/auth.cpp @@ -53,7 +53,7 @@ public: Button_SetSkin_IcoLib(m_hwnd, IDC_DETAILS, SKINICON_OTHER_USERDETAILS, LPGEN("View user's details")); Button_SetSkin_IcoLib(m_hwnd, IDC_ADD, SKINICON_OTHER_ADDCONTACT, LPGEN("Add contact permanently to list")); - // blob is: uin(DWORD), hcontact(DWORD), nick(ASCIIZ), first(ASCIIZ), last(ASCIIZ), email(ASCIIZ), reason(ASCIIZ) + // blob is: uin(uint32_t), hcontact(uint32_t), nick(ASCIIZ), first(ASCIIZ), last(ASCIIZ), email(ASCIIZ), reason(ASCIIZ) DBEVENTINFO dbei = {}; dbei.cbBlob = -1; if (db_event_get(m_hDbEvent, &dbei)) @@ -61,9 +61,9 @@ public: m_szProto = dbei.szModule; - DWORD uin = *(DWORD*)dbei.pBlob; + uint32_t uin = *(uint32_t*)dbei.pBlob; m_hContact = DbGetAuthEventContact(&dbei); - char *nick = (char*)dbei.pBlob + sizeof(DWORD) * 2; + char *nick = (char*)dbei.pBlob + sizeof(uint32_t) * 2; char *first = nick + mir_strlen(nick) + 1; char *last = first + mir_strlen(first) + 1; char *email = last + mir_strlen(last) + 1; @@ -194,15 +194,15 @@ public: Button_SetSkin_IcoLib(m_hwnd, IDC_DETAILS, SKINICON_OTHER_USERDETAILS, LPGEN("View user's details")); Button_SetSkin_IcoLib(m_hwnd, IDC_ADD, SKINICON_OTHER_ADDCONTACT, LPGEN("Add contact permanently to list")); - // blob is: uin(DWORD), hcontact(HANDLE), nick(ASCIIZ), first(ASCIIZ), last(ASCIIZ), email(ASCIIZ) + // blob is: uin(uint32_t), hcontact(HANDLE), nick(ASCIIZ), first(ASCIIZ), last(ASCIIZ), email(ASCIIZ) DB::EventInfo dbei; dbei.cbBlob = -1; db_event_get(m_hDbEvent, &dbei); m_hContact = DbGetAuthEventContact(&dbei); - DWORD uin = *(PDWORD)dbei.pBlob; - char* nick = (char*)dbei.pBlob + sizeof(DWORD) * 2; + uint32_t uin = *(PDWORD)dbei.pBlob; + char* nick = (char*)dbei.pBlob + sizeof(uint32_t) * 2; char* first = nick + mir_strlen(nick) + 1; char* last = first + mir_strlen(first) + 1; char* email = last + mir_strlen(last) + 1; diff --git a/src/mir_app/src/button.cpp b/src/mir_app/src/button.cpp index cbae11116c..85ec712698 100644 --- a/src/mir_app/src/button.cpp +++ b/src/mir_app/src/button.cpp @@ -31,7 +31,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct TTooltips
{
- DWORD ThreadId;
+ uint32_t ThreadId;
HWND hwnd;
};
diff --git a/src/mir_app/src/chat.h b/src/mir_app/src/chat.h index 62a826cb7e..5020adcb92 100644 --- a/src/mir_app/src/chat.h +++ b/src/mir_app/src/chat.h @@ -36,7 +36,7 @@ extern wchar_t *g_szFontGroup; extern mir_cs csChat;
extern HICON g_hChatIcons[20];
-extern DWORD g_dwDiskLogFlags;
+extern uint32_t g_dwDiskLogFlags;
extern HCURSOR g_hCurHyperlinkHand;
extern char* pLogIconBmpBits[14];
extern HANDLE hevSendEvent, hevBuildMenuEvent;
diff --git a/src/mir_app/src/chat_opts.cpp b/src/mir_app/src/chat_opts.cpp index 450d383e53..50a7587f6c 100644 --- a/src/mir_app/src/chat_opts.cpp +++ b/src/mir_app/src/chat_opts.cpp @@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern SESSION_INFO g_TabSession;
HICON g_hChatIcons[20];
-DWORD g_dwDiskLogFlags;
+uint32_t g_dwDiskLogFlags;
HPLUGIN g_pChatPlugin;
GlobalLogSettingsBase *g_Settings;
int g_cbSession, g_cbModuleInfo = sizeof(MODULEINFO), g_iFontMode;
diff --git a/src/mir_app/src/chat_tools.cpp b/src/mir_app/src/chat_tools.cpp index fbad9e5bc6..56feb97c52 100644 --- a/src/mir_app/src/chat_tools.cpp +++ b/src/mir_app/src/chat_tools.cpp @@ -770,7 +770,7 @@ MIR_APP_DLL(void) Chat_AddMenuItems(HMENU hMenu, int nItems, const gc_item *Item HMENU hSubMenu = nullptr;
for (int i = 0; i < nItems; i++) {
wchar_t *ptszText = TranslateW_LP(Item[i].pszDesc, pPlugin);
- DWORD dwState = Item[i].bDisabled ? MF_GRAYED : 0;
+ uint32_t dwState = Item[i].bDisabled ? MF_GRAYED : 0;
if (Item[i].uType == MENU_NEWPOPUP) {
hSubMenu = CreateMenu();
diff --git a/src/mir_app/src/chat_ui.cpp b/src/mir_app/src/chat_ui.cpp index 0d3c77feed..ad6130b3cd 100644 --- a/src/mir_app/src/chat_ui.cpp +++ b/src/mir_app/src/chat_ui.cpp @@ -86,11 +86,11 @@ public: { btn1.MakeFlat(); btn2.MakeFlat(); btn3.MakeFlat(); btn4.MakeFlat(); - DWORD dwFilterFlags = db_get_dw(0, CHAT_MODULE, "FilterFlags", GC_EVENT_ALL); - DWORD dwTrayFlags = db_get_dw(0, CHAT_MODULE, "TrayIconFlags", GC_EVENT_HIGHLIGHT); - DWORD dwPopupFlags = db_get_dw(0, CHAT_MODULE, "PopupFlags", GC_EVENT_HIGHLIGHT); - DWORD dwSoundFlags = db_get_dw(0, CHAT_MODULE, "SoundFlags", GC_EVENT_HIGHLIGHT); - DWORD dwLogFlags = db_get_dw(0, CHAT_MODULE, "DiskLogFlags", GC_EVENT_ALL); + uint32_t dwFilterFlags = db_get_dw(0, CHAT_MODULE, "FilterFlags", GC_EVENT_ALL); + uint32_t dwTrayFlags = db_get_dw(0, CHAT_MODULE, "TrayIconFlags", GC_EVENT_HIGHLIGHT); + uint32_t dwPopupFlags = db_get_dw(0, CHAT_MODULE, "PopupFlags", GC_EVENT_HIGHLIGHT); + uint32_t dwSoundFlags = db_get_dw(0, CHAT_MODULE, "SoundFlags", GC_EVENT_HIGHLIGHT); + uint32_t dwLogFlags = db_get_dw(0, CHAT_MODULE, "DiskLogFlags", GC_EVENT_ALL); for (int i = 0; i < _countof(_eventorder); i++) { if (_eventorder[i] != GC_EVENT_HIGHLIGHT) { @@ -106,7 +106,7 @@ public: bool OnApply() override { - DWORD dwFilterFlags = 0, dwTrayFlags = 0, dwPopupFlags = 0, dwSoundFlags = 0, dwLogFlags = 0; + uint32_t dwFilterFlags = 0, dwTrayFlags = 0, dwPopupFlags = 0, dwSoundFlags = 0, dwLogFlags = 0; for (int i = 0; i < _countof(_eventorder); i++) { if (_eventorder[i] != GC_EVENT_HIGHLIGHT) { diff --git a/src/mir_app/src/clc.cpp b/src/mir_app/src/clc.cpp index 1231260de1..dabbe51aca 100644 --- a/src/mir_app/src/clc.cpp +++ b/src/mir_app/src/clc.cpp @@ -139,7 +139,7 @@ static int ClcProtoAck(WPARAM, LPARAM lParam) if ((INT_PTR)ack->hProcess < ID_STATUS_ONLINE && ack->lParam >= ID_STATUS_ONLINE) {
// if we're going offline, kill all contacts scheduled for deletion
- DWORD caps = (DWORD)CallProtoServiceInt(0, ack->szModule, PS_GETCAPS, PFLAGNUM_1, 0);
+ uint32_t caps = (uint32_t)CallProtoServiceInt(0, ack->szModule, PS_GETCAPS, PFLAGNUM_1, 0);
if (caps & PF1_SERVERCLIST) {
for (MCONTACT hContact = db_find_first(ack->szModule); hContact; ) {
MCONTACT hNext = db_find_next(hContact, ack->szModule);
@@ -226,7 +226,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam {
ClcGroup *group;
ClcContact *contact;
- DWORD hitFlags;
+ uint32_t hitFlags;
int hit;
ClcData *dat = (ClcData *)GetWindowLongPtr(hwnd, 0);
@@ -476,7 +476,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam status = db_get_w(wParam, szProto, "Status", ID_STATUS_OFFLINE);
// this means an offline msg is flashing, so the contact should be shown
- DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
+ uint32_t style = GetWindowLongPtr(hwnd, GWL_STYLE);
int shouldShow = (style & CLS_SHOWHIDDEN || !Contact_IsHidden(wParam))
&& (!Clist_IsHiddenMode(dat, status) || Clist_GetContactIcon(wParam) != lParam);
diff --git a/src/mir_app/src/clc.h b/src/mir_app/src/clc.h index a13485794e..e482e97036 100644 --- a/src/mir_app/src/clc.h +++ b/src/mir_app/src/clc.h @@ -48,10 +48,10 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, int fnGetRowsPriorTo(ClcGroup *group, ClcGroup *subgroup, int contactIndex);
int fnGetRowByIndex(ClcData *dat, int testindex, ClcContact **contact, ClcGroup **subgroup);
-ClcContact* fnFindItem(DWORD dwItem, ClcContact *contact);
+ClcContact* fnFindItem(uint32_t dwItem, ClcContact *contact);
/* clcitems.c */
-ClcGroup* fnAddGroup(HWND hwnd, ClcData *dat, const wchar_t *szName, DWORD flags, int groupId, int calcTotalMembers);
+ClcGroup* fnAddGroup(HWND hwnd, ClcData *dat, const wchar_t *szName, uint32_t flags, int groupId, int calcTotalMembers);
ClcContact* fnAddInfoItemToGroup(ClcGroup *group, int flags, const wchar_t *pszText);
ClcContact* fnAddItemToGroup(ClcGroup *group, int iAboveItem);
@@ -71,7 +71,7 @@ int fnGetContactHiddenStatus(MCONTACT hContact, char *szProto, ClcData *dat); LRESULT fnProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wParam, LPARAM lParam);
/* clcutils.c */
-int fnHitTest(HWND hwnd, ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, DWORD * flags);
+int fnHitTest(HWND hwnd, ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, uint32_t * flags);
void fnScrollTo(HWND hwnd, ClcData *dat, int desty, int noSmooth);
void fnRecalcScrollBar(HWND hwnd, ClcData *dat);
void fnSetGroupExpand(HWND hwnd, ClcData *dat, ClcGroup *group, int newState);
diff --git a/src/mir_app/src/clcfiledrop.cpp b/src/mir_app/src/clcfiledrop.cpp index 362ae410d3..7e85e3fdf7 100644 --- a/src/mir_app/src/clcfiledrop.cpp +++ b/src/mir_app/src/clcfiledrop.cpp @@ -72,7 +72,7 @@ ULONG CDropTarget::Release(void) static MCONTACT HContactFromPoint(HWND hwnd, ClcData *dat, int x, int y, int *hitLine)
{
- DWORD hitFlags;
+ uint32_t hitFlags;
ClcContact *contact;
int hit = g_clistApi.pfnHitTest(hwnd, dat, x, y, &contact, nullptr, &hitFlags);
if (hit == -1 || !(hitFlags & (CLCHT_ONITEMLABEL | CLCHT_ONITEMICON)) || contact->type != CLCIT_CONTACT)
@@ -82,7 +82,7 @@ static MCONTACT HContactFromPoint(HWND hwnd, ClcData *dat, int x, int y, int *hi if (szProto == nullptr)
return 0;
- DWORD protoCaps = CallProtoServiceInt(0,szProto, PS_GETCAPS, PFLAGNUM_1, 0);
+ uint32_t protoCaps = CallProtoServiceInt(0,szProto, PS_GETCAPS, PFLAGNUM_1, 0);
if (!(protoCaps & PF1_FILESEND))
return 0;
if (ID_STATUS_OFFLINE == db_get_w(contact->hContact, szProto, "Status", ID_STATUS_OFFLINE))
diff --git a/src/mir_app/src/clcidents.cpp b/src/mir_app/src/clcidents.cpp index 38782a50ec..17c53569e4 100644 --- a/src/mir_app/src/clcidents.cpp +++ b/src/mir_app/src/clcidents.cpp @@ -73,7 +73,7 @@ int fnGetRowsPriorTo(ClcGroup *group, ClcGroup *subgroup, int contactIndex) return -1;
}
-ClcContact* fnFindItem(DWORD dwItem, ClcContact *cc)
+ClcContact* fnFindItem(uint32_t dwItem, ClcContact *cc)
{
if (IsHContactGroup(dwItem) && cc->type == CLCIT_GROUP && (dwItem & ~HCONTACT_ISGROUP) == cc->groupId)
return cc;
@@ -87,7 +87,7 @@ ClcContact* fnFindItem(DWORD dwItem, ClcContact *cc) return nullptr;
}
-MIR_APP_DLL(bool) Clist_FindItem(HWND hwnd, ClcData *dat, DWORD dwItem, ClcContact **contact, ClcGroup **subgroup, int *isVisible)
+MIR_APP_DLL(bool) Clist_FindItem(HWND hwnd, ClcData *dat, uint32_t dwItem, ClcContact **contact, ClcGroup **subgroup, int *isVisible)
{
int index = 0;
int nowVisible = 1;
@@ -190,7 +190,7 @@ int fnGetRowByIndex(ClcData *dat, int testindex, ClcContact **contact, ClcGroup return -1;
}
-MIR_APP_DLL(DWORD) Clist_ContactToHItem(ClcContact *cc)
+MIR_APP_DLL(uint32_t) Clist_ContactToHItem(ClcContact *cc)
{
switch (cc->type) {
case CLCIT_CONTACT:
@@ -203,7 +203,7 @@ MIR_APP_DLL(DWORD) Clist_ContactToHItem(ClcContact *cc) return 0;
}
-MIR_APP_DLL(HANDLE) Clist_ContactToItemHandle(ClcContact *cc, DWORD *nmFlags)
+MIR_APP_DLL(HANDLE) Clist_ContactToItemHandle(ClcContact *cc, uint32_t *nmFlags)
{
switch (cc->type) {
case CLCIT_CONTACT:
diff --git a/src/mir_app/src/clcitems.cpp b/src/mir_app/src/clcitems.cpp index f4ed57079c..296180e78f 100644 --- a/src/mir_app/src/clcitems.cpp +++ b/src/mir_app/src/clcitems.cpp @@ -40,7 +40,7 @@ ClcContact* fnAddItemToGroup(ClcGroup *group, int iAboveItem) return newItem; } -ClcGroup* fnAddGroup(HWND hwnd, ClcData *dat, const wchar_t *szName, DWORD flags, int groupId, int calcTotalMembers) +ClcGroup* fnAddGroup(HWND hwnd, ClcData *dat, const wchar_t *szName, uint32_t flags, int groupId, int calcTotalMembers) { dat->bNeedsResort = true; if (!(GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_USEGROUPS)) @@ -67,7 +67,7 @@ ClcGroup* fnAddGroup(HWND hwnd, ClcData *dat, const wchar_t *szName, DWORD flags continue; compareResult = mir_wstrcmp(pThisField, cc->szText); if (compareResult == 0) { - if (pNextField == nullptr && flags != (DWORD)-1) { + if (pNextField == nullptr && flags != (uint32_t)-1) { cc->groupId = (uint16_t)groupId; group = cc->group; group->expanded = (flags & GROUPF_EXPANDED) != 0; @@ -95,7 +95,7 @@ ClcGroup* fnAddGroup(HWND hwnd, ClcData *dat, const wchar_t *szName, DWORD flags cc->group->parent = group; group = cc->group; - if (flags == (DWORD)-1 || pNextField != nullptr) { + if (flags == (uint32_t)-1 || pNextField != nullptr) { group->expanded = 0; group->hideOffline = 0; } @@ -105,8 +105,8 @@ ClcGroup* fnAddGroup(HWND hwnd, ClcData *dat, const wchar_t *szName, DWORD flags } group->groupId = pNextField ? 0 : groupId; group->totalMembers = 0; - if (flags != (DWORD)-1 && pNextField == nullptr && calcTotalMembers) { - DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE); + if (flags != (uint32_t)-1 && pNextField == nullptr && calcTotalMembers) { + uint32_t style = GetWindowLongPtr(hwnd, GWL_STYLE); for (auto &hContact : Contacts()) { ClcCacheEntry *cache = Clist_GetCacheEntry(hContact); if (!mir_wstrcmp(cache->tszGroup, szName) && (style & CLS_SHOWHIDDEN || !cache->bIsHidden)) @@ -203,7 +203,7 @@ ClcContact* fnAddContactToGroup(ClcData *dat, ClcGroup *group, MCONTACT hContact cc->flags |= CONTACTF_VISTO | CONTACTF_INVISTO; if (!Contact_OnList(hContact)) cc->flags |= CONTACTF_NOTONLIST; - DWORD idleMode = szProto != nullptr ? db_get_dw(hContact, szProto, "IdleTS", 0) : 0; + uint32_t idleMode = szProto != nullptr ? db_get_dw(hContact, szProto, "IdleTS", 0) : 0; if (idleMode) cc->flags |= CONTACTF_IDLE; mir_wstrncpy(cc->szText, Clist_GetContactDisplayName(hContact), _countof(cc->szText)); @@ -212,7 +212,7 @@ ClcContact* fnAddContactToGroup(ClcData *dat, ClcGroup *group, MCONTACT hContact void fnAddContactToTree(HWND hwnd, ClcData *dat, MCONTACT hContact, int updateTotalCount, int checkHideOffline) { - DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE); + uint32_t style = GetWindowLongPtr(hwnd, GWL_STYLE); uint16_t status = ID_STATUS_OFFLINE; char *szProto = Proto_GetBaseAccountName(hContact); @@ -224,13 +224,13 @@ void fnAddContactToTree(HWND hwnd, ClcData *dat, MCONTACT hContact, int updateTo status = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE); int i; - DWORD groupFlags; + uint32_t groupFlags; ClcGroup *group; ptrW tszGroup(Clist_GetGroup(hContact)); if (tszGroup == nullptr) group = &dat->list; else { - group = g_clistApi.pfnAddGroup(hwnd, dat, tszGroup, (DWORD)-1, 0, 0); + group = g_clistApi.pfnAddGroup(hwnd, dat, tszGroup, (uint32_t)-1, 0, 0); if (group == nullptr) { if (!(style & CLS_HIDEEMPTYGROUPS)) return; @@ -347,7 +347,7 @@ int fnGetContactHiddenStatus(MCONTACT hContact, char*, ClcData*) void fnRebuildEntireList(HWND hwnd, ClcData *dat) { - DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE); + uint32_t style = GetWindowLongPtr(hwnd, GWL_STYLE); dat->list.expanded = 1; dat->list.hideOffline = db_get_b(0, "CLC", "HideOfflineRoot", 0) && (style & CLS_USEGROUPS); @@ -356,7 +356,7 @@ void fnRebuildEntireList(HWND hwnd, ClcData *dat) dat->selection = -1; for (int i = 1;; i++) { - DWORD groupFlags; + uint32_t groupFlags; wchar_t *szGroupName = Clist_GroupGetName(i, &groupFlags); if (szGroupName == nullptr) break; @@ -375,7 +375,7 @@ void fnRebuildEntireList(HWND hwnd, ClcData *dat) if (tszGroupName == nullptr) group = &dat->list; else { - group = g_clistApi.pfnAddGroup(hwnd, dat, tszGroupName, (DWORD)-1, 0, 0); + group = g_clistApi.pfnAddGroup(hwnd, dat, tszGroupName, (uint32_t)-1, 0, 0); if (group == nullptr && style & CLS_SHOWHIDDEN) group = &dat->list; } diff --git a/src/mir_app/src/clcmsgs.cpp b/src/mir_app/src/clcmsgs.cpp index c3b54278d2..568ee39799 100644 --- a/src/mir_app/src/clcmsgs.cpp +++ b/src/mir_app/src/clcmsgs.cpp @@ -42,7 +42,7 @@ LRESULT fnProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wPar case CLM_ADDGROUP:
{
- DWORD groupFlags;
+ uint32_t groupFlags;
wchar_t *szName = Clist_GroupGetName(wParam, &groupFlags);
if (szName == nullptr)
break;
@@ -281,7 +281,7 @@ LRESULT fnProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wPar return (LRESULT)dat->fontInfo[wParam].colour;
case CLM_HITTEST:
- DWORD hitFlags;
+ uint32_t hitFlags;
{
int hit = g_clistApi.pfnHitTest(hwnd, dat, (short)LOWORD(lParam), (short)HIWORD(lParam), &contact, nullptr, &hitFlags);
if (wParam)
diff --git a/src/mir_app/src/clcutils.cpp b/src/mir_app/src/clcutils.cpp index f27670675d..b2c352fe5a 100644 --- a/src/mir_app/src/clcutils.cpp +++ b/src/mir_app/src/clcutils.cpp @@ -67,12 +67,12 @@ MIR_APP_DLL(wchar_t*) Clist_GetGroupCountsText(ClcData *dat, ClcContact *contact return szName;
}
-int fnHitTest(HWND hwnd, ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, DWORD * flags)
+int fnHitTest(HWND hwnd, ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, uint32_t * flags)
{
ClcContact *hitcontact = nullptr;
ClcGroup *hitgroup = nullptr;
int indent, i;
- DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
+ uint32_t style = GetWindowLongPtr(hwnd, GWL_STYLE);
if (flags)
*flags = 0;
@@ -199,9 +199,9 @@ void fnScrollTo(HWND hwnd, ClcData *dat, int desty, int noSmooth) int previousy = dat->yScroll;
if (!noSmooth) {
- DWORD startTick = GetTickCount();
+ uint32_t startTick = GetTickCount();
for (;;) {
- DWORD nowTick = GetTickCount();
+ uint32_t nowTick = GetTickCount();
if (nowTick >= startTick + dat->scrollTime)
break;
@@ -527,7 +527,7 @@ int GetDropTargetInformation(HWND hwnd, ClcData *dat, POINT pt) ClcContact *contact, *movecontact;
ClcGroup *group, *movegroup;
- DWORD hitFlags;
+ uint32_t hitFlags;
int hit = g_clistApi.pfnHitTest(hwnd, dat, pt.x, pt.y, &contact, &group, &hitFlags);
g_clistApi.pfnGetRowByIndex(dat, dat->iDragItem, &movecontact, &movegroup);
if (hit == dat->iDragItem)
@@ -642,10 +642,10 @@ MIR_APP_DLL(void) Clist_NotifyNewContact(HWND hwnd, MCONTACT hContact) SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM)&nm);
}
-MIR_APP_DLL(DWORD) Clist_GetDefaultExStyle(void)
+MIR_APP_DLL(uint32_t) Clist_GetDefaultExStyle(void)
{
BOOL param;
- DWORD ret = CLCDEFAULT_EXSTYLE;
+ uint32_t ret = CLCDEFAULT_EXSTYLE;
if (SystemParametersInfo(SPI_GETLISTBOXSMOOTHSCROLLING, 0, ¶m, FALSE) && !param)
ret |= CLS_EX_NOSMOOTHSCROLLING;
if (SystemParametersInfo(SPI_GETHOTTRACKING, 0, ¶m, FALSE) && !param)
diff --git a/src/mir_app/src/clistgroups.cpp b/src/mir_app/src/clistgroups.cpp index 5687c6c44e..cd4e046c0e 100644 --- a/src/mir_app/src/clistgroups.cpp +++ b/src/mir_app/src/clistgroups.cpp @@ -165,7 +165,7 @@ MIR_APP_DLL(MGROUP) Clist_GroupCreate(MGROUP hParent, LPCTSTR ptszGroupName) /////////////////////////////////////////////////////////////////////////////////////////
-MIR_APP_DLL(wchar_t*) Clist_GroupGetName(MGROUP hGroup, DWORD *pdwFlags)
+MIR_APP_DLL(wchar_t*) Clist_GroupGetName(MGROUP hGroup, uint32_t *pdwFlags)
{
CGroupInternal *p = arByIds.find(hGroup-1);
if (p == nullptr)
diff --git a/src/mir_app/src/clistopts.cpp b/src/mir_app/src/clistopts.cpp index b45f0ad207..4b3666426d 100644 --- a/src/mir_app/src/clistopts.cpp +++ b/src/mir_app/src/clistopts.cpp @@ -38,11 +38,11 @@ CMOption<bool> Clist::Tray1Click(MODULENAME, "Tray1Click", IsWinVer7Plus()); CMOption<bool> Clist::TrayAlwaysStatus(MODULENAME, "AlwaysStatus", false); CMOption<bool> Clist::FilterSearch("CLC", "FilterSearch", false); -CMOption<DWORD> Clist::OfflineModes("CLC", "OfflineModes", MODEF_OFFLINE); +CMOption<uint32_t> Clist::OfflineModes("CLC", "OfflineModes", MODEF_OFFLINE); struct { - DWORD style; + uint32_t style; wchar_t *szDescr; } static const offlineValues[] = @@ -113,7 +113,7 @@ public: bool OnApply() override { - DWORD flags = 0; + uint32_t flags = 0; TVITEMEX tvi; tvi.mask = TVIF_HANDLE | TVIF_PARAM | TVIF_STATE; diff --git a/src/mir_app/src/clisttray.cpp b/src/mir_app/src/clisttray.cpp index c1a54ced25..7a477461a7 100644 --- a/src/mir_app/src/clisttray.cpp +++ b/src/mir_app/src/clisttray.cpp @@ -366,9 +366,9 @@ int TrayIconUpdate(HICON hNewIcon, const wchar_t *szNewTip, const char *szPrefer g_clistApi.trayIcon[i].isBase = isBase;
if (db_get_b(0, "CList", "TrayIcon", SETTING_TRAYICON_DEFAULT) == SETTING_TRAYICON_MULTI) {
- DWORD time1 = db_get_w(0, "CList", "CycleTime", SETTING_CYCLETIME_DEFAULT) * 200;
- DWORD time2 = db_get_w(0, "CList", "IconFlashTime", 550) + 1000;
- DWORD time = max(max(DWORD(2000), time1), time2);
+ uint32_t time1 = db_get_w(0, "CList", "CycleTime", SETTING_CYCLETIME_DEFAULT) * 200;
+ uint32_t time2 = db_get_w(0, "CList", "IconFlashTime", 550) + 1000;
+ uint32_t time = max(max(uint32_t(2000), time1), time2);
if (RefreshTimerId)
KillTimer(nullptr, RefreshTimerId);
@@ -788,7 +788,7 @@ static int sttGetIcon(const char *szProto) return iconId;
}
-MIR_APP_DLL(int) Clist_TrayNotifyA(const char *szProto, const char *szInfoTitle, const char *szInfo, DWORD dwInfoFlags, UINT uTimeout)
+MIR_APP_DLL(int) Clist_TrayNotifyA(const char *szProto, const char *szInfoTitle, const char *szInfo, uint32_t dwInfoFlags, UINT uTimeout)
{
if (szInfo == nullptr || szInfoTitle == nullptr)
return 1;
@@ -807,7 +807,7 @@ MIR_APP_DLL(int) Clist_TrayNotifyA(const char *szProto, const char *szInfoTitle, return Shell_NotifyIconA(NIM_MODIFY, &nid) == 0;
}
-MIR_APP_DLL(int) Clist_TrayNotifyW(const char *szProto, const wchar_t *wszInfoTitle, const wchar_t *wszInfo, DWORD dwInfoFlags, UINT uTimeout)
+MIR_APP_DLL(int) Clist_TrayNotifyW(const char *szProto, const wchar_t *wszInfoTitle, const wchar_t *wszInfo, uint32_t dwInfoFlags, UINT uTimeout)
{
if (wszInfo == nullptr || wszInfoTitle == nullptr)
return 1;
diff --git a/src/mir_app/src/clui.cpp b/src/mir_app/src/clui.cpp index cbfdb00278..0335198631 100644 --- a/src/mir_app/src/clui.cpp +++ b/src/mir_app/src/clui.cpp @@ -194,7 +194,7 @@ static INT_PTR MenuItem_DeleteContact(WPARAM wParam, LPARAM lParam) char *szProto = Proto_GetBaseAccountName(wParam);
if (szProto != nullptr) {
// Check if protocol uses server side lists
- DWORD caps = CallProtoServiceInt(0, szProto, PS_GETCAPS, PFLAGNUM_1, 0);
+ uint32_t caps = CallProtoServiceInt(0, szProto, PS_GETCAPS, PFLAGNUM_1, 0);
if (caps & PF1_SERVERCLIST) {
int status = Proto_GetStatus(szProto);
if (status == ID_STATUS_OFFLINE || IsStatusConnecting(status)) {
@@ -476,7 +476,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM // Power management
case WM_POWERBROADCAST:
- switch ((DWORD)wParam) {
+ switch ((uint32_t)wParam) {
case PBT_APMSUSPEND:
// Computer is suspending, disconnect all protocols
DisconnectAll();
@@ -530,11 +530,11 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM //if docked, dont remember pos (except for width)
if (!Clist_IsDocked()) {
- db_set_dw(0, "CList", "Height", (DWORD)(rc.bottom - rc.top));
- db_set_dw(0, "CList", "x", (DWORD)rc.left);
- db_set_dw(0, "CList", "y", (DWORD)rc.top);
+ db_set_dw(0, "CList", "Height", (uint32_t)(rc.bottom - rc.top));
+ db_set_dw(0, "CList", "x", (uint32_t)rc.left);
+ db_set_dw(0, "CList", "y", (uint32_t)rc.top);
}
- db_set_dw(0, "CList", "Width", (DWORD)(rc.right - rc.left));
+ db_set_dw(0, "CList", "Width", (uint32_t)(rc.right - rc.left));
}
return FALSE;
@@ -615,7 +615,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM if (!db_get_b(0, "CLUI", "FadeInOut", 0))
break;
if (GetWindowLongPtr(hwnd, GWL_EXSTYLE) & WS_EX_LAYERED) {
- DWORD thisTick, startTick;
+ uint32_t thisTick, startTick;
int sourceAlpha, destAlpha;
if (wParam) {
sourceAlpha = 0;
@@ -827,7 +827,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM }
case NM_CLICK:
{
- DWORD hitFlags;
+ uint32_t hitFlags;
HANDLE hItem = (HANDLE)SendMessage(g_clistApi.hwndContactTree, CLM_HITTEST, (WPARAM)&hitFlags, MAKELPARAM(nmc->pt.x, nmc->pt.y));
if (hItem) {
if (hitFlags & CLCHT_ONITEMEXTRA) {
@@ -1020,11 +1020,11 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM //if docked, dont remember pos (except for width)
if (!Clist_IsDocked()) {
- db_set_dw(0, "CList", "Height", (DWORD)(rc.bottom - rc.top));
- db_set_dw(0, "CList", "x", (DWORD)rc.left);
- db_set_dw(0, "CList", "y", (DWORD)rc.top);
+ db_set_dw(0, "CList", "Height", (uint32_t)(rc.bottom - rc.top));
+ db_set_dw(0, "CList", "x", (uint32_t)rc.left);
+ db_set_dw(0, "CList", "y", (uint32_t)rc.top);
}
- db_set_dw(0, "CList", "Width", (DWORD)(rc.right - rc.left));
+ db_set_dw(0, "CList", "Width", (uint32_t)(rc.right - rc.left));
}
RemoveMenu(g_clistApi.hMenuMain, 0, MF_BYPOSITION);
diff --git a/src/mir_app/src/db_ini.cpp b/src/mir_app/src/db_ini.cpp index f7321ed37c..78a948aaa2 100644 --- a/src/mir_app/src/db_ini.cpp +++ b/src/mir_app/src/db_ini.cpp @@ -398,7 +398,7 @@ LBL_NewLine: break;
case 'd':
case 'D':
- db_set_dw(0, szSection, szName, (DWORD)strtoul(szValue + 1, nullptr, 0));
+ db_set_dw(0, szSection, szName, (uint32_t)strtoul(szValue + 1, nullptr, 0));
break;
case 'l':
case 'L':
diff --git a/src/mir_app/src/db_upgrade.cpp b/src/mir_app/src/db_upgrade.cpp index 2bd9fc764c..b6a0c2a2b1 100644 --- a/src/mir_app/src/db_upgrade.cpp +++ b/src/mir_app/src/db_upgrade.cpp @@ -47,7 +47,7 @@ MIR_APP_DLL(MDatabaseCommon*) DB::Upgrade(const wchar_t *profile) wszBackupName.Append(L".bak"); DeleteFileW(wszBackupName); if (!MoveFileW(profile, wszBackupName)) { - DWORD dwError = GetLastError(); + uint32_t dwError = GetLastError(); CMStringW wszError(FORMAT, TranslateT("Cannot move old profile '%s' to '%s': error %d"), profile, wszBackupName.c_str(), dwError); MessageBoxW(nullptr, wszError, L"Miranda NG", MB_ICONERROR | MB_OK); return nullptr; diff --git a/src/mir_app/src/db_util.cpp b/src/mir_app/src/db_util.cpp index d8b26b1e13..1f0156c8fb 100644 --- a/src/mir_app/src/db_util.cpp +++ b/src/mir_app/src/db_util.cpp @@ -81,9 +81,9 @@ MIR_APP_DLL(bool) Profile_GetSetting(const wchar_t *pwszSetting, wchar_t *pwszBu wchar_t *p = wcschr(pBuf, '/'); if (p) { *p = 0; p++; - GetPrivateProfileStringW(pBuf, p, pwszDefault, pwszBuf, (DWORD)cbLen, mirandabootini); + GetPrivateProfileStringW(pBuf, p, pwszDefault, pwszBuf, (uint32_t)cbLen, mirandabootini); } - else GetPrivateProfileStringW(pBuf, L"", pwszDefault, pwszBuf, (DWORD)cbLen, mirandabootini); + else GetPrivateProfileStringW(pBuf, L"", pwszDefault, pwszBuf, (uint32_t)cbLen, mirandabootini); return pwszBuf[0] != 0; } diff --git a/src/mir_app/src/dll_sniffer.cpp b/src/mir_app/src/dll_sniffer.cpp index 4f676d0410..9cf222d3c9 100644 --- a/src/mir_app/src/dll_sniffer.cpp +++ b/src/mir_app/src/dll_sniffer.cpp @@ -25,11 +25,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
#include "plugins.h"
-DWORD dwVersion = 0;
+uint32_t dwVersion = 0;
-static void ProcessResourcesDirectory(PIMAGE_RESOURCE_DIRECTORY pIRD, uint8_t *pBase, DWORD dwType);
+static void ProcessResourcesDirectory(PIMAGE_RESOURCE_DIRECTORY pIRD, uint8_t *pBase, uint32_t dwType);
-static void ProcessResourceEntry(PIMAGE_RESOURCE_DIRECTORY_ENTRY pIRDE, uint8_t *pBase, DWORD dwType)
+static void ProcessResourceEntry(PIMAGE_RESOURCE_DIRECTORY_ENTRY pIRDE, uint8_t *pBase, uint32_t dwType)
{
if (pIRDE->DataIsDirectory)
ProcessResourcesDirectory(PIMAGE_RESOURCE_DIRECTORY(pBase + pIRDE->OffsetToDirectory), pBase, dwType == 0 ? pIRDE->Name : dwType);
@@ -39,7 +39,7 @@ static void ProcessResourceEntry(PIMAGE_RESOURCE_DIRECTORY_ENTRY pIRDE, uint8_t }
}
-static void ProcessResourcesDirectory(PIMAGE_RESOURCE_DIRECTORY pIRD, uint8_t *pBase, DWORD dwType)
+static void ProcessResourcesDirectory(PIMAGE_RESOURCE_DIRECTORY pIRD, uint8_t *pBase, uint32_t dwType)
{
UINT i;
@@ -51,7 +51,7 @@ static void ProcessResourcesDirectory(PIMAGE_RESOURCE_DIRECTORY pIRD, uint8_t *p ProcessResourceEntry(pIRDE, pBase, dwType);
}
-__forceinline bool Contains(PIMAGE_SECTION_HEADER pISH, DWORD address, DWORD size = 0)
+__forceinline bool Contains(PIMAGE_SECTION_HEADER pISH, uint32_t address, uint32_t size = 0)
{
return (address >= pISH->VirtualAddress && address + size <= pISH->VirtualAddress + pISH->SizeOfRawData);
}
@@ -97,7 +97,7 @@ MUUID* GetPluginInterfaces(const wchar_t *ptszFileName, bool &bIsPlugin) if (pINTH->Signature != IMAGE_NT_SIGNATURE)
__leave;
- DWORD nSections = pINTH->FileHeader.NumberOfSections;
+ uint32_t nSections = pINTH->FileHeader.NumberOfSections;
if (!nSections)
__leave;
@@ -108,7 +108,7 @@ MUUID* GetPluginInterfaces(const wchar_t *ptszFileName, bool &bIsPlugin) pINTH->FileHeader.SizeOfOptionalHeader >= sizeof(IMAGE_OPTIONAL_HEADER32) &&
pINTH->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR32_MAGIC) {
pIDD = (PIMAGE_DATA_DIRECTORY)((uint8_t*)pINTH + offsetof(IMAGE_NT_HEADERS32, OptionalHeader.DataDirectory));
- base = *(DWORD*)((uint8_t*)pINTH + offsetof(IMAGE_NT_HEADERS32, OptionalHeader.ImageBase));
+ base = *(uint32_t*)((uint8_t*)pINTH + offsetof(IMAGE_NT_HEADERS32, OptionalHeader.ImageBase));
}
else if (pINTH->FileHeader.Machine == IMAGE_FILE_MACHINE_AMD64 &&
pINTH->FileHeader.SizeOfOptionalHeader >= sizeof(IMAGE_OPTIONAL_HEADER64) &&
@@ -119,13 +119,13 @@ MUUID* GetPluginInterfaces(const wchar_t *ptszFileName, bool &bIsPlugin) else __leave;
// Resource directory
- DWORD resAddr = pIDD[IMAGE_DIRECTORY_ENTRY_RESOURCE].VirtualAddress;
- DWORD resSize = pIDD[IMAGE_DIRECTORY_ENTRY_RESOURCE].Size;
+ uint32_t resAddr = pIDD[IMAGE_DIRECTORY_ENTRY_RESOURCE].VirtualAddress;
+ uint32_t resSize = pIDD[IMAGE_DIRECTORY_ENTRY_RESOURCE].Size;
if (resSize < sizeof(IMAGE_EXPORT_DIRECTORY)) __leave;
// Export information entry
- DWORD expAddr = pIDD[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress;
- DWORD expSize = pIDD[IMAGE_DIRECTORY_ENTRY_EXPORT].Size;
+ uint32_t expAddr = pIDD[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress;
+ uint32_t expSize = pIDD[IMAGE_DIRECTORY_ENTRY_EXPORT].Size;
if (expSize == 0)
nChecks++;
else if (expSize < sizeof(IMAGE_EXPORT_DIRECTORY))
@@ -133,7 +133,7 @@ MUUID* GetPluginInterfaces(const wchar_t *ptszFileName, bool &bIsPlugin) uint8_t* pImage = ptr + pIDH->e_lfanew + pINTH->FileHeader.SizeOfOptionalHeader + sizeof(IMAGE_NT_HEADERS) - sizeof(IMAGE_OPTIONAL_HEADER);
- for (DWORD idx = 0; idx < nSections; idx++) {
+ for (uint32_t idx = 0; idx < nSections; idx++) {
PIMAGE_SECTION_HEADER pISH = (PIMAGE_SECTION_HEADER)(pImage + idx * sizeof(IMAGE_SECTION_HEADER));
if (((uint8_t*)pISH + sizeof(IMAGE_SECTION_HEADER) > pImage + filesize) || (pISH->PointerToRawData + pISH->SizeOfRawData > filesize))
__leave;
@@ -142,9 +142,9 @@ MUUID* GetPluginInterfaces(const wchar_t *ptszFileName, bool &bIsPlugin) if (expSize >= sizeof(IMAGE_EXPORT_DIRECTORY) && Contains(pISH, expAddr, expSize)) {
uint8_t *pSecStart = ptr + pISH->PointerToRawData - pISH->VirtualAddress;
IMAGE_EXPORT_DIRECTORY *pED = (PIMAGE_EXPORT_DIRECTORY)&pSecStart[expAddr];
- DWORD *ptrRVA = (DWORD*)&pSecStart[pED->AddressOfNames];
+ uint32_t *ptrRVA = (uint32_t*)&pSecStart[pED->AddressOfNames];
uint16_t *ptrOrdRVA = (uint16_t*)&pSecStart[pED->AddressOfNameOrdinals];
- DWORD *ptrFuncList = (DWORD*)&pSecStart[pED->AddressOfFunctions];
+ uint32_t *ptrFuncList = (uint32_t*)&pSecStart[pED->AddressOfFunctions];
MUUID *pIds = nullptr;
bool bHasMuuids = false;
diff --git a/src/mir_app/src/ei_options.cpp b/src/mir_app/src/ei_options.cpp index dc8a9681f2..ab8fdd322c 100644 --- a/src/mir_app/src/ei_options.cpp +++ b/src/mir_app/src/ei_options.cpp @@ -223,7 +223,7 @@ class CExtraIconOptsDlg : public CDlgBase HMENU submenu = GetSubMenu(menu, popup); TranslateMenu(submenu); - DWORD pos = GetMessagePos(); + uint32_t pos = GetMessagePos(); int ret = TrackPopupMenu(submenu, TPM_TOPALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD | TPM_LEFTALIGN, LOWORD(pos), HIWORD(pos), 0, m_hwnd, nullptr); DestroyMenu(menu); diff --git a/src/mir_app/src/extracticon.cpp b/src/mir_app/src/extracticon.cpp index b20e4ad1e8..df03a85aa2 100644 --- a/src/mir_app/src/extracticon.cpp +++ b/src/mir_app/src/extracticon.cpp @@ -49,14 +49,14 @@ typedef struct #define VER30 0x00030000
-void* _RelativeVirtualAddresstoPtr(IMAGE_DOS_HEADER *pDosHeader, DWORD rva)
+void* _RelativeVirtualAddresstoPtr(IMAGE_DOS_HEADER *pDosHeader, uint32_t rva)
{
IMAGE_NT_HEADERS *pPE = (IMAGE_NT_HEADERS*)((uint8_t*)pDosHeader + pDosHeader->e_lfanew);
IMAGE_SECTION_HEADER *pSection = IMAGE_FIRST_SECTION(pPE);
for (int i = 0; i < pPE->FileHeader.NumberOfSections; i++) {
IMAGE_SECTION_HEADER* cSection = &pSection[i];
- DWORD size = cSection->Misc.VirtualSize ? cSection->Misc.VirtualSize : cSection->SizeOfRawData;
+ uint32_t size = cSection->Misc.VirtualSize ? cSection->Misc.VirtualSize : cSection->SizeOfRawData;
if (rva >= cSection->VirtualAddress && rva < cSection->VirtualAddress + size)
return (LPBYTE)pDosHeader + cSection->PointerToRawData + (rva - cSection->VirtualAddress);
@@ -89,7 +89,7 @@ void* _GetResourceTable(IMAGE_DOS_HEADER* pDosHeader) return nullptr;
}
-IMAGE_RESOURCE_DIRECTORY_ENTRY* _FindResourceBase(void *prt, DWORD resType, int *pCount)
+IMAGE_RESOURCE_DIRECTORY_ENTRY* _FindResourceBase(void *prt, uint32_t resType, int *pCount)
{
IMAGE_RESOURCE_DIRECTORY *pDir = (IMAGE_RESOURCE_DIRECTORY*)prt;
int i;
@@ -112,21 +112,21 @@ IMAGE_RESOURCE_DIRECTORY_ENTRY* _FindResourceBase(void *prt, DWORD resType, int return (IMAGE_RESOURCE_DIRECTORY_ENTRY*)(pDir + 1);
}
-int _FindResourceCount(void *prt, DWORD resType)
+int _FindResourceCount(void *prt, uint32_t resType)
{
int count;
_FindResourceBase(prt, resType, &count);
return count;
}
-void* _FindResource(IMAGE_DOS_HEADER *pDosHeader, void *prt, int resIndex, DWORD resType, DWORD *pcbSize)
+void* _FindResource(IMAGE_DOS_HEADER *pDosHeader, void *prt, int resIndex, uint32_t resType, uint32_t *pcbSize)
{
int count, index = 0;
IMAGE_RESOURCE_DIRECTORY_ENTRY *pRes = _FindResourceBase(prt, resType, &count);
if (resIndex < 0) {
for (index = 0; index < count; index++)
- if (pRes[index].Name == (DWORD)(-resIndex))
+ if (pRes[index].Name == (uint32_t)(-resIndex))
break;
}
else index = resIndex;
@@ -152,7 +152,7 @@ void* _FindResource(IMAGE_DOS_HEADER *pDosHeader, void *prt, int resIndex, DWORD UINT _ExtractFromExe(HANDLE hFile, int iconIndex, int cxIconSize, int cyIconSize, HICON *phicon, UINT flags)
{
int retval = 0;
- DWORD fileLen = GetFileSize(hFile, nullptr);
+ uint32_t fileLen = GetFileSize(hFile, nullptr);
HANDLE pFile = nullptr, hFileMap = CreateFileMapping(hFile, nullptr, PAGE_READONLY, 0, 0, nullptr);
if (hFileMap == nullptr)
@@ -165,7 +165,7 @@ UINT _ExtractFromExe(HANDLE hFile, int iconIndex, int cxIconSize, int cyIconSize IMAGE_DOS_HEADER *pDosHeader = (IMAGE_DOS_HEADER*)(void*)pFile;
if (pDosHeader->e_magic != IMAGE_DOS_SIGNATURE) goto cleanup;
if (pDosHeader->e_lfanew <= 0) goto cleanup;
- if ((DWORD)(pDosHeader->e_lfanew) >= fileLen) goto cleanup;
+ if ((uint32_t)(pDosHeader->e_lfanew) >= fileLen) goto cleanup;
void *pRes = _GetResourceTable(pDosHeader);
if (!pRes) goto cleanup;
@@ -174,7 +174,7 @@ UINT _ExtractFromExe(HANDLE hFile, int iconIndex, int cxIconSize, int cyIconSize goto cleanup;
}
- DWORD cbSize = 0;
+ uint32_t cbSize = 0;
NEWHEADER *pIconDir = (NEWHEADER*)_FindResource(pDosHeader, pRes, iconIndex, (ULONG_PTR)RT_GROUP_ICON, &cbSize);
if (!pIconDir) goto cleanup;
if (pIconDir->Reserved || pIconDir->ResType != RES_ICON) goto cleanup;
diff --git a/src/mir_app/src/filter.h b/src/mir_app/src/filter.h index 9aafab0b7f..78c97f203d 100644 --- a/src/mir_app/src/filter.h +++ b/src/mir_app/src/filter.h @@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern HANDLE hOptionsInitialize;
-typedef DWORD PageHash;
+typedef uint32_t PageHash;
void AddFilterString(const PageHash key, const wchar_t *data);
BOOL ContainsFilterString(const PageHash key, wchar_t *data);
diff --git a/src/mir_app/src/findadd.cpp b/src/mir_app/src/findadd.cpp index f031684b75..8f3f3bc734 100644 --- a/src/mir_app/src/findadd.cpp +++ b/src/mir_app/src/findadd.cpp @@ -299,7 +299,7 @@ static void SetListItemText(HWND hwndList, int idx, int col, wchar_t *szText) ListView_SetItemText(hwndList, idx, col, szText); } -static wchar_t* sttDecodeString(DWORD dwFlags, MAllStrings &src) +static wchar_t* sttDecodeString(uint32_t dwFlags, MAllStrings &src) { if (dwFlags & PSR_UNICODE) return mir_wstrdup(src.w); @@ -373,7 +373,7 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (!pa->IsEnabled()) continue; - DWORD caps = (DWORD)CallProtoServiceInt(0, pa->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0); + uint32_t caps = (uint32_t)CallProtoServiceInt(0, pa->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0); if (caps & PF1_ANYSEARCH) netProtoCount++; } @@ -400,7 +400,7 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (!pa->IsEnabled()) continue; - DWORD caps = (DWORD)CallProtoServiceInt(0, pa->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0); + uint32_t caps = (uint32_t)CallProtoServiceInt(0, pa->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0); if (!(caps & PF1_ANYSEARCH)) continue; @@ -474,14 +474,14 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (szProto == nullptr) { for (auto &pa : g_arAccounts) { if (pa->IsEnabled()) { - DWORD protoCaps = (DWORD)CallProtoServiceInt(0, pa->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0); + uint32_t protoCaps = (uint32_t)CallProtoServiceInt(0, pa->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0); if (protoCaps & PF1_SEARCHBYEMAIL) dat->showEmail = 1; if (protoCaps & PF1_SEARCHBYNAME) dat->showName = 1; } } } else { - DWORD protoCaps = (DWORD)CallProtoServiceInt(0, szProto, PS_GETCAPS, PFLAGNUM_1, 0); + uint32_t protoCaps = (uint32_t)CallProtoServiceInt(0, szProto, PS_GETCAPS, PFLAGNUM_1, 0); if (protoCaps & PF1_BASICSEARCH) dat->showProtoId = 1; if (protoCaps & PF1_SEARCHBYEMAIL) dat->showEmail = 1; if (protoCaps & PF1_SEARCHBYNAME) dat->showName = 1; diff --git a/src/mir_app/src/findadd.h b/src/mir_app/src/findadd.h index 03218e4682..13441ade13 100644 --- a/src/mir_app/src/findadd.h +++ b/src/mir_app/src/findadd.h @@ -58,7 +58,7 @@ struct FindAddDlgData int CALLBACK SearchResultsCompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
void FreeSearchResults(HWND hwndResults);
-int BeginSearch(HWND hwndDlg, struct FindAddDlgData *dat, const char *szProto, const char *szSearchService, DWORD requiredCapability, void *pvSearchParams);
+int BeginSearch(HWND hwndDlg, struct FindAddDlgData *dat, const char *szProto, const char *szSearchService, uint32_t requiredCapability, void *pvSearchParams);
void SetStatusBarSearchInfo(HWND hwndStatus, struct FindAddDlgData *dat);
void SetStatusBarResultInfo(HWND hwndDlg);
void CreateResultsColumns(HWND hwndResults, struct FindAddDlgData *dat, char *szProto);
diff --git a/src/mir_app/src/genmenu.h b/src/mir_app/src/genmenu.h index 37ee580d52..58ad6a5649 100644 --- a/src/mir_app/src/genmenu.h +++ b/src/mir_app/src/genmenu.h @@ -44,7 +44,7 @@ struct TMO_LinkedList struct TMO_IntMenuItem
{
- DWORD signature;
+ uint32_t signature;
int iCommand;
int iconId; // icon index in the section's image list
TMO_MenuItem mi; // user-defined data
@@ -55,7 +55,7 @@ struct TMO_IntMenuItem int originalPosition; // !!!!!!!!!!!!!!!!!!!!!!!!
bool customVisible;
- DWORD hotKey;
+ uint32_t hotKey;
WPARAM execParam;
void* pUserData;
diff --git a/src/mir_app/src/headerbar.cpp b/src/mir_app/src/headerbar.cpp index 2397ffa008..99a76b811c 100644 --- a/src/mir_app/src/headerbar.cpp +++ b/src/mir_app/src/headerbar.cpp @@ -25,10 +25,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
-typedef HRESULT(STDAPICALLTYPE* pfnDrawThemeTextEx)(HTHEME, HDC, int, int, LPCWSTR, int, DWORD, LPRECT, const struct _DTTOPTS*);
+typedef HRESULT(STDAPICALLTYPE* pfnDrawThemeTextEx)(HTHEME, HDC, int, int, LPCWSTR, int, uint32_t, LPRECT, const struct _DTTOPTS*);
static pfnDrawThemeTextEx drawThemeTextEx;
-typedef HRESULT(STDAPICALLTYPE* pfnSetWindowThemeAttribute)(HWND, enum WINDOWTHEMEATTRIBUTETYPE, PVOID, DWORD);
+typedef HRESULT(STDAPICALLTYPE* pfnSetWindowThemeAttribute)(HWND, enum WINDOWTHEMEATTRIBUTETYPE, PVOID, uint32_t);
static pfnSetWindowThemeAttribute setWindowThemeAttribute;
typedef HRESULT(STDAPICALLTYPE* pfnDwmExtendFrameIntoClientArea)(HWND hwnd, const MARGINS* margins);
diff --git a/src/mir_app/src/help.cpp b/src/mir_app/src/help.cpp index 0a9d0de069..8fbf5bd368 100644 --- a/src/mir_app/src/help.cpp +++ b/src/mir_app/src/help.cpp @@ -62,7 +62,7 @@ public: ctrlHeaderBar.SetText(CMStringW(FORMAT, L"Miranda NG\nv%S", productVersion)); HRSRC hResInfo = FindResource(g_plugin.getInst(), MAKEINTRESOURCE(IDR_CREDITS), L"TEXT"); - DWORD ResSize = SizeofResource(g_plugin.getInst(), hResInfo); + uint32_t ResSize = SizeofResource(g_plugin.getInst(), hResInfo); HGLOBAL hRes = LoadResource(g_plugin.getInst(), hResInfo); char *pszMsg = (char*)LockResource(hRes); if (pszMsg) { diff --git a/src/mir_app/src/hotkey_opts.cpp b/src/mir_app/src/hotkey_opts.cpp index 60e2f57c97..97db9bcd1e 100644 --- a/src/mir_app/src/hotkey_opts.cpp +++ b/src/mir_app/src/hotkey_opts.cpp @@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. static wchar_t* sttHokeyVkToName(uint16_t vkKey) { static wchar_t buf[256] = { 0 }; - DWORD code = MapVirtualKey(vkKey, 0) << 16; + uint32_t code = MapVirtualKey(vkKey, 0) << 16; switch (vkKey) { case 0: diff --git a/src/mir_app/src/hotkeys.cpp b/src/mir_app/src/hotkeys.cpp index 5011732232..12dabde831 100644 --- a/src/mir_app/src/hotkeys.cpp +++ b/src/mir_app/src/hotkeys.cpp @@ -41,7 +41,7 @@ static int sttCompareHotkeys(const THotkeyItem *p1, const THotkeyItem *p2) }
LIST<THotkeyItem> hotkeys(10, sttCompareHotkeys);
-DWORD g_pid = 0, g_hkid = 1;
+uint32_t g_pid = 0, g_hkid = 1;
HWND g_hwndHotkeyHost = nullptr, g_hwndHkOptions = nullptr;
HANDLE hEvChanged = nullptr;
diff --git a/src/mir_app/src/icolib.cpp b/src/mir_app/src/icolib.cpp index 3030dd6d1b..8d24d0fe1a 100644 --- a/src/mir_app/src/icolib.cpp +++ b/src/mir_app/src/icolib.cpp @@ -144,7 +144,7 @@ static int InitializeBitmapInfoHeader(HBITMAP bitmap, BITMAPINFOHEADER *bi) if (bytes == 0) // Failure
return 1;
- if ((bytes >= (sizeof(DS.dsBm) + sizeof(DS.dsBmih))) && (DS.dsBmih.biSize >= DWORD(sizeof(DS.dsBmih))))
+ if ((bytes >= (sizeof(DS.dsBm) + sizeof(DS.dsBmih))) && (DS.dsBmih.biSize >= uint32_t(sizeof(DS.dsBmih))))
*bi = DS.dsBmih;
else {
memset(bi, 0, sizeof(BITMAPINFOHEADER));
diff --git a/src/mir_app/src/ignore.cpp b/src/mir_app/src/ignore.cpp index 3ce17a4754..d7e06fb4f7 100644 --- a/src/mir_app/src/ignore.cpp +++ b/src/mir_app/src/ignore.cpp @@ -28,13 +28,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. static int masks[IGNOREEVENT_MAX] = { 0x0001, 0x0004, 0x0008, 0x0010, 0x0040 };
-static DWORD ignoreIdToPf1[IGNOREEVENT_MAX] = { PF1_IMRECV, PF1_FILERECV, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF };
-static DWORD ignoreIdToPf4[IGNOREEVENT_MAX] = { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, PF4_SUPPORTTYPING };
+static uint32_t ignoreIdToPf1[IGNOREEVENT_MAX] = { PF1_IMRECV, PF1_FILERECV, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF };
+static uint32_t ignoreIdToPf4[IGNOREEVENT_MAX] = { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, PF4_SUPPORTTYPING };
-static DWORD GetMask(MCONTACT hContact)
+static uint32_t GetMask(MCONTACT hContact)
{
- DWORD mask = db_get_dw(hContact, "Ignore", "Mask1", (DWORD)-1);
- if (mask == (DWORD)-1) {
+ uint32_t mask = db_get_dw(hContact, "Ignore", "Mask1", (uint32_t)-1);
+ if (mask == (uint32_t)-1) {
if (hContact == 0)
mask = 0;
else {
@@ -148,9 +148,9 @@ static void SetIconsForColumn(HWND hwndList, HANDLE hItem, HANDLE hItemAll, int }
}
-static void InitialiseItem(HWND hwndList, MCONTACT hContact, HANDLE hItem, DWORD proto1Caps, DWORD proto4Caps)
+static void InitialiseItem(HWND hwndList, MCONTACT hContact, HANDLE hItem, uint32_t proto1Caps, uint32_t proto4Caps)
{
- DWORD mask = GetMask(hContact);
+ uint32_t mask = GetMask(hContact);
for (int i = 0; i < IGNOREEVENT_MAX; i++)
if ((ignoreIdToPf1[i] == 0xFFFFFFFF && ignoreIdToPf4[i] == 0xFFFFFFFF) || (proto1Caps & ignoreIdToPf1[i] || proto4Caps & ignoreIdToPf4[i]))
SendMessage(hwndList, CLM_SETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(i, (mask & masks[i]) ? i + 3 : 0));
@@ -159,7 +159,7 @@ static void InitialiseItem(HWND hwndList, MCONTACT hContact, HANDLE hItem, DWORD SendMessage(hwndList, CLM_SETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(IGNOREEVENT_MAX + 1, 2));
}
-static void SaveItemValue(MCONTACT hContact, const char *pszSetting, DWORD dwValue)
+static void SaveItemValue(MCONTACT hContact, const char *pszSetting, uint32_t dwValue)
{
db_set_dw(hContact, "Ignore", pszSetting, dwValue);
@@ -170,7 +170,7 @@ static void SaveItemValue(MCONTACT hContact, const char *pszSetting, DWORD dwVal static void SaveItemMask(HWND hwndList, MCONTACT hContact, HANDLE hItem, const char *pszSetting)
{
- DWORD mask = 0;
+ uint32_t mask = 0;
for (int i = 0; i < IGNOREEVENT_MAX; i++) {
int iImage = SendMessage(hwndList, CLM_GETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(i, 0));
if (iImage && iImage != EMPTY_EXTRA_ICON)
@@ -184,7 +184,7 @@ static void SetAllContactIcons(HWND hwndList) for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0);
if (hItem && SendMessage(hwndList, CLM_GETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(IGNOREEVENT_MAX, 0)) == EMPTY_EXTRA_ICON) {
- DWORD proto1Caps, proto4Caps;
+ uint32_t proto1Caps, proto4Caps;
char *szProto = Proto_GetBaseAccountName(hContact);
if (szProto) {
proto1Caps = CallProtoServiceInt(0, szProto, PS_GETCAPS, PFLAGNUM_1, 0);
@@ -273,7 +273,7 @@ static INT_PTR CALLBACK DlgProcIgnoreOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM if (nm->iColumn == -1)
break;
- DWORD hitFlags;
+ uint32_t hitFlags;
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_HITTEST, (WPARAM)&hitFlags, MAKELPARAM(nm->pt.x, nm->pt.y));
if (hItem == nullptr || !(hitFlags & CLCHT_ONITEMEXTRA))
break;
@@ -344,7 +344,7 @@ static int IgnoreOptInitialise(WPARAM wParam, LPARAM) MIR_APP_DLL(bool) Ignore_IsIgnored(MCONTACT hContact, int idx)
{
- DWORD mask = GetMask(hContact);
+ uint32_t mask = GetMask(hContact);
if (idx < 1 || idx > IGNOREEVENT_MAX)
return 1;
return (masks[idx-1] & mask) != 0;
@@ -352,7 +352,7 @@ MIR_APP_DLL(bool) Ignore_IsIgnored(MCONTACT hContact, int idx) MIR_APP_DLL(int) Ignore_Ignore(MCONTACT hContact, int idx)
{
- DWORD mask = GetMask(hContact);
+ uint32_t mask = GetMask(hContact);
if ((idx < 1 || idx > IGNOREEVENT_MAX) && idx != IGNOREEVENT_ALL)
return 1;
@@ -366,7 +366,7 @@ MIR_APP_DLL(int) Ignore_Ignore(MCONTACT hContact, int idx) MIR_APP_DLL(int) Ignore_Allow(MCONTACT hContact, int idx)
{
- DWORD mask = GetMask(hContact);
+ uint32_t mask = GetMask(hContact);
if ((idx < 1 || idx > IGNOREEVENT_MAX) && idx != IGNOREEVENT_ALL)
return 1;
diff --git a/src/mir_app/src/image_utils.cpp b/src/mir_app/src/image_utils.cpp index 6a892f90bd..e23e7215fe 100644 --- a/src/mir_app/src/image_utils.cpp +++ b/src/mir_app/src/image_utils.cpp @@ -166,7 +166,7 @@ MIR_APP_DLL(HBITMAP) Image_LoadFromMem(const void *pBuf, size_t cbLen, FREE_IMAG if (cbLen == 0 || pBuf == nullptr) return 0; - FIMEMORY *hmem = FreeImage_OpenMemory((uint8_t *)pBuf, (DWORD)cbLen); + FIMEMORY *hmem = FreeImage_OpenMemory((uint8_t *)pBuf, (uint32_t)cbLen); if (fif == FIF_UNKNOWN) fif = FreeImage_GetFileTypeFromMemory(hmem, 0); diff --git a/src/mir_app/src/lpopts.cpp b/src/mir_app/src/lpopts.cpp index a397dad825..441d253f35 100644 --- a/src/mir_app/src/lpopts.cpp +++ b/src/mir_app/src/lpopts.cpp @@ -124,7 +124,7 @@ void CLangpackDlg::LoadLangpacks() pack.Locale = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT);
mir_wstrcpy(pack.tszLanguage, L"English");
pack.szAuthors = "Miranda NG team";
- DWORD v = Miranda_GetVersion();
+ uint32_t v = Miranda_GetVersion();
pack.szLastModifiedUsing.Format("%d.%d.%d", ((v >> 24) & 0xFF), ((v >> 16) & 0xFF), ((v >> 8) & 0xFF));
if (GetModuleFileName(nullptr, pack.tszFullPath, _countof(pack.tszFullPath))) {
diff --git a/src/mir_app/src/menu_clist.cpp b/src/mir_app/src/menu_clist.cpp index e357d3df88..02882365f4 100644 --- a/src/mir_app/src/menu_clist.cpp +++ b/src/mir_app/src/menu_clist.cpp @@ -702,7 +702,7 @@ void RebuildMenuOrder(void) if (!pa->IsVisible())
continue;
- DWORD flags = pa->ppro->GetCaps(PFLAGNUM_2, 0) & ~pa->ppro->GetCaps(PFLAGNUM_5, 0);
+ uint32_t flags = pa->ppro->GetCaps(PFLAGNUM_2, 0) & ~pa->ppro->GetCaps(PFLAGNUM_5, 0);
HICON ic;
wchar_t tbuf[256];
int pos = 0;
@@ -800,7 +800,7 @@ void RebuildMenuOrder(void) if (!pa->IsVisible())
continue;
- DWORD flags = pa->ppro->GetCaps(PFLAGNUM_2, 0) & ~pa->ppro->GetCaps(PFLAGNUM_5, 0);
+ uint32_t flags = pa->ppro->GetCaps(PFLAGNUM_2, 0) & ~pa->ppro->GetCaps(PFLAGNUM_5, 0);
if (!(flags & it.Pf2flag))
continue;
diff --git a/src/mir_app/src/menu_groups.cpp b/src/mir_app/src/menu_groups.cpp index 781e24d3da..1ced298ae7 100644 --- a/src/mir_app/src/menu_groups.cpp +++ b/src/mir_app/src/menu_groups.cpp @@ -147,7 +147,7 @@ static int OnBuildGroupMenu(WPARAM, LPARAM) bChecked = SendMessage(g_clistApi.hwndContactTree, CLM_GETHIDEOFFLINEROOT, 0, 0) != 0;
Menu_SetChecked(hHideOfflineUsersOutHereMenuItem, bChecked);
- DWORD dwStyle = GetWindowLongPtr(g_clistApi.hwndContactTree, GWL_STYLE);
+ uint32_t dwStyle = GetWindowLongPtr(g_clistApi.hwndContactTree, GWL_STYLE);
Menu_SetChecked(hHideEmptyGroupsMenuItem, (dwStyle & CLS_HIDEEMPTYGROUPS) != 0);
Menu_SetChecked(hDisableGroupsMenuItem, (dwStyle & CLS_USEGROUPS) == 0);
return 0;
diff --git a/src/mir_app/src/menu_utils.cpp b/src/mir_app/src/menu_utils.cpp index 53b9c3e56e..f13afa02da 100644 --- a/src/mir_app/src/menu_utils.cpp +++ b/src/mir_app/src/menu_utils.cpp @@ -489,7 +489,7 @@ MIR_APP_DLL(int) Menu_ConfigureItem(HGENMENU hItem, int iOption, INT_PTR value) return 0;
case MCI_OPT_HOTKEY:
- pimi->hotKey = (DWORD)value;
+ pimi->hotKey = (uint32_t)value;
return 0;
case MCI_OPT_EXECPARAM:
@@ -783,7 +783,7 @@ static int WhereToPlace(HMENU hMenu, TMO_MenuItem *mi) /////////////////////////////////////////////////////////////////////////////////////////
-static DWORD GetMenuItemType(HMENU hMenu, int uItem)
+static uint32_t GetMenuItemType(HMENU hMenu, int uItem)
{
MENUITEMINFO mii = { 0 };
mii.cbSize = sizeof(mii);
diff --git a/src/mir_app/src/meta_edit.cpp b/src/mir_app/src/meta_edit.cpp index d39c66d6a5..9560306f1a 100644 --- a/src/mir_app/src/meta_edit.cpp +++ b/src/mir_app/src/meta_edit.cpp @@ -31,8 +31,8 @@ struct DBCachedContact *cc;
MCONTACT hDefaultContact; // HANDLE of the new default contact
MCONTACT hOfflineContact;
- int num_deleted, // DWORD number of deleted contacts
- num_contacts; // DWORD number of contacts
+ int num_deleted, // uint32_t number of deleted contacts
+ num_contacts; // uint32_t number of contacts
MCONTACT hDeletedContacts[MAX_CONTACTS]; // HANDLEs of the subcontacts to be removed from this metacontact
MCONTACT hContact[MAX_CONTACTS]; // HANDLEs of the subcontacts, in the order they should be in
}
diff --git a/src/mir_app/src/meta_options.cpp b/src/mir_app/src/meta_options.cpp index d11562c131..5030ddd9ab 100644 --- a/src/mir_app/src/meta_options.cpp +++ b/src/mir_app/src/meta_options.cpp @@ -32,7 +32,7 @@ int Meta_WriteOptions() db_set_w(0, META_PROTO, "MenuContactLabel", (uint16_t)g_metaOptions.menu_contact_label);
db_set_w(0, META_PROTO, "MenuContactFunction", (uint16_t)g_metaOptions.menu_function);
db_set_w(0, META_PROTO, "CListContactName", (uint16_t)g_metaOptions.clist_contact_name);
- db_set_dw(0, META_PROTO, "SetStatusFromOfflineDelay", (DWORD)(g_metaOptions.set_status_from_offline_delay));
+ db_set_dw(0, META_PROTO, "SetStatusFromOfflineDelay", (uint32_t)(g_metaOptions.set_status_from_offline_delay));
return 0;
}
diff --git a/src/mir_app/src/meta_utils.cpp b/src/mir_app/src/meta_utils.cpp index f26a0a9e21..566cdae654 100644 --- a/src/mir_app/src/meta_utils.cpp +++ b/src/mir_app/src/meta_utils.cpp @@ -232,7 +232,7 @@ MCONTACT Meta_GetMostOnlineSupporting(DBCachedContact *cc, int pflagnum, unsigne MCONTACT most_online_contact = Meta_GetContactHandle(cc, cc->nDefault);
char *szProto = Proto_GetBaseAccountName(most_online_contact);
if (szProto && Proto_GetStatus(szProto) >= ID_STATUS_ONLINE) {
- DWORD caps = CallProtoService(szProto, PS_GETCAPS, pflagnum, 0);
+ uint32_t caps = CallProtoService(szProto, PS_GETCAPS, pflagnum, 0);
if (capability == -1 || (caps & capability) == capability) {
most_online_status = db_get_w(most_online_contact, szProto, "Status", ID_STATUS_OFFLINE);
@@ -256,7 +256,7 @@ MCONTACT Meta_GetMostOnlineSupporting(DBCachedContact *cc, int pflagnum, unsigne if (szProto == nullptr || Proto_GetStatus(szProto) < ID_STATUS_ONLINE) // szProto offline or connecting
continue;
- DWORD caps = CallProtoService(szProto, PS_GETCAPS, pflagnum, 0);
+ uint32_t caps = CallProtoService(szProto, PS_GETCAPS, pflagnum, 0);
if (capability == -1 || (caps & capability) == capability) {
int status = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
if (status == ID_STATUS_ONLINE) {
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index 46b27c22b8..484658e218 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -39,7 +39,7 @@ Button_SetSkin_IcoLib @24 ?AuthRequest@PROTO_INTERFACE@@UAEHIPB_W@Z @38 NONAME
?Authorize@PROTO_INTERFACE@@UAEHI@Z @39 NONAME
?CreateExtendedSearchUI@PROTO_INTERFACE@@UAEPAUHWND__@@PAU2@@Z @40 NONAME
-?CreateLink@CProtoIntDlgBase@@QAEXAAVCCtrlData@@PBDEK@Z @41 NONAME
+?CreateLink@CProtoIntDlgBase@@QAEXAAVCCtrlData@@PBDEI@Z @41 NONAME
?CreateLink@CProtoIntDlgBase@@QAEXAAVCCtrlData@@PBDPA_W@Z @42 NONAME
?DlgProc@CProtoIntDlgBase@@MAEHIIJ@Z @43 NONAME
?FileAllow@PROTO_INTERFACE@@UAEPAXIPAXPB_W@Z @44 NONAME
@@ -81,8 +81,8 @@ Button_SetSkin_IcoLib @24 ?getBool@PROTO_INTERFACE@@QAE_NPBD_N@Z @84 NONAME
?getByte@PROTO_INTERFACE@@QAEHIPBDE@Z @85 NONAME
?getByte@PROTO_INTERFACE@@QAEHPBDE@Z @86 NONAME
-?getDword@PROTO_INTERFACE@@QAEKIPBDK@Z @87 NONAME
-?getDword@PROTO_INTERFACE@@QAEKPBDK@Z @88 NONAME
+?getDword@PROTO_INTERFACE@@QAEIIPBDI@Z @87 NONAME
+?getDword@PROTO_INTERFACE@@QAEIPBDI@Z @88 NONAME
?getString@PROTO_INTERFACE@@QAEHIPBDPAUDBVARIANT@@@Z @89 NONAME
?getString@PROTO_INTERFACE@@QAEHPBDPAUDBVARIANT@@@Z @90 NONAME
?getStringA@PROTO_INTERFACE@@QAEPADIPBD0@Z @91 NONAME
@@ -96,8 +96,8 @@ Button_SetSkin_IcoLib @24 ?isChatRoom@PROTO_INTERFACE@@QAE_NI@Z @99 NONAME
?setByte@PROTO_INTERFACE@@QAEXIPBDE@Z @100 NONAME
?setByte@PROTO_INTERFACE@@QAEXPBDE@Z @101 NONAME
-?setDword@PROTO_INTERFACE@@QAEXIPBDK@Z @102 NONAME
-?setDword@PROTO_INTERFACE@@QAEXPBDK@Z @103 NONAME
+?setDword@PROTO_INTERFACE@@QAEXIPBDI@Z @102 NONAME
+?setDword@PROTO_INTERFACE@@QAEXPBDI@Z @103 NONAME
?setString@PROTO_INTERFACE@@QAEXIPBD0@Z @104 NONAME
?setString@PROTO_INTERFACE@@QAEXPBD0@Z @105 NONAME
?setWString@PROTO_INTERFACE@@QAEXIPBDPB_W@Z @106 NONAME
@@ -324,13 +324,13 @@ Netlib_NtlmCreateResponse @383 ?get_lastName@AUTH_BLOB@DB@@QBEPBDXZ @393 NONAME
?get_nick@AUTH_BLOB@DB@@QBEPBDXZ @394 NONAME
?get_reason@AUTH_BLOB@DB@@QBEPBDXZ @395 NONAME
-?get_uin@AUTH_BLOB@DB@@QBEKXZ @396 NONAME
+?get_uin@AUTH_BLOB@DB@@QBEIXZ @396 NONAME
?makeBlob@AUTH_BLOB@DB@@AAEPAEXZ @397 NONAME
-?size@AUTH_BLOB@DB@@QBEKXZ @398 NONAME
+?size@AUTH_BLOB@DB@@QBEIXZ @398 NONAME
Chat_UnescapeTags @399 NONAME
ProtoGetAvatarFormatByMimeType @400
ProtoGetAvatarMimeType @401
-?set_uin@AUTH_BLOB@DB@@QAEXK@Z @402 NONAME
+?set_uin@AUTH_BLOB@DB@@QAEXI@Z @402 NONAME
??0CSrmmBaseDialog@@IAE@AAVCMPluginBase@@HPAUSESSION_INFO@@@Z @403 NONAME
Miranda_GetSystemWindow @404 NONAME
??1CSrmmBaseDialog@@UAE@XZ @405 NONAME
@@ -437,8 +437,8 @@ Proto_GetAverageStatus @512 ?getBool@CMPluginBase@@QAE_NPBD_N@Z @521 NONAME
?getByte@CMPluginBase@@QAEHIPBDH@Z @522 NONAME
?getByte@CMPluginBase@@QAEHPBDH@Z @523 NONAME
-?getDword@CMPluginBase@@QAEKIPBDH@Z @524 NONAME
-?getDword@CMPluginBase@@QAEKPBDH@Z @525 NONAME
+?getDword@CMPluginBase@@QAEIIPBDH@Z @524 NONAME
+?getDword@CMPluginBase@@QAEIPBDH@Z @525 NONAME
?getString@CMPluginBase@@QAEHIPBDPAUDBVARIANT@@@Z @526 NONAME
?getString@CMPluginBase@@QAEHPBDPAUDBVARIANT@@@Z @527 NONAME
?getStringA@CMPluginBase@@QAEPADIPBD0@Z @528 NONAME
@@ -451,8 +451,8 @@ Proto_GetAverageStatus @512 ?getWord@CMPluginBase@@QAEHPBDH@Z @535 NONAME
?setByte@CMPluginBase@@QAEXIPBDE@Z @536 NONAME
?setByte@CMPluginBase@@QAEXPBDE@Z @537 NONAME
-?setDword@CMPluginBase@@QAEXIPBDK@Z @538 NONAME
-?setDword@CMPluginBase@@QAEXPBDK@Z @539 NONAME
+?setDword@CMPluginBase@@QAEXIPBDI@Z @538 NONAME
+?setDword@CMPluginBase@@QAEXPBDI@Z @539 NONAME
?setString@CMPluginBase@@QAEXIPBD0@Z @540 NONAME
?setString@CMPluginBase@@QAEXPBD0@Z @541 NONAME
?setWString@CMPluginBase@@QAEXIPBDPB_W@Z @542 NONAME
@@ -729,7 +729,7 @@ ProtoBroadcastAsync @814 NONAME ?HideEmptyGroups@Clist@@3V?$CMOption@_N@@A @817 NONAME
?HideOffline@Clist@@3V?$CMOption@_N@@A @818 NONAME
?UseGroups@Clist@@3V?$CMOption@_N@@A @819 NONAME
-?OfflineModes@Clist@@3V?$CMOption@K@@A @820 NONAME
+?OfflineModes@Clist@@3V?$CMOption@I@@A @820 NONAME
?getChat@CSrmmBaseDialog@@QBEPAUSESSION_INFO@@XZ @821 NONAME
?EventCursor@MDatabaseCommon@@UAGPAV0DB@@II@Z @822 NONAME
?EventCursorRev@MDatabaseCommon@@UAGPAVEventCursor@DB@@II@Z @823 NONAME
@@ -788,3 +788,4 @@ _Netlib_SslRead@16 @875 NONAME _Netlib_SslShutdown@4 @876 NONAME
_Netlib_SslWrite@12 @877 NONAME
?AllowTyping@CSrmmBaseDialog@@IBE_NXZ @878 NONAME
+?setTyping@CSrmmBaseDialog@@QAEXHPBUUSERINFO@@@Z @879 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index e78b512abf..babafe60b3 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -39,7 +39,7 @@ Button_SetSkin_IcoLib @24 ?AuthRequest@PROTO_INTERFACE@@UEAAHIPEB_W@Z @38 NONAME
?Authorize@PROTO_INTERFACE@@UEAAHI@Z @39 NONAME
?CreateExtendedSearchUI@PROTO_INTERFACE@@UEAAPEAUHWND__@@PEAU2@@Z @40 NONAME
-?CreateLink@CProtoIntDlgBase@@QEAAXAEAVCCtrlData@@PEBDEK@Z @41 NONAME
+?CreateLink@CProtoIntDlgBase@@QEAAXAEAVCCtrlData@@PEBDEI@Z @41 NONAME
?CreateLink@CProtoIntDlgBase@@QEAAXAEAVCCtrlData@@PEBDPEA_W@Z @42 NONAME
?DlgProc@CProtoIntDlgBase@@MEAA_JI_K_J@Z @43 NONAME
?FileAllow@PROTO_INTERFACE@@UEAAPEAXIPEAXPEB_W@Z @44 NONAME
@@ -81,8 +81,8 @@ Button_SetSkin_IcoLib @24 ?getBool@PROTO_INTERFACE@@QEAA_NPEBD_N@Z @84 NONAME
?getByte@PROTO_INTERFACE@@QEAAHIPEBDE@Z @85 NONAME
?getByte@PROTO_INTERFACE@@QEAAHPEBDE@Z @86 NONAME
-?getDword@PROTO_INTERFACE@@QEAAKIPEBDK@Z @87 NONAME
-?getDword@PROTO_INTERFACE@@QEAAKPEBDK@Z @88 NONAME
+?getDword@PROTO_INTERFACE@@QEAAIIPEBDI@Z @87 NONAME
+?getDword@PROTO_INTERFACE@@QEAAIPEBDI@Z @88 NONAME
?getString@PROTO_INTERFACE@@QEAA_JIPEBDPEAUDBVARIANT@@@Z @89 NONAME
?getString@PROTO_INTERFACE@@QEAA_JPEBDPEAUDBVARIANT@@@Z @90 NONAME
?getStringA@PROTO_INTERFACE@@QEAAPEADIPEBD0@Z @91 NONAME
@@ -96,8 +96,8 @@ Button_SetSkin_IcoLib @24 ?isChatRoom@PROTO_INTERFACE@@QEAA_NI@Z @99 NONAME
?setByte@PROTO_INTERFACE@@QEAAXIPEBDE@Z @100 NONAME
?setByte@PROTO_INTERFACE@@QEAAXPEBDE@Z @101 NONAME
-?setDword@PROTO_INTERFACE@@QEAAXIPEBDK@Z @102 NONAME
-?setDword@PROTO_INTERFACE@@QEAAXPEBDK@Z @103 NONAME
+?setDword@PROTO_INTERFACE@@QEAAXIPEBDI@Z @102 NONAME
+?setDword@PROTO_INTERFACE@@QEAAXPEBDI@Z @103 NONAME
?setString@PROTO_INTERFACE@@QEAAXIPEBD0@Z @104 NONAME
?setString@PROTO_INTERFACE@@QEAAXPEBD0@Z @105 NONAME
?setWString@PROTO_INTERFACE@@QEAAXIPEBDPEB_W@Z @106 NONAME
@@ -324,13 +324,13 @@ Netlib_NtlmCreateResponse @383 ?get_lastName@AUTH_BLOB@DB@@QEBAPEBDXZ @393 NONAME
?get_nick@AUTH_BLOB@DB@@QEBAPEBDXZ @394 NONAME
?get_reason@AUTH_BLOB@DB@@QEBAPEBDXZ @395 NONAME
-?get_uin@AUTH_BLOB@DB@@QEBAKXZ @396 NONAME
+?get_uin@AUTH_BLOB@DB@@QEBAIXZ @396 NONAME
?makeBlob@AUTH_BLOB@DB@@AEAAPEAEXZ @397 NONAME
-?size@AUTH_BLOB@DB@@QEBAKXZ @398 NONAME
+?size@AUTH_BLOB@DB@@QEBAIXZ @398 NONAME
Chat_UnescapeTags @399 NONAME
ProtoGetAvatarFormatByMimeType @400
ProtoGetAvatarMimeType @401
-?set_uin@AUTH_BLOB@DB@@QEAAXK@Z @402 NONAME
+?set_uin@AUTH_BLOB@DB@@QEAAXI@Z @402 NONAME
??0CSrmmBaseDialog@@IEAA@AEAVCMPluginBase@@HPEAUSESSION_INFO@@@Z @403 NONAME
Miranda_GetSystemWindow @404 NONAME
??1CSrmmBaseDialog@@UEAA@XZ @405 NONAME
@@ -437,8 +437,8 @@ Proto_GetAverageStatus @512 ?getBool@CMPluginBase@@QEAA_NPEBD_N@Z @521 NONAME
?getByte@CMPluginBase@@QEAAHIPEBDH@Z @522 NONAME
?getByte@CMPluginBase@@QEAAHPEBDH@Z @523 NONAME
-?getDword@CMPluginBase@@QEAAKIPEBDH@Z @524 NONAME
-?getDword@CMPluginBase@@QEAAKPEBDH@Z @525 NONAME
+?getDword@CMPluginBase@@QEAAIIPEBDH@Z @524 NONAME
+?getDword@CMPluginBase@@QEAAIPEBDH@Z @525 NONAME
?getString@CMPluginBase@@QEAA_JIPEBDPEAUDBVARIANT@@@Z @526 NONAME
?getString@CMPluginBase@@QEAA_JPEBDPEAUDBVARIANT@@@Z @527 NONAME
?getStringA@CMPluginBase@@QEAAPEADIPEBD0@Z @528 NONAME
@@ -451,8 +451,8 @@ Proto_GetAverageStatus @512 ?getWord@CMPluginBase@@QEAAHPEBDH@Z @535 NONAME
?setByte@CMPluginBase@@QEAAXIPEBDE@Z @536 NONAME
?setByte@CMPluginBase@@QEAAXPEBDE@Z @537 NONAME
-?setDword@CMPluginBase@@QEAAXIPEBDK@Z @538 NONAME
-?setDword@CMPluginBase@@QEAAXPEBDK@Z @539 NONAME
+?setDword@CMPluginBase@@QEAAXIPEBDI@Z @538 NONAME
+?setDword@CMPluginBase@@QEAAXPEBDI@Z @539 NONAME
?setString@CMPluginBase@@QEAAXIPEBD0@Z @540 NONAME
?setString@CMPluginBase@@QEAAXPEBD0@Z @541 NONAME
?setWString@CMPluginBase@@QEAAXIPEBDPEB_W@Z @542 NONAME
@@ -729,7 +729,7 @@ ProtoBroadcastAsync @814 NONAME ?HideEmptyGroups@Clist@@3V?$CMOption@_N@@A @817 NONAME
?HideOffline@Clist@@3V?$CMOption@_N@@A @818 NONAME
?UseGroups@Clist@@3V?$CMOption@_N@@A @819 NONAME
-?OfflineModes@Clist@@3V?$CMOption@K@@A @820 NONAME
+?OfflineModes@Clist@@3V?$CMOption@I@@A @820 NONAME
?getChat@CSrmmBaseDialog@@QEBAPEAUSESSION_INFO@@XZ @821 NONAME
?EventCursor@MDatabaseCommon@@UEAAPEAV0DB@@II@Z @822 NONAME
?EventCursorRev@MDatabaseCommon@@UEAAPEAVEventCursor@DB@@II@Z @823 NONAME
@@ -788,3 +788,4 @@ Netlib_SslRead @875 NONAME Netlib_SslShutdown @876 NONAME
Netlib_SslWrite @877 NONAME
?AllowTyping@CSrmmBaseDialog@@IEBA_NXZ @878 NONAME
+?setTyping@CSrmmBaseDialog@@QEAAXHPEBUUSERINFO@@@Z @879 NONAME
diff --git a/src/mir_app/src/miranda.cpp b/src/mir_app/src/miranda.cpp index 36648eeb59..bce7fc0f88 100644 --- a/src/mir_app/src/miranda.cpp +++ b/src/mir_app/src/miranda.cpp @@ -50,7 +50,7 @@ pfnEndBufferedPaint endBufferedPaint; HANDLE hOkToExitEvent, hModulesLoadedEvent;
HANDLE hShutdownEvent, hPreShutdownEvent;
-DWORD hMainThreadId;
+uint32_t hMainThreadId;
bool g_bModulesLoadedFired = false, g_bMirandaTerminated = false;
int g_iIconX, g_iIconY, g_iIconSX, g_iIconSY;
@@ -164,7 +164,7 @@ MIR_APP_DLL(void) Miranda_WaitOnHandleEx(MWaitableStubEx pFunc, void *pInfo) /////////////////////////////////////////////////////////////////////////////////////////
// dll entry point
-BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID)
+BOOL WINAPI DllMain(HINSTANCE hinstDLL, uint32_t dwReason, LPVOID)
{
if (dwReason == DLL_PROCESS_ATTACH) {
g_plugin.setInst(hinstDLL);
@@ -196,10 +196,10 @@ static void __cdecl compactHeapsThread(void*) SleepEx((1000 * 60) * 5, TRUE); // every 5 minutes
HANDLE hHeaps[256];
- DWORD hc = GetProcessHeaps(255, (PHANDLE)&hHeaps);
+ uint32_t hc = GetProcessHeaps(255, (PHANDLE)&hHeaps);
if (hc != 0 && hc < 256) {
__try {
- for (DWORD j = 0; j < hc; j++)
+ for (uint32_t j = 0; j < hc; j++)
HeapCompact(hHeaps[j], 0);
}
__except (EXCEPTION_EXECUTE_HANDLER)
@@ -215,7 +215,7 @@ MIR_APP_DLL(void) Miranda_SetIdleCallback(void(__cdecl *pfnCallback)(void)) SetIdleCallback = pfnCallback;
}
-static DWORD dwEventTime = 0;
+static uint32_t dwEventTime = 0;
void checkIdle(MSG * msg)
{
switch (msg->message) {
@@ -226,7 +226,7 @@ void checkIdle(MSG * msg) }
}
-MIR_APP_DLL(DWORD) Miranda_GetIdle()
+MIR_APP_DLL(uint32_t) Miranda_GetIdle()
{
return dwEventTime;
}
@@ -320,7 +320,7 @@ static MSystemWindow *g_pSystemWindow; static void crtErrorHandler(const wchar_t*, const wchar_t*, const wchar_t*, unsigned, uintptr_t)
{}
-static DWORD myWait()
+static uint32_t myWait()
{
HANDLE *hWaitObjects = (HANDLE*)_alloca(arWaitableObjects.getCount() * sizeof(HANDLE));
for (int i = 0; i < arWaitableObjects.getCount(); i++)
@@ -389,13 +389,13 @@ int WINAPI mir_main(LPTSTR cmdLine) mir_forkthread(compactHeapsThread);
dwEventTime = GetTickCount();
- DWORD myPid = GetCurrentProcessId();
+ uint32_t myPid = GetCurrentProcessId();
bool messageloop = true;
while (messageloop) {
MSG msg;
BOOL dying = FALSE;
- DWORD rc = myWait();
+ uint32_t rc = myWait();
if (rc < WAIT_OBJECT_0 + arWaitableObjects.getCount()) {
auto &pWait = arWaitableObjects[rc - WAIT_OBJECT_0];
if (pWait.m_pInfo == INVALID_HANDLE_VALUE)
@@ -484,7 +484,7 @@ MIR_APP_DLL(void) Miranda_Close() /////////////////////////////////////////////////////////////////////////////////////////
// version functions
-MIR_APP_DLL(DWORD) Miranda_GetVersion()
+MIR_APP_DLL(uint32_t) Miranda_GetVersion()
{
wchar_t filename[MAX_PATH];
GetModuleFileName(g_plugin.getInst(), filename, _countof(filename));
diff --git a/src/mir_app/src/miranda.h b/src/mir_app/src/miranda.h index f4ba40f671..340201f7d5 100644 --- a/src/mir_app/src/miranda.h +++ b/src/mir_app/src/miranda.h @@ -41,7 +41,7 @@ void UnloadIdleModule(void); /**** miranda.cpp **********************************************************************/
-extern DWORD hMainThreadId;
+extern uint32_t hMainThreadId;
extern HANDLE hOkToExitEvent, hModulesLoadedEvent;
extern HANDLE hAccListChanged;
extern wchar_t mirandabootini[MAX_PATH];
diff --git a/src/mir_app/src/netlib.cpp b/src/mir_app/src/netlib.cpp index c94e6744d3..c524c29fa0 100644 --- a/src/mir_app/src/netlib.cpp +++ b/src/mir_app/src/netlib.cpp @@ -28,12 +28,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. static BOOL bModuleInitialized = FALSE;
HANDLE hConnectionHeaderMutex, hConnectionOpenMutex, hEventConnected = NULL, hEventDisconnected = NULL;
-DWORD g_LastConnectionTick;
+uint32_t g_LastConnectionTick;
int connectionTimeout;
HANDLE hSendEvent = nullptr, hRecvEvent = nullptr;
static char szUserAgent[100];
-typedef BOOL(WINAPI *tGetProductInfo)(DWORD, DWORD, DWORD, DWORD, PDWORD);
+typedef BOOL(WINAPI *tGetProductInfo)(uint32_t, uint32_t, uint32_t, uint32_t, PDWORD);
static int CompareNetlibUser(const NetlibUser* p1, const NetlibUser* p2)
{
@@ -78,7 +78,7 @@ void NetlibDeleteNestedCS(NetlibNestedCriticalSection *nlncs) int NetlibEnterNestedCS(NetlibConnection *nlc, int which)
{
NetlibNestedCriticalSection *nlncs;
- DWORD dwCurrentThreadId = GetCurrentThreadId();
+ uint32_t dwCurrentThreadId = GetCurrentThreadId();
WaitForSingleObject(hConnectionHeaderMutex, INFINITE);
if (nlc == nullptr || nlc->handleType != NLH_CONNECTION) {
@@ -315,7 +315,7 @@ MIR_APP_DLL(int) Netlib_CloseHandle(HANDLE hNetlib) ReleaseMutex(hConnectionHeaderMutex);
HANDLE waitHandles[4] = { hConnectionHeaderMutex, nlc->hOkToCloseEvent, nlc->ncsRecv.hMutex, nlc->ncsSend.hMutex };
- DWORD waitResult = WaitForMultipleObjects(_countof(waitHandles), waitHandles, TRUE, INFINITE);
+ uint32_t waitResult = WaitForMultipleObjects(_countof(waitHandles), waitHandles, TRUE, INFINITE);
if (waitResult >= WAIT_OBJECT_0 + _countof(waitHandles)) {
ReleaseMutex(hConnectionHeaderMutex);
SetLastError(ERROR_INVALID_PARAMETER); //already been closed
diff --git a/src/mir_app/src/netlib.h b/src/mir_app/src/netlib.h index 59fa02940c..bfa4557a56 100644 --- a/src/mir_app/src/netlib.h +++ b/src/mir_app/src/netlib.h @@ -47,7 +47,7 @@ struct NetlibUser struct NetlibNestedCriticalSection
{
HANDLE hMutex;
- DWORD dwOwningThreadId;
+ uint32_t dwOwningThreadId;
int lockCount;
};
@@ -157,7 +157,7 @@ bool BindSocketToPort(const char *szPorts, SOCKET s, SOCKET s6, int* portn); // netlibhttp.cpp
void NetlibHttpSetLastErrorUsingHttpResult(int result);
-NETLIBHTTPREQUEST* NetlibHttpRecv(NetlibConnection* nlc, DWORD hflags, DWORD dflags, bool isConnect = false);
+NETLIBHTTPREQUEST* NetlibHttpRecv(NetlibConnection* nlc, uint32_t hflags, uint32_t dflags, bool isConnect = false);
void NetlibConnFromUrl(const char* szUrl, bool secur, NETLIBOPENCONNECTION &nloc);
// netliblog.cpp
@@ -166,9 +166,9 @@ void NetlibLogInit(void); void NetlibLogShutdown(void);
// netlibopenconn.cpp
-DWORD DnsLookup(NetlibUser *nlu, const char *szHost);
-int WaitUntilReadable(SOCKET s, DWORD dwTimeout, bool check = false);
-int WaitUntilWritable(SOCKET s, DWORD dwTimeout);
+uint32_t DnsLookup(NetlibUser *nlu, const char *szHost);
+int WaitUntilReadable(SOCKET s, uint32_t dwTimeout, bool check = false);
+int WaitUntilWritable(SOCKET s, uint32_t dwTimeout);
bool NetlibDoConnect(NetlibConnection *nlc);
bool NetlibReconnect(NetlibConnection *nlc);
@@ -186,7 +186,7 @@ bool OpenSsl_Init(); void OpenSsl_Unload();
// netlibupnp.cpp
-bool NetlibUPnPAddPortMapping(uint16_t intport, char *proto, uint16_t *extport, DWORD *extip, bool search);
+bool NetlibUPnPAddPortMapping(uint16_t intport, char *proto, uint16_t *extport, uint32_t *extip, bool search);
void NetlibUPnPDeletePortMapping(uint16_t extport, char* proto);
void NetlibUPnPCleanup(void*);
void NetlibUPnPInit(void);
diff --git a/src/mir_app/src/netlib_autoproxy.cpp b/src/mir_app/src/netlib_autoproxy.cpp index f16396569f..9366567fd8 100644 --- a/src/mir_app/src/netlib_autoproxy.cpp +++ b/src/mir_app/src/netlib_autoproxy.cpp @@ -205,8 +205,8 @@ static void __cdecl NetlibIeProxyThread(IeProxyParam *param) char *proxy = proxyBuffer; DWORD dwProxyLen = sizeof(proxyBuffer); - if (pInternetGetProxyInfo(param->szUrl, (DWORD)mir_strlen(param->szUrl), - param->szHost, (DWORD)mir_strlen(param->szHost), &proxy, &dwProxyLen)) + if (pInternetGetProxyInfo(param->szUrl, (uint32_t)mir_strlen(param->szUrl), + param->szHost, (uint32_t)mir_strlen(param->szHost), &proxy, &dwProxyLen)) param->szProxy = mir_strdup(lrtrim(proxy)); Netlib_Logf(nullptr, "Autoproxy got response %s, Param: %s %s", param->szProxy, param->szUrl, param->szHost); diff --git a/src/mir_app/src/netlib_bind.cpp b/src/mir_app/src/netlib_bind.cpp index 62a2042c0c..06c3fd93e8 100644 --- a/src/mir_app/src/netlib_bind.cpp +++ b/src/mir_app/src/netlib_bind.cpp @@ -273,7 +273,7 @@ LBL_Error: nlb->dwInternalIP = ntohl(*(PDWORD)he->h_addr); } - DWORD extIP; + uint32_t extIP; if (nlu->settings.enableUPnP && NetlibUPnPAddPortMapping(nlb->wPort, "TCP", &nlbp->wExPort, &extIP, true)) { Netlib_Logf(nullptr, "UPnP port mapping succeeded. Internal Port: %u External Port: %u\n", nlb->wPort, nlbp->wExPort); nlb->wExPort = nlbp->wExPort; diff --git a/src/mir_app/src/netlib_http.cpp b/src/mir_app/src/netlib_http.cpp index 48d2153710..b48ce8c1bc 100644 --- a/src/mir_app/src/netlib_http.cpp +++ b/src/mir_app/src/netlib_http.cpp @@ -278,7 +278,7 @@ struct HttpSecurityContext } }; -static int HttpPeekFirstResponseLine(NetlibConnection *nlc, DWORD dwTimeoutTime, DWORD recvFlags, int *resultCode, char **ppszResultDescr, int *length) +static int HttpPeekFirstResponseLine(NetlibConnection *nlc, uint32_t dwTimeoutTime, uint32_t recvFlags, int *resultCode, char **ppszResultDescr, int *length) { int bytesPeeked; char buffer[2048], *peol; @@ -348,14 +348,14 @@ static int SendHttpRequestAndData(NetlibConnection *nlc, CMStringA &httpRequest, else httpRequest.AppendFormat("\r\n"); - DWORD hflags = (nlhr->flags & NLHRF_DUMPASTEXT ? MSG_DUMPASTEXT : 0) | + uint32_t hflags = (nlhr->flags & NLHRF_DUMPASTEXT ? MSG_DUMPASTEXT : 0) | (nlhr->flags & (NLHRF_NODUMP | NLHRF_NODUMPSEND | NLHRF_NODUMPHEADERS) ? MSG_NODUMP : (nlhr->flags & NLHRF_DUMPPROXY ? MSG_DUMPPROXY : 0)) | (nlhr->flags & NLHRF_NOPROXY ? MSG_RAW : 0); int bytesSent = Netlib_Send(nlc, httpRequest, httpRequest.GetLength(), hflags); if (bytesSent != SOCKET_ERROR && sendData && nlhr->dataLength) { - DWORD sflags = MSG_NOTITLE | (nlhr->flags & NLHRF_DUMPASTEXT ? MSG_DUMPASTEXT : 0) | + uint32_t sflags = MSG_NOTITLE | (nlhr->flags & NLHRF_DUMPASTEXT ? MSG_DUMPASTEXT : 0) | (nlhr->flags & (NLHRF_NODUMP | NLHRF_NODUMPSEND) ? MSG_NODUMP : (nlhr->flags & NLHRF_DUMPPROXY ? MSG_DUMPPROXY : 0)) | (nlhr->flags & NLHRF_NOPROXY ? MSG_RAW : 0); @@ -512,10 +512,10 @@ MIR_APP_DLL(int) Netlib_SendHttpRequest(HNETLIBCONN nlc, NETLIBHTTPREQUEST *nlhr if (doneContentLengthHeader && nlhr->requestType != REQUEST_HEAD) break; - DWORD fflags = MSG_PEEK | MSG_NODUMP | ((nlhr->flags & NLHRF_NOPROXY) ? MSG_RAW : 0); - DWORD dwTimeOutTime = hdrTimeout < 0 ? -1 : GetTickCount() + hdrTimeout; + uint32_t fflags = MSG_PEEK | MSG_NODUMP | ((nlhr->flags & NLHRF_NOPROXY) ? MSG_RAW : 0); + uint32_t dwTimeOutTime = hdrTimeout < 0 ? -1 : GetTickCount() + hdrTimeout; if (!HttpPeekFirstResponseLine(nlc, dwTimeOutTime, fflags, &nlhr->resultCode, nullptr, nullptr)) { - DWORD err = GetLastError(); + uint32_t err = GetLastError(); Netlib_Logf(nlu, "%s %d: %s Failed (%u %u)", __FILE__, __LINE__, "HttpPeekFirstResponseLine", err, count); // connection died while we were waiting @@ -536,11 +536,11 @@ MIR_APP_DLL(int) Netlib_SendHttpRequest(HNETLIBCONN nlc, NETLIBHTTPREQUEST *nlhr int resultCode = nlhr->resultCode; lastFirstLineFail = false; - DWORD hflags = (nlhr->flags & (NLHRF_NODUMP | NLHRF_NODUMPHEADERS | NLHRF_NODUMPSEND) ? + uint32_t hflags = (nlhr->flags & (NLHRF_NODUMP | NLHRF_NODUMPHEADERS | NLHRF_NODUMPSEND) ? MSG_NODUMP : (nlhr->flags & NLHRF_DUMPPROXY ? MSG_DUMPPROXY : 0)) | (nlhr->flags & NLHRF_NOPROXY ? MSG_RAW : 0); - DWORD dflags = (nlhr->flags & (NLHRF_NODUMP | NLHRF_NODUMPSEND) ? MSG_NODUMP : MSG_DUMPASTEXT | MSG_DUMPPROXY) | + uint32_t dflags = (nlhr->flags & (NLHRF_NODUMP | NLHRF_NODUMPSEND) ? MSG_NODUMP : MSG_DUMPASTEXT | MSG_DUMPPROXY) | (nlhr->flags & NLHRF_NOPROXY ? MSG_RAW : 0) | MSG_NODUMP; if (resultCode == 100) @@ -718,7 +718,7 @@ MIR_APP_DLL(NETLIBHTTPREQUEST*) Netlib_RecvHttpHeaders(HNETLIBCONN hConnection, if (!NetlibEnterNestedCS(nlc, NLNCS_RECV)) return nullptr; - DWORD dwRequestTimeoutTime = GetTickCount() + HTTPRECVDATATIMEOUT; + uint32_t dwRequestTimeoutTime = GetTickCount() + HTTPRECVDATATIMEOUT; NETLIBHTTPREQUEST *nlhr = (NETLIBHTTPREQUEST*)mir_calloc(sizeof(NETLIBHTTPREQUEST)); nlhr->cbSize = sizeof(NETLIBHTTPREQUEST); nlhr->nlc = nlc; // Needed to id connection in the protocol HTTP gateway wrapper functions @@ -868,11 +868,11 @@ MIR_APP_DLL(NETLIBHTTPREQUEST*) Netlib_HttpTransaction(HNETLIBUSER nlu, NETLIBHT if (!doneUserAgentHeader || !doneAcceptEncoding) mir_free(nlhrSend.headers); - DWORD dflags = (nlhr->flags & NLHRF_DUMPASTEXT ? MSG_DUMPASTEXT : 0) | + uint32_t dflags = (nlhr->flags & NLHRF_DUMPASTEXT ? MSG_DUMPASTEXT : 0) | (nlhr->flags & NLHRF_NODUMP ? MSG_NODUMP : (nlhr->flags & NLHRF_DUMPPROXY ? MSG_DUMPPROXY : 0)) | (nlhr->flags & NLHRF_NOPROXY ? MSG_RAW : 0); - DWORD hflags = + uint32_t hflags = (nlhr->flags & NLHRF_NODUMP ? MSG_NODUMP : (nlhr->flags & NLHRF_DUMPPROXY ? MSG_DUMPPROXY : 0)) | (nlhr->flags & NLHRF_NOPROXY ? MSG_RAW : 0); @@ -962,7 +962,7 @@ char* gzip_decode(char *gzip_data, int *len_ptr, int window) return output_data; } -static int NetlibHttpRecvChunkHeader(NetlibConnection *nlc, bool first, DWORD flags) +static int NetlibHttpRecvChunkHeader(NetlibConnection *nlc, bool first, uint32_t flags) { MBinBuffer buf; @@ -997,7 +997,7 @@ static int NetlibHttpRecvChunkHeader(NetlibConnection *nlc, bool first, DWORD fl } } -NETLIBHTTPREQUEST* NetlibHttpRecv(NetlibConnection *nlc, DWORD hflags, DWORD dflags, bool isConnect) +NETLIBHTTPREQUEST* NetlibHttpRecv(NetlibConnection *nlc, uint32_t hflags, uint32_t dflags, bool isConnect) { int dataLen = -1, i, chunkhdr = 0; bool chunked = false; diff --git a/src/mir_app/src/netlib_log.cpp b/src/mir_app/src/netlib_log.cpp index b407e1499f..89ee53bf6e 100644 --- a/src/mir_app/src/netlib_log.cpp +++ b/src/mir_app/src/netlib_log.cpp @@ -319,7 +319,7 @@ int NetlibLog_Worker(NetlibUser *nlu, const char *pszMsg, int flags) if (!bIsActive) return 0; - DWORD dwOriginalLastError = GetLastError(); + uint32_t dwOriginalLastError = GetLastError(); if ((nlu != nullptr && GetNetlibHandleType(nlu) != NLH_USER) || pszMsg == nullptr) { SetLastError(ERROR_INVALID_PARAMETER); diff --git a/src/mir_app/src/netlib_openconn.cpp b/src/mir_app/src/netlib_openconn.cpp index 9eb61a582b..69c5192456 100644 --- a/src/mir_app/src/netlib_openconn.cpp +++ b/src/mir_app/src/netlib_openconn.cpp @@ -27,17 +27,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern mir_cs csNetlibUser; extern HANDLE hConnectionOpenMutex; -extern DWORD g_LastConnectionTick; +extern uint32_t g_LastConnectionTick; extern int connectionTimeout; static int iUPnPCleanup = 0; #define RECV_DEFAULT_TIMEOUT 60000 //returns in network byte order -DWORD DnsLookup(NetlibUser *nlu, const char *szHost) +uint32_t DnsLookup(NetlibUser *nlu, const char *szHost) { HOSTENT* host; - DWORD ip = inet_addr(szHost); + uint32_t ip = inet_addr(szHost); if (ip != INADDR_NONE) return ip; @@ -53,7 +53,7 @@ DWORD DnsLookup(NetlibUser *nlu, const char *szHost) return 0; } -int WaitUntilReadable(SOCKET s, DWORD dwTimeout, bool check) +int WaitUntilReadable(SOCKET s, uint32_t dwTimeout, bool check) { fd_set readfd; TIMEVAL tv; @@ -71,7 +71,7 @@ int WaitUntilReadable(SOCKET s, DWORD dwTimeout, bool check) return result; } -int WaitUntilWritable(SOCKET s, DWORD dwTimeout) +int WaitUntilWritable(SOCKET s, uint32_t dwTimeout) { fd_set writefd; TIMEVAL tv; @@ -91,10 +91,10 @@ int WaitUntilWritable(SOCKET s, DWORD dwTimeout) return 1; } -bool RecvUntilTimeout(NetlibConnection *nlc, char *buf, int len, int flags, DWORD dwTimeout) +bool RecvUntilTimeout(NetlibConnection *nlc, char *buf, int len, int flags, uint32_t dwTimeout) { int nReceived = 0; - DWORD dwTimeNow, dwCompleteTime = GetTickCount() + dwTimeout; + uint32_t dwTimeNow, dwCompleteTime = GetTickCount() + dwTimeout; while ((dwTimeNow = GetTickCount()) < dwCompleteTime) { if (WaitUntilReadable(nlc->s, dwCompleteTime - dwTimeNow) <= 0) return false; @@ -127,7 +127,7 @@ static int NetlibInitSocks4Connection(NetlibConnection *nlc, NetlibUser *nlu, NE else memcpy(&pInit[8], nlu->settings.szProxyAuthUser, nUserLen); //if cannot resolve host, try resolving through proxy (requires SOCKS4a) - DWORD ip = DnsLookup(nlu, nloc->szHost); + uint32_t ip = DnsLookup(nlu, nloc->szHost); *(PDWORD)&pInit[4] = ip ? ip : 0x01000000; if (!ip) { memcpy(&pInit[len], nloc->szHost, nHostLen); @@ -208,7 +208,7 @@ static int NetlibInitSocks5Connection(NetlibConnection *nlc, NetlibUser *nlu, NE } size_t nHostLen; - DWORD hostIP; + uint32_t hostIP; if (nlc->dnsThroughProxy) { hostIP = inet_addr(nloc->szHost); @@ -298,7 +298,7 @@ static bool NetlibInitHttpsConnection(NetlibConnection *nlc, NetlibUser *nlu, NE if (nlc->dnsThroughProxy) szUrl.Format("%s:%u", nloc->szHost, nloc->wPort); else { - DWORD ip = DnsLookup(nlu, nloc->szHost); + uint32_t ip = DnsLookup(nlu, nloc->szHost); if (ip == 0) return false; szUrl.Format("%s:%u", inet_ntoa(*(PIN_ADDR)&ip), nloc->wPort); } @@ -334,7 +334,7 @@ static bool NetlibInitHttpsConnection(NetlibConnection *nlc, NetlibUser *nlu, NE static void FreePartiallyInitedConnection(NetlibConnection *nlc) { - DWORD dwOriginalLastError = GetLastError(); + uint32_t dwOriginalLastError = GetLastError(); if (GetNetlibHandleType(nlc) == NLH_CONNECTION) delete nlc; @@ -346,7 +346,7 @@ static bool my_connectIPv4(NetlibConnection *nlc, NETLIBOPENCONNECTION *nloc) { int rc = 0, retrycnt = 0; u_long notblocking = 1; - DWORD lasterr = 0; + uint32_t lasterr = 0; static const TIMEVAL tv = { 1, 0 }; NetlibUser *nlu = nlc->nlu; @@ -491,7 +491,7 @@ static bool my_connectIPv6(NetlibConnection *nlc, NETLIBOPENCONNECTION *nloc) NetlibUser *nlu = nlc->nlu; int rc = SOCKET_ERROR, retrycnt = 0; u_long notblocking = 1; - DWORD lasterr = 0; + uint32_t lasterr = 0; static const TIMEVAL tv = { 1, 0 }; unsigned int dwTimeout = (nloc->flags & NLOCF_V2) ? nloc->timeout : 0; // if dwTimeout is zero then its an old style connection or new with a 0 timeout, select() will error quicker anyway diff --git a/src/mir_app/src/netlib_opts.cpp b/src/mir_app/src/netlib_opts.cpp index 77f5d55613..adc10f59e2 100644 --- a/src/mir_app/src/netlib_opts.cpp +++ b/src/mir_app/src/netlib_opts.cpp @@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct NetlibTempSettings { - DWORD flags; + uint32_t flags; char *szSettingsModule; NETLIBUSERSETTINGS settings; }; @@ -108,7 +108,7 @@ static void CombineSettingsStrings(char **dest, char **source) if (*dest != nullptr && (*source == nullptr || mir_strcmpi(*dest, *source))) { mir_free(*dest); *dest = nullptr; } } -static void CombineSettingsStructs(NETLIBUSERSETTINGS *dest, DWORD *destFlags, NETLIBUSERSETTINGS *source, DWORD sourceFlags) +static void CombineSettingsStructs(NETLIBUSERSETTINGS *dest, uint32_t *destFlags, NETLIBUSERSETTINGS *source, uint32_t sourceFlags) { if (sourceFlags & NUF_OUTGOING) { if (*destFlags & NUF_OUTGOING) { @@ -195,7 +195,7 @@ static void ChangeSettingStringByEdit(HWND hwndDlg, UINT ctrlId, int iUser, int } } -static void WriteSettingsStructToDb(const char *szSettingsModule, NETLIBUSERSETTINGS *settings, DWORD flags) +static void WriteSettingsStructToDb(const char *szSettingsModule, NETLIBUSERSETTINGS *settings, uint32_t flags) { if (flags & NUF_OUTGOING) { db_set_b(0, szSettingsModule, "NLValidateSSL", (uint8_t)settings->validateSSL); @@ -234,7 +234,7 @@ void NetlibSaveUserSettingsStruct(const char *szSettingsModule, const NETLIBUSER NETLIBUSERSETTINGS combinedSettings = { 0 }; combinedSettings.cbSize = sizeof(combinedSettings); - DWORD flags = 0; + uint32_t flags = 0; for (auto &p : netlibUser) { if (p->user.flags & NUF_NOOPTIONS) continue; @@ -285,7 +285,7 @@ static INT_PTR CALLBACK DlgProcNetlibOpts(HWND hwndDlg, UINT msg, WPARAM wParam, iUser = SendDlgItemMessage(hwndDlg, IDC_NETLIBUSERS, CB_GETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_NETLIBUSERS, CB_GETCURSEL, 0, 0), 0); { NETLIBUSERSETTINGS settings = { 0 }; - DWORD flags = 0; + uint32_t flags = 0; if (iUser == -1) { settings.cbSize = sizeof(settings); diff --git a/src/mir_app/src/netlib_security.cpp b/src/mir_app/src/netlib_security.cpp index 4ac932190b..40333e9af3 100644 --- a/src/mir_app/src/netlib_security.cpp +++ b/src/mir_app/src/netlib_security.cpp @@ -45,15 +45,15 @@ struct NTLM_String { uint16_t len; uint16_t allocedSpace; - DWORD offset; + uint32_t offset; }; struct NtlmType2packet { char sign[8]; - DWORD type; // == 2 + uint32_t type; // == 2 NTLM_String targetName; - DWORD flags; + uint32_t flags; uint8_t challenge[8]; uint8_t context[8]; NTLM_String targetInfo; diff --git a/src/mir_app/src/netlib_ssl.cpp b/src/mir_app/src/netlib_ssl.cpp index f44b2fee28..0debded33a 100644 --- a/src/mir_app/src/netlib_ssl.cpp +++ b/src/mir_app/src/netlib_ssl.cpp @@ -164,9 +164,9 @@ static LPSTR rgszUsages[] = szOID_SGC_NETSCAPE }; -static bool VerifyCertificate(SslHandle *ssl, PCSTR pszServerName, DWORD dwCertFlags) +static bool VerifyCertificate(SslHandle *ssl, PCSTR pszServerName, uint32_t dwCertFlags) { - DWORD scRet; + uint32_t scRet; ptrW pwszServerName(mir_a2u(pszServerName)); @@ -251,7 +251,7 @@ MIR_APP_DLL(HSSL) Netlib_SslConnect(SOCKET s, const char* host, int verify) } if (verify) { - DWORD dwFlags = 0; + uint32_t dwFlags = 0; if (!host || inet_addr(host) != INADDR_NONE) dwFlags |= 0x00001000; if (!VerifyCertificate(ssl.get(), host, dwFlags)) diff --git a/src/mir_app/src/netlib_upnp.cpp b/src/mir_app/src/netlib_upnp.cpp index 0ccd7b6c6c..27f5100943 100644 --- a/src/mir_app/src/netlib_upnp.cpp +++ b/src/mir_app/src/netlib_upnp.cpp @@ -664,7 +664,7 @@ static bool findUPnPGateway(void) return gatewayFound; } -bool NetlibUPnPAddPortMapping(uint16_t intport, char *proto, uint16_t *extport, DWORD *extip, bool search) +bool NetlibUPnPAddPortMapping(uint16_t intport, char *proto, uint16_t *extport, uint32_t *extip, bool search) { int res = 0, i = 5; diff --git a/src/mir_app/src/options.cpp b/src/mir_app/src/options.cpp index e82acc3879..2520dc3f1b 100644 --- a/src/mir_app/src/options.cpp +++ b/src/mir_app/src/options.cpp @@ -234,7 +234,7 @@ struct OptionsPageData : public MZeroedObject bool bChanged, bInsideTab;
int height;
int width;
- DWORD flags;
+ uint32_t flags;
__forceinline HWND getHwnd() const { return (pDialog == nullptr) ? nullptr : pDialog->GetHwnd(); }
__forceinline HINSTANCE getInst() const { return pDialog->GetInst(); }
@@ -270,7 +270,7 @@ struct OptionsPageData : public MZeroedObject }
}
- DWORD key = GetPluginPageHash(); // get the plugin page hash
+ uint32_t key = GetPluginPageHash(); // get the plugin page hash
wchar_t pluginName[MAX_PATH];
GetPluginName(getInst(), pluginName, _countof(pluginName));
diff --git a/src/mir_app/src/popups.cpp b/src/mir_app/src/popups.cpp index 6c1f3d8617..2d752f8885 100644 --- a/src/mir_app/src/popups.cpp +++ b/src/mir_app/src/popups.cpp @@ -96,12 +96,12 @@ MIR_APP_DLL(void*) PUGetPluginData(HWND hPopupWindow) ///////////////////////////////////////////////////////////////////////////////////////// // Messages -MIR_APP_DLL(int) PUShowMessage(const char *lpzText, DWORD kind) +MIR_APP_DLL(int) PUShowMessage(const char *lpzText, uint32_t kind) { return (int)CallService(MS_POPUP_SHOWMESSAGE, (WPARAM)lpzText, (LPARAM)kind); } -MIR_APP_DLL(int) PUShowMessageW(const wchar_t *lpwzText, DWORD kind) +MIR_APP_DLL(int) PUShowMessageW(const wchar_t *lpwzText, uint32_t kind) { return (int)CallService(MS_POPUP_SHOWMESSAGEW, (WPARAM)lpwzText, (LPARAM)kind); } diff --git a/src/mir_app/src/proto_interface.cpp b/src/mir_app/src/proto_interface.cpp index f2d44ccc6e..806ac0ede9 100644 --- a/src/mir_app/src/proto_interface.cpp +++ b/src/mir_app/src/proto_interface.cpp @@ -198,7 +198,7 @@ MEVENT PROTO_INTERFACE::RecvMsg(MCONTACT hContact, PROTORECVEVENT *pre) dbei.szModule = Proto_GetBaseAccountName(hContact); dbei.timestamp = pre->timestamp; dbei.eventType = EVENTTYPE_MESSAGE; - dbei.cbBlob = (DWORD)mir_strlen(pre->szMessage) + 1; + dbei.cbBlob = (uint32_t)mir_strlen(pre->szMessage) + 1; dbei.pBlob = (uint8_t*)pre->szMessage; if (pre->flags & PREF_CREATEREAD) diff --git a/src/mir_app/src/proto_ui.cpp b/src/mir_app/src/proto_ui.cpp index 309f1026d0..a45dc6d510 100644 --- a/src/mir_app/src/proto_ui.cpp +++ b/src/mir_app/src/proto_ui.cpp @@ -42,7 +42,7 @@ CProtoIntDlgBase::CProtoIntDlgBase(PROTO_INTERFACE *proto, int idDialog) : {
}
-void CProtoIntDlgBase::CreateLink(CCtrlData& ctrl, const char *szSetting, uint8_t type, DWORD iValue)
+void CProtoIntDlgBase::CreateLink(CCtrlData& ctrl, const char *szSetting, uint8_t type, uint32_t iValue)
{
ctrl.CreateDbLink(m_proto_interface->m_szModuleName, szSetting, type, iValue);
}
diff --git a/src/mir_app/src/pu_utils.cpp b/src/mir_app/src/pu_utils.cpp index b3f68572fc..6c4b256b1c 100644 --- a/src/mir_app/src/pu_utils.cpp +++ b/src/mir_app/src/pu_utils.cpp @@ -34,7 +34,7 @@ static HANDLE g_hPipe = nullptr; static bool IsRunAsAdmin() { BOOL bIsRunAsAdmin = false; - DWORD dwError = ERROR_SUCCESS; + uint32_t dwError = ERROR_SUCCESS; PSID pAdministratorsGroup = nullptr; // Allocate and initialize a SID of the administrators group. @@ -80,7 +80,7 @@ MIR_APP_DLL(bool) PU::IsDirect() MIR_APP_DLL(bool) PU::IsProcessElevated() { bool bIsElevated = false; - DWORD dwError = ERROR_SUCCESS; + uint32_t dwError = ERROR_SUCCESS; HANDLE hToken = nullptr; // Open the primary access token of the process with TOKEN_QUERY. @@ -174,7 +174,7 @@ MIR_APP_DLL(bool) PU::PrepareEscalation() return true; } - DWORD dwError = GetLastError(); + uint32_t dwError = GetLastError(); if (dwError == ERROR_CANCELLED) { // The user refused to allow privileges elevation. // Do nothing ... @@ -188,12 +188,12 @@ MIR_APP_DLL(bool) PU::PrepareEscalation() static int TransactPipe(int opcode, const wchar_t *p1, const wchar_t *p2) { uint8_t buf[1024]; - DWORD l1 = lstrlen(p1), l2 = lstrlen(p2); + uint32_t l1 = lstrlen(p1), l2 = lstrlen(p2); if (l1 > MAX_PATH || l2 > MAX_PATH) return ERROR_BAD_ARGUMENTS; - *(DWORD *)buf = opcode; - wchar_t *dst = (wchar_t *)&buf[sizeof(DWORD)]; + *(uint32_t *)buf = opcode; + wchar_t *dst = (wchar_t *)&buf[sizeof(uint32_t)]; lstrcpy(dst, p1); dst += l1 + 1; if (p2) { @@ -203,13 +203,13 @@ static int TransactPipe(int opcode, const wchar_t *p1, const wchar_t *p2) else *dst++ = 0; DWORD dwBytes = 0, dwError; - if (!WriteFile(g_hPipe, buf, (DWORD)((uint8_t *)dst - buf), &dwBytes, nullptr)) + if (!WriteFile(g_hPipe, buf, (uint32_t)((uint8_t *)dst - buf), &dwBytes, nullptr)) return GetLastError(); dwError = 0; - if (!ReadFile(g_hPipe, &dwError, sizeof(DWORD), &dwBytes, nullptr)) + if (!ReadFile(g_hPipe, &dwError, sizeof(uint32_t), &dwBytes, nullptr)) return GetLastError(); - if (dwBytes != sizeof(DWORD)) + if (dwBytes != sizeof(uint32_t)) return ERROR_BAD_ARGUMENTS; return dwError; @@ -227,13 +227,13 @@ MIR_APP_DLL(int) PU::SafeMoveFile(const wchar_t *pSrc, const wchar_t *pDst) { if (g_hPipe == nullptr) { if (!DeleteFileW(pDst)) { - DWORD dwError = GetLastError(); + uint32_t dwError = GetLastError(); if (dwError != ERROR_ACCESS_DENIED && dwError != ERROR_FILE_NOT_FOUND) return dwError; } if (!MoveFileW(pSrc, pDst)) { // use copy on error - switch (DWORD dwError = GetLastError()) { + switch (uint32_t dwError = GetLastError()) { case ERROR_ALREADY_EXISTS: case ERROR_FILE_NOT_FOUND: return 0; // this file was included into many archives, so Miranda tries to move it again & again diff --git a/src/mir_app/src/searchresults.cpp b/src/mir_app/src/searchresults.cpp index 4278978600..94ce76aef9 100644 --- a/src/mir_app/src/searchresults.cpp +++ b/src/mir_app/src/searchresults.cpp @@ -185,7 +185,7 @@ static void __cdecl BeginSearchFailed(wchar_t *protoName) MessageBox(nullptr, buf, TranslateT("Problem with search"), MB_OK | MB_ICONERROR);
}
-int BeginSearch(HWND, struct FindAddDlgData *dat, const char *szProto, const char *szSearchService, DWORD requiredCapability, void *pvSearchParams)
+int BeginSearch(HWND, struct FindAddDlgData *dat, const char *szProto, const char *szSearchService, uint32_t requiredCapability, void *pvSearchParams)
{
if (szProto == nullptr) {
int failures = 0;
@@ -195,7 +195,7 @@ int BeginSearch(HWND, struct FindAddDlgData *dat, const char *szProto, const cha if (!pa->IsEnabled())
continue;
- DWORD caps = (DWORD)CallProtoServiceInt(0, pa->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0);
+ uint32_t caps = (uint32_t)CallProtoServiceInt(0, pa->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0);
if (!(caps & requiredCapability))
continue;
diff --git a/src/mir_app/src/skin.h b/src/mir_app/src/skin.h index 6436694728..043fdec472 100644 --- a/src/mir_app/src/skin.h +++ b/src/mir_app/src/skin.h @@ -66,7 +66,7 @@ struct THotkeyItem extern LIST<THotkeyItem> hotkeys;
extern HWND g_hwndHkOptions, g_hwndHotkeyHost;
-extern DWORD g_pid, g_hkid;
+extern uint32_t g_pid, g_hkid;
extern HANDLE hEvChanged;
int HotkeyOptionsInit(WPARAM, LPARAM);
diff --git a/src/mir_app/src/skin2opts.cpp b/src/mir_app/src/skin2opts.cpp index 9bc9da15f9..2abfddbbe7 100644 --- a/src/mir_app/src/skin2opts.cpp +++ b/src/mir_app/src/skin2opts.cpp @@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct TreeItem
{
char *paramName;
- DWORD value;
+ uint32_t value;
};
/////////////////////////////////////////////////////////////////////////////////////////
@@ -641,7 +641,7 @@ public: TVITEMEX tvi;
tvi.mask = TVIF_STATE | TVIF_HANDLE | TVIF_CHILDREN | TVIF_PARAM;
tvi.hItem = hti;
- tvi.stateMask = (DWORD)-1;
+ tvi.stateMask = (uint32_t)-1;
m_categoryList.GetItem(&tvi);
if (tvi.cChildren > 0) {
diff --git a/src/mir_app/src/srmm_base.cpp b/src/mir_app/src/srmm_base.cpp index 02f0b0b29b..ae91695e66 100644 --- a/src/mir_app/src/srmm_base.cpp +++ b/src/mir_app/src/srmm_base.cpp @@ -297,9 +297,9 @@ static void CALLBACK ChatTimerProc(HWND hwnd, UINT, UINT_PTR idEvent, DWORD) GetCursorPos(&pt); ScreenToClient(hwnd, &pt); - DWORD nItemUnderMouse = (DWORD)SendMessage(hwnd, LB_ITEMFROMPOINT, 0, MAKELPARAM(pt.x, pt.y)); + uint32_t nItemUnderMouse = (uint32_t)SendMessage(hwnd, LB_ITEMFROMPOINT, 0, MAKELPARAM(pt.x, pt.y)); if (HIWORD(nItemUnderMouse) == 1) - nItemUnderMouse = (DWORD)(-1); + nItemUnderMouse = (uint32_t)(-1); else nItemUnderMouse &= 0xFFFF; if (((int)nItemUnderMouse != si->currentHovered) || (nItemUnderMouse == -1)) { @@ -369,9 +369,9 @@ LRESULT CSrmmBaseDialog::WndProc_Nicklist(UINT msg, WPARAM wParam, LPARAM lParam GetClientRect(m_nickList.GetHwnd(), &clientRect); if (PtInRect(&clientRect, pt)) { // hit test item under mouse - DWORD nItemUnderMouse = m_nickList.SendMsg(LB_ITEMFROMPOINT, 0, lParam); + uint32_t nItemUnderMouse = m_nickList.SendMsg(LB_ITEMFROMPOINT, 0, lParam); if (HIWORD(nItemUnderMouse) == 1) - nItemUnderMouse = (DWORD)(-1); + nItemUnderMouse = (uint32_t)(-1); else nItemUnderMouse &= 0xFFFF; diff --git a/src/mir_app/src/srmm_statusicon.cpp b/src/mir_app/src/srmm_statusicon.cpp index 3edb291f2e..93347cd7c8 100644 --- a/src/mir_app/src/srmm_statusicon.cpp +++ b/src/mir_app/src/srmm_statusicon.cpp @@ -73,7 +73,7 @@ struct StatusIconMain : public MZeroedObject }
char *szModule;
- DWORD dwId;
+ uint32_t dwId;
HICON hIcon, hIconDisabled;
int flags;
wchar_t *pwszTooltip;
@@ -128,7 +128,7 @@ MIR_APP_DLL(int) Srmm_AddIcon(StatusIconData *sid, HPLUGIN pPlugin) /////////////////////////////////////////////////////////////////////////////////////////
-MIR_APP_DLL(void) Srmm_ModifyIcon(MCONTACT hContact, const char *szModule, DWORD iconId, HICON hIcon, const wchar_t *pwszToolTip)
+MIR_APP_DLL(void) Srmm_ModifyIcon(MCONTACT hContact, const char *szModule, uint32_t iconId, HICON hIcon, const wchar_t *pwszToolTip)
{
StatusIconData sid;
sid.szModule = szModule;
@@ -162,7 +162,7 @@ MIR_APP_DLL(void) Srmm_ModifyIcon(MCONTACT hContact, const char *szModule, DWORD NotifyEventHooks(hHookIconsChanged, hContact, (LPARAM)p);
}
-MIR_APP_DLL(void) Srmm_SetIconFlags(MCONTACT hContact, const char *szModule, DWORD iconId, int flags)
+MIR_APP_DLL(void) Srmm_SetIconFlags(MCONTACT hContact, const char *szModule, uint32_t iconId, int flags)
{
StatusIconData sid;
sid.szModule = szModule;
@@ -189,7 +189,7 @@ MIR_APP_DLL(void) Srmm_SetIconFlags(MCONTACT hContact, const char *szModule, DWO /////////////////////////////////////////////////////////////////////////////////////////
-MIR_APP_DLL(void) Srmm_RemoveIcon(const char *szProto, DWORD iconId)
+MIR_APP_DLL(void) Srmm_RemoveIcon(const char *szProto, uint32_t iconId)
{
mir_cslock lck(csIcons);
StatusIconData tmp = { (char *)szProto, iconId };
diff --git a/src/mir_app/src/srmm_toolbar.cpp b/src/mir_app/src/srmm_toolbar.cpp index 97bd6146d9..8d32bc99a8 100644 --- a/src/mir_app/src/srmm_toolbar.cpp +++ b/src/mir_app/src/srmm_toolbar.cpp @@ -130,7 +130,7 @@ MIR_APP_DLL(HANDLE) Srmm_AddButton(const BBButton *bbdi, HPLUGIN _hLang) if (!db_get_s(0, BB_MODULE_NAME, SettingName, &dbv)) { // modulename_buttonID, position_inIM_inCHAT_isLSide_isRSide_CanBeHidden char *token = strtok(dbv.pszVal, "_"); - cbd->m_dwPosition = (DWORD)atoi(token); + cbd->m_dwPosition = (uint32_t)atoi(token); token = strtok(nullptr, "_"); cbd->m_bIMButton = atoi(token) != 0; token = strtok(nullptr, "_"); @@ -160,7 +160,7 @@ MIR_APP_DLL(int) Srmm_GetButtonState(HWND hwndDlg, BBButton *bbdi) if (hwndDlg == nullptr || bbdi == nullptr) return 1; - DWORD tempCID = 0; + uint32_t tempCID = 0; bbdi->bbbFlags = 0; for (auto &cbd : arButtonsList) if (!mir_strcmp(cbd->m_pszModuleName, bbdi->pszModuleName) && (cbd->m_dwButtonID == bbdi->dwButtonID)) { @@ -181,7 +181,7 @@ MIR_APP_DLL(int) Srmm_SetButtonState(MCONTACT hContact, BBButton *bbdi) if (hContact == 0 || bbdi == nullptr) return 1; - DWORD tempCID = 0; + uint32_t tempCID = 0; for (auto &cbd : arButtonsList) if (!mir_strcmp(cbd->m_pszModuleName, bbdi->pszModuleName) && (cbd->m_dwButtonID == bbdi->dwButtonID)) { tempCID = cbd->m_dwButtonCID; @@ -467,7 +467,7 @@ class CSrmmToolbarOptions : public CDlgBase { bool RSide = false; int count = 10; - DWORD loc_sepcout = 0; + uint32_t loc_sepcout = 0; wchar_t strbuf[128]; TVITEMEX tvi; @@ -521,7 +521,7 @@ class CSrmmToolbarOptions : public CDlgBase } } - cbd->m_dwPosition = (DWORD)count; + cbd->m_dwPosition = (uint32_t)count; CB_WriteButtonSettings(0, cbd); if (!(cbd->m_opFlags & BBSF_NTBDESTRUCT)) diff --git a/src/mir_app/src/visibility.cpp b/src/mir_app/src/visibility.cpp index ad3af25f07..2045240149 100644 --- a/src/mir_app/src/visibility.cpp +++ b/src/mir_app/src/visibility.cpp @@ -105,7 +105,7 @@ static void SetAllContactIcons(HWND hwndList) if (hItem == nullptr)
continue;
- DWORD flags;
+ uint32_t flags;
uint16_t status;
char *szProto = Proto_GetBaseAccountName(hContact);
if (szProto == nullptr) {
@@ -188,7 +188,7 @@ static INT_PTR CALLBACK DlgProcVisibilityOpts(HWND hwndDlg, UINT msg, WPARAM, LP break;
// Find clicked item
- DWORD hitFlags;
+ uint32_t hitFlags;
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_HITTEST, (WPARAM)&hitFlags, MAKELPARAM(nm->pt.x, nm->pt.y));
if (hItem == nullptr)
break;
diff --git a/src/mir_core/src/Windows/CCtrlClc.cpp b/src/mir_core/src/Windows/CCtrlClc.cpp index 8dfbfc5f06..ae9c80dbba 100644 --- a/src/mir_core/src/Windows/CCtrlClc.cpp +++ b/src/mir_core/src/Windows/CCtrlClc.cpp @@ -77,7 +77,7 @@ void CCtrlClc::EnsureVisible(HANDLE hItem, bool partialOk) { SendMessage(m_hwnd, CLM_ENSUREVISIBLE, (WPARAM)hItem, partialOk ? TRUE : FALSE); } -void CCtrlClc::Expand(HANDLE hItem, DWORD flags) +void CCtrlClc::Expand(HANDLE hItem, uint32_t flags) { SendMessage(m_hwnd, CLM_EXPAND, (WPARAM)hItem, flags); } @@ -105,7 +105,7 @@ HWND CCtrlClc::GetEditControl() const { return (HWND)SendMessage(m_hwnd, CLM_GETEDITCONTROL, 0, 0); } -DWORD CCtrlClc::GetExpand(HANDLE hItem) const +uint32_t CCtrlClc::GetExpand(HANDLE hItem) const { return SendMessage(m_hwnd, CLM_GETEXPAND, (WPARAM)hItem, 0); } @@ -130,7 +130,7 @@ HANDLE CCtrlClc::GetSelection() const { return (HANDLE)SendMessage(m_hwnd, CLM_GETSELECTION, 0, 0); } -HANDLE CCtrlClc::HitTest(int x, int y, DWORD *hitTest) const +HANDLE CCtrlClc::HitTest(int x, int y, uint32_t *hitTest) const { return (HANDLE)SendMessage(m_hwnd, CLM_HITTEST, (WPARAM)hitTest, MAKELPARAM(x,y)); } @@ -182,15 +182,15 @@ void CCtrlClc::SetUseGroups(bool state) { SendMessage(m_hwnd, CLM_SETUSEGROUPS, state ? 1 : 0, 0); } -void CCtrlClc::SetOfflineModes(DWORD modes) +void CCtrlClc::SetOfflineModes(uint32_t modes) { SendMessage(m_hwnd, CLM_SETOFFLINEMODES, modes, 0); } -DWORD CCtrlClc::GetExStyle() const +uint32_t CCtrlClc::GetExStyle() const { return SendMessage(m_hwnd, CLM_GETEXSTYLE, 0, 0); } -void CCtrlClc::SetExStyle(DWORD exStyle) +void CCtrlClc::SetExStyle(uint32_t exStyle) { SendMessage(m_hwnd, CLM_SETEXSTYLE, (WPARAM)exStyle, 0); } @@ -202,6 +202,6 @@ int CCtrlClc::GetItemType(HANDLE hItem) const { return SendMessage(m_hwnd, CLM_GETITEMTYPE, (WPARAM)hItem, 0); } -HANDLE CCtrlClc::GetNextItem(HANDLE hItem, DWORD flags) const +HANDLE CCtrlClc::GetNextItem(HANDLE hItem, uint32_t flags) const { return (HANDLE)SendMessage(m_hwnd, CLM_GETNEXTITEM, (WPARAM)flags, (LPARAM)hItem); } diff --git a/src/mir_core/src/Windows/CCtrlColor.cpp b/src/mir_core/src/Windows/CCtrlColor.cpp index 47a49308df..de7371ef96 100644 --- a/src/mir_core/src/Windows/CCtrlColor.cpp +++ b/src/mir_core/src/Windows/CCtrlColor.cpp @@ -50,12 +50,12 @@ void CCtrlColor::OnReset() SetColor(LoadInt()); } -DWORD CCtrlColor::GetColor() +uint32_t CCtrlColor::GetColor() { return ::SendMessage(m_hwnd, CPM_GETCOLOUR, 0, 0); } -void CCtrlColor::SetColor(DWORD dwValue) +void CCtrlColor::SetColor(uint32_t dwValue) { ::SendMessage(m_hwnd, CPM_SETCOLOUR, 0, dwValue); } diff --git a/src/mir_core/src/Windows/CCtrlData.cpp b/src/mir_core/src/Windows/CCtrlData.cpp index ed6f1f194f..a2cd052054 100644 --- a/src/mir_core/src/Windows/CCtrlData.cpp +++ b/src/mir_core/src/Windows/CCtrlData.cpp @@ -41,7 +41,7 @@ void CCtrlData::OnInit() OnReset(); } -void CCtrlData::CreateDbLink(const char* szModuleName, const char* szSetting, uint8_t type, DWORD iValue) +void CCtrlData::CreateDbLink(const char* szModuleName, const char* szSetting, uint8_t type, uint32_t iValue) { m_dbLink = new CDbLink(szModuleName, szSetting, type, iValue); } diff --git a/src/mir_core/src/Windows/CCtrlListView.cpp b/src/mir_core/src/Windows/CCtrlListView.cpp index e6ca1276ce..7f0d188b1c 100644 --- a/src/mir_core/src/Windows/CCtrlListView.cpp +++ b/src/mir_core/src/Windows/CCtrlListView.cpp @@ -210,7 +210,7 @@ void CCtrlListView::GetCaretPos(CContextMenuPos &pos) const } // classic api -DWORD CCtrlListView::ApproximateViewRect(int cx, int cy, int iCount) +uint32_t CCtrlListView::ApproximateViewRect(int cx, int cy, int iCount) { return ListView_ApproximateViewRect(m_hwnd, cx, cy, iCount); } void CCtrlListView::Arrange(UINT code) @@ -270,7 +270,7 @@ int CCtrlListView::GetCountPerPage() const HWND CCtrlListView::GetEditControl() const { return ListView_GetEditControl(m_hwnd); } -DWORD CCtrlListView::GetExtendedListViewStyle() const +uint32_t CCtrlListView::GetExtendedListViewStyle() const { return ListView_GetExtendedListViewStyle(m_hwnd); } void CCtrlListView::GetGroupMetrics(LVGROUPMETRICS *pGroupMetrics) const @@ -285,7 +285,7 @@ HCURSOR CCtrlListView::GetHotCursor() const INT CCtrlListView::GetHotItem() const { return ListView_GetHotItem(m_hwnd); } -DWORD CCtrlListView::GetHoverTime() const +uint32_t CCtrlListView::GetHoverTime() const { return ListView_GetHoverTime(m_hwnd); } HIMAGELIST CCtrlListView::GetImageList(int iImageList) const @@ -315,7 +315,7 @@ void CCtrlListView::GetItemPosition(int i, POINT *ppt) const void CCtrlListView::GetItemRect(int i, RECT *prc, int code) const { ListView_GetItemRect(m_hwnd, i, prc, code); } -DWORD CCtrlListView::GetItemSpacing(BOOL fSmall) const +uint32_t CCtrlListView::GetItemSpacing(BOOL fSmall) const { return ListView_GetItemSpacing(m_hwnd, fSmall); } UINT CCtrlListView::GetItemState(int i, UINT mask) const @@ -372,7 +372,7 @@ int CCtrlListView::GetTopIndex() const BOOL CCtrlListView::GetUnicodeFormat() const { return ListView_GetUnicodeFormat(m_hwnd); } -DWORD CCtrlListView::GetView() const +uint32_t CCtrlListView::GetView() const { return ListView_GetView(m_hwnd); } BOOL CCtrlListView::GetViewRect(RECT *prc) const @@ -444,10 +444,10 @@ BOOL CCtrlListView::SetColumnOrderArray(int iCount, int *lpiArray) BOOL CCtrlListView::SetColumnWidth(int iCol, int cx) { return ListView_SetColumnWidth(m_hwnd, iCol, cx); } -void CCtrlListView::SetExtendedListViewStyle(DWORD dwExStyle) +void CCtrlListView::SetExtendedListViewStyle(uint32_t dwExStyle) { ListView_SetExtendedListViewStyle(m_hwnd, dwExStyle); } -void CCtrlListView::SetExtendedListViewStyleEx(DWORD dwExMask, DWORD dwExStyle) +void CCtrlListView::SetExtendedListViewStyleEx(uint32_t dwExMask, uint32_t dwExStyle) { ListView_SetExtendedListViewStyleEx(m_hwnd, dwExMask, dwExStyle); } int CCtrlListView::SetGroupInfo(int iGroupId, PLVGROUP pgrp) @@ -462,10 +462,10 @@ HCURSOR CCtrlListView::SetHotCursor(HCURSOR hCursor) INT CCtrlListView::SetHotItem(INT iIndex) { return ListView_SetHotItem(m_hwnd, iIndex); } -void CCtrlListView::SetHoverTime(DWORD dwHoverTime) +void CCtrlListView::SetHoverTime(uint32_t dwHoverTime) { ListView_SetHoverTime(m_hwnd, dwHoverTime); } -DWORD CCtrlListView::SetIconSpacing(int cx, int cy) +uint32_t CCtrlListView::SetIconSpacing(int cx, int cy) { return ListView_SetIconSpacing(m_hwnd, cx, cy); } HIMAGELIST CCtrlListView::SetImageList(HIMAGELIST himl, int iImageList) @@ -486,7 +486,7 @@ BOOL CCtrlListView::SetItem(const LVITEM *pitem) void CCtrlListView::SetItemCount(int cItems) { ListView_SetItemCount(m_hwnd, cItems); } -void CCtrlListView::SetItemCountEx(int cItems, DWORD dwFlags) +void CCtrlListView::SetItemCountEx(int cItems, uint32_t dwFlags) { ListView_SetItemCountEx(m_hwnd, cItems, dwFlags); } BOOL CCtrlListView::SetItemPosition(int i, int x, int y) @@ -528,7 +528,7 @@ HWND CCtrlListView::SetToolTips(HWND ToolTip) BOOL CCtrlListView::SetUnicodeFormat(BOOL fUnicode) { return ListView_SetUnicodeFormat(m_hwnd, fUnicode); } -int CCtrlListView::SetView(DWORD iView) +int CCtrlListView::SetView(uint32_t iView) { return ListView_SetView(m_hwnd, iView); } void CCtrlListView::SetWorkAreas(INT nWorkAreas, LPRECT lprc) diff --git a/src/mir_core/src/Windows/CCtrlRichEdit.cpp b/src/mir_core/src/Windows/CCtrlRichEdit.cpp index 3f0f96fc1c..0614be90ba 100644 --- a/src/mir_core/src/Windows/CCtrlRichEdit.cpp +++ b/src/mir_core/src/Windows/CCtrlRichEdit.cpp @@ -68,7 +68,7 @@ int CCtrlRichEdit::SetRichTextRtf(const char *text) static DWORD CALLBACK MessageStreamCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb) { - static DWORD dwRead; + static uint32_t dwRead; char **ppText = (char **)dwCookie; if (*ppText == nullptr) { @@ -92,7 +92,7 @@ static DWORD CALLBACK MessageStreamCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, L char* CCtrlRichEdit::GetRichTextRtf(bool bText, bool bSelection) const { char *pszText = nullptr; - DWORD dwFlags = SF_USECODEPAGE | (CP_UTF8 << 16); + uint32_t dwFlags = SF_USECODEPAGE | (CP_UTF8 << 16); if (bText) dwFlags |= SF_TEXT; else diff --git a/src/mir_core/src/Windows/CCtrlTreeView.cpp b/src/mir_core/src/Windows/CCtrlTreeView.cpp index 08b4d57d7b..0ed9057275 100644 --- a/src/mir_core/src/Windows/CCtrlTreeView.cpp +++ b/src/mir_core/src/Windows/CCtrlTreeView.cpp @@ -608,7 +608,7 @@ void CCtrlTreeView::EnsureVisible(HTREEITEM hItem) { TreeView_EnsureVisible(m_hwnd, hItem); } -void CCtrlTreeView::Expand(HTREEITEM hItem, DWORD flag) +void CCtrlTreeView::Expand(HTREEITEM hItem, uint32_t flag) { TreeView_Expand(m_hwnd, hItem, flag); } @@ -616,7 +616,7 @@ COLORREF CCtrlTreeView::GetBkColor() const { return TreeView_GetBkColor(m_hwnd); } -DWORD CCtrlTreeView::GetCheckState(HTREEITEM hItem) const +uint32_t CCtrlTreeView::GetCheckState(HTREEITEM hItem) const { return TreeView_GetCheckState(m_hwnd, hItem); } @@ -664,7 +664,7 @@ void CCtrlTreeView::GetItemRect(HTREEITEM hItem, RECT *rcItem, BOOL fItemRect) c { TreeView_GetItemRect(m_hwnd, hItem, rcItem, fItemRect); } -DWORD CCtrlTreeView::GetItemState(HTREEITEM hItem, DWORD stateMask) const +uint32_t CCtrlTreeView::GetItemState(HTREEITEM hItem, uint32_t stateMask) const { return TreeView_GetItemState(m_hwnd, hItem, stateMask); } @@ -676,7 +676,7 @@ COLORREF CCtrlTreeView::GetLineColor() const { return TreeView_GetLineColor(m_hwnd); } -HTREEITEM CCtrlTreeView::GetNextItem(HTREEITEM hItem, DWORD flag) const +HTREEITEM CCtrlTreeView::GetNextItem(HTREEITEM hItem, uint32_t flag) const { return TreeView_GetNextItem(m_hwnd, hItem, flag); } @@ -704,7 +704,7 @@ HTREEITEM CCtrlTreeView::GetRoot() const { return TreeView_GetRoot(m_hwnd); } -DWORD CCtrlTreeView::GetScrollTime() const +uint32_t CCtrlTreeView::GetScrollTime() const { return TreeView_GetScrollTime(m_hwnd); } @@ -736,7 +736,7 @@ HTREEITEM CCtrlTreeView::InsertItem(TVINSERTSTRUCT *tvis) { return TreeView_InsertItem(m_hwnd, tvis); } -void CCtrlTreeView::Select(HTREEITEM hItem, DWORD flag) +void CCtrlTreeView::Select(HTREEITEM hItem, uint32_t flag) { TreeView_Select(m_hwnd, hItem, flag); } @@ -756,7 +756,7 @@ COLORREF CCtrlTreeView::SetBkColor(COLORREF clBack) { return TreeView_SetBkColor(m_hwnd, clBack); } -void CCtrlTreeView::SetCheckState(HTREEITEM hItem, DWORD state) +void CCtrlTreeView::SetCheckState(HTREEITEM hItem, uint32_t state) { TreeView_SetCheckState(m_hwnd, hItem, state); } @@ -784,7 +784,7 @@ void CCtrlTreeView::SetItemHeight(short cyItem) { TreeView_SetItemHeight(m_hwnd, cyItem); } -void CCtrlTreeView::SetItemState(HTREEITEM hItem, DWORD state, DWORD stateMask) +void CCtrlTreeView::SetItemState(HTREEITEM hItem, uint32_t state, uint32_t stateMask) { TreeView_SetItemState(m_hwnd, hItem, state, stateMask); } diff --git a/src/mir_core/src/Windows/CDbLink.cpp b/src/mir_core/src/Windows/CDbLink.cpp index 4712550170..157c85ff52 100644 --- a/src/mir_core/src/Windows/CDbLink.cpp +++ b/src/mir_core/src/Windows/CDbLink.cpp @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ///////////////////////////////////////////////////////////////////////////////////////// // CDbLink class -CDbLink::CDbLink(const char *szModule, const char *szSetting, uint8_t type, DWORD iValue) +CDbLink::CDbLink(const char *szModule, const char *szSetting, uint8_t type, uint32_t iValue) : CDataLink(type) { m_szModule = mir_strdup(szModule); @@ -54,7 +54,7 @@ CDbLink::~CDbLink() db_free(&dbv); } -DWORD CDbLink::LoadInt() +uint32_t CDbLink::LoadInt() { switch (m_type) { case DBVT_BYTE: return db_get_b(0, m_szModule, m_szSetting, m_iDefault); @@ -64,7 +64,7 @@ DWORD CDbLink::LoadInt() } } -void CDbLink::SaveInt(DWORD value) +void CDbLink::SaveInt(uint32_t value) { switch (m_type) { case DBVT_BYTE: db_set_b(0, m_szModule, m_szSetting, (uint8_t)value); break; diff --git a/src/mir_core/src/Windows/CDlgBase.cpp b/src/mir_core/src/Windows/CDlgBase.cpp index 2a1dfd4140..9048faf9fa 100644 --- a/src/mir_core/src/Windows/CDlgBase.cpp +++ b/src/mir_core/src/Windows/CDlgBase.cpp @@ -151,7 +151,7 @@ void CDlgBase::Show(int nCmdShow) ///////////////////////////////////////////////////////////////////////////////////////// -void CDlgBase::CreateLink(CCtrlData& ctrl, const char *szSetting, uint8_t type, DWORD iValue) +void CDlgBase::CreateLink(CCtrlData& ctrl, const char *szSetting, uint8_t type, uint32_t iValue) { ctrl.CreateDbLink(m_pPlugin.getModule(), szSetting, type, iValue); } diff --git a/src/mir_core/src/Windows/langpack.cpp b/src/mir_core/src/Windows/langpack.cpp index e43a2c1b33..c509acfcda 100644 --- a/src/mir_core/src/Windows/langpack.cpp +++ b/src/mir_core/src/Windows/langpack.cpp @@ -41,7 +41,7 @@ static BOOL bModuleInitialized = FALSE; struct LangPackEntry { - DWORD englishHash; + uint32_t englishHash; char *szLocal; char *utfLocal; wchar_t *wszLocal; @@ -413,7 +413,7 @@ MIR_CORE_DLL(int) LoadLangPack(const wchar_t *ptszLangPack) langPack.flags = 0; // exists & not a directory? - DWORD dwAttrib = GetFileAttributes(tszFullPath); + uint32_t dwAttrib = GetFileAttributes(tszFullPath); if (dwAttrib == INVALID_FILE_ATTRIBUTES || (dwAttrib & FILE_ATTRIBUTE_DIRECTORY)) return 3; @@ -621,7 +621,7 @@ MIR_CORE_DLL(void) Langpack_SortDuplicates(void) return; LangPackEntry *s = g_pEntries + 1, *d = s, *pLast = g_pEntries; - DWORD dwSavedHash = g_pEntries->englishHash; + uint32_t dwSavedHash = g_pEntries->englishHash; bool bSortNeeded = false; for (int i = 1; i < g_entryCount; i++, s++) { diff --git a/src/mir_core/src/Windows/miranda.cpp b/src/mir_core/src/Windows/miranda.cpp index ba7ac7bf96..15bd65d660 100644 --- a/src/mir_core/src/Windows/miranda.cpp +++ b/src/mir_core/src/Windows/miranda.cpp @@ -43,7 +43,7 @@ HINSTANCE g_hInst = nullptr; HCURSOR g_hCursorNS, g_hCursorWE; HANDLE hThreadQueueEmpty; -DWORD mir_tls = 0; +uint32_t mir_tls = 0; ///////////////////////////////////////////////////////////////////////////////////////// @@ -133,7 +133,7 @@ MIR_CORE_DLL(void) UnloadCoreModule(void) ///////////////////////////////////////////////////////////////////////////////////////// // entry point -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID) +BOOL WINAPI DllMain(HINSTANCE hinstDLL, uint32_t fdwReason, LPVOID) { if (fdwReason == DLL_PROCESS_ATTACH) { g_hInst = hinstDLL; diff --git a/src/mir_core/src/Windows/path.cpp b/src/mir_core/src/Windows/path.cpp index a09c44a1cb..18c012a77b 100644 --- a/src/mir_core/src/Windows/path.cpp +++ b/src/mir_core/src/Windows/path.cpp @@ -102,7 +102,7 @@ MIR_CORE_DLL(int) CreateDirectoryTree(const char *szDir) if (szDir == nullptr) return 1; - DWORD dwAttributes = GetFileAttributesA(szDir); + uint32_t dwAttributes = GetFileAttributesA(szDir); if (dwAttributes != INVALID_FILE_ATTRIBUTES && (dwAttributes & FILE_ATTRIBUTE_DIRECTORY)) return 0; @@ -191,7 +191,7 @@ MIR_CORE_DLL(int) CreateDirectoryTreeW(const wchar_t *szDir) if (szDir == nullptr) return 1; - DWORD dwAttributes = GetFileAttributesW(szDir); + uint32_t dwAttributes = GetFileAttributesW(szDir); if (dwAttributes != INVALID_FILE_ATTRIBUTES && (dwAttributes & FILE_ATTRIBUTE_DIRECTORY)) return 0; diff --git a/src/mir_core/src/Windows/resizer.cpp b/src/mir_core/src/Windows/resizer.cpp index 1c4ed5631e..46e4b48e85 100644 --- a/src/mir_core/src/Windows/resizer.cpp +++ b/src/mir_core/src/Windows/resizer.cpp @@ -28,20 +28,20 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct START_OF_DLGITEMTEMPLATEEX { - DWORD helpID; - DWORD exStyle; - DWORD style; + uint32_t helpID; + uint32_t exStyle; + uint32_t style; short x, y, cx, cy; - DWORD id; + uint32_t id; }; struct START_OF_DLGTEMPLATEEX { uint16_t dlgVer; uint16_t signature; - DWORD helpID; - DWORD exStyle; - DWORD style; + uint32_t helpID; + uint32_t exStyle; + uint32_t style; uint16_t cDlgItems; short x, y, cx, cy; }; diff --git a/src/mir_core/src/Windows/threads.cpp b/src/mir_core/src/Windows/threads.cpp index fdd9f5e85f..1134533877 100644 --- a/src/mir_core/src/Windows/threads.cpp +++ b/src/mir_core/src/Windows/threads.cpp @@ -42,7 +42,7 @@ static int MirandaWaitForMutex(HANDLE hEvent) { // will get WAIT_IO_COMPLETE for QueueUserAPC() which isnt a result for (;;) { - DWORD rc = MsgWaitForMultipleObjectsEx(1, &hEvent, INFINITE, QS_ALLINPUT, MWMO_ALERTABLE); + uint32_t rc = MsgWaitForMultipleObjectsEx(1, &hEvent, INFINITE, QS_ALLINPUT, MWMO_ALERTABLE); if (rc == WAIT_OBJECT_0 + 1) { MSG msg; while (PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE)) { @@ -63,7 +63,7 @@ static int MirandaWaitForMutex(HANDLE hEvent) ///////////////////////////////////////////////////////////////////////////////////////// // exception handling -static DWORD __cdecl sttDefaultFilter(DWORD, EXCEPTION_POINTERS*) +static uint32_t __cdecl sttDefaultFilter(uint32_t, EXCEPTION_POINTERS*) { return EXCEPTION_EXECUTE_HANDLER; } @@ -88,7 +88,7 @@ MIR_CORE_DLL(pfnExceptionFilter) SetExceptionFilter(pfnExceptionFilter _mirandaE struct THREAD_WAIT_ENTRY { - DWORD dwThreadId; // valid if hThread isn't signalled + uint32_t dwThreadId; // valid if hThread isn't signalled HANDLE hThread; HINSTANCE hOwner; void *pObject, *pEntryPoint; @@ -146,7 +146,7 @@ MIR_CORE_DLL(HANDLE) mir_forkthread(void(__cdecl *threadcode)(void*), void *arg) ///////////////////////////////////////////////////////////////////////////////////////// // forkthreadex - starts a new thread with the extended info and returns the thread id -DWORD WINAPI forkthreadex_r(void * arg) +DWORD WINAPI forkthreadex_r(void *arg) { struct FORK_ARG *fa = (struct FORK_ARG *)arg; pThreadFuncEx threadcode = fa->threadcodeex; @@ -249,7 +249,7 @@ MIR_CORE_DLL(void) KillObjectThreads(void* owner) if (owner == nullptr) return; - DWORD dwTicks = GetTickCount() + 6000; + uint32_t dwTicks = GetTickCount() + 6000; HANDLE hThread = mir_forkthread(KillObjectThreadsWorker, owner); while (GetTickCount() < dwTicks) { int res = MsgWaitForMultipleObjectsEx(1, &hThread, 50, QS_ALLPOSTMESSAGE | QS_ALLINPUT, MWMO_ALERTABLE); @@ -350,7 +350,7 @@ MIR_CORE_DLL(INT_PTR) Thread_Push(HINSTANCE hInst, void* pOwner) MIR_CORE_DLL(INT_PTR) Thread_Pop() { - DWORD dwThreadId = GetCurrentThreadId(); + uint32_t dwThreadId = GetCurrentThreadId(); mir_cslock lck(csThreads); THREAD_WAIT_ENTRY *p = threads.find((THREAD_WAIT_ENTRY*)&dwThreadId); @@ -372,15 +372,15 @@ MIR_CORE_DLL(INT_PTR) Thread_Pop() ///////////////////////////////////////////////////////////////////////////////////////// -const DWORD MS_VC_EXCEPTION=0x406D1388; +const uint32_t MS_VC_EXCEPTION=0x406D1388; #pragma pack(push,8) typedef struct tagTHREADNAME_INFO { - DWORD dwType; // Must be 0x1000. + uint32_t dwType; // Must be 0x1000. LPCSTR szName; // Pointer to name (in user addr space). - DWORD dwThreadID; // Thread ID (-1=caller thread). - DWORD dwFlags; // Reserved for future use, must be zero. + uint32_t dwThreadID; // Thread ID (-1=caller thread). + uint32_t dwFlags; // Reserved for future use, must be zero. } THREADNAME_INFO; #pragma pack(pop) diff --git a/src/mir_core/src/Windows/timezones.cpp b/src/mir_core/src/Windows/timezones.cpp index 8de5704d30..1627c40ad6 100644 --- a/src/mir_core/src/Windows/timezones.cpp +++ b/src/mir_core/src/Windows/timezones.cpp @@ -27,7 +27,7 @@ simple UTC offsets. #include "../stdafx.h" -typedef DWORD (WINAPI *pfnGetDynamicTimeZoneInformation_t)(DYNAMIC_TIME_ZONE_INFORMATION *pdtzi); +typedef uint32_t (WINAPI *pfnGetDynamicTimeZoneInformation_t)(DYNAMIC_TIME_ZONE_INFORMATION *pdtzi); static pfnGetDynamicTimeZoneInformation_t pfnGetDynamicTimeZoneInformation; struct REG_TZI_FORMAT @@ -58,7 +58,7 @@ struct MIM_TIMEZONE struct TZ_INT_INFO { - DWORD timestamp; // last time updated + uint32_t timestamp; // last time updated MIM_TIMEZONE myTZ; // set to my own timezone }; @@ -71,7 +71,7 @@ static LIST<MIM_TIMEZONE> g_timezonesBias(55, MIM_TIMEZONE::compareBias); void UnixTimeToFileTime(mir_time ts, LPFILETIME pft) { unsigned __int64 ll = UInt32x32To64(ts, 10000000) + 116444736000000000i64; - pft->dwLowDateTime = (DWORD)ll; + pft->dwLowDateTime = (uint32_t)ll; pft->dwHighDateTime = ll >> 32; } @@ -89,7 +89,7 @@ void FormatTime(const SYSTEMTIME *st, const wchar_t *szFormat, wchar_t *szDest, CMStringW tszTemp; for (const wchar_t* pFormat = szFormat; *pFormat; ++pFormat) { - DWORD fmt = 0; + uint32_t fmt = 0; bool date = false, iso = false; switch (*pFormat) { case 't': @@ -211,7 +211,7 @@ static bool IsSameTime(MIM_TIMEZONE *tz) return st.wHour == stl.wHour && st.wMinute == stl.wMinute; } -MIR_CORE_DLL(HANDLE) TimeZone_CreateByName(LPCTSTR tszName, DWORD dwFlags) +MIR_CORE_DLL(HANDLE) TimeZone_CreateByName(LPCTSTR tszName, uint32_t dwFlags) { if (tszName == nullptr) return (dwFlags & (TZF_DIFONLY | TZF_KNOWNONLY)) ? nullptr : &myInfo.myTZ; @@ -232,7 +232,7 @@ MIR_CORE_DLL(HANDLE) TimeZone_CreateByName(LPCTSTR tszName, DWORD dwFlags) return tz; } -MIR_CORE_DLL(HANDLE) TimeZone_CreateByContact(MCONTACT hContact, LPCSTR szModule, DWORD dwFlags) +MIR_CORE_DLL(HANDLE) TimeZone_CreateByContact(MCONTACT hContact, LPCSTR szModule, uint32_t dwFlags) { if (hContact == NULL && szModule == nullptr) return (dwFlags & (TZF_DIFONLY | TZF_KNOWNONLY)) ? nullptr : &myInfo.myTZ; @@ -300,7 +300,7 @@ MIR_CORE_DLL(void) TimeZone_StoreByContact(MCONTACT hContact, LPCSTR szModule, H } } -MIR_CORE_DLL(int) TimeZone_PrintDateTime(HANDLE hTZ, LPCTSTR szFormat, LPTSTR szDest, size_t cbDest, DWORD dwFlags) +MIR_CORE_DLL(int) TimeZone_PrintDateTime(HANDLE hTZ, LPCTSTR szFormat, LPTSTR szDest, size_t cbDest, uint32_t dwFlags) { MIM_TIMEZONE *tz = (MIM_TIMEZONE*)hTZ; if (tz == nullptr && (dwFlags & (TZF_DIFONLY | TZF_KNOWNONLY))) @@ -317,7 +317,7 @@ MIR_CORE_DLL(int) TimeZone_PrintDateTime(HANDLE hTZ, LPCTSTR szFormat, LPTSTR sz return 0; } -MIR_CORE_DLL(int) TimeZone_GetSystemTime(HANDLE hTZ, mir_time ts, SYSTEMTIME *dest, DWORD dwFlags) +MIR_CORE_DLL(int) TimeZone_GetSystemTime(HANDLE hTZ, mir_time ts, SYSTEMTIME *dest, uint32_t dwFlags) { if (dest == nullptr) return 2; @@ -345,7 +345,7 @@ MIR_CORE_DLL(int) TimeZone_GetSystemTime(HANDLE hTZ, mir_time ts, SYSTEMTIME *de return 0; } -MIR_CORE_DLL(int) TimeZone_PrintTimeStamp(HANDLE hTZ, mir_time ts, LPCTSTR szFormat, LPTSTR szDest, size_t cbDest, DWORD dwFlags) +MIR_CORE_DLL(int) TimeZone_PrintTimeStamp(HANDLE hTZ, mir_time ts, LPCTSTR szFormat, LPTSTR szDest, size_t cbDest, uint32_t dwFlags) { SYSTEMTIME st; if (!TimeZone_GetSystemTime(hTZ, ts, &st, dwFlags)) @@ -384,7 +384,7 @@ struct ListMessages static const ListMessages lbMessages = { LB_ADDSTRING, LB_GETCURSEL, LB_SETCURSEL, LB_GETITEMDATA, LB_SETITEMDATA }; static const ListMessages cbMessages = { CB_ADDSTRING, CB_GETCURSEL, CB_SETCURSEL, CB_GETITEMDATA, CB_SETITEMDATA }; -static const ListMessages* GetListMessages(HWND hWnd, DWORD dwFlags) +static const ListMessages* GetListMessages(HWND hWnd, uint32_t dwFlags) { if (hWnd == nullptr) return nullptr; @@ -407,7 +407,7 @@ static const ListMessages* GetListMessages(HWND hWnd, DWORD dwFlags) /////////////////////////////////////////////////////////////////////////////// -MIR_CORE_DLL(int) TimeZone_SelectListItem(MCONTACT hContact, LPCSTR szModule, HWND hWnd, DWORD dwFlags) +MIR_CORE_DLL(int) TimeZone_SelectListItem(MCONTACT hContact, LPCSTR szModule, HWND hWnd, uint32_t dwFlags) { const ListMessages *lstMsg = GetListMessages(hWnd, dwFlags); if (lstMsg == nullptr) @@ -444,7 +444,7 @@ MIR_CORE_DLL(int) TimeZone_SelectListItem(MCONTACT hContact, LPCSTR szModule, HW return iSelection; } -MIR_CORE_DLL(int) TimeZone_PrepareList(MCONTACT hContact, LPCSTR szModule, HWND hWnd, DWORD dwFlags) +MIR_CORE_DLL(int) TimeZone_PrepareList(MCONTACT hContact, LPCSTR szModule, HWND hWnd, uint32_t dwFlags) { const ListMessages *lstMsg = GetListMessages(hWnd, dwFlags); if (lstMsg == nullptr) @@ -460,7 +460,7 @@ MIR_CORE_DLL(int) TimeZone_PrepareList(MCONTACT hContact, LPCSTR szModule, HWND return TimeZone_SelectListItem(hContact, szModule, hWnd, dwFlags); } -MIR_CORE_DLL(void) TimeZone_StoreListResult(MCONTACT hContact, LPCSTR szModule, HWND hWnd, DWORD dwFlags) +MIR_CORE_DLL(void) TimeZone_StoreListResult(MCONTACT hContact, LPCSTR szModule, HWND hWnd, uint32_t dwFlags) { if (szModule == nullptr) szModule = "UserInfo"; @@ -478,7 +478,7 @@ MIR_CORE_DLL(void) TimeZone_StoreListResult(MCONTACT hContact, LPCSTR szModule, /////////////////////////////////////////////////////////////////////////////// -MIR_CORE_DLL(DWORD) TimeZone_ToLocal(DWORD timeVal) +MIR_CORE_DLL(uint32_t) TimeZone_ToLocal(uint32_t timeVal) { return TimeZone_UtcToLocal(nullptr, (mir_time)timeVal); } @@ -499,7 +499,7 @@ MIR_CORE_DLL(wchar_t*) TimeZone_ToStringW(mir_time timeVal, const wchar_t *wszFo /////////////////////////////////////////////////////////////////////////////// -void GetLocalizedString(HKEY hSubKey, const wchar_t *szName, wchar_t *szBuf, DWORD cbLen) +void GetLocalizedString(HKEY hSubKey, const wchar_t *szName, wchar_t *szBuf, uint32_t cbLen) { DWORD dwLength = cbLen * sizeof(wchar_t); RegQueryValueEx(hSubKey, szName, nullptr, nullptr, (unsigned char *)szBuf, &dwLength); @@ -549,7 +549,7 @@ void InitTimeZones(void) pfnGetDynamicTimeZoneInformation = (pfnGetDynamicTimeZoneInformation_t)GetProcAddress(GetModuleHandle(L"kernel32"), "GetDynamicTimeZoneInformation"); if (ERROR_SUCCESS == RegOpenKeyEx(HKEY_LOCAL_MACHINE, tszKey, 0, KEY_ENUMERATE_SUB_KEYS, &hKey)) { - DWORD dwIndex = 0; + uint32_t dwIndex = 0; HKEY hSubKey; wchar_t tszName[MIM_TZ_NAMELEN]; diff --git a/src/mir_core/src/Windows/winver.cpp b/src/mir_core/src/Windows/winver.cpp index d519d10478..17103958d0 100644 --- a/src/mir_core/src/Windows/winver.cpp +++ b/src/mir_core/src/Windows/winver.cpp @@ -33,7 +33,7 @@ static int dwWinVer; void InitWinver() { - DWORD dwVer = LOWORD(GetVersion()); + uint32_t dwVer = LOWORD(GetVersion()); dwWinVer = MAKEWORD(HIBYTE(dwVer), LOBYTE(dwVer)); } @@ -152,7 +152,7 @@ MIR_CORE_DLL(BOOL) OS_GetShortString(char *buf, size_t bufSize) #define PRODUCT_PROFESSIONAL_WMC 0x00000067 #endif -typedef BOOL(WINAPI *PGPI)(DWORD, DWORD, DWORD, DWORD, PDWORD); +typedef BOOL(WINAPI *PGPI)(uint32_t, uint32_t, uint32_t, uint32_t, PDWORD); typedef LPCSTR(WINAPI *WGV)(void); MIR_CORE_DLL(BOOL) OS_GetDisplayString(char *buf, size_t bufSize) diff --git a/src/mir_core/src/db.cpp b/src/mir_core/src/db.cpp index 439f5313c4..bb07b04741 100644 --- a/src/mir_core/src/db.cpp +++ b/src/mir_core/src/db.cpp @@ -134,7 +134,7 @@ MIR_CORE_DLL(int) db_get_w(MCONTACT hContact, const char *szModule, const char * return errorValue; } -MIR_CORE_DLL(DWORD) db_get_dw(MCONTACT hContact, const char *szModule, const char *szSetting, DWORD errorValue) +MIR_CORE_DLL(uint32_t) db_get_dw(MCONTACT hContact, const char *szModule, const char *szSetting, uint32_t errorValue) { if (g_pCurrDb != nullptr) { DBVARIANT dbv; @@ -302,7 +302,7 @@ MIR_CORE_DLL(INT_PTR) db_set_w(MCONTACT hContact, const char *szModule, const ch return g_pCurrDb->WriteContactSetting(hContact, &cws); } -MIR_CORE_DLL(INT_PTR) db_set_dw(MCONTACT hContact, const char *szModule, const char *szSetting, DWORD val) +MIR_CORE_DLL(INT_PTR) db_set_dw(MCONTACT hContact, const char *szModule, const char *szSetting, uint32_t val) { if (g_pCurrDb == nullptr) return 1; diff --git a/src/mir_core/src/memory.cpp b/src/mir_core/src/memory.cpp index 3e3d7be69d..fbe05ac6c4 100644 --- a/src/mir_core/src/memory.cpp +++ b/src/mir_core/src/memory.cpp @@ -30,14 +30,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. static int CheckBlock(void* blk) { int result = FALSE; - char* p = (char*)blk - sizeof(DWORD)*2; - DWORD size, *b, *e; + char* p = (char*)blk - sizeof(uint32_t)*2; + uint32_t size, *b, *e; __try { - size = *(DWORD*)p; - b = (DWORD*)&p[ sizeof(DWORD) ]; - e = (DWORD*)&p[ sizeof(DWORD)*2 + size ]; + size = *(uint32_t*)p; + b = (uint32_t*)&p[ sizeof(uint32_t) ]; + e = (uint32_t*)&p[ sizeof(uint32_t)*2 + size ]; if (*b != BLOCK_ALLOCED || *e != BLOCK_ALLOCED) { @@ -73,7 +73,7 @@ MIR_C_CORE_DLL(void*) mir_alloc(size_t size) if (size == 0) return nullptr; - char *p = (char*)malloc(size + sizeof(DWORD)* 3); + char *p = (char*)malloc(size + sizeof(uint32_t)* 3); if (p == nullptr) { #ifdef _MSC_VER OutputDebugStringA("memory overflow\n"); @@ -84,10 +84,10 @@ MIR_C_CORE_DLL(void*) mir_alloc(size_t size) return nullptr; } - *(DWORD*)p = (DWORD)size; - *(DWORD*)&p[sizeof(DWORD)] = BLOCK_ALLOCED; - *(DWORD*)&p[size + sizeof(DWORD)*2] = BLOCK_ALLOCED; - return p + sizeof(DWORD)* 2; + *(uint32_t*)p = (uint32_t)size; + *(uint32_t*)&p[sizeof(uint32_t)] = BLOCK_ALLOCED; + *(uint32_t*)&p[size + sizeof(uint32_t)*2] = BLOCK_ALLOCED; + return p + sizeof(uint32_t)* 2; } /******************************************************************************/ @@ -109,11 +109,11 @@ MIR_C_CORE_DLL(void*) mir_realloc(void* ptr, size_t size) if (ptr != nullptr) { if (!CheckBlock(ptr)) return nullptr; - p = (char*)ptr - sizeof(DWORD)*2; + p = (char*)ptr - sizeof(uint32_t)*2; } else p = nullptr; - p = (char*)realloc(p, size + sizeof(DWORD)*3); + p = (char*)realloc(p, size + sizeof(uint32_t)*3); if (p == nullptr) { #ifdef _MSC_VER OutputDebugStringA("memory overflow\n"); @@ -124,10 +124,10 @@ MIR_C_CORE_DLL(void*) mir_realloc(void* ptr, size_t size) return nullptr; } - *(DWORD*)p = (DWORD)size; - *(DWORD*)&p[sizeof(DWORD)] = BLOCK_ALLOCED; - *(DWORD*)&p[size + sizeof(DWORD)*2] = BLOCK_ALLOCED; - return p + sizeof(DWORD)*2; + *(uint32_t*)p = (uint32_t)size; + *(uint32_t*)&p[sizeof(uint32_t)] = BLOCK_ALLOCED; + *(uint32_t*)&p[size + sizeof(uint32_t)*2] = BLOCK_ALLOCED; + return p + sizeof(uint32_t)*2; } /******************************************************************************/ @@ -135,18 +135,18 @@ MIR_C_CORE_DLL(void*) mir_realloc(void* ptr, size_t size) MIR_C_CORE_DLL(void) mir_free(void* ptr) { char* p; - DWORD size; + uint32_t size; if (ptr == nullptr) return; if (!CheckBlock(ptr)) return; - p = (char*)ptr - sizeof(DWORD)*2; - size = *(DWORD*)p; + p = (char*)ptr - sizeof(uint32_t)*2; + size = *(uint32_t*)p; - *(DWORD*)&p[sizeof(DWORD)] = BLOCK_FREED; - *(DWORD*)&p[size + sizeof(DWORD)*2] = BLOCK_FREED; + *(uint32_t*)&p[sizeof(uint32_t)] = BLOCK_FREED; + *(uint32_t*)&p[size + sizeof(uint32_t)*2] = BLOCK_FREED; free(p); } diff --git a/src/mir_core/src/mir_core.def b/src/mir_core/src/mir_core.def index 15d6529d8e..b9c1d532ca 100644 --- a/src/mir_core/src/mir_core.def +++ b/src/mir_core/src/mir_core.def @@ -477,7 +477,7 @@ mir_wstrcmpi @280 ??0CDataLink@@QAE@ABV0@@Z @636 NONAME
??0CDataLink@@QAE@E@Z @637 NONAME
??0CDbLink@@QAE@ABV0@@Z @638 NONAME
-??0CDbLink@@QAE@PBD0EK@Z @639 NONAME
+??0CDbLink@@QAE@PBD0EI@Z @639 NONAME
??0CDbLink@@QAE@PBD0EPA_W@Z @640 NONAME
??0CDlgBase@@QAE@ABV0@@Z @641 NONAME
??0CDlgBase@@QAE@AAVCMPluginBase@@H@Z @642 NONAME
@@ -527,14 +527,14 @@ mir_wstrcmpi @280 ?AddString@CCtrlCombo@@QAEHPB_WJ@Z @706 NONAME
?AddString@CCtrlListBox@@QAEHPB_WJ@Z @707 NONAME
?AddStringA@CCtrlCombo@@QAEHPBDJ@Z @708 NONAME
-?ApproximateViewRect@CCtrlListView@@QAEKHHH@Z @709 NONAME
+?ApproximateViewRect@CCtrlListView@@QAEIHHH@Z @709 NONAME
?Arrange@CCtrlListView@@QAEXI@Z @710 NONAME
?AutoRebuild@CCtrlClc@@QAEXXZ @712 NONAME
?CancelEditLabel@CCtrlListView@@QAEXXZ @713 NONAME
?Close@CDlgBase@@QAEXXZ @714 NONAME
?Create@CDlgBase@@QAEXXZ @715 NONAME
?CreateDbLink@CCtrlData@@QAEXPAVCDataLink@@@Z @716 NONAME
-?CreateDbLink@CCtrlData@@QAEXPBD0EK@Z @717 NONAME
+?CreateDbLink@CCtrlData@@QAEXPBD0EI@Z @717 NONAME
?CreateDbLink@CCtrlData@@QAEXPBD0PA_W@Z @718 NONAME
?CreateDragImage@CCtrlListView@@QAEPAU_IMAGELIST@@HPAUtagPOINT@@@Z @719 NONAME
?CreateDragImage@CCtrlTreeView@@QAEPAU_IMAGELIST@@PAU_TREEITEM@@@Z @720 NONAME
@@ -566,8 +566,8 @@ mir_wstrcmpi @280 ?EnsureVisible@CCtrlClc@@QAEXPAX_N@Z @749 NONAME
?EnsureVisible@CCtrlListView@@QAEHHH@Z @750 NONAME
?EnsureVisible@CCtrlTreeView@@QAEXPAU_TREEITEM@@@Z @751 NONAME
-?Expand@CCtrlClc@@QAEXPAXK@Z @752 NONAME
-?Expand@CCtrlTreeView@@QAEXPAU_TREEITEM@@K@Z @753 NONAME
+?Expand@CCtrlClc@@QAEXPAXI@Z @752 NONAME
+?Expand@CCtrlTreeView@@QAEXPAU_TREEITEM@@I@Z @753 NONAME
?FindContact@CCtrlClc@@QAEPAXI@Z @754 NONAME
?FindGroup@CCtrlClc@@QAEPAXH@Z @756 NONAME
?FindItem@CCtrlListView@@QAEHHPBUtagLVFINDINFOW@@@Z @757 NONAME
@@ -582,7 +582,7 @@ mir_wstrcmpi @280 ?GetCallbackMask@CCtrlListView@@QBEIXZ @766 NONAME
?GetCheck@CCtrlClc@@QBE_NPAX@Z @767 NONAME
?GetCheckState@CCtrlListView@@QBEHI@Z @768 NONAME
-?GetCheckState@CCtrlTreeView@@QBEKPAU_TREEITEM@@@Z @769 NONAME
+?GetCheckState@CCtrlTreeView@@QBEIPAU_TREEITEM@@@Z @769 NONAME
?GetChild@CCtrlTreeView@@QBEPAU_TREEITEM@@PAU2@@Z @770 NONAME
?GetColumn@CCtrlListView@@QBEXHPAUtagLVCOLUMNW@@@Z @771 NONAME
?GetColumnOrderArray@CCtrlListView@@QBEXHPAH@Z @772 NONAME
@@ -602,9 +602,9 @@ mir_wstrcmpi @280 ?GetEditControl@CCtrlClc@@QBEPAUHWND__@@XZ @786 NONAME
?GetEditControl@CCtrlListView@@QBEPAUHWND__@@XZ @787 NONAME
?GetEditControl@CCtrlTreeView@@QBEPAUHWND__@@XZ @788 NONAME
-?GetExStyle@CCtrlClc@@QBEKXZ @789 NONAME
-?GetExpand@CCtrlClc@@QBEKPAX@Z @790 NONAME
-?GetExtendedListViewStyle@CCtrlListView@@QBEKXZ @791 NONAME
+?GetExStyle@CCtrlClc@@QBEIXZ @789 NONAME
+?GetExpand@CCtrlClc@@QBEIPAX@Z @790 NONAME
+?GetExtendedListViewStyle@CCtrlListView@@QBEIXZ @791 NONAME
?GetExtraColumns@CCtrlClc@@QBEHXZ @792 NONAME
?GetExtraImage@CCtrlClc@@QBEEPAXH@Z @793 NONAME
?GetExtraImageList@CCtrlClc@@QBEPAU_IMAGELIST@@XZ @794 NONAME
@@ -615,7 +615,7 @@ mir_wstrcmpi @280 ?GetHideOfflineRoot@CCtrlClc@@QBE_NXZ @799 NONAME
?GetHotCursor@CCtrlListView@@QBEPAUHICON__@@XZ @800 NONAME
?GetHotItem@CCtrlListView@@QBEHXZ @801 NONAME
-?GetHoverTime@CCtrlListView@@QBEKXZ @802 NONAME
+?GetHoverTime@CCtrlListView@@QBEIXZ @802 NONAME
?GetHwnd@CCtrlBase@@QBEPAUHWND__@@XZ @803 NONAME
?GetHwnd@CDlgBase@@QBEPAUHWND__@@XZ @804 NONAME
?GetISearchString@CCtrlListView@@QBEHPAD@Z @805 NONAME
@@ -639,9 +639,9 @@ mir_wstrcmpi @280 ?GetItemPosition@CCtrlListView@@QBEXHPAUtagPOINT@@@Z @823 NONAME
?GetItemRect@CCtrlListView@@QBEXHPAUtagRECT@@H@Z @824 NONAME
?GetItemRect@CCtrlTreeView@@QBEXPAU_TREEITEM@@PAUtagRECT@@H@Z @825 NONAME
-?GetItemSpacing@CCtrlListView@@QBEKH@Z @826 NONAME
+?GetItemSpacing@CCtrlListView@@QBEIH@Z @826 NONAME
?GetItemState@CCtrlListView@@QBEIHI@Z @827 NONAME
-?GetItemState@CCtrlTreeView@@QBEKPAU_TREEITEM@@K@Z @828 NONAME
+?GetItemState@CCtrlTreeView@@QBEIPAU_TREEITEM@@I@Z @828 NONAME
?GetItemText@CCtrlCombo@@QBEPA_WH@Z @829 NONAME
?GetItemText@CCtrlCombo@@QBEPA_WHPA_WH@Z @830 NONAME
?GetItemText@CCtrlListBox@@QBEPA_WH@Z @831 NONAME
@@ -650,9 +650,9 @@ mir_wstrcmpi @280 ?GetItemType@CCtrlClc@@QBEHPAX@Z @834 NONAME
?GetLastVisible@CCtrlTreeView@@QBEPAU_TREEITEM@@XZ @835 NONAME
?GetLineColor@CCtrlTreeView@@QBEKXZ @837 NONAME
-?GetNextItem@CCtrlClc@@QBEPAXPAXK@Z @838 NONAME
+?GetNextItem@CCtrlClc@@QBEPAXPAXI@Z @838 NONAME
?GetNextItem@CCtrlListView@@QBEHHI@Z @839 NONAME
-?GetNextItem@CCtrlTreeView@@QBEPAU_TREEITEM@@PAU2@K@Z @840 NONAME
+?GetNextItem@CCtrlTreeView@@QBEPAU_TREEITEM@@PAU2@I@Z @840 NONAME
?GetNextSibling@CCtrlTreeView@@QBEPAU_TREEITEM@@PAU2@@Z @841 NONAME
?GetNextVisible@CCtrlTreeView@@QBEPAU_TREEITEM@@PAU2@@Z @842 NONAME
?GetNumberOfWorkAreas@CCtrlListView@@QBEHPAI@Z @843 NONAME
@@ -663,7 +663,7 @@ mir_wstrcmpi @280 ?GetPrevSibling@CCtrlTreeView@@QBEPAU_TREEITEM@@PAU2@@Z @848 NONAME
?GetPrevVisible@CCtrlTreeView@@QBEPAU_TREEITEM@@PAU2@@Z @849 NONAME
?GetRoot@CCtrlTreeView@@QBEPAU_TREEITEM@@XZ @851 NONAME
-?GetScrollTime@CCtrlTreeView@@QBEKXZ @852 NONAME
+?GetScrollTime@CCtrlTreeView@@QBEIXZ @852 NONAME
?GetSel@CCtrlListBox@@QBE_NH@Z @853 NONAME
?GetSelCount@CCtrlListBox@@QBEHXZ @854 NONAME
?GetSelItems@CCtrlListBox@@QBEPAHPAHH@Z @855 NONAME
@@ -690,7 +690,7 @@ mir_wstrcmpi @280 ?GetTopIndex@CCtrlListView@@QBEHXZ @877 NONAME
?GetUnicodeFormat@CCtrlListView@@QBEHXZ @878 NONAME
?GetUnicodeFormat@CCtrlTreeView@@QBEHXZ @879 NONAME
-?GetView@CCtrlListView@@QBEKXZ @880 NONAME
+?GetView@CCtrlListView@@QBEIXZ @880 NONAME
?GetViewRect@CCtrlListView@@QBEHPAUtagRECT@@@Z @881 NONAME
?GetVisibleCount@CCtrlTreeView@@QBEIXZ @882 NONAME
?GetWorkAreas@CCtrlListView@@QBEXHPAUtagRECT@@@Z @883 NONAME
@@ -698,7 +698,7 @@ mir_wstrcmpi @280 ?GlobalDlgResizer@CDlgBase@@CAHPAUHWND__@@JPAUUTILRESIZECONTROL@@@Z @885 NONAME
?GlobalSubclassWndProc@CCtrlBase@@CGJPAUHWND__@@IIJ@Z @886 NONAME
?HasGroup@CCtrlListView@@QAEHH@Z @887 NONAME
-?HitTest@CCtrlClc@@QBEPAXHHPAK@Z @888 NONAME
+?HitTest@CCtrlClc@@QBEPAXHHPAI@Z @888 NONAME
?HitTest@CCtrlListView@@QBEHPAUtagLVHITTESTINFO@@@Z @889 NONAME
?HitTest@CCtrlTreeView@@QBEPAU_TREEITEM@@PAUtagTVHITTESTINFO@@@Z @890 NONAME
?InsertColumn@CCtrlListView@@QAEHHPBUtagLVCOLUMNW@@@Z @891 NONAME
@@ -712,8 +712,8 @@ mir_wstrcmpi @280 ?IsChanged@CCtrlBase@@QBE_NXZ @899 NONAME
?IsGroupViewEnabled@CCtrlListView@@QAEHXZ @900 NONAME
?IsInitialized@CDlgBase@@QBE_NXZ @901 NONAME
-?LoadInt@CCtrlData@@IAEKXZ @902 NONAME
-?LoadInt@CDbLink@@UAEKXZ @903 NONAME
+?LoadInt@CCtrlData@@IAEIXZ @902 NONAME
+?LoadInt@CDbLink@@UAEIXZ @903 NONAME
?LoadText@CCtrlData@@IAEPB_WXZ @904 NONAME
?LoadText@CDbLink@@UAEPA_WXZ @905 NONAME
?MakeFlat@CCtrlMButton@@QAEXXZ @906 NONAME
@@ -764,12 +764,12 @@ mir_wstrcmpi @280 ?ResetContent@CCtrlCombo@@QAEXXZ @956 NONAME
?ResetContent@CCtrlListBox@@QAEXXZ @957 NONAME
?Resizer@CDlgBase@@MAEHPAUUTILRESIZECONTROL@@@Z @958 NONAME
-?SaveInt@CCtrlData@@IAEXK@Z @959 NONAME
-?SaveInt@CDbLink@@UAEXK@Z @960 NONAME
+?SaveInt@CCtrlData@@IAEXI@Z @959 NONAME
+?SaveInt@CDbLink@@UAEXI@Z @960 NONAME
?SaveText@CCtrlData@@IAEXPA_W@Z @961 NONAME
?SaveText@CDbLink@@UAEXPA_W@Z @962 NONAME
?Scroll@CCtrlListView@@QAEHHH@Z @963 NONAME
-?Select@CCtrlTreeView@@QAEXPAU_TREEITEM@@K@Z @964 NONAME
+?Select@CCtrlTreeView@@QAEXPAU_TREEITEM@@I@Z @964 NONAME
?SelectDropTarget@CCtrlTreeView@@QAEXPAU_TREEITEM@@@Z @965 NONAME
?SelectItem@CCtrlClc@@QAEXPAX@Z @966 NONAME
?SelectItem@CCtrlTreeView@@QAEXPAU_TREEITEM@@@Z @967 NONAME
@@ -784,15 +784,15 @@ mir_wstrcmpi @280 ?SetCallbackMask@CCtrlListView@@QAEHI@Z @977 NONAME
?SetCheck@CCtrlClc@@QAEXPAX_N@Z @978 NONAME
?SetCheckState@CCtrlListView@@QAEXIH@Z @979 NONAME
-?SetCheckState@CCtrlTreeView@@QAEXPAU_TREEITEM@@K@Z @980 NONAME
+?SetCheckState@CCtrlTreeView@@QAEXPAU_TREEITEM@@I@Z @980 NONAME
?SetColumn@CCtrlListView@@QAEHHPAUtagLVCOLUMNW@@@Z @981 NONAME
?SetColumnOrderArray@CCtrlListView@@QAEHHPAH@Z @982 NONAME
?SetColumnWidth@CCtrlListView@@QAEHHH@Z @983 NONAME
?SetCurSel@CCtrlCombo@@QAEHH@Z @984 NONAME
?SetCurSel@CCtrlListBox@@QAEHH@Z @985 NONAME
-?SetExStyle@CCtrlClc@@QAEXK@Z @986 NONAME
-?SetExtendedListViewStyle@CCtrlListView@@QAEXK@Z @987 NONAME
-?SetExtendedListViewStyleEx@CCtrlListView@@QAEXKK@Z @988 NONAME
+?SetExStyle@CCtrlClc@@QAEXI@Z @986 NONAME
+?SetExtendedListViewStyle@CCtrlListView@@QAEXI@Z @987 NONAME
+?SetExtendedListViewStyleEx@CCtrlListView@@QAEXII@Z @988 NONAME
?SetExtraColumns@CCtrlClc@@QAEXH@Z @989 NONAME
?SetExtraImage@CCtrlClc@@QAEXPAXHH@Z @990 NONAME
?SetExtraImageList@CCtrlClc@@QAEXPAU_IMAGELIST@@@Z @991 NONAME
@@ -803,8 +803,8 @@ mir_wstrcmpi @280 ?SetHideOfflineRoot@CCtrlClc@@QAEX_N@Z @997 NONAME
?SetHotCursor@CCtrlListView@@QAEPAUHICON__@@PAU2@@Z @998 NONAME
?SetHotItem@CCtrlListView@@QAEHH@Z @999 NONAME
-?SetHoverTime@CCtrlListView@@QAEXK@Z @1000 NONAME
-?SetIconSpacing@CCtrlListView@@QAEKHH@Z @1001 NONAME
+?SetHoverTime@CCtrlListView@@QAEXI@Z @1000 NONAME
+?SetIconSpacing@CCtrlListView@@QAEIHH@Z @1001 NONAME
?SetImageList@CCtrlListView@@QAEPAU_IMAGELIST@@PAU2@H@Z @1002 NONAME
?SetImageList@CCtrlTreeView@@QAEXPAU_IMAGELIST@@H@Z @1003 NONAME
?SetIndent@CCtrlTreeView@@QAEXH@Z @1005 NONAME
@@ -818,18 +818,18 @@ mir_wstrcmpi @280 ?SetItem@CCtrlListView@@QAEXHHPB_WH@Z @1013 NONAME
?SetItem@CCtrlTreeView@@QAEXPAUtagTVITEMEXW@@@Z @1014 NONAME
?SetItemCount@CCtrlListView@@QAEXH@Z @1015 NONAME
-?SetItemCountEx@CCtrlListView@@QAEXHK@Z @1016 NONAME
+?SetItemCountEx@CCtrlListView@@QAEXHI@Z @1016 NONAME
?SetItemData@CCtrlCombo@@QAEXHJ@Z @1017 NONAME
?SetItemData@CCtrlListBox@@QAEXHJ@Z @1018 NONAME
?SetItemHeight@CCtrlTreeView@@QAEXF@Z @1019 NONAME
?SetItemPosition32@CCtrlListView@@QAEXHHH@Z @1020 NONAME
?SetItemPosition@CCtrlListView@@QAEHHHH@Z @1021 NONAME
?SetItemState@CCtrlListView@@QAEXHII@Z @1022 NONAME
-?SetItemState@CCtrlTreeView@@QAEXPAU_TREEITEM@@KK@Z @1023 NONAME
+?SetItemState@CCtrlTreeView@@QAEXPAU_TREEITEM@@II@Z @1023 NONAME
?SetItemText@CCtrlClc@@QAEXPAXPAD@Z @1024 NONAME
?SetItemText@CCtrlListView@@QAEXHHPB_W@Z @1025 NONAME
?SetLineColor@CCtrlTreeView@@QAEKK@Z @1027 NONAME
-?SetOfflineModes@CCtrlClc@@QAEXK@Z @1028 NONAME
+?SetOfflineModes@CCtrlClc@@QAEXI@Z @1028 NONAME
?SetOutlineColor@CCtrlListView@@QAEKK@Z @1029 NONAME
?SetScrollTime@CCtrlTreeView@@QAEXI@Z @1030 NONAME
?SetSel@CCtrlListBox@@QAEXH_N@Z @1031 NONAME
@@ -848,7 +848,7 @@ mir_wstrcmpi @280 ?SetUnicodeFormat@CCtrlListView@@QAEHH@Z @1046 NONAME
?SetUnicodeFormat@CCtrlTreeView@@QAEHH@Z @1047 NONAME
?SetUseGroups@CCtrlClc@@QAEX_N@Z @1048 NONAME
-?SetView@CCtrlListView@@QAEHK@Z @1049 NONAME
+?SetView@CCtrlListView@@QAEHI@Z @1049 NONAME
?SetWorkAreas@CCtrlListView@@QAEXHPAUtagRECT@@@Z @1050 NONAME
?Show@CDlgBase@@QAEXH@Z @1051 NONAME
?ShowDropdown@CCtrlCombo@@QAEX_N@Z @1052 NONAME
@@ -1040,7 +1040,7 @@ IsTerminalDisconnected @1245 CallObjectEventHook @1259
?db_get_sm@@YG?AV?$CMStringT@DV?$ChTraitsCRT@D@@@@IPBD00@Z @1682 NONAME
?db_get_wsm@@YG?AV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@IPBD0PB_W@Z @1683 NONAME
-?CreateLink@CDlgBase@@IAEXAAVCCtrlData@@PBDEK@Z @1262 NONAME
+?CreateLink@CDlgBase@@IAEXAAVCCtrlData@@PBDEI@Z @1262 NONAME
?CreateLink@CDlgBase@@IAEXAAVCCtrlData@@PBDPA_W@Z @1263 NONAME
?CheckRowCount@CCtrlPages@@AAEXXZ @1264 NONAME
?VerifyControls@CDlgBase@@AAE_NP8CCtrlBase@@AE_NXZ@Z @1265 NONAME
@@ -1485,11 +1485,11 @@ TimeZone_GetSystemTime @1692 ??0CCtrlColor@@QAE@PAVCDlgBase@@H@Z @1707 NONAME
??1CCtrlColor@@UAE@XZ @1708 NONAME
??_7CCtrlColor@@6B@ @1709 NONAME
-?GetColor@CCtrlColor@@QAEKXZ @1710 NONAME
+?GetColor@CCtrlColor@@QAEIXZ @1710 NONAME
?OnApply@CCtrlColor@@UAE_NXZ @1711 NONAME
?OnCommand@CCtrlColor@@UAEHPAUHWND__@@GG@Z @1712 NONAME
?OnReset@CCtrlColor@@UAEXXZ @1713 NONAME
-?SetColor@CCtrlColor@@QAEXK@Z @1714 NONAME
+?SetColor@CCtrlColor@@QAEXI@Z @1714 NONAME
??0CCtrlSlider@@QAE@PAVCDlgBase@@HHH@Z @1715 NONAME
??1CCtrlSlider@@UAE@XZ @1716 NONAME
??_7CCtrlSlider@@6B@ @1717 NONAME
diff --git a/src/mir_core/src/mir_core64.def b/src/mir_core/src/mir_core64.def index a99babbccb..a25eee9663 100644 --- a/src/mir_core/src/mir_core64.def +++ b/src/mir_core/src/mir_core64.def @@ -477,7 +477,7 @@ mir_wstrcmpi @280 ??0CDataLink@@QEAA@AEBV0@@Z @636 NONAME
??0CDataLink@@QEAA@E@Z @637 NONAME
??0CDbLink@@QEAA@AEBV0@@Z @638 NONAME
-??0CDbLink@@QEAA@PEBD0EK@Z @639 NONAME
+??0CDbLink@@QEAA@PEBD0EI@Z @639 NONAME
??0CDbLink@@QEAA@PEBD0EPEA_W@Z @640 NONAME
??0CDlgBase@@QEAA@AEBV0@@Z @641 NONAME
??0CDlgBase@@QEAA@AEAVCMPluginBase@@H@Z @642 NONAME
@@ -527,14 +527,14 @@ mir_wstrcmpi @280 ?AddString@CCtrlCombo@@QEAAHPEB_W_J@Z @706 NONAME
?AddString@CCtrlListBox@@QEAAHPEB_W_J@Z @707 NONAME
?AddStringA@CCtrlCombo@@QEAAHPEBD_J@Z @708 NONAME
-?ApproximateViewRect@CCtrlListView@@QEAAKHHH@Z @709 NONAME
+?ApproximateViewRect@CCtrlListView@@QEAAIHHH@Z @709 NONAME
?Arrange@CCtrlListView@@QEAAXI@Z @710 NONAME
?AutoRebuild@CCtrlClc@@QEAAXXZ @712 NONAME
?CancelEditLabel@CCtrlListView@@QEAAXXZ @713 NONAME
?Close@CDlgBase@@QEAAXXZ @714 NONAME
?Create@CDlgBase@@QEAAXXZ @715 NONAME
?CreateDbLink@CCtrlData@@QEAAXPEAVCDataLink@@@Z @716 NONAME
-?CreateDbLink@CCtrlData@@QEAAXPEBD0EK@Z @717 NONAME
+?CreateDbLink@CCtrlData@@QEAAXPEBD0EI@Z @717 NONAME
?CreateDbLink@CCtrlData@@QEAAXPEBD0PEA_W@Z @718 NONAME
?CreateDragImage@CCtrlListView@@QEAAPEAU_IMAGELIST@@HPEAUtagPOINT@@@Z @719 NONAME
?CreateDragImage@CCtrlTreeView@@QEAAPEAU_IMAGELIST@@PEAU_TREEITEM@@@Z @720 NONAME
@@ -566,8 +566,8 @@ mir_wstrcmpi @280 ?EnsureVisible@CCtrlClc@@QEAAXPEAX_N@Z @749 NONAME
?EnsureVisible@CCtrlListView@@QEAAHHH@Z @750 NONAME
?EnsureVisible@CCtrlTreeView@@QEAAXPEAU_TREEITEM@@@Z @751 NONAME
-?Expand@CCtrlClc@@QEAAXPEAXK@Z @752 NONAME
-?Expand@CCtrlTreeView@@QEAAXPEAU_TREEITEM@@K@Z @753 NONAME
+?Expand@CCtrlClc@@QEAAXPEAXI@Z @752 NONAME
+?Expand@CCtrlTreeView@@QEAAXPEAU_TREEITEM@@I@Z @753 NONAME
?FindContact@CCtrlClc@@QEAAPEAXI@Z @754 NONAME
?FindGroup@CCtrlClc@@QEAAPEAXH@Z @756 NONAME
?FindItem@CCtrlListView@@QEAAHHPEBUtagLVFINDINFOW@@@Z @757 NONAME
@@ -582,7 +582,7 @@ mir_wstrcmpi @280 ?GetCallbackMask@CCtrlListView@@QEBAIXZ @766 NONAME
?GetCheck@CCtrlClc@@QEBA_NPEAX@Z @767 NONAME
?GetCheckState@CCtrlListView@@QEBAHI@Z @768 NONAME
-?GetCheckState@CCtrlTreeView@@QEBAKPEAU_TREEITEM@@@Z @769 NONAME
+?GetCheckState@CCtrlTreeView@@QEBAIPEAU_TREEITEM@@@Z @769 NONAME
?GetChild@CCtrlTreeView@@QEBAPEAU_TREEITEM@@PEAU2@@Z @770 NONAME
?GetColumn@CCtrlListView@@QEBAXHPEAUtagLVCOLUMNW@@@Z @771 NONAME
?GetColumnOrderArray@CCtrlListView@@QEBAXHPEAH@Z @772 NONAME
@@ -602,9 +602,9 @@ mir_wstrcmpi @280 ?GetEditControl@CCtrlClc@@QEBAPEAUHWND__@@XZ @786 NONAME
?GetEditControl@CCtrlListView@@QEBAPEAUHWND__@@XZ @787 NONAME
?GetEditControl@CCtrlTreeView@@QEBAPEAUHWND__@@XZ @788 NONAME
-?GetExStyle@CCtrlClc@@QEBAKXZ @789 NONAME
-?GetExpand@CCtrlClc@@QEBAKPEAX@Z @790 NONAME
-?GetExtendedListViewStyle@CCtrlListView@@QEBAKXZ @791 NONAME
+?GetExStyle@CCtrlClc@@QEBAIXZ @789 NONAME
+?GetExpand@CCtrlClc@@QEBAIPEAX@Z @790 NONAME
+?GetExtendedListViewStyle@CCtrlListView@@QEBAIXZ @791 NONAME
?GetExtraColumns@CCtrlClc@@QEBAHXZ @792 NONAME
?GetExtraImage@CCtrlClc@@QEBAEPEAXH@Z @793 NONAME
?GetExtraImageList@CCtrlClc@@QEBAPEAU_IMAGELIST@@XZ @794 NONAME
@@ -615,7 +615,7 @@ mir_wstrcmpi @280 ?GetHideOfflineRoot@CCtrlClc@@QEBA_NXZ @799 NONAME
?GetHotCursor@CCtrlListView@@QEBAPEAUHICON__@@XZ @800 NONAME
?GetHotItem@CCtrlListView@@QEBAHXZ @801 NONAME
-?GetHoverTime@CCtrlListView@@QEBAKXZ @802 NONAME
+?GetHoverTime@CCtrlListView@@QEBAIXZ @802 NONAME
?GetHwnd@CCtrlBase@@QEBAPEAUHWND__@@XZ @803 NONAME
?GetHwnd@CDlgBase@@QEBAPEAUHWND__@@XZ @804 NONAME
?GetISearchString@CCtrlListView@@QEBAHPEAD@Z @805 NONAME
@@ -639,9 +639,9 @@ mir_wstrcmpi @280 ?GetItemPosition@CCtrlListView@@QEBAXHPEAUtagPOINT@@@Z @823 NONAME
?GetItemRect@CCtrlListView@@QEBAXHPEAUtagRECT@@H@Z @824 NONAME
?GetItemRect@CCtrlTreeView@@QEBAXPEAU_TREEITEM@@PEAUtagRECT@@H@Z @825 NONAME
-?GetItemSpacing@CCtrlListView@@QEBAKH@Z @826 NONAME
+?GetItemSpacing@CCtrlListView@@QEBAIH@Z @826 NONAME
?GetItemState@CCtrlListView@@QEBAIHI@Z @827 NONAME
-?GetItemState@CCtrlTreeView@@QEBAKPEAU_TREEITEM@@K@Z @828 NONAME
+?GetItemState@CCtrlTreeView@@QEBAIPEAU_TREEITEM@@I@Z @828 NONAME
?GetItemText@CCtrlCombo@@QEBAPEA_WH@Z @829 NONAME
?GetItemText@CCtrlCombo@@QEBAPEA_WHPEA_WH@Z @830 NONAME
?GetItemText@CCtrlListBox@@QEBAPEA_WH@Z @831 NONAME
@@ -650,9 +650,9 @@ mir_wstrcmpi @280 ?GetItemType@CCtrlClc@@QEBAHPEAX@Z @834 NONAME
?GetLastVisible@CCtrlTreeView@@QEBAPEAU_TREEITEM@@XZ @835 NONAME
?GetLineColor@CCtrlTreeView@@QEBAKXZ @837 NONAME
-?GetNextItem@CCtrlClc@@QEBAPEAXPEAXK@Z @838 NONAME
+?GetNextItem@CCtrlClc@@QEBAPEAXPEAXI@Z @838 NONAME
?GetNextItem@CCtrlListView@@QEBAHHI@Z @839 NONAME
-?GetNextItem@CCtrlTreeView@@QEBAPEAU_TREEITEM@@PEAU2@K@Z @840 NONAME
+?GetNextItem@CCtrlTreeView@@QEBAPEAU_TREEITEM@@PEAU2@I@Z @840 NONAME
?GetNextSibling@CCtrlTreeView@@QEBAPEAU_TREEITEM@@PEAU2@@Z @841 NONAME
?GetNextVisible@CCtrlTreeView@@QEBAPEAU_TREEITEM@@PEAU2@@Z @842 NONAME
?GetNumberOfWorkAreas@CCtrlListView@@QEBAHPEAI@Z @843 NONAME
@@ -663,7 +663,7 @@ mir_wstrcmpi @280 ?GetPrevSibling@CCtrlTreeView@@QEBAPEAU_TREEITEM@@PEAU2@@Z @848 NONAME
?GetPrevVisible@CCtrlTreeView@@QEBAPEAU_TREEITEM@@PEAU2@@Z @849 NONAME
?GetRoot@CCtrlTreeView@@QEBAPEAU_TREEITEM@@XZ @851 NONAME
-?GetScrollTime@CCtrlTreeView@@QEBAKXZ @852 NONAME
+?GetScrollTime@CCtrlTreeView@@QEBAIXZ @852 NONAME
?GetSel@CCtrlListBox@@QEBA_NH@Z @853 NONAME
?GetSelCount@CCtrlListBox@@QEBAHXZ @854 NONAME
?GetSelItems@CCtrlListBox@@QEBAPEAHPEAHH@Z @855 NONAME
@@ -690,7 +690,7 @@ mir_wstrcmpi @280 ?GetTopIndex@CCtrlListView@@QEBAHXZ @877 NONAME
?GetUnicodeFormat@CCtrlListView@@QEBAHXZ @878 NONAME
?GetUnicodeFormat@CCtrlTreeView@@QEBAHXZ @879 NONAME
-?GetView@CCtrlListView@@QEBAKXZ @880 NONAME
+?GetView@CCtrlListView@@QEBAIXZ @880 NONAME
?GetViewRect@CCtrlListView@@QEBAHPEAUtagRECT@@@Z @881 NONAME
?GetVisibleCount@CCtrlTreeView@@QEBAIXZ @882 NONAME
?GetWorkAreas@CCtrlListView@@QEBAXHPEAUtagRECT@@@Z @883 NONAME
@@ -698,7 +698,7 @@ mir_wstrcmpi @280 ?GlobalDlgResizer@CDlgBase@@CAHPEAUHWND__@@_JPEAUUTILRESIZECONTROL@@@Z @885 NONAME
?GlobalSubclassWndProc@CCtrlBase@@CA_JPEAUHWND__@@I_K_J@Z @886 NONAME
?HasGroup@CCtrlListView@@QEAAHH@Z @887 NONAME
-?HitTest@CCtrlClc@@QEBAPEAXHHPEAK@Z @888 NONAME
+?HitTest@CCtrlClc@@QEBAPEAXHHPEAI@Z @888 NONAME
?HitTest@CCtrlListView@@QEBAHPEAUtagLVHITTESTINFO@@@Z @889 NONAME
?HitTest@CCtrlTreeView@@QEBAPEAU_TREEITEM@@PEAUtagTVHITTESTINFO@@@Z @890 NONAME
?InsertColumn@CCtrlListView@@QEAAHHPEBUtagLVCOLUMNW@@@Z @891 NONAME
@@ -712,8 +712,8 @@ mir_wstrcmpi @280 ?IsChanged@CCtrlBase@@QEBA_NXZ @899 NONAME
?IsGroupViewEnabled@CCtrlListView@@QEAAHXZ @900 NONAME
?IsInitialized@CDlgBase@@QEBA_NXZ @901 NONAME
-?LoadInt@CCtrlData@@IEAAKXZ @902 NONAME
-?LoadInt@CDbLink@@UEAAKXZ @903 NONAME
+?LoadInt@CCtrlData@@IEAAIXZ @902 NONAME
+?LoadInt@CDbLink@@UEAAIXZ @903 NONAME
?LoadText@CCtrlData@@IEAAPEB_WXZ @904 NONAME
?LoadText@CDbLink@@UEAAPEA_WXZ @905 NONAME
?MakeFlat@CCtrlMButton@@QEAAXXZ @906 NONAME
@@ -764,12 +764,12 @@ mir_wstrcmpi @280 ?ResetContent@CCtrlCombo@@QEAAXXZ @956 NONAME
?ResetContent@CCtrlListBox@@QEAAXXZ @957 NONAME
?Resizer@CDlgBase@@MEAAHPEAUUTILRESIZECONTROL@@@Z @958 NONAME
-?SaveInt@CCtrlData@@IEAAXK@Z @959 NONAME
-?SaveInt@CDbLink@@UEAAXK@Z @960 NONAME
+?SaveInt@CCtrlData@@IEAAXI@Z @959 NONAME
+?SaveInt@CDbLink@@UEAAXI@Z @960 NONAME
?SaveText@CCtrlData@@IEAAXPEA_W@Z @961 NONAME
?SaveText@CDbLink@@UEAAXPEA_W@Z @962 NONAME
?Scroll@CCtrlListView@@QEAAHHH@Z @963 NONAME
-?Select@CCtrlTreeView@@QEAAXPEAU_TREEITEM@@K@Z @964 NONAME
+?Select@CCtrlTreeView@@QEAAXPEAU_TREEITEM@@I@Z @964 NONAME
?SelectDropTarget@CCtrlTreeView@@QEAAXPEAU_TREEITEM@@@Z @965 NONAME
?SelectItem@CCtrlClc@@QEAAXPEAX@Z @966 NONAME
?SelectItem@CCtrlTreeView@@QEAAXPEAU_TREEITEM@@@Z @967 NONAME
@@ -784,15 +784,15 @@ mir_wstrcmpi @280 ?SetCallbackMask@CCtrlListView@@QEAAHI@Z @977 NONAME
?SetCheck@CCtrlClc@@QEAAXPEAX_N@Z @978 NONAME
?SetCheckState@CCtrlListView@@QEAAXIH@Z @979 NONAME
-?SetCheckState@CCtrlTreeView@@QEAAXPEAU_TREEITEM@@K@Z @980 NONAME
+?SetCheckState@CCtrlTreeView@@QEAAXPEAU_TREEITEM@@I@Z @980 NONAME
?SetColumn@CCtrlListView@@QEAAHHPEAUtagLVCOLUMNW@@@Z @981 NONAME
?SetColumnOrderArray@CCtrlListView@@QEAAHHPEAH@Z @982 NONAME
?SetColumnWidth@CCtrlListView@@QEAAHHH@Z @983 NONAME
?SetCurSel@CCtrlCombo@@QEAAHH@Z @984 NONAME
?SetCurSel@CCtrlListBox@@QEAAHH@Z @985 NONAME
-?SetExStyle@CCtrlClc@@QEAAXK@Z @986 NONAME
-?SetExtendedListViewStyle@CCtrlListView@@QEAAXK@Z @987 NONAME
-?SetExtendedListViewStyleEx@CCtrlListView@@QEAAXKK@Z @988 NONAME
+?SetExStyle@CCtrlClc@@QEAAXI@Z @986 NONAME
+?SetExtendedListViewStyle@CCtrlListView@@QEAAXI@Z @987 NONAME
+?SetExtendedListViewStyleEx@CCtrlListView@@QEAAXII@Z @988 NONAME
?SetExtraColumns@CCtrlClc@@QEAAXH@Z @989 NONAME
?SetExtraImage@CCtrlClc@@QEAAXPEAXHH@Z @990 NONAME
?SetExtraImageList@CCtrlClc@@QEAAXPEAU_IMAGELIST@@@Z @991 NONAME
@@ -803,8 +803,8 @@ mir_wstrcmpi @280 ?SetHideOfflineRoot@CCtrlClc@@QEAAX_N@Z @997 NONAME
?SetHotCursor@CCtrlListView@@QEAAPEAUHICON__@@PEAU2@@Z @998 NONAME
?SetHotItem@CCtrlListView@@QEAAHH@Z @999 NONAME
-?SetHoverTime@CCtrlListView@@QEAAXK@Z @1000 NONAME
-?SetIconSpacing@CCtrlListView@@QEAAKHH@Z @1001 NONAME
+?SetHoverTime@CCtrlListView@@QEAAXI@Z @1000 NONAME
+?SetIconSpacing@CCtrlListView@@QEAAIHH@Z @1001 NONAME
?SetImageList@CCtrlListView@@QEAAPEAU_IMAGELIST@@PEAU2@H@Z @1002 NONAME
?SetImageList@CCtrlTreeView@@QEAAXPEAU_IMAGELIST@@H@Z @1003 NONAME
?SetIndent@CCtrlTreeView@@QEAAXH@Z @1005 NONAME
@@ -818,18 +818,18 @@ mir_wstrcmpi @280 ?SetItem@CCtrlListView@@QEAAXHHPEB_WH@Z @1013 NONAME
?SetItem@CCtrlTreeView@@QEAAXPEAUtagTVITEMEXW@@@Z @1014 NONAME
?SetItemCount@CCtrlListView@@QEAAXH@Z @1015 NONAME
-?SetItemCountEx@CCtrlListView@@QEAAXHK@Z @1016 NONAME
+?SetItemCountEx@CCtrlListView@@QEAAXHI@Z @1016 NONAME
?SetItemData@CCtrlCombo@@QEAAXH_J@Z @1017 NONAME
?SetItemData@CCtrlListBox@@QEAAXH_J@Z @1018 NONAME
?SetItemHeight@CCtrlTreeView@@QEAAXF@Z @1019 NONAME
?SetItemPosition32@CCtrlListView@@QEAAXHHH@Z @1020 NONAME
?SetItemPosition@CCtrlListView@@QEAAHHHH@Z @1021 NONAME
?SetItemState@CCtrlListView@@QEAAXHII@Z @1022 NONAME
-?SetItemState@CCtrlTreeView@@QEAAXPEAU_TREEITEM@@KK@Z @1023 NONAME
+?SetItemState@CCtrlTreeView@@QEAAXPEAU_TREEITEM@@II@Z @1023 NONAME
?SetItemText@CCtrlClc@@QEAAXPEAXPEAD@Z @1024 NONAME
?SetItemText@CCtrlListView@@QEAAXHHPEB_W@Z @1025 NONAME
?SetLineColor@CCtrlTreeView@@QEAAKK@Z @1027 NONAME
-?SetOfflineModes@CCtrlClc@@QEAAXK@Z @1028 NONAME
+?SetOfflineModes@CCtrlClc@@QEAAXI@Z @1028 NONAME
?SetOutlineColor@CCtrlListView@@QEAAKK@Z @1029 NONAME
?SetScrollTime@CCtrlTreeView@@QEAAXI@Z @1030 NONAME
?SetSel@CCtrlListBox@@QEAAXH_N@Z @1031 NONAME
@@ -848,7 +848,7 @@ mir_wstrcmpi @280 ?SetUnicodeFormat@CCtrlListView@@QEAAHH@Z @1046 NONAME
?SetUnicodeFormat@CCtrlTreeView@@QEAAHH@Z @1047 NONAME
?SetUseGroups@CCtrlClc@@QEAAX_N@Z @1048 NONAME
-?SetView@CCtrlListView@@QEAAHK@Z @1049 NONAME
+?SetView@CCtrlListView@@QEAAHI@Z @1049 NONAME
?SetWorkAreas@CCtrlListView@@QEAAXHPEAUtagRECT@@@Z @1050 NONAME
?Show@CDlgBase@@QEAAXH@Z @1051 NONAME
?ShowDropdown@CCtrlCombo@@QEAAX_N@Z @1052 NONAME
@@ -1040,7 +1040,7 @@ IsTerminalDisconnected @1245 CallObjectEventHook @1259
?db_get_sm@@YA?AV?$CMStringT@DV?$ChTraitsCRT@D@@@@IPEBD00@Z @1682 NONAME
?db_get_wsm@@YA?AV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@IPEBD0PEB_W@Z @1683 NONAME
-?CreateLink@CDlgBase@@IEAAXAEAVCCtrlData@@PEBDEK@Z @1262 NONAME
+?CreateLink@CDlgBase@@IEAAXAEAVCCtrlData@@PEBDEI@Z @1262 NONAME
?CreateLink@CDlgBase@@IEAAXAEAVCCtrlData@@PEBDPEA_W@Z @1263 NONAME
?CheckRowCount@CCtrlPages@@AEAAXXZ @1264 NONAME
?VerifyControls@CDlgBase@@AEAA_NP8CCtrlBase@@EAA_NXZ@Z @1265 NONAME
@@ -1485,11 +1485,11 @@ TimeZone_GetSystemTime @1692 ??0CCtrlColor@@QEAA@PEAVCDlgBase@@H@Z @1707 NONAME
??1CCtrlColor@@UEAA@XZ @1708 NONAME
??_7CCtrlColor@@6B@ @1709 NONAME
-?GetColor@CCtrlColor@@QEAAKXZ @1710 NONAME
+?GetColor@CCtrlColor@@QEAAIXZ @1710 NONAME
?OnApply@CCtrlColor@@UEAA_NXZ @1711 NONAME
?OnCommand@CCtrlColor@@UEAAHPEAUHWND__@@GG@Z @1712 NONAME
?OnReset@CCtrlColor@@UEAAXXZ @1713 NONAME
-?SetColor@CCtrlColor@@QEAAXK@Z @1714 NONAME
+?SetColor@CCtrlColor@@QEAAXI@Z @1714 NONAME
??0CCtrlSlider@@QEAA@PEAVCDlgBase@@HHH@Z @1715 NONAME
??1CCtrlSlider@@UEAA@XZ @1716 NONAME
??_7CCtrlSlider@@6B@ @1717 NONAME
diff --git a/src/mir_core/src/miranda.h b/src/mir_core/src/miranda.h index 32ea470e58..a9be2ed2c3 100644 --- a/src/mir_core/src/miranda.h +++ b/src/mir_core/src/miranda.h @@ -70,7 +70,7 @@ struct THook : public MZeroedObject int subscriberCount; THookSubscriber* subscriber; MIRANDAHOOK pfnHook; - DWORD secretSignature = HOOK_SECRET_SIGNATURE; + uint32_t secretSignature = HOOK_SECRET_SIGNATURE; mir_cs csHook; }; @@ -84,10 +84,10 @@ char* LangPackTranslateString(const MUUID *pUuid, const char *szEnglish, const i ///////////////////////////////////////////////////////////////////////////////////////// // threads.cpp -extern DWORD mir_tls; +extern uint32_t mir_tls; ///////////////////////////////////////////////////////////////////////////////////////// // utils.cpp -typedef BOOL(MIR_SYSCALL *PGENRANDOM)(void*, DWORD); +typedef BOOL(MIR_SYSCALL *PGENRANDOM)(void*, uint32_t); extern PGENRANDOM pfnRtlGenRandom; diff --git a/src/mir_core/src/modules.cpp b/src/mir_core/src/modules.cpp index 68d2457778..37b3b8786a 100644 --- a/src/mir_core/src/modules.cpp +++ b/src/mir_core/src/modules.cpp @@ -46,7 +46,7 @@ struct THookToMainThreadItem struct TService { - DWORD nameHash; + uint32_t nameHash; HINSTANCE hOwner; union { @@ -76,7 +76,7 @@ TServiceToMainThreadItem; // other static variables static BOOL bServiceMode = FALSE; static mir_cs csHooks, csServices; -static DWORD mainThreadId; +static uint32_t mainThreadId; static int sttHookId = 1; ///////////////////////////////////////////////////////////////////////////////////////// |