diff options
Diffstat (limited to 'plugins')
595 files changed, 2626 insertions, 2630 deletions
diff --git a/plugins/AVS/src/cache.cpp b/plugins/AVS/src/cache.cpp index b54baa4d5c..fd64deb704 100644 --- a/plugins/AVS/src/cache.cpp +++ b/plugins/AVS/src/cache.cpp @@ -200,7 +200,7 @@ void DeleteAvatarFromCache(MCONTACT hContact, bool bForever) /////////////////////////////////////////////////////////////////////////////////////////
-int SetAvatarAttribute(MCONTACT hContact, DWORD attrib, int mode)
+int SetAvatarAttribute(MCONTACT hContact, uint32_t attrib, int mode)
{
if (g_shutDown)
return 0;
@@ -208,7 +208,7 @@ int SetAvatarAttribute(MCONTACT hContact, DWORD attrib, int mode) mir_cslock lck(cachecs);
CacheNode *cc = arCache.find((CacheNode*)&hContact);
if (cc != nullptr) {
- DWORD dwFlags = cc->dwFlags;
+ uint32_t dwFlags = cc->dwFlags;
cc->dwFlags = mode ? (cc->dwFlags | attrib) : (cc->dwFlags & ~attrib);
if (cc->dwFlags != dwFlags)
NotifyMetaAware(hContact, cc);
@@ -224,7 +224,7 @@ void PicLoader(LPVOID) {
Thread_SetName("AVS: PicLoader");
- DWORD dwDelay = g_plugin.getDword("picloader_sleeptime", 80);
+ uint32_t dwDelay = g_plugin.getDword("picloader_sleeptime", 80);
if (dwDelay < 30)
dwDelay = 30;
diff --git a/plugins/AVS/src/image_utils.cpp b/plugins/AVS/src/image_utils.cpp index a43177ad9b..3408e5296a 100644 --- a/plugins/AVS/src/image_utils.cpp +++ b/plugins/AVS/src/image_utils.cpp @@ -11,7 +11,7 @@ void MakeBmpTransparent(HBITMAP hBitmap) if (bmp.bmBitsPixel != 32)
return;
- DWORD dwLen = bmp.bmWidth * bmp.bmHeight * (bmp.bmBitsPixel / 8);
+ uint32_t dwLen = bmp.bmWidth * bmp.bmHeight * (bmp.bmBitsPixel / 8);
uint8_t *p = (uint8_t *)malloc(dwLen);
if (p == nullptr)
return;
@@ -29,7 +29,7 @@ HBITMAP CopyBitmapTo32(HBITMAP hBitmap) BITMAP bmp;
GetObject(hBitmap, sizeof(bmp), &bmp);
- DWORD dwLen = bmp.bmWidth * bmp.bmHeight * 4;
+ uint32_t dwLen = bmp.bmWidth * bmp.bmHeight * 4;
uint8_t *p = (uint8_t *)malloc(dwLen);
if (p == nullptr)
return nullptr;
@@ -97,7 +97,7 @@ void SetTranspBkgColor(HBITMAP hBitmap, COLORREF color) if (bmp.bmBitsPixel != 32)
return;
- DWORD dwLen = bmp.bmWidth * bmp.bmHeight * (bmp.bmBitsPixel / 8);
+ uint32_t dwLen = bmp.bmWidth * bmp.bmHeight * (bmp.bmBitsPixel / 8);
uint8_t *p = (uint8_t *)malloc(dwLen);
if (p == nullptr)
return;
@@ -264,12 +264,12 @@ BOOL GetColorForPoint(int colorDiff, uint8_t *p, int width, }
-DWORD GetImgHash(HBITMAP hBitmap)
+uint32_t GetImgHash(HBITMAP hBitmap)
{
BITMAP bmp;
GetObject(hBitmap, sizeof(bmp), &bmp);
- DWORD dwLen = bmp.bmWidth * bmp.bmHeight * (bmp.bmBitsPixel / 8);
+ uint32_t dwLen = bmp.bmWidth * bmp.bmHeight * (bmp.bmBitsPixel / 8);
uint16_t *p = (uint16_t *)malloc(dwLen);
if (p == nullptr)
return 0;
@@ -277,8 +277,8 @@ DWORD GetImgHash(HBITMAP hBitmap) GetBitmapBits(hBitmap, dwLen, p);
- DWORD ret = 0;
- for (DWORD i = 0; i < dwLen / 2; i++)
+ uint32_t ret = 0;
+ for (uint32_t i = 0; i < dwLen / 2; i++)
ret += p[i];
free(p);
@@ -325,7 +325,7 @@ BOOL MakeTransparentBkg(MCONTACT hContact, HBITMAP *hBitmap) if (width <= 4 || height <= 4)
return FALSE;
- DWORD dwLen = width * height * 4;
+ uint32_t dwLen = width * height * 4;
uint8_t *p = (uint8_t *)malloc(dwLen);
if (p == nullptr)
return FALSE;
diff --git a/plugins/AVS/src/image_utils.h b/plugins/AVS/src/image_utils.h index d47995e1b6..5070ce8854 100644 --- a/plugins/AVS/src/image_utils.h +++ b/plugins/AVS/src/image_utils.h @@ -8,7 +8,7 @@ HBITMAP CopyBitmapTo32(HBITMAP hBitmap); BOOL MakeTransparentBkg(MCONTACT hContact, HBITMAP *hBitmap);
HBITMAP MakeGrayscale(HBITMAP hBitmap);
-DWORD GetImgHash(HBITMAP hBitmap);
+uint32_t GetImgHash(HBITMAP hBitmap);
int SaveAvatar(const char* protocol, const wchar_t* tszFileName);
diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp index ec3852171b..4e73e39b2e 100644 --- a/plugins/AVS/src/main.cpp +++ b/plugins/AVS/src/main.cpp @@ -213,7 +213,7 @@ static int ShutdownProc(WPARAM, LPARAM) return 0;
}
-void InternalDrawAvatar(AVATARDRAWREQUEST *r, HBITMAP hbm, LONG bmWidth, LONG bmHeight, DWORD dwFlags)
+void InternalDrawAvatar(AVATARDRAWREQUEST *r, HBITMAP hbm, LONG bmWidth, LONG bmHeight, uint32_t dwFlags)
{
int targetWidth = r->rcDraw.right - r->rcDraw.left;
int targetHeight = r->rcDraw.bottom - r->rcDraw.top;
@@ -239,8 +239,8 @@ void InternalDrawAvatar(AVATARDRAWREQUEST *r, HBITMAP hbm, LONG bmWidth, LONG bm newHeight = (int)(bmHeight * dScale);
}
- DWORD topoffset = targetHeight > newHeight ? (targetHeight - newHeight) / 2 : 0;
- DWORD leftoffset = targetWidth > newWidth ? (targetWidth - newWidth) / 2 : 0;
+ uint32_t topoffset = targetHeight > newHeight ? (targetHeight - newHeight) / 2 : 0;
+ uint32_t leftoffset = targetWidth > newWidth ? (targetWidth - newWidth) / 2 : 0;
// create the region for the avatar border - use the same region for clipping, if needed.
HRGN oldRgn = CreateRectRgn(0, 0, 1, 1);
diff --git a/plugins/AVS/src/poll.h b/plugins/AVS/src/poll.h index 0066c8e160..2d65509012 100644 --- a/plugins/AVS/src/poll.h +++ b/plugins/AVS/src/poll.h @@ -27,7 +27,7 @@ Boston, MA 02111-1307, USA. struct QueueItem
{
MCONTACT hContact;
- DWORD check_time;
+ uint32_t check_time;
};
void InitPolls();
diff --git a/plugins/AVS/src/services.cpp b/plugins/AVS/src/services.cpp index 6e192c1998..ef62183444 100644 --- a/plugins/AVS/src/services.cpp +++ b/plugins/AVS/src/services.cpp @@ -319,7 +319,7 @@ static UINT_PTR CALLBACK SetMyAvatarHookProc(HWND hwnd, UINT msg, WPARAM, LPARAM struct SaveProtocolData
{
- DWORD max_size;
+ uint32_t max_size;
wchar_t image_file_name[MAX_PATH];
BOOL saved;
BOOL need_smaller_size;
@@ -380,7 +380,7 @@ static int SetProtoMyAvatar(char *protocol, HBITMAP hBmp, wchar_t *originalFilen // Get protocol info
SaveProtocolData d = { 0 };
- d.max_size = (DWORD)Proto_GetAvatarMaxFileSize(protocol);
+ d.max_size = (uint32_t)Proto_GetAvatarMaxFileSize(protocol);
Proto_GetAvatarMaxSize(protocol, &d.width, &d.height);
int orig_width = d.width;
diff --git a/plugins/AVS/src/stdafx.h b/plugins/AVS/src/stdafx.h index 6372bd24ae..98c433815d 100644 --- a/plugins/AVS/src/stdafx.h +++ b/plugins/AVS/src/stdafx.h @@ -136,7 +136,7 @@ extern HANDLE hLoaderEvent, hShutdownEvent; extern HANDLE hEventChanged, hEventContactAvatarChanged, hMyAvatarChanged;
int GetFileHash(wchar_t* filename);
-DWORD GetFileSize(wchar_t *szFilename);
+uint32_t GetFileSize(wchar_t *szFilename);
void MakePathRelative(MCONTACT hContact);
void MakePathRelative(MCONTACT hContact, wchar_t *dest);
void MyPathToAbsolute(const wchar_t *ptszPath, wchar_t *ptszDest);
@@ -147,14 +147,14 @@ void DeleteAvatarFromCache(MCONTACT hContact, bool bForever); void PicLoader(LPVOID param);
void NotifyMetaAware(MCONTACT hContact, CacheNode *node = nullptr, AVATARCACHEENTRY *ace = (AVATARCACHEENTRY*)-1);
-void InternalDrawAvatar(AVATARDRAWREQUEST *r, HBITMAP hbm, LONG bmWidth, LONG bmHeight, DWORD dwFlags);
+void InternalDrawAvatar(AVATARDRAWREQUEST *r, HBITMAP hbm, LONG bmWidth, LONG bmHeight, uint32_t dwFlags);
int ChangeAvatar(MCONTACT hContact, bool fLoad, bool fNotifyHist = false, int pa_format = 0);
void DeleteGlobalUserAvatar();
int FetchAvatarFor(MCONTACT hContact, char *szProto = nullptr);
CacheNode* FindAvatarInCache(MCONTACT hContact, bool add, bool findAny = false);
void PushAvatarRequest(CacheNode *cc);
-int SetAvatarAttribute(MCONTACT hContact, DWORD attrib, int mode);
+int SetAvatarAttribute(MCONTACT hContact, uint32_t attrib, int mode);
void SetIgnoreNotify(char *protocol, BOOL ignore);
INT_PTR DrawAvatarPicture(WPARAM wParam, LPARAM lParam);
diff --git a/plugins/AVS/src/utils.cpp b/plugins/AVS/src/utils.cpp index 121fe9ea3d..bab40ac398 100644 --- a/plugins/AVS/src/utils.cpp +++ b/plugins/AVS/src/utils.cpp @@ -170,7 +170,7 @@ int CreateAvatarInCache(MCONTACT hContact, AVATARCACHEENTRY *ace, const char *sz // Calc image hash
if (hContact != 0 && hContact != INVALID_CONTACT_ID) {
// Have to reset settings? -> do it if image changed
- DWORD imgHash = GetImgHash(ace->hbmPic);
+ uint32_t imgHash = GetImgHash(ace->hbmPic);
if (imgHash != db_get_dw(hContact, "ContactPhoto", "ImageHash", 0)) {
db_unset(hContact, "ContactPhoto", "MakeTransparentBkg");
db_unset(hContact, "ContactPhoto", "TranspBkgNumPoints");
@@ -458,7 +458,7 @@ void SetIgnoreNotify(char *protocol, BOOL ignore) ///////////////////////////////////////////////////////////////////////////////////////////////////////
-DWORD GetFileSize(wchar_t *szFilename)
+uint32_t GetFileSize(wchar_t *szFilename)
{
struct _stat info;
return (_wstat(szFilename, &info) == -1) ? 0 : info.st_size;
diff --git a/plugins/AddContactPlus/src/addcontact.cpp b/plugins/AddContactPlus/src/addcontact.cpp index 99381359ee..8bc8c8da9d 100644 --- a/plugins/AddContactPlus/src/addcontact.cpp +++ b/plugins/AddContactPlus/src/addcontact.cpp @@ -31,7 +31,7 @@ struct AddDialogParam : public MZeroedObject void AddContactDlgOpts(HWND hdlg, const char* szProto, BOOL bAuthOptsOnly = FALSE)
{
- DWORD flags = (szProto) ? CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0) : 0;
+ uint32_t flags = (szProto) ? CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0) : 0;
if (IsDlgButtonChecked(hdlg, IDC_ADDTEMP)) {
EnableWindow(GetDlgItem(hdlg, IDC_AUTH), FALSE);
EnableWindow(GetDlgItem(hdlg, IDC_AUTHREQ), FALSE);
@@ -78,7 +78,7 @@ bool AddContactDlgAccounts(HWND hdlg, AddDialogParam *acs) if (!pa->IsEnabled())
continue;
- DWORD dwCaps = (DWORD)CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0);
+ uint32_t dwCaps = (uint32_t)CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0);
if (dwCaps & PF1_BASICSEARCH || dwCaps & PF1_EXTSEARCH || dwCaps & PF1_SEARCHBYEMAIL || dwCaps & PF1_SEARCHBYNAME)
iAccCount++;
}
@@ -108,7 +108,7 @@ bool AddContactDlgAccounts(HWND hdlg, AddDialogParam *acs) if (!pa->IsEnabled())
continue;
- DWORD dwCaps = (DWORD)CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0);
+ uint32_t dwCaps = (uint32_t)CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0);
if (!(dwCaps & PF1_BASICSEARCH) && !(dwCaps & PF1_EXTSEARCH) && !(dwCaps & PF1_SEARCHBYEMAIL) && !(dwCaps & PF1_SEARCHBYNAME))
continue;
@@ -206,7 +206,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM) case IDC_AUTH:
{
- DWORD flags = CallProtoService(acs->proto, PS_GETCAPS, PFLAGNUM_4, 0);
+ uint32_t flags = CallProtoService(acs->proto, PS_GETCAPS, PFLAGNUM_4, 0);
if (flags & PF4_NOCUSTOMAUTH) {
EnableWindow(GetDlgItem(hdlg, IDC_AUTHREQ), FALSE);
EnableWindow(GetDlgItem(hdlg, IDC_AUTHGB), FALSE);
@@ -262,7 +262,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM) Contact_PutOnList(hContact);
if (IsDlgButtonChecked(hdlg, IDC_AUTH)) {
- DWORD flags = CallProtoService(acs->proto, PS_GETCAPS, PFLAGNUM_4, 0);
+ uint32_t flags = CallProtoService(acs->proto, PS_GETCAPS, PFLAGNUM_4, 0);
if (flags & PF4_NOCUSTOMAUTH)
ProtoChainSend(hContact, PSS_AUTHREQUEST, 0, 0);
else {
diff --git a/plugins/AddContactPlus/src/main.cpp b/plugins/AddContactPlus/src/main.cpp index b119fe4e7f..6f7990d947 100644 --- a/plugins/AddContactPlus/src/main.cpp +++ b/plugins/AddContactPlus/src/main.cpp @@ -71,7 +71,7 @@ static int OnAccListChanged(WPARAM, LPARAM) if (!pa->IsEnabled())
continue;
- DWORD dwCaps = (DWORD)CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0);
+ uint32_t dwCaps = (uint32_t)CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0);
if (dwCaps & PF1_BASICSEARCH || dwCaps & PF1_EXTSEARCH || dwCaps & PF1_SEARCHBYEMAIL || dwCaps & PF1_SEARCHBYNAME)
iAccCount++;
}
diff --git a/plugins/Alarms/src/alarmlist.cpp b/plugins/Alarms/src/alarmlist.cpp index f6d8d33b52..2a2627c8c9 100755 --- a/plugins/Alarms/src/alarmlist.cpp +++ b/plugins/Alarms/src/alarmlist.cpp @@ -5,7 +5,7 @@ mir_cs alarm_cs; unsigned short next_alarm_id = 1; // 0 is used for invalid id
-DWORD timer_id;
+uint32_t timer_id;
#define TIMER_PERIOD 5000 // milliseconds delay between alarm checks
static SYSTEMTIME last_check, last_saved_check;
diff --git a/plugins/Alarms/src/frame.cpp b/plugins/Alarms/src/frame.cpp index 1f2c440afe..987ccb5f7e 100755 --- a/plugins/Alarms/src/frame.cpp +++ b/plugins/Alarms/src/frame.cpp @@ -115,7 +115,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar case WM_DRAWITEM:
dis = (DRAWITEMSTRUCT *)lParam;
- if (dis->itemID != (DWORD)-1) {
+ if (dis->itemID != (uint32_t)-1) {
ALARM alarm = { 0 };
mir_cslock lck(list_cs);
ALARM &list_alarm = alarm_list.at(dis->itemData);
@@ -347,7 +347,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar ScreenToClient(hwnd_list, &pt);
{
mir_cslock lck(list_cs);
- DWORD item = SendMessage(hwnd_list, LB_ITEMFROMPOINT, 0, MAKELPARAM(pt.x, pt.y));
+ uint32_t item = SendMessage(hwnd_list, LB_ITEMFROMPOINT, 0, MAKELPARAM(pt.x, pt.y));
HMENU menu = LoadMenu(g_plugin.getInst(), MAKEINTRESOURCE(IDR_MENU1)), submenu = GetSubMenu(menu, 0);
TranslateMenu(submenu);
diff --git a/plugins/AssocMgr/src/assoclist.cpp b/plugins/AssocMgr/src/assoclist.cpp index 74504addaa..83d1d49a7a 100644 --- a/plugins/AssocMgr/src/assoclist.cpp +++ b/plugins/AssocMgr/src/assoclist.cpp @@ -334,7 +334,7 @@ struct TYPEDESCHEAD HINSTANCE hInstance;
UINT nIconResID;
const char *pszService;
- DWORD flags;
+ uint32_t flags;
};
// ownership of pszClassName, pszFileExt, pszVerbDesc and pszMimeType is transfered
diff --git a/plugins/AssocMgr/src/dde.cpp b/plugins/AssocMgr/src/dde.cpp index 0efa55102d..d99d57be96 100644 --- a/plugins/AssocMgr/src/dde.cpp +++ b/plugins/AssocMgr/src/dde.cpp @@ -193,7 +193,7 @@ EXTERN_C __declspec(dllexport) void CALLBACK WaitForDDE(HWND, HINSTANCE, wchar_t if (pHandles[0] != nullptr) {
pHandles[1] = StartupMainProcess(pszCmdLine); /* obeys nCmdShow using GetStartupInfo() */
if (pHandles[1] != nullptr) {
- DWORD dwTick = GetTickCount();
+ uint32_t dwTick = GetTickCount();
/* either process terminated or dde window created */
if (WaitForMultipleObjects(_countof(pHandles), pHandles, FALSE, DDEMESSAGETIMEOUT) == WAIT_OBJECT_0) {
dwTick = GetTickCount() - dwTick;
diff --git a/plugins/AssocMgr/src/reg.cpp b/plugins/AssocMgr/src/reg.cpp index effd65643b..e8f3455409 100644 --- a/plugins/AssocMgr/src/reg.cpp +++ b/plugins/AssocMgr/src/reg.cpp @@ -351,28 +351,28 @@ static BOOL IsRegStrValueA(HKEY hKey, const wchar_t *pszValName, const char *psz #define REGF_ANSI 0x80000000 // this bit is set in dwType for ANSI registry data
// pData must always be Unicode data, registry supports Unicode even on Win95
-static void WriteDbBackupData(const char *pszSetting, DWORD dwType, uint8_t *pData, DWORD cbData)
+static void WriteDbBackupData(const char *pszSetting, uint32_t dwType, uint8_t *pData, uint32_t cbData)
{
- size_t cbLen = cbData + sizeof(DWORD);
+ size_t cbLen = cbData + sizeof(uint32_t);
uint8_t *buf = (uint8_t*)mir_alloc(cbLen);
if (buf) {
- *(DWORD*)buf = dwType;
- memcpy(buf + sizeof(DWORD), pData, cbData);
+ *(uint32_t*)buf = dwType;
+ memcpy(buf + sizeof(uint32_t), pData, cbData);
db_set_blob(0, MODULENAME, pszSetting, buf, (unsigned)cbLen);
mir_free(buf);
}
}
// mir_free() the value returned in ppData
-static BOOL ReadDbBackupData(const char *pszSetting, DWORD *pdwType, uint8_t **ppData, DWORD *pcbData)
+static BOOL ReadDbBackupData(const char *pszSetting, uint32_t *pdwType, uint8_t **ppData, uint32_t *pcbData)
{
DBVARIANT dbv;
if (!db_get(0, MODULENAME, pszSetting, &dbv)) {
- if (dbv.type == DBVT_BLOB && dbv.cpbVal >= sizeof(DWORD)) {
- *pdwType = *(DWORD*)dbv.pbVal;
+ if (dbv.type == DBVT_BLOB && dbv.cpbVal >= sizeof(uint32_t)) {
+ *pdwType = *(uint32_t*)dbv.pbVal;
*ppData = dbv.pbVal;
- *pcbData = dbv.cpbVal - sizeof(DWORD);
- memmove(*ppData, *ppData + sizeof(DWORD), *pcbData);
+ *pcbData = dbv.cpbVal - sizeof(uint32_t);
+ memmove(*ppData, *ppData + sizeof(uint32_t), *pcbData);
return TRUE;
}
db_free(&dbv);
@@ -383,7 +383,7 @@ static BOOL ReadDbBackupData(const char *pszSetting, DWORD *pdwType, uint8_t **p struct BackupRegTreeParam
{
char **ppszDbPrefix;
- DWORD *pdwDbPrefixSize;
+ uint32_t *pdwDbPrefixSize;
int level;
};
@@ -398,7 +398,7 @@ static void BackupRegTree_Worker(HKEY hKey, const char *pszSubKey, struct Backup if ((res = RegQueryInfoKey(hKey, nullptr, nullptr, nullptr, nullptr, &nMaxSubKeyLen, nullptr, nullptr, &nMaxValNameLen, &nMaxValSize, nullptr, nullptr)) == ERROR_SUCCESS) {
if (nMaxSubKeyLen > nMaxValNameLen) nMaxValNameLen = nMaxSubKeyLen;
// prepare buffer
- nDbPrefixLen = (DWORD)(mir_strlen(*param->ppszDbPrefix) + mir_strlen(pszSubKey) + 1);
+ nDbPrefixLen = (uint32_t)(mir_strlen(*param->ppszDbPrefix) + mir_strlen(pszSubKey) + 1);
cchName = nDbPrefixLen + nMaxValNameLen + 3;
if (cchName > *param->pdwDbPrefixSize) {
pszName = (char*)mir_realloc(*param->ppszDbPrefix, cchName);
@@ -412,7 +412,7 @@ static void BackupRegTree_Worker(HKEY hKey, const char *pszSubKey, struct Backup if (nMaxValSize == 0) nMaxValSize = 1;
uint8_t *pData = (uint8_t*)mir_alloc(nMaxValSize);
if (pszName != nullptr && pData != nullptr) {
- DWORD index = 0;
+ uint32_t index = 0;
while (!res) {
cchName = nMaxValNameLen + 1;
cbData = nMaxValSize;
@@ -430,7 +430,7 @@ static void BackupRegTree_Worker(HKEY hKey, const char *pszSubKey, struct Backup // enum subkeys
if (param->level < 32 && pszName != nullptr) {
++param->level; // can be max 32 levels deep (after prefix), restriction of RegCreateKeyEx()
- DWORD index = 0;
+ uint32_t index = 0;
while (!res) {
cchName = nMaxSubKeyLen + 1;
if ((res = RegEnumKeyExA(hKey, index++, pszName, &cchName, nullptr, nullptr, nullptr, nullptr)) == ERROR_SUCCESS) {
@@ -450,7 +450,7 @@ static void BackupRegTree(HKEY hKey, const char *pszSubKey, const char *pszDbPre {
char *prefix = mir_strdup(pszDbPrefix);
struct BackupRegTreeParam param;
- DWORD dwDbPrefixSize;
+ uint32_t dwDbPrefixSize;
param.level = 0;
param.pdwDbPrefixSize = &dwDbPrefixSize;
param.ppszDbPrefix = (char**)&prefix;
@@ -490,7 +490,7 @@ static LONG RestoreRegTree(HKEY hKey, const char *pszSubKey, const char *pszDbPr char *pszValName = pslash;
// read data
uint8_t *pData;
- DWORD dwType, cbData;
+ uint32_t dwType, cbData;
if (ReadDbBackupData(ppszSettings[i], &dwType, &pData, &cbData)) {
// set value
if (!(dwType & REGF_ANSI)) {
diff --git a/plugins/AssocMgr/src/utils.cpp b/plugins/AssocMgr/src/utils.cpp index 71091b0c87..7cba0f8c17 100644 --- a/plugins/AssocMgr/src/utils.cpp +++ b/plugins/AssocMgr/src/utils.cpp @@ -42,7 +42,7 @@ void DynamicLoadInit() /************************* String Conv ****************************/
// mir_free() the return value
-wchar_t* s2t(const void *pszStr, DWORD fUnicode, BOOL fMirCp)
+wchar_t* s2t(const void *pszStr, uint32_t fUnicode, BOOL fMirCp)
{
if (fUnicode)
return mir_wstrdup((wchar_t*)pszStr);
@@ -51,7 +51,7 @@ wchar_t* s2t(const void *pszStr, DWORD fUnicode, BOOL fMirCp) }
// mir_free() the return value
-void* t2s(const wchar_t *pszStr, DWORD fUnicode, BOOL fMirCp)
+void* t2s(const wchar_t *pszStr, uint32_t fUnicode, BOOL fMirCp)
{
if (!fUnicode)
return (void*)mir_u2a_cp(pszStr, fMirCp);
@@ -137,10 +137,10 @@ void ShowInfoMessage(uint8_t flags, const char *pszTitle, const char *pszTextFmt }
// LocalFree() the return value
-char* GetWinErrorDescription(DWORD dwLastError)
+char* GetWinErrorDescription(uint32_t dwLastError)
{
char *buf = nullptr;
- DWORD flags = FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM;
+ uint32_t flags = FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM;
if (!FormatMessageA(flags, nullptr, dwLastError, LANGIDFROMLCID(Langpack_GetDefaultLocale()), (char*)&buf, 0, nullptr))
if (GetLastError() == ERROR_RESOURCE_LANG_NOT_FOUND)
FormatMessageA(flags, nullptr, dwLastError, 0, (char*)&buf, 0, nullptr);
diff --git a/plugins/AssocMgr/src/utils.h b/plugins/AssocMgr/src/utils.h index 2cb2b6826b..54c81a16ab 100644 --- a/plugins/AssocMgr/src/utils.h +++ b/plugins/AssocMgr/src/utils.h @@ -24,12 +24,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. void DynamicLoadInit();
/* String Conv */
-wchar_t* s2t(const void *pszStr, DWORD fUnicode, BOOL fMirCp);
-void* t2s(const wchar_t *pszStr, DWORD fUnicode, BOOL fMirCp);
+wchar_t* s2t(const void *pszStr, uint32_t fUnicode, BOOL fMirCp);
+void* t2s(const wchar_t *pszStr, uint32_t fUnicode, BOOL fMirCp);
/* Database */
BOOL EnumDbPrefixSettings(const char *pszModule, const char *pszSettingPrefix, char ***pSettings, int *pnSettingsCount);
/* Error Output */
void ShowInfoMessage(uint8_t flags, const char *pszTitle, const char *pszTextFmt, ...);
-char* GetWinErrorDescription(DWORD dwLastError);
+char* GetWinErrorDescription(uint32_t dwLastError);
diff --git a/plugins/AutoRun/src/main.cpp b/plugins/AutoRun/src/main.cpp index e4a8bcc99f..5b4cc0f3c0 100644 --- a/plugins/AutoRun/src/main.cpp +++ b/plugins/AutoRun/src/main.cpp @@ -45,7 +45,7 @@ static void SetAutorun(BOOL autorun) if (RegCreateKeyEx(ROOT_KEY, SUB_KEY, 0, nullptr, 0, KEY_CREATE_SUB_KEY | KEY_SET_VALUE, nullptr, &hKey, &dw) == ERROR_SUCCESS) {
wchar_t result[MAX_PATH];
GetProfilePath(result, _countof(result));
- RegSetValueEx(hKey, L"MirandaNG", 0, REG_SZ, (uint8_t*)result, sizeof(wchar_t)*(DWORD)mir_wstrlen(result));
+ RegSetValueEx(hKey, L"MirandaNG", 0, REG_SZ, (uint8_t*)result, sizeof(wchar_t)*(uint32_t)mir_wstrlen(result));
RegCloseKey(hKey);
}
break;
diff --git a/plugins/AutoShutdown/src/cpuusage.cpp b/plugins/AutoShutdown/src/cpuusage.cpp index de331986d1..78c239c759 100644 --- a/plugins/AutoShutdown/src/cpuusage.cpp +++ b/plugins/AutoShutdown/src/cpuusage.cpp @@ -34,7 +34,7 @@ static BOOL WinNT_PerfStatsSwitch(wchar_t *pszServiceName, BOOL fDisable) if (!RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"System\\CurrentControlSet\\Services", 0, KEY_QUERY_VALUE | KEY_SET_VALUE, &hKeyServices)) {
if (!RegOpenKeyEx(hKeyServices, pszServiceName, 0, KEY_QUERY_VALUE | KEY_SET_VALUE, &hKeyService)) {
if (!RegOpenKeyEx(hKeyService, L"Performance", 0, KEY_QUERY_VALUE | KEY_SET_VALUE, &hKeyPerf)) {
- dwDataSize = sizeof(DWORD);
+ dwDataSize = sizeof(uint32_t);
if (!RegQueryValueEx(hKeyPerf, L"Disable Performance Counters", nullptr, nullptr, (uint8_t*)&dwData, &dwDataSize))
if ((dwData != 0) != fDisable)
fSwitched = !RegSetValueEx(hKeyPerf, L"Disable Performance Counters", 0, REG_DWORD, (uint8_t*)&fDisable, dwDataSize);
@@ -50,11 +50,11 @@ static BOOL WinNT_PerfStatsSwitch(wchar_t *pszServiceName, BOOL fDisable) /************************* Poll Thread ********************************/
struct CpuUsageThreadParams
{
- DWORD dwDelayMillis;
+ uint32_t dwDelayMillis;
CPUUSAGEAVAILPROC pfnDataAvailProc;
LPARAM lParam;
HANDLE hFirstEvent;
- DWORD *pidThread;
+ uint32_t *pidThread;
};
static BOOL CallBackAndWait(struct CpuUsageThreadParams *param, uint8_t nCpuUsage)
@@ -82,7 +82,7 @@ static void WinNT_PollThread(CpuUsageThreadParams *param) PERF_COUNTER_DEFINITION *pPerfCounter;
PERF_INSTANCE_DEFINITION *pPerfInstance;
PERF_COUNTER_BLOCK *pPerfCounterBlock;
- DWORD dwObjectId, dwCounterId;
+ uint32_t dwObjectId, dwCounterId;
wchar_t wszValueName[11], *pwszInstanceName;
uint8_t nCpuUsage;
BOOL fSwitched, fFound, fIsFirst = FALSE;
@@ -180,9 +180,9 @@ static void WinNT_PollThread(CpuUsageThreadParams *param) /************************* Start Thread *******************************/
// returns poll thread id on success
-DWORD PollCpuUsage(CPUUSAGEAVAILPROC pfnDataAvailProc, LPARAM lParam, DWORD dwDelayMillis)
+uint32_t PollCpuUsage(CPUUSAGEAVAILPROC pfnDataAvailProc, LPARAM lParam, uint32_t dwDelayMillis)
{
- DWORD idThread = 0;
+ uint32_t idThread = 0;
/* init params */
CpuUsageThreadParams *param = (struct CpuUsageThreadParams*)mir_alloc(sizeof(struct CpuUsageThreadParams));
diff --git a/plugins/AutoShutdown/src/cpuusage.h b/plugins/AutoShutdown/src/cpuusage.h index 391832e059..4c20b9b3e9 100644 --- a/plugins/AutoShutdown/src/cpuusage.h +++ b/plugins/AutoShutdown/src/cpuusage.h @@ -23,4 +23,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /* Start Thread */
typedef BOOL (CALLBACK* CPUUSAGEAVAILPROC)(uint8_t nCpuUsage,LPARAM lParam);
-DWORD PollCpuUsage(CPUUSAGEAVAILPROC pfnDataAvailProc,LPARAM lParam,DWORD dwDelayMillis);
+uint32_t PollCpuUsage(CPUUSAGEAVAILPROC pfnDataAvailProc,LPARAM lParam,uint32_t dwDelayMillis);
diff --git a/plugins/AutoShutdown/src/settingsdlg.cpp b/plugins/AutoShutdown/src/settingsdlg.cpp index e162c374df..a1cf1356f2 100644 --- a/plugins/AutoShutdown/src/settingsdlg.cpp +++ b/plugins/AutoShutdown/src/settingsdlg.cpp @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /* Services */
static HWND hwndSettingsDlg;
-const DWORD unitValues[] = { 1,60,60 * 60,60 * 60 * 24,60 * 60 * 24 * 7,60 * 60 * 24 * 31 };
+const uint32_t unitValues[] = { 1,60,60 * 60,60 * 60 * 24,60 * 60 * 24 * 7,60 * 60 * 24 * 31 };
const wchar_t *unitNames[] = { LPGENW("Second(s)"), LPGENW("Minute(s)"), LPGENW("Hour(s)"), LPGENW("Day(s)"), LPGENW("Week(s)"), LPGENW("Month(s)") };
/************************* Dialog *************************************/
@@ -48,7 +48,7 @@ static BOOL CALLBACK DisplayCpuUsageProc(uint8_t nCpuUsage, LPARAM lParam) return TRUE;
}
-static bool AnyProtoHasCaps(DWORD caps1)
+static bool AnyProtoHasCaps(uint32_t caps1)
{
for (auto &pa : Accounts())
if (CallProtoService(pa->szModuleName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0) & caps1)
@@ -100,7 +100,7 @@ static INT_PTR CALLBACK SettingsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L SendMessage(hwndDlg, M_CHECK_DATETIME, 0, 0);
}
{
- DWORD setting = g_plugin.getDword("Countdown", SETTING_COUNTDOWN_DEFAULT);
+ uint32_t setting = g_plugin.getDword("Countdown", SETTING_COUNTDOWN_DEFAULT);
if (setting < 1) setting = SETTING_COUNTDOWN_DEFAULT;
SendDlgItemMessage(hwndDlg, IDC_SPIN_COUNTDOWN, UDM_SETRANGE, 0, MAKELPARAM(UD_MAXVAL, 1));
SendDlgItemMessage(hwndDlg, IDC_EDIT_COUNTDOWN, EM_SETLIMITTEXT, (WPARAM)10, 0);
@@ -109,7 +109,7 @@ static INT_PTR CALLBACK SettingsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L }
{
HWND hwndCombo = GetDlgItem(hwndDlg, IDC_COMBO_COUNTDOWNUNIT);
- DWORD lastUnit = g_plugin.getDword("CountdownUnit", SETTING_COUNTDOWNUNIT_DEFAULT);
+ uint32_t lastUnit = g_plugin.getDword("CountdownUnit", SETTING_COUNTDOWNUNIT_DEFAULT);
SendMessage(hwndCombo, CB_SETLOCALE, (WPARAM)locale, 0); /* sort order */
SendMessage(hwndCombo, CB_INITSTORAGE, _countof(unitNames), _countof(unitNames) * 16); /* approx. */
for (int i = 0; i < _countof(unitNames); ++i) {
@@ -351,7 +351,7 @@ static INT_PTR CALLBACK SettingsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L DateTime_GetSystemtime(GetDlgItem(hwndDlg, IDC_TIME_TIMESTAMP), &st); /* time gets synchronized */
if (!SystemTimeToTimeStamp(&st, ×tamp))
timestamp = time(0);
- g_plugin.setDword("TimeStamp", (DWORD)timestamp);
+ g_plugin.setDword("TimeStamp", (uint32_t)timestamp);
}
/* shutdown type */
{
@@ -360,8 +360,8 @@ static INT_PTR CALLBACK SettingsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L g_plugin.setByte("ShutdownType", (uint8_t)SendDlgItemMessage(hwndDlg, IDC_COMBO_SHUTDOWNTYPE, CB_GETITEMDATA, (WPARAM)index, 0));
index = SendDlgItemMessage(hwndDlg, IDC_COMBO_COUNTDOWNUNIT, CB_GETCURSEL, 0, 0);
if (index != LB_ERR)
- g_plugin.setDword("CountdownUnit", (DWORD)SendDlgItemMessage(hwndDlg, IDC_COMBO_COUNTDOWNUNIT, CB_GETITEMDATA, (WPARAM)index, 0));
- g_plugin.setDword("Countdown", (DWORD)GetDlgItemInt(hwndDlg, IDC_EDIT_COUNTDOWN, nullptr, FALSE));
+ g_plugin.setDword("CountdownUnit", (uint32_t)SendDlgItemMessage(hwndDlg, IDC_COMBO_COUNTDOWNUNIT, CB_GETITEMDATA, (WPARAM)index, 0));
+ g_plugin.setDword("Countdown", (uint32_t)GetDlgItemInt(hwndDlg, IDC_EDIT_COUNTDOWN, nullptr, FALSE));
g_plugin.setByte("CpuUsageThreshold", (uint8_t)GetDlgItemInt(hwndDlg, IDC_EDIT_CPUUSAGE, nullptr, FALSE));
}
/* watcher type */
diff --git a/plugins/AutoShutdown/src/shutdownsvc.cpp b/plugins/AutoShutdown/src/shutdownsvc.cpp index d071656ee0..ee2df56bc3 100644 --- a/plugins/AutoShutdown/src/shutdownsvc.cpp +++ b/plugins/AutoShutdown/src/shutdownsvc.cpp @@ -128,14 +128,14 @@ static BOOL IsShutdownTypeEnabled(uint8_t shutdownType) return bReturn;
}
-static DWORD ShutdownNow(uint8_t shutdownType)
+static uint32_t ShutdownNow(uint8_t shutdownType)
{
- DWORD dwErrCode = ERROR_SUCCESS;
+ uint32_t dwErrCode = ERROR_SUCCESS;
switch (shutdownType) {
case SDSDT_CLOSEMIRANDA:
if (!Miranda_IsTerminated()) {
/* waiting for short until ready (but not too long...) */
- DWORD dwLastTickCount = GetTickCount();
+ uint32_t dwLastTickCount = GetTickCount();
while (!Miranda_OkToExit()) {
/* infinite loop protection (max 5 sec) */
if (GetTickCount() - dwLastTickCount >= 5000) { /* wraparound works */
@@ -174,9 +174,9 @@ static DWORD ShutdownNow(uint8_t shutdownType) ShutdownNow(SDSDT_SETMIRANDAOFFLINE); /* set Miranda offline */
/* hang up all ras connections */
{
- DWORD dwRetries;
+ uint32_t dwRetries;
RASCONNSTATUS rcs;
- DWORD dw, dwLastTickCount;
+ uint32_t dw, dwLastTickCount;
DWORD dwConnSize = sizeof(RASCONN);
DWORD dwConnItems = 0;
@@ -357,7 +357,7 @@ static INT_PTR CALLBACK ShutdownDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BUTTON_SHUTDOWNNOW))) {
EnableWindow(GetDlgItem(hwndDlg, IDC_BUTTON_SHUTDOWNNOW), FALSE);
ShowWindow(hwndDlg, SW_HIDE); /* get rid of the dialog immediately */
- DWORD dwErrCode = ShutdownNow(shutdownType);
+ uint32_t dwErrCode = ShutdownNow(shutdownType);
if (dwErrCode != ERROR_SUCCESS) {
char *pszErr = GetWinErrorDescription(dwErrCode);
ShowInfoMessage(NIIF_ERROR, Translate("Automatic shutdown error"), Translate("The shutdown process failed!\nReason: %s"), (pszErr != nullptr) ? pszErr : Translate("Unknown"));
@@ -433,7 +433,7 @@ INT_PTR ServiceShutdown(WPARAM wParam, LPARAM lParam) return 0;
/* show error */
- DWORD dwErrCode = ShutdownNow((uint8_t)wParam);
+ uint32_t dwErrCode = ShutdownNow((uint8_t)wParam);
if (dwErrCode != ERROR_SUCCESS) {
char *pszErr = GetWinErrorDescription(dwErrCode);
ShowInfoMessage(NIIF_ERROR, Translate("Automatic shutdown error"), Translate("Initiating the shutdown process failed!\nReason: %s"), (pszErr != nullptr) ? pszErr : Translate("Unknown"));
diff --git a/plugins/AutoShutdown/src/utils.cpp b/plugins/AutoShutdown/src/utils.cpp index ddd353f9aa..7324f0cbbe 100644 --- a/plugins/AutoShutdown/src/utils.cpp +++ b/plugins/AutoShutdown/src/utils.cpp @@ -59,10 +59,10 @@ void ShowInfoMessage(uint8_t flags, const char *pszTitle, const char *pszTextFmt }
// LocalFree() the return value
-char* GetWinErrorDescription(DWORD dwLastError)
+char* GetWinErrorDescription(uint32_t dwLastError)
{
char *buf = nullptr;
- DWORD flags = FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM;
+ uint32_t flags = FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM;
if (!FormatMessageA(flags, nullptr, dwLastError, LANGIDFROMLCID(Langpack_GetDefaultLocale()), (char*)&buf, 0, nullptr))
if (GetLastError() == ERROR_RESOURCE_LANG_NOT_FOUND)
FormatMessageA(flags, nullptr, dwLastError, 0, (char*)&buf, 0, nullptr);
@@ -108,7 +108,7 @@ BOOL TimeStampToSystemTime(time_t timestamp, SYSTEMTIME *st) BOOL GetFormatedCountdown(wchar_t *pszOut, int nSize, time_t countdown)
{
static BOOL fInited = FALSE;
- static int (WINAPI *pfnGetDurationFormat)(LCID, DWORD, const SYSTEMTIME*, double, wchar_t*, wchar_t*, int);
+ static int (WINAPI *pfnGetDurationFormat)(LCID, uint32_t, const SYSTEMTIME*, double, wchar_t*, wchar_t*, int);
/* Init */
if (!fInited && IsWinVerVistaPlus()) {
*(PROC*)&pfnGetDurationFormat = GetProcAddress(GetModuleHandleA("KERNEL32"), "GetDurationFormat");
diff --git a/plugins/AutoShutdown/src/utils.h b/plugins/AutoShutdown/src/utils.h index e3c05f51f9..52bd847c59 100644 --- a/plugins/AutoShutdown/src/utils.h +++ b/plugins/AutoShutdown/src/utils.h @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /* Error Output */
void ShowInfoMessage(uint8_t flags,const char *pszTitle,const char *pszTextFmt,...);
-char* GetWinErrorDescription(DWORD dwLastError);
+char* GetWinErrorDescription(uint32_t dwLastError);
/* Time */
BOOL SystemTimeToTimeStamp(SYSTEMTIME *st,time_t *timestamp);
diff --git a/plugins/AutoShutdown/src/watcher.cpp b/plugins/AutoShutdown/src/watcher.cpp index a84253b536..b7135921f4 100644 --- a/plugins/AutoShutdown/src/watcher.cpp +++ b/plugins/AutoShutdown/src/watcher.cpp @@ -180,7 +180,7 @@ static int StatusSettingChanged(WPARAM wParam, LPARAM lParam) /************************* Cpu Shutdown *******************************/
-static DWORD idCpuUsageThread;
+static uint32_t idCpuUsageThread;
static BOOL CALLBACK CpuUsageWatcherProc(uint8_t nCpuUsage, LPARAM lParam)
{
diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp index 6441f989f9..747f697cde 100644 --- a/plugins/AvatarHistory/src/AvatarHistory.cpp +++ b/plugins/AvatarHistory/src/AvatarHistory.cpp @@ -23,7 +23,7 @@ Avatar History Plugin */
#include "stdafx.h"
-DWORD mirVer;
+uint32_t mirVer;
HANDLE hFolder = nullptr;
@@ -206,9 +206,9 @@ static int AvatarChanged(WPARAM hContact, LPARAM lParam) DBEVENTINFO dbei = {};
dbei.szModule = Proto_GetBaseAccountName(hContact);
dbei.flags = DBEF_READ | DBEF_UTF;
- dbei.timestamp = (DWORD)time(0);
+ dbei.timestamp = (uint32_t)time(0);
dbei.eventType = EVENTTYPE_AVATAR_CHANGE;
- dbei.cbBlob = (DWORD)mir_strlen(blob) + 1;
+ dbei.cbBlob = (uint32_t)mir_strlen(blob) + 1;
dbei.pBlob = blob;
db_event_add(hContact, &dbei);
}
diff --git a/plugins/AvatarHistory/src/stdafx.h b/plugins/AvatarHistory/src/stdafx.h index 69cdfc1246..7975539af3 100644 --- a/plugins/AvatarHistory/src/stdafx.h +++ b/plugins/AvatarHistory/src/stdafx.h @@ -33,7 +33,7 @@ // Globals
extern HGENMENU hMenu;
-extern DWORD mirVer;
+extern uint32_t mirVer;
extern MWindowList hAvatarWindowsList;
extern Options opts;
extern HANDLE hFolder;
diff --git a/plugins/BASS_interface/src/Bass.h b/plugins/BASS_interface/src/Bass.h index 271be94d09..b5ca2c1c7c 100644 --- a/plugins/BASS_interface/src/Bass.h +++ b/plugins/BASS_interface/src/Bass.h @@ -18,9 +18,6 @@ typedef unsigned __int64 QWORD; #include <stdint.h> #define WINAPI #define CALLBACK -typedef uint8_t uint8_t; -typedef uint16_t uint16_t; -typedef uint32_t DWORD; typedef uint64_t QWORD; #ifdef __OBJC__ typedef int BOOL32; @@ -37,7 +34,7 @@ typedef int BOOL; #define LOWORD(a) (uint16_t)(a) #define HIWORD(a) (uint16_t)((a)>>16) #define MAKEWORD(a,b) (uint16_t)(((a)&0xff)|((b)<<8)) -#define MAKELONG(a,b) (DWORD)(((a)&0xffff)|((b)<<16)) +#define MAKELONG(a,b) (uint32_t)(((a)&0xffff)|((b)<<16)) #endif #ifdef __cplusplus @@ -53,15 +50,15 @@ extern "C" { #define NOBASSOVERLOADS #endif -typedef DWORD HMUSIC; // MOD music handle -typedef DWORD HSAMPLE; // sample handle -typedef DWORD HCHANNEL; // sample playback handle -typedef DWORD HSTREAM; // sample stream handle -typedef DWORD HRECORD; // recording handle -typedef DWORD HSYNC; // synchronizer handle -typedef DWORD HDSP; // DSP handle -typedef DWORD HFX; // effect handle -typedef DWORD HSUBPLUGIN; // plugin handle +typedef uint32_t HMUSIC; // MOD music handle +typedef uint32_t HSAMPLE; // sample handle +typedef uint32_t HCHANNEL; // sample playback handle +typedef uint32_t HSTREAM; // sample stream handle +typedef uint32_t HRECORD; // recording handle +typedef uint32_t HSYNC; // synchronizer handle +typedef uint32_t HDSP; // DSP handle +typedef uint32_t HFX; // effect handle +typedef uint32_t HSUBPLUGIN; // plugin handle // Error codes returned by BASS_ErrorGetCode #define BASS_OK 0 // all is OK @@ -208,7 +205,7 @@ typedef struct { const char *name; // description const char *driver; // driver #endif - DWORD flags; + uint32_t flags; } BASS_DEVICEINFO; // BASS_DEVICEINFO flags @@ -235,20 +232,20 @@ typedef struct { #define BASS_DEVICES_AIRPLAY 0x1000000 typedef struct { - DWORD flags; // device capabilities (DSCAPS_xxx flags) - DWORD hwsize; // unused - DWORD hwfree; // unused - DWORD freesam; // unused - DWORD free3d; // unused - DWORD minrate; // unused - DWORD maxrate; // unused + uint32_t flags; // device capabilities (DSCAPS_xxx flags) + uint32_t hwsize; // unused + uint32_t hwfree; // unused + uint32_t freesam; // unused + uint32_t free3d; // unused + uint32_t minrate; // unused + uint32_t maxrate; // unused BOOL eax; // unused - DWORD minbuf; // recommended minimum buffer length in ms - DWORD dsver; // DirectSound version - DWORD latency; // average delay (in ms) before start of playback - DWORD initflags; // BASS_Init "flags" parameter - DWORD speakers; // number of speakers available - DWORD freq; // current output rate + uint32_t minbuf; // recommended minimum buffer length in ms + uint32_t dsver; // DirectSound version + uint32_t latency; // average delay (in ms) before start of playback + uint32_t initflags; // BASS_Init "flags" parameter + uint32_t speakers; // number of speakers available + uint32_t freq; // current output rate } BASS_INFO; // BASS_INFO flags (from DSOUND.H) @@ -259,11 +256,11 @@ typedef struct { // Recording device info structure typedef struct { - DWORD flags; // device capabilities (DSCCAPS_xxx flags) - DWORD formats; // supported standard formats (WAVE_FORMAT_xxx flags) - DWORD inputs; // number of inputs + uint32_t flags; // device capabilities (DSCCAPS_xxx flags) + uint32_t formats; // supported standard formats (WAVE_FORMAT_xxx flags) + uint32_t inputs; // number of inputs BOOL singlein; // TRUE = only 1 input can be set at a time - DWORD freq; // current input rate + uint32_t freq; // current input rate } BASS_RECORDINFO; // BASS_RECORDINFO flags (from DSOUND.H) @@ -288,23 +285,23 @@ typedef struct { // Sample info structure typedef struct { - DWORD freq; // default playback rate + uint32_t freq; // default playback rate float volume; // default volume (0-1) float pan; // default pan (-1=left, 0=middle, 1=right) - DWORD flags; // BASS_SAMPLE_xxx flags - DWORD length; // length (in bytes) - DWORD max; // maximum simultaneous playbacks - DWORD origres; // original resolution - DWORD chans; // number of channels - DWORD mingap; // minimum gap (ms) between creating channels - DWORD mode3d; // BASS_3DMODE_xxx mode + uint32_t flags; // BASS_SAMPLE_xxx flags + uint32_t length; // length (in bytes) + uint32_t max; // maximum simultaneous playbacks + uint32_t origres; // original resolution + uint32_t chans; // number of channels + uint32_t mingap; // minimum gap (ms) between creating channels + uint32_t mode3d; // BASS_3DMODE_xxx mode float mindist; // minimum distance float maxdist; // maximum distance - DWORD iangle; // angle of inside projection cone - DWORD oangle; // angle of outside projection cone + uint32_t iangle; // angle of inside projection cone + uint32_t oangle; // angle of outside projection cone float outvol; // delta-volume outside the projection cone - DWORD vam; // unused - DWORD priority; // unused + uint32_t vam; // unused + uint32_t priority; // unused } BASS_SAMPLE; #define BASS_SAMPLE_8BITS 1 // 8 bit @@ -386,11 +383,11 @@ typedef struct { // Channel info structure typedef struct { - DWORD freq; // default playback rate - DWORD chans; // channels - DWORD flags; - DWORD ctype; // type of channel - DWORD origres; // original resolution + uint32_t freq; // default playback rate + uint32_t chans; // channels + uint32_t flags; + uint32_t ctype; // type of channel + uint32_t origres; // original resolution HSUBPLUGIN plugin; HSAMPLE sample; const char *filename; @@ -425,7 +422,7 @@ typedef struct { #define BASS_CTYPE_MUSIC_MO3 0x00100 // MO3 flag typedef struct { - DWORD ctype; // channel type + uint32_t ctype; // channel type #if defined(_WIN32_WCE) || (defined(WINAPI_FAMILY) && WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP) const wchar_t *name; // format description const wchar_t *exts; // file extension filter (*.ext1;*.ext2;etc...) @@ -436,8 +433,8 @@ typedef struct { } BASS_PLUGINFORM; typedef struct { - DWORD version; // version (same form as BASS_GetVersion) - DWORD formatc; // number of formats + uint32_t version; // version (same form as BASS_GetVersion) + uint32_t formatc; // number of formats const BASS_PLUGINFORM *formats; // the array of formats } BASS_PLUGININFO; @@ -467,7 +464,7 @@ typedef struct BASS_3DVECTOR { #define BASS_SAMCHAN_NEW 1 // get a new playback channel #define BASS_SAMCHAN_STREAM 2 // create a stream -typedef DWORD (CALLBACK STREAMPROC)(HSTREAM handle, void *buffer, DWORD length, void *user); +typedef uint32_t (CALLBACK STREAMPROC)(HSTREAM handle, void *buffer, uint32_t length, void *user); /* User stream callback function. handle : The stream that needs writing buffer : Buffer to write the samples in @@ -491,7 +488,7 @@ RETURN : Number of bytes written. Set the BASS_STREAMPROC_END flag to end the st // User file stream callback functions typedef void (CALLBACK FILECLOSEPROC)(void *user); typedef QWORD (CALLBACK FILELENPROC)(void *user); -typedef DWORD (CALLBACK FILEREADPROC)(void *buffer, DWORD length, void *user); +typedef uint32_t (CALLBACK FILEREADPROC)(void *buffer, uint32_t length, void *user); typedef BOOL (CALLBACK FILESEEKPROC)(QWORD offset, void *user); typedef struct { @@ -518,7 +515,7 @@ typedef struct { #define BASS_FILEPOS_BUFFERING 9 #define BASS_FILEPOS_AVAILABLE 10 -typedef void (CALLBACK DOWNLOADPROC)(const void *buffer, DWORD length, void *user); +typedef void (CALLBACK DOWNLOADPROC)(const void *buffer, uint32_t length, void *user); /* Internet stream download callback function. buffer : Buffer containing the downloaded data... NULL=end of download length : Number of bytes in the buffer @@ -543,14 +540,14 @@ user : The 'user' parameter value given when calling BASS_StreamCreateURL */ #define BASS_SYNC_MIXTIME 0x40000000 // flag: sync at mixtime, else at playtime #define BASS_SYNC_ONETIME 0x80000000 // flag: sync only once, else continuously -typedef void (CALLBACK SYNCPROC)(HSYNC handle, DWORD channel, DWORD data, void *user); +typedef void (CALLBACK SYNCPROC)(HSYNC handle, uint32_t channel, uint32_t data, void *user); /* Sync callback function. handle : The sync that has occured channel: Channel that the sync occured in data : Additional data associated with the sync's occurance user : The 'user' parameter given when calling BASS_ChannelSetSync */ -typedef void (CALLBACK DSPPROC)(HDSP handle, DWORD channel, void *buffer, DWORD length, void *user); +typedef void (CALLBACK DSPPROC)(HDSP handle, uint32_t channel, void *buffer, uint32_t length, void *user); /* DSP callback function. handle : The DSP handle channel: Channel that the DSP is being applied to @@ -558,7 +555,7 @@ buffer : Buffer to apply the DSP to length : Number of bytes in the buffer user : The 'user' parameter given when calling BASS_ChannelSetDSP */ -typedef BOOL (CALLBACK RECORDPROC)(HRECORD handle, const void *buffer, DWORD length, void *user); +typedef BOOL (CALLBACK RECORDPROC)(HRECORD handle, const void *buffer, uint32_t length, void *user); /* Recording callback function. handle : The recording handle buffer : Buffer containing the recorded sample data @@ -679,7 +676,7 @@ typedef struct { typedef struct { const char *key; const void *data; - DWORD length; + uint32_t length; } TAG_APE_BINARY; // BWF "bext" tag structure @@ -711,8 +708,8 @@ typedef struct { // BWF "cart" tag structures typedef struct { - DWORD dwUsage; // FOURCC timer usage ID - DWORD dwValue; // timer value in samples from head + uint32_t dwUsage; // FOURCC timer usage ID + uint32_t dwValue; // timer value in samples from head } TAG_CART_TIMER; typedef struct @@ -732,7 +729,7 @@ typedef struct char ProducerAppID[64]; // name of vendor or application char ProducerAppVersion[64]; // version of producer application char UserDef[64]; // user defined text - DWORD dwLevelReference; // sample value for 0 dB reference + uint32_t dwLevelReference; // sample value for 0 dB reference TAG_CART_TIMER PostTimer[8]; // 8 time markers after head char Reserved[276]; char URL[1024]; // uniform resource locator @@ -748,17 +745,17 @@ typedef struct // RIFF "cue " tag structures typedef struct { - DWORD dwName; - DWORD dwPosition; - DWORD fccChunk; - DWORD dwChunkStart; - DWORD dwBlockStart; - DWORD dwSampleOffset; + uint32_t dwName; + uint32_t dwPosition; + uint32_t fccChunk; + uint32_t dwChunkStart; + uint32_t dwBlockStart; + uint32_t dwSampleOffset; } TAG_CUE_POINT; typedef struct { - DWORD dwCuePoints; + uint32_t dwCuePoints; #if defined(__GNUC__) && __GNUC__<3 TAG_CUE_POINT CuePoints[0]; #elif 1 // change to 0 if compiler fails the following line @@ -771,25 +768,25 @@ typedef struct // RIFF "smpl" tag structures typedef struct { - DWORD dwIdentifier; - DWORD dwType; - DWORD dwStart; - DWORD dwEnd; - DWORD dwFraction; - DWORD dwPlayCount; + uint32_t dwIdentifier; + uint32_t dwType; + uint32_t dwStart; + uint32_t dwEnd; + uint32_t dwFraction; + uint32_t dwPlayCount; } TAG_SMPL_LOOP; typedef struct { - DWORD dwManufacturer; - DWORD dwProduct; - DWORD dwSamplePeriod; - DWORD dwMIDIUnityNote; - DWORD dwMIDIPitchFraction; - DWORD dwSMPTEFormat; - DWORD dwSMPTEOffset; - DWORD cSampleLoops; - DWORD cbSamplerData; + uint32_t dwManufacturer; + uint32_t dwProduct; + uint32_t dwSamplePeriod; + uint32_t dwMIDIUnityNote; + uint32_t dwMIDIPitchFraction; + uint32_t dwSMPTEFormat; + uint32_t dwSMPTEOffset; + uint32_t cSampleLoops; + uint32_t cbSamplerData; #if defined(__GNUC__) && __GNUC__<3 TAG_SMPL_LOOP SampleLoops[0]; #elif 1 // change to 0 if compiler fails the following line @@ -804,8 +801,8 @@ typedef struct // CoreAudio codec info structure typedef struct { - DWORD ftype; // file format - DWORD atype; // audio format + uint32_t ftype; // file format + uint32_t atype; // audio format const char *name; // description } TAG_CA_CODEC; @@ -816,8 +813,8 @@ typedef struct tWAVEFORMATEX { uint16_t wFormatTag; uint16_t nChannels; - DWORD nSamplesPerSec; - DWORD nAvgBytesPerSec; + uint32_t nSamplesPerSec; + uint32_t nAvgBytesPerSec; uint16_t nBlockAlign; uint16_t wBitsPerSample; uint16_t cbSize; @@ -877,9 +874,9 @@ typedef struct { float fDepth; float fFeedback; float fFrequency; - DWORD lWaveform; // 0=triangle, 1=sine + uint32_t lWaveform; // 0=triangle, 1=sine float fDelay; - DWORD lPhase; // BASS_DX8_PHASE_xxx + uint32_t lPhase; // BASS_DX8_PHASE_xxx } BASS_DX8_CHORUS; typedef struct { @@ -912,14 +909,14 @@ typedef struct { float fDepth; float fFeedback; float fFrequency; - DWORD lWaveform; // 0=triangle, 1=sine + uint32_t lWaveform; // 0=triangle, 1=sine float fDelay; - DWORD lPhase; // BASS_DX8_PHASE_xxx + uint32_t lPhase; // BASS_DX8_PHASE_xxx } BASS_DX8_FLANGER; typedef struct { - DWORD dwRateHz; // Rate of modulation in hz - DWORD dwWaveShape; // 0=triangle, 1=square + uint32_t dwRateHz; // Rate of modulation in hz + uint32_t dwWaveShape; // 0=triangle, 1=square } BASS_DX8_GARGLE; typedef struct { @@ -960,43 +957,43 @@ typedef struct { float fTarget; float fCurrent; float fTime; - DWORD lCurve; + uint32_t lCurve; } BASS_FX_VOLUME_PARAM; -typedef void (CALLBACK IOSNOTIFYPROC)(DWORD status); +typedef void (CALLBACK IOSNOTIFYPROC)(uint32_t status); /* iOS notification callback function. status : The notification (BASS_IOSNOTIFY_xxx) */ #define BASS_IOSNOTIFY_INTERRUPT 1 // interruption started #define BASS_IOSNOTIFY_INTERRUPT_END 2 // interruption ended -BOOL BASSDEF(BASS_SetConfig)(DWORD option, DWORD value); -DWORD BASSDEF(BASS_GetConfig)(DWORD option); -BOOL BASSDEF(BASS_SetConfigPtr)(DWORD option, const void *value); -const void *BASSDEF(BASS_GetConfigPtr)(DWORD option); -DWORD BASSDEF(BASS_GetVersion)(void); +BOOL BASSDEF(BASS_SetConfig)(uint32_t option, uint32_t value); +uint32_t BASSDEF(BASS_GetConfig)(uint32_t option); +BOOL BASSDEF(BASS_SetConfigPtr)(uint32_t option, const void *value); +const void *BASSDEF(BASS_GetConfigPtr)(uint32_t option); +uint32_t BASSDEF(BASS_GetVersion)(void); int BASSDEF(BASS_ErrorGetCode)(void); -BOOL BASSDEF(BASS_GetDeviceInfo)(DWORD device, BASS_DEVICEINFO *info); +BOOL BASSDEF(BASS_GetDeviceInfo)(uint32_t device, BASS_DEVICEINFO *info); #if defined(_WIN32) && !defined(_WIN32_WCE) && !(defined(WINAPI_FAMILY) && WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP) -BOOL BASSDEF(BASS_Init)(int device, DWORD freq, DWORD flags, HWND win, const void *dsguid); +BOOL BASSDEF(BASS_Init)(int device, uint32_t freq, uint32_t flags, HWND win, const void *dsguid); #else -BOOL BASSDEF(BASS_Init)(int device, DWORD freq, DWORD flags, void *win, const void *dsguid); +BOOL BASSDEF(BASS_Init)(int device, uint32_t freq, uint32_t flags, void *win, const void *dsguid); #endif BOOL BASSDEF(BASS_Free)(void); -BOOL BASSDEF(BASS_SetDevice)(DWORD device); -DWORD BASSDEF(BASS_GetDevice)(void); +BOOL BASSDEF(BASS_SetDevice)(uint32_t device); +uint32_t BASSDEF(BASS_GetDevice)(void); BOOL BASSDEF(BASS_GetInfo)(BASS_INFO *info); BOOL BASSDEF(BASS_Start)(void); BOOL BASSDEF(BASS_Stop)(void); BOOL BASSDEF(BASS_Pause)(void); -DWORD BASSDEF(BASS_IsStarted)(void); -BOOL BASSDEF(BASS_Update)(DWORD length); +uint32_t BASSDEF(BASS_IsStarted)(void); +BOOL BASSDEF(BASS_Update)(uint32_t length); float BASSDEF(BASS_GetCPU)(void); BOOL BASSDEF(BASS_SetVolume)(float volume); float BASSDEF(BASS_GetVolume)(void); #if defined(_WIN32) && !defined(_WIN32_WCE) && !(defined(WINAPI_FAMILY) && WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP) -void *BASSDEF(BASS_GetDSoundObject)(DWORD object); +void *BASSDEF(BASS_GetDSoundObject)(uint32_t object); #endif BOOL BASSDEF(BASS_Set3DFactors)(float distf, float rollf, float doppf); @@ -1005,119 +1002,119 @@ BOOL BASSDEF(BASS_Set3DPosition)(const BASS_3DVECTOR *pos, const BASS_3DVECTOR * BOOL BASSDEF(BASS_Get3DPosition)(BASS_3DVECTOR *pos, BASS_3DVECTOR *vel, BASS_3DVECTOR *front, BASS_3DVECTOR *top); void BASSDEF(BASS_Apply3D)(void); -HSUBPLUGIN BASSDEF(BASS_PluginLoad)(const char *file, DWORD flags); +HSUBPLUGIN BASSDEF(BASS_PluginLoad)(const char *file, uint32_t flags); BOOL BASSDEF(BASS_PluginFree)(HSUBPLUGIN handle); BOOL BASSDEF(BASS_PluginEnable)(HSUBPLUGIN handle, BOOL enable); const BASS_PLUGININFO *BASSDEF(BASS_PluginGetInfo)(HSUBPLUGIN handle); -HSAMPLE BASSDEF(BASS_SampleLoad)(BOOL mem, const void *file, QWORD offset, DWORD length, DWORD max, DWORD flags); -HSAMPLE BASSDEF(BASS_SampleCreate)(DWORD length, DWORD freq, DWORD chans, DWORD max, DWORD flags); +HSAMPLE BASSDEF(BASS_SampleLoad)(BOOL mem, const void *file, QWORD offset, uint32_t length, uint32_t max, uint32_t flags); +HSAMPLE BASSDEF(BASS_SampleCreate)(uint32_t length, uint32_t freq, uint32_t chans, uint32_t max, uint32_t flags); BOOL BASSDEF(BASS_SampleFree)(HSAMPLE handle); BOOL BASSDEF(BASS_SampleSetData)(HSAMPLE handle, const void *buffer); BOOL BASSDEF(BASS_SampleGetData)(HSAMPLE handle, void *buffer); BOOL BASSDEF(BASS_SampleGetInfo)(HSAMPLE handle, BASS_SAMPLE *info); BOOL BASSDEF(BASS_SampleSetInfo)(HSAMPLE handle, const BASS_SAMPLE *info); -DWORD BASSDEF(BASS_SampleGetChannel)(HSAMPLE handle, DWORD flags); -DWORD BASSDEF(BASS_SampleGetChannels)(HSAMPLE handle, HCHANNEL *channels); +uint32_t BASSDEF(BASS_SampleGetChannel)(HSAMPLE handle, uint32_t flags); +uint32_t BASSDEF(BASS_SampleGetChannels)(HSAMPLE handle, HCHANNEL *channels); BOOL BASSDEF(BASS_SampleStop)(HSAMPLE handle); -HSTREAM BASSDEF(BASS_StreamCreate)(DWORD freq, DWORD chans, DWORD flags, STREAMPROC *proc, void *user); -HSTREAM BASSDEF(BASS_StreamCreateFile)(BOOL mem, const void *file, QWORD offset, QWORD length, DWORD flags); -HSTREAM BASSDEF(BASS_StreamCreateURL)(const char *url, DWORD offset, DWORD flags, DOWNLOADPROC *proc, void *user); -HSTREAM BASSDEF(BASS_StreamCreateFileUser)(DWORD system, DWORD flags, const BASS_FILEPROCS *proc, void *user); +HSTREAM BASSDEF(BASS_StreamCreate)(uint32_t freq, uint32_t chans, uint32_t flags, STREAMPROC *proc, void *user); +HSTREAM BASSDEF(BASS_StreamCreateFile)(BOOL mem, const void *file, QWORD offset, QWORD length, uint32_t flags); +HSTREAM BASSDEF(BASS_StreamCreateURL)(const char *url, uint32_t offset, uint32_t flags, DOWNLOADPROC *proc, void *user); +HSTREAM BASSDEF(BASS_StreamCreateFileUser)(uint32_t system, uint32_t flags, const BASS_FILEPROCS *proc, void *user); BOOL BASSDEF(BASS_StreamFree)(HSTREAM handle); -QWORD BASSDEF(BASS_StreamGetFilePosition)(HSTREAM handle, DWORD mode); -DWORD BASSDEF(BASS_StreamPutData)(HSTREAM handle, const void *buffer, DWORD length); -DWORD BASSDEF(BASS_StreamPutFileData)(HSTREAM handle, const void *buffer, DWORD length); +QWORD BASSDEF(BASS_StreamGetFilePosition)(HSTREAM handle, uint32_t mode); +uint32_t BASSDEF(BASS_StreamPutData)(HSTREAM handle, const void *buffer, uint32_t length); +uint32_t BASSDEF(BASS_StreamPutFileData)(HSTREAM handle, const void *buffer, uint32_t length); -HMUSIC BASSDEF(BASS_MusicLoad)(BOOL mem, const void *file, QWORD offset, DWORD length, DWORD flags, DWORD freq); +HMUSIC BASSDEF(BASS_MusicLoad)(BOOL mem, const void *file, QWORD offset, uint32_t length, uint32_t flags, uint32_t freq); BOOL BASSDEF(BASS_MusicFree)(HMUSIC handle); -BOOL BASSDEF(BASS_RecordGetDeviceInfo)(DWORD device, BASS_DEVICEINFO *info); +BOOL BASSDEF(BASS_RecordGetDeviceInfo)(uint32_t device, BASS_DEVICEINFO *info); BOOL BASSDEF(BASS_RecordInit)(int device); BOOL BASSDEF(BASS_RecordFree)(void); -BOOL BASSDEF(BASS_RecordSetDevice)(DWORD device); -DWORD BASSDEF(BASS_RecordGetDevice)(void); +BOOL BASSDEF(BASS_RecordSetDevice)(uint32_t device); +uint32_t BASSDEF(BASS_RecordGetDevice)(void); BOOL BASSDEF(BASS_RecordGetInfo)(BASS_RECORDINFO *info); const char *BASSDEF(BASS_RecordGetInputName)(int input); -BOOL BASSDEF(BASS_RecordSetInput)(int input, DWORD flags, float volume); -DWORD BASSDEF(BASS_RecordGetInput)(int input, float *volume); -HRECORD BASSDEF(BASS_RecordStart)(DWORD freq, DWORD chans, DWORD flags, RECORDPROC *proc, void *user); - -double BASSDEF(BASS_ChannelBytes2Seconds)(DWORD handle, QWORD pos); -QWORD BASSDEF(BASS_ChannelSeconds2Bytes)(DWORD handle, double pos); -DWORD BASSDEF(BASS_ChannelGetDevice)(DWORD handle); -BOOL BASSDEF(BASS_ChannelSetDevice)(DWORD handle, DWORD device); -DWORD BASSDEF(BASS_ChannelIsActive)(DWORD handle); -BOOL BASSDEF(BASS_ChannelGetInfo)(DWORD handle, BASS_CHANNELINFO *info); -const char *BASSDEF(BASS_ChannelGetTags)(DWORD handle, DWORD tags); -DWORD BASSDEF(BASS_ChannelFlags)(DWORD handle, DWORD flags, DWORD mask); -BOOL BASSDEF(BASS_ChannelLock)(DWORD handle, BOOL lock); -BOOL BASSDEF(BASS_ChannelFree)(DWORD handle); -BOOL BASSDEF(BASS_ChannelPlay)(DWORD handle, BOOL restart); -BOOL BASSDEF(BASS_ChannelStop)(DWORD handle); -BOOL BASSDEF(BASS_ChannelPause)(DWORD handle); -BOOL BASSDEF(BASS_ChannelUpdate)(DWORD handle, DWORD length); -BOOL BASSDEF(BASS_ChannelSetAttribute)(DWORD handle, DWORD attrib, float value); -BOOL BASSDEF(BASS_ChannelGetAttribute)(DWORD handle, DWORD attrib, float *value); -BOOL BASSDEF(BASS_ChannelSlideAttribute)(DWORD handle, DWORD attrib, float value, DWORD time); -BOOL BASSDEF(BASS_ChannelIsSliding)(DWORD handle, DWORD attrib); -BOOL BASSDEF(BASS_ChannelSetAttributeEx)(DWORD handle, DWORD attrib, void *value, DWORD size); -DWORD BASSDEF(BASS_ChannelGetAttributeEx)(DWORD handle, DWORD attrib, void *value, DWORD size); -BOOL BASSDEF(BASS_ChannelSet3DAttributes)(DWORD handle, int mode, float min, float max, int iangle, int oangle, float outvol); -BOOL BASSDEF(BASS_ChannelGet3DAttributes)(DWORD handle, DWORD *mode, float *min, float *max, DWORD *iangle, DWORD *oangle, float *outvol); -BOOL BASSDEF(BASS_ChannelSet3DPosition)(DWORD handle, const BASS_3DVECTOR *pos, const BASS_3DVECTOR *orient, const BASS_3DVECTOR *vel); -BOOL BASSDEF(BASS_ChannelGet3DPosition)(DWORD handle, BASS_3DVECTOR *pos, BASS_3DVECTOR *orient, BASS_3DVECTOR *vel); -QWORD BASSDEF(BASS_ChannelGetLength)(DWORD handle, DWORD mode); -BOOL BASSDEF(BASS_ChannelSetPosition)(DWORD handle, QWORD pos, DWORD mode); -QWORD BASSDEF(BASS_ChannelGetPosition)(DWORD handle, DWORD mode); -DWORD BASSDEF(BASS_ChannelGetLevel)(DWORD handle); -BOOL BASSDEF(BASS_ChannelGetLevelEx)(DWORD handle, float *levels, float length, DWORD flags); -DWORD BASSDEF(BASS_ChannelGetData)(DWORD handle, void *buffer, DWORD length); -HSYNC BASSDEF(BASS_ChannelSetSync)(DWORD handle, DWORD type, QWORD param, SYNCPROC *proc, void *user); -BOOL BASSDEF(BASS_ChannelRemoveSync)(DWORD handle, HSYNC sync); -BOOL BASSDEF(BASS_ChannelSetLink)(DWORD handle, DWORD chan); -BOOL BASSDEF(BASS_ChannelRemoveLink)(DWORD handle, DWORD chan); -HDSP BASSDEF(BASS_ChannelSetDSP)(DWORD handle, DSPPROC *proc, void *user, int priority); -BOOL BASSDEF(BASS_ChannelRemoveDSP)(DWORD handle, HDSP dsp); -HFX BASSDEF(BASS_ChannelSetFX)(DWORD handle, DWORD type, int priority); -BOOL BASSDEF(BASS_ChannelRemoveFX)(DWORD handle, HFX fx); +BOOL BASSDEF(BASS_RecordSetInput)(int input, uint32_t flags, float volume); +uint32_t BASSDEF(BASS_RecordGetInput)(int input, float *volume); +HRECORD BASSDEF(BASS_RecordStart)(uint32_t freq, uint32_t chans, uint32_t flags, RECORDPROC *proc, void *user); + +double BASSDEF(BASS_ChannelBytes2Seconds)(uint32_t handle, QWORD pos); +QWORD BASSDEF(BASS_ChannelSeconds2Bytes)(uint32_t handle, double pos); +uint32_t BASSDEF(BASS_ChannelGetDevice)(uint32_t handle); +BOOL BASSDEF(BASS_ChannelSetDevice)(uint32_t handle, uint32_t device); +uint32_t BASSDEF(BASS_ChannelIsActive)(uint32_t handle); +BOOL BASSDEF(BASS_ChannelGetInfo)(uint32_t handle, BASS_CHANNELINFO *info); +const char *BASSDEF(BASS_ChannelGetTags)(uint32_t handle, uint32_t tags); +uint32_t BASSDEF(BASS_ChannelFlags)(uint32_t handle, uint32_t flags, uint32_t mask); +BOOL BASSDEF(BASS_ChannelLock)(uint32_t handle, BOOL lock); +BOOL BASSDEF(BASS_ChannelFree)(uint32_t handle); +BOOL BASSDEF(BASS_ChannelPlay)(uint32_t handle, BOOL restart); +BOOL BASSDEF(BASS_ChannelStop)(uint32_t handle); +BOOL BASSDEF(BASS_ChannelPause)(uint32_t handle); +BOOL BASSDEF(BASS_ChannelUpdate)(uint32_t handle, uint32_t length); +BOOL BASSDEF(BASS_ChannelSetAttribute)(uint32_t handle, uint32_t attrib, float value); +BOOL BASSDEF(BASS_ChannelGetAttribute)(uint32_t handle, uint32_t attrib, float *value); +BOOL BASSDEF(BASS_ChannelSlideAttribute)(uint32_t handle, uint32_t attrib, float value, uint32_t time); +BOOL BASSDEF(BASS_ChannelIsSliding)(uint32_t handle, uint32_t attrib); +BOOL BASSDEF(BASS_ChannelSetAttributeEx)(uint32_t handle, uint32_t attrib, void *value, uint32_t size); +uint32_t BASSDEF(BASS_ChannelGetAttributeEx)(uint32_t handle, uint32_t attrib, void *value, uint32_t size); +BOOL BASSDEF(BASS_ChannelSet3DAttributes)(uint32_t handle, int mode, float min, float max, int iangle, int oangle, float outvol); +BOOL BASSDEF(BASS_ChannelGet3DAttributes)(uint32_t handle, uint32_t *mode, float *min, float *max, uint32_t *iangle, uint32_t *oangle, float *outvol); +BOOL BASSDEF(BASS_ChannelSet3DPosition)(uint32_t handle, const BASS_3DVECTOR *pos, const BASS_3DVECTOR *orient, const BASS_3DVECTOR *vel); +BOOL BASSDEF(BASS_ChannelGet3DPosition)(uint32_t handle, BASS_3DVECTOR *pos, BASS_3DVECTOR *orient, BASS_3DVECTOR *vel); +QWORD BASSDEF(BASS_ChannelGetLength)(uint32_t handle, uint32_t mode); +BOOL BASSDEF(BASS_ChannelSetPosition)(uint32_t handle, QWORD pos, uint32_t mode); +QWORD BASSDEF(BASS_ChannelGetPosition)(uint32_t handle, uint32_t mode); +uint32_t BASSDEF(BASS_ChannelGetLevel)(uint32_t handle); +BOOL BASSDEF(BASS_ChannelGetLevelEx)(uint32_t handle, float *levels, float length, uint32_t flags); +uint32_t BASSDEF(BASS_ChannelGetData)(uint32_t handle, void *buffer, uint32_t length); +HSYNC BASSDEF(BASS_ChannelSetSync)(uint32_t handle, uint32_t type, QWORD param, SYNCPROC *proc, void *user); +BOOL BASSDEF(BASS_ChannelRemoveSync)(uint32_t handle, HSYNC sync); +BOOL BASSDEF(BASS_ChannelSetLink)(uint32_t handle, uint32_t chan); +BOOL BASSDEF(BASS_ChannelRemoveLink)(uint32_t handle, uint32_t chan); +HDSP BASSDEF(BASS_ChannelSetDSP)(uint32_t handle, DSPPROC *proc, void *user, int priority); +BOOL BASSDEF(BASS_ChannelRemoveDSP)(uint32_t handle, HDSP dsp); +HFX BASSDEF(BASS_ChannelSetFX)(uint32_t handle, uint32_t type, int priority); +BOOL BASSDEF(BASS_ChannelRemoveFX)(uint32_t handle, HFX fx); BOOL BASSDEF(BASS_FXSetParameters)(HFX handle, const void *params); BOOL BASSDEF(BASS_FXGetParameters)(HFX handle, void *params); BOOL BASSDEF(BASS_FXSetPriority)(HFX handle, int priority); -BOOL BASSDEF(BASS_FXReset)(DWORD handle); +BOOL BASSDEF(BASS_FXReset)(uint32_t handle); #ifdef __cplusplus } #if defined(_WIN32) && !defined(NOBASSOVERLOADS) -static inline HSUBPLUGIN BASS_PluginLoad(const wchar_t *file, DWORD flags) +static inline HSUBPLUGIN BASS_PluginLoad(const wchar_t *file, uint32_t flags) { return BASS_PluginLoad((const char*)file, flags | BASS_UNICODE); } -static inline HMUSIC BASS_MusicLoad(BOOL mem, const wchar_t *file, QWORD offset, DWORD length, DWORD flags, DWORD freq) +static inline HMUSIC BASS_MusicLoad(BOOL mem, const wchar_t *file, QWORD offset, uint32_t length, uint32_t flags, uint32_t freq) { return BASS_MusicLoad(mem, (const void*)file, offset, length, flags | BASS_UNICODE, freq); } -static inline HSAMPLE BASS_SampleLoad(BOOL mem, const wchar_t *file, QWORD offset, DWORD length, DWORD max, DWORD flags) +static inline HSAMPLE BASS_SampleLoad(BOOL mem, const wchar_t *file, QWORD offset, uint32_t length, uint32_t max, uint32_t flags) { return BASS_SampleLoad(mem, (const void*)file, offset, length, max, flags | BASS_UNICODE); } -static inline HSTREAM BASS_StreamCreateFile(BOOL mem, const wchar_t *file, QWORD offset, QWORD length, DWORD flags) +static inline HSTREAM BASS_StreamCreateFile(BOOL mem, const wchar_t *file, QWORD offset, QWORD length, uint32_t flags) { return BASS_StreamCreateFile(mem, (const void*)file, offset, length, flags | BASS_UNICODE); } -static inline HSTREAM BASS_StreamCreateURL(const wchar_t *url, DWORD offset, DWORD flags, DOWNLOADPROC *proc, void *user) +static inline HSTREAM BASS_StreamCreateURL(const wchar_t *url, uint32_t offset, uint32_t flags, DOWNLOADPROC *proc, void *user) { return BASS_StreamCreateURL((const char*)url, offset, flags | BASS_UNICODE, proc, user); } -static inline BOOL BASS_SetConfigPtr(DWORD option, const wchar_t *value) +static inline BOOL BASS_SetConfigPtr(uint32_t option, const wchar_t *value) { return BASS_SetConfigPtr(option | BASS_UNICODE, (const void*)value); } diff --git a/plugins/BASS_interface/src/Main.cpp b/plugins/BASS_interface/src/Main.cpp index f47410d593..61b6b1d1c5 100644 --- a/plugins/BASS_interface/src/Main.cpp +++ b/plugins/BASS_interface/src/Main.cpp @@ -181,7 +181,7 @@ INT_PTR CALLBACK OptionsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara EnableWindow(GetDlgItem(hwndDlg, i), FALSE);
}
else {
- DWORD bassver = BASS_GetVersion();
+ uint32_t bassver = BASS_GetVersion();
mir_snwprintf(tmp, TranslateT("Un4seen's BASS version: %d.%d.%d.%d"), bassver >> 24, (bassver >> 16) & 0xff, (bassver >> 8) & 0xff, bassver & 0xff);
SetDlgItemText(hwndDlg, IDC_BASSVERSION, tmp);
@@ -221,7 +221,7 @@ INT_PTR CALLBACK OptionsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara GetDlgItemText(hwndDlg, IDC_OUTDEVICE, tmp, _countof(tmp));
g_plugin.setWString(OPT_OUTDEVICE, tmp);
- Volume = (DWORD)SendDlgItemMessage(hwndDlg, IDC_VOLUME, TBM_GETPOS, 0, 0);
+ Volume = (uint32_t)SendDlgItemMessage(hwndDlg, IDC_VOLUME, TBM_GETPOS, 0, 0);
g_plugin.setByte(OPT_VOLUME, Volume);
sndLimSnd = SendDlgItemMessage(hwndDlg, IDC_MAXCHANNEL, CB_GETCURSEL, 0, 0) + 1;
@@ -374,7 +374,7 @@ static LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR case WM_HSCROLL:
if (hBass != nullptr)
if (LOWORD(wParam) == SB_ENDSCROLL || LOWORD(wParam) == SB_THUMBTRACK) {
- Volume = (DWORD)SendMessage(hwndSlider, TBM_GETPOS, 0, 0);
+ Volume = (uint32_t)SendMessage(hwndSlider, TBM_GETPOS, 0, 0);
g_plugin.setByte(OPT_VOLUME, Volume);
BASS_SetConfig(BASS_CONFIG_GVOL_STREAM, Volume * 100);
SendMessage(hwndOptSlider, TBM_SETPOS, TRUE, Volume);
@@ -483,7 +483,7 @@ void LoadBassLibrary(const wchar_t *ptszPath) BASS_DEVICEINFO info;
if (!g_plugin.getWString(OPT_OUTDEVICE, &dbv))
- for (size_t i = 1; BASS_GetDeviceInfo((DWORD)i, &info); i++)
+ for (size_t i = 1; BASS_GetDeviceInfo((uint32_t)i, &info); i++)
if (!mir_wstrcmp(dbv.pwszVal, _A2T(info.name)))
device = (int)i;
diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp index 5639b63c86..5f7b929e6e 100644 --- a/plugins/BasicHistory/src/BasicHistory.cpp +++ b/plugins/BasicHistory/src/BasicHistory.cpp @@ -187,7 +187,7 @@ int ModulesLoaded(WPARAM, LPARAM) wchar_t ftpExe[MAX_PATH];
if (SUCCEEDED(SHGetFolderPath(nullptr, CSIDL_PROGRAM_FILES, nullptr, SHGFP_TYPE_CURRENT, ftpExe))) {
wcscat_s(ftpExe, L"\\WinSCP\\WinSCP.exe");
- DWORD atr = GetFileAttributes(ftpExe);
+ uint32_t atr = GetFileAttributes(ftpExe);
if (atr == INVALID_FILE_ATTRIBUTES || atr & FILE_ATTRIBUTE_DIRECTORY) {
#ifdef _WIN64
if (SUCCEEDED(SHGetFolderPath(nullptr, CSIDL_PROGRAM_FILESX86, nullptr, SHGFP_TYPE_CURRENT, ftpExe))) {
diff --git a/plugins/BasicHistory/src/BinaryExport.cpp b/plugins/BasicHistory/src/BinaryExport.cpp index 791be5f2b6..1eadefd459 100644 --- a/plugins/BasicHistory/src/BinaryExport.cpp +++ b/plugins/BasicHistory/src/BinaryExport.cpp @@ -39,7 +39,7 @@ struct BinaryFileHeader struct BinaryFileMessageHeader
{
- DWORD timestamp;
+ uint32_t timestamp;
uint16_t eventType;
uint16_t flags;
};
diff --git a/plugins/BasicHistory/src/BinaryExport.h b/plugins/BasicHistory/src/BinaryExport.h index 917e27787f..3f4744c582 100644 --- a/plugins/BasicHistory/src/BinaryExport.h +++ b/plugins/BasicHistory/src/BinaryExport.h @@ -42,6 +42,6 @@ private: unsigned int codepage;
inline void WriteString(const std::wstring &str);
inline bool ReadString(std::wstring &str);
- DWORD lTime;
+ uint32_t lTime;
};
diff --git a/plugins/BasicHistory/src/DatExport.cpp b/plugins/BasicHistory/src/DatExport.cpp index d21f66e0c5..fd3718c334 100644 --- a/plugins/BasicHistory/src/DatExport.cpp +++ b/plugins/BasicHistory/src/DatExport.cpp @@ -40,15 +40,15 @@ struct MCHeader typedef struct
{
int cbSize; //size of the structure in bytes
- DWORD szModule; //pointer to name of the module that 'owns' this
+ uint32_t szModule; //pointer to name of the module that 'owns' this
//event, ie the one that is in control of the data format
- DWORD timestamp; //seconds since 00:00, 01/01/1970. Gives us times until
+ uint32_t timestamp; //seconds since 00:00, 01/01/1970. Gives us times until
//2106 unless you use the standard C library which is
//signed and can only do until 2038. In GMT.
- DWORD flags; //the omnipresent flags
+ uint32_t flags; //the omnipresent flags
uint16_t eventType; //module-defined event type field
- DWORD cbBlob; //size of pBlob in bytes
- DWORD pBlob; //pointer to buffer containing module-defined event data
+ uint32_t cbBlob; //size of pBlob in bytes
+ uint32_t pBlob; //pointer to buffer containing module-defined event data
} DBEVENTINFO86;
@@ -153,7 +153,7 @@ bool DatExport::GetEventList(std::vector<IImport::ExternalMessage>& eventList) DBEVENTINFO info = {};
info.szModule = Proto_GetBaseAccountName(hContact);
wchar_t _str[MAXSELECTSTR + 8]; // for safety reason
- std::multimap<DWORD, IImport::ExternalMessage> sortedEvents;
+ std::multimap<uint32_t, IImport::ExternalMessage> sortedEvents;
while (dataSize > 0) {
messageHeader.cbSize = 0;
IMP_FILE.read((char*)&messageHeader, sizeof(DBEVENTINFO86));
@@ -184,14 +184,14 @@ bool DatExport::GetEventList(std::vector<IImport::ExternalMessage>& eventList) info.pBlob = (uint8_t*)memBuf.c_str();
HistoryEventList::GetObjectDescription(&info, _str, MAXSELECTSTR);
exMsg.message = _str;
- sortedEvents.insert(std::pair<DWORD, IImport::ExternalMessage>(messageHeader.timestamp, exMsg));
+ sortedEvents.insert(std::pair<uint32_t, IImport::ExternalMessage>(messageHeader.timestamp, exMsg));
dataSize -= messageHeader.cbSize + messageHeader.cbBlob;
}
memBuf.resize(0);
memBuf.shrink_to_fit();
- for (std::multimap<DWORD, IImport::ExternalMessage>::iterator it = sortedEvents.begin(); it != sortedEvents.end(); ++it)
+ for (std::multimap<uint32_t, IImport::ExternalMessage>::iterator it = sortedEvents.begin(); it != sortedEvents.end(); ++it)
eventList.push_back(it->second);
return true;
diff --git a/plugins/BasicHistory/src/EventList.cpp b/plugins/BasicHistory/src/EventList.cpp index 39ff4ff4ca..a891e88976 100644 --- a/plugins/BasicHistory/src/EventList.cpp +++ b/plugins/BasicHistory/src/EventList.cpp @@ -214,7 +214,7 @@ void HistoryEventList::GetTempList(std::list<EventTempIndex>& tempList, bool noF ti.isExternal = true;
for (int i = 0; i < (int)m_importedMessages.size(); ++i) {
if (noFilter || CanShowHistory(m_importedMessages[i])) {
- DWORD ts = m_importedMessages[i].timestamp;
+ uint32_t ts = m_importedMessages[i].timestamp;
while (itL != tempList.end() && itL->timestamp < ts)++itL;
if (itL == tempList.end() || itL->timestamp > ts) {
ti.exIdx = i;
@@ -258,13 +258,13 @@ void HistoryEventList::RefreshEventList() m_eventList.clear();
m_eventList.push_back(std::deque<EventIndex>());
- DWORD lastTime = MAXDWORD;
- DWORD groupTime = Options::instance->groupTime * 60 * 60;
+ uint32_t lastTime = MAXDWORD;
+ uint32_t groupTime = Options::instance->groupTime * 60 * 60;
int maxMess = Options::instance->groupMessagesNumber;
int limitator = 0;
EventIndex ei;
for (std::list<EventTempIndex>::iterator itL = nrTempList.begin(); itL != nrTempList.end(); ++itL) {
- DWORD tm = isNewOnTop ? lastTime - itL->timestamp : itL->timestamp - lastTime;
+ uint32_t tm = isNewOnTop ? lastTime - itL->timestamp : itL->timestamp - lastTime;
if (m_isFlat || tm < groupTime && limitator < maxMess) {
lastTime = itL->timestamp;
ei.isExternal = itL->isExternal;
@@ -474,7 +474,7 @@ bool HistoryEventList::GetEventIcon(bool isMe, int eventType, int &id) void HistoryEventList::ImportMessages(const std::vector<IImport::ExternalMessage>& messages)
{
- DWORD lastTime = 0;
+ uint32_t lastTime = 0;
m_importedMessages.clear();
for (int i = 0; i < (int)messages.size(); ++i) {
if (messages[i].timestamp >= lastTime) {
@@ -522,7 +522,7 @@ void HistoryEventList::MargeMessages(const std::vector<IImport::ExternalMessage> bool HistoryEventList::GetEventData(const EventIndex& ev, EventData& data)
{
if (!ev.isExternal) {
- DWORD newBlobSize = db_event_getBlobSize(ev.hEvent);
+ uint32_t newBlobSize = db_event_getBlobSize(ev.hEvent);
if (newBlobSize > m_oldBlobSize) {
m_dbei.pBlob = (uint8_t*)mir_realloc(m_dbei.pBlob, newBlobSize);
m_oldBlobSize = newBlobSize;
diff --git a/plugins/BasicHistory/src/EventList.h b/plugins/BasicHistory/src/EventList.h index df8db5fbc3..299039d7be 100644 --- a/plugins/BasicHistory/src/EventList.h +++ b/plugins/BasicHistory/src/EventList.h @@ -34,7 +34,7 @@ public: {
bool isMe;
uint16_t eventType;
- DWORD timestamp;
+ uint32_t timestamp;
};
struct EventIndex
{
@@ -53,7 +53,7 @@ private: int m_defFilter;
std::wstring m_filterName;
std::vector<IImport::ExternalMessage> m_importedMessages;
- DWORD m_oldBlobSize;
+ uint32_t m_oldBlobSize;
struct EventTempIndex
{
@@ -63,7 +63,7 @@ private: int exIdx;
};
bool isExternal;
- DWORD timestamp;
+ uint32_t timestamp;
};
struct ImportDiscData
@@ -89,7 +89,7 @@ protected: bool m_isWnd;
bool m_isFlat;
int m_deltaTime;
- DWORD m_now;
+ uint32_t m_now;
DBEVENTINFO m_dbei;
virtual void AddGroup(bool isMe, const std::wstring &time, const std::wstring &user, const std::wstring &eventText, int ico) = 0;
diff --git a/plugins/BasicHistory/src/ExportManager.cpp b/plugins/BasicHistory/src/ExportManager.cpp index 5eda574647..524ecb650e 100644 --- a/plugins/BasicHistory/src/ExportManager.cpp +++ b/plugins/BasicHistory/src/ExportManager.cpp @@ -369,7 +369,7 @@ void ExportManager::DeleteExportedEvents() DeleteEvent(m_eventList[j][i]);
}
-void ExportManager::SetDeleteWithoutExportEvents(int deltaTime, DWORD now)
+void ExportManager::SetDeleteWithoutExportEvents(int deltaTime, uint32_t now)
{
m_exp = nullptr;
m_deltaTime = deltaTime;
diff --git a/plugins/BasicHistory/src/ExportManager.h b/plugins/BasicHistory/src/ExportManager.h index 212f76f2ea..c66a0f998b 100644 --- a/plugins/BasicHistory/src/ExportManager.h +++ b/plugins/BasicHistory/src/ExportManager.h @@ -33,7 +33,7 @@ protected: public:
ExportManager(HWND _hwnd, MCONTACT _hContact, int filter);
- void SetAutoExport(const std::wstring _file, int deltaTime, DWORD now)
+ void SetAutoExport(const std::wstring _file, int deltaTime, uint32_t now)
{
m_file = _file;
m_deltaTime = deltaTime;
@@ -51,7 +51,7 @@ public: }
bool Export(IExport::ExportType type);
- void SetDeleteWithoutExportEvents(int deltaTime, DWORD now);
+ void SetDeleteWithoutExportEvents(int deltaTime, uint32_t now);
void DeleteExportedEvents();
int Import(IImport::ImportType type, const std::vector<MCONTACT> &contacts);
bool Import(IImport::ImportType type, std::vector<IImport::ExternalMessage> &eventList, std::wstring *err = nullptr, bool *differentContact = nullptr, std::vector<MCONTACT> *contacts = nullptr);
diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp index 97471870c4..fd6d57ace6 100644 --- a/plugins/BasicHistory/src/HistoryWindow.cpp +++ b/plugins/BasicHistory/src/HistoryWindow.cpp @@ -1612,11 +1612,11 @@ void HistoryWindow::FindToolbarClicked(LPNMTOOLBAR lpnmTB) AppendMenu(hPopupMenu, searcher.IsAllUsers() ? MF_STRING | MF_CHECKED : MF_STRING, IDM_ALLUSERS, TranslateT("All contacts"));
AppendMenu(hPopupMenu, MFT_SEPARATOR, 0, nullptr);
HMENU hFilterMenu = CreatePopupMenu();
- DWORD filter = GetFilterNr();
+ uint32_t filter = GetFilterNr();
AppendMenu(hFilterMenu, filter == 0 ? MF_STRING | MF_CHECKED : MF_STRING, IDM_FILTERDEF, TranslateT("Default history events"));
AppendMenu(hFilterMenu, filter == 1 ? MF_STRING | MF_CHECKED : MF_STRING, IDM_FILTERALL, TranslateT("All events"));
for (size_t i = 0; i < Options::instance->customFilters.size(); ++i) {
- DWORD flags = MF_STRING;
+ uint32_t flags = MF_STRING;
if (filter - 2 == i)
flags |= MF_CHECKED;
diff --git a/plugins/BasicHistory/src/IImport.h b/plugins/BasicHistory/src/IImport.h index a33f2f3931..7208dfc141 100644 --- a/plugins/BasicHistory/src/IImport.h +++ b/plugins/BasicHistory/src/IImport.h @@ -31,7 +31,7 @@ public: struct ExternalMessage
{
- DWORD timestamp;
+ uint32_t timestamp;
uint16_t eventType;
uint16_t flags;
std::wstring message;
diff --git a/plugins/BasicHistory/src/ImageDataObject.h b/plugins/BasicHistory/src/ImageDataObject.h index 2e0ef3dd3f..9a980e823a 100644 --- a/plugins/BasicHistory/src/ImageDataObject.h +++ b/plugins/BasicHistory/src/ImageDataObject.h @@ -113,8 +113,7 @@ public: return E_NOTIMPL;
}
- STDMETHOD(DAdvise)(FORMATETC*, DWORD, IAdviseSink*,
- DWORD*) {
+ STDMETHOD(DAdvise)(FORMATETC*, DWORD, IAdviseSink*, DWORD*) {
return E_NOTIMPL;
}
diff --git a/plugins/BasicHistory/src/Options.cpp b/plugins/BasicHistory/src/Options.cpp index d51ae87aa0..b055c91188 100644 --- a/plugins/BasicHistory/src/Options.cpp +++ b/plugins/BasicHistory/src/Options.cpp @@ -159,7 +159,7 @@ struct FontOptionsList uint8_t defStyle;
char defSize;
wchar_t* szBackgroundName;
- DWORD flags;
+ uint32_t flags;
};
struct ColorOptionsList
@@ -450,7 +450,7 @@ void Options::Save() g_plugin.setByte("defFilter", defFilter < 2 ? defFilter : 2);
if (defFilter >= 2)
g_plugin.setWString("defFilterStr", customFilters[defFilter - 2].name.c_str());
- g_plugin.setDword("customFiltersCount", (DWORD)customFilters.size());
+ g_plugin.setDword("customFiltersCount", (uint32_t)customFilters.size());
for (int i = 0; i < (int)customFilters.size(); ++i) {
char buf[256];
mir_snprintf(buf, "filterName_%d", i);
@@ -774,7 +774,7 @@ bool CheckFile(HWND hwndEdit) {
wchar_t buf[MAX_PATH];
Edit_GetText(hwndEdit, buf, MAX_PATH);
- DWORD atr = GetFileAttributes(buf);
+ uint32_t atr = GetFileAttributes(buf);
if (atr == INVALID_FILE_ATTRIBUTES || atr & FILE_ATTRIBUTE_DIRECTORY) {
MessageBox(GetParent(hwndEdit), TranslateT("File does not exist. Enter correct file path."), TranslateT("Invalid file"), MB_OK | MB_ICONERROR);
SetFocus(hwndEdit);
@@ -1896,6 +1896,6 @@ INT_PTR CALLBACK Options::DlgProcOptsTask(HWND hwndDlg, UINT msg, WPARAM wParam, bool Options::FTPAvail()
{
- DWORD atr = GetFileAttributes(instance->ftpExePath.c_str());
+ uint32_t atr = GetFileAttributes(instance->ftpExePath.c_str());
return !(atr == INVALID_FILE_ATTRIBUTES || atr & FILE_ATTRIBUTE_DIRECTORY);
}
diff --git a/plugins/BasicHistory/src/RichHtmlExport.cpp b/plugins/BasicHistory/src/RichHtmlExport.cpp index a1c01a9d1c..682b7240f1 100644 --- a/plugins/BasicHistory/src/RichHtmlExport.cpp +++ b/plugins/BasicHistory/src/RichHtmlExport.cpp @@ -149,8 +149,8 @@ typedef struct uint8_t bReserved; // Reserved ( must be 0)
uint16_t wPlanes; // Color Planes
uint16_t wBitCount; // Bits per pixel
- DWORD dwBytesInRes; // How many bytes in this resource?
- DWORD dwImageOffset; // Where in the file is this image?
+ uint32_t dwBytesInRes; // How many bytes in this resource?
+ uint32_t dwImageOffset; // Where in the file is this image?
} ICONDIRENTRY, *LPICONDIRENTRY;
typedef struct
diff --git a/plugins/BasicHistory/src/Scheduler.cpp b/plugins/BasicHistory/src/Scheduler.cpp index ad53e27731..553171710a 100644 --- a/plugins/BasicHistory/src/Scheduler.cpp +++ b/plugins/BasicHistory/src/Scheduler.cpp @@ -238,7 +238,7 @@ bool DoTask(TaskOptions& to) return true;
}
- DWORD now = time(0);
+ uint32_t now = time(0);
long long int t = to.eventDeltaTime * 60;
if (to.eventUnit > TaskOptions::Minute)
t *= 60LL;
@@ -708,7 +708,7 @@ void SchedulerThreadFunc(void*) }
while (!finishThread) {
- DWORD timeWait;
+ uint32_t timeWait;
time_t now = time(0);
while (nextExportTime <= now)
if (!ExecuteCurrentTask(now))
@@ -1218,7 +1218,7 @@ bool FtpGetFiles(const std::wstring& dir, const std::list<std::wstring>& files, DeleteFile(script.c_str());
for (std::list<std::wstring>::const_iterator it = localFiles.begin(); it != localFiles.end(); ++it) {
- DWORD atr = GetFileAttributes(it->c_str());
+ uint32_t atr = GetFileAttributes(it->c_str());
if (atr == INVALID_FILE_ATTRIBUTES || atr & FILE_ATTRIBUTE_DIRECTORY)
return true;
}
@@ -1233,7 +1233,7 @@ void CreatePath(const wchar_t *szDir) {
if (!szDir) return;
- DWORD dwAttributes;
+ uint32_t dwAttributes;
wchar_t *pszLastBackslash, szTestDir[MAX_PATH];
mir_wstrncpy(szTestDir, szDir, _countof(szTestDir));
diff --git a/plugins/BasicHistory/src/SearchContext.h b/plugins/BasicHistory/src/SearchContext.h index cab81a213c..466a05a267 100644 --- a/plugins/BasicHistory/src/SearchContext.h +++ b/plugins/BasicHistory/src/SearchContext.h @@ -34,7 +34,7 @@ public: struct MessageData
{
- MessageData(const std::wstring& _description, int _startPos, int _endPos, bool _isMe, DWORD _timestamp)
+ MessageData(const std::wstring& _description, int _startPos, int _endPos, bool _isMe, uint32_t _timestamp)
:description(_description)
{
startPos = _startPos;
@@ -47,7 +47,7 @@ public: int startPos;
int endPos;
bool isMe;
- DWORD timestamp;
+ uint32_t timestamp;
};
std::vector<MessageData> currentGroup;
diff --git a/plugins/Boltun/src/actionQueue.cpp b/plugins/Boltun/src/actionQueue.cpp index 52873c80ac..edc37f2194 100644 --- a/plugins/Boltun/src/actionQueue.cpp +++ b/plugins/Boltun/src/actionQueue.cpp @@ -92,7 +92,7 @@ static void TimerAnswer(MCONTACT hContact, const TalkBot::MessageInfo* info) dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_SENT | DBEF_UTF;
dbei.szModule = BOLTUN_NAME;
- dbei.timestamp = (DWORD)time(0);
+ dbei.timestamp = (uint32_t)time(0);
db_event_add(hContact, &dbei);
bot->AnswerGiven(hContact, *info);
diff --git a/plugins/Boltun/src/boltun.cpp b/plugins/Boltun/src/boltun.cpp index 38bf026122..d45e6c20d0 100644 --- a/plugins/Boltun/src/boltun.cpp +++ b/plugins/Boltun/src/boltun.cpp @@ -128,7 +128,7 @@ static bool LoadMind(const wchar_t* filename, int &line) delete mind;
return false;
}
- DWORD size = SizeofResource(g_plugin.getInst(), hRes);
+ uint32_t size = SizeofResource(g_plugin.getInst(), hRes);
if (!size) {
delete mind;
return false;
diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp index 45bb89b1ff..30f3332fe7 100644 --- a/plugins/BossKeyPlus/src/BossKey.cpp +++ b/plugins/BossKeyPlus/src/BossKey.cpp @@ -70,7 +70,7 @@ static BOOL IsAeroMode() INT_PTR CALLBACK DlgStdInProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
- static DWORD dwOldIcon = 0;
+ static uint32_t dwOldIcon = 0;
HICON hIcon = nullptr;
UINT uid;
@@ -173,7 +173,7 @@ BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM) else if (!mir_wstrcmp(szTemp, L"PopupWnd2")) // destroy opened popups
PUDeletePopup(hWnd);
else {
- DWORD threadId = GetWindowThreadProcessId(hWnd, 0);
+ uint32_t threadId = GetWindowThreadProcessId(hWnd, 0);
if (threadId != GetCurrentThreadId())
return false;
@@ -439,7 +439,7 @@ INT_PTR BossKeyHideMiranda(WPARAM, LPARAM) // for service :) static wchar_t* HotkeyVkToName(uint16_t vkKey)
{
static wchar_t buf[32] = { 0 };
- DWORD code = MapVirtualKey(vkKey, 0) << 16;
+ uint32_t code = MapVirtualKey(vkKey, 0) << 16;
switch (vkKey) {
case 0:
diff --git a/plugins/BossKeyPlus/src/BossKeyIdle.cpp b/plugins/BossKeyPlus/src/BossKeyIdle.cpp index 19d07b5119..53ec9d366c 100644 --- a/plugins/BossKeyPlus/src/BossKeyIdle.cpp +++ b/plugins/BossKeyPlus/src/BossKeyIdle.cpp @@ -29,7 +29,7 @@ static bool IsUserIdle() UINT dwPeriod = g_plugin.getByte("time", 10) * 60 * 1000;
if (g_wMaskAdv & OPT_HIDEIFMIRIDLE) {
- DWORD dwTick = Miranda_GetIdle();
+ uint32_t dwTick = Miranda_GetIdle();
return GetTickCount() - dwTick > dwPeriod;
}
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp index 54e342ab60..907f33be39 100644 --- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp +++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp @@ -68,12 +68,12 @@ CMPlugin::CMPlugin() : time_t getLastSeen(MCONTACT hContact)
{
- return g_plugin.getDword(hContact, "LastSeen", g_plugin.getDword(hContact, "CreationTime", (DWORD)-1));
+ return g_plugin.getDword(hContact, "LastSeen", g_plugin.getDword(hContact, "CreationTime", (uint32_t)-1));
}
void setLastSeen(MCONTACT hContact)
{
- g_plugin.setDword(hContact, "LastSeen", (DWORD)time(0));
+ g_plugin.setDword(hContact, "LastSeen", (uint32_t)time(0));
if (g_plugin.getByte(hContact, "StillAbsentNotified", 0))
g_plugin.setByte(hContact, "StillAbsentNotified", 0);
}
@@ -503,7 +503,7 @@ int SettingChanged(WPARAM hContact, LPARAM lParam) return 0;
}
- if (g_plugin.getDword(hContact, "LastSeen", (DWORD)-1) == (DWORD)-1 && options.notifyFirstOnline) {
+ if (g_plugin.getDword(hContact, "LastSeen", (uint32_t)-1) == (uint32_t)-1 && options.notifyFirstOnline) {
ReturnNotify(hContact, TranslateT("has gone online for the first time."));
setLastSeen(hContact);
}
@@ -630,7 +630,7 @@ int ModulesLoaded(WPARAM, LPARAM) int ContactAdded(WPARAM hContact, LPARAM)
{
- g_plugin.setDword(hContact, "CreationTime", (DWORD)time(0));
+ g_plugin.setDword(hContact, "CreationTime", (uint32_t)time(0));
return 0;
}
@@ -657,7 +657,7 @@ int CMPlugin::Load() HookEvent(ME_DB_CONTACT_ADDED, ContactAdded);
// ensure all contacts are timestamped
- DWORD current_time = (DWORD)time(0);
+ uint32_t current_time = (uint32_t)time(0);
for (auto &hContact : Contacts())
if (!g_plugin.getDword(hContact, "CreationTime"))
g_plugin.setDword(hContact, "CreationTime", current_time);
diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp index 47216a2169..6afa153bfb 100644 --- a/plugins/BuddyPounce/src/main.cpp +++ b/plugins/BuddyPounce/src/main.cpp @@ -224,7 +224,7 @@ INT_PTR AddSimpleMessage(WPARAM wParam, LPARAM lParam) g_plugin.setWord(hContact, "SendIfTheirStatusIsFLAG", (uint16_t)g_plugin.getWord("SendIfTheirStatusIsFLAG", 1));
g_plugin.setByte(hContact, "Reuse", (uint8_t)g_plugin.getByte("Reuse", 0));
g_plugin.setByte(hContact, "GiveUpDays", (uint8_t)g_plugin.getByte("GiveUpDays", 0));
- g_plugin.setDword(hContact, "GiveUpDate", (DWORD)(g_plugin.getByte(hContact, "GiveUpDays", 0)*SECONDSINADAY));
+ g_plugin.setDword(hContact, "GiveUpDate", (uint32_t)(g_plugin.getByte(hContact, "GiveUpDays", 0)*SECONDSINADAY));
return 0;
}
diff --git a/plugins/BuddyPounce/src/options.cpp b/plugins/BuddyPounce/src/options.cpp index 6aa967f358..356ed857b9 100644 --- a/plugins/BuddyPounce/src/options.cpp +++ b/plugins/BuddyPounce/src/options.cpp @@ -116,7 +116,7 @@ void COptionsDlg::saveLastSetting() break; case 4: // Give Up delay g_plugin.setByte(hContact, "GiveUpDays", (uint8_t)edtNumber.GetInt()); - g_plugin.setDword(hContact, "GiveUpDate", (DWORD)edtNumber.GetInt() * SECONDSINADAY); + g_plugin.setDword(hContact, "GiveUpDate", (uint32_t)edtNumber.GetInt() * SECONDSINADAY); break; case 5: // confirm window g_plugin.setWord(hContact, "ConfirmTimeout", (uint16_t)edtNumber.GetInt()); diff --git a/plugins/ChangeKeyboardLayout/src/hook_events.cpp b/plugins/ChangeKeyboardLayout/src/hook_events.cpp index 7acb1ce6ef..c9598d5814 100644 --- a/plugins/ChangeKeyboardLayout/src/hook_events.cpp +++ b/plugins/ChangeKeyboardLayout/src/hook_events.cpp @@ -152,7 +152,7 @@ int OnOptionsInitialise(WPARAM wParam, LPARAM) LRESULT CALLBACK Keyboard_Hook(int code, WPARAM wParam, LPARAM lParam)
{
if (code == HC_ACTION) {
- DWORD lcode = 0;
+ uint32_t lcode = 0;
if ((GetKeyState(VK_SHIFT) & 0x8000)) lcode |= HOTKEYF_SHIFT;
if ((GetKeyState(VK_CONTROL) & 0x8000)) lcode |= HOTKEYF_CONTROL;
if ((GetKeyState(VK_MENU) & 0x8000)) lcode |= HOTKEYF_ALT;
diff --git a/plugins/ChangeKeyboardLayout/src/options.cpp b/plugins/ChangeKeyboardLayout/src/options.cpp index d1dc5a676a..aaa55510ad 100644 --- a/plugins/ChangeKeyboardLayout/src/options.cpp +++ b/plugins/ChangeKeyboardLayout/src/options.cpp @@ -231,7 +231,7 @@ static PopupOptions poOptionsTemp; INT_PTR CALLBACK DlgPopupsProcOptions(HWND hWnd, UINT uiMessage, WPARAM wParam, LPARAM lParam)
{
static BOOL PopupDialogLock = FALSE;
- DWORD dwTimeOut;
+ uint32_t dwTimeOut;
switch (uiMessage) {
case WM_INITDIALOG:
diff --git a/plugins/ChangeKeyboardLayout/src/stdafx.h b/plugins/ChangeKeyboardLayout/src/stdafx.h index 8d89dee754..36f626496a 100644 --- a/plugins/ChangeKeyboardLayout/src/stdafx.h +++ b/plugins/ChangeKeyboardLayout/src/stdafx.h @@ -72,9 +72,9 @@ struct CMPlugin : public PLUGIN<CMPlugin> typedef struct
{
- DWORD dwHotkey_Layout;
- DWORD dwHotkey_Layout2;
- DWORD dwHotkey_Case;
+ uint32_t dwHotkey_Layout;
+ uint32_t dwHotkey_Layout2;
+ uint32_t dwHotkey_Case;
BOOL CurrentWordLayout;
BOOL CurrentWordLayout2;
BOOL CurrentWordCase;
diff --git a/plugins/ChangeKeyboardLayout/src/text_operations.cpp b/plugins/ChangeKeyboardLayout/src/text_operations.cpp index 37fbd00c1f..85fb6bf458 100644 --- a/plugins/ChangeKeyboardLayout/src/text_operations.cpp +++ b/plugins/ChangeKeyboardLayout/src/text_operations.cpp @@ -26,7 +26,7 @@ static DWORD CALLBACK EditStreamOutRtf(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG c wchar_t* GeTStringFromStreamData(EditStreamData *esd)
{
- DWORD i, k;
+ uint32_t i, k;
wchar_t *ptszOutText = (LPTSTR)mir_alloc(MaxTextSize * sizeof(wchar_t));
wchar_t *ptszTemp = (wchar_t *)esd->pbBuff;
@@ -72,7 +72,7 @@ wchar_t* GetShortNameOfLayout(HKL hklLayout) {
wchar_t szLI[20];
wchar_t *ptszLiShort = (LPTSTR)mir_alloc(3 * sizeof(wchar_t));
- DWORD dwLcid = MAKELCID(LOWORD(hklLayout), 0);
+ uint32_t dwLcid = MAKELCID(LOWORD(hklLayout), 0);
GetLocaleInfoW(dwLcid, LOCALE_SISO639LANGNAME, szLI, 10);
ptszLiShort[0] = toupper(szLI[0]);
ptszLiShort[1] = toupper(szLI[1]);
@@ -161,9 +161,9 @@ wchar_t* ChangeTextLayout(LPCTSTR ptszInText, HKL hklCurLay, HKL hklToLay, BOOL if (ptszKeybCur == nullptr || ptszKeybNext == nullptr)
return ptszOutText;
- for (DWORD i = 0; i < mir_wstrlen(ptszInText); i++) {
+ for (uint32_t i = 0; i < mir_wstrlen(ptszInText); i++) {
BOOL Found = FALSE;
- for (DWORD j = 0; j < mir_wstrlen(ptszKeybCur) && !Found; j++)
+ for (uint32_t j = 0; j < mir_wstrlen(ptszKeybCur) && !Found; j++)
if (ptszKeybCur[j] == ptszInText[i]) {
Found = TRUE;
if (mir_wstrlen(ptszKeybNext) >= j)
@@ -171,7 +171,7 @@ wchar_t* ChangeTextLayout(LPCTSTR ptszInText, HKL hklCurLay, HKL hklToLay, BOOL }
if (TwoWay && !Found)
- for (DWORD j = 0; j < mir_wstrlen(ptszKeybNext) && !Found; j++)
+ for (uint32_t j = 0; j < mir_wstrlen(ptszKeybNext) && !Found; j++)
if (ptszKeybNext[j] == ptszInText[i]) {
Found = TRUE;
if (mir_wstrlen(ptszKeybCur) >= j)
@@ -185,17 +185,17 @@ HKL GetLayoutOfText(LPCTSTR ptszInText) {
HKL hklCurLay = hklLayouts[0];
wchar_t *ptszKeybBuff = ptszLayStrings[0];
- DWORD dwMaxSymbols = 0, dwTemp = 0;
+ uint32_t dwMaxSymbols = 0, dwTemp = 0;
- for (DWORD j = 0; j < mir_wstrlen(ptszInText); j++)
+ for (uint32_t j = 0; j < mir_wstrlen(ptszInText); j++)
if (wcschr(ptszKeybBuff, ptszInText[j]) != nullptr)
++dwMaxSymbols;
for (int i = 1; i < bLayNum; i++) {
ptszKeybBuff = ptszLayStrings[i];
- DWORD dwCountSymbols = 0;
+ uint32_t dwCountSymbols = 0;
- for (DWORD j = 0; j < mir_wstrlen(ptszInText); j++)
+ for (uint32_t j = 0; j < mir_wstrlen(ptszInText); j++)
if (wcschr(ptszKeybBuff, ptszInText[j]) != nullptr)
++dwCountSymbols;
@@ -219,7 +219,7 @@ int ChangeLayout(HWND hTextWnd, uint8_t TextOperation, BOOL CurrentWord) ptrW ptszInText;
CHARRANGE crSelection = { 0 }, crTemp = { 0 };
- DWORD dwStartWord, dwEndWord;
+ uint32_t dwStartWord, dwEndWord;
uint8_t WindowType = WTYPE_Unknown;
BOOL WindowIsReadOnly, TwoWay;
diff --git a/plugins/ClientChangeNotify/src/Options.cpp b/plugins/ClientChangeNotify/src/Options.cpp index 225a0a8309..07994262d7 100644 --- a/plugins/ClientChangeNotify/src/Options.cpp +++ b/plugins/ClientChangeNotify/src/Options.cpp @@ -345,7 +345,7 @@ void COptItem_TreeCtrl::WndToMem(HWND hWnd) { // only need to gather info of items state (expanded/collapsed, checked/unchecked)
HWND hTreeView = GetDlgItem(hWnd, m_dlgItemID);
for (int i = 0; i < m_value.GetSize(); i++) {
- DWORD State = TreeView_GetItemState(hTreeView, m_value[i].hItem, TVIS_EXPANDED | TVIS_STATEIMAGEMASK);
+ uint32_t State = TreeView_GetItemState(hTreeView, m_value[i].hItem, TVIS_EXPANDED | TVIS_STATEIMAGEMASK);
int OldFlags = m_value[i].Flags;
if (State & TVIS_EXPANDED)
m_value[i].Flags |= TIF_EXPANDED;
diff --git a/plugins/ClientChangeNotify/src/Options.h b/plugins/ClientChangeNotify/src/Options.h index 9c69b4d1bc..ef55d5021f 100644 --- a/plugins/ClientChangeNotify/src/Options.h +++ b/plugins/ClientChangeNotify/src/Options.h @@ -236,8 +236,8 @@ public: virtual COptItem* Copy() { return new COptItem_Colourpicker(*this); }
- DWORD m_defValue;
- DWORD m_value;
+ uint32_t m_defValue;
+ uint32_t m_value;
};
diff --git a/plugins/Clist_blind/src/clcopts.cpp b/plugins/Clist_blind/src/clcopts.cpp index d40b428626..0bbcb9ce13 100644 --- a/plugins/Clist_blind/src/clcopts.cpp +++ b/plugins/Clist_blind/src/clcopts.cpp @@ -33,7 +33,7 @@ wchar_t* MyDBGetContactSettingTString(MCONTACT hContact, char *module, char *set struct
{
int id;
- DWORD flag;
+ uint32_t flag;
}
static checkBoxToStyleEx[] =
{
@@ -54,7 +54,7 @@ public: bool OnInitDialog() override
{
- 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(m_hwnd, it.id, (exStyle & it.flag) ? BST_CHECKED : BST_UNCHECKED);
@@ -83,7 +83,7 @@ public: bool OnApply() override
{
- DWORD exStyle = 0;
+ uint32_t exStyle = 0;
for (int i = 0; i < _countof(checkBoxToStyleEx); i++)
if (IsDlgButtonChecked(m_hwnd, checkBoxToStyleEx[i].id))
exStyle |= checkBoxToStyleEx[i].flag;
diff --git a/plugins/Clist_modern/src/cluiframes.cpp b/plugins/Clist_modern/src/cluiframes.cpp index 134299752b..f0570bc97d 100644 --- a/plugins/Clist_modern/src/cluiframes.cpp +++ b/plugins/Clist_modern/src/cluiframes.cpp @@ -73,7 +73,7 @@ static LIST<TMO_IntMenuItem> g_frameMenus(10); // others
static int _nContactListHeight = 0;
-static DWORD _dwLastStoreTick = 0;
+static uint32_t _dwLastStoreTick = 0;
HWND hWndExplorerToolBar;
static int GapBetweenFrames = 1;
@@ -2302,7 +2302,7 @@ int OnFrameTitleBarBackgroundChange(WPARAM, LPARAM) return 0;
}
-void DrawBackGround(HWND hwnd, HDC mhdc, HBITMAP hBmpBackground, COLORREF bkColour, DWORD backgroundBmpUse)
+void DrawBackGround(HWND hwnd, HDC mhdc, HBITMAP hBmpBackground, COLORREF bkColour, uint32_t backgroundBmpUse)
{
HDC hdc;
RECT clRect, *rcPaint;
diff --git a/plugins/Clist_modern/src/modern_aniavatars.cpp b/plugins/Clist_modern/src/modern_aniavatars.cpp index 9dc29c2ed8..1b2a6220a3 100644 --- a/plugins/Clist_modern/src/modern_aniavatars.cpp +++ b/plugins/Clist_modern/src/modern_aniavatars.cpp @@ -60,7 +60,7 @@ struct ANIAVA_OBJECT : public MZeroedObject MCONTACT hContact;
HWND hWindow;
BOOL bInvalidPos;
- DWORD dwAvatarUniqId;
+ uint32_t dwAvatarUniqId;
SIZE ObjectSize;
~ANIAVA_OBJECT()
@@ -72,7 +72,7 @@ struct ANIAVA_OBJECT : public MZeroedObject struct ANIAVA_INFO
{
- DWORD dwAvatarUniqId;
+ uint32_t dwAvatarUniqId;
wchar_t *tcsFilename;
int nRefCount;
int nStripTop;
@@ -185,7 +185,7 @@ static void _AniAva_AnimationTreadProc(void*) s_AnimationThreadHandle = hThread;
SetThreadPriority(hThread, THREAD_PRIORITY_LOWEST);
for (;;) {
- DWORD rc = MsgWaitForMultipleObjectsEx(1, &s_hExitEvent, INFINITE, QS_ALLINPUT, MWMO_ALERTABLE);
+ uint32_t rc = MsgWaitForMultipleObjectsEx(1, &s_hExitEvent, INFINITE, QS_ALLINPUT, MWMO_ALERTABLE);
if (MirandaExiting())
break;
@@ -286,7 +286,7 @@ static void _AniAva_RemoveAniAvaDC() }
}
-static void _AniAva_RealRemoveAvatar(DWORD UniqueID)
+static void _AniAva_RealRemoveAvatar(uint32_t UniqueID)
{
for (int j = 0; j < s_AniAvatarList.getCount(); j++) {
ANIAVA_INFO *aai = s_AniAvatarList[j];
@@ -411,7 +411,7 @@ static int _AniAva_LoadAvatarFromImage(wchar_t * szFileName, int width, int heig return paai->dwAvatarUniqId;
}
-static BOOL _AniAva_GetAvatarImageInfo(DWORD dwAvatarUniqId, ANIAVATARIMAGEINFO * avii)
+static BOOL _AniAva_GetAvatarImageInfo(uint32_t dwAvatarUniqId, ANIAVATARIMAGEINFO * avii)
{
BOOL res = FALSE;
for (auto &aai : s_AniAvatarList) {
diff --git a/plugins/Clist_modern/src/modern_awaymsg.cpp b/plugins/Clist_modern/src/modern_awaymsg.cpp index e1c0d530e0..ad2f0f8daa 100644 --- a/plugins/Clist_modern/src/modern_awaymsg.cpp +++ b/plugins/Clist_modern/src/modern_awaymsg.cpp @@ -40,7 +40,7 @@ static mir_cs amCS; static LIST<void> amItems(10, PtrKeySortT);
static HANDLE hamProcessEvent = nullptr;
-static DWORD amRequestTick = 0;
+static uint32_t amRequestTick = 0;
/*
* Add contact handle to requests queue
@@ -81,7 +81,7 @@ static void amThreadProc(void *) while (!MirandaExiting()) {
MCONTACT hContact = amGetCurrentChain();
while (hContact) {
- DWORD time = GetTickCount();
+ uint32_t time = GetTickCount();
if ((time - amRequestTick) < AMASKPERIOD) {
SleepEx(AMASKPERIOD - (time - amRequestTick) + 10, TRUE);
if (MirandaExiting())
@@ -104,7 +104,7 @@ static void amThreadProc(void *) amRequestTick = time;
hContact = amGetCurrentChain();
if (hContact) {
- DWORD i = 0;
+ uint32_t i = 0;
do {
i++;
SleepEx(50, TRUE);
diff --git a/plugins/Clist_modern/src/modern_cachefuncs.cpp b/plugins/Clist_modern/src/modern_cachefuncs.cpp index d9bec8a4a0..13075c4291 100644 --- a/plugins/Clist_modern/src/modern_cachefuncs.cpp +++ b/plugins/Clist_modern/src/modern_cachefuncs.cpp @@ -36,7 +36,7 @@ typedef BOOL(*ExecuteOnAllContactsFuncPtr) (ClcContact *contact, BOOL subcontact ///////////////////////////////////////////////////////////////////////////////////////// // Module static declarations -static int CopySkipUnprintableChars(wchar_t *to, wchar_t * buf, DWORD size); +static int CopySkipUnprintableChars(wchar_t *to, wchar_t * buf, uint32_t size); static BOOL ExecuteOnAllContacts(ClcData *dat, ExecuteOnAllContactsFuncPtr func, void *param); static BOOL ExecuteOnAllContactsOfGroup(ClcGroup *group, ExecuteOnAllContactsFuncPtr func, void *param); @@ -51,7 +51,7 @@ void Cache_GetTimezone(ClcData *dat, MCONTACT hContact) dat = (ClcData *)GetWindowLongPtr(g_clistApi.hwndContactTree, 0); if (dat && dat->hWnd == g_clistApi.hwndContactTree) { - DWORD flags = dat->contact_time_show_only_if_different ? TZF_DIFONLY : 0; + uint32_t flags = dat->contact_time_show_only_if_different ? TZF_DIFONLY : 0; pdnce->hTimeZone = TimeZone_CreateByContact(hContact, nullptr, flags); } } @@ -557,9 +557,9 @@ void RemoveTag(wchar_t *to, wchar_t *tag) ///////////////////////////////////////////////////////////////////////////////////////// // Copy string with removing Escape chars from text and BBcodes -static int CopySkipUnprintableChars(wchar_t *to, wchar_t * buf, DWORD size) +static int CopySkipUnprintableChars(wchar_t *to, wchar_t * buf, uint32_t size) { - DWORD i; + uint32_t i; BOOL keep = 0; wchar_t * cp = to; if (!to) return 0; @@ -737,7 +737,7 @@ void Cache_GetAvatar(ClcData *dat, ClcContact *contact) contact->avatar_data = nullptr; if (contact->avatar_data != nullptr) - contact->avatar_data->t_lastAccess = (DWORD)time(0); + contact->avatar_data->t_lastAccess = (uint32_t)time(0); } else contact->avatar_data = nullptr; diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index ce8fcf072d..1b0ce64dd7 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -715,7 +715,7 @@ static LRESULT clcOnLButtonDown(ClcData *dat, HWND hwnd, UINT, WPARAM, LPARAM lP ClcContact *contact;
ClcGroup *group;
- DWORD hitFlags;
+ uint32_t hitFlags;
int hit = cliHitTest(hwnd, dat, (short)LOWORD(lParam), (short)HIWORD(lParam), &contact, &group, &hitFlags);
if (GetFocus() != hwnd)
SetFocus(hwnd);
@@ -886,7 +886,7 @@ static LRESULT clcOnMouseMove(ClcData *dat, HWND hwnd, UINT, WPARAM wParam, LPAR }
if (dat->iDragItem == -1) {
- DWORD flag = 0;
+ uint32_t flag = 0;
int iOldHotTrack = dat->iHotTrack;
if (dat->hwndRenameEdit != nullptr || GetKeyState(VK_MENU) & 0x8000 || GetKeyState(VK_F10) & 0x8000)
@@ -1066,7 +1066,7 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, SetCursor((HCURSOR)GetClassLongPtr(hwnd, GCLP_HCURSOR));
if (dat->exStyle & CLS_EX_TRACKSELECT) {
- DWORD flags;
+ uint32_t flags;
dat->iHotTrack = cliHitTest(hwnd, dat, (short)LOWORD(lParam), (short)HIWORD(lParam), nullptr, nullptr, &flags);
if (dat->iHotTrack == -1)
ReleaseCapture();
@@ -1342,7 +1342,7 @@ static LRESULT clcOnIntmIconChanged(ClcData *dat, HWND hwnd, UINT, WPARAM wParam int nHiddenStatus = CLVM_GetContactHiddenStatus(wParam, szProto, dat);
- DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
+ uint32_t style = GetWindowLongPtr(hwnd, GWL_STYLE);
bool isVisiblebyFilter = (((style & CLS_SHOWHIDDEN) && nHiddenStatus != -1) || !nHiddenStatus);
bool ifVisibleByClui = !Clist_IsHiddenMode(dat, status);
bool isVisible = (g_CluiData.bFilterEffective & CLVM_FILTER_STATUS) ? true : ifVisibleByClui;
diff --git a/plugins/Clist_modern/src/modern_clc.h b/plugins/Clist_modern/src/modern_clc.h index 7f6f9308da..1477da0af0 100644 --- a/plugins/Clist_modern/src/modern_clc.h +++ b/plugins/Clist_modern/src/modern_clc.h @@ -188,7 +188,7 @@ struct ClcContact : public ClcContactBase RECT pos_label;
RECT pos_contact_time;
RECT pos_extra[EXTRA_ICON_COUNT];
- DWORD lastPaintCounter;
+ uint32_t lastPaintCounter;
uint8_t bContactRate;
// For extended layout
@@ -240,7 +240,7 @@ struct ClcData : public ClcDataBase int subIndent;
int rightMargin, topMargin, bottomMargin;
HBITMAP hMenuBackground;
- DWORD MenuBkColor, MenuBkHiColor, MenuTextColor, MenuTextHiColor;
+ uint32_t MenuBkColor, MenuBkHiColor, MenuTextColor, MenuTextHiColor;
int MenuBmpUse;
// Row height
@@ -303,7 +303,7 @@ struct ClcData : public ClcDataBase HWND hWnd;
uint8_t menuOwnerType;
int menuOwnerID;
- DWORD m_paintCouter; //range is enoght to 49 days if painting will occure each one millisecond
+ uint32_t m_paintCouter; //range is enoght to 49 days if painting will occure each one millisecond
uint8_t drawOverlayedStatus;
int nInsertionLevel;
@@ -348,7 +348,7 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wP // clcutils.c
void cliRecalcScrollBar(HWND hwnd, ClcData *dat);
void cliBeginRenameSelection(HWND hwnd, ClcData *dat);
-int cliHitTest(HWND hwnd, ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, DWORD *flags);
+int cliHitTest(HWND hwnd, ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, uint32_t *flags);
void cliScrollTo(HWND hwnd, ClcData *dat, int desty, int noSmooth);
int GetDropTargetInformation(HWND hwnd, ClcData *dat, POINT pt);
void cli_LoadCLCOptions(HWND hwnd, ClcData *dat, BOOL bFirst);
@@ -357,7 +357,7 @@ COLORREF cliGetColor(char *module, char *color, COLORREF defColor); // clcopts.c
int ClcOptInit(WPARAM wParam, LPARAM lParam);
-DWORD GetDefaultExStyle(void);
+uint32_t GetDefaultExStyle(void);
void GetFontSetting(int i, LOGFONT *lf, COLORREF *colour, uint8_t *effect, COLORREF *eColour1, COLORREF *eColour2);
// groups.c
diff --git a/plugins/Clist_modern/src/modern_clcidents.cpp b/plugins/Clist_modern/src/modern_clcidents.cpp index 16839387b9..f86cb20a62 100644 --- a/plugins/Clist_modern/src/modern_clcidents.cpp +++ b/plugins/Clist_modern/src/modern_clcidents.cpp @@ -68,7 +68,7 @@ int cliGetRowsPriorTo(ClcGroup *group, ClcGroup *subgroup, int contactIndex) return -1;
}
-ClcContact* cliFindItem(DWORD dwItem, ClcContact *cc)
+ClcContact* cliFindItem(uint32_t dwItem, ClcContact *cc)
{
if (corecli.pfnFindItem(dwItem, cc))
return cc;
diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp index cb8f919932..e3363f0452 100644 --- a/plugins/Clist_modern/src/modern_clcitems.cpp +++ b/plugins/Clist_modern/src/modern_clcitems.cpp @@ -148,7 +148,7 @@ static void _LoadDataToContact(ClcContact *cont, ClcCacheEntry *pdnce, ClcGroup if (pdnce->NotOnList)
cont->flags |= CONTACTF_NOTONLIST;
- DWORD idleMode = szProto != nullptr ? pdnce->IdleTS : 0;
+ uint32_t idleMode = szProto != nullptr ? pdnce->IdleTS : 0;
if (idleMode)
cont->flags |= CONTACTF_IDLE;
@@ -198,7 +198,7 @@ bool CLCItems_IsShowOfflineGroup(ClcGroup *group) if (!group) return false;
if (group->hideOffline) return false;
- DWORD groupFlags = 0;
+ uint32_t groupFlags = 0;
Clist_GroupGetName(group->groupId, &groupFlags);
return (groupFlags & GROUPF_SHOWOFFLINE) != 0;
}
@@ -420,7 +420,7 @@ int CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, ClcData *dat) szProto = Proto_GetBaseAccountName(hContact);
// check stickies first (priority), only if we really have stickies defined (CLVM_STICKY_CONTACTS is set).
if (g_CluiData.bFilterEffective & CLVM_STICKY_CONTACTS) {
- if (DWORD dwLocalMask = db_get_dw(hContact, CLVM_MODULE, g_CluiData.current_viewmode, 0)) {
+ if (uint32_t dwLocalMask = db_get_dw(hContact, CLVM_MODULE, g_CluiData.current_viewmode, 0)) {
if (g_CluiData.bFilterEffective & CLVM_FILTER_STICKYSTATUS) {
uint16_t wStatus = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
return !((1 << (wStatus - ID_STATUS_OFFLINE)) & HIWORD(dwLocalMask)) | searchResult;
@@ -465,7 +465,7 @@ int CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, ClcData *dat) if (g_CluiData.bFilterEffective & CLVM_FILTER_LASTMSG) {
if (pdnce->dwLastMsgTime != -1) {
- DWORD now = g_CluiData.t_now;
+ uint32_t now = g_CluiData.t_now;
now -= g_CluiData.lastMsgFilter;
if (g_CluiData.bFilterEffective & CLVM_FILTER_LASTMSG_OLDERTHAN)
filterResult = filterResult & (pdnce->dwLastMsgTime < now);
diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp index af5103c31a..441cfdf66e 100644 --- a/plugins/Clist_modern/src/modern_clcopts.cpp +++ b/plugins/Clist_modern/src/modern_clcopts.cpp @@ -52,7 +52,7 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l struct
{
- DWORD dwFlags;
+ uint32_t dwFlags;
int fontID;
const wchar_t *szGroup;
const wchar_t *szDescr;
@@ -180,10 +180,10 @@ void RegisterCLUIFonts(void) registered = true;
}
-DWORD GetDefaultExStyle(void)
+uint32_t 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)
@@ -219,7 +219,7 @@ void GetFontSetting(int i, LOGFONT *lf, COLORREF *colour, uint8_t *effect, COLOR struct
{
int id;
- DWORD flag;
+ uint32_t flag;
int neg;
}
static const checkBoxToStyleEx[] =
@@ -242,7 +242,7 @@ static const checkBoxToStyleEx[] = struct CheckBoxValues_t
{
- DWORD style;
+ uint32_t style;
wchar_t *szDescr;
}
static const greyoutValues[] = {
@@ -257,7 +257,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;
@@ -272,9 +272,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;
tvi.hItem = TreeView_GetRoot(hwndTree);
@@ -360,7 +360,7 @@ static INT_PTR CALLBACK DlgProcClistListOpts(HWND hwndDlg, UINT msg, WPARAM wPar TranslateDialogDefault(hwndDlg);
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", GetDefaultExStyle());
+ uint32_t exStyle = db_get_dw(0, "CLC", "ExStyle", GetDefaultExStyle());
for (auto &it : checkBoxToStyleEx)
CheckDlgButton(hwndDlg, it.id, (exStyle & it.flag) ^ (it.flag * it.neg) ? BST_CHECKED : BST_UNCHECKED);
@@ -419,13 +419,13 @@ static INT_PTR CALLBACK DlgProcClistListOpts(HWND hwndDlg, UINT msg, WPARAM wPar case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- DWORD exStyle = 0;
+ uint32_t exStyle = 0;
for (auto &it : checkBoxToStyleEx)
if ((IsDlgButtonChecked(hwndDlg, it.id) == 0) == it.neg)
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);
@@ -1100,7 +1100,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP else
db_unset(0, "ModernData", "EnableLayering");
}
- g_CluiData.dwKeyColor = db_get_dw(0, "ModernSettings", "KeyColor", (DWORD)SETTING_KEYCOLOR_DEFAULT);
+ g_CluiData.dwKeyColor = db_get_dw(0, "ModernSettings", "KeyColor", (uint32_t)SETTING_KEYCOLOR_DEFAULT);
g_plugin.setByte("OnDesktop", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_ONDESKTOP));
g_plugin.setByte("OnTop", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_ONTOP));
SetWindowPos(g_clistApi.hwndContactList, IsDlgButtonChecked(hwndDlg, IDC_ONTOP) ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
@@ -1146,8 +1146,8 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP int i1 = SendDlgItemMessage(hwndDlg, IDC_FRAMESSPIN, UDM_GETPOS, 0, 0);
int i2 = SendDlgItemMessage(hwndDlg, IDC_CAPTIONSSPIN, UDM_GETPOS, 0, 0);
- db_set_dw(0, "CLUIFrames", "GapBetweenFrames", (DWORD)i1);
- db_set_dw(0, "CLUIFrames", "GapBetweenTitleBar", (DWORD)i2);
+ db_set_dw(0, "CLUIFrames", "GapBetweenFrames", (uint32_t)i1);
+ db_set_dw(0, "CLUIFrames", "GapBetweenTitleBar", (uint32_t)i2);
Sync(CLUIFramesOnClistResize, (WPARAM)g_clistApi.hwndContactList, 0);
}
g_plugin.setByte("Transparent", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT));
@@ -1432,7 +1432,7 @@ static INT_PTR BkgrCfg_Register(WPARAM wParam, LPARAM lParam) char *szSetting = (char*)wParam;
size_t len = mir_strlen(szSetting) + 1;
- char *value = (char *)mir_alloc(len + 4); // add room for flags (DWORD)
+ char *value = (char *)mir_alloc(len + 4); // add room for flags (uint32_t)
memcpy(value, szSetting, len);
char *tok = strchr(value, '/');
if (tok == nullptr) {
@@ -1440,7 +1440,7 @@ static INT_PTR BkgrCfg_Register(WPARAM wParam, LPARAM lParam) return 1;
}
*tok = 0;
- *(DWORD*)(value + len) = lParam;
+ *(uint32_t*)(value + len) = lParam;
bkgrList = (char **)mir_realloc(bkgrList, sizeof(char*)*(bkgrCount + 1));
bkgrList[bkgrCount] = value;
diff --git a/plugins/Clist_modern/src/modern_clcpaint.cpp b/plugins/Clist_modern/src/modern_clcpaint.cpp index 8f5d493b88..5d67ac1873 100644 --- a/plugins/Clist_modern/src/modern_clcpaint.cpp +++ b/plugins/Clist_modern/src/modern_clcpaint.cpp @@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. CLCPaint g_clcPainter;
-DWORD CLCPaint::HASH[hi_LastItem] = { 0 };
+uint32_t CLCPaint::HASH[hi_LastItem] = { 0 };
const char* CLCPaint::HASHTEXT[hi_LastItem] = {
"Module",
"ID",
@@ -231,7 +231,7 @@ void CLCPaint::GetTextSize(SIZE *text_size, HDC hdcMem, RECT free_row_rc, wchar_ }
}
-void CLCPaint::AddParam(MODERNMASK *mpModernMask, DWORD dwParamHash, const char *const szValue, DWORD dwValueHash)
+void CLCPaint::AddParam(MODERNMASK *mpModernMask, uint32_t dwParamHash, const char *const szValue, uint32_t dwValueHash)
{
static MASKPARAM param = { 0 }; //AddParameter will clear it so it can be static to avoid initializations
_FillParam(¶m, dwParamHash, szValue, dwValueHash);
@@ -245,7 +245,7 @@ BOOL CLCPaint::CheckMiniMode(ClcData *dat, BOOL selected) return TRUE;
}
-tPaintCallbackProc CLCPaint::PaintCallbackProc(HWND hWnd, HDC hDC, RECT *rcPaint, HRGN, DWORD, void *)
+tPaintCallbackProc CLCPaint::PaintCallbackProc(HWND hWnd, HDC hDC, RECT *rcPaint, HRGN, uint32_t, void *)
{
ClcData *dat = (ClcData*)GetWindowLongPtr(hWnd, 0);
if (dat)
@@ -454,7 +454,7 @@ void CLCPaint::_AddParameter(MODERNMASK *mpModernMask, MASKPARAM *lpParam) memset(lpParam, 0, sizeof(MASKPARAM));
}
-void CLCPaint::_FillParam(MASKPARAM *lpParam, DWORD dwParamHash, const char *const szValue, DWORD dwValueHash)
+void CLCPaint::_FillParam(MASKPARAM *lpParam, uint32_t dwParamHash, const char *const szValue, uint32_t dwValueHash)
{
lpParam->bMaskParamFlag = MPF_EQUAL | MPF_HASHED;
lpParam->dwId = dwParamHash;
@@ -470,7 +470,7 @@ void CLCPaint::_FillParam(MASKPARAM *lpParam, DWORD dwParamHash, const char *con lpParam->szValue = nullptr;
}
-void CLCPaint::_AddParamShort(MODERNMASK *mpModernMask, DWORD dwParamIndex, DWORD dwValueIndex)
+void CLCPaint::_AddParamShort(MODERNMASK *mpModernMask, uint32_t dwParamIndex, uint32_t dwValueIndex)
{
AddParam(mpModernMask, HASH[dwParamIndex], HASHTEXT[dwValueIndex], HASH[dwValueIndex]);
}
@@ -891,7 +891,7 @@ void CLCPaint::_PaintRowItemsEx(HDC hdcMem, ClcData *dat, ClcContact *Drawing, R dy += (minheight > height) ? ((minheight - height) >> 1) : 0;
}
-void CLCPaint::_DrawStatusIcon(ClcContact *Drawing, ClcData *dat, int iImage, HDC hdcMem, int x, int y, int cx, int cy, DWORD colorbg, DWORD colorfg, int mode)
+void CLCPaint::_DrawStatusIcon(ClcContact *Drawing, ClcData *dat, int iImage, HDC hdcMem, int x, int y, int cx, int cy, uint32_t colorbg, uint32_t colorfg, int mode)
{
if (Drawing->type != CLCIT_CONTACT)
ske_ImageList_DrawEx(g_himlCListClc, LOWORD(iImage), hdcMem, x, y, cx, cy, colorbg, colorfg, mode);
diff --git a/plugins/Clist_modern/src/modern_clcpaint.h b/plugins/Clist_modern/src/modern_clcpaint.h index 6a17e9dc73..829e42eb1a 100644 --- a/plugins/Clist_modern/src/modern_clcpaint.h +++ b/plugins/Clist_modern/src/modern_clcpaint.h @@ -10,13 +10,13 @@ public: ~CLCPaint() {};
CLINTERFACE void cliPaintClc(HWND hwnd, ClcData *dat, HDC hdc, RECT *rcPaint);
- CLINTERFACE tPaintCallbackProc PaintCallbackProc(HWND hWnd, HDC hDC, RECT *rcPaint, HRGN rgn, DWORD dFlags, void * CallBackData);
+ CLINTERFACE tPaintCallbackProc PaintCallbackProc(HWND hWnd, HDC hDC, RECT *rcPaint, HRGN rgn, uint32_t dFlags, void * CallBackData);
BOOL IsForegroundWindow(HWND hWnd);
HFONT ChangeToFont(HDC hdc, ClcData *dat, int id, int *fontHeight);
int GetBasicFontID(ClcContact *contact);
void GetTextSize(SIZE *text_size, HDC hdcMem, RECT free_row_rc, wchar_t *szText, SortedList *plText, UINT uTextFormat, int smiley_height);
- void AddParam(MODERNMASK *mpModernMask, DWORD dwParamHash, const char* szValue, DWORD dwValueHash);
+ void AddParam(MODERNMASK *mpModernMask, uint32_t dwParamHash, const char* szValue, uint32_t dwValueHash);
BOOL CheckMiniMode(ClcData *dat, BOOL selected);
private:
@@ -91,19 +91,19 @@ private: hi_LastItem
} enumHASHINDEX;
static const char* HASHTEXT[hi_LastItem];
- static DWORD HASH[hi_LastItem];
+ static uint32_t HASH[hi_LastItem];
void _FillQuickHash();
void _SetHotTrackColour(HDC hdc, ClcData *dat);
RECT _GetRectangle(ClcData *dat, RECT *row_rc, RECT *free_row_rc, int *left_pos, int *right_pos, BOOL left, int real_width, int width, int height, int horizontal_space);
void _DrawTextSmiley(HDC hdcMem, RECT *free_rc, SIZE * text_size, wchar_t *szText, int start, int len, SortedList *plText, UINT uTextFormat, BOOL ResizeSizeSmiley);
void _AddParameter(MODERNMASK *mpModernMask, MASKPARAM * lpParam);
- void _AddParamShort(MODERNMASK *mpModernMask, DWORD dwParamIndex, DWORD dwValueIndex);
- void _FillParam(MASKPARAM * lpParam, DWORD dwParamHash, const char* szValue, DWORD dwValueHash);
+ void _AddParamShort(MODERNMASK *mpModernMask, uint32_t dwParamIndex, uint32_t dwValueIndex);
+ void _FillParam(MASKPARAM * lpParam, uint32_t dwParamHash, const char* szValue, uint32_t dwValueHash);
MODERNMASK* _GetCLCContactRowBackModernMask(ClcGroup *group, ClcContact *Drawing, int indent, int index, BOOL selected, BOOL hottrack, ClcData *dat);
void _RTLRect(RECT *rect, int width);
void _PaintRowItemsEx(HDC hdcMem, ClcData *dat, ClcContact *Drawing, RECT row_rc, RECT free_row_rc, int selected, int hottrack);
- void _DrawStatusIcon(ClcContact *Drawing, ClcData *dat, int iImage, HDC hdcMem, int x, int y, int cx, int cy, DWORD colorbg, DWORD colorfg, int mode);
+ void _DrawStatusIcon(ClcContact *Drawing, ClcData *dat, int iImage, HDC hdcMem, int x, int y, int cx, int cy, uint32_t colorbg, uint32_t colorfg, int mode);
BOOL _DrawNonEnginedBackground(HDC hdcMem, RECT *rcPaint, RECT clRect, ClcData *dat);
void _PaintClc(HWND hwnd, ClcData *dat, HDC hdc, RECT *rcPaint);
void _StoreItemPos(ClcContact *contact, int ItemType, RECT *rc);
@@ -161,7 +161,7 @@ private: COLORREF tmpbkcolour;
COLORREF tmpforecolour;
- DWORD fRelease;
+ uint32_t fRelease;
_PaintContext(HDC _hdcMem = nullptr) :
hdcMem(_hdcMem), hdcMem2(nullptr),
hBmpOsb2(nullptr), oldbmp2(nullptr),
diff --git a/plugins/Clist_modern/src/modern_clcutils.cpp b/plugins/Clist_modern/src/modern_clcutils.cpp index 5420e49143..9bbf4476c9 100644 --- a/plugins/Clist_modern/src/modern_clcutils.cpp +++ b/plugins/Clist_modern/src/modern_clcutils.cpp @@ -31,7 +31,7 @@ BOOL RectHitTest(RECT *rc, int testx, int testy) return testx >= rc->left && testx < rc->right && testy >= rc->top && testy < rc->bottom;
}
-int cliHitTest(HWND hwnd, ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, DWORD *flags)
+int cliHitTest(HWND hwnd, ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, uint32_t *flags)
{
ClcContact *hitcontact = nullptr;
ClcGroup *hitgroup = nullptr;
@@ -114,7 +114,7 @@ int cliHitTest(HWND hwnd, ClcData *dat, int testx, int testy, ClcContact **conta void cliScrollTo(HWND hwnd, ClcData *dat, int desty, int noSmooth)
{
- DWORD startTick, nowTick;
+ uint32_t startTick, nowTick;
int oldy = dat->yScroll;
RECT clRect, rcInvalidate;
int maxy, previousy;
@@ -320,7 +320,7 @@ int GetDropTargetInformation(HWND hwnd, ClcData *dat, POINT pt) if (!PtInRect(&clRect, pt))
return DROPTARGET_OUTSIDE;
- DWORD hitFlags;
+ uint32_t hitFlags;
int hit = cliHitTest(hwnd, dat, pt.x, pt.y, &contact, &group, &hitFlags);
cliGetRowByIndex(dat, dat->iDragItem, &movecontact, &movegroup);
if (hit == dat->iDragItem) return DROPTARGET_ONSELF;
diff --git a/plugins/Clist_modern/src/modern_clist.h b/plugins/Clist_modern/src/modern_clist.h index 5eeef09f96..ef0558c728 100644 --- a/plugins/Clist_modern/src/modern_clist.h +++ b/plugins/Clist_modern/src/modern_clist.h @@ -92,7 +92,7 @@ struct ClcCacheEntry : public ClcCacheEntryBase CSmileyString ssThirdLine;
HANDLE hTimeZone;
- DWORD dwLastMsgTime, dwLastOnlineTime;
+ uint32_t dwLastMsgTime, dwLastOnlineTime;
int __forceinline getStatus() const
{ return (this == nullptr) ? ID_STATUS_OFFLINE : m_iStatus;
diff --git a/plugins/Clist_modern/src/modern_clistevents.cpp b/plugins/Clist_modern/src/modern_clistevents.cpp index 889db82670..8658aa1184 100644 --- a/plugins/Clist_modern/src/modern_clistevents.cpp +++ b/plugins/Clist_modern/src/modern_clistevents.cpp @@ -332,7 +332,7 @@ static int EventArea_Draw(HWND hwnd, HDC hDC) return 0;
}
-static int EventArea_PaintCallbackProc(HWND hWnd, HDC hDC, RECT *, HRGN, DWORD, void *)
+static int EventArea_PaintCallbackProc(HWND hWnd, HDC hDC, RECT *, HRGN, uint32_t, void *)
{
return EventArea_Draw(hWnd, hDC);
}
diff --git a/plugins/Clist_modern/src/modern_clistmod.cpp b/plugins/Clist_modern/src/modern_clistmod.cpp index 8033acbdb8..76c2a80cba 100644 --- a/plugins/Clist_modern/src/modern_clistmod.cpp +++ b/plugins/Clist_modern/src/modern_clistmod.cpp @@ -171,11 +171,11 @@ HRESULT CluiLoadModule() #define GWVS_PARTIALLY_COVERED 4
int GetWindowVisibleState(HWND, int, int);
-__inline DWORD GetDIBPixelColor(int X, int Y, int Width, int Height, int ByteWidth, uint8_t * ptr)
+__inline uint32_t GetDIBPixelColor(int X, int Y, int Width, int Height, int ByteWidth, uint8_t * ptr)
{
- DWORD res = 0;
+ uint32_t res = 0;
if (X >= 0 && X < Width && Y >= 0 && Y < Height && ptr)
- res = *((DWORD*)(ptr + ByteWidth*(Height - Y - 1) + X * 4));
+ res = *((uint32_t*)(ptr + ByteWidth*(Height - Y - 1) + X * 4));
return res;
}
@@ -255,7 +255,7 @@ int GetWindowVisibleState(HWND hWnd, int iStepX, int iStepY) if (rgn)
po = PtInRegion(rgn, j, i);
else {
- DWORD a = (GetDIBPixelColor(j + dx, i + dy, maxx, maxy, wx, ptr) & 0xFF000000) >> 24;
+ uint32_t a = (GetDIBPixelColor(j + dx, i + dy, maxx, maxy, wx, ptr) & 0xFF000000) >> 24;
a = ((a*g_CluiData.bCurrentAlpha) >> 8);
po = (a > 16);
}
diff --git a/plugins/Clist_modern/src/modern_clistopts.cpp b/plugins/Clist_modern/src/modern_clistopts.cpp index 1556ab0d4e..3beaed219f 100644 --- a/plugins/Clist_modern/src/modern_clistopts.cpp +++ b/plugins/Clist_modern/src/modern_clistopts.cpp @@ -380,7 +380,7 @@ static INT_PTR CALLBACK DlgProcItemAvatarOpts(HWND hwndDlg, UINT msg, WPARAM wPa g_plugin.setByte("AvatarsInSeparateWnd", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_AVATAR_FASTDRAW));
g_plugin.setByte("AvatarsDrawBorders", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_AVATAR_DRAW_BORDER));
- g_plugin.setDword("AvatarsBorderColor", (DWORD)SendDlgItemMessage(hwndDlg, IDC_AVATAR_BORDER_COLOR, CPM_GETCOLOUR, 0, 0));
+ g_plugin.setDword("AvatarsBorderColor", (uint32_t)SendDlgItemMessage(hwndDlg, IDC_AVATAR_BORDER_COLOR, CPM_GETCOLOUR, 0, 0));
g_plugin.setByte("AvatarsRoundCorners", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_AVATAR_ROUND_CORNERS));
g_plugin.setByte("AvatarsIgnoreSizeForRow", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_AVATAR_IGNORE_SIZE));
g_plugin.setByte("AvatarsUseCustomCornerSize", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_AVATAR_CUSTOM_CORNER_SIZE_CHECK));
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index 3bf17c5d56..e837f0e89a 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -161,7 +161,7 @@ int CLUI::OnEvent_FontReload(WPARAM wParam, LPARAM lParam) {
Clist_Broadcast(INTM_RELOADOPTIONS, wParam, lParam);
- g_CluiData.dwKeyColor = db_get_dw(0, "ModernSettings", "KeyColor", (DWORD)SETTING_KEYCOLOR_DEFAULT);
+ g_CluiData.dwKeyColor = db_get_dw(0, "ModernSettings", "KeyColor", (uint32_t)SETTING_KEYCOLOR_DEFAULT);
cliInvalidateRect(g_clistApi.hwndContactList, nullptr, 0);
return 0;
@@ -363,13 +363,13 @@ HRESULT CLUI::FillAlphaChannel(HDC hDC, RECT *prcParent) return S_FALSE;
}
- DWORD dwRgnSize = GetRegionData(hRgn, 0, nullptr);
+ uint32_t dwRgnSize = GetRegionData(hRgn, 0, nullptr);
RGNDATA *rgnData = (RGNDATA *)malloc(dwRgnSize);
GetRegionData(hRgn, dwRgnSize, rgnData);
RECT *pRect = (RECT *)rgnData->Buffer;
- for (DWORD i = 0; i < rgnData->rdh.nCount; i++)
+ for (uint32_t i = 0; i < rgnData->rdh.nCount; i++)
ske_SetRectOpaque(hDC, &pRect[i]);
free(rgnData);
@@ -1644,11 +1644,11 @@ LRESULT CLUI::OnSizingMoving(UINT msg, WPARAM wParam, LPARAM lParam) Sync(CLUIFrames_OnMoving, m_hWnd, &rc);
if (!IsIconic(m_hWnd)) {
if (!Clist_IsDocked()) { // if g_CluiData.fDocked, dont remember pos (except for width)
- g_plugin.setDword("Height", (DWORD)(rc.bottom - rc.top));
- g_plugin.setDword("x", (DWORD)rc.left);
- g_plugin.setDword("y", (DWORD)rc.top);
+ g_plugin.setDword("Height", (uint32_t)(rc.bottom - rc.top));
+ g_plugin.setDword("x", (uint32_t)rc.left);
+ g_plugin.setDword("y", (uint32_t)rc.top);
}
- g_plugin.setDword("Width", (DWORD)(rc.right - rc.left));
+ g_plugin.setDword("Width", (uint32_t)(rc.right - rc.left));
}
}
return TRUE;
@@ -1681,12 +1681,12 @@ LRESULT CLUI::OnSizingMoving(UINT msg, WPARAM wParam, LPARAM lParam) // if g_CluiData.fDocked, dont remember pos (except for width)
if (!Clist_IsDocked()) {
- g_plugin.setDword("Height", (DWORD)(rc.bottom - rc.top));
- g_plugin.setDword("x", (DWORD)rc.left);
- g_plugin.setDword("y", (DWORD)rc.top);
+ g_plugin.setDword("Height", (uint32_t)(rc.bottom - rc.top));
+ g_plugin.setDword("x", (uint32_t)rc.left);
+ g_plugin.setDword("y", (uint32_t)rc.top);
}
else SetWindowRgn(m_hWnd, nullptr, 0);
- g_plugin.setDword("Width", (DWORD)(rc.right - rc.left));
+ g_plugin.setDword("Width", (uint32_t)(rc.right - rc.left));
if (!g_CluiData.fLayered) {
HRGN hRgn1;
@@ -2306,7 +2306,7 @@ LRESULT CLUI::OnListSizeChangeNotify(NMCLISTCONTROL *pnmc) LRESULT CLUI::OnClickNotify(NMCLISTCONTROL *pnmc)
{
- DWORD hitFlags;
+ uint32_t hitFlags;
HANDLE hItem = (HANDLE)SendMessage(g_clistApi.hwndContactTree, CLM_HITTEST, (WPARAM)&hitFlags, MAKELPARAM(pnmc->pt.x, pnmc->pt.y));
if (hItem && !(hitFlags & CLCHT_NOWHERE))
return DefCluiWndProc(WM_NOTIFY, 0, (LPARAM)pnmc);
diff --git a/plugins/Clist_modern/src/modern_commonprototypes.h b/plugins/Clist_modern/src/modern_commonprototypes.h index fd42e9fca6..e68e64ef81 100644 --- a/plugins/Clist_modern/src/modern_commonprototypes.h +++ b/plugins/Clist_modern/src/modern_commonprototypes.h @@ -87,7 +87,7 @@ HBITMAP GDIPlus_LoadGlyphImage(const wchar_t *szFileName); void EventArea_ConfigureEventArea();
/* ModernSkinButton */
-int ModernSkinButton_AddButton(HWND parent, char *ID, char *CommandService, char *StateDefService, char *HandeService, int Left, int Top, int Right, int Bottom, DWORD AlignedTo, wchar_t *Hint, char *DBkey, char *TypeDef, int MinWidth, int MinHeight);
+int ModernSkinButton_AddButton(HWND parent, char *ID, char *CommandService, char *StateDefService, char *HandeService, int Left, int Top, int Right, int Bottom, uint32_t AlignedTo, wchar_t *Hint, char *DBkey, char *TypeDef, int MinWidth, int MinHeight);
int ModernSkinButtonLoadModule();
int ModernSkinButton_ReposButtons(HWND parent, uint8_t draw, RECT *r);
int ModernSkinButtonUnloadModule(WPARAM, LPARAM);
@@ -122,7 +122,7 @@ int ske_PrepareImageButDontUpdateIt(RECT *r); int ske_ReCreateBackImage(BOOL Erase, RECT *w);
int ske_RedrawCompleteWindow();
bool ske_ResetTextEffect(HDC);
-bool ske_SelectTextEffect(HDC hdc, uint8_t EffectID, DWORD FirstColor, DWORD SecondColor);
+bool ske_SelectTextEffect(HDC hdc, uint8_t EffectID, uint32_t FirstColor, uint32_t SecondColor);
INT_PTR ske_Service_DrawGlyph(WPARAM wParam, LPARAM lParam);
BOOL ske_SetRectOpaque(HDC memdc, RECT *fr, BOOL force = FALSE);
BOOL ske_SetRgnOpaque(HDC memdc, HRGN hrgn, BOOL force = FALSE);
@@ -153,13 +153,13 @@ int SetAlpha(uint8_t Alpha); /* others TODO: move above */
int Docking_ProcessWindowMessage(WPARAM wParam, LPARAM lParam);
-void DrawBackGround(HWND hwnd, HDC mhdc, HBITMAP hBmpBackground, COLORREF bkColour, DWORD backgroundBmpUse);
+void DrawBackGround(HWND hwnd, HDC mhdc, HBITMAP hBmpBackground, COLORREF bkColour, uint32_t backgroundBmpUse);
HRESULT BackgroundsLoadModule();
int BackgroundsUnloadModule();
char* GetParamN(char *string, char *buf, int buflen, uint8_t paramN, char Delim, BOOL SkipSpaces); //mod_skin_selector.c
wchar_t* GetParamN(wchar_t *string, wchar_t *buf, int buflen, uint8_t paramN, wchar_t Delim, BOOL SkipSpaces);
-DWORD CompareContacts2_getLMTime(MCONTACT u); //contact.c
-DWORD mod_CalcHash(const char *a); //mod_skin_selector.c
+uint32_t CompareContacts2_getLMTime(MCONTACT u); //contact.c
+uint32_t mod_CalcHash(const char *a); //mod_skin_selector.c
HICON cliGetIconFromStatusMode(MCONTACT hContact, const char *szProto, int status); //clistmod.c
HICON GetMainStatusOverlay(int STATUS); //clc.c
int CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szStatus, ClcData *dat); //clcitems.c
@@ -182,7 +182,7 @@ INT_PTR SetUseGroups(WPARAM wParam, LPARAM lParam); INT_PTR ToggleSounds(WPARAM wParam, LPARAM lParam); //contact.c
void ClcOptionsChanged(); //clc.c
void Docking_GetMonitorRectFromWindow(HWND hWnd, RECT *rc); //Docking.c
-void DrawAvatarImageWithGDIp(HDC hDestDC, int x, int y, DWORD width, DWORD height, HBITMAP hbmp, int x1, int y1, DWORD width1, DWORD height1, DWORD flag, uint8_t alpha); //gdiplus.cpp
+void DrawAvatarImageWithGDIp(HDC hDestDC, int x, int y, uint32_t width, uint32_t height, HBITMAP hbmp, int x1, int y1, uint32_t width1, uint32_t height1, uint32_t flag, uint8_t alpha); //gdiplus.cpp
void InitGdiPlus(); //gdiplus.cpp
void ShutdownGdiPlus(); //gdiplus.cpp
void UnloadAvatarOverlayIcon(); //clc.c
@@ -190,7 +190,7 @@ void UnLoadContactListModule(); / void UpdateAllAvatars(ClcData *dat); //cache_func.c
void ApplyViewMode(const char *Name);
-void SaveViewMode(const char *name, const wchar_t *szGroupFilter, const char *szProtoFilter, DWORD statusMask, DWORD stickyStatusMask, unsigned int options, unsigned int stickies, unsigned int operators, unsigned int lmdat);
+void SaveViewMode(const char *name, const wchar_t *szGroupFilter, const char *szProtoFilter, uint32_t statusMask, uint32_t stickyStatusMask, unsigned int options, unsigned int stickies, unsigned int operators, unsigned int lmdat);
// cluiframes.c
int ExtraImage_ExtraIDToColumnNum(int extra);
@@ -232,7 +232,7 @@ CListEvent* cli_AddEvent(CLISTEVENT *cle); LRESULT CALLBACK cli_ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
-ClcContact* cliFindItem(DWORD dwItem, ClcContact *contact);
+ClcContact* cliFindItem(uint32_t dwItem, ClcContact *contact);
ClcContact* cliCreateClcContact(void);
ClcCacheEntry* cliCreateCacheItem(MCONTACT hContact);
@@ -243,7 +243,7 @@ ClcCacheEntry* cliCreateCacheItem(MCONTACT hContact); #define DWM_BB_TRANSITIONONMAXIMIZED 0x00000004
struct DWM_BLURBEHIND
{
- DWORD dwFlags;
+ uint32_t dwFlags;
BOOL fEnable;
HRGN hRgnBlur;
BOOL fTransitionOnMaximized;
diff --git a/plugins/Clist_modern/src/modern_contact.cpp b/plugins/Clist_modern/src/modern_contact.cpp index 49c9e8cc43..deaeb3b5f0 100644 --- a/plugins/Clist_modern/src/modern_contact.cpp +++ b/plugins/Clist_modern/src/modern_contact.cpp @@ -56,9 +56,9 @@ static int GetStatusModeOrdering(int statusMode) return 1000;
}
-DWORD CompareContacts2_getLMTime(MCONTACT hContact)
+uint32_t CompareContacts2_getLMTime(MCONTACT hContact)
{
- DWORD ret = g_plugin.getDword(hContact, "mf_lastmsg");
+ uint32_t ret = g_plugin.getDword(hContact, "mf_lastmsg");
if (ret != 0)
return ret;
diff --git a/plugins/Clist_modern/src/modern_effectenum.h b/plugins/Clist_modern/src/modern_effectenum.h index e6fe8bb64c..a4664bf98a 100644 --- a/plugins/Clist_modern/src/modern_effectenum.h +++ b/plugins/Clist_modern/src/modern_effectenum.h @@ -15,8 +15,8 @@ typedef struct _MODERNEFFECT {
uint8_t EffectID;
MODERNEFFECTMATRIX EffectMatrix;
- DWORD EffectColor1;
- DWORD EffectColor2;
+ uint32_t EffectColor1;
+ uint32_t EffectColor2;
}MODERNEFFECT;
#ifdef _EFFECTENUM_FULL_H
@@ -90,4 +90,4 @@ MODERNEFFECTMATRIX ModernEffectsEnum[] = { extern wchar_t * ModernEffectNames[];
#endif
extern BOOL SkinEngine_ResetTextEffect(HDC);
-extern BOOL SkinEngine_SelectTextEffect(HDC hdc, uint8_t EffectID, DWORD FirstColor, DWORD SecondColor);
\ No newline at end of file +extern BOOL SkinEngine_SelectTextEffect(HDC hdc, uint8_t EffectID, uint32_t FirstColor, uint32_t SecondColor);
\ No newline at end of file diff --git a/plugins/Clist_modern/src/modern_gdiplus.cpp b/plugins/Clist_modern/src/modern_gdiplus.cpp index 7a11b64b70..a842c23262 100644 --- a/plugins/Clist_modern/src/modern_gdiplus.cpp +++ b/plugins/Clist_modern/src/modern_gdiplus.cpp @@ -43,7 +43,7 @@ static ColorMatrix ClrMatrix = 0.0f, 0.0f, 0.0f, 0.0f, 1.0f
};
-DWORD argb_from_cola(COLORREF col, uint8_t alpha)
+uint32_t argb_from_cola(COLORREF col, uint8_t alpha)
{
return((uint8_t)(alpha) << 24 | col);
}
@@ -63,7 +63,7 @@ HBITMAP GDIPlus_LoadGlyphImage(const wchar_t *tszFileName) return hbmp;
}
-void DrawAvatarImageWithGDIp(HDC hDestDC, int x, int y, DWORD width, DWORD height, HBITMAP hbmp, int x1, int y1, DWORD width1, DWORD height1, DWORD flag, uint8_t alpha)
+void DrawAvatarImageWithGDIp(HDC hDestDC, int x, int y, uint32_t width, uint32_t height, HBITMAP hbmp, int x1, int y1, uint32_t width1, uint32_t height1, uint32_t flag, uint8_t alpha)
{
BITMAP bmp;
Bitmap *bm;
diff --git a/plugins/Clist_modern/src/modern_global_structure.h b/plugins/Clist_modern/src/modern_global_structure.h index cdb8ed6940..a522dc2165 100644 --- a/plugins/Clist_modern/src/modern_global_structure.h +++ b/plugins/Clist_modern/src/modern_global_structure.h @@ -13,7 +13,7 @@ struct CLUIDATA HMENU hMenuNotify;
uint16_t wNextMenuID;
int iIconNotify;
- DWORD dwFlags;
+ uint32_t dwFlags;
int hIconNotify;
MCONTACT hUpdateContact;
@@ -21,15 +21,15 @@ struct CLUIDATA wchar_t groupFilter[2048];
char protoFilter[2048];
char varFilter[2048];
- DWORD lastMsgFilter;
+ uint32_t lastMsgFilter;
char current_viewmode[256], old_viewmode[256];
uint8_t boldHideOffline;
uint8_t bOldUseGroups;
- DWORD statusMaskFilter;
- DWORD stickyMaskFilter;
- DWORD filterFlags;
- DWORD bFilterEffective;
- DWORD t_now;
+ uint32_t statusMaskFilter;
+ uint32_t stickyMaskFilter;
+ uint32_t filterFlags;
+ uint32_t bFilterEffective;
+ uint32_t t_now;
// Modern Global Variables
int fDocked;
@@ -55,7 +55,7 @@ struct CLUIDATA signed char nBehindEdgeState;
- DWORD dwKeyColor;
+ uint32_t dwKeyColor;
HWND hwndEventFrame;
diff --git a/plugins/Clist_modern/src/modern_rowheight_funcs.cpp b/plugins/Clist_modern/src/modern_rowheight_funcs.cpp index b9d1380540..231087e2a8 100644 --- a/plugins/Clist_modern/src/modern_rowheight_funcs.cpp +++ b/plugins/Clist_modern/src/modern_rowheight_funcs.cpp @@ -331,7 +331,7 @@ static int other_fonts[] = { FONTID_OPENGROUPS, FONTID_OPENGROUPCOUNTS, FONTID_C int RowHeights_GetMaxRowHeight(ClcData *dat, HWND hwnd)
{
int max_height = 0;
- DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
+ uint32_t style = GetWindowLongPtr(hwnd, GWL_STYLE);
if (!dat->text_ignore_size_for_row_height) {
// Get contact font size
@@ -459,7 +459,7 @@ int RowHeights_GetRowHeight(ClcData *dat, HWND hwnd, ClcContact *contact, int it if (!dat->row_variable_height)
return dat->rowHeight;
- DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
+ uint32_t style = GetWindowLongPtr(hwnd, GWL_STYLE);
//TODO replace futher code with new rowheight definition
BOOL selected = ((item == dat->selection) && (dat->hwndRenameEdit != nullptr || dat->bShowSelAlways || (dat->exStyle & CLS_EX_SHOWSELALWAYS) || g_clcPainter.IsForegroundWindow(hwnd)) && contact->type != CLCIT_DIVIDER);
BOOL minimalistic = (g_clcPainter.CheckMiniMode(dat, selected));
diff --git a/plugins/Clist_modern/src/modern_skinbutton.cpp b/plugins/Clist_modern/src/modern_skinbutton.cpp index a29abd19cc..efd1bd472e 100644 --- a/plugins/Clist_modern/src/modern_skinbutton.cpp +++ b/plugins/Clist_modern/src/modern_skinbutton.cpp @@ -57,7 +57,7 @@ typedef struct _ModernSkinButtonCtrl typedef struct _HandleServiceParams { HWND hwnd; - DWORD msg; + uint32_t msg; WPARAM wParam; LPARAM lParam; BOOL handled; @@ -115,12 +115,12 @@ static int ModernSkinButtonPaintWorker(HWND hwnd, HDC whdc) if (bct->ValueDBSection && bct->ValueTypeDef) { char * key; char * section; - DWORD defval = 0; + uint32_t defval = 0; char buf[20]; key = mir_strdup(bct->ValueDBSection); section = key; if (bct->ValueTypeDef[0] != 's') - defval = (DWORD)atol(bct->ValueTypeDef + 1); + defval = (uint32_t)atol(bct->ValueTypeDef + 1); do { if (key[0] == '/') { key[0] = '\0'; key++; break; } key++; @@ -206,8 +206,8 @@ static int ModernSkinButtonToggleDBValue(char * ValueDBSection, char *ValueTypeD } while (val2[0] != '\0'); if (ValueTypeDef[0] != 's') { - l1 = (DWORD)atol(val); - l2 = (DWORD)atol(val2); + l1 = (uint32_t)atol(val); + l2 = (uint32_t)atol(val2); } switch (ValueTypeDef[0]) { @@ -224,7 +224,7 @@ static int ModernSkinButtonToggleDBValue(char * ValueDBSection, char *ValueTypeD case 'd': curval = db_get_dw(0, section, key, l2); curval = (curval == l2) ? l1 : l2; - db_set_dw(0, section, key, (DWORD)curval); + db_set_dw(0, section, key, (uint32_t)curval); break; case 'w': @@ -497,7 +497,7 @@ typedef struct _MButton } MButton; MButton * Buttons = nullptr; -DWORD ButtonsCount = 0; +uint32_t ButtonsCount = 0; #define _center_h( rc ) (((rc)->right + (rc)->left ) >> 1) #define _center_v( rc ) (((rc)->bottom + (rc)->top ) >> 1) @@ -511,7 +511,7 @@ int ModernSkinButton_AddButton(HWND parent, int Top, int Right, int Bottom, - DWORD sbFlags, + uint32_t sbFlags, wchar_t * Hint, char * DBkey, char * TypeDef, @@ -577,7 +577,7 @@ int ModernSkinButton_AddButton(HWND parent, static int ModernSkinButtonErase(int l, int t, int r, int b) { - DWORD i; + uint32_t i; if (!ModernSkinButtonModuleIsLoaded) return 0; if (!g_CluiData.fLayered) return 0; if (!g_pCachedWindow) return 0; @@ -618,7 +618,7 @@ int ModernSkinButtonRedrawAll() { if (!ModernSkinButtonModuleIsLoaded) return 0; g_mutex_bLockUpdating++; - for (DWORD i = 0; i < ButtonsCount; i++) { + for (uint32_t i = 0; i < ButtonsCount; i++) { if (g_clistApi.hwndContactList && Buttons[i].hwnd == nullptr) Buttons[i].hwnd = ModernSkinButtonCreateWindow(Buttons[i].bct, g_clistApi.hwndContactList); ModernSkinButtonPaintWorker(Buttons[i].hwnd, nullptr); @@ -667,7 +667,7 @@ int ModernSkinButton_ReposButtons(HWND parent, uint8_t draw, RECT *pRect) OffsetRect(&rc, -rc.left, -rc.top); rc.right = rc.left + (clr.right - clr.left); rc.bottom = rc.top + (clr.bottom - clr.top); - for (DWORD i = 0; i < ButtonsCount; i++) { + for (uint32_t i = 0; i < ButtonsCount; i++) { int sbFlags = Buttons[i].ConstrainPositionFrom; if (parent && Buttons[i].hwnd == nullptr) { Buttons[i].hwnd = ModernSkinButtonCreateWindow(Buttons[i].bct, parent); diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp index eb1f1e1ac5..20a5560471 100644 --- a/plugins/Clist_modern/src/modern_skinengine.cpp +++ b/plugins/Clist_modern/src/modern_skinengine.cpp @@ -74,8 +74,8 @@ SortedList *gl_plSkinFonts = nullptr; static HANDLE hSkinLoadedEvent; static GLYPHIMAGE *pLoadedImages = nullptr; -static DWORD dwLoadedImagesCount = 0; -static DWORD dwLoadedImagesAlocated = 0; +static uint32_t dwLoadedImagesCount = 0; +static uint32_t dwLoadedImagesAlocated = 0; static BOOL flag_bUpdateQueued = FALSE; static BOOL flag_bJustDrawNonFramedObjects = FALSE; @@ -99,7 +99,7 @@ static BOOL ske_GetMaskBit(uint8_t *line, int x); static INT_PTR ske_Service_AlphaTextOut(WPARAM wParam, LPARAM lParam); static INT_PTR ske_Service_DrawIconEx(WPARAM wParam, LPARAM lParam); -static int ske_AlphaTextOut(HDC hDC, LPCTSTR lpString, int nCount, RECT *lpRect, UINT format, DWORD ARGBcolor); +static int ske_AlphaTextOut(HDC hDC, LPCTSTR lpString, int nCount, RECT *lpRect, UINT format, uint32_t ARGBcolor); static void ske_AddParseTextGlyphObject(char * szGlyphTextID, char * szDefineString, SKINOBJECTSLIST *Skin); static void ske_AddParseSkinFont(char * szFontID, char * szDefineString); static int ske_GetSkinFromDB(char * szSection, SKINOBJECTSLIST * Skin); @@ -191,7 +191,7 @@ HRESULT IniParser::WriteStrToDb(const char * szSection, const char * szName, con break; case 'd': - db_set_dw(0, szSection, szName, (DWORD)atoi(szValue + 1)); + db_set_dw(0, szSection, szName, (uint32_t)atoi(szValue + 1)); break; case 's': @@ -341,7 +341,7 @@ BOOL IniParser::_DoParseLine(char *szLine) if (*ebuf == '\0') return FALSE; // no close bracket - DWORD sectionLen = ebuf - tbuf + 1; + uint32_t sectionLen = ebuf - tbuf + 1; _szSection = (char*)mir_alloc(sectionLen + 1); mir_strncpy(_szSection, tbuf, sectionLen); _szSection[sectionLen] = '\0'; @@ -467,7 +467,7 @@ struct DCBUFFER HDC hDC; HBITMAP oldBitmap; HBITMAP hBitmap; - DWORD dwDestroyAfterTime; + uint32_t dwDestroyAfterTime; }; static int SortBufferList(const DCBUFFER *buf1, const DCBUFFER *buf2) @@ -518,7 +518,7 @@ HDC ske_RequestBufferDC(HDC hdcOwner, int dcID, int width, int height, BOOL fCle pBuf->oldBitmap = (HBITMAP)SelectObject(pBuf->hDC, pBuf->hBitmap); } else if (fClear) - memset(pBuf->pImage, 0, width*height*sizeof(DWORD)); + memset(pBuf->pImage, 0, width*height*sizeof(uint32_t)); } pBuf->dwDestroyAfterTime = 0; return pBuf->hDC; @@ -526,7 +526,7 @@ HDC ske_RequestBufferDC(HDC hdcOwner, int dcID, int width, int height, BOOL fCle int ske_ReleaseBufferDC(HDC hDC, int keepTime) { - DWORD dwCurrentTime = GetTickCount(); + uint32_t dwCurrentTime = GetTickCount(); // Try to find DC in buffer list - set flag to be release after time; mir_cslock lck(BufferListCS); @@ -551,11 +551,11 @@ int ske_ReleaseBufferDC(HDC hDC, int keepTime) BOOL ske_SetRgnOpaque(HDC memdc, HRGN hrgn, BOOL force) { if (g_CluiData.fDisableSkinEngine && !force) return TRUE; - DWORD rgnsz = GetRegionData(hrgn, 0, nullptr); + uint32_t rgnsz = GetRegionData(hrgn, 0, nullptr); RGNDATA *rdata = (RGNDATA *)mir_alloc(rgnsz); GetRegionData(hrgn, rgnsz, rdata); RECT *rect = (RECT *)rdata->Buffer; - for (DWORD d = 0; d < rdata->rdh.nCount; d++) { + for (uint32_t d = 0; d < rdata->rdh.nCount; d++) { ske_SetRectOpaque(memdc, &rect[d], force); } mir_free(rdata); @@ -1320,7 +1320,7 @@ int ske_AddDescriptorToSkinObjectList(SKINOBJECTDESCRIPTOR *lpDescr, SKINOBJECTS if (!mir_strcmpi(lpDescr->szObjectID, "_HEADER_")) return 0; //check if new object allready presents. - for (DWORD i = 0; i < sk->dwObjLPAlocated; i++) + for (uint32_t i = 0; i < sk->dwObjLPAlocated; i++) if (!mir_strcmp(sk->pObjects[i].szObjectID, lpDescr->szObjectID)) return 0; // Realocated list to add space for new object @@ -1373,7 +1373,7 @@ static SKINOBJECTDESCRIPTOR* ske_FindObjectByMask(MODERNMASK *pModernMask, SKINO SKINOBJECTDESCRIPTOR* ske_FindObjectByName(const char *szName, uint8_t objType, SKINOBJECTSLIST *Skin) { SKINOBJECTSLIST *sk = (Skin == nullptr) ? (&g_SkinObjectList) : Skin; - for (DWORD i = 0; i < sk->dwObjLPAlocated; i++) { + for (uint32_t i = 0; i < sk->dwObjLPAlocated; i++) { if (sk->pObjects[i].bType == objType || objType == OT_ANY) { if (!mir_strcmp(sk->pObjects[i].szObjectID, szName)) return &(sk->pObjects[i]); @@ -1427,7 +1427,7 @@ void ske_PreMultiplyChannels(HBITMAP hbmp, uint8_t Mult) BITMAP bmp; BOOL flag = FALSE; uint8_t *pBitmapBits; - DWORD Len; + uint32_t Len; int bh, bw, y, x; GetObject(hbmp, sizeof(BITMAP), (LPSTR)&bmp); @@ -1492,13 +1492,13 @@ This function is required to load TGA to dib buffer myself Major part of routines is from http://tfcduke.developpez.com/tutoriel/format/tga/fichiers/tga.c */ -static BOOL ske_ReadTGAImageData(void *From, DWORD fromSize, uint8_t *destBuf, DWORD bufSize, BOOL RLE) +static BOOL ske_ReadTGAImageData(void *From, uint32_t fromSize, uint8_t *destBuf, uint32_t bufSize, BOOL RLE) { uint8_t *pos = destBuf; uint8_t *from = fromSize ? (uint8_t *)From : nullptr; FILE *fp = !fromSize ? (FILE *)From : nullptr; - DWORD destCount = 0; - DWORD fromCount = 0; + uint32_t destCount = 0; + uint32_t fromCount = 0; if (!RLE) { while (((from && fromCount < fromSize) || (fp && fromCount < bufSize)) && (destCount < bufSize)) { @@ -1529,7 +1529,7 @@ static BOOL ske_ReadTGAImageData(void *From, DWORD fromSize, uint8_t *destBuf, D if (packet_header & 0x80) { /* run-length packet */ if (from) { - *((DWORD*)rgba) = *((DWORD*)(from + fromCount)); + *((uint32_t*)rgba) = *((uint32_t*)(from + fromCount)); fromCount += 4; } else fread(rgba, sizeof(uint8_t), 4, fp); @@ -1589,7 +1589,7 @@ static HBITMAP ske_LoadGlyphImage_TGA(const wchar_t *szFilename) if (!hRSrc) return nullptr; HGLOBAL hRes = LoadResource(g_plugin.getInst(), hRSrc); if (!hRes) return nullptr; - DWORD size = SizeofResource(g_plugin.getInst(), hRSrc); + uint32_t size = SizeofResource(g_plugin.getInst(), hRSrc); uint8_t *mem = (uint8_t*)LockResource(hRes); if (size > sizeof(header)) { tga_header_t *tgahdr = (tga_header_t*)mem; @@ -1675,7 +1675,7 @@ HBITMAP ske_LoadGlyphImage(const wchar_t *tszFileName) mir_cslock lck(cs_SkinChanging); if (pLoadedImages) { - for (DWORD i = 0; i < dwLoadedImagesCount; i++) { + for (uint32_t i = 0; i < dwLoadedImagesCount; i++) { if (!mir_wstrcmpi(pLoadedImages[i].szFileName, szFile)) { pLoadedImages[i].dwLoadedTimes++; return pLoadedImages[i].hGlyph; @@ -1705,7 +1705,7 @@ HBITMAP ske_LoadGlyphImage(const wchar_t *tszFileName) int ske_UnloadGlyphImage(HBITMAP hbmp) { - for (DWORD i = 0; i < dwLoadedImagesCount && pLoadedImages; i++) { + for (uint32_t i = 0; i < dwLoadedImagesCount && pLoadedImages; i++) { if (hbmp != pLoadedImages[i].hGlyph) continue; @@ -1752,7 +1752,7 @@ int ske_UnloadSkin(SKINOBJECTSLIST *Skin) if (Skin->dwObjLPAlocated == 0) return 0; - for (DWORD i = 0; i < Skin->dwObjLPAlocated; i++) { + for (uint32_t i = 0; i < Skin->dwObjLPAlocated; i++) { switch (Skin->pObjects[i].bType) { case OT_GLYPHOBJECT: GLYPHOBJECT *dt = (GLYPHOBJECT*)Skin->pObjects[i].Data; @@ -1798,7 +1798,7 @@ static void RegisterMaskByParce(const char *szSetting, char *szValue, SKINOBJECT if (i < val_len) { char *Obj, *Mask; int res; - DWORD ID = atoi(szSetting + 1); + uint32_t ID = atoi(szSetting + 1); Mask = szValue + i + 1; Obj = (char*)mir_alloc(i + 2); mir_strncpy(Obj, szValue, i + 1); @@ -1841,7 +1841,7 @@ static int ske_SortTextGlyphObjectFunc(void *first, void *second) static void ske_LinkSkinObjects(SKINOBJECTSLIST *pObjectList) { // LINK Mask with objects - for (DWORD i = 0; i < pObjectList->pMaskList->dwMaskCnt; i++) { + for (uint32_t i = 0; i < pObjectList->pMaskList->dwMaskCnt; i++) { MODERNMASK *mm = &(pObjectList->pMaskList->pl_Masks[i]); void *pObject = (void *)ske_FindObjectByName(mm->szObjectName, OT_ANY, (SKINOBJECTSLIST *)pObjectList); replaceStr(mm->szObjectName, nullptr); @@ -1932,7 +1932,7 @@ static int ske_GetSkinFromDB(char *, SKINOBJECTSLIST *Skin) void ske_LoadSkinFromDB(void) { ske_GetSkinFromDB(SKIN, &g_SkinObjectList); - g_CluiData.dwKeyColor = db_get_dw(0, "ModernSettings", "KeyColor", (DWORD)SETTING_KEYCOLOR_DEFAULT); + g_CluiData.dwKeyColor = db_get_dw(0, "ModernSettings", "KeyColor", (uint32_t)SETTING_KEYCOLOR_DEFAULT); } static int ske_LoadSkinFromResource(BOOL bOnlyObjects) @@ -2010,7 +2010,7 @@ bool ske_ResetTextEffect(HDC hdc) return true; } -bool ske_SelectTextEffect(HDC hdc, uint8_t EffectID, DWORD FirstColor, DWORD SecondColor) +bool ske_SelectTextEffect(HDC hdc, uint8_t EffectID, uint32_t FirstColor, uint32_t SecondColor) { if (EffectID > MAXPREDEFINEDEFFECTS) return false; @@ -2047,7 +2047,7 @@ static bool ske_GetTextEffect(HDC hdc, MODERNEFFECT *modernEffect) return true; } -static bool ske_DrawTextEffect(uint8_t *destPt, uint8_t *maskPt, DWORD width, DWORD height, MODERNEFFECT *effect) +static bool ske_DrawTextEffect(uint8_t *destPt, uint8_t *maskPt, uint32_t width, uint32_t height, MODERNEFFECT *effect) { sbyte *buf; sbyte *outbuf; @@ -2056,7 +2056,7 @@ static bool ske_DrawTextEffect(uint8_t *destPt, uint8_t *maskPt, DWORD width, DW uint8_t *maskline, *destline; uint8_t al, rl, gl, bl, ad, rd, gd, bd; int k = 0; - DWORD x, y; + uint32_t x, y; sbyte *matrix; uint8_t mcTopStart; uint8_t mcBottomEnd; @@ -2093,7 +2093,7 @@ static bool ske_DrawTextEffect(uint8_t *destPt, uint8_t *maskPt, DWORD width, DW bufline = buf + y*width; maskline = maskPt + ((y*width) << 2); for (x = 0; x < width; x++) { - uint8_t a = (sbyte)(DWORD)((maskline[0] + maskline[2] + maskline[1] + maskline[1]) >> 4); + uint8_t a = (sbyte)(uint32_t)((maskline[0] + maskline[2] + maskline[1] + maskline[1]) >> 4); *bufline = a; if (a != 0) { minX = min((int)x, minX); @@ -2114,23 +2114,23 @@ static bool ske_DrawTextEffect(uint8_t *destPt, uint8_t *maskPt, DWORD width, DW outbuf = (sbyte*)mir_alloc(width*height*sizeof(sbyte)); memset(outbuf, 0, width*height*sizeof(sbyte)); - for (y = (DWORD)minY; y < (DWORD)maxY; y++) { + for (y = (uint32_t)minY; y < (uint32_t)maxY; y++) { int val; bufline = outbuf + y*width + minX; buflineMid = buf + y*width + minX; - for (x = (DWORD)minX; x < (DWORD)maxX; x++) { + for (x = (uint32_t)minX; x < (uint32_t)maxX; x++) { int matrixHor, matrixVer; val = 0; for (matrixVer = mcTopStart; matrixVer < mcBottomEnd; matrixVer++) { int buflineStep = width*(matrixVer - 2); int as = y + matrixVer - 2; sbyte *buflineTopS = nullptr; - if (as >= 0 && (DWORD)as < height) buflineTopS = buflineMid + buflineStep; + if (as >= 0 && (uint32_t)as < height) buflineTopS = buflineMid + buflineStep; for (matrixHor = mcLeftStart; matrixHor < mcRightEnd; matrixHor++) { buflineTop = buflineTopS; int a = x + matrixHor - 2; - if (buflineTop && a >= 0 && (DWORD)a < width) buflineTop += matrixHor - 2; + if (buflineTop && a >= 0 && (uint32_t)a < width) buflineTop += matrixHor - 2; else buflineTop = nullptr; if (buflineTop) val += ((*buflineTop)*matrix[matrixVer * 5 + matrixHor]); @@ -2180,7 +2180,7 @@ static bool ske_DrawTextEffect(uint8_t *destPt, uint8_t *maskPt, DWORD width, DW return false; } -static int ske_AlphaTextOut(HDC hDC, LPCTSTR lpString, int nCount, RECT *lpRect, UINT format, DWORD ARGBcolor) +static int ske_AlphaTextOut(HDC hDC, LPCTSTR lpString, int nCount, RECT *lpRect, UINT format, uint32_t ARGBcolor) { if (!(lpString && lpRect)) return 0; @@ -2333,8 +2333,8 @@ static int ske_AlphaTextOut(HDC hDC, LPCTSTR lpString, int nCount, RECT *lpRect, drawRect.right = textSize.cx; drawRect.bottom = textSize.cy; - DWORD width = textSize.cx; - DWORD heigh = textSize.cy; + uint32_t width = textSize.cx; + uint32_t heigh = textSize.cy; uint8_t *pDestScanLine, *pBufScanLine, *pix, *bufpix; @@ -2343,13 +2343,13 @@ static int ske_AlphaTextOut(HDC hDC, LPCTSTR lpString, int nCount, RECT *lpRect, uint8_t g = GetGValue(ARGBcolor); uint8_t b = GetBValue(ARGBcolor); - for (DWORD y = 2; y < heigh - 2; y++) { + for (uint32_t y = 2; y < heigh - 2; y++) { int lineBytes = y * (width << 2); pDestScanLine = bits + lineBytes; pBufScanLine = bufbits + lineBytes; - for (DWORD x = 2; x < width - 2; x++) { + for (uint32_t x = 2; x < width - 2; x++) { pix = pDestScanLine + (x << 2); bufpix = pBufScanLine + (x << 2); @@ -2364,7 +2364,7 @@ static int ske_AlphaTextOut(HDC hDC, LPCTSTR lpString, int nCount, RECT *lpRect, rx *= al / 255; } - uint8_t ax = (uint8_t)(((DWORD)rx * 77 + (DWORD)gx * 151 + (DWORD)bx * 28 + 128) / 256); + uint8_t ax = (uint8_t)(((uint32_t)rx * 77 + (uint32_t)gx * 151 + (uint32_t)bx * 28 + 128) / 256); if (ax) { //Normalize components to gray uint8_t axx = 255 - ((r + g + b) >> 2); // Coefficient of grayance, more white font - more gray edges @@ -2420,10 +2420,10 @@ static int ske_DrawTextWithEffectWorker(HDC hdc, LPCTSTR lpString, int nCount, R if (format & DT_RTLREADING) SetTextAlign(hdc, TA_RTLREADING); - DWORD color = GetTextColor(hdc); + uint32_t color = GetTextColor(hdc); RECT r = *lpRect; OffsetRect(&r, 1, 1); - DWORD form = format; + uint32_t form = format; if (effect && effect->effectIndex) ske_SelectTextEffect(hdc, effect->effectIndex - 1, effect->baseColour, effect->secondaryColour); @@ -2452,8 +2452,8 @@ BOOL ske_DrawText(HDC hdc, LPCTSTR lpString, int nCount, RECT *lpRect, UINT form if (format & DT_FORCENATIVERENDER || g_CluiData.fDisableSkinEngine) return DrawText(hdc, lpString, nCount, lpRect, format & ~DT_FORCENATIVERENDER); - DWORD form = format; - DWORD color = GetTextColor(hdc); + uint32_t form = format; + uint32_t color = GetTextColor(hdc); return ske_AlphaTextOut(hdc, lpString, nCount, lpRect, form, color); } @@ -2486,9 +2486,9 @@ HICON ske_ImageList_GetIcon(HIMAGELIST himl, int i) // Looks like color channels in icons should be non-premultiplied with alpha // But AddIcon store it premultiplied (incorrectly cause can be Alpha == 7F, but R,G or B == 80 // So i check that alpha is 0x7F and set it to 0x80 - DWORD *c = ((DWORD*)bcbits); + uint32_t *c = ((uint32_t*)bcbits); for (x = 0; x < imi.rcImage.right - imi.rcImage.left; x++) { - DWORD val = *c; + uint32_t val = *c; uint8_t a = (uint8_t)((val) >> 24); if (a != 0) { uint8_t r = (uint8_t)((val & 0xFF0000) >> 16); @@ -2579,7 +2579,7 @@ BOOL ske_DrawIconEx(HDC hdcDst, int xLeft, int yTop, HICON hIcon, int cxWidth, i BITMAP immaskbt; GetObject(ici.hbmMask, sizeof(BITMAP), &immaskbt); - DWORD cy = imbt.bmHeight; + uint32_t cy = imbt.bmHeight; if (imbt.bmBitsPixel != 32) { no32bit = TRUE; @@ -2609,8 +2609,8 @@ BOOL ske_DrawIconEx(HDC hdcDst, int xLeft, int yTop, HICON hIcon, int cxWidth, i else immaskbits = (uint8_t*)immaskbt.bmBits; HDC imDC = CreateCompatibleDC(hdcDst); - DWORD icy = imbt.bmHeight; - DWORD cx = imbt.bmWidth; + uint32_t icy = imbt.bmHeight; + uint32_t cx = imbt.bmWidth; HBITMAP imBmp = ske_CreateDIB32Point(cx, icy, (void**)&imbits); HBITMAP oldBmp = (HBITMAP)SelectObject(imDC, imBmp); if (imbits != nullptr && imimagbits != nullptr && immaskbits != nullptr) { @@ -2640,8 +2640,8 @@ BOOL ske_DrawIconEx(HDC hdcDst, int xLeft, int yTop, HICON hIcon, int cxWidth, i for (x = 0; x < right; x++) { uint8_t mask = 0; uint8_t a = 0; - DWORD *src = (DWORD*)(t1 + (x << 2)); - DWORD *dest = (DWORD*)(t2 + (x << 2)); + uint32_t *src = (uint32_t*)(t1 + (x << 2)); + uint32_t *dest = (uint32_t*)(t2 + (x << 2)); if (hasalpha && !hasmask) a = ((uint8_t*)src)[3]; else { @@ -3267,7 +3267,7 @@ HBITMAP ske_GetCurrentWindowImage() * Glyph text routine */ -static DWORD ske_HexToARGB(char *Hex) +static uint32_t ske_HexToARGB(char *Hex) { char buf[10] = { 0 }; char buf2[11] = { 0 }; @@ -3279,7 +3279,7 @@ static DWORD ske_HexToARGB(char *Hex) buf2[10] = '\0'; char *st; - DWORD AARRGGBB = strtoul(buf2, &st, 16); + uint32_t AARRGGBB = strtoul(buf2, &st, 16); uint8_t alpha = (uint8_t)((AARRGGBB & 0xFF000000) >> 24); alpha = 255 - ((alpha == 0) ? 255 : alpha); AARRGGBB = (alpha << 24) + ((AARRGGBB & 0x00FF0000) >> 16) + ((AARRGGBB & 0x000000FF) << 16) + (AARRGGBB & 0x0000FF00); @@ -3454,15 +3454,15 @@ static void ske_AddParseSkinFont(char *szFontID, char *szDefineString) */ static BOOL ske_CheckHasAlfaChannel(uint8_t *from, int widthByte, int height) { - DWORD *pt = (DWORD*)from; + uint32_t *pt = (uint32_t*)from; for (int j = 0; j < height; j++) { uint8_t *add = (uint8_t*)pt + widthByte; - while (pt < (DWORD*)add) { + while (pt < (uint32_t*)add) { if ((*pt & 0xFF000000) != 0) return TRUE; pt++; } - pt = (DWORD*)(from + widthByte*j); + pt = (uint32_t*)(from + widthByte*j); } return FALSE; } @@ -3493,7 +3493,7 @@ static BOOL ske_GetMaskBit(uint8_t *line, int x) * X2 - overlaying points. */ -static DWORD ske_Blend(DWORD X1, DWORD X2, uint8_t alpha) +static uint32_t ske_Blend(uint32_t X1, uint32_t X2, uint8_t alpha) { uint8_t a1 = (uint8_t)(X1 >> 24); uint8_t a2 = (uint8_t)(((X2 >> 24)*alpha) >> 8); @@ -3614,8 +3614,8 @@ HICON ske_CreateJoinedIcon(HICON hBottom, HICON hTop, uint8_t alpha) for (int x = 0; x < 16; x++) { BOOL mask_b = ske_GetMaskBit(bmb, x); BOOL mask_t = ske_GetMaskBit(tmb, x); - DWORD bottom_d = ((DWORD*)bb)[x]; - DWORD top_d = ((DWORD*)tb)[x]; + uint32_t bottom_d = ((uint32_t*)bb)[x]; + uint32_t top_d = ((uint32_t*)tb)[x]; if (topHasMask) { if (mask_t == 1 && !topHasAlpha) top_d &= 0xFFFFFF; else if (!topHasAlpha) top_d |= 0xFF000000; @@ -3624,7 +3624,7 @@ HICON ske_CreateJoinedIcon(HICON hBottom, HICON hTop, uint8_t alpha) if (mask_b == 1 && !bottomHasAlpha) bottom_d &= 0xFFFFFF; else if (!bottomHasAlpha) bottom_d |= 0xFF000000; } - ((DWORD*)db)[x] = ske_Blend(bottom_d, top_d, alpha); + ((uint32_t*)db)[x] = ske_Blend(bottom_d, top_d, alpha); } bb += vstep_b; tb += vstep_t; @@ -3739,13 +3739,13 @@ uint16_t SkinDBGetContactSettingWord(MCONTACT hContact, const char *szSection, c return wDefault; } -DWORD SkinDBGetContactSettingDword(MCONTACT hContact, const char *szSection, const char *szKey, DWORD dwDefault) +uint32_t SkinDBGetContactSettingDword(MCONTACT hContact, const char *szSection, const char *szKey, uint32_t dwDefault) { DBVARIANT dbv = { 0 }; BOOL bSkinned = FALSE; if (!SkinDBGetContactSetting(hContact, szSection, szKey, &dbv, &bSkinned)) { if (dbv.type == DBVT_DWORD) { - DWORD retVal = dbv.dVal; + uint32_t retVal = dbv.dVal; db_free(&dbv); return retVal; } diff --git a/plugins/Clist_modern/src/modern_skinengine.h b/plugins/Clist_modern/src/modern_skinengine.h index d9f3cf440e..ebb84c22ae 100644 --- a/plugins/Clist_modern/src/modern_skinengine.h +++ b/plugins/Clist_modern/src/modern_skinengine.h @@ -19,8 +19,8 @@ struct SKINOBJECTSLIST
{
- DWORD dwObjLPReserved;
- DWORD dwObjLPAlocated;
+ uint32_t dwObjLPReserved;
+ uint32_t dwObjLPAlocated;
wchar_t *szSkinPlace;
LISTMODERNMASK *pMaskList;
SKINOBJECTDESCRIPTOR *pObjects;
@@ -30,7 +30,7 @@ struct SKINOBJECTSLIST struct GLYPHIMAGE
{
wchar_t *szFileName;
- DWORD dwLoadedTimes;
+ uint32_t dwLoadedTimes;
HBITMAP hGlyph;
uint8_t isSemiTransp;
};
@@ -53,8 +53,8 @@ struct EFFECTSSTACKITEM {
HDC hdc;
uint8_t EffectID;
- DWORD FirstColor;
- DWORD SecondColor;
+ uint32_t FirstColor;
+ uint32_t SecondColor;
};
class IniParser
@@ -102,7 +102,7 @@ private: const char* _RemoveTailings(const char *szLine, size_t &len);
HGLOBAL _hGlobalRes;
- DWORD _dwSizeOfRes;
+ uint32_t _dwSizeOfRes;
char* _pPosition;
uint8_t _Flags;
diff --git a/plugins/Clist_modern/src/modern_skinselector.cpp b/plugins/Clist_modern/src/modern_skinselector.cpp index bd96db90e3..143b83f530 100644 --- a/plugins/Clist_modern/src/modern_skinselector.cpp +++ b/plugins/Clist_modern/src/modern_skinselector.cpp @@ -40,9 +40,9 @@ int SkinSelector_DeleteMask(MODERNMASK *mm) return 1;
}
-DWORD mod_CalcHash(const char *szStr)
+uint32_t mod_CalcHash(const char *szStr)
{
- DWORD hash = 0;
+ uint32_t hash = 0;
int shift = 0;
for (int i = 0; szStr[i]; i++) {
hash ^= szStr[i] << shift;
@@ -72,7 +72,7 @@ int ClearMaskList(LISTMODERNMASK * mmTemplateList) return 0;
}
-static int DeleteMaskByItID(DWORD mID, LISTMODERNMASK *mmTemplateList)
+static int DeleteMaskByItID(uint32_t mID, LISTMODERNMASK *mmTemplateList)
{
if (!mmTemplateList) return -1;
if (mID >= mmTemplateList->dwMaskCnt) return -1;
@@ -86,7 +86,7 @@ static int DeleteMaskByItID(DWORD mID, LISTMODERNMASK *mmTemplateList) SkinSelector_DeleteMask(&(mmTemplateList->pl_Masks[mID]));
MODERNMASK *newAlocation = (MODERNMASK *)mir_alloc(sizeof(MODERNMASK)*mmTemplateList->dwMaskCnt - 1);
memcpy(newAlocation, mmTemplateList->pl_Masks, sizeof(MODERNMASK)*(mID + 1));
- for (DWORD i = mID; i < mmTemplateList->dwMaskCnt - 1; i++) {
+ for (uint32_t i = mID; i < mmTemplateList->dwMaskCnt - 1; i++) {
newAlocation[i] = mmTemplateList->pl_Masks[i + 1];
newAlocation[i].dwMaskId = i;
}
@@ -98,7 +98,7 @@ static int DeleteMaskByItID(DWORD mID, LISTMODERNMASK *mmTemplateList) }
-static int ExchangeMasksByID(DWORD mID1, DWORD mID2, LISTMODERNMASK * mmTemplateList)
+static int ExchangeMasksByID(uint32_t mID1, uint32_t mID2, LISTMODERNMASK * mmTemplateList)
{
if (!mmTemplateList) return 0;
if (mID1 >= mmTemplateList->dwMaskCnt) return 0;
@@ -114,7 +114,7 @@ static int ExchangeMasksByID(DWORD mID1, DWORD mID2, LISTMODERNMASK * mmTemplate int SortMaskList(LISTMODERNMASK * mmList)
{
- DWORD pos = 1;
+ uint32_t pos = 1;
if (mmList->dwMaskCnt < 2) return 0;
do {
if (mmList->pl_Masks[pos].dwMaskId < mmList->pl_Masks[pos - 1].dwMaskId) {
@@ -281,7 +281,7 @@ static BOOL CompareModernMask(MODERNMASK *mmValue, MODERNMASK *mmTemplate) uint8_t pVal = 0, pTemp = 0;
while (pTemp < mmTemplate->dwParamCnt && pVal < mmValue->dwParamCnt) {
// find pTemp parameter in mValue
- DWORD vh, ph;
+ uint32_t vh, ph;
BOOL finded = 0;
MASKPARAM p = mmTemplate->pl_Params[pTemp];
ph = p.dwId;
@@ -323,7 +323,7 @@ BOOL CompareStrWithModernMask(char *szValue, MODERNMASK *mmTemplate) };
// AddingMask
-int AddStrModernMaskToList(DWORD maskID, char *szStr, char *objectName, LISTMODERNMASK *mmTemplateList)
+int AddStrModernMaskToList(uint32_t maskID, char *szStr, char *objectName, LISTMODERNMASK *mmTemplateList)
{
if (!szStr || !mmTemplateList)
return -1;
@@ -341,7 +341,7 @@ int AddStrModernMaskToList(DWORD maskID, char *szStr, char *objectName, LISTMODE SKINOBJECTDESCRIPTOR* skin_FindObjectByMask(MODERNMASK *mm, LISTMODERNMASK *mmTemplateList)
{
- for (DWORD i = 0; i < mmTemplateList->dwMaskCnt; i++)
+ for (uint32_t i = 0; i < mmTemplateList->dwMaskCnt; i++)
if (CompareModernMask(mm, &(mmTemplateList->pl_Masks[i])))
return (SKINOBJECTDESCRIPTOR*)mmTemplateList->pl_Masks[i].pObject;
@@ -441,7 +441,7 @@ int RegisterButtonByParce(char * ObjectName, char * Params) char Section[250] = { 0 };
char Type[250] = { 0 };
- DWORD alingnto;
+ uint32_t alingnto;
int a = ((int)!mir_strcmpi(buf, "Switch")) * 2;
GetParamN(Params, pServiceName, _countof(pServiceName), 1, ',', 0);
diff --git a/plugins/Clist_modern/src/modern_skinselector.h b/plugins/Clist_modern/src/modern_skinselector.h index 9567f95870..841f654ce4 100644 --- a/plugins/Clist_modern/src/modern_skinselector.h +++ b/plugins/Clist_modern/src/modern_skinselector.h @@ -35,39 +35,39 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct MASKPARAM
{
- DWORD dwId;
+ uint32_t dwId;
uint8_t bMaskParamFlag;
char* szName;
- DWORD dwValueHash;
+ uint32_t dwValueHash;
char* szValue;
};
struct MODERNMASK
{
MASKPARAM* pl_Params;
- DWORD dwParamCnt;
+ uint32_t dwParamCnt;
union
{
void* pObject;
char* szObjectName;
};
- DWORD dwMaskId;
+ uint32_t dwMaskId;
BOOL bObjectFound;
};
struct LISTMODERNMASK
{
MODERNMASK* pl_Masks;
- DWORD dwMaskCnt;
+ uint32_t dwMaskCnt;
};
/// PROTOTYPES
-int AddStrModernMaskToList(DWORD maskID, char *szStr, char *objectName, LISTMODERNMASK *mmTemplateList);
+int AddStrModernMaskToList(uint32_t maskID, char *szStr, char *objectName, LISTMODERNMASK *mmTemplateList);
int SortMaskList(LISTMODERNMASK *mmList);
int ClearMaskList(LISTMODERNMASK *mmTemplateList);
BOOL CompareStrWithModernMask(char *szValue, MODERNMASK *mmTemplate);
-DWORD mod_CalcHash(const char *a);
+uint32_t mod_CalcHash(const char *a);
int RegisterObjectByParce(char *ObjectName, char *Params);
SKINOBJECTDESCRIPTOR* skin_FindObjectByRequest(char *szValue, LISTMODERNMASK *mmTemplateList);
SKINOBJECTDESCRIPTOR* skin_FindObjectByMask(MODERNMASK *mm, LISTMODERNMASK *mmTemplateList);
diff --git a/plugins/Clist_modern/src/modern_statusbar.cpp b/plugins/Clist_modern/src/modern_statusbar.cpp index 1f28b12e89..87f004fe4d 100644 --- a/plugins/Clist_modern/src/modern_statusbar.cpp +++ b/plugins/Clist_modern/src/modern_statusbar.cpp @@ -120,7 +120,7 @@ int BgStatusBarChange(WPARAM, LPARAM) }
// ProtocolData;
-int NewStatusPaintCallbackProc(HWND hWnd, HDC hDC, RECT *, HRGN, DWORD, void *)
+int NewStatusPaintCallbackProc(HWND hWnd, HDC hDC, RECT *, HRGN, uint32_t, void *)
{
return ModernDrawStatusBar(hWnd, hDC);
}
@@ -313,7 +313,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) int iconY = rc.top + (((rc.bottom - rc.top) - iconHeight) / 2);
// Code for each line
- DWORD sw;
+ uint32_t sw;
int rectwidth = rc.right - rc.left - g_StatusBarData.rectBorders.left - g_StatusBarData.rectBorders.right;
if (visProtoCount > 1)
sw = (rectwidth - (g_StatusBarData.extraspace*(visProtoCount - 1))) / visProtoCount;
@@ -324,7 +324,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) for (int i = 0; i < visProtoCount; i++) {
ProtoItemData &p = ProtosData[line*protosperline + i];
- DWORD w = p.PaddingLeft;
+ uint32_t w = p.PaddingLeft;
w += p.PaddingRight;
if (p.bShowProtoIcon) {
@@ -469,7 +469,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) SelectClipRgn(hDC, rgn);
p.bDoubleIcons = false;
- DWORD dim = p.bIsDimmed ? ((64 << 24) | 0x80) : 0;
+ uint32_t dim = p.bIsDimmed ? ((64 << 24) | 0x80) : 0;
if ((p.xStatusMode & 3) == 3) {
if (hIcon)
diff --git a/plugins/Clist_modern/src/modern_statusbar.h b/plugins/Clist_modern/src/modern_statusbar.h index 4c164a4b09..c9a1a6e135 100644 --- a/plugins/Clist_modern/src/modern_statusbar.h +++ b/plugins/Clist_modern/src/modern_statusbar.h @@ -20,17 +20,17 @@ typedef struct tagSTATUSBARDATA bool bShowStatusName;
bool bConnectingIcon;
HFONT BarFont;
- DWORD fontColor;
+ uint32_t fontColor;
uint8_t TextEffectID;
- DWORD TextEffectColor1;
- DWORD TextEffectColor2;
+ uint32_t TextEffectColor1;
+ uint32_t TextEffectColor2;
uint8_t xStatusMode; // 0-only main, 1-xStatus, 2-main as overlay
uint8_t nProtosPerLine;
bool bShowProtoEmails;
HBITMAP hBmpBackground;
COLORREF bkColour;
- DWORD backgroundBmpUse;
+ uint32_t backgroundBmpUse;
BOOL bkUseWinColors;
XPTHANDLE hTheme;
diff --git a/plugins/Clist_modern/src/modern_statusbar_options.cpp b/plugins/Clist_modern/src/modern_statusbar_options.cpp index 3513df1b6d..4a385a5db7 100644 --- a/plugins/Clist_modern/src/modern_statusbar_options.cpp +++ b/plugins/Clist_modern/src/modern_statusbar_options.cpp @@ -169,7 +169,7 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l dat = (StatusBarProtocolOptions *)mir_calloc(sizeof(StatusBarProtocolOptions));
dat->szName = szName;
- DWORD dwNewId = SendMessage(hwndComboBox, CB_ADDSTRING, 0, (LPARAM)pa->tszAccountName);
+ uint32_t dwNewId = SendMessage(hwndComboBox, CB_ADDSTRING, 0, (LPARAM)pa->tszAccountName);
SendMessage(hwndComboBox, CB_SETITEMDATA, dwNewId, (LPARAM)dat);
char buf[256];
@@ -370,10 +370,10 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l dat->SBarRightClk = IsDlgButtonChecked(hwndDlg, IDC_RIGHTMIRANDA);
}
else if (LOWORD(wParam) == IDC_OFFSETICON_LEFT) {
- dat->PaddingLeft = (DWORD)SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN_LEFT, UDM_GETPOS, 0, 0);
+ dat->PaddingLeft = (uint32_t)SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN_LEFT, UDM_GETPOS, 0, 0);
}
else if (LOWORD(wParam) == IDC_OFFSETICON_RIGHT) {
- dat->PaddingRight = (DWORD)SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN_RIGHT, UDM_GETPOS, 0, 0);
+ dat->PaddingRight = (uint32_t)SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN_RIGHT, UDM_GETPOS, 0, 0);
}
else if ((LOWORD(wParam) == IDC_MULTI_COUNT || LOWORD(wParam) == IDC_OFFSETICON || LOWORD(wParam) == IDC_OFFSETICON2
|| LOWORD(wParam) == IDC_OFFSETICON3 || LOWORD(wParam) == IDC_SBAR_BORDER_BOTTOM || LOWORD(wParam) == IDC_SBAR_BORDER_TOP)
@@ -431,11 +431,11 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l db_set_b(0, "CLUI", "EqualSections", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_EQUALSECTIONS));
db_set_b(0, "CLUI", "Align", (uint8_t)SendDlgItemMessage(hwndDlg, IDC_SBAR_HORIZ_ALIGN, CB_GETCURSEL, 0, 0));
db_set_b(0, "CLUI", "VAlign", (uint8_t)SendDlgItemMessage(hwndDlg, IDC_SBAR_VERT_ALIGN, CB_GETCURSEL, 0, 0));
- db_set_dw(0, "CLUI", "LeftOffset", (DWORD)SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN, UDM_GETPOS, 0, 0));
- db_set_dw(0, "CLUI", "RightOffset", (DWORD)SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN2, UDM_GETPOS, 0, 0));
- db_set_dw(0, "CLUI", "TopOffset", (DWORD)SendDlgItemMessage(hwndDlg, IDC_SBAR_BORDER_TOP_SPIN, UDM_GETPOS, 0, 0));
- db_set_dw(0, "CLUI", "BottomOffset", (DWORD)SendDlgItemMessage(hwndDlg, IDC_SBAR_BORDER_BOTTOM_SPIN, UDM_GETPOS, 0, 0));
- db_set_dw(0, "CLUI", "SpaceBetween", (DWORD)SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN3, UDM_GETPOS, 0, 0));
+ db_set_dw(0, "CLUI", "LeftOffset", (uint32_t)SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN, UDM_GETPOS, 0, 0));
+ db_set_dw(0, "CLUI", "RightOffset", (uint32_t)SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN2, UDM_GETPOS, 0, 0));
+ db_set_dw(0, "CLUI", "TopOffset", (uint32_t)SendDlgItemMessage(hwndDlg, IDC_SBAR_BORDER_TOP_SPIN, UDM_GETPOS, 0, 0));
+ db_set_dw(0, "CLUI", "BottomOffset", (uint32_t)SendDlgItemMessage(hwndDlg, IDC_SBAR_BORDER_BOTTOM_SPIN, UDM_GETPOS, 0, 0));
+ db_set_dw(0, "CLUI", "SpaceBetween", (uint32_t)SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN3, UDM_GETPOS, 0, 0));
db_set_b(0, "CLUI", "ShowSBar", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_SHOWSBAR));
LoadStatusBarData();
diff --git a/plugins/Clist_modern/src/modern_toolbar.cpp b/plugins/Clist_modern/src/modern_toolbar.cpp index 8767a9a457..d1be88c4fe 100644 --- a/plugins/Clist_modern/src/modern_toolbar.cpp +++ b/plugins/Clist_modern/src/modern_toolbar.cpp @@ -266,7 +266,7 @@ static LRESULT CALLBACK toolbarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA return mir_callNextSubclass(hwnd, toolbarWndProc, msg, wParam, lParam);
}
-static int ToolBar_LayeredPaintProc(HWND hWnd, HDC hDC, RECT *, HRGN, DWORD, void *)
+static int ToolBar_LayeredPaintProc(HWND hWnd, HDC hDC, RECT *, HRGN, uint32_t, void *)
{
return SendMessage(hWnd, MTBM_LAYEREDPAINT, (WPARAM)hDC, 0);
}
diff --git a/plugins/Clist_modern/src/modern_utils.cpp b/plugins/Clist_modern/src/modern_utils.cpp index 493b5b6182..2cea1b9a1a 100644 --- a/plugins/Clist_modern/src/modern_utils.cpp +++ b/plugins/Clist_modern/src/modern_utils.cpp @@ -23,7 +23,7 @@ char * __cdecl strstri(char *a, const char *b) void TRACE_ERROR()
{
- DWORD t = GetLastError();
+ uint32_t t = GetLastError();
LPVOID lpMsgBuf;
if (!FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp index 61b12e346a..aeae1a3eb3 100644 --- a/plugins/Clist_modern/src/modern_viewmodebar.cpp +++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp @@ -41,7 +41,7 @@ static HWND hwndSelector = nullptr; static HIMAGELIST himlViewModes = nullptr;
static HANDLE hInfoItem = nullptr;
static int nullImage;
-static DWORD stickyStatusMask = 0;
+static uint32_t stickyStatusMask = 0;
static char g_szModename[2048];
static UINT _page1Controls[] =
@@ -86,7 +86,7 @@ static int DeleteAutoModesCallback(char *szsetting) return 1;
}
-void SaveViewMode(const char *name, const wchar_t *szGroupFilter, const char *szProtoFilter, DWORD dwStatusMask, DWORD dwStickyStatusMask,
+void SaveViewMode(const char *name, const wchar_t *szGroupFilter, const char *szProtoFilter, uint32_t dwStatusMask, uint32_t dwStickyStatusMask,
unsigned int options, unsigned int stickies, unsigned int operators, unsigned int lmdat)
{
CLVM_EnumModes(DeleteAutoModesCallback);
@@ -170,9 +170,9 @@ class CViewModeSetupDlg : public CDlgBase return 1;
}
- DWORD GetMaskForItem(HANDLE hItem)
+ uint32_t GetMaskForItem(HANDLE hItem)
{
- DWORD dwMask = 0;
+ uint32_t dwMask = 0;
for (int i = 0; i <= ID_STATUS_MAX - ID_STATUS_OFFLINE; i++)
dwMask |= (clist.GetExtraImage(hItem, i) == nullImage ? 0 : 1 << i);
@@ -268,8 +268,8 @@ class CViewModeSetupDlg : public CDlgBase {
wchar_t newGroupFilter[2048] = L"|";
char newProtoFilter[2048] = "|";
- DWORD statusMask = 0;
- DWORD operators = 0;
+ uint32_t statusMask = 0;
+ uint32_t operators = 0;
if (m_iCurrItem == -1)
return;
@@ -313,14 +313,14 @@ class CViewModeSetupDlg : public CDlgBase if (szTempModeName) {
T2Utf szModeName(szTempModeName);
- DWORD dwGlobalMask = GetMaskForItem(hInfoItem);
+ uint32_t dwGlobalMask = GetMaskForItem(hInfoItem);
for (auto &hContact : Contacts()) {
HANDLE hItem = clist.FindContact(hContact);
if (hItem == nullptr)
continue;
if (clist.GetCheck(hItem)) {
- DWORD dwLocalMask = GetMaskForItem(hItem);
+ uint32_t dwLocalMask = GetMaskForItem(hItem);
db_set_dw(hContact, CLVM_MODULE, szModeName, MAKELONG(1, (unsigned short)dwLocalMask));
stickies++;
}
@@ -337,10 +337,10 @@ class CViewModeSetupDlg : public CDlgBase (IsDlgButtonChecked(m_hwnd, IDC_USEGROUPS) == BST_CHECKED ? CLVM_USEGROUPS : 0) |
(IsDlgButtonChecked(m_hwnd, IDC_USEGROUPS) == BST_UNCHECKED ? CLVM_DONOTUSEGROUPS : 0));
- DWORD options = SendDlgItemMessage(m_hwnd, IDC_AUTOCLEARSPIN, UDM_GETPOS, 0, 0);
+ uint32_t options = SendDlgItemMessage(m_hwnd, IDC_AUTOCLEARSPIN, UDM_GETPOS, 0, 0);
BOOL translated;
- DWORD lmdat = MAKELONG(GetDlgItemInt(m_hwnd, IDC_LASTMSGVALUE, &translated, FALSE),
+ uint32_t lmdat = MAKELONG(GetDlgItemInt(m_hwnd, IDC_LASTMSGVALUE, &translated, FALSE),
MAKEWORD(SendDlgItemMessage(m_hwnd, IDC_LASTMESSAGEOP, CB_GETCURSEL, 0, 0),
SendDlgItemMessage(m_hwnd, IDC_LASTMESSAGEUNIT, CB_GETCURSEL, 0, 0)));
@@ -448,7 +448,7 @@ class CViewModeSetupDlg : public CDlgBase ////////////////////////////////////////////////////////////////////////////////////////
- void UpdateClistItem(HANDLE hItem, DWORD mask)
+ void UpdateClistItem(HANDLE hItem, uint32_t mask)
{
for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_MAX; i++)
clist.SetExtraImage(hItem, i - ID_STATUS_OFFLINE, (1 << (i - ID_STATUS_OFFLINE)) & mask ? i - ID_STATUS_OFFLINE : nullImage);
@@ -460,8 +460,8 @@ class CViewModeSetupDlg : public CDlgBase void UpdateFilters()
{
char szSetting[128];
- DWORD dwFlags;
- DWORD opt;
+ uint32_t dwFlags;
+ uint32_t opt;
if (m_iCurrItem == LB_ERR)
return;
@@ -489,7 +489,7 @@ class CViewModeSetupDlg : public CDlgBase SendDlgItemMessage(m_hwnd, IDC_AUTOCLEARSPIN, UDM_SETPOS, 0, MAKELONG(LOWORD(opt), 0));
mir_snprintf(szSetting, "%c%s_SM", 246, szBuf.get());
- DWORD statusMask = db_get_dw(0, CLVM_MODULE, szSetting, 0);
+ uint32_t statusMask = db_get_dw(0, CLVM_MODULE, szSetting, 0);
mir_snprintf(szSetting, "%c%s_SSM", 246, szBuf.get());
stickyStatusMask = db_get_dw(0, CLVM_MODULE, szSetting, -1);
dwFlags = db_get_dw(0, CLVM_MODULE, szBuf, 0);
@@ -554,7 +554,7 @@ class CViewModeSetupDlg : public CDlgBase EnableWindow(GetDlgItem(m_hwnd, IDC_LASTMESSAGEUNIT), useLastMsg);
mir_snprintf(szSetting, "%c%s_LM", 246, szBuf.get());
- DWORD lmdat = db_get_dw(0, CLVM_MODULE, szSetting, 0);
+ uint32_t lmdat = db_get_dw(0, CLVM_MODULE, szSetting, 0);
SetDlgItemInt(m_hwnd, IDC_LASTMSGVALUE, LOWORD(lmdat), FALSE);
uint8_t bTmp = LOBYTE(HIWORD(lmdat));
@@ -785,7 +785,7 @@ public: if (hItem)
clist.SetCheck(hItem, db_get_dw(hContact, CLVM_MODULE, g_szModename, 0));
- DWORD localMask = HIWORD(db_get_dw(hContact, CLVM_MODULE, g_szModename, 0));
+ uint32_t localMask = HIWORD(db_get_dw(hContact, CLVM_MODULE, g_szModename, 0));
UpdateClistItem(hItem, (localMask == 0 || localMask == stickyStatusMask) ? stickyStatusMask : localMask);
}
@@ -807,7 +807,7 @@ public: if (nm->iColumn == -1)
return;
- DWORD hitFlags;
+ uint32_t hitFlags;
HANDLE hItem = clist.HitTest(nm->pt.x, nm->pt.y, &hitFlags);
if (hItem == nullptr)
return;
@@ -1141,7 +1141,7 @@ static int ehhViewModeBackgroundSettingsChanged(WPARAM, LPARAM) return 0;
}
-static int ViewModePaintCallbackProc(HWND hWnd, HDC hDC, RECT *, HRGN, DWORD, void *)
+static int ViewModePaintCallbackProc(HWND hWnd, HDC hDC, RECT *, HRGN, uint32_t, void *)
{
RECT MyRect = { 0 };
GetWindowRect(hWnd, &MyRect);
@@ -1268,7 +1268,7 @@ void ApplyViewMode(const char *szName) if (g_CluiData.filterFlags & CLVM_AUTOCLEAR) {
mir_snprintf(szSetting, "%c%s_OPT", 246, szName);
- DWORD timerexpire = LOWORD(db_get_dw(0, CLVM_MODULE, szSetting, 0));
+ uint32_t timerexpire = LOWORD(db_get_dw(0, CLVM_MODULE, szSetting, 0));
strncpy_s(g_CluiData.old_viewmode, g_CluiData.current_viewmode, _TRUNCATE);
CLUI_SafeSetTimer(g_hwndViewModeFrame, TIMERID_VIEWMODEEXPIRE, timerexpire * 1000, nullptr);
}
@@ -1287,7 +1287,7 @@ void ApplyViewMode(const char *szName) else
g_CluiData.bFilterEffective |= CLVM_FILTER_LASTMSG_OLDERTHAN;
- DWORD unit = LOWORD(g_CluiData.lastMsgFilter);
+ uint32_t unit = LOWORD(g_CluiData.lastMsgFilter);
switch (HIBYTE(HIWORD(g_CluiData.lastMsgFilter))) {
case 0:
unit *= 60;
diff --git a/plugins/Clist_modern/src/modern_xptheme.cpp b/plugins/Clist_modern/src/modern_xptheme.cpp index 2c341149c9..6d101e3955 100644 --- a/plugins/Clist_modern/src/modern_xptheme.cpp +++ b/plugins/Clist_modern/src/modern_xptheme.cpp @@ -117,7 +117,7 @@ HRESULT xpt_DrawTheme(XPTHANDLE xptHandle, HWND hwnd, HDC hdc, int type, int sta return S_FALSE;
}
-HRESULT xpt_DrawThemeText(XPTHANDLE xptHandle, HDC hdc, int type, int state, LPCTSTR lpStr, int len, DWORD flag1, DWORD flag2, const RECT *textRect)
+HRESULT xpt_DrawThemeText(XPTHANDLE xptHandle, HDC hdc, int type, int state, LPCTSTR lpStr, int len, uint32_t flag1, uint32_t flag2, const RECT *textRect)
{
mir_cslock lck(xptCS);
if (xpt_IsThemed(xptHandle))
diff --git a/plugins/Clist_nicer/src/alphablend.cpp b/plugins/Clist_nicer/src/alphablend.cpp index ec805b4794..0b772a1fff 100644 --- a/plugins/Clist_nicer/src/alphablend.cpp +++ b/plugins/Clist_nicer/src/alphablend.cpp @@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern int g_hottrack, g_hottrack_done;
extern BOOL g_inCLCpaint;
extern uint8_t saved_alpha;
-extern DWORD savedCORNER;
+extern uint32_t savedCORNER;
extern ImageItem *g_glyphItem;
uint8_t __forceinline percent_to_byte(UINT32 percent)
@@ -40,13 +40,13 @@ COLORREF __forceinline revcolref(COLORREF colref) return RGB(GetBValue(colref), GetGValue(colref), GetRValue(colref));
}
-DWORD __forceinline argb_from_cola(COLORREF col, UINT32 alpha)
+uint32_t __forceinline argb_from_cola(COLORREF col, UINT32 alpha)
{
return((uint8_t)percent_to_byte(alpha) << 24 | col);
}
-void __forceinline DrawBorderStyle(HDC hdcwnd, RECT *rc, DWORD BORDERSTYLE)
+void __forceinline DrawBorderStyle(HDC hdcwnd, RECT *rc, uint32_t BORDERSTYLE)
{
HPEN hPenOld = nullptr;
POINT pt;
@@ -79,7 +79,7 @@ void __forceinline DrawBorderStyle(HDC hdcwnd, RECT *rc, DWORD BORDERSTYLE) if (hPenOld)
SelectObject(hdcwnd, hPenOld);
}
-void DrawAlpha(HDC hdcwnd, PRECT rc, DWORD basecolor, int alpha, DWORD basecolor2, BOOL transparent, uint8_t FLG_GRADIENT, uint8_t FLG_CORNER, DWORD BORDERSTYLE, ImageItem *imageItem)
+void DrawAlpha(HDC hdcwnd, PRECT rc, uint32_t basecolor, int alpha, uint32_t basecolor2, BOOL transparent, uint8_t FLG_GRADIENT, uint8_t FLG_CORNER, uint32_t BORDERSTYLE, ImageItem *imageItem)
{
if (rc == nullptr)
return;
@@ -374,7 +374,7 @@ void DrawAlpha(HDC hdcwnd, PRECT rc, DWORD basecolor, int alpha, DWORD basecolor DeleteDC(hdc);
}
-void __inline gradientHorizontal(UCHAR *ubRedFinal, UCHAR *ubGreenFinal, UCHAR *ubBlueFinal, ULONG ulBitmapWidth, UCHAR ubRed, UCHAR ubGreen, UCHAR ubBlue, UCHAR ubRed2, UCHAR ubGreen2, UCHAR ubBlue2, DWORD FLG_GRADIENT, BOOL transparent, UINT32 x, UCHAR *ubAlpha)
+void __inline gradientHorizontal(UCHAR *ubRedFinal, UCHAR *ubGreenFinal, UCHAR *ubBlueFinal, ULONG ulBitmapWidth, UCHAR ubRed, UCHAR ubGreen, UCHAR ubBlue, UCHAR ubRed2, UCHAR ubGreen2, UCHAR ubBlue2, uint32_t FLG_GRADIENT, BOOL transparent, UINT32 x, UCHAR *ubAlpha)
{
FLOAT fSolidMulti, fInvSolidMulti;
@@ -402,7 +402,7 @@ void __inline gradientHorizontal(UCHAR *ubRedFinal, UCHAR *ubGreenFinal, UCHAR * }
}
-void __inline gradientVertical(UCHAR *ubRedFinal, UCHAR *ubGreenFinal, UCHAR *ubBlueFinal, ULONG ulBitmapHeight, UCHAR ubRed, UCHAR ubGreen, UCHAR ubBlue, UCHAR ubRed2, UCHAR ubGreen2, UCHAR ubBlue2, DWORD FLG_GRADIENT, BOOL transparent, UINT32 y, UCHAR *ubAlpha)
+void __inline gradientVertical(UCHAR *ubRedFinal, UCHAR *ubGreenFinal, UCHAR *ubBlueFinal, ULONG ulBitmapHeight, UCHAR ubRed, UCHAR ubGreen, UCHAR ubBlue, UCHAR ubRed2, UCHAR ubGreen2, UCHAR ubBlue2, uint32_t FLG_GRADIENT, BOOL transparent, UINT32 y, UCHAR *ubAlpha)
{
FLOAT fSolidMulti, fInvSolidMulti;
diff --git a/plugins/Clist_nicer/src/alphablend.h b/plugins/Clist_nicer/src/alphablend.h index eb157fb5d5..dc541f097b 100644 --- a/plugins/Clist_nicer/src/alphablend.h +++ b/plugins/Clist_nicer/src/alphablend.h @@ -26,8 +26,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. void __inline gradientVertical(UCHAR *ubRedFinal, UCHAR *ubGreenFinal, UCHAR *ubBlueFinal,
ULONG ulBitmapHeight, UCHAR ubRed, UCHAR ubGreen, UCHAR ubBlue, UCHAR ubRed2,
- UCHAR ubGreen2, UCHAR ubBlue2, DWORD FLG_GRADIENT, BOOL transparent, UINT32 y, UCHAR *ubAlpha);
+ UCHAR ubGreen2, UCHAR ubBlue2, uint32_t FLG_GRADIENT, BOOL transparent, UINT32 y, UCHAR *ubAlpha);
void __inline gradientHorizontal( UCHAR *ubRedFinal, UCHAR *ubGreenFinal, UCHAR *ubBlueFinal,
ULONG ulBitmapWidth, UCHAR ubRed, UCHAR ubGreen, UCHAR ubBlue, UCHAR ubRed2,
- UCHAR ubGreen2, UCHAR ubBlue2, DWORD FLG_GRADIENT, BOOL transparent, UINT32 x, UCHAR *ubAlpha);
\ No newline at end of file + UCHAR ubGreen2, UCHAR ubBlue2, uint32_t FLG_GRADIENT, BOOL transparent, UINT32 x, UCHAR *ubAlpha);
\ No newline at end of file diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp index 15843bf7c4..a56ddf0bcd 100644 --- a/plugins/Clist_nicer/src/clc.cpp +++ b/plugins/Clist_nicer/src/clc.cpp @@ -65,7 +65,7 @@ int __forceinline __strcmp(const char * src, const char * dst) static int ClcEventAdded(WPARAM hContact, LPARAM lParam)
{
- DWORD new_freq = 0;
+ uint32_t new_freq = 0;
cfg::dat.t_now = time(0);
@@ -73,8 +73,8 @@ static int ClcEventAdded(WPARAM hContact, LPARAM lParam) DBEVENTINFO dbei = {};
db_event_get(lParam, &dbei);
if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & DBEF_SENT)) {
- DWORD firstTime = g_plugin.getDword(hContact, "mf_firstEvent");
- DWORD count = g_plugin.getDword(hContact, "mf_count");
+ uint32_t firstTime = g_plugin.getDword(hContact, "mf_firstEvent");
+ uint32_t count = g_plugin.getDword(hContact, "mf_count");
count++;
new_freq = count ? (dbei.timestamp - firstTime) / count : 0x7fffffff;
g_plugin.setDword(hContact, "mf_freq", new_freq);
@@ -337,7 +337,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L }
else {
// item in list already
- DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
+ uint32_t style = GetWindowLongPtr(hwnd, GWL_STYLE);
if (contact->iImage == (uint16_t)lParam)
break;
if (!shouldShow && !(style & CLS_NOHIDEOFFLINE) && (style & CLS_HIDEOFFLINE || group->hideOffline || cfg::dat.bFilterEffective)) { // CLVM changed
@@ -440,7 +440,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L if (cEntry == nullptr)
contact->cFlags &= ~ECF_AVATAR;
else {
- DWORD dwFlags;
+ uint32_t dwFlags;
if (contact->pExtra)
dwFlags = contact->pExtra->dwDFlags;
@@ -613,7 +613,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L KillTimer(hwnd, TIMERID_RENAME);
KillTimer(hwnd, TIMERID_INFOTIP);
- DWORD hitFlags;
+ uint32_t hitFlags;
dat->selection = HitTest(hwnd, dat, (short)LOWORD(lParam), (short)HIWORD(lParam), &contact, nullptr, &hitFlags);
if (hitFlags & CLCHT_ONITEMEXTRA)
break;
diff --git a/plugins/Clist_nicer/src/clc.h b/plugins/Clist_nicer/src/clc.h index aa2bba2455..6747ace72b 100644 --- a/plugins/Clist_nicer/src/clc.h +++ b/plugins/Clist_nicer/src/clc.h @@ -109,11 +109,11 @@ struct TExtraCache uint8_t valid;
wchar_t *statusMsg;
uint8_t bStatusMsgValid;
- DWORD dwCFlags;
- DWORD dwDFlags; // display flags for caching only
+ uint32_t dwCFlags;
+ uint32_t dwDFlags; // display flags for caching only
StatusItems_t *status_item, *proto_status_item;
- DWORD dwLastMsgTime;
- DWORD msgFrequency;
+ uint32_t dwLastMsgTime;
+ uint32_t msgFrequency;
BOOL isChatRoom;
};
@@ -127,11 +127,11 @@ struct ClcContact : public ClcContactBase int xStatusIcon;
MCONTACT hSubContact;
char *metaProto;
- DWORD codePage;
+ uint32_t codePage;
uint16_t wStatus;
int avatarLeft, extraIconRightBegin;
int isRtl;
- DWORD cFlags;
+ uint32_t cFlags;
uint8_t bSecondLine;
AVATARCACHEENTRY *ace;
@@ -172,8 +172,8 @@ struct ClcData : public ClcDataBase uint8_t SelectMode;
uint8_t isMultiSelect;
HWND hwndParent;
- DWORD lastSort;
- DWORD lastRepaint;
+ uint32_t lastSort;
+ uint32_t lastRepaint;
int oldSelection;
bool bNeedPaint, bisEmbedded, bHideSubcontacts, bForceScroll;
@@ -222,27 +222,27 @@ struct ClcData : public ClcDataBase #define CLC_GROUPALIGN_AUTO 2
struct TCluiData {
- DWORD dwFlags;
- DWORD topOffset, bottomOffset;
+ uint32_t dwFlags;
+ uint32_t topOffset, bottomOffset;
int statusBarHeight;
int soundsOff;
uint8_t bAvatarServiceAvail;
HICON hIconConnecting;
- DWORD winFlags;
- DWORD winFlagsEx;
+ uint32_t winFlags;
+ uint32_t winFlagsEx;
int notifyActive;
int hIconNotify;
HMENU hMenuNotify;
int iLastEventAdded;
int wNextMenuID;
MCONTACT hUpdateContact;
- DWORD sortTimer;
+ uint32_t sortTimer;
BOOL forceResize;
BOOL neeedSnap;
COLORREF avatarBorder;
HBRUSH hBrushAvatarBorder, hBrushColorKey;
HBRUSH hBrushCLCBk;
- DWORD avatarRadius;
+ uint32_t avatarRadius;
int avatarSize;
BOOL bForceRefetchOnPaint;
uint8_t dualRowMode;
@@ -271,7 +271,7 @@ struct TCluiData { BOOL bDblClkAvatars;
BOOL bApplyIndentToBg;
BOOL bEqualSections;
- DWORD bFilterEffective;
+ uint32_t bFilterEffective;
BOOL bCenterStatusIcons;
BOOL bSkinnedToolbar;
BOOL bSkinnedStatusBar;
@@ -281,12 +281,12 @@ struct TCluiData { wchar_t groupFilter[2048];
char protoFilter[2048];
char varFilter[2048];
- DWORD lastMsgFilter;
+ uint32_t lastMsgFilter;
char current_viewmode[256], old_viewmode[256];
uint8_t boldHideOffline;
- DWORD statusMaskFilter;
- DWORD stickyMaskFilter;
- DWORD filterFlags;
+ uint32_t statusMaskFilter;
+ uint32_t stickyMaskFilter;
+ uint32_t filterFlags;
COLORREF colorkey;
BOOL bMetaEnabled;
BOOL bSecIMAvail;
@@ -307,10 +307,10 @@ struct TCluiData { uint8_t sortOrder[3];
uint8_t bGroupAlign;
uint8_t bSkinnedScrollbar;
- DWORD langPackCP;
+ uint32_t langPackCP;
BOOL fOnDesktop;
int group_padding;
- DWORD t_now;
+ uint32_t t_now;
BOOL realTimeSaving;
wchar_t tszProfilePath[MAX_PATH];
FILETIME ft;
@@ -369,7 +369,7 @@ struct protoMenu // clcitems.c
void RebuildEntireList(HWND hwnd, struct ClcData *dat);
-DWORD INTSORT_GetLastMsgTime(MCONTACT hContact);
+uint32_t INTSORT_GetLastMsgTime(MCONTACT hContact);
// clcmsgs.c
LRESULT ProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPARAM wParam, LPARAM lParam);
@@ -377,7 +377,7 @@ LRESULT ProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPARAM // clcutils.c
void SetGroupExpand(HWND hwnd, struct ClcData *dat, ClcGroup *group, int newState);
void BeginRenameSelection(HWND hwnd, struct ClcData *dat);
-int HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, DWORD *flags);
+int HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, uint32_t *flags);
void ScrollTo(HWND hwnd, struct ClcData *dat, int desty, int noSmooth);
void RecalcScrollBar(HWND hwnd, struct ClcData *dat);
size_t MY_pathToRelative(const wchar_t *pSrc, wchar_t *pOut);
@@ -389,7 +389,7 @@ uint8_t GetCachedStatusMsg(TExtraCache* p, char *szProto); void GetExtendedInfo(ClcContact *contact, struct ClcData *dat);
LRESULT CALLBACK NewStatusBarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
void HideShowNotifyFrame();
-DWORD GetCLUIWindowStyle(uint8_t style);
+uint32_t GetCLUIWindowStyle(uint8_t style);
void ApplyCLUIBorderStyle();
int FrameNCCalcSize(HWND hwnd, WNDPROC oldWndProc, WPARAM wParam, LPARAM lParam, BOOL hasTitleBar);
@@ -419,7 +419,7 @@ HWND ClcGetButtonWindow(int ctrlid); // clcpaint.c
void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT *rcPaint);
-void __inline PaintItem(HDC hdcMem, ClcGroup *group, ClcContact *contact, int indent, int y, struct ClcData *dat, int index, HWND hwnd, DWORD style, RECT *clRect, BOOL *bFirstNGdrawn, int groupCountsFontTopShift, int rowHeight);
+void __inline PaintItem(HDC hdcMem, ClcGroup *group, ClcContact *contact, int indent, int y, struct ClcData *dat, int index, HWND hwnd, uint32_t style, RECT *clRect, BOOL *bFirstNGdrawn, int groupCountsFontTopShift, int rowHeight);
void Reload3dBevelColors();
void ReloadThemedOptions();
void SetButtonToSkinned();
diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp index 64df6d5f09..1ce5366940 100644 --- a/plugins/Clist_nicer/src/clcitems.cpp +++ b/plugins/Clist_nicer/src/clcitems.cpp @@ -35,7 +35,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. static void TZ_LoadTimeZone(MCONTACT hContact, struct TExtraCache *c)
{
- DWORD flags = 0;
+ uint32_t flags = 0;
if (cfg::dat.bShowLocalTimeSelective)
flags |= TZF_DIFONLY;
c->hTimeZone = TimeZone_CreateByContact(hContact, nullptr, flags);
@@ -59,7 +59,7 @@ ClcContact* AddInfoItemToGroup(ClcGroup *group, int flags, const wchar_t *pszTex return p;
}
-ClcGroup *AddGroup(HWND hwnd, struct ClcData *dat, const wchar_t *szName, DWORD flags, int groupId, int calcTotalMembers)
+ClcGroup *AddGroup(HWND hwnd, struct ClcData *dat, const wchar_t *szName, uint32_t flags, int groupId, int calcTotalMembers)
{
ClcGroup *p = coreCli.pfnAddGroup(hwnd, dat, szName, flags, groupId, calcTotalMembers);
if (p && p->parent)
@@ -70,7 +70,7 @@ ClcGroup *AddGroup(HWND hwnd, struct ClcData *dat, const wchar_t *szName, DWORD void LoadAvatarForContact(ClcContact *p)
{
- DWORD dwFlags;
+ uint32_t dwFlags;
if (p->pExtra)
dwFlags = p->pExtra->dwDFlags;
@@ -348,10 +348,10 @@ void LoadSkinItemToCache(TExtraCache *cEntry) cEntry->status_item->COLOR2 = db_get_dw(hContact, "EXTBK", "COLOR2", RGB(224, 224, 224));
cEntry->status_item->ALPHA = (uint8_t)db_get_b(hContact, "EXTBK", "ALPHA", 100);
- cEntry->status_item->MARGIN_LEFT = (DWORD)db_get_b(hContact, "EXTBK", "LEFT", 0);
- cEntry->status_item->MARGIN_RIGHT = (DWORD)db_get_b(hContact, "EXTBK", "RIGHT", 0);
- cEntry->status_item->MARGIN_TOP = (DWORD)db_get_b(hContact, "EXTBK", "TOP", 0);
- cEntry->status_item->MARGIN_BOTTOM = (DWORD)db_get_b(hContact, "EXTBK", "BOTTOM", 0);
+ cEntry->status_item->MARGIN_LEFT = (uint32_t)db_get_b(hContact, "EXTBK", "LEFT", 0);
+ cEntry->status_item->MARGIN_RIGHT = (uint32_t)db_get_b(hContact, "EXTBK", "RIGHT", 0);
+ cEntry->status_item->MARGIN_TOP = (uint32_t)db_get_b(hContact, "EXTBK", "TOP", 0);
+ cEntry->status_item->MARGIN_BOTTOM = (uint32_t)db_get_b(hContact, "EXTBK", "BOTTOM", 0);
cEntry->status_item->COLOR2_TRANSPARENT = (uint8_t)db_get_b(hContact, "EXTBK", "TRANS", 1);
cEntry->status_item->BORDERSTYLE = db_get_dw(hContact, "EXTBK", "BDR", 0);
@@ -386,7 +386,7 @@ int CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, struct ClcData szProto = Proto_GetBaseAccountName(hContact);
// check stickies first (priority), only if we really have stickies defined (CLVM_STICKY_CONTACTS is set).
if (cfg::dat.bFilterEffective & CLVM_STICKY_CONTACTS) {
- DWORD dwLocalMask = db_get_dw(hContact, "CLVM", cfg::dat.current_viewmode, 0);
+ uint32_t dwLocalMask = db_get_dw(hContact, "CLVM", cfg::dat.current_viewmode, 0);
if (dwLocalMask != 0) {
if (cfg::dat.bFilterEffective & CLVM_FILTER_STICKYSTATUS) {
uint16_t wStatus = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
@@ -426,7 +426,7 @@ int CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, struct ClcData if (cfg::dat.bFilterEffective & CLVM_FILTER_LASTMSG) {
TExtraCache *p = cfg::getCache(hContact, szProto);
if (p) {
- DWORD now = cfg::dat.t_now;
+ uint32_t now = cfg::dat.t_now;
now -= cfg::dat.lastMsgFilter;
if (cfg::dat.bFilterEffective & CLVM_FILTER_LASTMSG_OLDERTHAN)
filterResult = filterResult & (p->dwLastMsgTime < now);
diff --git a/plugins/Clist_nicer/src/clcopts.cpp b/plugins/Clist_nicer/src/clcopts.cpp index 3d92dbf738..d1d499e181 100644 --- a/plugins/Clist_nicer/src/clcopts.cpp +++ b/plugins/Clist_nicer/src/clcopts.cpp @@ -31,7 +31,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define DBFONTF_ITALIC 2
#define DBFONTF_UNDERLINE 4
-void cfgSetFlag(HWND hwndDlg, int ctrlId, DWORD dwMask)
+void cfgSetFlag(HWND hwndDlg, int ctrlId, uint32_t dwMask)
{
if (IsDlgButtonChecked(hwndDlg, ctrlId))
cfg::dat.dwFlags |= dwMask;
@@ -132,7 +132,7 @@ public: struct CheckBoxToGroupStyleEx_t
{
int id;
- DWORD flag;
+ uint32_t flag;
int not_t;
}
static const checkBoxToGroupStyleEx[] =
@@ -159,7 +159,7 @@ public: SendDlgItemMessage(m_hwnd, IDC_GROUPALIGN, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Always right"));
SendDlgItemMessage(m_hwnd, IDC_GROUPALIGN, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Automatic (RTL)"));
- DWORD exStyle = db_get_dw(0, "CLC", "ExStyle", Clist_GetDefaultExStyle());
+ uint32_t exStyle = db_get_dw(0, "CLC", "ExStyle", Clist_GetDefaultExStyle());
for (auto &it : checkBoxToGroupStyleEx)
CheckDlgButton(m_hwnd, it.id, (exStyle & it.flag) ^ (it.flag * it.not_t) ? BST_CHECKED : BST_UNCHECKED);
@@ -186,7 +186,7 @@ public: bool OnApply() override
{
- DWORD exStyle = db_get_dw(0, "CLC", "ExStyle", Clist_GetDefaultExStyle());
+ uint32_t exStyle = db_get_dw(0, "CLC", "ExStyle", Clist_GetDefaultExStyle());
for (auto &it : checkBoxToGroupStyleEx) {
if ((IsDlgButtonChecked(m_hwnd, it.id) == 0) == it.not_t)
diff --git a/plugins/Clist_nicer/src/clcpaint.cpp b/plugins/Clist_nicer/src/clcpaint.cpp index 0939582f85..d4f41ff3eb 100644 --- a/plugins/Clist_nicer/src/clcpaint.cpp +++ b/plugins/Clist_nicer/src/clcpaint.cpp @@ -182,19 +182,19 @@ HDC hdcAV; LONG g_maxAV_X = 200, g_maxAV_Y = 200;
-static int __fastcall DrawAvatar(HDC hdcMem, RECT *rc, ClcContact *contact, int y, struct ClcData *dat, uint16_t cstatus, int rowHeight, DWORD dwFlags)
+static int __fastcall DrawAvatar(HDC hdcMem, RECT *rc, ClcContact *contact, int y, struct ClcData *dat, uint16_t cstatus, int rowHeight, uint32_t dwFlags)
{
float dScale = 0.;
float newHeight, newWidth;
HDC hdcAvatar = hdcAV;
//HBITMAP hbmMem;
- DWORD topoffset = 0, leftoffset = 0;
+ uint32_t topoffset = 0, leftoffset = 0;
LONG bmWidth, bmHeight;
float dAspect;
HBITMAP hbm, hbmOldAV;
HRGN rgn = nullptr;
int avatar_size = cfg::dat.avatarSize;
- DWORD av_saved_left;
+ uint32_t av_saved_left;
StatusItems_t *item = contact->wStatus == ID_STATUS_OFFLINE ? arStatusItems[ID_EXTBKAVATARFRAMEOFFLINE - ID_STATUS_OFFLINE] : arStatusItems[ID_EXTBKAVATARFRAME - ID_STATUS_OFFLINE];
int skinMarginX, skinMarginY;
BOOL fOverlay = (cfg::dat.dwFlags & CLUI_FRAME_OVERLAYICONS);
@@ -345,23 +345,23 @@ static BOOL mirror_rtl, mirror_always, mirror_rtltext; uint8_t savedCORNER = -1;
int g_padding_y = 0;
-void __inline PaintItem(HDC hdcMem, ClcGroup *group, ClcContact *contact, int indent, int y, struct ClcData *dat, int index, HWND hwnd, DWORD style, RECT *clRect, BOOL *bFirstNGdrawn, int groupCountsFontTopShift, int rowHeight)
+void __inline PaintItem(HDC hdcMem, ClcGroup *group, ClcContact *contact, int indent, int y, struct ClcData *dat, int index, HWND hwnd, uint32_t style, RECT *clRect, BOOL *bFirstNGdrawn, int groupCountsFontTopShift, int rowHeight)
{
SIZE textSize = { 0 }, countsSize = { 0 }, spaceSize = { 0 };
int fontHeight;
BOOL twoRows = FALSE;
- DWORD leftOffset = 0, rightOffset = 0;
+ uint32_t leftOffset = 0, rightOffset = 0;
int iconXSpace = dat->iconXSpace;
//BOOL xStatusValid = 0;
HFONT hPreviousFont = nullptr;
COLORREF oldGroupColor = -1;
- DWORD qLeft = 0;
+ uint32_t qLeft = 0;
int leftX = dat->leftMargin + indent * dat->groupIndent;
int bg_indent_r = 0;
int bg_indent_l = 0;
int rightIcons = 0;
- DWORD dt_nickflags = 0, dt_2ndrowflags = 0;
- DWORD dwFlags = cfg::dat.dwFlags;
+ uint32_t dt_nickflags = 0, dt_2ndrowflags = 0;
+ uint32_t dwFlags = cfg::dat.dwFlags;
BOOL check_selected, fLocalTime;
rowHeight -= cfg::dat.bRowSpacing;
@@ -1028,8 +1028,8 @@ bgskipped: DrawText(hdcMem, szText, -1, &rcContent, DT_EDITCONTROL | DT_NOPREFIX | DT_NOCLIP | DT_WORD_ELLIPSIS | DT_SINGLELINE | dt_nickflags);
else {
int statusFontHeight;
- DWORD dtFlags = DT_WORD_ELLIPSIS | DT_NOPREFIX | DT_NOCLIP | DT_SINGLELINE;
- DWORD saved_right = rcContent.right;
+ uint32_t dtFlags = DT_WORD_ELLIPSIS | DT_NOPREFIX | DT_NOCLIP | DT_SINGLELINE;
+ uint32_t saved_right = rcContent.right;
BOOL verticalfit = FALSE;
rcContent.top = y + cfg::dat.avatarPadding / 2;
@@ -1134,7 +1134,7 @@ bgskipped: ULONG textCounter = 0;
size_t ulLen = mir_wstrlen(szText);
LONG old_bottom = rcContent.bottom;
- DWORD i_dtFlags = DT_WORDBREAK | DT_NOPREFIX | dt_2ndrowflags;
+ uint32_t i_dtFlags = DT_WORDBREAK | DT_NOPREFIX | dt_2ndrowflags;
dtp.cbSize = sizeof(dtp);
rcContent.right = clRect->right - dat->rightMargin - rightOffset;
do {
@@ -1197,7 +1197,7 @@ void SkinDrawBg(HWND hwnd, HDC hdc) void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT *rcPaint)
{
RECT clRect;
- DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
+ uint32_t style = GetWindowLongPtr(hwnd, GWL_STYLE);
int grey = 0;
BOOL bFirstNGdrawn = FALSE;
int line_num = -1;
diff --git a/plugins/Clist_nicer/src/clcutils.cpp b/plugins/Clist_nicer/src/clcutils.cpp index 7eac040108..821f370a19 100644 --- a/plugins/Clist_nicer/src/clcutils.cpp +++ b/plugins/Clist_nicer/src/clcutils.cpp @@ -102,11 +102,11 @@ size_t MY_pathToAbsolute(const wchar_t *pSrc, wchar_t *pOut) * shares all the init stuff with HitTest()
*/
-int RTL_HitTest(HWND hwnd, struct ClcData *dat, int testx, ClcContact *hitcontact, DWORD *flags, int indent, int hit)
+int RTL_HitTest(HWND hwnd, struct ClcData *dat, int testx, ClcContact *hitcontact, uint32_t *flags, int indent, int hit)
{
RECT clRect;
int right, checkboxWidth, width;
- DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
+ uint32_t style = GetWindowLongPtr(hwnd, GWL_STYLE);
SIZE textSize;
HDC hdc;
HFONT hFont;
@@ -194,7 +194,7 @@ int RTL_HitTest(HWND hwnd, struct ClcData *dat, int testx, ClcContact *hitcontac return -1;
}
-int HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, DWORD *flags)
+int HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, uint32_t *flags)
{
ClcContact *hitcontact = nullptr;
ClcGroup *hitgroup = nullptr;
@@ -203,7 +203,7 @@ int HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact **c SIZE textSize;
RECT clRect;
HFONT hFont;
- DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
+ uint32_t style = GetWindowLongPtr(hwnd, GWL_STYLE);
uint8_t mirror_mode = cfg::dat.bUseDCMirroring;
if (flags)
@@ -337,7 +337,7 @@ int HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact **c void ScrollTo(HWND hwnd, struct ClcData *dat, int desty, int noSmooth)
{
- DWORD startTick, nowTick;
+ uint32_t startTick, nowTick;
int oldy = dat->yScroll;
RECT clRect, rcInvalidate;
diff --git a/plugins/Clist_nicer/src/clistopts.cpp b/plugins/Clist_nicer/src/clistopts.cpp index 2dca2ce3c9..b050f9f3a3 100644 --- a/plugins/Clist_nicer/src/clistopts.cpp +++ b/plugins/Clist_nicer/src/clistopts.cpp @@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. void AddToTaskBar(HWND hWnd);
-void cfgSetFlag(HWND hwndDlg, int ctrlId, DWORD dwMask);
+void cfgSetFlag(HWND hwndDlg, int ctrlId, uint32_t dwMask);
extern COLORREF g_CLUISkinnedBkColorRGB;
@@ -141,7 +141,7 @@ public: struct CheckBoxToStyleEx_t
{
int id;
- DWORD flag;
+ uint32_t flag;
int not_t;
}
static const checkBoxToStyleEx[] = {
@@ -156,7 +156,7 @@ static const checkBoxToStyleEx[] = { struct CheckBoxValues_t
{
- DWORD style;
+ uint32_t style;
wchar_t *szDescr;
}
static const greyoutValues[] = {
@@ -191,7 +191,7 @@ public: {
SetWindowLongPtr(greyOut.GetHwnd(), GWL_STYLE, GetWindowLongPtr(greyOut.GetHwnd(), 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());
UDACCEL accel[2] = { { 0, 10 }, { 2, 50 } };
SendDlgItemMessage(m_hwnd, IDC_SMOOTHTIMESPIN, UDM_SETRANGE, 0, MAKELONG(999, 0));
SendDlgItemMessage(m_hwnd, IDC_SMOOTHTIMESPIN, UDM_SETACCEL, _countof(accel), (LPARAM)&accel);
@@ -205,7 +205,7 @@ public: chkGreyOut.SetState(db_get_dw(0, "CLC", "GreyoutFlags", CLCDEFAULT_GREYOUTFLAGS));
- DWORD style = db_get_dw(0, "CLC", "FullGreyoutFlags", CLCDEFAULT_FULLGREYOUTFLAGS);
+ uint32_t style = db_get_dw(0, "CLC", "FullGreyoutFlags", CLCDEFAULT_FULLGREYOUTFLAGS);
TVINSERTSTRUCT tvis;
tvis.hParent = nullptr;
tvis.hInsertAfter = TVI_LAST;
@@ -224,7 +224,7 @@ public: bool OnApply() override
{
- DWORD exStyle = db_get_dw(0, "CLC", "ExStyle", CLCDEFAULT_EXSTYLE);
+ uint32_t exStyle = db_get_dw(0, "CLC", "ExStyle", CLCDEFAULT_EXSTYLE);
for (auto &it : checkBoxToStyleEx)
exStyle &= ~(it.flag);
@@ -235,7 +235,7 @@ public: db_set_dw(0, "CLC", "ExStyle", exStyle);
- DWORD fullGreyoutFlags = 0;
+ uint32_t fullGreyoutFlags = 0;
TVITEMEX tvi;
tvi.mask = TVIF_HANDLE | TVIF_PARAM | TVIF_STATE;
tvi.hItem = greyOut.GetRoot();
@@ -476,7 +476,7 @@ public: SetLayeredWindowAttributes(g_clistApi.hwndContactList,
(COLORREF)(cfg::dat.bFullTransparent ? cfg::dat.colorkey : 0),
(uint8_t)(cfg::dat.isTransparent ? cfg::dat.autoalpha : 255),
- (DWORD)((cfg::dat.isTransparent ? LWA_ALPHA : 0L) | (cfg::dat.bFullTransparent ? LWA_COLORKEY : 0L)));
+ (uint32_t)((cfg::dat.isTransparent ? LWA_ALPHA : 0L) | (cfg::dat.bFullTransparent ? LWA_COLORKEY : 0L)));
}
else {
SetLayeredWindowAttributes(g_clistApi.hwndContactList, RGB(0, 0, 0), (uint8_t)255, LWA_ALPHA);
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index 93f9bcb289..a1e9078d56 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -203,7 +203,7 @@ static int CreateCLC() CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS, MAKEWPARAM(FO_TBTIPNAME | FO_UNICODETEXT, hFrameContactTree), (LPARAM)TranslateT("My contacts")); // ugly, but working hack. Prevent that annoying little scroll bar from appearing in the "My Contacts" title bar - DWORD flags = (DWORD)CallService(MS_CLIST_FRAMES_GETFRAMEOPTIONS, MAKEWPARAM(FO_FLAGS, hFrameContactTree), 0); + uint32_t flags = (uint32_t)CallService(MS_CLIST_FRAMES_GETFRAMEOPTIONS, MAKEWPARAM(FO_FLAGS, hFrameContactTree), 0); flags |= F_VISIBLE; CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS, MAKEWPARAM(FO_FLAGS, hFrameContactTree), flags); } @@ -301,7 +301,7 @@ void CLN_LoadAllIcons(BOOL mode) void ConfigureEventArea() { int iCount = GetMenuItemCount(cfg::dat.hMenuNotify); - DWORD dwFlags = cfg::dat.dwFlags; + uint32_t dwFlags = cfg::dat.dwFlags; int oldstate = cfg::dat.notifyActive; int dwVisible = CallService(MS_CLIST_FRAMES_GETFRAMEOPTIONS, MAKEWPARAM(FO_FLAGS, hNotifyFrame), 0) & F_VISIBLE; @@ -338,7 +338,7 @@ void IcoLibReloadIcons() void ConfigureCLUIGeometry(int mode) { RECT rcStatus; - DWORD clmargins = db_get_dw(0, "CLUI", "clmargins", 0); + uint32_t clmargins = db_get_dw(0, "CLUI", "clmargins", 0); cfg::dat.bCLeft = LOBYTE(LOWORD(clmargins)); cfg::dat.bCRight = HIBYTE(LOWORD(clmargins)); @@ -423,8 +423,8 @@ void SetDBButtonStates(MCONTACT hPassedContact) break; } case DBVT_DWORD: - DWORD val = db_get_dw(hFinalContact, szModule, szSetting, 0); - result = (val == *((DWORD *)&buttonItem->bValuePush)); + uint32_t val = db_get_dw(hFinalContact, szModule, szSetting, 0); + result = (val == *((uint32_t *)&buttonItem->bValuePush)); break; } } @@ -687,7 +687,7 @@ int CustomDrawScrollBars(NMCSBCUSTOMDRAW *nmcsbcd) DrawAlpha(hdcScroll, &nmcsbcd->rect, item->COLOR, alpha, item->COLOR2, item->COLOR2_TRANSPARENT, item->GRADIENT, item->CORNER, item->BORDERSTYLE, item->imageItem); } - DWORD dfcFlags = DFCS_FLAT | (nmcsbcd->uState == CDIS_DISABLED ? DFCS_INACTIVE : + uint32_t dfcFlags = DFCS_FLAT | (nmcsbcd->uState == CDIS_DISABLED ? DFCS_INACTIVE : (nmcsbcd->uState == CDIS_HOT ? DFCS_HOT : (nmcsbcd->uState == CDIS_SELECTED ? DFCS_PUSHED : 0))); if (nmcsbcd->uItem == HTSCROLL_UP) @@ -1101,7 +1101,7 @@ skipbg: GetWindowRect(hwnd, &rc); if (!Docking_IsDocked(0, 0)) { - cluiPos.bottom = (DWORD)(rc.bottom - rc.top); + cluiPos.bottom = (uint32_t)(rc.bottom - rc.top); cluiPos.left = rc.left; cluiPos.top = rc.top; } @@ -1111,11 +1111,11 @@ skipbg: // if docked, dont remember pos (except for width) if (!Clist_IsDocked()) { - g_plugin.setDword("Height", (DWORD)(rc.bottom - rc.top)); - g_plugin.setDword("x", (DWORD)rc.left); - g_plugin.setDword("y", (DWORD)rc.top); + g_plugin.setDword("Height", (uint32_t)(rc.bottom - rc.top)); + g_plugin.setDword("x", (uint32_t)rc.left); + g_plugin.setDword("y", (uint32_t)rc.top); } - g_plugin.setDword("Width", (DWORD)(rc.right - rc.left)); + g_plugin.setDword("Width", (uint32_t)(rc.right - rc.left)); } } return TRUE; @@ -1237,7 +1237,7 @@ skipbg: case WM_SHOWWINDOW: { static int noRecurse = 0; - DWORD thisTick, startTick; + uint32_t thisTick, startTick; int sourceAlpha, destAlpha; if (cfg::dat.forceResize && wParam != SW_HIDE) { @@ -1314,7 +1314,7 @@ skipbg: case WM_COMMAND: { - DWORD dwOldFlags = cfg::dat.dwFlags; + uint32_t dwOldFlags = cfg::dat.dwFlags; if (HIWORD(wParam) == BN_CLICKED && lParam != 0) { if (LOWORD(wParam) == IDC_TBFIRSTUID - 1) break; @@ -1333,7 +1333,7 @@ skipbg: hContact = contact->hContact; } while (item) { - if (item->uId == (DWORD)LOWORD(wParam)) { + if (item->uId == (uint32_t)LOWORD(wParam)) { int contactOK = ServiceParamsOK(item, &wwParam, &llParam, hContact); if (item->dwFlags & BUTTON_ISSERVICE) { @@ -1390,7 +1390,7 @@ skipbg: db_set_w(finalhContact, szModule, szSetting, *((uint16_t *)&pValue[0])); break; case DBVT_DWORD: - db_set_dw(finalhContact, szModule, szSetting, *((DWORD *)&pValue[0])); + db_set_dw(finalhContact, szModule, szSetting, *((uint32_t *)&pValue[0])); break; case DBVT_ASCIIZ: db_set_s(finalhContact, szModule, szSetting, (char *)pValue); @@ -1553,7 +1553,7 @@ buttons_done: case NM_CLICK: { NMCLISTCONTROL *nm = (NMCLISTCONTROL *)lParam; - DWORD hitFlags; + uint32_t hitFlags; SendMessage(g_clistApi.hwndContactTree, CLM_HITTEST, (WPARAM)&hitFlags, MAKELPARAM(nm->pt.x, nm->pt.y)); if ((hitFlags & (CLCHT_NOWHERE | CLCHT_INLEFTMARGIN | CLCHT_BELOWITEMS)) == 0) break; diff --git a/plugins/Clist_nicer/src/cluiframes.cpp b/plugins/Clist_nicer/src/cluiframes.cpp index daaa90863d..d30798d556 100644 --- a/plugins/Clist_nicer/src/cluiframes.cpp +++ b/plugins/Clist_nicer/src/cluiframes.cpp @@ -1426,7 +1426,7 @@ int FrameNCCalcSize(HWND hwnd, WNDPROC oldWndProc, WPARAM wParam, LPARAM lParam, StatusItems_t *item = (arStatusItems.getCount() != 0) ? (hasTitleBar ? arStatusItems[ID_EXTBKOWNEDFRAMEBORDERTB - ID_STATUS_OFFLINE] : arStatusItems[ID_EXTBKOWNEDFRAMEBORDER - ID_STATUS_OFFLINE]) : nullptr; LRESULT orig = oldWndProc ? CallWindowProc(oldWndProc, hwnd, WM_NCCALCSIZE, wParam, lParam) : 0; NCCALCSIZE_PARAMS *nccp = (NCCALCSIZE_PARAMS *)lParam; - DWORD dwStyle = GetWindowLongPtr(hwnd, GWL_STYLE); + uint32_t dwStyle = GetWindowLongPtr(hwnd, GWL_STYLE); if (item == nullptr) return orig; diff --git a/plugins/Clist_nicer/src/cluiopts.cpp b/plugins/Clist_nicer/src/cluiopts.cpp index 81a44aef40..2b8ab0bf0c 100644 --- a/plugins/Clist_nicer/src/cluiopts.cpp +++ b/plugins/Clist_nicer/src/cluiopts.cpp @@ -24,9 +24,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
-DWORD GetCLUIWindowStyle(uint8_t style)
+uint32_t GetCLUIWindowStyle(uint8_t style)
{
- DWORD dwBasic = WS_CLIPCHILDREN;
+ uint32_t dwBasic = WS_CLIPCHILDREN;
if (style == SETTING_WINDOWSTYLE_THINBORDER)
return dwBasic | WS_BORDER;
diff --git a/plugins/Clist_nicer/src/contact.cpp b/plugins/Clist_nicer/src/contact.cpp index 209fa4f2d6..a18324e11c 100644 --- a/plugins/Clist_nicer/src/contact.cpp +++ b/plugins/Clist_nicer/src/contact.cpp @@ -62,10 +62,10 @@ int __forceinline GetStatusModeOrdering(int statusMode) int mf_updatethread_running = TRUE;
HANDLE hThreadMFUpdate = nullptr;
-static void MF_CalcFrequency(MCONTACT hContact, DWORD dwCutoffDays, int doSleep)
+static void MF_CalcFrequency(MCONTACT hContact, uint32_t dwCutoffDays, int doSleep)
{
- DWORD curTime = time(0);
- DWORD frequency, eventCount = 0;
+ uint32_t curTime = time(0);
+ uint32_t frequency, eventCount = 0;
DBEVENTINFO dbei = {};
DB::ECPTR cursor(DB::EventsRev(hContact));
@@ -133,7 +133,7 @@ void MF_InitCheck(void) }
}
-DWORD INTSORT_GetLastMsgTime(MCONTACT hContact)
+uint32_t INTSORT_GetLastMsgTime(MCONTACT hContact)
{
DB::ECPTR cursor(DB::EventsRev(hContact));
while (MEVENT hDbEvent = cursor.FetchNext()) {
@@ -206,8 +206,8 @@ int __forceinline INTSORT_CompareContacts(const ClcContact* c1, const ClcContact if (c1->pExtra && c2->pExtra)
return c2->pExtra->dwLastMsgTime - c1->pExtra->dwLastMsgTime;
else {
- DWORD timestamp1 = INTSORT_GetLastMsgTime(c1->hContact);
- DWORD timestamp2 = INTSORT_GetLastMsgTime(c2->hContact);
+ uint32_t timestamp1 = INTSORT_GetLastMsgTime(c1->hContact);
+ uint32_t timestamp2 = INTSORT_GetLastMsgTime(c2->hContact);
return timestamp2 - timestamp1;
}
diff --git a/plugins/Clist_nicer/src/coolsblib.cpp b/plugins/Clist_nicer/src/coolsblib.cpp index 52cdf6f0a7..d1e3d55fcc 100644 --- a/plugins/Clist_nicer/src/coolsblib.cpp +++ b/plugins/Clist_nicer/src/coolsblib.cpp @@ -111,7 +111,7 @@ static void RedrawNonClient(HWND hwnd, BOOL fFrameChanged) //
int WINAPI CoolSB_GetDefaultMinThumbSize(void)
{
- DWORD dwVersion = GetVersion();
+ uint32_t dwVersion = GetVersion();
// set the minimum thumb size for a scrollbar. This
// differs between NT4 and 2000, so need to check to see
@@ -153,7 +153,7 @@ BOOL WINAPI InitializeCoolSB(HWND hwnd) INITCOMMONCONTROLSEX ice;
TOOLINFO ti;
RECT rect;
- DWORD dwCurStyle;
+ uint32_t dwCurStyle;
//BOOL fDisabled;
if (pEnableScrollBar == nullptr)
@@ -459,7 +459,7 @@ BOOL WINAPI CoolSB_ShowScrollBar(HWND hwnd, int wBar, BOOL fShow) {
SCROLLBAR *sbar;
BOOL bFailed = FALSE;
- DWORD dwStyle = GetWindowLongPtr(hwnd, GWL_STYLE);
+ uint32_t dwStyle = GetWindowLongPtr(hwnd, GWL_STYLE);
if (!CoolSB_IsCoolScrollEnabled(hwnd))
return ShowScrollBar(hwnd, wBar, fShow);
@@ -486,7 +486,7 @@ BOOL WINAPI CoolSB_ShowScrollBar(HWND hwnd, int wBar, BOOL fShow) return FALSE;
}
else {
- //DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
+ //uint32_t style = GetWindowLongPtr(hwnd, GWL_STYLE);
//style |= WS_VSCROLL;
//if (s
diff --git a/plugins/Clist_nicer/src/coolscroll.cpp b/plugins/Clist_nicer/src/coolscroll.cpp index 9c713f9544..9c3470b128 100644 --- a/plugins/Clist_nicer/src/coolscroll.cpp +++ b/plugins/Clist_nicer/src/coolscroll.cpp @@ -94,7 +94,7 @@ LRESULT CALLBACK CoolSBWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lP //
// Provide this so there are NO dependencies on CRT
//
-static void CoolSB_ZeroMemory(void *ptr, DWORD bytes)
+static void CoolSB_ZeroMemory(void *ptr, uint32_t bytes)
{
uint8_t *bptr = (uint8_t *)ptr;
@@ -1047,7 +1047,7 @@ static LRESULT NCPaint(SCROLLWND *sw, HWND hwnd, WPARAM wParam, LPARAM lParam) HRGN clip = nullptr;
BOOL fCustomDraw = FALSE;
LRESULT ret;
- DWORD dwStyle;
+ uint32_t dwStyle;
GetWindowRect(hwnd, &winrect);
@@ -1779,7 +1779,7 @@ static LRESULT NCCalcSize(SCROLLWND *sw, HWND hwnd, WPARAM wParam, LPARAM lParam RECT oldrect;
SCROLLBAR *sb;
LRESULT ret;
- DWORD dwStyle;
+ uint32_t dwStyle;
//Regardless of the value of fCalcValidRects, the first rectangle
//in the array specified by the rgrc structure member of the
diff --git a/plugins/Clist_nicer/src/coolscroll.h b/plugins/Clist_nicer/src/coolscroll.h index a77ad2f8b8..96caf10543 100644 --- a/plugins/Clist_nicer/src/coolscroll.h +++ b/plugins/Clist_nicer/src/coolscroll.h @@ -178,7 +178,7 @@ struct SCROLLBUT struct NMCSBCUSTOMDRAW
{
NMHDR hdr;
- DWORD dwDrawStage;
+ uint32_t dwDrawStage;
HDC hdc;
RECT rect;
UINT uItem;
diff --git a/plugins/Clist_nicer/src/extBackg.cpp b/plugins/Clist_nicer/src/extBackg.cpp index 9b4e383781..974eb53c94 100644 --- a/plugins/Clist_nicer/src/extBackg.cpp +++ b/plugins/Clist_nicer/src/extBackg.cpp @@ -498,7 +498,7 @@ void extbk_export(char *file) char szSection[255];
char szKey[255];
DBVARIANT dbv = { 0 };
- DWORD data;
+ uint32_t data;
data = 3;
@@ -544,15 +544,15 @@ void extbk_export(char *file) mir_free(dbv.pszVal);
}
mir_snprintf(szKey, "Font%dSize", n);
- data = (DWORD)db_get_b(0, "CLC", szKey, 8);
+ data = (uint32_t)db_get_b(0, "CLC", szKey, 8);
WritePrivateProfileStructA(szSection, "Size", &data, 1, file);
mir_snprintf(szKey, "Font%dSty", n);
- data = (DWORD)db_get_b(0, "CLC", szKey, 8);
+ data = (uint32_t)db_get_b(0, "CLC", szKey, 8);
WritePrivateProfileStructA(szSection, "Style", &data, 1, file);
mir_snprintf(szKey, "Font%dSet", n);
- data = (DWORD)db_get_b(0, "CLC", szKey, 8);
+ data = (uint32_t)db_get_b(0, "CLC", szKey, 8);
WritePrivateProfileStructA(szSection, "Set", &data, 1, file);
mir_snprintf(szKey, "Font%dCol", n);
@@ -560,11 +560,11 @@ void extbk_export(char *file) WritePrivateProfileStructA(szSection, "Color", &data, 4, file);
mir_snprintf(szKey, "Font%dFlags", n);
- data = (DWORD)db_get_dw(0, "CLC", szKey, 8);
+ data = (uint32_t)db_get_dw(0, "CLC", szKey, 8);
WritePrivateProfileStructA(szSection, "Flags", &data, 4, file);
mir_snprintf(szKey, "Font%dAs", n);
- data = (DWORD)db_get_w(0, "CLC", szKey, 8);
+ data = (uint32_t)db_get_w(0, "CLC", szKey, 8);
WritePrivateProfileStructA(szSection, "SameAs", &data, 2, file);
}
@@ -573,13 +573,13 @@ void extbk_export(char *file) data = 0;
switch (_tagSettings[i].size) {
case 1:
- data = (DWORD)db_get_b(0, _tagSettings[i].szModule, _tagSettings[i].szSetting, (uint8_t)_tagSettings[i].defaultval);
+ data = (uint32_t)db_get_b(0, _tagSettings[i].szModule, _tagSettings[i].szSetting, (uint8_t)_tagSettings[i].defaultval);
break;
case 2:
- data = (DWORD)db_get_w(0, _tagSettings[i].szModule, _tagSettings[i].szSetting, (DWORD)_tagSettings[i].defaultval);
+ data = (uint32_t)db_get_w(0, _tagSettings[i].szModule, _tagSettings[i].szSetting, (uint32_t)_tagSettings[i].defaultval);
break;
case 4:
- data = (DWORD)db_get_dw(0, _tagSettings[i].szModule, _tagSettings[i].szSetting, (DWORD)_tagSettings[i].defaultval);
+ data = (uint32_t)db_get_dw(0, _tagSettings[i].szModule, _tagSettings[i].szSetting, (uint32_t)_tagSettings[i].defaultval);
break;
}
WritePrivateProfileStructA("Global", _tagSettings[i].szSetting, &data, _tagSettings[i].size, file);
@@ -592,7 +592,7 @@ void extbk_export(char *file) }
}
-DWORD __fastcall HexStringToLong(const char *szSource)
+uint32_t __fastcall HexStringToLong(const char *szSource)
{
char *stopped;
COLORREF clr = strtol(szSource, &stopped, 16);
@@ -604,7 +604,7 @@ DWORD __fastcall HexStringToLong(const char *szSource) static StatusItems_t default_item = {
"{--Contact--}", "", 0,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
- CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, DWORD(-1),
+ CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, uint32_t(-1),
CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT, CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT,
CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
};
@@ -616,7 +616,7 @@ static void PreMultiply(HBITMAP hBitmap, int mode) int width = bmp.bmWidth;
int height = bmp.bmHeight;
- DWORD dwLen = width * height * 4;
+ uint32_t dwLen = width * height * 4;
uint8_t *p = (uint8_t *)malloc(dwLen);
if (p == nullptr)
return;
@@ -647,7 +647,7 @@ static void CorrectBitmap32Alpha(HBITMAP hBitmap) if (bmp.bmBitsPixel != 32)
return;
- DWORD dwLen = bmp.bmWidth * bmp.bmHeight * (bmp.bmBitsPixel / 8);
+ uint32_t dwLen = bmp.bmWidth * bmp.bmHeight * (bmp.bmBitsPixel / 8);
uint8_t *p = (uint8_t*)calloc(1, dwLen);
if (p == nullptr)
return;
@@ -1137,8 +1137,8 @@ static void BTN_ReadItem(char *itemName, char *file) }
case 'd':
{
- DWORD value = (DWORD)atol(&szBuffer[1]);
- *((DWORD *)&pValue[0]) = value;
+ uint32_t value = (uint32_t)atol(&szBuffer[1]);
+ *((uint32_t *)&pValue[0]) = value;
tmpItem.type = DBVT_DWORD;
break;
}
@@ -1373,7 +1373,7 @@ void extbk_import(char *file, HWND hwndDlg) int i;
char buffer[255];
char szKey[255], szSection[255];
- DWORD data, version = 0;
+ uint32_t data, version = 0;
for (auto &p : arStatusItems) {
if (p->statusID == ID_EXTBKSEPARATOR)
diff --git a/plugins/Clist_nicer/src/init.cpp b/plugins/Clist_nicer/src/init.cpp index ecddb1bd45..b7f6a9edbb 100644 --- a/plugins/Clist_nicer/src/init.cpp +++ b/plugins/Clist_nicer/src/init.cpp @@ -47,7 +47,7 @@ int ShowHide(void); int ClcShutdown(WPARAM wParam, LPARAM lParam);
CListEvent* AddEvent(CLISTEVENT *cle);
-ClcGroup* AddGroup(HWND hwnd, struct ClcData *dat, const wchar_t *szName, DWORD flags, int groupId, int calcTotalMembers);
+ClcGroup* AddGroup(HWND hwnd, struct ClcData *dat, const wchar_t *szName, uint32_t flags, int groupId, int calcTotalMembers);
ClcContact* AddContactToGroup(struct ClcData *dat, ClcGroup *group, MCONTACT hContact);
ClcContact* AddInfoItemToGroup(ClcGroup *group, int flags, const wchar_t *pszText);
@@ -153,7 +153,7 @@ int CMPlugin::Load() cfg::dat.langPackCP = Langpack_GetDefaultCodePage();
cfg::dat.realTimeSaving = db_get_b(0, "CLUI", "save_pos_always", 0);
- DWORD sortOrder = g_plugin.getDword("SortOrder", SORTBY_NAME);
+ uint32_t sortOrder = g_plugin.getDword("SortOrder", SORTBY_NAME);
cfg::dat.sortOrder[0] = LOBYTE(LOWORD(sortOrder));
cfg::dat.sortOrder[1] = HIBYTE(LOWORD(sortOrder));
cfg::dat.sortOrder[2] = LOBYTE(HIWORD(sortOrder));
diff --git a/plugins/Clist_nicer/src/rowheight_funcs.cpp b/plugins/Clist_nicer/src/rowheight_funcs.cpp index b0d3042a33..4e7b4e5633 100644 --- a/plugins/Clist_nicer/src/rowheight_funcs.cpp +++ b/plugins/Clist_nicer/src/rowheight_funcs.cpp @@ -89,7 +89,7 @@ BOOL RowHeight::Alloc(ClcData *dat, int size) int RowHeight::getMaxRowHeight(ClcData *dat, const HWND hwnd)
{
int max_height = 0;
- DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
+ uint32_t style = GetWindowLongPtr(hwnd, GWL_STYLE);
int contact_fonts[] = { FONTID_CONTACTS, FONTID_INVIS, FONTID_OFFLINE, FONTID_NOTONLIST, FONTID_OFFINVIS };
int other_fonts[] = { FONTID_GROUPS, FONTID_GROUPCOUNTS, FONTID_DIVIDERS };
@@ -128,7 +128,7 @@ int RowHeight::getMaxRowHeight(ClcData *dat, const HWND hwnd) // Calc and store row height for all items in the list
void RowHeight::calcRowHeights(ClcData *dat, HWND hwnd)
{
- DWORD dwStyle = GetWindowLongPtr(hwnd, GWL_STYLE);
+ uint32_t dwStyle = GetWindowLongPtr(hwnd, GWL_STYLE);
// Draw lines
ClcGroup *group = &dat->list;
diff --git a/plugins/Clist_nicer/src/rowheight_funcs.h b/plugins/Clist_nicer/src/rowheight_funcs.h index 11e5d5b391..13f4a97efc 100644 --- a/plugins/Clist_nicer/src/rowheight_funcs.h +++ b/plugins/Clist_nicer/src/rowheight_funcs.h @@ -16,7 +16,7 @@ public: static int getMaxRowHeight(ClcData *dat, const HWND hwnd);
// Calc and store row height
- static int getRowHeight(ClcData *dat, ClcContact *contact, int item, DWORD style)
+ static int getRowHeight(ClcData *dat, ClcContact *contact, int item, uint32_t style)
{
if (!Alloc(dat, item + 1))
return -1;
diff --git a/plugins/Clist_nicer/src/stdafx.h b/plugins/Clist_nicer/src/stdafx.h index c0b38de014..8683abd662 100644 --- a/plugins/Clist_nicer/src/stdafx.h +++ b/plugins/Clist_nicer/src/stdafx.h @@ -93,7 +93,7 @@ typedef int (__cdecl *pfnDrawAvatar)(HDC hdcOrig, HDC hdcMem, RECT *rc, ClcCon BOOL __forceinline GetItemByStatus(int status, StatusItems_t *retitem);
-void DrawAlpha(HDC hdcwnd, PRECT rc, DWORD basecolor, int alpha, DWORD basecolor2, BOOL transparent, uint8_t FLG_GRADIENT, uint8_t FLG_CORNER, DWORD BORDERSTYLE, ImageItem *item);
+void DrawAlpha(HDC hdcwnd, PRECT rc, uint32_t basecolor, int alpha, uint32_t basecolor2, BOOL transparent, uint8_t FLG_GRADIENT, uint8_t FLG_CORNER, uint32_t BORDERSTYLE, ImageItem *item);
void CustomizeButton(HWND hWnd, bool bIsSkinned, bool bIsThemed, bool bIsFlat = false, bool bIsTTButton = false);
diff --git a/plugins/Clist_nicer/src/viewmodes.cpp b/plugins/Clist_nicer/src/viewmodes.cpp index 144a1ba011..3f3ad0864f 100644 --- a/plugins/Clist_nicer/src/viewmodes.cpp +++ b/plugins/Clist_nicer/src/viewmodes.cpp @@ -39,7 +39,7 @@ static int nullImage; static HWND hwndSelector = nullptr;
static HANDLE hInfoItem = nullptr;
static HIMAGELIST himlViewModes = nullptr;
-static DWORD sttStickyStatusMask = 0;
+static uint32_t sttStickyStatusMask = 0;
static char sttModeName[2048];
static int g_ViewModeOptDlg = FALSE;
@@ -113,7 +113,7 @@ static void ShowPage(HWND hwnd, int page) }
}
-static int UpdateClistItem(MCONTACT hContact, DWORD mask)
+static int UpdateClistItem(MCONTACT hContact, uint32_t mask)
{
for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_MAX; i++)
SendDlgItemMessage(sttClvmHwnd, IDC_CLIST, CLM_SETEXTRAIMAGE, hContact, MAKELONG(i - ID_STATUS_OFFLINE,
@@ -122,9 +122,9 @@ static int UpdateClistItem(MCONTACT hContact, DWORD mask) return 0;
}
-static DWORD GetMaskForItem(HANDLE hItem)
+static uint32_t GetMaskForItem(HANDLE hItem)
{
- DWORD dwMask = 0;
+ uint32_t dwMask = 0;
for (int i = 0; i <= ID_STATUS_MAX - ID_STATUS_OFFLINE; i++)
dwMask |= (SendDlgItemMessage(sttClvmHwnd, IDC_CLIST, CLM_GETEXTRAIMAGE, (WPARAM)hItem, i) == nullImage ? 0 : 1 << i);
@@ -138,7 +138,7 @@ static void UpdateStickies() MCONTACT hItem = (MCONTACT)SendDlgItemMessage(sttClvmHwnd, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem)
SendDlgItemMessage(sttClvmHwnd, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, db_get_b(hContact, "CLVM", sttModeName, 0) ? 1 : 0);
- DWORD localMask = HIWORD(db_get_dw(hContact, "CLVM", sttModeName, 0));
+ uint32_t localMask = HIWORD(db_get_dw(hContact, "CLVM", sttModeName, 0));
UpdateClistItem(hItem, (localMask == 0 || localMask == sttStickyStatusMask) ? sttStickyStatusMask : localMask);
}
@@ -288,7 +288,7 @@ static void SetIconsForColumn(HWND hwndList, HANDLE hItem, HANDLE hItemAll, int }
}
-void SaveViewMode(const char *name, const wchar_t *szGroupFilter, const char *szProtoFilter, DWORD statusMask, DWORD stickyStatusMask, unsigned int options,
+void SaveViewMode(const char *name, const wchar_t *szGroupFilter, const char *szProtoFilter, uint32_t statusMask, uint32_t stickyStatusMask, unsigned int options,
unsigned int stickies, unsigned int operators, unsigned int lmdat)
{
char szSetting[512];
@@ -314,8 +314,8 @@ void SaveState() {
CMStringW newGroupFilter(L"|");
CMStringA newProtoFilter("|");
- DWORD statusMask = 0;
- DWORD operators = 0;
+ uint32_t statusMask = 0;
+ uint32_t operators = 0;
if (sttClvm_curItem == -1)
return;
@@ -368,14 +368,14 @@ void SaveState() char *szModeName = (char*)malloc(iLen + 1);
if (szModeName) {
SendDlgItemMessageA(sttClvmHwnd, IDC_VIEWMODES, LB_GETTEXT, sttClvm_curItem, (LPARAM)szModeName);
- DWORD dwGlobalMask = GetMaskForItem(hInfoItem);
+ uint32_t dwGlobalMask = GetMaskForItem(hInfoItem);
unsigned int stickies = 0;
for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(sttClvmHwnd, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem) {
if (SendDlgItemMessage(sttClvmHwnd, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) {
- DWORD dwLocalMask = GetMaskForItem(hItem);
+ uint32_t dwLocalMask = GetMaskForItem(hItem);
db_set_dw(hContact, "CLVM", szModeName, MAKELONG(1, (unsigned short)dwLocalMask));
stickies++;
}
@@ -389,10 +389,10 @@ void SaveState() (IsDlgButtonChecked(sttClvmHwnd, IDC_AUTOCLEAR) ? CLVM_AUTOCLEAR : 0) |
(IsDlgButtonChecked(sttClvmHwnd, IDC_LASTMSG) ? CLVM_USELASTMSG : 0));
- DWORD options = SendDlgItemMessage(sttClvmHwnd, IDC_AUTOCLEARSPIN, UDM_GETPOS, 0, 0);
+ uint32_t options = SendDlgItemMessage(sttClvmHwnd, IDC_AUTOCLEARSPIN, UDM_GETPOS, 0, 0);
BOOL translated;
- DWORD lmdat = MAKELONG(GetDlgItemInt(sttClvmHwnd, IDC_LASTMSGVALUE, &translated, FALSE),
+ uint32_t lmdat = MAKELONG(GetDlgItemInt(sttClvmHwnd, IDC_LASTMSGVALUE, &translated, FALSE),
MAKEWORD(SendDlgItemMessage(sttClvmHwnd, IDC_LASTMESSAGEOP, CB_GETCURSEL, 0, 0),
SendDlgItemMessage(sttClvmHwnd, IDC_LASTMESSAGEUNIT, CB_GETCURSEL, 0, 0)));
@@ -410,9 +410,9 @@ void UpdateFilters() DBVARIANT dbv_pf = { 0 };
DBVARIANT dbv_gf = { 0 };
char szSetting[128];
- DWORD statusMask = 0;
- DWORD dwFlags;
- DWORD opt;
+ uint32_t statusMask = 0;
+ uint32_t dwFlags;
+ uint32_t opt;
if (sttClvm_curItem == LB_ERR)
return;
@@ -512,7 +512,7 @@ void UpdateFilters() {
int useLastMsg = dwFlags & CLVM_USELASTMSG;
- DWORD lmdat;
+ uint32_t lmdat;
uint8_t bTmp;
CheckDlgButton(sttClvmHwnd, IDC_LASTMSG, useLastMsg ? BST_CHECKED : BST_UNCHECKED);
@@ -737,7 +737,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (nm->iColumn == -1)
break;
- DWORD hitFlags;
+ uint32_t hitFlags;
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_HITTEST, (WPARAM)&hitFlags, MAKELPARAM(nm->pt.x, nm->pt.y));
if (hItem == nullptr || !(hitFlags & CLCHT_ONITEMEXTRA))
break;
@@ -1054,7 +1054,7 @@ void ApplyViewMode(const char *name) KillTimer(g_hwndViewModeFrame, TIMERID_VIEWMODEEXPIRE);
if (cfg::dat.filterFlags & CLVM_AUTOCLEAR) {
- DWORD timerexpire;
+ uint32_t timerexpire;
mir_snprintf(szSetting, "%c%s_OPT", 246, name);
timerexpire = LOWORD(db_get_dw(0, CLVM_MODULE, szSetting, 0));
strncpy(cfg::dat.old_viewmode, cfg::dat.current_viewmode, 256);
@@ -1080,7 +1080,7 @@ void ApplyViewMode(const char *name) else
cfg::dat.bFilterEffective |= CLVM_FILTER_LASTMSG_OLDERTHAN;
- DWORD unit = LOWORD(cfg::dat.lastMsgFilter);
+ uint32_t unit = LOWORD(cfg::dat.lastMsgFilter);
switch (HIBYTE(HIWORD(cfg::dat.lastMsgFilter))) {
case 0:
unit *= 60;
diff --git a/plugins/Cln_skinedit/src/main.cpp b/plugins/Cln_skinedit/src/main.cpp index fe71f00b9d..35724602c1 100644 --- a/plugins/Cln_skinedit/src/main.cpp +++ b/plugins/Cln_skinedit/src/main.cpp @@ -169,7 +169,7 @@ static void ChangeControlItems(HWND hwndDlg, int status, int except) static void FillOptionDialogByStatusItem(HWND hwndDlg, StatusItems_t *item) { char itoabuf[15]; - DWORD ret; + uint32_t ret; int index; CheckDlgButton(hwndDlg, IDC_IGNORE, (item->IGNORED) ? BST_CHECKED : BST_UNCHECKED); diff --git a/plugins/CmdLine/src/mimcmd_handlers.cpp b/plugins/CmdLine/src/mimcmd_handlers.cpp index fd85719cbe..5778aebb41 100644 --- a/plugins/CmdLine/src/mimcmd_handlers.cpp +++ b/plugins/CmdLine/src/mimcmd_handlers.cpp @@ -706,9 +706,9 @@ void HandleMessageCommand(PCommand command, TArgument *argv, int argc, PReply re dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_SENT | DBEF_UTF;
dbei.pBlob = (uint8_t*)szMessage.get();
- dbei.cbBlob = (DWORD)mir_strlen(szMessage) + 1;
+ dbei.cbBlob = (uint32_t)mir_strlen(szMessage) + 1;
dbei.szModule = ack->szModule;
- dbei.timestamp = (DWORD)time(0);
+ dbei.timestamp = (uint32_t)time(0);
db_event_add(ack->hContact, &dbei);
}
else szReply.AppendFormat(TranslateT("Message to '%s' was marked as sent but the account seems to be offline"), contact);
@@ -818,7 +818,7 @@ void HandleDatabaseCommand(PCommand command, TArgument *argv, int argc, PReply r break;
case VALUE_DWORD:
- db_set_dw(0, module, key, (*(DWORD *)value));
+ db_set_dw(0, module, key, (*(uint32_t *)value));
wrote = Translate("dword");
break;
diff --git a/plugins/Console/src/Console.cpp b/plugins/Console/src/Console.cpp index 099b0a3984..9e308f055d 100644 --- a/plugins/Console/src/Console.cpp +++ b/plugins/Console/src/Console.cpp @@ -98,10 +98,10 @@ static int gSingleMode = 0; static int gLimit = 0;
static int gSeparator = 0;
-static DWORD gWrapLen = DEFAULT_WRAPLEN;
+static uint32_t gWrapLen = DEFAULT_WRAPLEN;
-static DWORD OutMsgs = 0;
-static DWORD InMsgs = 0;
+static uint32_t OutMsgs = 0;
+static uint32_t InMsgs = 0;
static HICON hIcons[15] = {};
static HGENMENU hMenu = nullptr;
@@ -371,8 +371,8 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LP LVITEM lvi = { 0 };
int last = 0x7fffffff;
wchar_t szBreak;
- DWORD len, tmplen;
- DWORD wraplen = gWrapLen;
+ uint32_t len, tmplen;
+ uint32_t wraplen = gWrapLen;
wchar_t *str = ((DUMPMSG *)lParam)->szMsg;
lvi.iItem = 0x7fffffff;
@@ -402,7 +402,7 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LP while (str != nullptr) {
lvi.pszText = &str[0];
- tmplen = len = (DWORD)mir_wstrlen(lvi.pszText);
+ tmplen = len = (uint32_t)mir_wstrlen(lvi.pszText);
while (len > wraplen) {
szBreak = lvi.pszText[wraplen];
@@ -924,9 +924,9 @@ static int OnFastDump(WPARAM wParam, LPARAM lParam) {
if (pActive) {
LOGMSG *logMsg = (LOGMSG *)lParam;
- DWORD headlen = (DWORD)mir_strlen(logMsg->pszHead);
- DWORD msglen = (DWORD)mir_strlen(logMsg->pszMsg);
- DWORD len = (headlen + msglen + 1) * sizeof(wchar_t) + sizeof(DUMPMSG);
+ uint32_t headlen = (uint32_t)mir_strlen(logMsg->pszHead);
+ uint32_t msglen = (uint32_t)mir_strlen(logMsg->pszMsg);
+ uint32_t len = (headlen + msglen + 1) * sizeof(wchar_t) + sizeof(DUMPMSG);
DUMPMSG *dumpMsg = (DUMPMSG *)mir_alloc(len);
wchar_t *str = dumpMsg->szMsg;
diff --git a/plugins/Console/src/init.cpp b/plugins/Console/src/init.cpp index 7750135fc2..c733fab1f7 100644 --- a/plugins/Console/src/init.cpp +++ b/plugins/Console/src/init.cpp @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
-DWORD mirandaVer;
+uint32_t mirandaVer;
CMPlugin g_plugin;
static IconItem iconList[] =
diff --git a/plugins/ContactsPlus/src/send.cpp b/plugins/ContactsPlus/src/send.cpp index 15b1ae1522..0b6c07a318 100644 --- a/plugins/ContactsPlus/src/send.cpp +++ b/plugins/ContactsPlus/src/send.cpp @@ -410,7 +410,7 @@ INT_PTR CALLBACK SendDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara // prepare data & count size
maSend[i].mcaNick = mir_utf8encodeW(Clist_GetContactDisplayName(ackData->aContacts[i]));
maSend[i].mcaUIN = mir_utf8encodeW(ptrW(GetContactUID(ackData->aContacts[i])));
- dbei.cbBlob += (DWORD)strlennull(maSend[i].mcaUIN) + (DWORD)strlennull((char*)maSend[i].mcaNick) + 2;
+ dbei.cbBlob += (uint32_t)strlennull(maSend[i].mcaUIN) + (uint32_t)strlennull((char*)maSend[i].mcaNick) + 2;
}
dbei.pBlob = (uint8_t*)_alloca(dbei.cbBlob);
for (i = 0, pBlob = (char*)dbei.pBlob; i < ackData->nContacts; i++) {
diff --git a/plugins/CountryFlags/src/ip2country.cpp b/plugins/CountryFlags/src/ip2country.cpp index 6f3b2c6901..de8cc0e439 100644 --- a/plugins/CountryFlags/src/ip2country.cpp +++ b/plugins/CountryFlags/src/ip2country.cpp @@ -24,34 +24,34 @@ extern struct CountryListEntry *countries; /************************* Bin Records ****************************/
-#define DATARECORD_SIZE (sizeof(DWORD)+sizeof(DWORD)+sizeof(uint16_t))
+#define DATARECORD_SIZE (sizeof(uint32_t)+sizeof(uint32_t)+sizeof(uint16_t))
// mir_free() the return value
-static uint8_t* GetDataHeader(uint8_t *data, DWORD cbDataSize, DWORD *pnDataRecordCount)
+static uint8_t* GetDataHeader(uint8_t *data, uint32_t cbDataSize, uint32_t *pnDataRecordCount)
{
uint8_t *recordData;
- /* uncompressed size stored in first DWORD */
- *pnDataRecordCount = (*(DWORD*)data) / DATARECORD_SIZE;
- recordData = (uint8_t*)mir_alloc(*(DWORD*)data);
+ /* uncompressed size stored in first uint32_t */
+ *pnDataRecordCount = (*(uint32_t*)data) / DATARECORD_SIZE;
+ recordData = (uint8_t*)mir_alloc(*(uint32_t*)data);
if (recordData != nullptr)
- Huffman_Uncompress(data + sizeof(DWORD), recordData, cbDataSize - sizeof(DWORD), *(DWORD*)data);
+ Huffman_Uncompress(data + sizeof(uint32_t), recordData, cbDataSize - sizeof(uint32_t), *(uint32_t*)data);
return recordData;
}
-static int GetDataRecord(uint8_t *data, DWORD index, DWORD *pdwFrom, DWORD *pdwTo)
+static int GetDataRecord(uint8_t *data, uint32_t index, uint32_t *pdwFrom, uint32_t *pdwTo)
{
data += index * DATARECORD_SIZE;
- *pdwFrom = *(DWORD*)data;
- data += sizeof(DWORD);
- if (pdwTo != nullptr) *pdwTo = *(DWORD*)data;
- data += sizeof(DWORD);
+ *pdwFrom = *(uint32_t*)data;
+ data += sizeof(uint32_t);
+ if (pdwTo != nullptr) *pdwTo = *(uint32_t*)data;
+ data += sizeof(uint32_t);
return (int)*(uint16_t*)data;
}
/************************* Record Cache ***************************/
static mir_cs csRecordCache;
-static DWORD nDataRecordsCount; /* protected by csRecordCache */
+static uint32_t nDataRecordsCount; /* protected by csRecordCache */
static uint8_t *dataRecords; /* protected by csRecordCache */
#define UNLOADDELAY 30*1000 /* time after which the data records are being unloaded */
@@ -64,17 +64,17 @@ static void CALLBACK UnloadRecordCache(LPARAM) }
// function assumes it has got the csRecordCache mutex
-static BOOL EnsureRecordCacheLoaded(uint8_t **pdata, DWORD *pcount)
+static BOOL EnsureRecordCacheLoaded(uint8_t **pdata, uint32_t *pcount)
{
HRSRC hrsrc;
- DWORD cb;
+ uint32_t cb;
mir_cslock lck(csRecordCache);
if (dataRecords == nullptr) {
/* load record data list from resources */
hrsrc = FindResource(g_plugin.getInst(), MAKEINTRESOURCE(IDR_IPTOCOUNTRY), L"BIN");
cb = SizeofResource(g_plugin.getInst(), hrsrc);
dataRecords = (uint8_t*)LockResource(LoadResource(g_plugin.getInst(), hrsrc));
- if (cb <= sizeof(DWORD) || dataRecords == nullptr)
+ if (cb <= sizeof(uint32_t) || dataRecords == nullptr)
return FALSE;
/* uncompress record data */
dataRecords = GetDataHeader(dataRecords, cb, &nDataRecordsCount);
@@ -98,8 +98,8 @@ static void LeaveRecordCache(void) INT_PTR ServiceIpToCountry(WPARAM wParam, LPARAM)
{
uint8_t *data;
- DWORD dwFrom, dwTo;
- DWORD low = 0, i, high;
+ uint32_t dwFrom, dwTo;
+ uint32_t low = 0, i, high;
int id;
if (EnsureRecordCacheLoaded(&data, &high)) {
/* binary search in record data */
@@ -163,10 +163,10 @@ struct { struct ResizableByteBuffer {
uint8_t *buf;
- DWORD cbLength, cbAlloced;
+ uint32_t cbLength, cbAlloced;
};
-static void AppendToByteBuffer(struct ResizableByteBuffer *buffer, const void *append, DWORD cbAppendSize)
+static void AppendToByteBuffer(struct ResizableByteBuffer *buffer, const void *append, uint32_t cbAppendSize)
{
if (buffer->cbAlloced <= buffer->cbLength + cbAppendSize) {
uint8_t* buf = (uint8_t*)mir_realloc(buffer->buf, buffer->cbAlloced + ALLOC_STEP + cbAppendSize);
@@ -184,7 +184,7 @@ static int EnumIpDataLines(const char *pszFileCSV, const char *pszFileOut) FILE *fp;
char line[1024], out[512], *pszFrom, *pszTo, *pszTwo, *pszCountry, *buf;
int i, j;
- DWORD dwOut;
+ uint32_t dwOut;
uint16_t wOut;
struct ResizableByteBuffer buffer;
@@ -233,10 +233,10 @@ static int EnumIpDataLines(const char *pszFileCSV, const char *pszFileOut) buf = (char*)countries[i].szName;
/* check country */
if (!mir_strcmpi(pszCountry, buf)) {
- dwOut = (DWORD)atoi(pszFrom);
- AppendToByteBuffer(&buffer, (void*)&dwOut, sizeof(DWORD));
- dwOut = (DWORD)atoi(pszTo);
- AppendToByteBuffer(&buffer, (void*)&dwOut, sizeof(DWORD));
+ dwOut = (uint32_t)atoi(pszFrom);
+ AppendToByteBuffer(&buffer, (void*)&dwOut, sizeof(uint32_t));
+ dwOut = (uint32_t)atoi(pszTo);
+ AppendToByteBuffer(&buffer, (void*)&dwOut, sizeof(uint32_t));
wOut = (uint16_t)countries[i].id;
AppendToByteBuffer(&buffer, (void*)&wOut, sizeof(uint16_t));
break;
@@ -252,9 +252,9 @@ static int EnumIpDataLines(const char *pszFileCSV, const char *pszFileOut) OutputDebugStringA("Done!\n"); /* all ascii */
if (buffer.buf != NULL) {
HANDLE hFileOut;
- DWORD cbWritten = 0;
+ uint32_t cbWritten = 0;
uint8_t *compressed;
- DWORD cbCompressed;
+ uint32_t cbCompressed;
/* compress whole data */
OutputDebugStringA("Compressing...\n"); /* all ascii */
compressed = (uint8_t*)mir_alloc(buffer.cbAlloced + 384);
@@ -266,7 +266,7 @@ static int EnumIpDataLines(const char *pszFileCSV, const char *pszFileOut) if (hFileOut != INVALID_HANDLE_VALUE) {
/* store data length count at beginning */
dwOut = buffer.cbLength;
- WriteFile(hFileOut, &dwOut, sizeof(DWORD), &cbWritten, NULL);
+ WriteFile(hFileOut, &dwOut, sizeof(uint32_t), &cbWritten, NULL);
/* store compressed data records */
WriteFile(hFileOut, compressed, cbCompressed, &cbWritten, NULL);
CloseHandle(hFileOut);
diff --git a/plugins/CountryFlags/src/utils.cpp b/plugins/CountryFlags/src/utils.cpp index 96721a2eca..e6640f5899 100644 --- a/plugins/CountryFlags/src/utils.cpp +++ b/plugins/CountryFlags/src/utils.cpp @@ -39,7 +39,7 @@ static int nCallListCount; // always gets called in main message loop
static void CALLBACK BufferedProcTimer(HWND hwnd, UINT, UINT_PTR idTimer, DWORD currentTick)
{
- struct BufferedCallData *buf;
+ BufferedCallData *buf;
UINT uElapsed, uElapseNext = USER_TIMER_MAXIMUM;
BUFFEREDPROC pfnBuffProc;
LPARAM lParam;
diff --git a/plugins/CrashDumper/src/dumper.cpp b/plugins/CrashDumper/src/dumper.cpp index d44823bf55..d4ae642135 100644 --- a/plugins/CrashDumper/src/dumper.cpp +++ b/plugins/CrashDumper/src/dumper.cpp @@ -45,7 +45,7 @@ void WriteUtfFile(HANDLE hDumpFile, char *bufu) DWORD bytes;
static const unsigned char bytemark[] = { 0xEF, 0xBB, 0xBF };
WriteFile(hDumpFile, bytemark, 3, &bytes, nullptr);
- WriteFile(hDumpFile, bufu, (DWORD)mir_strlen(bufu), &bytes, nullptr);
+ WriteFile(hDumpFile, bufu, (uint32_t)mir_strlen(bufu), &bytes, nullptr);
}
BOOL CALLBACK LoadedModules64(LPCSTR, DWORD64 ModuleBase, ULONG ModuleSize, PVOID UserContext)
@@ -77,7 +77,7 @@ BOOL CALLBACK LoadedModulesFind64(LPCSTR ModuleName, DWORD64 ModuleBase, ULONG M {
FindData *data = (FindData*)UserContext;
- if ((DWORD)(data->Offset - ModuleBase) < ModuleSize) {
+ if ((uint32_t)(data->Offset - ModuleBase) < ModuleSize) {
const size_t len = _countof(data->pModule->ModuleName);
strncpy(data->pModule->ModuleName, ModuleName, len);
data->pModule->ModuleName[len - 1] = 0;
@@ -113,7 +113,7 @@ void GetLinkedModulesInfo(wchar_t *moduleName, CMStringW &buffer) PIMAGE_IMPORT_DESCRIPTOR importData = (PIMAGE_IMPORT_DESCRIPTOR)ImageDirectoryEntryToData(dllAddr, FALSE, IMAGE_DIRECTORY_ENTRY_IMPORT, &tableSize);
if (importData) {
CMStringW wszEnvPath;
- DWORD dwLen = GetEnvironmentVariableW(L"Path", nullptr, 0);
+ uint32_t dwLen = GetEnvironmentVariableW(L"Path", nullptr, 0);
wszEnvPath.Preallocate(dwLen + 1);
GetEnvironmentVariableW(L"Path", wszEnvPath.GetBuffer(), dwLen);
@@ -206,7 +206,7 @@ static void GetPluginsString(CMStringW &buffer, unsigned &flags) mir_free(pVerInfo);
}
else {
- DWORD ver = pi->version;
+ uint32_t ver = pi->version;
v1 = HIBYTE(HIWORD(ver)), v2 = LOBYTE(HIWORD(ver)), v3 = HIBYTE(LOWORD(ver)), v4 = LOBYTE(LOWORD(ver));
}
diff --git a/plugins/CrashDumper/src/exhndlr.cpp b/plugins/CrashDumper/src/exhndlr.cpp index 652adcbf9f..e5b1723d06 100644 --- a/plugins/CrashDumper/src/exhndlr.cpp +++ b/plugins/CrashDumper/src/exhndlr.cpp @@ -127,7 +127,7 @@ LONG WINAPI myfilterv(PEXCEPTION_POINTERS exc_ptr) return EXCEPTION_CONTINUE_SEARCH;
}
-DWORD MirandaThreadFilter(DWORD code, EXCEPTION_POINTERS* info)
+uint32_t MirandaThreadFilter(uint32_t code, EXCEPTION_POINTERS* info)
{
if (info != lastptr) {
lastptr = info;
diff --git a/plugins/CrashDumper/src/sdkstuff.h b/plugins/CrashDumper/src/sdkstuff.h index e4dec9fd93..04dce75d4c 100644 --- a/plugins/CrashDumper/src/sdkstuff.h +++ b/plugins/CrashDumper/src/sdkstuff.h @@ -21,12 +21,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "dbghelp.h"
typedef struct _IMAGEHLP_MODULE64_V2 {
- DWORD SizeOfStruct; // set to sizeof(IMAGEHLP_MODULE64)
+ uint32_t SizeOfStruct; // set to sizeof(IMAGEHLP_MODULE64)
DWORD64 BaseOfImage; // base load address of module
- DWORD ImageSize; // virtual size of the loaded module
- DWORD TimeDateStamp; // date/time stamp from pe header
- DWORD CheckSum; // checksum from the pe header
- DWORD NumSyms; // number of symbols in the symbol table
+ uint32_t ImageSize; // virtual size of the loaded module
+ uint32_t TimeDateStamp; // date/time stamp from pe header
+ uint32_t CheckSum; // checksum from the pe header
+ uint32_t NumSyms; // number of symbols in the symbol table
SYM_TYPE SymType; // type of symbols loaded
CHAR ModuleName[32]; // module name
CHAR ImageName[256]; // image name
@@ -34,12 +34,12 @@ typedef struct _IMAGEHLP_MODULE64_V2 { } IMAGEHLP_MODULE64_V2;
typedef struct _IMAGEHLP_MODULEW64_V2 {
- DWORD SizeOfStruct; // set to sizeof(IMAGEHLP_MODULE64)
+ uint32_t SizeOfStruct; // set to sizeof(IMAGEHLP_MODULE64)
DWORD64 BaseOfImage; // base load address of module
- DWORD ImageSize; // virtual size of the loaded module
- DWORD TimeDateStamp; // date/time stamp from pe header
- DWORD CheckSum; // checksum from the pe header
- DWORD NumSyms; // number of symbols in the symbol table
+ uint32_t ImageSize; // virtual size of the loaded module
+ uint32_t TimeDateStamp; // date/time stamp from pe header
+ uint32_t CheckSum; // checksum from the pe header
+ uint32_t NumSyms; // number of symbols in the symbol table
SYM_TYPE SymType; // type of symbols loaded
wchar_t ModuleName[32]; // module name
wchar_t ImageName[256]; // image name
diff --git a/plugins/CrashDumper/src/stdafx.h b/plugins/CrashDumper/src/stdafx.h index c35c36a8bb..06a23e75d3 100644 --- a/plugins/CrashDumper/src/stdafx.h +++ b/plugins/CrashDumper/src/stdafx.h @@ -111,7 +111,7 @@ void WriteUtfFile(HANDLE hDumpFile, char* bufu); LONG WINAPI myfilter(PEXCEPTION_POINTERS exc_ptr);
LONG WINAPI myfilterv(PEXCEPTION_POINTERS exc_ptr);
-DWORD MirandaThreadFilter(DWORD code, EXCEPTION_POINTERS* info);
+uint32_t MirandaThreadFilter(uint32_t code, EXCEPTION_POINTERS* info);
void GetInternetExplorerVersion(CMStringW& buffer);
void GetProcessorString(CMStringW& buffer);
@@ -123,12 +123,12 @@ void GetLanguagePackString(CMStringW& buffer); void GetWow64String(CMStringW& buffer);
void GetVersionInfo(HMODULE hLib, CMStringW& buffer);
-void GetISO8061Time(SYSTEMTIME* stLocal, LPTSTR lpszString, DWORD dwSize);
+void GetISO8061Time(SYSTEMTIME* stLocal, LPTSTR lpszString, uint32_t dwSize);
void ReadableExceptionInfo(PEXCEPTION_RECORD excrec, CMStringW& buffer);
-void GetLastWriteTime(LPCTSTR fileName, LPTSTR lpszString, DWORD dwSize);
-void GetLastWriteTime(FILETIME* ftime, LPTSTR lpszString, DWORD dwSize);
+void GetLastWriteTime(LPCTSTR fileName, LPTSTR lpszString, uint32_t dwSize);
+void GetLastWriteTime(FILETIME* ftime, LPTSTR lpszString, uint32_t dwSize);
void StoreStringToClip(CMStringW& buffer);
void ShowMessage(int type, const wchar_t* format, ...);
diff --git a/plugins/CrashDumper/src/ui.cpp b/plugins/CrashDumper/src/ui.cpp index 80483b4fe3..3fa9ce6046 100644 --- a/plugins/CrashDumper/src/ui.cpp +++ b/plugins/CrashDumper/src/ui.cpp @@ -20,13 +20,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. class CViewVersionInfo : public CDlgBase
{
- DWORD m_flags;
+ uint32_t m_flags;
CCtrlButton m_btnCopyClip, m_btnCopyFile;
CCtrlRichEdit m_redtViewVersionInfo;
public:
- CViewVersionInfo(DWORD flags) :
+ CViewVersionInfo(uint32_t flags) :
CDlgBase(g_plugin, IDD_VIEWVERSION),
m_btnCopyClip(this, IDC_CLIPVER),
m_btnCopyFile(this, IDC_FILEVER),
@@ -145,7 +145,7 @@ public: INT_PTR ViewVersionInfo(WPARAM wParam, LPARAM)
{
if (pViewDialog == nullptr) {
- DWORD dwFlags = wParam ? (VI_FLAG_PRNVAR | VI_FLAG_PRNDLL) : VI_FLAG_PRNVAR;
+ uint32_t dwFlags = wParam ? (VI_FLAG_PRNVAR | VI_FLAG_PRNDLL) : VI_FLAG_PRNVAR;
pViewDialog = new CViewVersionInfo(dwFlags);
pViewDialog->Show();
}
diff --git a/plugins/CrashDumper/src/utils.cpp b/plugins/CrashDumper/src/utils.cpp index b67f389f15..055ee355a3 100644 --- a/plugins/CrashDumper/src/utils.cpp +++ b/plugins/CrashDumper/src/utils.cpp @@ -23,7 +23,7 @@ static HINSTANCE hKernel = GetModuleHandleA("kernel32.dll"); int GetTZOffset(void)
{
TIME_ZONE_INFORMATION tzInfo = {};
- DWORD type = GetTimeZoneInformation(&tzInfo);
+ uint32_t type = GetTimeZoneInformation(&tzInfo);
int offset = 0;
switch (type) {
@@ -42,7 +42,7 @@ int GetTZOffset(void) return offset;
}
-void GetISO8061Time(SYSTEMTIME *stLocal, LPTSTR lpszString, DWORD dwSize)
+void GetISO8061Time(SYSTEMTIME *stLocal, LPTSTR lpszString, uint32_t dwSize)
{
SYSTEMTIME loctime;
if (stLocal == nullptr) {
@@ -66,7 +66,7 @@ void GetISO8061Time(SYSTEMTIME *stLocal, LPTSTR lpszString, DWORD dwSize) }
}
-void GetLastWriteTime(FILETIME *ftime, LPTSTR lpszString, DWORD dwSize)
+void GetLastWriteTime(FILETIME *ftime, LPTSTR lpszString, uint32_t dwSize)
{
FILETIME ftLocal;
SYSTEMTIME stLocal;
@@ -78,7 +78,7 @@ void GetLastWriteTime(FILETIME *ftime, LPTSTR lpszString, DWORD dwSize) GetISO8061Time(&stLocal, lpszString, dwSize);
}
-void GetLastWriteTime(LPCTSTR fileName, LPTSTR lpszString, DWORD dwSize)
+void GetLastWriteTime(LPCTSTR fileName, LPTSTR lpszString, uint32_t dwSize)
{
WIN32_FIND_DATA FindFileData;
diff --git a/plugins/CryptoPP/crypto/src/fipstest.cpp b/plugins/CryptoPP/crypto/src/fipstest.cpp index d65730b010..685dd1e841 100644 --- a/plugins/CryptoPP/crypto/src/fipstest.cpp +++ b/plugins/CryptoPP/crypto/src/fipstest.cpp @@ -318,7 +318,7 @@ bool IntegrityCheckModule(const char *moduleFilename, const byte *expectedModule const IMAGE_DOS_HEADER *ph = (IMAGE_DOS_HEADER *)memBase;
const IMAGE_NT_HEADERS *phnt = (IMAGE_NT_HEADERS *)(memBase + ph->e_lfanew);
const IMAGE_SECTION_HEADER *phs = IMAGE_FIRST_SECTION(phnt);
- DWORD nSections = phnt->FileHeader.NumberOfSections;
+ uint32_t nSections = phnt->FileHeader.NumberOfSections;
size_t currentFilePos = 0;
size_t checksumPos = (byte *)&phnt->OptionalHeader.CheckSum - memBase;
@@ -599,7 +599,7 @@ NAMESPACE_END // DllMain needs to be in the global namespace
BOOL APIENTRY DllMain(HANDLE hModule,
- DWORD ul_reason_for_call,
+ uint32_t ul_reason_for_call,
LPVOID lpReserved)
{
if (ul_reason_for_call == DLL_PROCESS_ATTACH)
diff --git a/plugins/CryptoPP/crypto/src/hrtimer.cpp b/plugins/CryptoPP/crypto/src/hrtimer.cpp index 4a1cc79ec5..029a6e7fd9 100644 --- a/plugins/CryptoPP/crypto/src/hrtimer.cpp +++ b/plugins/CryptoPP/crypto/src/hrtimer.cpp @@ -103,7 +103,7 @@ TimerWord ThreadUserTimer::GetCurrentTimerValue() FILETIME now, ignored;
if (!GetThreadTimes(GetCurrentThread(), &ignored, &ignored, &ignored, &now))
{
- DWORD lastError = GetLastError();
+ uint32_t lastError = GetLastError();
if (lastError == ERROR_CALL_NOT_IMPLEMENTED)
{
getCurrentThreadImplemented = false;
diff --git a/plugins/CryptoPP/crypto/src/osrng.cpp b/plugins/CryptoPP/crypto/src/osrng.cpp index 22f13e65d1..c841abf02c 100644 --- a/plugins/CryptoPP/crypto/src/osrng.cpp +++ b/plugins/CryptoPP/crypto/src/osrng.cpp @@ -77,7 +77,7 @@ void NonblockingRng::GenerateBlock(byte *output, size_t size) # ifdef WORKAROUND_MS_BUG_Q258000
const MicrosoftCryptoProvider &m_Provider = Singleton<MicrosoftCryptoProvider>().Ref();
# endif
- if (!CryptGenRandom(m_Provider.GetProviderHandle(), (DWORD)size, output))
+ if (!CryptGenRandom(m_Provider.GetProviderHandle(), (uint32_t)size, output))
throw OS_RNG_Err("CryptGenRandom");
#else
if (read(m_fd, output, size) != size)
diff --git a/plugins/CryptoPP/crypto/src/wait.cpp b/plugins/CryptoPP/crypto/src/wait.cpp index b031922638..aabdc21dc8 100644 --- a/plugins/CryptoPP/crypto/src/wait.cpp +++ b/plugins/CryptoPP/crypto/src/wait.cpp @@ -105,7 +105,7 @@ struct WaitingThreadData unsigned int count;
HANDLE threadHandle;
DWORD threadId;
- DWORD* error;
+ DWORD *error;
};
WaitObjectContainer::~WaitObjectContainer()
@@ -125,7 +125,7 @@ WaitObjectContainer::~WaitObjectContainer() threadHandles[i] = thread.threadHandle;
}
PulseEvent(m_startWaiting);
- ::WaitForMultipleObjects((DWORD)m_threads.size(), threadHandles, TRUE, INFINITE);
+ ::WaitForMultipleObjects((uint32_t)m_threads.size(), threadHandles, TRUE, INFINITE);
for (i=0; i<m_threads.size(); i++)
CloseHandle(threadHandles[i]);
CloseHandle(m_startWaiting);
@@ -165,7 +165,7 @@ DWORD WINAPI WaitingThread(LPVOID lParam) handles[0] = thread.stopWaiting;
std::copy(thread.waitHandles, thread.waitHandles+thread.count, handles.begin()+1);
- DWORD result = ::WaitForMultipleObjects((DWORD)handles.size(), &handles[0], FALSE, INFINITE);
+ uint32_t result = ::WaitForMultipleObjects((uint32_t)handles.size(), &handles[0], FALSE, INFINITE);
if (result == WAIT_OBJECT_0)
continue; // another thread finished waiting first, so do nothing
@@ -262,7 +262,7 @@ bool WaitObjectContainer::Wait(unsigned long milliseconds) ResetEvent(m_stopWaiting);
PulseEvent(m_startWaiting);
- DWORD result = ::WaitForSingleObject(m_stopWaiting, milliseconds);
+ uint32_t result = ::WaitForSingleObject(m_stopWaiting, milliseconds);
if (result == WAIT_OBJECT_0)
{
if (error == S_OK)
@@ -286,7 +286,7 @@ bool WaitObjectContainer::Wait(unsigned long milliseconds) static unsigned long lastTime = 0;
unsigned long timeBeforeWait = t.ElapsedTime();
#endif
- DWORD result = ::WaitForMultipleObjects((DWORD)m_handles.size(), &m_handles[0], FALSE, milliseconds);
+ uint32_t result = ::WaitForMultipleObjects((uint32_t)m_handles.size(), &m_handles[0], FALSE, milliseconds);
#if TRACE_WAIT
if (milliseconds > 0)
{
diff --git a/plugins/CryptoPP/crypto/src/winpipes.cpp b/plugins/CryptoPP/crypto/src/winpipes.cpp index ea9843973b..e9c6d501ed 100644 --- a/plugins/CryptoPP/crypto/src/winpipes.cpp +++ b/plugins/CryptoPP/crypto/src/winpipes.cpp @@ -65,7 +65,7 @@ void WindowsHandle::CloseHandle() void WindowsPipe::HandleError(const char *operation) const
{
- DWORD err = GetLastError();
+ uint32_t err = GetLastError();
throw Err(GetHandle(), operation, err);
}
@@ -92,7 +92,7 @@ bool WindowsPipeReceiver::Receive(byte* buf, size_t bufLen) HANDLE h = GetHandle();
// don't queue too much at once, or we might use up non-paged memory
- if (ReadFile(h, buf, UnsignedMin((DWORD)128*1024, bufLen), &m_lastResult, &m_overlapped))
+ if (ReadFile(h, buf, UnsignedMin((uint32_t)128*1024, bufLen), &m_lastResult, &m_overlapped))
{
if (m_lastResult == 0)
m_eofReceived = true;
@@ -166,7 +166,7 @@ void WindowsPipeSender::Send(const byte* buf, size_t bufLen) DWORD written = 0;
HANDLE h = GetHandle();
// don't queue too much at once, or we might use up non-paged memory
- if (WriteFile(h, buf, UnsignedMin((DWORD)128*1024, bufLen), &written, &m_overlapped))
+ if (WriteFile(h, buf, UnsignedMin((uint32_t)128*1024, bufLen), &written, &m_overlapped))
{
m_resultPending = false;
m_lastResult = written;
diff --git a/plugins/CryptoPP/src/main.cpp b/plugins/CryptoPP/src/main.cpp index bdc059828a..f2e9ad05a0 100644 --- a/plugins/CryptoPP/src/main.cpp +++ b/plugins/CryptoPP/src/main.cpp @@ -55,7 +55,7 @@ int CMPlugin::Load() /////////////////////////////////////////////////////////////////////////////////////////
-BOOL ExtractFileFromResource(HANDLE FH, int ResType, int ResId, DWORD* Size)
+BOOL ExtractFileFromResource(HANDLE FH, int ResType, int ResId, uint32_t* Size)
{
HRSRC RH = FindResource(g_plugin.getInst(), MAKEINTRESOURCE(ResId), MAKEINTRESOURCE(ResType));
if (RH == nullptr)
@@ -65,7 +65,7 @@ BOOL ExtractFileFromResource(HANDLE FH, int ResType, int ResId, DWORD* Size) if (RP == nullptr)
return FALSE;
- DWORD x, s = SizeofResource(g_plugin.getInst(), RH);
+ DWORD x, s = SizeofResource(g_plugin.getInst(), RH);
if (!WriteFile(FH, RP, s, &x, nullptr)) return FALSE;
if (x != s) return FALSE;
if (Size) *Size = s;
diff --git a/plugins/Db3x_mmap/src/database.cpp b/plugins/Db3x_mmap/src/database.cpp index e1e1920c59..05aa49b89c 100644 --- a/plugins/Db3x_mmap/src/database.cpp +++ b/plugins/Db3x_mmap/src/database.cpp @@ -23,9 +23,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
-DWORD CDb3Mmap::CreateNewSpace(int bytes)
+uint32_t CDb3Mmap::CreateNewSpace(int bytes)
{
- DWORD ofsNew = m_dbHeader.ofsFileEnd;
+ uint32_t ofsNew = m_dbHeader.ofsFileEnd;
m_dbHeader.ofsFileEnd += bytes;
if (m_dbHeader.ofsFileEnd > m_dwFileSize)
ReMap(m_dbHeader.ofsFileEnd - m_dwFileSize);
@@ -34,7 +34,7 @@ DWORD CDb3Mmap::CreateNewSpace(int bytes) return ofsNew;
}
-void CDb3Mmap::DeleteSpace(DWORD ofs, int bytes)
+void CDb3Mmap::DeleteSpace(uint32_t ofs, int bytes)
{
if (ofs + bytes == m_dbHeader.ofsFileEnd) {
log2("freespace %d@%08x", bytes, ofs);
@@ -48,12 +48,12 @@ void CDb3Mmap::DeleteSpace(DWORD ofs, int bytes) DBFill(ofs, bytes);
}
-DWORD CDb3Mmap::ReallocSpace(DWORD ofs, int oldSize, int newSize)
+uint32_t CDb3Mmap::ReallocSpace(uint32_t ofs, int oldSize, int newSize)
{
if (oldSize >= newSize)
return ofs;
- DWORD ofsNew;
+ uint32_t ofsNew;
if (ofs + oldSize == m_dbHeader.ofsFileEnd) {
ofsNew = ofs;
m_dbHeader.ofsFileEnd += newSize - oldSize;
@@ -70,9 +70,9 @@ DWORD CDb3Mmap::ReallocSpace(DWORD ofs, int oldSize, int newSize) /////////////////////////////////////////////////////////////////////////////////////////
-static DWORD DatabaseCorrupted = 0;
+static uint32_t DatabaseCorrupted = 0;
static wchar_t *msg = nullptr;
-static DWORD dwErr = 0;
+static uint32_t dwErr = 0;
static wchar_t tszPanic[] = LPGENW("Miranda has detected corruption in your database. Miranda will now shut down.");
void __cdecl dbpanic(void *)
diff --git a/plugins/Db3x_mmap/src/dbcache.cpp b/plugins/Db3x_mmap/src/dbcache.cpp index 4d9cee8392..01af3873cb 100644 --- a/plugins/Db3x_mmap/src/dbcache.cpp +++ b/plugins/Db3x_mmap/src/dbcache.cpp @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. void CDb3Mmap::Map()
{
- DWORD dwProtectMode, dwAccess;
+ uint32_t dwProtectMode, dwAccess;
if (m_bReadOnly)
dwProtectMode = PAGE_READONLY, dwAccess = FILE_MAP_READ;
else
@@ -40,7 +40,7 @@ void CDb3Mmap::Map() else DatabaseCorruption(L"%s (CreateFileMapping failed. Code: %d)");
}
-void CDb3Mmap::ReMap(DWORD needed)
+void CDb3Mmap::ReMap(uint32_t needed)
{
KillTimer(nullptr, m_flushBuffersTimerId);
@@ -51,7 +51,7 @@ void CDb3Mmap::ReMap(DWORD needed) if (needed + m_dwFileSize > m_dbHeader.ofsFileEnd + m_ChunkSize)
DatabaseCorruption(L"%s (Too large increment)");
else {
- DWORD x = m_dbHeader.ofsFileEnd / m_ChunkSize;
+ uint32_t x = m_dbHeader.ofsFileEnd / m_ChunkSize;
m_dwFileSize = (x + 1)*m_ChunkSize;
}
}
@@ -65,7 +65,7 @@ void CDb3Mmap::ReMap(DWORD needed) Map();
}
-void CDb3Mmap::DBMoveChunk(DWORD ofsDest, DWORD ofsSource, int bytes)
+void CDb3Mmap::DBMoveChunk(uint32_t ofsDest, uint32_t ofsSource, int bytes)
{
int x = 0;
//log3("move %d %08x->%08x",bytes,ofsSource,ofsDest);
@@ -85,7 +85,7 @@ void CDb3Mmap::DBMoveChunk(DWORD ofsDest, DWORD ofsSource, int bytes) }
//we are assumed to be in a mutex here
-uint8_t* CDb3Mmap::DBRead(DWORD ofs, int *bytesAvail)
+uint8_t* CDb3Mmap::DBRead(uint32_t ofs, int *bytesAvail)
{
// buggy read
if (ofs >= m_dwFileSize) {
@@ -101,7 +101,7 @@ uint8_t* CDb3Mmap::DBRead(DWORD ofs, int *bytesAvail) }
//we are assumed to be in a mutex here
-void CDb3Mmap::DBWrite(DWORD ofs, PVOID pData, int bytes)
+void CDb3Mmap::DBWrite(uint32_t ofs, PVOID pData, int bytes)
{
//log2("write %d@%08x",bytes,ofs);
if (ofs + bytes > m_dwFileSize)
@@ -111,7 +111,7 @@ void CDb3Mmap::DBWrite(DWORD ofs, PVOID pData, int bytes) }
//we are assumed to be in a mutex here
-void CDb3Mmap::DBFill(DWORD ofs, int bytes)
+void CDb3Mmap::DBFill(uint32_t ofs, int bytes)
{
//log2("zerofill %d@%08x",bytes,ofs);
if ((ofs + bytes) <= m_dwFileSize)
@@ -167,7 +167,7 @@ int CDb3Mmap::InitMap(void) // Align to chunk
if (!m_bReadOnly) {
- DWORD x = m_dwFileSize % m_ChunkSize;
+ uint32_t x = m_dwFileSize % m_ChunkSize;
if (x)
m_dwFileSize += m_ChunkSize - x;
}
@@ -179,9 +179,9 @@ int CDb3Mmap::InitMap(void) return 0;
}
-DWORD CDb3Mmap::GetSettingsGroupOfsByModuleNameOfs(DBContact *dbc, DWORD ofsModuleName)
+uint32_t CDb3Mmap::GetSettingsGroupOfsByModuleNameOfs(DBContact *dbc, uint32_t ofsModuleName)
{
- DWORD ofsThis = dbc->ofsFirstSettings;
+ uint32_t ofsThis = dbc->ofsFirstSettings;
while (ofsThis) {
DBContactSettings *dbcs = (DBContactSettings*)DBRead(ofsThis, nullptr);
if (dbcs->signature != DBCONTACTSETTINGS_SIGNATURE) DatabaseCorruption(nullptr);
diff --git a/plugins/Db3x_mmap/src/dbcontacts.cpp b/plugins/Db3x_mmap/src/dbcontacts.cpp index 04e4aa5a78..26401b14de 100644 --- a/plugins/Db3x_mmap/src/dbcontacts.cpp +++ b/plugins/Db3x_mmap/src/dbcontacts.cpp @@ -40,7 +40,7 @@ STDMETHODIMP_(int) CDb3Mmap::DeleteContact(MCONTACT contactID) return 1;
mir_cslockfull lck(m_csDbAccess);
- DWORD ofsContact = GetContactOffset(contactID);
+ uint32_t ofsContact = GetContactOffset(contactID);
DBContact *dbc = (DBContact*)DBRead(ofsContact, nullptr);
if (dbc->signature != DBCONTACT_SIGNATURE)
@@ -61,11 +61,11 @@ STDMETHODIMP_(int) CDb3Mmap::DeleteContact(MCONTACT contactID) lck.lock();
// delete settings chain
- DWORD ofsThis = dbc->ofsFirstSettings;
- DWORD ofsFirstEvent = dbc->ofsFirstEvent;
+ uint32_t ofsThis = dbc->ofsFirstSettings;
+ uint32_t ofsFirstEvent = dbc->ofsFirstEvent;
while (ofsThis) {
DBContactSettings *dbcs = (DBContactSettings*)DBRead(ofsThis, nullptr);
- DWORD ofsNext = dbcs->ofsNext;
+ uint32_t ofsNext = dbcs->ofsNext;
DeleteSpace(ofsThis, offsetof(DBContactSettings, blob) + dbcs->cbBlob);
ofsThis = ofsNext;
}
@@ -74,7 +74,7 @@ STDMETHODIMP_(int) CDb3Mmap::DeleteContact(MCONTACT contactID) ofsThis = ofsFirstEvent;
while (ofsThis) {
DBEvent *dbe = (DBEvent*)DBRead(ofsThis, nullptr);
- DWORD ofsNext = dbe->ofsNext;
+ uint32_t ofsNext = dbe->ofsNext;
DeleteSpace(ofsThis, offsetof(DBEvent, blob) + dbe->cbBlob);
ofsThis = ofsNext;
}
@@ -85,7 +85,7 @@ STDMETHODIMP_(int) CDb3Mmap::DeleteContact(MCONTACT contactID) DBWrite(0, &m_dbHeader, sizeof(m_dbHeader));
}
else {
- DWORD ofsNext = dbc->ofsNext;
+ uint32_t ofsNext = dbc->ofsNext;
ofsThis = m_dbHeader.ofsFirstContact;
DBContact *dbcPrev = (DBContact*)DBRead(ofsThis, nullptr);
while (dbcPrev->ofsNext != ofsContact) {
@@ -115,7 +115,7 @@ STDMETHODIMP_(int) CDb3Mmap::DeleteContact(MCONTACT contactID) STDMETHODIMP_(MCONTACT) CDb3Mmap::AddContact()
{
- DWORD ofsNew;
+ uint32_t ofsNew;
log0("add contact");
DBContact dbc = { 0 };
@@ -189,7 +189,7 @@ BOOL CDb3Mmap::MetaMergeHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub) else {
// there're events in both meta's & sub's event chains
// relink sub's event chain to meta without changing events themselves
- for (DWORD ofsMeta = dbMeta->ofsFirstEvent; ofsMeta != 0;) {
+ for (uint32_t ofsMeta = dbMeta->ofsFirstEvent; ofsMeta != 0;) {
DBEvent *pev = (DBEvent*)DBRead(ofsMeta, nullptr);
if (pev->signature != DBEVENT_SIGNATURE) { // broken chain, don't touch it
ret = 2;
@@ -200,7 +200,7 @@ BOOL CDb3Mmap::MetaMergeHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub) ofsMeta = pev->ofsNext;
}
- for (DWORD ofsSub = dbSub->ofsFirstEvent; ofsSub != 0;) {
+ for (uint32_t ofsSub = dbSub->ofsFirstEvent; ofsSub != 0;) {
DBEvent *pev = (DBEvent*)DBRead(ofsSub, nullptr);
if (pev->signature != DBEVENT_SIGNATURE) { // broken chain, don't touch it
ret = 2;
@@ -216,18 +216,18 @@ BOOL CDb3Mmap::MetaMergeHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub) dbMeta->eventCount = arEvents.getCount();
DBEvent *pFirst = arEvents[0];
- dbMeta->ofsFirstEvent = DWORD((uint8_t*)pFirst - m_pDbCache);
+ dbMeta->ofsFirstEvent = uint32_t((uint8_t*)pFirst - m_pDbCache);
pFirst->ofsPrev = 0;
dbMeta->ofsFirstUnread = pFirst->markedRead() ? 0 : dbMeta->ofsFirstEvent;
DBEvent *pLast = arEvents[arEvents.getCount() - 1];
- dbMeta->ofsLastEvent = DWORD((uint8_t*)pLast - m_pDbCache);
+ dbMeta->ofsLastEvent = uint32_t((uint8_t*)pLast - m_pDbCache);
pLast->ofsNext = 0;
for (int i = 1; i < arEvents.getCount(); i++) {
DBEvent *pPrev = arEvents[i - 1], *pNext = arEvents[i];
- pPrev->ofsNext = DWORD((uint8_t*)pNext - m_pDbCache);
- pNext->ofsPrev = DWORD((uint8_t*)pPrev - m_pDbCache);
+ pPrev->ofsNext = uint32_t((uint8_t*)pNext - m_pDbCache);
+ pNext->ofsPrev = uint32_t((uint8_t*)pPrev - m_pDbCache);
if (dbMeta->ofsFirstUnread == 0 && !pNext->markedRead())
dbMeta->ofsFirstUnread = pPrev->ofsNext;
@@ -264,7 +264,7 @@ BOOL CDb3Mmap::MetaSplitHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub) if (ret = WipeContactHistory(&dbSub))
__leave;
- DWORD dwOffset = dbMeta.ofsFirstEvent;
+ uint32_t dwOffset = dbMeta.ofsFirstEvent;
DBEvent *evMeta = nullptr, *evSub = nullptr;
dbMeta.eventCount = 0; dbMeta.ofsFirstEvent = dbMeta.ofsLastEvent = dbMeta.ofsFirstUnread = dbMeta.tsFirstUnread = 0;
@@ -273,14 +273,14 @@ BOOL CDb3Mmap::MetaSplitHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub) if (evCurr->signature != DBEVENT_SIGNATURE)
break;
- DWORD dwNext = evCurr->ofsNext; evCurr->ofsNext = 0;
+ uint32_t dwNext = evCurr->ofsNext; evCurr->ofsNext = 0;
// extract it to sub's chain
if (evCurr->contactID == ccSub->contactID) {
dbSub.eventCount++;
if (evSub != nullptr) {
evSub->ofsNext = dwOffset;
- evCurr->ofsPrev = DWORD((uint8_t*)evSub - m_pDbCache);
+ evCurr->ofsPrev = uint32_t((uint8_t*)evSub - m_pDbCache);
}
else {
dbSub.ofsFirstEvent = dwOffset;
@@ -297,7 +297,7 @@ BOOL CDb3Mmap::MetaSplitHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub) dbMeta.eventCount++;
if (evMeta != nullptr) {
evMeta->ofsNext = dwOffset;
- evCurr->ofsPrev = DWORD((uint8_t*)evMeta - m_pDbCache);
+ evCurr->ofsPrev = uint32_t((uint8_t*)evMeta - m_pDbCache);
}
else {
dbMeta.ofsFirstEvent = dwOffset;
@@ -331,11 +331,11 @@ BOOL CDb3Mmap::MetaSplitHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub) struct COldMeta
{
- COldMeta(DWORD _id, DBCachedContact *_cc) :
+ COldMeta(uint32_t _id, DBCachedContact *_cc) :
hMetaID(_id), cc(_cc)
{}
- DWORD hMetaID;
+ uint32_t hMetaID;
DBCachedContact *cc;
};
@@ -343,12 +343,12 @@ void CDb3Mmap::FillContacts() {
OBJLIST<COldMeta> arMetas(10, NumericKeySortT);
- for (DWORD dwOffset = m_dbHeader.ofsFirstContact; dwOffset != 0;) {
+ for (uint32_t dwOffset = m_dbHeader.ofsFirstContact; dwOffset != 0;) {
DBContact *p = (DBContact*)DBRead(dwOffset, nullptr);
if (p->signature != DBCONTACT_SIGNATURE)
break;
- DWORD dwContactID;
+ uint32_t dwContactID;
if (m_dbHeader.version >= DB_095_VERSION) {
dwContactID = p->dwContactID;
if (dwContactID >= m_dwMaxContactId)
@@ -440,7 +440,7 @@ void CDb3Mmap::FillContacts() }
}
-DWORD CDb3Mmap::GetContactOffset(MCONTACT contactID, DBCachedContact **pcc)
+uint32_t CDb3Mmap::GetContactOffset(MCONTACT contactID, DBCachedContact **pcc)
{
if (contactID == 0) {
if (pcc) *pcc = nullptr;
diff --git a/plugins/Db3x_mmap/src/dbcrypt.cpp b/plugins/Db3x_mmap/src/dbcrypt.cpp index bd8b1495f0..6743eea64d 100644 --- a/plugins/Db3x_mmap/src/dbcrypt.cpp +++ b/plugins/Db3x_mmap/src/dbcrypt.cpp @@ -162,7 +162,7 @@ STDMETHODIMP_(BOOL) CDb3Mmap::EnableEncryption(BOOL bEnable) void CDb3Mmap::ToggleSettingsEncryption(MCONTACT contactID)
{
- DWORD ofsContact = GetContactOffset(contactID);
+ uint32_t ofsContact = GetContactOffset(contactID);
if (ofsContact == 0)
return;
@@ -172,7 +172,7 @@ void CDb3Mmap::ToggleSettingsEncryption(MCONTACT contactID) // fast cycle through all settings
DBContactSettings *setting = (DBContactSettings*)DBRead(contact->ofsFirstSettings, nullptr);
- DWORD offset = contact->ofsFirstSettings;
+ uint32_t offset = contact->ofsFirstSettings;
char *szModule = GetModuleNameByOfs(setting->ofsModuleName);
if (szModule == nullptr)
return;
@@ -181,7 +181,7 @@ void CDb3Mmap::ToggleSettingsEncryption(MCONTACT contactID) OBJLIST<VarDescr> arSettings(10);
char szSetting[256];
int bytesRemaining, len;
- DWORD ofsBlobPtr = offset + offsetof(DBContactSettings, blob), ofsNext = setting->ofsNext;
+ uint32_t ofsBlobPtr = offset + offsetof(DBContactSettings, blob), ofsNext = setting->ofsNext;
uint8_t *pBlob = (uint8_t*)DBRead(ofsBlobPtr, &bytesRemaining);
while (pBlob[0]) {
NeedBytes(1);
@@ -269,7 +269,7 @@ void CDb3Mmap::ToggleSettingsEncryption(MCONTACT contactID) void CDb3Mmap::ToggleEventsEncryption(MCONTACT contactID)
{
- DWORD ofsContact = GetContactOffset(contactID);
+ uint32_t ofsContact = GetContactOffset(contactID);
if (ofsContact == 0)
return;
@@ -278,20 +278,20 @@ void CDb3Mmap::ToggleEventsEncryption(MCONTACT contactID) return;
// fast cycle through all events
- for (DWORD offset = contact.ofsFirstEvent; offset != 0;) {
+ for (uint32_t offset = contact.ofsFirstEvent; offset != 0;) {
DBEvent evt = *(DBEvent*)DBRead(offset, nullptr);
if (evt.signature != DBEVENT_SIGNATURE)
return;
size_t len;
- DWORD ofsDest;
+ uint32_t ofsDest;
mir_ptr<uint8_t> pBlob;
uint8_t *pSource = DBRead(offset + offsetof(DBEvent, blob), nullptr);
if (!m_bEncrypted) { // we need more space
if ((pBlob = m_crypto->encodeBuffer(pSource, evt.cbBlob, &len)) == nullptr)
return;
- ofsDest = ReallocSpace(offset, offsetof(DBEvent, blob) + evt.cbBlob, offsetof(DBEvent, blob) + (DWORD)len);
+ ofsDest = ReallocSpace(offset, offsetof(DBEvent, blob) + evt.cbBlob, offsetof(DBEvent, blob) + (uint32_t)len);
if (evt.ofsNext) {
DBEvent *e = (DBEvent*)DBRead(evt.ofsNext, nullptr);
@@ -320,12 +320,12 @@ void CDb3Mmap::ToggleEventsEncryption(MCONTACT contactID) evt.flags &= ~DBEF_ENCRYPTED;
if (len < evt.cbBlob)
- DBFill(ofsDest + offsetof(DBEvent, blob) + (DWORD)len, evt.cbBlob - (DWORD)len);
+ DBFill(ofsDest + offsetof(DBEvent, blob) + (uint32_t)len, evt.cbBlob - (uint32_t)len);
}
- evt.cbBlob = (DWORD)len;
+ evt.cbBlob = (uint32_t)len;
DBWrite(ofsDest, &evt, offsetof(DBEvent, blob));
- DBWrite(ofsDest + offsetof(DBEvent, blob), pBlob, (DWORD)len);
+ DBWrite(ofsDest + offsetof(DBEvent, blob), pBlob, (uint32_t)len);
offset = evt.ofsNext;
}
diff --git a/plugins/Db3x_mmap/src/dbevents.cpp b/plugins/Db3x_mmap/src/dbevents.cpp index 806f51e955..6037ec19df 100644 --- a/plugins/Db3x_mmap/src/dbevents.cpp +++ b/plugins/Db3x_mmap/src/dbevents.cpp @@ -72,19 +72,19 @@ MEVENT CDb3Mmap::AddEvent(MCONTACT contactID, const DBEVENTINFO *dbei) uint8_t *pResult = m_crypto->encodeBuffer(pBlob, dbe.cbBlob, &len);
if (pResult != nullptr) {
pCryptBlob = pBlob = pResult;
- dbe.cbBlob = (DWORD)len;
+ dbe.cbBlob = (uint32_t)len;
dbe.flags |= DBEF_ENCRYPTED;
}
}
mir_cslockfull lck(m_csDbAccess);
- DWORD ofsContact = GetContactOffset(contactID);
+ uint32_t ofsContact = GetContactOffset(contactID);
DBContact dbc = *(DBContact*)DBRead(ofsContact, nullptr);
if (dbc.signature != DBCONTACT_SIGNATURE)
return 0;
- DWORD ofsNew = CreateNewSpace(offsetof(DBEvent, blob) + dbe.cbBlob);
+ uint32_t ofsNew = CreateNewSpace(offsetof(DBEvent, blob) + dbe.cbBlob);
dbe.ofsModuleName = GetModuleNameOfs(dbei->szModule);
// find where to put it - sort by timestamp
@@ -105,7 +105,7 @@ MEVENT CDb3Mmap::AddEvent(MCONTACT contactID, const DBEVENTINFO *dbei) }
else {
// Loop through the chain, starting at the end
- DWORD ofsThis = dbc.ofsLastEvent;
+ uint32_t ofsThis = dbc.ofsLastEvent;
dbeTest = (DBEvent*)DBRead(ofsThis, nullptr);
for (;;) {
// If the new event's timesstamp is equal to or greater than the
@@ -168,7 +168,7 @@ MEVENT CDb3Mmap::AddEvent(MCONTACT contactID, const DBEVENTINFO *dbei) BOOL CDb3Mmap::DeleteEvent(MEVENT hDbEvent)
{
mir_cslockfull lck(m_csDbAccess);
- DBEvent dbe = *(DBEvent*)DBRead((DWORD)hDbEvent, nullptr);
+ DBEvent dbe = *(DBEvent*)DBRead((uint32_t)hDbEvent, nullptr);
if (dbe.signature != DBEVENT_SIGNATURE)
return 1;
@@ -182,7 +182,7 @@ BOOL CDb3Mmap::DeleteEvent(MEVENT hDbEvent) }
else cc = nullptr;
- DWORD ofsContact = (cc) ? cc->dwOfsContact : m_dbHeader.ofsUser;
+ uint32_t ofsContact = (cc) ? cc->dwOfsContact : m_dbHeader.ofsUser;
DBContact dbc = *(DBContact *)DBRead(ofsContact, nullptr);
if (dbc.signature != DBCONTACT_SIGNATURE)
return 1;
@@ -196,17 +196,17 @@ BOOL CDb3Mmap::DeleteEvent(MEVENT hDbEvent) // get back in
lck.lock();
dbc = *(DBContact*)DBRead(ofsContact, nullptr);
- dbe = *(DBEvent*)DBRead((DWORD)hDbEvent, nullptr);
+ dbe = *(DBEvent*)DBRead((uint32_t)hDbEvent, nullptr);
// check if this was the first unread, if so, recalc the first unread
- if (dbc.ofsFirstUnread == (DWORD)hDbEvent) {
+ if (dbc.ofsFirstUnread == (uint32_t)hDbEvent) {
for (DBEvent *dbeNext = &dbe;;) {
if (dbeNext->ofsNext == 0) {
dbc.ofsFirstUnread = 0;
dbc.tsFirstUnread = 0;
break;
}
- DWORD ofsThis = dbeNext->ofsNext;
+ uint32_t ofsThis = dbeNext->ofsNext;
dbeNext = (DBEvent*)DBRead(ofsThis, nullptr);
if (!dbeNext->markedRead()) {
dbc.ofsFirstUnread = ofsThis;
@@ -250,7 +250,7 @@ BOOL CDb3Mmap::DeleteEvent(MEVENT hDbEvent) DBWrite(ofsContact, &dbc, sizeof(DBContact));
// delete event
- DeleteSpace((DWORD)hDbEvent, offsetof(DBEvent, blob) + dbe.cbBlob);
+ DeleteSpace((uint32_t)hDbEvent, offsetof(DBEvent, blob) + dbe.cbBlob);
// also update a sub
if (cc && dbe.contactID != cc->contactID) {
@@ -271,7 +271,7 @@ BOOL CDb3Mmap::EditEvent(MCONTACT, MEVENT, const DBEVENTINFO*) int CDb3Mmap::GetBlobSize(MEVENT hDbEvent)
{
mir_cslock lck(m_csDbAccess);
- DBEvent *dbe = AdaptEvent((DWORD)hDbEvent, 0);
+ DBEvent *dbe = AdaptEvent((uint32_t)hDbEvent, 0);
return (dbe->signature != DBEVENT_SIGNATURE) ? -1 : dbe->cbBlob;
}
@@ -284,7 +284,7 @@ BOOL CDb3Mmap::GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbei) }
mir_cslock lck(m_csDbAccess);
- DBEvent *dbe = AdaptEvent((DWORD)hDbEvent, 0);
+ DBEvent *dbe = AdaptEvent((uint32_t)hDbEvent, 0);
if (dbe->signature != DBEVENT_SIGNATURE)
return 1;
@@ -293,7 +293,7 @@ BOOL CDb3Mmap::GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbei) dbei->flags = dbe->flags;
dbei->eventType = dbe->wEventType;
- DWORD cbBlob = dbe->cbBlob;
+ uint32_t cbBlob = dbe->cbBlob;
size_t bytesToCopy = cbBlob;
if (dbei->cbBlob == -1)
dbei->pBlob = (uint8_t*)mir_calloc(cbBlob + 2);
@@ -304,9 +304,9 @@ BOOL CDb3Mmap::GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbei) if (bytesToCopy && dbei->pBlob) {
uint8_t *pSrc;
if (m_dbHeader.version >= DB_095_1_VERSION)
- pSrc = DBRead(DWORD(hDbEvent) + offsetof(DBEvent, blob), nullptr);
+ pSrc = DBRead(uint32_t(hDbEvent) + offsetof(DBEvent, blob), nullptr);
else
- pSrc = DBRead(DWORD(hDbEvent) + offsetof(DBEvent_094, blob), nullptr);
+ pSrc = DBRead(uint32_t(hDbEvent) + offsetof(DBEvent_094, blob), nullptr);
if (dbe->flags & DBEF_ENCRYPTED) {
dbei->flags &= ~DBEF_ENCRYPTED;
size_t len;
@@ -337,9 +337,9 @@ BOOL CDb3Mmap::MarkEventRead(MCONTACT contactID, MEVENT hDbEvent) else cc = nullptr;
mir_cslockfull lck(m_csDbAccess);
- DWORD ofsContact = (cc) ? cc->dwOfsContact : m_dbHeader.ofsUser;
+ uint32_t ofsContact = (cc) ? cc->dwOfsContact : m_dbHeader.ofsUser;
DBContact dbc = *(DBContact*)DBRead(ofsContact, nullptr);
- DBEvent *dbe = (DBEvent*)DBRead((DWORD)hDbEvent, nullptr);
+ DBEvent *dbe = (DBEvent*)DBRead((uint32_t)hDbEvent, nullptr);
if (dbe->signature != DBEVENT_SIGNATURE || dbc.signature != DBCONTACT_SIGNATURE)
return -1;
@@ -348,16 +348,16 @@ BOOL CDb3Mmap::MarkEventRead(MCONTACT contactID, MEVENT hDbEvent) // log1("mark read @ %08x", hContact);
dbe->flags |= DBEF_READ;
- DBWrite((DWORD)hDbEvent, dbe, sizeof(DBEvent));
+ DBWrite((uint32_t)hDbEvent, dbe, sizeof(DBEvent));
BOOL ret = dbe->flags;
- if (dbc.ofsFirstUnread == (DWORD)hDbEvent) {
+ if (dbc.ofsFirstUnread == (uint32_t)hDbEvent) {
for (;;) {
if (dbe->ofsNext == 0) {
dbc.ofsFirstUnread = 0;
dbc.tsFirstUnread = 0;
break;
}
- DWORD ofsThis = dbe->ofsNext;
+ uint32_t ofsThis = dbe->ofsNext;
dbe = (DBEvent*)DBRead(ofsThis, nullptr);
if (!dbe->markedRead()) {
dbc.ofsFirstUnread = ofsThis;
@@ -377,14 +377,14 @@ BOOL CDb3Mmap::MarkEventRead(MCONTACT contactID, MEVENT hDbEvent) MCONTACT CDb3Mmap::GetEventContact(MEVENT hDbEvent)
{
mir_cslock lck(m_csDbAccess);
- DBEvent *dbe = AdaptEvent((DWORD)hDbEvent, INVALID_CONTACT_ID);
+ DBEvent *dbe = AdaptEvent((uint32_t)hDbEvent, INVALID_CONTACT_ID);
return (dbe->signature != DBEVENT_SIGNATURE) ? INVALID_CONTACT_ID : dbe->contactID;
}
MEVENT CDb3Mmap::FindFirstEvent(MCONTACT contactID)
{
DBCachedContact *cc;
- DWORD ofsContact = GetContactOffset(contactID, &cc);
+ uint32_t ofsContact = GetContactOffset(contactID, &cc);
mir_cslock lck(m_csDbAccess);
DBContact *dbc = (DBContact*)DBRead(ofsContact, nullptr);
@@ -399,7 +399,7 @@ MEVENT CDb3Mmap::FindFirstEvent(MCONTACT contactID) if (dbc->signature != DBCONTACT_SIGNATURE)
return 0;
- for (DWORD dwOffset = dbc->ofsFirstEvent; dwOffset != 0;) {
+ for (uint32_t dwOffset = dbc->ofsFirstEvent; dwOffset != 0;) {
DBEvent *dbe = AdaptEvent(dwOffset, contactID);
if (dbe->signature != DBEVENT_SIGNATURE)
return 0;
@@ -413,7 +413,7 @@ MEVENT CDb3Mmap::FindFirstEvent(MCONTACT contactID) MEVENT CDb3Mmap::FindFirstUnreadEvent(MCONTACT contactID)
{
DBCachedContact *cc;
- DWORD ofsContact = GetContactOffset(contactID, &cc);
+ uint32_t ofsContact = GetContactOffset(contactID, &cc);
mir_cslock lck(m_csDbAccess);
DBContact *dbc = (DBContact*)DBRead(ofsContact, nullptr);
@@ -428,7 +428,7 @@ MEVENT CDb3Mmap::FindFirstUnreadEvent(MCONTACT contactID) if (dbc->signature != DBCONTACT_SIGNATURE)
return 0;
- for (DWORD dwOffset = dbc->ofsFirstUnread; dwOffset != 0;) {
+ for (uint32_t dwOffset = dbc->ofsFirstUnread; dwOffset != 0;) {
DBEvent *dbe = AdaptEvent(dwOffset, contactID);
if (dbe->signature != DBEVENT_SIGNATURE)
return 0;
@@ -442,7 +442,7 @@ MEVENT CDb3Mmap::FindFirstUnreadEvent(MCONTACT contactID) MEVENT CDb3Mmap::FindLastEvent(MCONTACT contactID)
{
DBCachedContact *cc;
- DWORD ofsContact = GetContactOffset(contactID, &cc);
+ uint32_t ofsContact = GetContactOffset(contactID, &cc);
mir_cslock lck(m_csDbAccess);
DBContact *dbc = (DBContact*)DBRead(ofsContact, nullptr);
@@ -457,7 +457,7 @@ MEVENT CDb3Mmap::FindLastEvent(MCONTACT contactID) if (dbc->signature != DBCONTACT_SIGNATURE)
return 0;
- for (DWORD dwOffset = dbc->ofsLastEvent; dwOffset != 0;) {
+ for (uint32_t dwOffset = dbc->ofsLastEvent; dwOffset != 0;) {
DBEvent *dbe = AdaptEvent(dwOffset, contactID);
if (dbe->signature != DBEVENT_SIGNATURE)
return 0;
@@ -473,13 +473,13 @@ MEVENT CDb3Mmap::FindNextEvent(MCONTACT contactID, MEVENT hDbEvent) DBCachedContact *cc = (contactID) ? m_cache->GetCachedContact(contactID) : nullptr;
mir_cslock lck(m_csDbAccess);
- DBEvent *dbe = AdaptEvent((DWORD)hDbEvent, contactID);
+ DBEvent *dbe = AdaptEvent((uint32_t)hDbEvent, contactID);
if (dbe->signature != DBEVENT_SIGNATURE)
return 0;
if (!cc || !cc->IsSub())
return MEVENT(dbe->ofsNext);
- for (DWORD dwOffset = dbe->ofsNext; dwOffset != 0;) {
+ for (uint32_t dwOffset = dbe->ofsNext; dwOffset != 0;) {
dbe = AdaptEvent(dwOffset, contactID);
if (dbe->signature != DBEVENT_SIGNATURE)
return 0;
@@ -495,13 +495,13 @@ MEVENT CDb3Mmap::FindPrevEvent(MCONTACT contactID, MEVENT hDbEvent) DBCachedContact *cc = (contactID) ? m_cache->GetCachedContact(contactID) : nullptr;
mir_cslock lck(m_csDbAccess);
- DBEvent *dbe = AdaptEvent((DWORD)hDbEvent, contactID);
+ DBEvent *dbe = AdaptEvent((uint32_t)hDbEvent, contactID);
if (dbe->signature != DBEVENT_SIGNATURE)
return 0;
if (!cc || !cc->IsSub())
return MEVENT(dbe->ofsPrev);
- for (DWORD dwOffset = dbe->ofsPrev; dwOffset != 0;) {
+ for (uint32_t dwOffset = dbe->ofsPrev; dwOffset != 0;) {
dbe = AdaptEvent(dwOffset, contactID);
if (dbe->signature != DBEVENT_SIGNATURE)
return 0;
@@ -512,7 +512,7 @@ MEVENT CDb3Mmap::FindPrevEvent(MCONTACT contactID, MEVENT hDbEvent) return 0;
}
-DBEvent* CDb3Mmap::AdaptEvent(DWORD ofs, DWORD dwContactID)
+DBEvent* CDb3Mmap::AdaptEvent(uint32_t ofs, uint32_t dwContactID)
{
if (m_dbHeader.version >= DB_095_1_VERSION)
return (DBEvent*)DBRead(ofs, nullptr);
@@ -520,7 +520,7 @@ DBEvent* CDb3Mmap::AdaptEvent(DWORD ofs, DWORD dwContactID) DBEvent_094 *pOldEvent = (DBEvent_094*)DBRead(ofs, nullptr);
m_tmpEvent.signature = pOldEvent->signature;
m_tmpEvent.contactID = dwContactID;
- memcpy(&m_tmpEvent.ofsPrev, &pOldEvent->ofsPrev, sizeof(DBEvent_094) - sizeof(DWORD));
+ memcpy(&m_tmpEvent.ofsPrev, &pOldEvent->ofsPrev, sizeof(DBEvent_094) - sizeof(uint32_t));
return &m_tmpEvent;
}
@@ -530,12 +530,12 @@ DBEvent* CDb3Mmap::AdaptEvent(DWORD ofs, DWORD dwContactID) int CDb3Mmap::WipeContactHistory(DBContact *dbc)
{
// drop subContact's history if any
- for (DWORD dwOffset = dbc->ofsFirstEvent; dwOffset != 0;) {
+ for (uint32_t dwOffset = dbc->ofsFirstEvent; dwOffset != 0;) {
DBEvent *pev = (DBEvent*)DBRead(dwOffset, nullptr);
if (pev->signature != DBEVENT_SIGNATURE) // broken chain, don't touch it
return 2;
- DWORD dwNext = pev->ofsNext;
+ uint32_t dwNext = pev->ofsNext;
DeleteSpace(dwOffset, offsetof(DBEvent, blob) + pev->cbBlob);
dwOffset = dwNext;
}
diff --git a/plugins/Db3x_mmap/src/dbintf.h b/plugins/Db3x_mmap/src/dbintf.h index 10daa4517c..3163af2516 100644 --- a/plugins/Db3x_mmap/src/dbintf.h +++ b/plugins/Db3x_mmap/src/dbintf.h @@ -68,7 +68,7 @@ DBHeader #define NeedBytes(n) if (bytesRemaining<(n)) pBlob = (uint8_t*)DBRead(ofsBlobPtr,&bytesRemaining)
#define MoveAlong(n) {int x = n; pBlob += (x); ofsBlobPtr += (x); bytesRemaining -= (x);}
-DWORD __forceinline GetSettingValueLength(uint8_t *pSetting)
+uint32_t __forceinline GetSettingValueLength(uint8_t *pSetting)
{
if (pSetting[0] & DBVTF_VARIABLELENGTH)
return 2 + *(PWORD)(pSetting + 1);
@@ -84,45 +84,45 @@ struct DBSignature struct ModuleName
{
char *name;
- DWORD ofs;
+ uint32_t ofs;
};
#include <pshpack1.h>
struct DBHeader
{
uint8_t signature[16]; // 'Miranda ICQ DB',0,26
- DWORD version; // as 4 bytes, ie 1.2.3.10 = 0x0102030a
- DWORD ofsFileEnd; // offset of the end of the database - place to write new structures
- DWORD slackSpace; // a counter of the number of bytes that have been
+ uint32_t version; // as 4 bytes, ie 1.2.3.10 = 0x0102030a
+ uint32_t ofsFileEnd; // offset of the end of the database - place to write new structures
+ uint32_t slackSpace; // a counter of the number of bytes that have been
// wasted so far due to deleting structures and/or
// re-making them at the end. We should compact when
// this gets above a threshold
- DWORD contactCount; // number of contacts in the chain,excluding the user
- DWORD ofsFirstContact; // offset to first DBContact in the chain
- DWORD ofsUser; // offset to DBContact representing the user
- DWORD ofsModuleNames; // offset to first struct DBModuleName in the chain
+ uint32_t contactCount; // number of contacts in the chain,excluding the user
+ uint32_t ofsFirstContact; // offset to first DBContact in the chain
+ uint32_t ofsUser; // offset to DBContact representing the user
+ uint32_t ofsModuleNames; // offset to first struct DBModuleName in the chain
};
#define DBCONTACT_SIGNATURE 0x43DECADEu
struct DBContact
{
- DWORD signature;
- DWORD ofsNext; // offset to the next contact in the chain. zero if
+ uint32_t signature;
+ uint32_t ofsNext; // offset to the next contact in the chain. zero if
// this is the 'user' contact or the last contact in the chain
- DWORD ofsFirstSettings; // offset to the first DBContactSettings in the chain for this contact.
- DWORD eventCount; // number of events in the chain for this contact
- DWORD ofsFirstEvent, // offsets to the first and
+ uint32_t ofsFirstSettings; // offset to the first DBContactSettings in the chain for this contact.
+ uint32_t eventCount; // number of events in the chain for this contact
+ uint32_t ofsFirstEvent, // offsets to the first and
ofsLastEvent; // last DBEvent in the chain for this contact
- DWORD ofsFirstUnread; // offset to the first (chronological) unread event in the chain, 0 if all are read
- DWORD tsFirstUnread; // timestamp of the event at ofsFirstUnread
- DWORD dwContactID;
+ uint32_t ofsFirstUnread; // offset to the first (chronological) unread event in the chain, 0 if all are read
+ uint32_t tsFirstUnread; // timestamp of the event at ofsFirstUnread
+ uint32_t dwContactID;
};
#define DBMODULENAME_SIGNATURE 0x4DDECADEu
struct DBModuleName
{
- DWORD signature;
- DWORD ofsNext; // offset to the next module name in the chain
+ uint32_t signature;
+ uint32_t ofsNext; // offset to the next module name in the chain
uint8_t cbName; // number of characters in this module name
char name[1]; // name, no nul terminator
};
@@ -130,10 +130,10 @@ struct DBModuleName #define DBCONTACTSETTINGS_SIGNATURE 0x53DECADEu
struct DBContactSettings
{
- DWORD signature;
- DWORD ofsNext; // offset to the next contactsettings in the chain
- DWORD ofsModuleName; // offset to the DBModuleName of the owner of these settings
- DWORD cbBlob; // size of the blob in bytes. May be larger than the
+ uint32_t signature;
+ uint32_t ofsNext; // offset to the next contactsettings in the chain
+ uint32_t ofsModuleName; // offset to the DBModuleName of the owner of these settings
+ uint32_t cbBlob; // size of the blob in bytes. May be larger than the
// actual size for reducing the number of moves
// required using granularity in resizing
uint8_t blob[1]; // the blob. a back-to-back sequence of DBSetting
@@ -143,30 +143,30 @@ struct DBContactSettings #define DBEVENT_SIGNATURE 0x45DECADEu
struct DBEvent_094 // previous event storage format
{
- DWORD signature;
- DWORD ofsPrev, ofsNext; // offset to the previous and next events in the
+ uint32_t signature;
+ uint32_t ofsPrev, ofsNext; // offset to the previous and next events in the
// chain. Chain is sorted chronologically
- DWORD ofsModuleName; // offset to a DBModuleName struct of the name of
+ uint32_t ofsModuleName; // offset to a DBModuleName struct of the name of
// the owner of this event
- DWORD timestamp; // seconds since 00:00:00 01/01/1970
- DWORD flags; // see m_database.h, db/event/add
+ uint32_t timestamp; // seconds since 00:00:00 01/01/1970
+ uint32_t flags; // see m_database.h, db/event/add
uint16_t wEventType; // module-defined event type
- DWORD cbBlob; // number of bytes in the blob
+ uint32_t cbBlob; // number of bytes in the blob
uint8_t blob[1]; // the blob. module-defined formatting
};
struct DBEvent
{
- DWORD signature;
+ uint32_t signature;
MCONTACT contactID; // a contact this event belongs to
- DWORD ofsPrev, ofsNext; // offset to the previous and next events in the
+ uint32_t ofsPrev, ofsNext; // offset to the previous and next events in the
// chain. Chain is sorted chronologically
- DWORD ofsModuleName; // offset to a DBModuleName struct of the name of
+ uint32_t ofsModuleName; // offset to a DBModuleName struct of the name of
// the owner of this event
- DWORD timestamp; // seconds since 00:00:00 01/01/1970
- DWORD flags; // see m_database.h, db/event/add
+ uint32_t timestamp; // seconds since 00:00:00 01/01/1970
+ uint32_t flags; // see m_database.h, db/event/add
uint16_t wEventType; // module-defined event type
- DWORD cbBlob; // number of bytes in the blob
+ uint32_t cbBlob; // number of bytes in the blob
uint8_t blob[1]; // the blob. module-defined formatting
bool __forceinline markedRead() const
@@ -179,7 +179,7 @@ struct DBEvent struct DBCachedContact : public DBCachedContactBase
{
- DWORD dwOfsContact;
+ uint32_t dwOfsContact;
};
struct CDb3Mmap : public MDatabaseCommon, public MZeroedObject
@@ -245,13 +245,13 @@ public: STDMETHODIMP_(DATABASELINK*) GetDriver() override;
protected:
- DWORD GetSettingsGroupOfsByModuleNameOfs(DBContact *dbc, DWORD ofsModuleName);
- void InvalidateSettingsGroupOfsCacheEntry(DWORD) {}
+ uint32_t GetSettingsGroupOfsByModuleNameOfs(DBContact *dbc, uint32_t ofsModuleName);
+ void InvalidateSettingsGroupOfsCacheEntry(uint32_t) {}
- void DBMoveChunk(DWORD ofsDest, DWORD ofsSource, int bytes);
- uint8_t* DBRead(DWORD ofs, int *bytesAvail);
- void DBWrite(DWORD ofs, PVOID pData, int bytes);
- void DBFill(DWORD ofs, int bytes);
+ void DBMoveChunk(uint32_t ofsDest, uint32_t ofsSource, int bytes);
+ uint8_t* DBRead(uint32_t ofs, int *bytesAvail);
+ void DBWrite(uint32_t ofs, PVOID pData, int bytes);
+ void DBFill(uint32_t ofs, int bytes);
void DBFlush(int setting);
int InitMap(void);
void FillContacts(void);
@@ -259,29 +259,29 @@ protected: uint8_t* m_pNull;
void Map();
- void ReMap(DWORD needed);
+ void ReMap(uint32_t needed);
protected:
wchar_t* m_tszProfileName;
HANDLE m_hDbFile;
DBHeader m_dbHeader;
- DWORD m_ChunkSize;
+ uint32_t m_ChunkSize;
bool m_safetyMode, m_bReadOnly, m_bShared;
////////////////////////////////////////////////////////////////////////////
// database stuff
public:
UINT_PTR m_flushBuffersTimerId;
- DWORD m_flushFailTick;
+ uint32_t m_flushFailTick;
uint8_t* m_pDbCache;
HANDLE m_hMap;
protected:
- DWORD m_dwFileSize, m_dwMaxContactId;
+ uint32_t m_dwFileSize, m_dwMaxContactId;
- DWORD CreateNewSpace(int bytes);
- void DeleteSpace(DWORD ofs, int bytes);
- DWORD ReallocSpace(DWORD ofs, int oldSize, int newSize);
+ uint32_t CreateNewSpace(int bytes);
+ void DeleteSpace(uint32_t ofs, int bytes);
+ uint32_t ReallocSpace(uint32_t ofs, int oldSize, int newSize);
////////////////////////////////////////////////////////////////////////////
// settings
@@ -292,14 +292,14 @@ protected: // contacts
int WipeContactHistory(DBContact *dbc);
- DWORD GetContactOffset(MCONTACT contactID, DBCachedContact **cc = nullptr);
+ uint32_t GetContactOffset(MCONTACT contactID, DBCachedContact **cc = nullptr);
////////////////////////////////////////////////////////////////////////////
// events
DBEvent m_tmpEvent;
- DBEvent* AdaptEvent(DWORD offset, DWORD hContact);
+ DBEvent* AdaptEvent(uint32_t offset, uint32_t hContact);
////////////////////////////////////////////////////////////////////////////
// modules
@@ -309,11 +309,11 @@ protected: MCONTACT m_hLastCachedContact;
ModuleName *m_lastmn;
- void AddToList(char *name, DWORD ofs);
- DWORD FindExistingModuleNameOfs(const char *szName);
+ void AddToList(char *name, uint32_t ofs);
+ uint32_t FindExistingModuleNameOfs(const char *szName);
int InitModuleNames(void);
- DWORD GetModuleNameOfs(const char *szName);
- char* GetModuleNameByOfs(DWORD ofs);
+ uint32_t GetModuleNameOfs(const char *szName);
+ char* GetModuleNameByOfs(uint32_t ofs);
////////////////////////////////////////////////////////////////////////////
// encryption
diff --git a/plugins/Db3x_mmap/src/dbmodulechain.cpp b/plugins/Db3x_mmap/src/dbmodulechain.cpp index 6c64391bfb..96bb85d110 100644 --- a/plugins/Db3x_mmap/src/dbmodulechain.cpp +++ b/plugins/Db3x_mmap/src/dbmodulechain.cpp @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
-void CDb3Mmap::AddToList(char *name, DWORD ofs)
+void CDb3Mmap::AddToList(char *name, uint32_t ofs)
{
ModuleName *mn = (ModuleName*)HeapAlloc(m_hModHeap, 0, sizeof(ModuleName));
mn->name = name;
@@ -40,7 +40,7 @@ void CDb3Mmap::AddToList(char *name, DWORD ofs) int CDb3Mmap::InitModuleNames(void)
{
- DWORD ofsThis = m_dbHeader.ofsModuleNames;
+ uint32_t ofsThis = m_dbHeader.ofsModuleNames;
DBModuleName *dbmn = (struct DBModuleName*)DBRead(ofsThis, nullptr);
while (ofsThis) {
if (dbmn->signature != DBMODULENAME_SIGNATURE)
@@ -60,7 +60,7 @@ int CDb3Mmap::InitModuleNames(void) return 0;
}
-DWORD CDb3Mmap::FindExistingModuleNameOfs(const char *szName)
+uint32_t CDb3Mmap::FindExistingModuleNameOfs(const char *szName)
{
ModuleName mn = { (char*)szName, 0 };
if (m_lastmn && !mir_strcmp(mn.name, m_lastmn->name))
@@ -77,9 +77,9 @@ DWORD CDb3Mmap::FindExistingModuleNameOfs(const char *szName) }
// will create the offset if it needs to
-DWORD CDb3Mmap::GetModuleNameOfs(const char *szName)
+uint32_t CDb3Mmap::GetModuleNameOfs(const char *szName)
{
- DWORD ofsExisting = FindExistingModuleNameOfs(szName);
+ uint32_t ofsExisting = FindExistingModuleNameOfs(szName);
if (ofsExisting)
return ofsExisting;
@@ -89,7 +89,7 @@ DWORD CDb3Mmap::GetModuleNameOfs(const char *szName) int nameLen = (int)mir_strlen(szName);
// need to create the module name
- DWORD ofsNew = CreateNewSpace(nameLen + offsetof(struct DBModuleName, name));
+ uint32_t ofsNew = CreateNewSpace(nameLen + offsetof(struct DBModuleName, name));
DBModuleName dbmn;
dbmn.signature = DBMODULENAME_SIGNATURE;
@@ -110,7 +110,7 @@ DWORD CDb3Mmap::GetModuleNameOfs(const char *szName) return ofsNew;
}
-char* CDb3Mmap::GetModuleNameByOfs(DWORD ofs)
+char* CDb3Mmap::GetModuleNameByOfs(uint32_t ofs)
{
if (m_lastmn && m_lastmn->ofs == ofs)
return m_lastmn->name;
diff --git a/plugins/Db3x_mmap/src/dbsettings.cpp b/plugins/Db3x_mmap/src/dbsettings.cpp index 26c2361b5b..16757fe6c8 100644 --- a/plugins/Db3x_mmap/src/dbsettings.cpp +++ b/plugins/Db3x_mmap/src/dbsettings.cpp @@ -90,19 +90,19 @@ LBL_Seek: return 1;
DBCachedContact *cc;
- DWORD ofsContact = GetContactOffset(contactID, &cc);
+ uint32_t ofsContact = GetContactOffset(contactID, &cc);
- DWORD ofsModuleName = GetModuleNameOfs(szModule);
+ uint32_t ofsModuleName = GetModuleNameOfs(szModule);
DBContact dbc = *(DBContact*)DBRead(ofsContact, nullptr);
if (dbc.signature != DBCONTACT_SIGNATURE)
return 1;
- DWORD ofsSettingsGroup = GetSettingsGroupOfsByModuleNameOfs(&dbc, ofsModuleName);
+ uint32_t ofsSettingsGroup = GetSettingsGroupOfsByModuleNameOfs(&dbc, ofsModuleName);
if (ofsSettingsGroup) {
int bytesRemaining;
unsigned varLen;
- DWORD ofsBlobPtr = ofsSettingsGroup + offsetof(DBContactSettings, blob);
+ uint32_t ofsBlobPtr = ofsSettingsGroup + offsetof(DBContactSettings, blob);
uint8_t *pBlob = DBRead(ofsBlobPtr, &bytesRemaining);
while (pBlob[0]) {
NeedBytes(1 + settingNameLen);
@@ -223,14 +223,14 @@ STDMETHODIMP_(BOOL) CDb3Mmap::WriteContactSettingWorker(MCONTACT contactID, DBCO {
log1(" write database as %s", printVariant(&dbcws.value));
- DWORD settingNameLen = (DWORD)mir_strlen(dbcws.szSetting);
- DWORD ofsBlobPtr, ofsContact = GetContactOffset(contactID);
+ uint32_t settingNameLen = (uint32_t)mir_strlen(dbcws.szSetting);
+ uint32_t ofsBlobPtr, ofsContact = GetContactOffset(contactID);
if (ofsContact == 0) {
_ASSERT(false); // contact doesn't exist?
return 2;
}
- DWORD ofsModuleName = GetModuleNameOfs(dbcws.szModule);
+ uint32_t ofsModuleName = GetModuleNameOfs(dbcws.szModule);
DBContact dbc = *(DBContact*)DBRead(ofsContact, nullptr);
if (dbc.signature != DBCONTACT_SIGNATURE)
return 1;
@@ -239,7 +239,7 @@ STDMETHODIMP_(BOOL) CDb3Mmap::WriteContactSettingWorker(MCONTACT contactID, DBCO uint8_t *pBlob;
int bytesRequired, bytesRemaining;
DBContactSettings dbcs;
- DWORD ofsSettingsGroup = GetSettingsGroupOfsByModuleNameOfs(&dbc, ofsModuleName);
+ uint32_t ofsSettingsGroup = GetSettingsGroupOfsByModuleNameOfs(&dbc, ofsModuleName);
if (ofsSettingsGroup == 0) { //module group didn't exist - make it
switch (dbcws.value.type) {
case DBVT_ASCIIZ: case DBVT_UTF8:
@@ -295,7 +295,7 @@ STDMETHODIMP_(BOOL) CDb3Mmap::WriteContactSettingWorker(MCONTACT contactID, DBCO NeedBytes(3);
int nameLen = 1 + settingNameLen;
int valLen = 1 + GetSettingValueLength(pBlob);
- DWORD ofsSettingToCut = ofsBlobPtr - nameLen;
+ uint32_t ofsSettingToCut = ofsBlobPtr - nameLen;
MoveAlong(valLen);
NeedBytes(1);
while (pBlob[0]) {
@@ -350,10 +350,10 @@ STDMETHODIMP_(BOOL) CDb3Mmap::WriteContactSettingWorker(MCONTACT contactID, DBCO bytesRequired += 2 + settingNameLen;
bytesRequired += ofsBlobPtr + 1 - (ofsSettingsGroup + offsetof(DBContactSettings, blob));
- if ((DWORD)bytesRequired > dbcs.cbBlob) {
+ if ((uint32_t)bytesRequired > dbcs.cbBlob) {
// doesn't fit: move entire group
DBContactSettings *dbcsPrev;
- DWORD ofsDbcsPrev, ofsNew;
+ uint32_t ofsDbcsPrev, ofsNew;
InvalidateSettingsGroupOfsCacheEntry(ofsSettingsGroup);
bytesRequired += (DB_SETTINGS_RESIZE_GRANULARITY - (bytesRequired % DB_SETTINGS_RESIZE_GRANULARITY)) % DB_SETTINGS_RESIZE_GRANULARITY;
@@ -453,19 +453,19 @@ STDMETHODIMP_(BOOL) CDb3Mmap::DeleteContactSetting(MCONTACT contactID, LPCSTR sz mir_cslock lck(m_csDbAccess);
char *szCachedSettingName = m_cache->GetCachedSetting(szModule, szSetting, moduleNameLen, settingNameLen);
if (szCachedSettingName[-1] == 0) { // it's not a resident variable
- DWORD ofsModuleName = GetModuleNameOfs(szModule);
- DWORD ofsContact = GetContactOffset(contactID);
+ uint32_t ofsModuleName = GetModuleNameOfs(szModule);
+ uint32_t ofsContact = GetContactOffset(contactID);
DBContact *dbc = (DBContact*)DBRead(ofsContact, nullptr);
if (dbc->signature != DBCONTACT_SIGNATURE)
return 1;
// make sure the module group exists
- DWORD ofsSettingsGroup = GetSettingsGroupOfsByModuleNameOfs(dbc, ofsModuleName);
+ uint32_t ofsSettingsGroup = GetSettingsGroupOfsByModuleNameOfs(dbc, ofsModuleName);
if (ofsSettingsGroup == 0)
return 1;
// find if the setting exists
- DWORD ofsBlobPtr = ofsSettingsGroup + offsetof(DBContactSettings, blob);
+ uint32_t ofsBlobPtr = ofsSettingsGroup + offsetof(DBContactSettings, blob);
int bytesRemaining;
uint8_t *pBlob = (uint8_t*)DBRead(ofsBlobPtr, &bytesRemaining);
while (pBlob[0]) {
@@ -486,7 +486,7 @@ STDMETHODIMP_(BOOL) CDb3Mmap::DeleteContactSetting(MCONTACT contactID, LPCSTR sz NeedBytes(3);
int nameLen = 1 + settingNameLen;
int valLen = 1 + GetSettingValueLength(pBlob);
- DWORD ofsSettingToCut = ofsBlobPtr - nameLen;
+ uint32_t ofsSettingToCut = ofsBlobPtr - nameLen;
MoveAlong(valLen);
NeedBytes(1);
while (pBlob[0]) {
@@ -524,7 +524,7 @@ STDMETHODIMP_(BOOL) CDb3Mmap::EnumContactSettings(MCONTACT contactID, DBSETTINGE mir_cslock lck(m_csDbAccess);
- DWORD ofsContact = GetContactOffset(contactID);
+ uint32_t ofsContact = GetContactOffset(contactID);
if (ofsContact == 0)
return -1;
@@ -532,12 +532,12 @@ STDMETHODIMP_(BOOL) CDb3Mmap::EnumContactSettings(MCONTACT contactID, DBSETTINGE if (dbc->signature != DBCONTACT_SIGNATURE)
return -1;
- DWORD ofsModuleName = GetModuleNameOfs(szModule);
- DWORD ofsSettings = GetSettingsGroupOfsByModuleNameOfs(dbc, ofsModuleName);
+ uint32_t ofsModuleName = GetModuleNameOfs(szModule);
+ uint32_t ofsSettings = GetSettingsGroupOfsByModuleNameOfs(dbc, ofsModuleName);
if (!ofsSettings)
return -1;
- DWORD ofsBlobPtr = ofsSettings + offsetof(DBContactSettings, blob);
+ uint32_t ofsBlobPtr = ofsSettings + offsetof(DBContactSettings, blob);
int bytesRemaining;
uint8_t *pBlob = (uint8_t*)DBRead(ofsBlobPtr, &bytesRemaining);
if (pBlob[0] == 0)
diff --git a/plugins/DbChecker/src/stdafx.h b/plugins/DbChecker/src/stdafx.h index 9d2213a64c..7453cc1686 100644 --- a/plugins/DbChecker/src/stdafx.h +++ b/plugins/DbChecker/src/stdafx.h @@ -62,7 +62,7 @@ struct DbToolOptions : public MZeroedObject MDatabaseCommon *db; MIDatabaseChecker *dbChecker; - DWORD error; + uint32_t error; HANDLE hEventRun, hEventAbort; bool bFinished, bAutoExit, bOwnsDb, bMarkRead, bCheckUtf; wchar_t filename[MAX_PATH]; diff --git a/plugins/DbChecker/src/wizard.cpp b/plugins/DbChecker/src/wizard.cpp index 370b3935a1..c19fab31d6 100644 --- a/plugins/DbChecker/src/wizard.cpp +++ b/plugins/DbChecker/src/wizard.cpp @@ -28,8 +28,8 @@ HFONT hBoldFont = nullptr; static BOOL CALLBACK MyControlsEnumChildren(HWND hwnd, LPARAM) { - DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE); - DWORD exstyle = GetWindowLongPtr(hwnd, GWL_EXSTYLE); + uint32_t style = GetWindowLongPtr(hwnd, GWL_STYLE); + uint32_t exstyle = GetWindowLongPtr(hwnd, GWL_EXSTYLE); char szClass[64]; int makeBold = 0; diff --git a/plugins/DbChecker/src/worker.cpp b/plugins/DbChecker/src/worker.cpp index 390dd42921..732119bc46 100644 --- a/plugins/DbChecker/src/worker.cpp +++ b/plugins/DbChecker/src/worker.cpp @@ -50,7 +50,7 @@ static bool ConvertOldEvent(DBEVENTINFO &dbei) mir_free(dbei.pBlob); dbei.flags |= DBEF_UTF; - dbei.cbBlob = (DWORD)mir_strlen(utf8str); + dbei.cbBlob = (uint32_t)mir_strlen(utf8str); dbei.pBlob = (uint8_t*)utf8str; return true; } @@ -61,7 +61,7 @@ void __cdecl WorkerThread(DbToolOptions *opts) AddToStatus(STATUS_MESSAGE, TranslateT("Database worker thread activated")); - DWORD sp = 0; + uint32_t sp = 0; if (opts->bMarkRead || opts->bCheckUtf) { int nCount = 0, nUtfCount = 0; diff --git a/plugins/DbEditorPP/src/exportimport.cpp b/plugins/DbEditorPP/src/exportimport.cpp index fcd3b9d226..d835bf60de 100644 --- a/plugins/DbEditorPP/src/exportimport.cpp +++ b/plugins/DbEditorPP/src/exportimport.cpp @@ -364,7 +364,7 @@ void importSettings(MCONTACT hContact, char *utf8) case 'd':
case 'D':
if (sscanf(end + 2, "%u", &value) == 1)
- db_set_dw(hContact, module, setting, (DWORD)value);
+ db_set_dw(hContact, module, setting, (uint32_t)value);
break;
case 's':
case 'S':
@@ -477,7 +477,7 @@ void ImportSettingsFromFileMenuItem(MCONTACT hContact, const char *FilePath) wchar_t szPath[MAX_PATH] = {};
wchar_t szFile[MAX_PATH];
- DWORD offset = 0;
+ uint32_t offset = 0;
mir_wstrcpy(szFileNames, L"");
@@ -491,7 +491,7 @@ void ImportSettingsFromFileMenuItem(MCONTACT hContact, const char *FilePath) int index = 0;
if (mir_wstrcmp(szFileNames, L"")) {
- if ((DWORD)mir_wstrlen(szFileNames) < offset) {
+ if ((uint32_t)mir_wstrlen(szFileNames) < offset) {
index += offset;
mir_wstrncpy(szPath, szFileNames, offset);
mir_wstrcat(szPath, L"\\");
diff --git a/plugins/DbEditorPP/src/findwindow.cpp b/plugins/DbEditorPP/src/findwindow.cpp index 45716efdd2..cf669b3970 100644 --- a/plugins/DbEditorPP/src/findwindow.cpp +++ b/plugins/DbEditorPP/src/findwindow.cpp @@ -136,7 +136,7 @@ class CFindWindowDlg : public CDlgBase int foundCount = 0, replaceCount = 0, deleteCount = 0;
- DWORD numsearch = 0, numreplace = 0;
+ uint32_t numsearch = 0, numreplace = 0;
int NULLContactDone = 0;
if (!fi->search || !EnumModules(&ModuleList)) {
diff --git a/plugins/DbEditorPP/src/settinglist.cpp b/plugins/DbEditorPP/src/settinglist.cpp index 27676f45e7..eca77599a6 100644 --- a/plugins/DbEditorPP/src/settinglist.cpp +++ b/plugins/DbEditorPP/src/settinglist.cpp @@ -13,7 +13,7 @@ int convertSetting(MCONTACT hContact, const char *module, const char *setting, i }
int res = 0;
- DWORD val = 0;
+ uint32_t val = 0;
wchar_t tmp[16];
ptrW value;
@@ -481,7 +481,7 @@ bool CMainDlg::EditLabelWndProc(HWND hwnd, UINT uMsg, WPARAM wParam) break;
case 1: // value
- DWORD val;
+ uint32_t val;
int i = 0;
if (dbv.type == DBVT_BLOB) {
diff --git a/plugins/DbEditorPP/src/stdafx.h b/plugins/DbEditorPP/src/stdafx.h index f7c621ce44..0934c31319 100644 --- a/plugins/DbEditorPP/src/stdafx.h +++ b/plugins/DbEditorPP/src/stdafx.h @@ -50,7 +50,7 @@ struct CMPlugin : public PLUGIN<CMPlugin> {
CMOption<bool> bExpandSettingsOnOpen, bRestoreOnOpen, bWarnOnDelete;
CMOption<uint16_t> iPopupDelay;
- CMOption<DWORD> iPopupBkColor, iPopupTxtColor;
+ CMOption<uint32_t> iPopupBkColor, iPopupTxtColor;
CMPlugin();
@@ -178,8 +178,8 @@ extern bool g_bUsePopups; char *StringFromBlob(uint8_t *blob, uint16_t len);
int WriteBlobFromString(MCONTACT hContact, const char *module, const char *setting, const char *value, int len);
wchar_t *DBVType(uint8_t type);
-DWORD getNumericValue(DBVARIANT *dbv);
-int setNumericValue(MCONTACT hContact, const char *module, const char *setting, DWORD value, int type);
+uint32_t getNumericValue(DBVARIANT *dbv);
+int setNumericValue(MCONTACT hContact, const char *module, const char *setting, uint32_t value, int type);
int IsRealUnicode(wchar_t *value);
int setTextValue(MCONTACT hContact, const char *module, const char *setting, wchar_t *value, int type);
int GetValueA(MCONTACT hContact, const char *module, const char *setting, char *value, int length);
diff --git a/plugins/DbEditorPP/src/utils.cpp b/plugins/DbEditorPP/src/utils.cpp index d38a5e873a..fdda3d4fd5 100644 --- a/plugins/DbEditorPP/src/utils.cpp +++ b/plugins/DbEditorPP/src/utils.cpp @@ -92,7 +92,7 @@ wchar_t* DBVType(uint8_t type) switch (type) { case DBVT_BYTE: return L"uint8_t"; case DBVT_WORD: return L"uint16_t"; - case DBVT_DWORD: return L"DWORD"; + case DBVT_DWORD: return L"uint32_t"; case DBVT_ASCIIZ: return L"STRING"; case DBVT_WCHAR: case DBVT_UTF8: return L"UNICODE"; @@ -102,7 +102,7 @@ wchar_t* DBVType(uint8_t type) return L""; } -DWORD getNumericValue(DBVARIANT *dbv) +uint32_t getNumericValue(DBVARIANT *dbv) { switch (dbv->type) { case DBVT_DWORD: @@ -115,7 +115,7 @@ DWORD getNumericValue(DBVARIANT *dbv) return 0; } -int setNumericValue(MCONTACT hContact, const char *module, const char *setting, DWORD value, int type) +int setNumericValue(MCONTACT hContact, const char *module, const char *setting, uint32_t value, int type) { switch (type) { case DBVT_BYTE: diff --git a/plugins/Db_autobackups/src/backup.cpp b/plugins/Db_autobackups/src/backup.cpp index fce17e44fd..21d3f0d826 100644 --- a/plugins/Db_autobackups/src/backup.cpp +++ b/plugins/Db_autobackups/src/backup.cpp @@ -265,7 +265,7 @@ static int Backup(wchar_t *backup_filename) SendDlgItemMessage(progress_dialog, IDC_PROGRESS, PBM_SETPOS, (WPARAM)(100), 0);
UpdateWindow(progress_dialog);
}
- g_plugin.setDword("LastBackupTimestamp", (DWORD)time(0));
+ g_plugin.setDword("LastBackupTimestamp", (uint32_t)time(0));
NotifyEventHooks(g_plugin.hevBackup);
if (g_plugin.use_cloudfile) {
diff --git a/plugins/Dbx_mdbx/src/dbevents.cpp b/plugins/Dbx_mdbx/src/dbevents.cpp index 18b59b6606..98707f4415 100644 --- a/plugins/Dbx_mdbx/src/dbevents.cpp +++ b/plugins/Dbx_mdbx/src/dbevents.cpp @@ -310,14 +310,14 @@ BOOL CDbxMDBX::GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbei) dbei->flags = dbe->flags;
dbei->eventType = dbe->wEventType;
- DWORD cbBlob = dbe->cbBlob;
+ uint32_t cbBlob = dbe->cbBlob;
size_t bytesToCopy = cbBlob;
if (dbei->cbBlob == -1)
dbei->pBlob = (uint8_t*)mir_calloc(cbBlob + 2);
else if (dbei->cbBlob < cbBlob)
bytesToCopy = dbei->cbBlob;
- dbei->cbBlob = (DWORD)cbBlob;
+ dbei->cbBlob = (uint32_t)cbBlob;
if (bytesToCopy && dbei->pBlob) {
uint8_t *pSrc = (uint8_t*)dbe + sizeof(DBEvent);
if (dbe->flags & DBEF_ENCRYPTED) {
diff --git a/plugins/Dbx_mdbx/src/dbintf.h b/plugins/Dbx_mdbx/src/dbintf.h index b85559e33d..aa09105efa 100644 --- a/plugins/Dbx_mdbx/src/dbintf.h +++ b/plugins/Dbx_mdbx/src/dbintf.h @@ -99,7 +99,7 @@ struct DBSettingValue {
uint8_t bVal;
uint16_t wVal;
- DWORD dwVal;
+ uint32_t dwVal;
char szVal[];
struct
diff --git a/plugins/Dbx_mdbx/src/dbsettings.cpp b/plugins/Dbx_mdbx/src/dbsettings.cpp index 737a2d607b..2018bb10be 100644 --- a/plugins/Dbx_mdbx/src/dbsettings.cpp +++ b/plugins/Dbx_mdbx/src/dbsettings.cpp @@ -55,7 +55,7 @@ void CDbxMDBX::FillSettings() switch (iType) {
case DBVT_BYTE: dbv->bVal = *pBlob; break;
case DBVT_WORD: dbv->wVal = *(uint16_t*)pBlob; break;
- case DBVT_DWORD: dbv->dVal = *(DWORD*)pBlob; break;
+ case DBVT_DWORD: dbv->dVal = *(uint32_t*)pBlob; break;
case DBVT_UTF8:
case DBVT_ASCIIZ:
@@ -118,7 +118,7 @@ BOOL CDbxMDBX::WriteContactSettingWorker(MCONTACT contactID, DBCONTACTWRITESETTI switch (dbcws.value.type) {
case DBVT_BYTE: *pBlob = dbcws.value.bVal; break;
case DBVT_WORD: *(uint16_t*)pBlob = dbcws.value.wVal; break;
- case DBVT_DWORD: *(DWORD*)pBlob = dbcws.value.dVal; break;
+ case DBVT_DWORD: *(uint32_t*)pBlob = dbcws.value.dVal; break;
case DBVT_ASCIIZ:
case DBVT_UTF8:
diff --git a/plugins/Dbx_sqlite/src/dbevents.cpp b/plugins/Dbx_sqlite/src/dbevents.cpp index d44f7fd062..155b32dc70 100755 --- a/plugins/Dbx_sqlite/src/dbevents.cpp +++ b/plugins/Dbx_sqlite/src/dbevents.cpp @@ -309,7 +309,7 @@ BOOL CDbxSQLite::GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbei) dbei->eventType = sqlite3_column_int(stmt, 2); dbei->flags = sqlite3_column_int64(stmt, 3); - DWORD cbBlob = sqlite3_column_int64(stmt, 4); + uint32_t cbBlob = sqlite3_column_int64(stmt, 4); size_t bytesToCopy = cbBlob; if (dbei->cbBlob == -1) dbei->pBlob = (uint8_t*)mir_calloc(cbBlob + 2); @@ -348,7 +348,7 @@ BOOL CDbxSQLite::MarkEventRead(MCONTACT hContact, MEVENT hDbEvent) if (cc == nullptr) return -1; - DWORD flags = 0; + uint32_t flags = 0; { mir_cslock lock(m_csDbAccess); sqlite3_stmt *stmt = InitQuery("SELECT flags FROM events WHERE id = ? LIMIT 1;", qEvGetFlags); diff --git a/plugins/Exchange/src/MirandaExchange.cpp b/plugins/Exchange/src/MirandaExchange.cpp index 671769cf9f..e85014b139 100644 --- a/plugins/Exchange/src/MirandaExchange.cpp +++ b/plugins/Exchange/src/MirandaExchange.cpp @@ -406,7 +406,7 @@ HRESULT CMirandaExchange::InitializeAndLogin(LPCTSTR szUsername, LPCTSTR szPassw return hr;
}
- DWORD dwFlags = MAPI_EXPLICIT_PROFILE | MAPI_EXTENDED | MAPI_NEW_SESSION | MAPI_NO_MAIL;
+ uint32_t dwFlags = MAPI_EXPLICIT_PROFILE | MAPI_EXTENDED | MAPI_NEW_SESSION | MAPI_NO_MAIL;
hr = MAPILogonEx(0, (LPTSTR)mir_u2a(szPIDandName), (LPTSTR)mir_u2a(m_szPassword), dwFlags, &m_lpMAPISession);
if (FAILED(hr)) {
diff --git a/plugins/Exchange/src/emails.h b/plugins/Exchange/src/emails.h index 6d90641cc8..fe63fe2b02 100644 --- a/plugins/Exchange/src/emails.h +++ b/plugins/Exchange/src/emails.h @@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct TEmailHeader{
int cbSize;
- DWORD flags; //flags
+ uint32_t flags; //flags
wchar_t *szSender; //pointer to string that receives the sender name
int cSender; //size of szSender buffer
wchar_t *szSubject; //pointer to string that receives the email subject
diff --git a/plugins/FTPFileYM/src/dbentry.h b/plugins/FTPFileYM/src/dbentry.h index 8b0af27736..ee8cf20f86 100644 --- a/plugins/FTPFileYM/src/dbentry.h +++ b/plugins/FTPFileYM/src/dbentry.h @@ -32,7 +32,7 @@ public: int m_fileID;
int m_iFtpNum;
char m_szFileName[256];
- DWORD m_deleteTS;
+ uint32_t m_deleteTS;
static mir_cs mutexDB;
diff --git a/plugins/FTPFileYM/src/ftpfile.cpp b/plugins/FTPFileYM/src/ftpfile.cpp index 05faa74ac4..f9df1e5591 100644 --- a/plugins/FTPFileYM/src/ftpfile.cpp +++ b/plugins/FTPFileYM/src/ftpfile.cpp @@ -251,7 +251,7 @@ int TabsrmmButtonPressed(WPARAM hContact, LPARAM lParam) return 0;
}
-int UploadFile(MCONTACT hContact, int m_iFtpNum, GenericJob::EMode mode, void **objects, int objCount, DWORD flags)
+int UploadFile(MCONTACT hContact, int m_iFtpNum, GenericJob::EMode mode, void **objects, int objCount, uint32_t flags)
{
if (!ftpList[m_iFtpNum]->isValid()) {
Utils::msgBox(TranslateT("You have to fill FTP server setting before upload a file."), MB_OK | MB_ICONERROR);
diff --git a/plugins/FTPFileYM/src/job_generic.cpp b/plugins/FTPFileYM/src/job_generic.cpp index 68e008dfb9..af95440516 100644 --- a/plugins/FTPFileYM/src/job_generic.cpp +++ b/plugins/FTPFileYM/src/job_generic.cpp @@ -146,7 +146,7 @@ int GenericJob::getFiles() return 1;
}
-int GenericJob::getFiles(void **objects, int objCount, DWORD flags)
+int GenericJob::getFiles(void **objects, int objCount, uint32_t flags)
{
if (m_mode == FTP_ZIPFOLDER) {
wchar_t *folder;
diff --git a/plugins/FTPFileYM/src/job_generic.h b/plugins/FTPFileYM/src/job_generic.h index f8ce9f36a9..9da3fc25d6 100644 --- a/plugins/FTPFileYM/src/job_generic.h +++ b/plugins/FTPFileYM/src/job_generic.h @@ -84,7 +84,7 @@ public: virtual ~GenericJob();
int getFiles();
- int getFiles(void **objects, int objCount, DWORD flags);
+ int getFiles(void **objects, int objCount, uint32_t flags);
void setStatus(EStatus status);
bool isCompleted();
diff --git a/plugins/FTPFileYM/src/job_packer.cpp b/plugins/FTPFileYM/src/job_packer.cpp index c0e8ca7115..318730d529 100644 --- a/plugins/FTPFileYM/src/job_packer.cpp +++ b/plugins/FTPFileYM/src/job_packer.cpp @@ -224,7 +224,7 @@ uLong PackerJob::getFileTime(wchar_t *file, tm_zip*, uLong *dt) void PackerJob::updateStats()
{
- DWORD dwNewTick = GetTickCount();
+ uint32_t dwNewTick = GetTickCount();
if (m_uiReaded && (time(0) > m_startTS) && (dwNewTick > m_lastUpdateTick + 100)) {
m_lastUpdateTick = dwNewTick;
diff --git a/plugins/FTPFileYM/src/job_upload.cpp b/plugins/FTPFileYM/src/job_upload.cpp index ec6629cc06..b1bc6de66f 100644 --- a/plugins/FTPFileYM/src/job_upload.cpp +++ b/plugins/FTPFileYM/src/job_upload.cpp @@ -88,8 +88,8 @@ void UploadJob::autoSend() dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_SENT;
dbei.szModule = szProto;
- dbei.timestamp = (DWORD)time(0);
- dbei.cbBlob = (DWORD)mir_strlen(m_szFileLink) + 1;
+ dbei.timestamp = (uint32_t)time(0);
+ dbei.cbBlob = (uint32_t)mir_strlen(m_szFileLink) + 1;
dbei.pBlob = (uint8_t*)m_szFileLink;
db_event_add(m_hContact, &dbei);
ProtoChainSend(m_hContact, PSS_MESSAGE, 0, (LPARAM)m_szFileLink);
diff --git a/plugins/FavContacts/src/contact_cache.cpp b/plugins/FavContacts/src/contact_cache.cpp index 2416ed0c00..80ae06d330 100644 --- a/plugins/FavContacts/src/contact_cache.cpp +++ b/plugins/FavContacts/src/contact_cache.cpp @@ -155,8 +155,8 @@ wchar_t *nb_stristr(wchar_t *str, wchar_t *substr) wchar_t *str_up = NEWWSTR_ALLOCA(str);
wchar_t *substr_up = NEWWSTR_ALLOCA(substr);
- CharUpperBuff(str_up, (DWORD)mir_wstrlen(str_up));
- CharUpperBuff(substr_up, (DWORD)mir_wstrlen(substr_up));
+ CharUpperBuff(str_up, (uint32_t)mir_wstrlen(str_up));
+ CharUpperBuff(substr_up, (uint32_t)mir_wstrlen(substr_up));
wchar_t *p = wcsstr(str_up, substr_up);
return p ? (str + (p - str_up)) : nullptr;
diff --git a/plugins/FavContacts/src/cserver.cpp b/plugins/FavContacts/src/cserver.cpp index b2577c8ecf..317cb1a019 100644 --- a/plugins/FavContacts/src/cserver.cpp +++ b/plugins/FavContacts/src/cserver.cpp @@ -34,7 +34,7 @@ void CServer::Stop() closesocket(m_socket);
}
-DWORD CServer::ConnectionAcceptThread()
+uint32_t CServer::ConnectionAcceptThread()
{
while (1) {
SOCKET s = accept(m_socket, nullptr, nullptr);
@@ -45,7 +45,7 @@ DWORD CServer::ConnectionAcceptThread() return 0;
}
-DWORD CServer::ConnectionProcessThread(SOCKET s)
+uint32_t CServer::ConnectionProcessThread(SOCKET s)
{
CSocket sock(s);
IConnectionProcessor *processor = m_connectionProcessorFactory->Create(&sock);
diff --git a/plugins/FavContacts/src/cserver.h b/plugins/FavContacts/src/cserver.h index f96c87b2c1..659ad704f8 100644 --- a/plugins/FavContacts/src/cserver.h +++ b/plugins/FavContacts/src/cserver.h @@ -20,8 +20,8 @@ private: SOCKET m_socket;
IConnectionProcessorFactory *m_connectionProcessorFactory;
- DWORD ConnectionAcceptThread();
- DWORD ConnectionProcessThread(SOCKET s);
+ uint32_t ConnectionAcceptThread();
+ uint32_t ConnectionProcessThread(SOCKET s);
static void GlobalConnectionAcceptThread(void *arg);
diff --git a/plugins/FavContacts/src/favlist.h b/plugins/FavContacts/src/favlist.h index eeaea0d6ea..588731662b 100644 --- a/plugins/FavContacts/src/favlist.h +++ b/plugins/FavContacts/src/favlist.h @@ -5,7 +5,7 @@ struct TContactInfo {
private:
MCONTACT hContact;
- DWORD status;
+ uint32_t status;
wchar_t *name;
wchar_t *group;
bool bManual;
diff --git a/plugins/FavContacts/src/menu.cpp b/plugins/FavContacts/src/menu.cpp index de3817148a..0f4f13e3c4 100644 --- a/plugins/FavContacts/src/menu.cpp +++ b/plugins/FavContacts/src/menu.cpp @@ -486,7 +486,7 @@ int ShowMenu(bool centered) AppendMenu(hMenu, MF_OWNERDRAW, ++idItem, (LPCTSTR)hContact);
- mis.itemData = (DWORD)hContact;
+ mis.itemData = (uint32_t)hContact;
mis.itemID = idItem;
MenuMeasureItem(&mis);
szColumn.cx = max(szColumn.cx, (int)mis.itemWidth);
diff --git a/plugins/FavContacts/src/options.cpp b/plugins/FavContacts/src/options.cpp index 2ad1d715dd..d4078e5573 100644 --- a/plugins/FavContacts/src/options.cpp +++ b/plugins/FavContacts/src/options.cpp @@ -138,13 +138,13 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA mis.CtlID = 0;
mis.CtlType = ODT_MENU;
- mis.itemData = (DWORD)hSelectedContact;
+ mis.itemData = (uint32_t)hSelectedContact;
MenuMeasureItem(&mis, &options);
dis.rcItem.bottom = dis.rcItem.top + mis.itemHeight;
dis.CtlID = 0;
dis.CtlType = ODT_MENU;
- dis.itemData = (DWORD)hSelectedContact;
+ dis.itemData = (uint32_t)hSelectedContact;
MenuDrawItem(&dis, &options);
RECT rc = lpdis->rcItem;
diff --git a/plugins/FileAsMessage/src/dialog.cpp b/plugins/FileAsMessage/src/dialog.cpp index ae6a02029f..1e6e6fdee5 100644 --- a/plugins/FileAsMessage/src/dialog.cpp +++ b/plugins/FileAsMessage/src/dialog.cpp @@ -6,7 +6,7 @@ char *szFEMode[] = LPGEN("Send file")
};
-char* ltoax(char* s, DWORD value)
+char* ltoax(char* s, uint32_t value)
{
if (value == 0)
*s++ = '0';
@@ -165,7 +165,7 @@ char *hint_controls[4] = "Stop"
};
-void FILEECHO::setState(DWORD state)
+void FILEECHO::setState(uint32_t state)
{
iState = state;
diff --git a/plugins/FileAsMessage/src/dialog.h b/plugins/FileAsMessage/src/dialog.h index ace7c198a3..3bb77f9f5b 100644 --- a/plugins/FileAsMessage/src/dialog.h +++ b/plugins/FileAsMessage/src/dialog.h @@ -77,8 +77,8 @@ public: uint fileSize;
uint chunkMaxLen; // limit for outgoing chunk
- DWORD lastTimestamp;
- DWORD lastDelay;
+ uint32_t lastTimestamp;
+ uint32_t lastDelay;
bool asBinary;
// settings
@@ -92,7 +92,7 @@ public: FILEECHO(MCONTACT Contact);
- void setState(DWORD state);
+ void setState(uint32_t state);
void updateProgress();
void updateTitle();
diff --git a/plugins/FileAsMessage/src/optionsdlg.cpp b/plugins/FileAsMessage/src/optionsdlg.cpp index 1a0e7b8239..7bbc88a2ed 100644 --- a/plugins/FileAsMessage/src/optionsdlg.cpp +++ b/plugins/FileAsMessage/src/optionsdlg.cpp @@ -1,6 +1,6 @@ #include "stdafx.h"
-DWORD settingDefault[] =
+uint32_t settingDefault[] =
{
RGB(64, 255, 64),
RGB(255, 255, 64),
diff --git a/plugins/FingerprintNG/src/fingerprint.cpp b/plugins/FingerprintNG/src/fingerprint.cpp index 762b15b880..e71c77ae0c 100644 --- a/plugins/FingerprintNG/src/fingerprint.cpp +++ b/plugins/FingerprintNG/src/fingerprint.cpp @@ -473,7 +473,7 @@ BOOL __inline GetMaskBit(LPBYTE line, int x) * blend - alpha blend ARGB values of 2 pixels. X1 - underlaying, * X2 - overlaying points. */ -DWORD __fastcall blend(DWORD X1, DWORD X2) +uint32_t __fastcall blend(uint32_t X1, uint32_t X2) { RGBA* q1 = (RGBA*)&X1; RGBA* q2 = (RGBA*)&X2; @@ -592,8 +592,8 @@ HICON __fastcall CreateJoinedIcon(HICON hBottom, HICON hTop) { for (x = 0; x < 16; x++) { - DWORD bottom_d = ((LPDWORD)bb)[x]; - DWORD top_d = ((LPDWORD)tb)[x]; + uint32_t bottom_d = ((LPDWORD)bb)[x]; + uint32_t top_d = ((LPDWORD)tb)[x]; if (topMaskUsed) { diff --git a/plugins/FloatingContacts/src/filedrop.h b/plugins/FloatingContacts/src/filedrop.h index 9ca6441865..78308782e9 100644 --- a/plugins/FloatingContacts/src/filedrop.h +++ b/plugins/FloatingContacts/src/filedrop.h @@ -10,16 +10,18 @@ private: unsigned long refCount;
public:
- CDropTarget(): refCount(0) {}
+ CDropTarget() :
+ refCount(0)
+ {}
- HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid,LPVOID *ppvObj);
+ HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, LPVOID *ppvObj);
ULONG STDMETHODCALLTYPE AddRef();
ULONG STDMETHODCALLTYPE Release();
HRESULT STDMETHODCALLTYPE DragOver(DWORD fKeyState, POINTL pt, DWORD *pdwEffect);
HRESULT STDMETHODCALLTYPE DragEnter(IDataObject *pData, DWORD fKeyState, POINTL pt, DWORD *pdwEffect);
HRESULT STDMETHODCALLTYPE DragLeave();
- HRESULT STDMETHODCALLTYPE Drop(IDataObject *pData,DWORD fKeyState,POINTL pt,DWORD *pdwEffect);
+ HRESULT STDMETHODCALLTYPE Drop(IDataObject *pData, DWORD fKeyState, POINTL pt, DWORD *pdwEffect);
};
-void RegisterFileDropping( HWND hwnd, CDropTarget* pdropTarget );
-void UnregisterFileDropping( HWND hwnd );
+void RegisterFileDropping(HWND hwnd, CDropTarget *pdropTarget);
+void UnregisterFileDropping(HWND hwnd);
diff --git a/plugins/FloatingContacts/src/fltcont.h b/plugins/FloatingContacts/src/fltcont.h index 0530c7d78f..5e0d234ab1 100644 --- a/plugins/FloatingContacts/src/fltcont.h +++ b/plugins/FloatingContacts/src/fltcont.h @@ -91,7 +91,7 @@ extern COLORREF tColor[FLT_FONTIDS]; extern HPEN hLTEdgesPen;
extern HPEN hRBEdgesPen;
extern HBRUSH hBkBrush;
-extern DWORD bkColor;
+extern uint32_t bkColor;
extern HBITMAP hBmpBackground;
extern uint16_t nBackgroundBmpUse;
diff --git a/plugins/FloatingContacts/src/main.cpp b/plugins/FloatingContacts/src/main.cpp index cf6a506dce..eb64c54463 100644 --- a/plugins/FloatingContacts/src/main.cpp +++ b/plugins/FloatingContacts/src/main.cpp @@ -37,8 +37,6 @@ static void GetScreenRect(void); extern void SetThumbsOpacity(uint8_t btAlpha);
static int ClcStatusToPf2(int status);
-static VOID CALLBACK ToTopTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime);
-
HFONT hFont[FLT_FONTIDS];
COLORREF tColor[FLT_FONTIDS];
HIMAGELIST himlMiranda;
@@ -47,16 +45,16 @@ MCONTACT hNewContact; HPEN hLTEdgesPen;
HPEN hRBEdgesPen;
HBRUSH hBkBrush;
-DWORD bkColor;
+uint32_t bkColor;
HBITMAP hBmpBackground;
-uint16_t nBackgroundBmpUse = CLB_STRETCH;
+uint16_t nBackgroundBmpUse = CLB_STRETCH;
HWND hwndMiranda;
BOOL bVersionOK;
BOOL bDockHorz = TRUE;
HMENU hContactMenu;
RECT rcScreen;
-DWORD dwOfflineModes;
+uint32_t dwOfflineModes;
BOOL bEnableTip;
UINT_PTR ToTopTimerID;
BOOL bIsCListShow;
@@ -284,7 +282,7 @@ static void LoadDBSettings() fcOpt.bHideWhenFullscreen = (BOOL)g_plugin.getByte("HideWhenFullscreen", 0);
fcOpt.bMoveTogether = (BOOL)g_plugin.getByte("MoveTogether", 0);
fcOpt.bFixedWidth = (BOOL)g_plugin.getByte("FixedWidth", 0);
- fcOpt.nThumbWidth = (DWORD)g_plugin.getDword("Width", 0);
+ fcOpt.nThumbWidth = (uint32_t)g_plugin.getDword("Width", 0);
dwOfflineModes = Clist::OfflineModes;
fcOpt.bShowTip = (BOOL)g_plugin.getByte("ShowTip", 1);
fcOpt.TimeIn = g_plugin.getWord("TimeIn", 0);
@@ -447,6 +445,12 @@ void OnStatusChanged() }
}
+static VOID CALLBACK ToTopTimerProc(HWND, UINT, UINT_PTR, DWORD)
+{
+ for (auto &it : thumbList)
+ SetWindowPos(it->hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
+}
+
void ApplyOptionsChanges()
{
CreateThumbsFont();
@@ -746,7 +750,7 @@ static void LoadContact(MCONTACT hContact) if (hContact == NULL)
return;
- DWORD dwPos = g_plugin.getDword(hContact, "ThumbsPos", (DWORD)-1);
+ uint32_t dwPos = g_plugin.getDword(hContact, "ThumbsPos", (uint32_t)-1);
if (dwPos != -1) {
wchar_t *ptName = Clist_GetContactDisplayName(hContact);
if (ptName != nullptr) {
@@ -786,12 +790,6 @@ BOOL HideOnFullScreen() return bFullscreen && fcOpt.bHideWhenFullscreen;
}
-static VOID CALLBACK ToTopTimerProc(HWND, UINT, UINT_PTR, DWORD)
-{
- for (auto &it : thumbList)
- SetWindowPos(it->hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
-}
-
void ShowThumbsOnHideCList()
{
if (!fcOpt.bHideWhenCListShow || fcOpt.bHideAll || HideOnFullScreen())
diff --git a/plugins/FloatingContacts/src/thumbs.cpp b/plugins/FloatingContacts/src/thumbs.cpp index 4f529ce056..9336087235 100644 --- a/plugins/FloatingContacts/src/thumbs.cpp +++ b/plugins/FloatingContacts/src/thumbs.cpp @@ -475,7 +475,7 @@ void ThumbInfo::UpdateContent() HFONT hOldFont;
SIZE size;
RECT rc, rcText;
- DWORD oldColor;
+ uint32_t oldColor;
int oldBkMode, index = 0;// nStatus;
UINT fStyle = ILD_NORMAL;
diff --git a/plugins/Folders/src/utils.cpp b/plugins/Folders/src/utils.cpp index e8da712012..e2fc51e571 100644 --- a/plugins/Folders/src/utils.cpp +++ b/plugins/Folders/src/utils.cpp @@ -62,7 +62,7 @@ void RemoveDirectories(const wchar_t *path) bool DirectoryExists(const wchar_t *path)
{
- DWORD dwAttributes = GetFileAttributes(path);
+ uint32_t dwAttributes = GetFileAttributes(path);
if (dwAttributes == INVALID_FILE_ATTRIBUTES || !(dwAttributes & FILE_ATTRIBUTE_DIRECTORY))
return false;
return true;
diff --git a/plugins/HTTPServer/src/FileShareNode.cpp b/plugins/HTTPServer/src/FileShareNode.cpp index 939c46f364..ea884f86dd 100644 --- a/plugins/HTTPServer/src/FileShareNode.cpp +++ b/plugins/HTTPServer/src/FileShareNode.cpp @@ -99,7 +99,7 @@ void CLShareUser::CloseSocket() // Member Function : dwGetDownloadSpeed
// Type : Private / Public / Protected
// Parameters : None
-// Returns : DWORD
+// Returns : uint32_t
// Description :
//
// References : -
@@ -108,7 +108,7 @@ void CLShareUser::CloseSocket() // Developer : KN
/////////////////////////////////////////////////////////////////////
-DWORD CLShareUser::dwGetDownloadSpeed()
+uint32_t CLShareUser::dwGetDownloadSpeed()
{
return dwSpeed;
}
diff --git a/plugins/HTTPServer/src/FileShareNode.h b/plugins/HTTPServer/src/FileShareNode.h index c47117291f..065b115ea7 100644 --- a/plugins/HTTPServer/src/FileShareNode.h +++ b/plugins/HTTPServer/src/FileShareNode.h @@ -27,20 +27,20 @@ public: virtual ~CLShareUser();
CLShareUser * pclNext;
in_addr stAddr;
- DWORD dwCurrentDL;
- DWORD dwTotalSize;
+ uint32_t dwCurrentDL;
+ uint32_t dwTotalSize;
char szCurrentDLSrvPath[MAX_PATH];
- virtual DWORD dwGetDownloadSpeed();
+ virtual uint32_t dwGetDownloadSpeed();
virtual bool bCloseTransfers() = NULL;
virtual const char * pszCustomInfo() = NULL;
void CloseSocket();
protected:
HNETLIBCONN hConnection;
- DWORD dwSpeed;
+ uint32_t dwSpeed;
};
class CLFileShareNode {
-public://, DWORD dwAllowedIP, DWORD dwAllowedMask, int nMaxDownloads );
+public://, uint32_t dwAllowedIP, uint32_t dwAllowedMask, int nMaxDownloads );
CLFileShareNode(char * pszSrvPath, char * pszRealPath);
CLFileShareNode(STFileShareInfo * pstInfo);
~CLFileShareNode();
diff --git a/plugins/HTTPServer/src/Glob.h b/plugins/HTTPServer/src/Glob.h index d688dbe351..15d5636943 100644 --- a/plugins/HTTPServer/src/Glob.h +++ b/plugins/HTTPServer/src/Glob.h @@ -76,9 +76,9 @@ bool bOpenLogFile(); extern char szPluginPath[MAX_PATH];
extern int nPluginPathLen;
-extern DWORD dwLocalIpAddress;
-extern DWORD dwLocalPortUsed;
-extern DWORD dwExternalIpAddress;
+extern uint32_t dwLocalIpAddress;
+extern uint32_t dwLocalPortUsed;
+extern uint32_t dwExternalIpAddress;
extern int nMaxUploadSpeed;
extern int nMaxConnectionsTotal;
diff --git a/plugins/HTTPServer/src/GuiElements.cpp b/plugins/HTTPServer/src/GuiElements.cpp index be8df43712..5a409ad9e3 100644 --- a/plugins/HTTPServer/src/GuiElements.cpp +++ b/plugins/HTTPServer/src/GuiElements.cpp @@ -198,7 +198,7 @@ string sCreateLink(const char * pszSrvPath) ReplaceAll(sLink, "%LocalIP%", szTemp);
if (sLink.find("%ExternalIP%") != sLink.npos) {
- static DWORD dwExternalIpAddressGenerated = 0;
+ static uint32_t dwExternalIpAddressGenerated = 0;
// Get the IP again after 10 minutes
if (!dwExternalIpAddress || GetTickCount() - dwExternalIpAddressGenerated > 10 * 60 * 1000) {
@@ -405,7 +405,7 @@ UINT_PTR CALLBACK ShareNewFileDialogHook( switch (LOWORD(wParam)) {
case IDC_TOGGLE_MASK:
{
- DWORD dwCur;
+ uint32_t dwCur;
SendDlgItemMessage(hDlg, IDC_ALLOWED_IP_MASK, IPM_GETADDRESS, 0, (LPARAM)&dwCur);
SendDlgItemMessage(hDlg, IDC_ALLOWED_IP_MASK, IPM_SETADDRESS, 0, (LPARAM)dwCur == 0xFFFFFFFF ? 0 : 0xFFFFFFFF);
return TRUE;
@@ -599,7 +599,7 @@ void UpdateStatisticView(HWND hwndDlg, bool bRefressUsersOnly = false) sItem.pszText = szTmp;
ListView_SetItem(hUserList, &sItem);
- DWORD dwSpeed = pclCurUser->dwGetDownloadSpeed();
+ uint32_t dwSpeed = pclCurUser->dwGetDownloadSpeed();
if (dwSpeed > 10000) {
dwSpeed += 512; // make sure we round ot down correctly.
dwSpeed /= 1024;
@@ -689,12 +689,12 @@ static INT_PTR CALLBACK DlgProcStatsticView(HWND hwndDlg, UINT msg, WPARAM wPara HWND hUserList = GetDlgItem(hwndDlg, IDC_CURRENT_USERS);
{ // init adv. win styles
- DWORD dw = ListView_GetExtendedListViewStyle(hShareList);
+ uint32_t dw = ListView_GetExtendedListViewStyle(hShareList);
dw |= LVS_EX_HEADERDRAGDROP | LVS_EX_FULLROWSELECT;
ListView_SetExtendedListViewStyle(hShareList, dw /*| LVS_EX_LABELTIP*/);
}
{ // init adv. win styles
- DWORD dw = ListView_GetExtendedListViewStyle(hUserList);
+ uint32_t dw = ListView_GetExtendedListViewStyle(hUserList);
dw |= LVS_EX_HEADERDRAGDROP | LVS_EX_FULLROWSELECT;
ListView_SetExtendedListViewStyle(hUserList, dw /*| LVS_EX_LABELTIP*/);
}
@@ -1172,7 +1172,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP char szKeyWord[1000];
GetDlgItemText(hwndDlg, IDC_URL_ADDRESS, szUrl, _countof(szUrl));
GetDlgItemText(hwndDlg, IDC_PAGE_KEYWORD, szKeyWord, _countof(szKeyWord));
- DWORD dwExternalIP = GetExternIP(szUrl, szKeyWord);
+ uint32_t dwExternalIP = GetExternIP(szUrl, szKeyWord);
mir_snprintf(szKeyWord, Translate("Your external IP was detected as %d.%d.%d.%d\r\nby: %s"),
SplitIpAddress(dwExternalIP),
diff --git a/plugins/HTTPServer/src/HttpUser.cpp b/plugins/HTTPServer/src/HttpUser.cpp index 5b738240b0..6c7a93c509 100644 --- a/plugins/HTTPServer/src/HttpUser.cpp +++ b/plugins/HTTPServer/src/HttpUser.cpp @@ -243,7 +243,7 @@ void CLHttpUser::SendError(int iErrorCode, const char * pszError, const char * p pszDescription = pszError;
char szBuf[1000];
- DWORD dwBytesToWrite = mir_snprintf(szBuf,
+ uint32_t dwBytesToWrite = mir_snprintf(szBuf,
"HTTP/1.1 %i %s\r\n"
"Date: %s\r\n"
"Server: MirandaWeb/%s\r\n"
@@ -294,7 +294,7 @@ void CLHttpUser::SendRedir(int iErrorCode, const char * pszError, const char * p pszDescription = pszError;
char szBuff[1000];
- DWORD dwBytesToWrite = mir_snprintf(szBuff,
+ uint32_t dwBytesToWrite = mir_snprintf(szBuff,
"HTTP/1.1 %i %s\r\n"
"Date: %s\r\n"
"Server: MirandaWeb/%s\r\n"
@@ -390,7 +390,7 @@ bool CLHttpUser::bProcessGetRequest(char * pszRequest, bool bIsGetCommand) return false;
}
- DWORD dwRemoteIP = ntohl(stAddr.S_un.S_addr);
+ uint32_t dwRemoteIP = ntohl(stAddr.S_un.S_addr);
for (CLFileShareNode * pclCur = pclFirstNode; pclCur; pclCur = pclCur->pclNext) {
if ((pclCur->st.dwAllowedIP ^ dwRemoteIP) & pclCur->st.dwAllowedMask)
continue; // Not an allowed IP address
@@ -528,7 +528,7 @@ bool CLHttpUser::bProcessGetRequest(char * pszRequest, bool bIsGetCommand) mir_strcpy(this->szCurrentDLSrvPath, pszSrvPath);
- DWORD nDataSize = GetFileSize(hFile, nullptr);
+ uint32_t nDataSize = GetFileSize(hFile, nullptr);
dwTotalSize = nDataSize;
FILETIME stFileTime;
@@ -563,8 +563,8 @@ bool CLHttpUser::bProcessGetRequest(char * pszRequest, bool bIsGetCommand) lck.unlock();
- DWORD dwFileStart = 0;
- DWORD dwDataToSend = nDataSize;
+ uint32_t dwFileStart = 0;
+ uint32_t dwDataToSend = nDataSize;
char szETag[50];
{
@@ -580,12 +580,12 @@ bool CLHttpUser::bProcessGetRequest(char * pszRequest, bool bIsGetCommand) char *pszEnd;
if (pszRange[0] == '-') {
// its a suffix-byte-range-spec
- DWORD dwLen = strtol(pszRange + 1, &pszEnd, 10);
+ uint32_t dwLen = strtol(pszRange + 1, &pszEnd, 10);
if (dwLen < nDataSize)
dwFileStart = nDataSize - dwLen;
}
else {
- DWORD dwLen = strtol(pszRange, &pszEnd, 10);
+ uint32_t dwLen = strtol(pszRange, &pszEnd, 10);
if (*pszEnd == '-' && dwLen < nDataSize) {
dwFileStart = dwLen;
pszRange = pszEnd + 1;
@@ -664,24 +664,24 @@ bool CLHttpUser::bProcessGetRequest(char * pszRequest, bool bIsGetCommand) static int nThreadCount = 0;
nThreadCount++;
- DWORD dwLastUpdate = GetTickCount();
- DWORD dwLastCurrentDL = 0;
+ uint32_t dwLastUpdate = GetTickCount();
+ uint32_t dwLastCurrentDL = 0;
/*
dwLastDLSTickCount = dwCurTick;
dwCurrentDL;*/
- //DWORD dwMaxSpeed = 8192;// Byte pr Sek
- //DWORD dwMaxSpeed = 20000;// Byte pr Sek
- //DWORD dwMaxSpeed = 163840;// Byte pr Sek
- //DWORD dwMaxSpeed = 4096;// Byte pr Sek
+ //uint32_t dwMaxSpeed = 8192;// Byte pr Sek
+ //uint32_t dwMaxSpeed = 20000;// Byte pr Sek
+ //uint32_t dwMaxSpeed = 163840;// Byte pr Sek
+ //uint32_t dwMaxSpeed = 4096;// Byte pr Sek
- DWORD dwLastResetTime = GetTickCount();
+ uint32_t dwLastResetTime = GetTickCount();
int nMaxBytesToSend = nMaxUploadSpeed / nThreadCount;
for (;;) {
{
- DWORD dwCurTick = GetTickCount();
+ uint32_t dwCurTick = GetTickCount();
if (dwCurTick - dwLastUpdate >= 1000) {
dwSpeed = ((dwCurrentDL - dwLastCurrentDL) * 1000) / (dwCurTick - dwLastUpdate);
dwLastUpdate = dwCurTick;
@@ -696,7 +696,7 @@ bool CLHttpUser::bProcessGetRequest(char * pszRequest, bool bIsGetCommand) bool bSpeedLimit = (nMaxUploadSpeed >= 0) && (bIsOnline || !bLimitOnlyWhenOnline);
- DWORD dwCurOpr = sizeof(szBuf);
+ uint32_t dwCurOpr = sizeof(szBuf);
if (bSpeedLimit)
dwCurOpr = min(nMaxBytesToSend, sizeof(szBuf));
@@ -712,7 +712,7 @@ bool CLHttpUser::bProcessGetRequest(char * pszRequest, bool bIsGetCommand) if (bSpeedLimit)
nMaxBytesToSend -= dwBytesToWrite;
- DWORD dwSend = Netlib_Send(hConnection, szBuf, dwBytesToWrite, MSG_NODUMP);
+ uint32_t dwSend = Netlib_Send(hConnection, szBuf, dwBytesToWrite, MSG_NODUMP);
if (dwSend == SOCKET_ERROR)
break;
dwCurrentDL += dwSend;
@@ -724,7 +724,7 @@ bool CLHttpUser::bProcessGetRequest(char * pszRequest, bool bIsGetCommand) if (bSpeedLimit && nMaxBytesToSend <= 0) {
// we have reached the limmit
- DWORD dwTimeUsed = GetTickCount() - dwLastResetTime;
+ uint32_t dwTimeUsed = GetTickCount() - dwLastResetTime;
if (dwTimeUsed < 1000)
Sleep(1000 - dwTimeUsed);
dwLastResetTime = GetTickCount();
diff --git a/plugins/HTTPServer/src/IndexCreation.h b/plugins/HTTPServer/src/IndexCreation.h index c3892c4308..71ffaef294 100644 --- a/plugins/HTTPServer/src/IndexCreation.h +++ b/plugins/HTTPServer/src/IndexCreation.h @@ -34,8 +34,8 @@ enum eIndexCreationMode { extern eIndexCreationMode indexCreationMode;
-bool bCreateIndexXML(const char * pszRealPath, const char * pszIndexPath, const char * pszSrvPath, DWORD dwRemoteIP);
-bool bCreateIndexHTML(const char * pszRealPath, const char * pszIndexPath, const char * pszSrvPath, DWORD dwRemoteIP);
+bool bCreateIndexXML(const char * pszRealPath, const char * pszIndexPath, const char * pszSrvPath, uint32_t dwRemoteIP);
+bool bCreateIndexHTML(const char * pszRealPath, const char * pszIndexPath, const char * pszSrvPath, uint32_t dwRemoteIP);
void FreeIndexHTMLTemplate();
bool LoadIndexHTMLTemplate();
diff --git a/plugins/HTTPServer/src/IndexHTML.cpp b/plugins/HTTPServer/src/IndexHTML.cpp index 7b85a20d4e..74ba85c384 100644 --- a/plugins/HTTPServer/src/IndexHTML.cpp +++ b/plugins/HTTPServer/src/IndexHTML.cpp @@ -75,7 +75,7 @@ bool LoadIndexHTMLTemplate() DWORD dwBytesRead = 0;
if (ReadFile(hFile, pszBuf, sizeof(szBuf), &dwBytesRead, nullptr) || dwBytesRead <= 0) {
- while (dwBytesRead > (DWORD)(pszBuf - szBuf)) {
+ while (dwBytesRead > (uint32_t)(pszBuf - szBuf)) {
if (*pszBuf == '[') {
char* pszKeywordBegin = pszBuf + 1;
bool bHasParameters = false;
@@ -279,7 +279,7 @@ void FreeIndexHTMLTemplate() /////////////////////////////////////////////////////////////////////
bool bCreateIndexHTML(const char * pszRealPath, const char * pszIndexPath,
- const char * pszSrvPath, DWORD /* dwRemoteIP */)
+ const char * pszSrvPath, uint32_t /* dwRemoteIP */)
{
#define RelativeJump(begin) { pszPos += *((uint16_t*)(begin+1)) & 0x7FFF; }
diff --git a/plugins/HTTPServer/src/IndexXML.cpp b/plugins/HTTPServer/src/IndexXML.cpp index ea94a2cadc..33c86dfdf6 100644 --- a/plugins/HTTPServer/src/IndexXML.cpp +++ b/plugins/HTTPServer/src/IndexXML.cpp @@ -63,7 +63,7 @@ static void ReplaceSign(char* pszSrc, int MaxLength, const char pszReplace, // Developer : Houdini
/////////////////////////////////////////////////////////////////////
-bool bCreateIndexXML(const char * pszRealPath, const char * pszIndexPath, const char * pszSrvPath, DWORD dwRemoteIP)
+bool bCreateIndexXML(const char * pszRealPath, const char * pszIndexPath, const char * pszSrvPath, uint32_t dwRemoteIP)
{
char szMask[MAX_PATH + 1];
mir_snprintf(szMask, "%s*", pszRealPath);
@@ -116,7 +116,7 @@ bool bCreateIndexXML(const char * pszRealPath, const char * pszIndexPath, const strncpy(szBuffer, "index.xsl", BUFFER_SIZE);
}
- WriteFile(hFile, szBuffer, (DWORD)mir_strlen(szBuffer), &dwBytesWritten, nullptr);
+ WriteFile(hFile, szBuffer, (uint32_t)mir_strlen(szBuffer), &dwBytesWritten, nullptr);
WriteFile(hFile, szXmlHeader2, sizeof(szXmlHeader2) - 1, &dwBytesWritten, nullptr);
@@ -209,7 +209,7 @@ bool bCreateIndexXML(const char * pszRealPath, const char * pszIndexPath, const pszExt++;
}
- DWORD dwFileSize = 0;
+ uint32_t dwFileSize = 0;
FILETIME ftFileCreateTime;
FILETIME ftFileAccessTime;
FILETIME ftFileModifyTime;
diff --git a/plugins/HTTPServer/src/main.cpp b/plugins/HTTPServer/src/main.cpp index e8f227172d..8a6342f025 100644 --- a/plugins/HTTPServer/src/main.cpp +++ b/plugins/HTTPServer/src/main.cpp @@ -70,9 +70,9 @@ static HGENMENU hAcceptConnectionsMenuItem = nullptr; char szPluginPath[MAX_PATH] = { 0 };
int nPluginPathLen = 0;
-DWORD dwLocalIpAddress = 0;
-DWORD dwLocalPortUsed = 0;
-DWORD dwExternalIpAddress = 0;
+uint32_t dwLocalIpAddress = 0;
+uint32_t dwLocalPortUsed = 0;
+uint32_t dwExternalIpAddress = 0;
int nMaxUploadSpeed = -1;
int nMaxConnectionsTotal = -1;
@@ -139,7 +139,7 @@ bool bWriteToFile(HANDLE hFile, const char * pszSrc, int nLen = -1) if (nLen < 0)
nLen = (int)mir_strlen(pszSrc);
DWORD dwBytesWritten;
- return WriteFile(hFile, pszSrc, nLen, &dwBytesWritten, nullptr) && (dwBytesWritten == (DWORD)nLen);
+ return WriteFile(hFile, pszSrc, nLen, &dwBytesWritten, nullptr) && (dwBytesWritten == (uint32_t)nLen);
}
@@ -189,7 +189,7 @@ void LogEvent(const char * pszTitle, const char * pszLog) // Member Function : dwReadIPAddress
// Type : Global
// Parameters : pszStr - ?
-// Returns : DWORD
+// Returns : uint32_t
// Description :
//
// References : -
@@ -198,9 +198,9 @@ void LogEvent(const char * pszTitle, const char * pszLog) // Developer : KN
/////////////////////////////////////////////////////////////////////
-DWORD dwReadIPAddress(char * pszStr, bool &bError)
+uint32_t dwReadIPAddress(char * pszStr, bool &bError)
{
- DWORD ip = 0;
+ uint32_t ip = 0;
char *pszEnd;
for (int n = 0; n < 4; n++) {
int nVal = strtol(pszStr, &pszEnd, 10);
@@ -245,11 +245,11 @@ bool bReadConfigurationFile() bool bEof = false;
while (!bEof) {
- DWORD dwBytesInBuffer = 0;
+ uint32_t dwBytesInBuffer = 0;
// move rest of buffer to front
if (pszCurPos && pszCurPos != szBuf) {
- dwBytesInBuffer = DWORD(sizeof(szBuf) - (pszCurPos - szBuf));
+ dwBytesInBuffer = uint32_t(sizeof(szBuf) - (pszCurPos - szBuf));
memmove(szBuf, pszCurPos, dwBytesInBuffer * sizeof(wchar_t));
}
@@ -346,7 +346,7 @@ bool bWriteConfigurationFile() if (WriteFile(hFile, szXmlHeader, sizeof(szXmlHeader) - 1, &dwBytesWriten, nullptr)) {
CLFileShareNode *pclCur = pclFirstNode;
while (pclCur) {
- DWORD dwBytesToWrite = mir_snprintf(szBuf, szXmlData,
+ uint32_t dwBytesToWrite = mir_snprintf(szBuf, szXmlData,
pclCur->st.pszSrvPath,
pclCur->pszOrigRealPath,
pclCur->st.nMaxDownloads,
@@ -566,7 +566,7 @@ void __cdecl HandleNewConnection(CLHttpUser *pclUser) // Developer : KN
/////////////////////////////////////////////////////////////////////
-void ConnectionOpen(HNETLIBCONN hNewConnection, DWORD dwRemoteIP, void*)
+void ConnectionOpen(HNETLIBCONN hNewConnection, uint32_t dwRemoteIP, void*)
{
in_addr stAddr;
stAddr.S_un.S_addr = htonl(dwRemoteIP);
diff --git a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp index 6994f9ebaf..406ce734be 100644 --- a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp +++ b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp @@ -504,7 +504,7 @@ void WriteLinkList(HWND hDlg, uint8_t params, LISTELEMENT *listStart, LPCTSTR se /*
Output some example text to the options dialog
*/
-int WriteOptionExample(HWND hDlg, DWORD InColourSel, DWORD OutColourSel, DWORD BGColourSel, DWORD TxtColourSel, LISTOPTIONS *options)
+int WriteOptionExample(HWND hDlg, uint32_t InColourSel, uint32_t OutColourSel, uint32_t BGColourSel, uint32_t TxtColourSel, LISTOPTIONS *options)
{
CHARFORMAT cf;
PARAFORMAT pf;
@@ -930,7 +930,7 @@ Read current coloursettings from the database */
void GetColour(MYCOLOURSET *colourSet)
{
- DWORD colour;
+ uint32_t colour;
uint8_t useDefault;
useDefault = g_plugin.getByte(LINKLIST_USE_DEF, 0xFF);
@@ -1032,7 +1032,7 @@ if entry does not exist. */
void GetDBColour(MYCOLOURSET *colourSet)
{
- DWORD colour;
+ uint32_t colour;
// Use Plugin user defined or default colours
colour = g_plugin.getDword(LINKLIST_IN_COL, 0xFF000000);
@@ -1077,7 +1077,7 @@ Read current coloursettings from the database (Miranda settings) */
int GetMirandaColour(MYCOLOURSET *colourSet)
{
- DWORD colour;
+ uint32_t colour;
// Use Miranda-IM Default colours
// Try SRMM (Miranda 0.4) .... or SRMsg... for older versions
@@ -1259,7 +1259,7 @@ BOOL SaveEditAsStream(HWND hDlg) return TRUE;
}
-DWORD CALLBACK RTFSaveStreamCallback(DWORD_PTR dwCookie, LPBYTE lpBuffer, LONG lSize, LONG *plRead)
+uint32_t CALLBACK RTFSaveStreamCallback(DWORD_PTR dwCookie, LPBYTE lpBuffer, LONG lSize, LONG *plRead)
{
// Sanity check...exit if nothing passed
if (!lSize)
diff --git a/plugins/HistoryLinkListPlus/src/linklist_fct.h b/plugins/HistoryLinkListPlus/src/linklist_fct.h index b6d016ebeb..f5ca89c592 100644 --- a/plugins/HistoryLinkListPlus/src/linklist_fct.h +++ b/plugins/HistoryLinkListPlus/src/linklist_fct.h @@ -29,7 +29,7 @@ void SetListOptions(LISTOPTIONS*); void ClearLinePos(LISTELEMENT*);
int GetLastLinePos(LISTELEMENT*);
void WriteLinkList(HWND, uint8_t, LISTELEMENT*, LPCTSTR, int);
-int WriteOptionExample(HWND, DWORD, DWORD, DWORD, DWORD, LISTOPTIONS*);
+int WriteOptionExample(HWND, uint32_t, uint32_t, uint32_t, uint32_t, LISTOPTIONS*);
void WriteMessage(HWND, LISTELEMENT*, int);
void GetColour(MYCOLOURSET*);
void GetDBColour(MYCOLOURSET*);
@@ -39,6 +39,6 @@ uint8_t GetUpdateSetting(void); int LinklistResizer(HWND,LPARAM,UTILRESIZECONTROL*);
// RTF Save functions
BOOL SaveEditAsStream( HWND );
-DWORD CALLBACK RTFSaveStreamCallback( DWORD_PTR, LPBYTE, LONG, LONG * );
+uint32_t CALLBACK RTFSaveStreamCallback( DWORD_PTR, LPBYTE, LONG, LONG * );
#endif //_LINKLIST_FCT_H
\ No newline at end of file diff --git a/plugins/HistoryLinkListPlus/src/stdafx.h b/plugins/HistoryLinkListPlus/src/stdafx.h index d528ec95a5..349406dc33 100644 --- a/plugins/HistoryLinkListPlus/src/stdafx.h +++ b/plugins/HistoryLinkListPlus/src/stdafx.h @@ -96,10 +96,10 @@ typedef struct { } LISTOPTIONS;
typedef struct {
- DWORD incoming;
- DWORD outgoing;
- DWORD background;
- DWORD text;
+ uint32_t incoming;
+ uint32_t outgoing;
+ uint32_t background;
+ uint32_t text;
} MYCOLOURSET;
#include "linklist_fct.h"
@@ -135,7 +135,7 @@ struct CMPlugin : public PLUGIN<CMPlugin> };
#define _mstrlen(x) (_countof(x) - 1)
-#define MAKE_TXT_COL(BGCol) ((DWORD)~BGCol & 0x00FFFFFF)
+#define MAKE_TXT_COL(BGCol) ((uint32_t)~BGCol & 0x00FFFFFF)
#define DM_LINKSPLITTER WM_USER+99
diff --git a/plugins/HistoryStats/src/_consts.h b/plugins/HistoryStats/src/_consts.h index a9d8d5a4ed..c9a75972be 100644 --- a/plugins/HistoryStats/src/_consts.h +++ b/plugins/HistoryStats/src/_consts.h @@ -185,8 +185,8 @@ namespace con #endif
// min/max time
- const DWORD MinDateTime = 0x00000000;
- const DWORD MaxDateTime = 0xFFFFFFFF;
+ const uint32_t MinDateTime = 0x00000000;
+ const uint32_t MaxDateTime = 0xFFFFFFFF;
// default colors for html output
const COLORREF ColorOut = RGB(0xE8, 0x64, 0x1B);
diff --git a/plugins/HistoryStats/src/bandctrl.cpp b/plugins/HistoryStats/src/bandctrl.cpp index 2240b1f55c..c853976388 100644 --- a/plugins/HistoryStats/src/bandctrl.cpp +++ b/plugins/HistoryStats/src/bandctrl.cpp @@ -10,7 +10,7 @@ void BandCtrl::setLayout(int nLayout) SendMessage(m_hBandWnd, BCM_SETLAYOUT, nLayout, 0);
}
-HANDLE BandCtrl::addButton(DWORD dwFlags, HICON hIcon, INT_PTR dwData, const wchar_t *szTooltip, const wchar_t *szText)
+HANDLE BandCtrl::addButton(uint32_t dwFlags, HICON hIcon, INT_PTR dwData, const wchar_t *szTooltip, const wchar_t *szText)
{
BCBUTTON bcb;
@@ -33,7 +33,7 @@ void BandCtrl::checkButton(HANDLE hButton, bool bCheck) SendMessage(m_hBandWnd, BCM_CHECKBUTTON, reinterpret_cast<WPARAM>(hButton), BOOL_(bCheck));
}
-DWORD BandCtrl::getButtonData(HANDLE hButton)
+uint32_t BandCtrl::getButtonData(HANDLE hButton)
{
return SendMessage(m_hBandWnd, BCM_GETBUTTONDATA, reinterpret_cast<WPARAM>(hButton), 0);
}
diff --git a/plugins/HistoryStats/src/bandctrl.h b/plugins/HistoryStats/src/bandctrl.h index a94544b358..d95e31019f 100644 --- a/plugins/HistoryStats/src/bandctrl.h +++ b/plugins/HistoryStats/src/bandctrl.h @@ -25,10 +25,10 @@ public: public:
void setLayout(int nLayout);
- HANDLE addButton(DWORD dwFlags, HICON hIcon, INT_PTR dwData, const wchar_t* szTooltip = nullptr, const wchar_t* szText = nullptr);
+ HANDLE addButton(uint32_t dwFlags, HICON hIcon, INT_PTR dwData, const wchar_t* szTooltip = nullptr, const wchar_t* szText = nullptr);
bool isButtonChecked(HANDLE hButton);
void checkButton(HANDLE hButton, bool bCheck);
- DWORD getButtonData(HANDLE hButton);
+ uint32_t getButtonData(HANDLE hButton);
void setButtonData(HANDLE hButton, INT_PTR dwData);
bool isButtonVisisble(HANDLE hButton);
void showButton(HANDLE hButton, bool bShow);
diff --git a/plugins/HistoryStats/src/bandctrldefs.h b/plugins/HistoryStats/src/bandctrldefs.h index 1be373dcfa..9c1fb32700 100644 --- a/plugins/HistoryStats/src/bandctrldefs.h +++ b/plugins/HistoryStats/src/bandctrldefs.h @@ -42,7 +42,7 @@ public: };
struct BCBUTTON {
- DWORD dwFlags;
+ uint32_t dwFlags;
HICON hIcon;
const wchar_t *m_szText;
const wchar_t *m_szTooltip;
diff --git a/plugins/HistoryStats/src/bandctrlimpl.cpp b/plugins/HistoryStats/src/bandctrlimpl.cpp index f9f953fcc3..11faf8b4f5 100644 --- a/plugins/HistoryStats/src/bandctrlimpl.cpp +++ b/plugins/HistoryStats/src/bandctrlimpl.cpp @@ -431,12 +431,12 @@ HICON BandCtrlImpl::convertToGray(HICON hIcon) uint8_t* pLine = pBits + y * bmp.bmWidthBytes;
for (int x = 0; x < bmp.bmWidth; ++x) {
- DWORD color = reinterpret_cast<DWORD*>(pLine)[x];
+ uint32_t color = reinterpret_cast<uint32_t*>(pLine)[x];
uint8_t gray = (77 * GetBValue(color) + 150 * GetGValue(color) + 28 * GetRValue(color)) / 255;
color = (color & 0xFF000000) | RGB(gray, gray, gray);
- reinterpret_cast<DWORD*>(pLine)[x] = color;
+ reinterpret_cast<uint32_t*>(pLine)[x] = color;
}
}
diff --git a/plugins/HistoryStats/src/column.h b/plugins/HistoryStats/src/column.h index 6586beacb5..495c65b5f3 100644 --- a/plugins/HistoryStats/src/column.h +++ b/plugins/HistoryStats/src/column.h @@ -186,7 +186,7 @@ public: void contactDataPrepare(Contact& contact) const { impl_contactDataPrepare(contact); }
void contactDataFree(Contact& contact) const { impl_contactDataFree(contact); }
void contactDataAcquireMessage(Contact& contact, Message& msg) { impl_contactDataAcquireMessage(contact, msg); }
- void contactDataAcquireChat(Contact& contact, bool bOutgoing, DWORD localTimestampStarted, DWORD duration) { impl_contactDataAcquireChat(contact, bOutgoing, localTimestampStarted, duration); }
+ void contactDataAcquireChat(Contact& contact, bool bOutgoing, uint32_t localTimestampStarted, uint32_t duration) { impl_contactDataAcquireChat(contact, bOutgoing, localTimestampStarted, duration); }
void contactDataMerge(Contact& contact, const Contact& include) const { impl_contactDataMerge(contact, include); }
void contactDataTransform(Contact& contact) const { impl_contactDataTransform(contact); }
void contactDataTransformCleanup(Contact& contact) const { impl_contactDataTransformCleanup(contact); }
@@ -308,7 +308,7 @@ protected: * on previously defined slot.
* [virtual/default: do nothing]
*/
- virtual void impl_contactDataAcquireChat(Contact&, bool, DWORD, DWORD) { }
+ virtual void impl_contactDataAcquireChat(Contact&, bool, uint32_t, uint32_t) { }
/*** VIRTUAL/ABSTRACT *** DATA POSTPROCESSING ***/
diff --git a/plugins/HistoryStats/src/column_chatduration.cpp b/plugins/HistoryStats/src/column_chatduration.cpp index fba75dbfc4..3e6b0cae76 100644 --- a/plugins/HistoryStats/src/column_chatduration.cpp +++ b/plugins/HistoryStats/src/column_chatduration.cpp @@ -98,7 +98,7 @@ void ColChatDuration::impl_columnDataAfterOmit() // AFTER, i.e. contacts are trimmed to what user will see
if (m_bGraph) {
- static DWORD (Contact::*getChatDurX[4])() const = {
+ static uint32_t (Contact::*getChatDurX[4])() const = {
&Contact::getChatDurMin,
&Contact::getChatDurAvg,
&Contact::getChatDurMax,
@@ -127,7 +127,7 @@ void ColChatDuration::impl_columnDataAfterOmit() void ColChatDuration::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType display)
{
- static DWORD (Contact::*getChatDurX[4])() const = {
+ static uint32_t (Contact::*getChatDurX[4])() const = {
&Contact::getChatDurMin,
&Contact::getChatDurAvg,
&Contact::getChatDurMax,
diff --git a/plugins/HistoryStats/src/column_chatduration.h b/plugins/HistoryStats/src/column_chatduration.h index 95e8e237ce..ac6a014562 100644 --- a/plugins/HistoryStats/src/column_chatduration.h +++ b/plugins/HistoryStats/src/column_chatduration.h @@ -19,7 +19,7 @@ private: OptionsCtrl::Check m_hGraph;
OptionsCtrl::Check m_hDetail;
- DWORD m_nMaxForGraph;
+ uint32_t m_nMaxForGraph;
ext::string m_CSS;
diff --git a/plugins/HistoryStats/src/column_split.cpp b/plugins/HistoryStats/src/column_split.cpp index 7b6c7b8b6b..1866d0f765 100644 --- a/plugins/HistoryStats/src/column_split.cpp +++ b/plugins/HistoryStats/src/column_split.cpp @@ -192,7 +192,7 @@ void ColSplit::impl_contactDataFree(Contact& contact) const }
}
-void ColSplit::addToSlot(Contact& contact, DWORD localTimestamp, int toAdd)
+void ColSplit::addToSlot(Contact& contact, uint32_t localTimestamp, int toAdd)
{
if (toAdd > 0)
{
@@ -217,7 +217,7 @@ void ColSplit::impl_contactDataAcquireMessage(Contact& contact, Message& msg) }
}
-void ColSplit::impl_contactDataAcquireChat(Contact& contact, bool bOutgoing, DWORD localTimestampStarted, DWORD)
+void ColSplit::impl_contactDataAcquireChat(Contact& contact, bool bOutgoing, uint32_t localTimestampStarted, uint32_t)
{
if (m_nSource == 2 && (!bOutgoing && m_nSourceType == 0 || bOutgoing && m_nSourceType == 1 || m_nSourceType == 2))
{
diff --git a/plugins/HistoryStats/src/column_split.h b/plugins/HistoryStats/src/column_split.h index 4dbe77fe3d..88284554f4 100644 --- a/plugins/HistoryStats/src/column_split.h +++ b/plugins/HistoryStats/src/column_split.h @@ -37,13 +37,13 @@ private: OptionsCtrl::Radio m_hGraphAlign;
ext::string m_CSS;
- DWORD m_nTimeDiv;
- DWORD m_nTimeMod;
- DWORD m_nTimeOffset;
+ uint32_t m_nTimeDiv;
+ uint32_t m_nTimeMod;
+ uint32_t m_nTimeOffset;
private:
SplitParams getParams() const;
- void addToSlot(Contact& contact, DWORD localTimestamp, int toAdd);
+ void addToSlot(Contact& contact, uint32_t localTimestamp, int toAdd);
public:
explicit ColSplit();
@@ -64,7 +64,7 @@ protected: virtual void impl_contactDataPrepare(Contact& contact) const;
virtual void impl_contactDataFree(Contact& contact) const;
virtual void impl_contactDataAcquireMessage(Contact& contact, Message& msg);
- virtual void impl_contactDataAcquireChat(Contact& contact, bool bOutgoing, DWORD localTimestampStarted, DWORD duration);
+ virtual void impl_contactDataAcquireChat(Contact& contact, bool bOutgoing, uint32_t localTimestampStarted, uint32_t duration);
virtual void impl_contactDataMerge(Contact& contact, const Contact& include) const;
virtual StyleList impl_outputGetAdditionalStyles(IDProvider& idp);
virtual void impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan) const;
diff --git a/plugins/HistoryStats/src/column_splittimeline.cpp b/plugins/HistoryStats/src/column_splittimeline.cpp index ad1a6b5915..8737fe7879 100644 --- a/plugins/HistoryStats/src/column_splittimeline.cpp +++ b/plugins/HistoryStats/src/column_splittimeline.cpp @@ -205,7 +205,7 @@ void ColSplitTimeline::impl_contactDataFree(Contact& contact) const }
}
-void ColSplitTimeline::addToSlot(Contact& contact, bool bOutgoing, DWORD localTimestamp, int toAdd)
+void ColSplitTimeline::addToSlot(Contact& contact, bool bOutgoing, uint32_t localTimestamp, int toAdd)
{
if (toAdd > 0)
{
@@ -229,7 +229,7 @@ void ColSplitTimeline::impl_contactDataAcquireMessage(Contact& contact, Message& }
}
-void ColSplitTimeline::impl_contactDataAcquireChat(Contact& contact, bool bOutgoing, DWORD localTimestampStarted, DWORD)
+void ColSplitTimeline::impl_contactDataAcquireChat(Contact& contact, bool bOutgoing, uint32_t localTimestampStarted, uint32_t)
{
if (m_nSource == 2)
{
@@ -311,7 +311,7 @@ void ColSplitTimeline::impl_columnDataAfterOmit() if (l.size() > 0)
{
- DWORD nFirstTime = con::MaxDateTime, nLastTime = con::MinDateTime;
+ uint32_t nFirstTime = con::MaxDateTime, nLastTime = con::MinDateTime;
citer_each_(Statistic::ContactListC, c, l)
{
@@ -435,11 +435,11 @@ void ColSplitTimeline::outputRenderRowInOut(ext::ostream& tos, const Contact& co for (int partBlock = 0; partBlock < params.blocks_in_column; ++partBlock)
{
int part_top = 0;
- DWORD block_time = m_nBlockOffset + curBlock + partBlock;
+ uint32_t block_time = m_nBlockOffset + curBlock + partBlock;
for (int curCol = 0; curCol < params.columns_to_group; ++curCol)
{
- DWORD cur_time = block_time + curCol * params.blocks_in_column;
+ uint32_t cur_time = block_time + curCol * params.blocks_in_column;
TimelineMap::const_iterator i = pData->find(cur_time);
@@ -484,11 +484,11 @@ void ColSplitTimeline::outputRenderRowInOut(ext::ostream& tos, const Contact& co for (int partBlock = 0; partBlock < params.blocks_in_column; ++partBlock)
{
int part_top = 0;
- DWORD block_time = m_nBlockOffset + curBlock + partBlock;
+ uint32_t block_time = m_nBlockOffset + curBlock + partBlock;
for (int curCol = 0; curCol < params.columns_to_group; ++curCol)
{
- DWORD cur_time = block_time + curCol * params.blocks_in_column;
+ uint32_t cur_time = block_time + curCol * params.blocks_in_column;
TimelineMap::const_iterator i = pData->find(cur_time);
@@ -510,11 +510,11 @@ void ColSplitTimeline::outputRenderRowInOut(ext::ostream& tos, const Contact& co for (int partBlock = 0; partBlock < params.blocks_in_column; ++partBlock)
{
int part_top = 0;
- DWORD block_time = m_nBlockOffset + curBlock + partBlock;
+ uint32_t block_time = m_nBlockOffset + curBlock + partBlock;
for (int curCol = 0; curCol < params.columns_to_group; ++curCol)
{
- DWORD cur_time = block_time + curCol * params.blocks_in_column;
+ uint32_t cur_time = block_time + curCol * params.blocks_in_column;
TimelineMap::const_iterator i = pData->find(cur_time);
@@ -581,11 +581,11 @@ void ColSplitTimeline::outputRenderRowRatio(ext::ostream& tos, const Contact& co {
int part_in = 0;
int part_out = 0;
- DWORD block_time = m_nBlockOffset + curBlock + partBlock;
+ uint32_t block_time = m_nBlockOffset + curBlock + partBlock;
for (int curCol = 0; curCol < params.columns_to_group; ++curCol)
{
- DWORD cur_time = block_time + curCol * params.blocks_in_column;
+ uint32_t cur_time = block_time + curCol * params.blocks_in_column;
TimelineMap::const_iterator i = pData->find(cur_time);
diff --git a/plugins/HistoryStats/src/column_splittimeline.h b/plugins/HistoryStats/src/column_splittimeline.h index 4b28d74646..89fc04e4bb 100644 --- a/plugins/HistoryStats/src/column_splittimeline.h +++ b/plugins/HistoryStats/src/column_splittimeline.h @@ -47,8 +47,8 @@ private: OptionsCtrl::Edit m_hCustomGroup;
OptionsCtrl::Check m_hTopPerColumn;
- DWORD m_nTimeDiv;
- DWORD m_nTimeOffset;
+ uint32_t m_nTimeDiv;
+ uint32_t m_nTimeOffset;
int m_nTimelineWidth;
int m_nBlockOffset;
int m_nNumBlocks;
@@ -67,7 +67,7 @@ private: }
SplitParams getParams() const;
- void addToSlot(Contact& contact, bool bOutgoing, DWORD localTimestamp, int toAdd);
+ void addToSlot(Contact& contact, bool bOutgoing, uint32_t localTimestamp, int toAdd);
void outputRenderRowInOut(ext::ostream& tos, const Contact& contact, DisplayType display);
void outputRenderRowRatio(ext::ostream& tos, const Contact& contact, DisplayType display);
@@ -91,7 +91,7 @@ protected: virtual void impl_contactDataPrepare(Contact& contact) const;
virtual void impl_contactDataFree(Contact& contact) const;
virtual void impl_contactDataAcquireMessage(Contact& contact, Message& msg);
- virtual void impl_contactDataAcquireChat(Contact& contact, bool bOutgoing, DWORD localTimestampStarted, DWORD duration);
+ virtual void impl_contactDataAcquireChat(Contact& contact, bool bOutgoing, uint32_t localTimestampStarted, uint32_t duration);
virtual void impl_contactDataMerge(Contact& contact, const Contact& include) const;
virtual void impl_columnDataAfterOmit();
virtual void impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan) const;
diff --git a/plugins/HistoryStats/src/column_timeline.cpp b/plugins/HistoryStats/src/column_timeline.cpp index 1c4b5ce657..1910701edd 100644 --- a/plugins/HistoryStats/src/column_timeline.cpp +++ b/plugins/HistoryStats/src/column_timeline.cpp @@ -117,7 +117,7 @@ void ColTimeline::impl_contactDataFree(Contact& contact) const }
}
-void ColTimeline::addToSlot(Contact& contact, bool bOutgoing, DWORD localTimestamp, int toAdd)
+void ColTimeline::addToSlot(Contact& contact, bool bOutgoing, uint32_t localTimestamp, int toAdd)
{
if (toAdd > 0)
{
@@ -141,7 +141,7 @@ void ColTimeline::impl_contactDataAcquireMessage(Contact& contact, Message& msg) }
}
-void ColTimeline::impl_contactDataAcquireChat(Contact& contact, bool bOutgoing, DWORD localTimestampStarted, DWORD)
+void ColTimeline::impl_contactDataAcquireChat(Contact& contact, bool bOutgoing, uint32_t localTimestampStarted, uint32_t)
{
if (m_nSource == 2)
{
diff --git a/plugins/HistoryStats/src/column_timeline.h b/plugins/HistoryStats/src/column_timeline.h index fb0b9c5b85..751b296ce1 100644 --- a/plugins/HistoryStats/src/column_timeline.h +++ b/plugins/HistoryStats/src/column_timeline.h @@ -43,7 +43,7 @@ private: return 0;
}
- void addToSlot(Contact& contact, bool bOutgoing, DWORD localTimestamp, int toAdd);
+ void addToSlot(Contact& contact, bool bOutgoing, uint32_t localTimestamp, int toAdd);
void outputRenderRowInOut(ext::ostream& tos, const Contact& contact, DisplayType display);
void outputRenderRowRatio(ext::ostream& tos, const Contact& contact, DisplayType display);
@@ -66,7 +66,7 @@ protected: virtual void impl_contactDataPrepare(Contact& contact) const;
virtual void impl_contactDataFree(Contact& contact) const;
virtual void impl_contactDataAcquireMessage(Contact& contact, Message& msg);
- virtual void impl_contactDataAcquireChat(Contact& contact, bool bOutgoing, DWORD localTimestampStarted, DWORD duration);
+ virtual void impl_contactDataAcquireChat(Contact& contact, bool bOutgoing, uint32_t localTimestampStarted, uint32_t duration);
virtual void impl_contactDataMerge(Contact& contact, const Contact& include) const;
virtual void impl_columnDataAfterOmit();
virtual StyleList impl_outputGetAdditionalStyles(IDProvider& idp);
diff --git a/plugins/HistoryStats/src/contact.cpp b/plugins/HistoryStats/src/contact.cpp index 35d4f4dfd6..cd96f3c224 100644 --- a/plugins/HistoryStats/src/contact.cpp +++ b/plugins/HistoryStats/src/contact.cpp @@ -27,7 +27,7 @@ Contact::Contact(Statistic* pStatistic, int nSlots, const ext::string& nick, con m_Slots.resize(nSlots, NULL);
}
-void Contact::updateTime(DWORD msgTime)
+void Contact::updateTime(uint32_t msgTime)
{
if (!m_bFirstLastTimeValid) {
m_FirstTime = msgTime;
@@ -40,7 +40,7 @@ void Contact::updateTime(DWORD msgTime) }
}
-void Contact::updateChatDur(DWORD timeDelta)
+void Contact::updateChatDur(uint32_t timeDelta)
{
m_bChatDurValid = true;
@@ -52,7 +52,7 @@ void Contact::updateChatDur(DWORD timeDelta) double Contact::getAvg(int nTotal) const
{
- DWORD dwHistTime = m_pStatistic->getLastTime() - getFirstTime();
+ uint32_t dwHistTime = m_pStatistic->getLastTime() - getFirstTime();
if (dwHistTime < m_pStatistic->getAverageMinTime())
dwHistTime = m_pStatistic->getAverageMinTime();
@@ -73,7 +73,7 @@ void Contact::addMessage(Message& msg) updateTime(msg.getTimestamp());
}
-void Contact::addChat(bool bOutgoing, DWORD, DWORD duration)
+void Contact::addChat(bool bOutgoing, uint32_t, uint32_t duration)
{
if (bOutgoing)
m_Chats.out++;
diff --git a/plugins/HistoryStats/src/contact.h b/plugins/HistoryStats/src/contact.h index 592b739969..4da79c71a7 100644 --- a/plugins/HistoryStats/src/contact.h +++ b/plugins/HistoryStats/src/contact.h @@ -29,12 +29,12 @@ private: InOut m_Messages;
InOut m_Chats;
bool m_bChatDurValid;
- DWORD m_ChatDurMin;
- DWORD m_ChatDurMax;
- DWORD m_ChatDurSum;
+ uint32_t m_ChatDurMin;
+ uint32_t m_ChatDurMax;
+ uint32_t m_ChatDurSum;
bool m_bFirstLastTimeValid;
- DWORD m_FirstTime;
- DWORD m_LastTime;
+ uint32_t m_FirstTime;
+ uint32_t m_LastTime;
InOut m_Files;
int m_NumContacts;
int m_NumSubcontacts;
@@ -43,8 +43,8 @@ private: Statistic* m_pStatistic;
private:
- void updateTime(DWORD msgTime);
- void updateChatDur(DWORD timeDelta);
+ void updateTime(uint32_t msgTime);
+ void updateChatDur(uint32_t timeDelta);
double getAvg(int nTotal) const;
public:
@@ -79,18 +79,18 @@ public: // chat duration
bool isChatDurValid() const { return m_bChatDurValid; }
- DWORD getChatDurMin() const { return m_ChatDurMin; }
- DWORD getChatDurAvg() const { return getTotalChats() ? m_ChatDurSum / getTotalChats() : 0; }
- DWORD getChatDurMax() const { return m_ChatDurMax; }
+ uint32_t getChatDurMin() const { return m_ChatDurMin; }
+ uint32_t getChatDurAvg() const { return getTotalChats() ? m_ChatDurSum / getTotalChats() : 0; }
+ uint32_t getChatDurMax() const { return m_ChatDurMax; }
int getChatDurMinForSort() const { return m_bChatDurValid ? getChatDurMin() : -1; }
int getChatDurAvgForSort() const { return m_bChatDurValid ? getChatDurAvg() : -1; }
int getChatDurMaxForSort() const { return m_bChatDurValid ? getChatDurMax() : -1; }
- DWORD getChatDurSum() const { return m_ChatDurSum; }
+ uint32_t getChatDurSum() const { return m_ChatDurSum; }
// first/last time
bool isFirstLastTimeValid() const { return m_bFirstLastTimeValid; }
- DWORD getFirstTime() const { return m_FirstTime; }
- DWORD getLastTime() const { return m_LastTime; }
+ uint32_t getFirstTime() const { return m_FirstTime; }
+ uint32_t getLastTime() const { return m_LastTime; }
// files and URLs
int getOutFiles() const { return m_Files.out; }
@@ -105,7 +105,7 @@ public: void beginMessages() { }
void endMessages() { }
void addMessage(Message& msg);
- void addChat(bool bOutgoing, DWORD localTimestampStarted, DWORD duration);
+ void addChat(bool bOutgoing, uint32_t localTimestampStarted, uint32_t duration);
void addEvent(uint16_t eventType, bool bOutgoing);
void merge(const Contact& other);
diff --git a/plugins/HistoryStats/src/dlgfilterwords.cpp b/plugins/HistoryStats/src/dlgfilterwords.cpp index 0b3ca5fdde..b48650fa79 100644 --- a/plugins/HistoryStats/src/dlgfilterwords.cpp +++ b/plugins/HistoryStats/src/dlgfilterwords.cpp @@ -88,7 +88,7 @@ void DlgFilterWords::onWMInitDialog() array_each_(i, columnBand)
{
HICON hIcon = reinterpret_cast<HICON>(LoadImage(g_plugin.getInst(), MAKEINTRESOURCE(columnBand[i].iconId), IMAGE_ICON, OS::smIconCX(), OS::smIconCY(), 0));
- DWORD dwFlags = (columnBand[i].bDisabled ? BandCtrl::BCF_DISABLED : 0);
+ uint32_t dwFlags = (columnBand[i].bDisabled ? BandCtrl::BCF_DISABLED : 0);
m_hActionButtons[i] = m_Band.addButton(dwFlags, hIcon, i, TranslateW(columnBand[i].szTooltip));
diff --git a/plugins/HistoryStats/src/dlgoption.cpp b/plugins/HistoryStats/src/dlgoption.cpp index 2d16102d54..6768166f4f 100644 --- a/plugins/HistoryStats/src/dlgoption.cpp +++ b/plugins/HistoryStats/src/dlgoption.cpp @@ -110,7 +110,7 @@ void DlgOption::onWMInitDialog() array_each_(i, pageBand)
{
HICON hIcon = reinterpret_cast<HICON>(LoadImage(g_plugin.getInst(), MAKEINTRESOURCE(pageBand[i].iconId), IMAGE_ICON, 32, 32, 0));
- DWORD dwFlags = 0;
+ uint32_t dwFlags = 0;
dwFlags |= pageBand[i].bRight ? BandCtrl::BCF_RIGHT : 0;
dwFlags |= (i == m_nCurPage) ? BandCtrl::BCF_CHECKED : 0;
diff --git a/plugins/HistoryStats/src/dlgoption_subcolumns.cpp b/plugins/HistoryStats/src/dlgoption_subcolumns.cpp index 0e0e1cfe1c..f18094597e 100644 --- a/plugins/HistoryStats/src/dlgoption_subcolumns.cpp +++ b/plugins/HistoryStats/src/dlgoption_subcolumns.cpp @@ -178,7 +178,7 @@ void DlgOption::SubColumns::onWMInitDialog() array_each_(i, columnBand)
{
HICON hIcon = reinterpret_cast<HICON>(LoadImage(g_plugin.getInst(), MAKEINTRESOURCE(columnBand[i].iconId), IMAGE_ICON, OS::smIconCX(), OS::smIconCY(), 0));
- DWORD dwFlags =
+ uint32_t dwFlags =
(columnBand[i].bRight ? BandCtrl::BCF_RIGHT : 0) |
(columnBand[i].bDropDown ? BandCtrl::BCF_DROPDOWN : 0) |
(columnBand[i].bDisabled ? BandCtrl::BCF_DISABLED : 0);
diff --git a/plugins/HistoryStats/src/dlgoption_subexclude.cpp b/plugins/HistoryStats/src/dlgoption_subexclude.cpp index 6319c414e2..c0c1b9d7e7 100644 --- a/plugins/HistoryStats/src/dlgoption_subexclude.cpp +++ b/plugins/HistoryStats/src/dlgoption_subexclude.cpp @@ -64,7 +64,7 @@ BOOL DlgOption::SubExclude::handleMsg(UINT msg, WPARAM, LPARAM lParam) if (pNM->iColumn == -1)
break;
- DWORD dwHitFlags = 0;
+ uint32_t dwHitFlags = 0;
HANDLE hItem = reinterpret_cast<HANDLE>(SendMessage(hCList, CLM_HITTEST, reinterpret_cast<WPARAM>(&dwHitFlags), MAKELPARAM(pNM->pt.x, pNM->pt.y)));
if (!hItem || !(dwHitFlags & CLCHT_ONITEMEXTRA))
break;
diff --git a/plugins/HistoryStats/src/dlgoption_subglobal.cpp b/plugins/HistoryStats/src/dlgoption_subglobal.cpp index ec47eccc58..6841378dd1 100644 --- a/plugins/HistoryStats/src/dlgoption_subglobal.cpp +++ b/plugins/HistoryStats/src/dlgoption_subglobal.cpp @@ -170,7 +170,7 @@ BOOL DlgOption::SubGlobal::handleMsg(UINT msg, WPARAM wParam, LPARAM lParam) NMTREEVIEW* pNM = reinterpret_cast<NMTREEVIEW*>(lParam);
if (p->code == NM_DBLCLK) {
- DWORD dwPoint = GetMessagePos();
+ uint32_t dwPoint = GetMessagePos();
POINTS pts = MAKEPOINTS(dwPoint);
TVHITTESTINFO tvhti = { { pts.x, pts.y } };
diff --git a/plugins/HistoryStats/src/main.cpp b/plugins/HistoryStats/src/main.cpp index d871dff4c9..d53556d5aa 100644 --- a/plugins/HistoryStats/src/main.cpp +++ b/plugins/HistoryStats/src/main.cpp @@ -214,7 +214,7 @@ static INT_PTR MenuHistoryPaste(WPARAM wParam, LPARAM lParam) mu::db::setSafetyMode(false);
// copy history
- DWORD dwCountSuccess = 0, dwCountFailRead = 0, dwCountFailAdd = 0;
+ uint32_t dwCountSuccess = 0, dwCountFailRead = 0, dwCountFailAdd = 0;
DBEVENTINFO dbe;
int blobBuffer = 4096;
HANDLE hEvent = mu::db_event::findFirst(g_hHistoryCopyContact);
diff --git a/plugins/HistoryStats/src/message.h b/plugins/HistoryStats/src/message.h index 39e8af549e..e074a5fe97 100644 --- a/plugins/HistoryStats/src/message.h +++ b/plugins/HistoryStats/src/message.h @@ -26,7 +26,7 @@ private: private:
bool m_bOutgoing;
- DWORD m_Timestamp;
+ uint32_t m_Timestamp;
size_t m_nLength;
const void* m_RawSource;
int m_Available;
@@ -50,7 +50,7 @@ public: }
// assigning data
- void assignInfo(bool bOutgoing, DWORD localTimestamp)
+ void assignInfo(bool bOutgoing, uint32_t localTimestamp)
{
m_bOutgoing = bOutgoing;
m_Timestamp = localTimestamp;
@@ -85,7 +85,7 @@ public: return m_bOutgoing;
}
- DWORD getTimestamp()
+ uint32_t getTimestamp()
{
return m_Timestamp;
}
diff --git a/plugins/HistoryStats/src/mirandacontact.cpp b/plugins/HistoryStats/src/mirandacontact.cpp index 81f86461ed..5e070fe315 100644 --- a/plugins/HistoryStats/src/mirandacontact.cpp +++ b/plugins/HistoryStats/src/mirandacontact.cpp @@ -165,7 +165,7 @@ void MirandaContactTolerantMerge::fillQueue() while (!m_CIs.empty() && (m_EIs.size() < 2 || (m_EIs.back().dbe.timestamp - m_EIs.front().dbe.timestamp) <= timestampTol)) {
// find oldest next event in chains
int nNext = 0;
- DWORD timestampFirst = m_CIs.front().ei.dbe.timestamp;
+ uint32_t timestampFirst = m_CIs.front().ei.dbe.timestamp;
for (int i = 1; i < m_CIs.size(); ++i) {
if (m_CIs[i].ei.dbe.timestamp < timestampFirst) {
@@ -230,7 +230,7 @@ void MirandaContactStrictMerge::fillQueue() while (!m_CIs.empty() && (m_EIs.size() < 2 || (m_EIs.back().dbe.timestamp - m_EIs.front().dbe.timestamp) <= timestampTol)) {
// find oldest next event in chains
int nNext = 0;
- DWORD timestampFirst = m_CIs.front().ei.dbe.timestamp;
+ uint32_t timestampFirst = m_CIs.front().ei.dbe.timestamp;
for (int i = 1; i < m_CIs.size(); ++i) {
if (m_CIs[i].ei.dbe.timestamp < timestampFirst) {
@@ -291,7 +291,7 @@ void MirandaContactNoMerge::fillQueue() while (!m_CIs.empty() && m_EIs.size() < 1) {
// find oldest next event in chains
int nNext = 0;
- DWORD timestampFirst = m_CIs.front().ei.dbe.timestamp;
+ uint32_t timestampFirst = m_CIs.front().ei.dbe.timestamp;
for (int i = 1; i < m_CIs.size(); ++i) {
if (m_CIs[i].ei.dbe.timestamp < timestampFirst) {
diff --git a/plugins/HistoryStats/src/mu_common.cpp b/plugins/HistoryStats/src/mu_common.cpp index 10c5eadb61..a3669107e3 100644 --- a/plugins/HistoryStats/src/mu_common.cpp +++ b/plugins/HistoryStats/src/mu_common.cpp @@ -15,7 +15,7 @@ namespace mu namespace clist
{
- HGENMENU addMainMenuItem(const wchar_t* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, HGENMENU hRoot)
+ HGENMENU addMainMenuItem(const wchar_t* pszName, uint32_t flags, int position, HICON hIcon, const char* pszService, HGENMENU hRoot)
{
// TODO: support for unicode-core with unicode-aware CList
CMenuItem mi(&g_plugin);
@@ -29,7 +29,7 @@ namespace mu return Menu_AddMainMenuItem(&mi);
}
- HGENMENU addContactMenuItem(const wchar_t* pszName, DWORD flags, int position, HICON hIcon, const char* pszService)
+ HGENMENU addContactMenuItem(const wchar_t* pszName, uint32_t flags, int position, HICON hIcon, const char* pszService)
{
// TODO: support for unicode-core with unicode-aware CList
CMenuItem mi(&g_plugin);
@@ -78,9 +78,9 @@ namespace mu namespace protosvc
{
- DWORD getCaps(const char* szProto, int flagNum)
+ uint32_t getCaps(const char* szProto, int flagNum)
{
- return (DWORD)CallProtoService(szProto, PS_GETCAPS, static_cast<WPARAM>(flagNum), 0);
+ return (uint32_t)CallProtoService(szProto, PS_GETCAPS, static_cast<WPARAM>(flagNum), 0);
}
HICON loadIcon(const char* szProto, int whichIcon)
@@ -105,13 +105,13 @@ namespace mu void unload()
{}
- DWORD getMinimalMirandaVersion()
+ uint32_t getMinimalMirandaVersion()
{
// MEMO: version dependency check
return PLUGIN_MAKE_VERSION(0, 6, 7, 0);
}
- bool isMirandaVersionOk(DWORD version)
+ bool isMirandaVersionOk(uint32_t version)
{
return (version >= getMinimalMirandaVersion());
}
diff --git a/plugins/HistoryStats/src/mu_common.h b/plugins/HistoryStats/src/mu_common.h index 635b398a86..74169d4e92 100644 --- a/plugins/HistoryStats/src/mu_common.h +++ b/plugins/HistoryStats/src/mu_common.h @@ -13,8 +13,8 @@ namespace mu namespace clist
{
- HGENMENU addMainMenuItem(const wchar_t* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, HGENMENU hRoot = nullptr);
- HGENMENU addContactMenuItem(const wchar_t* pszName, DWORD flags, int position, HICON hIcon, const char* pszService);
+ HGENMENU addMainMenuItem(const wchar_t* pszName, uint32_t flags, int position, HICON hIcon, const char* pszService, HGENMENU hRoot = nullptr);
+ HGENMENU addContactMenuItem(const wchar_t* pszName, uint32_t flags, int position, HICON hIcon, const char* pszService);
}
/*
@@ -34,7 +34,7 @@ namespace mu namespace protosvc
{
- DWORD getCaps(const char* szProto, int flagNum);
+ uint32_t getCaps(const char* szProto, int flagNum);
//int getName(const char* szProto, int cchName, char* szName);
HICON loadIcon(const char* szProto, int whichIcon);
}
@@ -64,8 +64,8 @@ namespace mu bool load();
void unload();
- DWORD getMinimalMirandaVersion();
- bool isMirandaVersionOk(DWORD version);
+ uint32_t getMinimalMirandaVersion();
+ bool isMirandaVersionOk(uint32_t version);
bool isMirandaUnicode();
/*
diff --git a/plugins/HistoryStats/src/optionsctrl.cpp b/plugins/HistoryStats/src/optionsctrl.cpp index c2b6e2738f..07f89d9d53 100644 --- a/plugins/HistoryStats/src/optionsctrl.cpp +++ b/plugins/HistoryStats/src/optionsctrl.cpp @@ -7,7 +7,7 @@ * OptionsCtrl
*/
-HANDLE OptionsCtrl::insertGroup(HANDLE hParent, const wchar_t* szLabel, DWORD dwFlags /* = 0 */, INT_PTR dwData /* = 0 */)
+HANDLE OptionsCtrl::insertGroup(HANDLE hParent, const wchar_t* szLabel, uint32_t dwFlags /* = 0 */, INT_PTR dwData /* = 0 */)
{
OCGROUP ocg;
ocg.dwFlags = dwFlags;
@@ -17,7 +17,7 @@ HANDLE OptionsCtrl::insertGroup(HANDLE hParent, const wchar_t* szLabel, DWORD dw return reinterpret_cast<HANDLE>(SendMessage(m_hOptWnd, OCM_INSERTGROUP, reinterpret_cast<WPARAM>(hParent), reinterpret_cast<LPARAM>(&ocg)));
}
-HANDLE OptionsCtrl::insertCheck(HANDLE hParent, const wchar_t* szLabel, DWORD dwFlags /* = 0 */, INT_PTR dwData /* = 0 */)
+HANDLE OptionsCtrl::insertCheck(HANDLE hParent, const wchar_t* szLabel, uint32_t dwFlags /* = 0 */, INT_PTR dwData /* = 0 */)
{
OCCHECK occ;
occ.dwFlags = dwFlags;
@@ -27,7 +27,7 @@ HANDLE OptionsCtrl::insertCheck(HANDLE hParent, const wchar_t* szLabel, DWORD dw return reinterpret_cast<HANDLE>(SendMessage(m_hOptWnd, OCM_INSERTCHECK, reinterpret_cast<WPARAM>(hParent), reinterpret_cast<LPARAM>(&occ)));
}
-HANDLE OptionsCtrl::insertRadio(HANDLE hParent, HANDLE hSibling, const wchar_t* szLabel, DWORD dwFlags /* = 0 */, INT_PTR dwData /* = 0 */)
+HANDLE OptionsCtrl::insertRadio(HANDLE hParent, HANDLE hSibling, const wchar_t* szLabel, uint32_t dwFlags /* = 0 */, INT_PTR dwData /* = 0 */)
{
OCRADIO ocr;
ocr.dwFlags = dwFlags;
@@ -38,7 +38,7 @@ HANDLE OptionsCtrl::insertRadio(HANDLE hParent, HANDLE hSibling, const wchar_t* return reinterpret_cast<HANDLE>(SendMessage(m_hOptWnd, OCM_INSERTRADIO, reinterpret_cast<WPARAM>(hParent), reinterpret_cast<LPARAM>(&ocr)));
}
-HANDLE OptionsCtrl::insertEdit(HANDLE hParent, const wchar_t* szLabel, const wchar_t* szEdit /* = L"" */, DWORD dwFlags /* = 0 */, INT_PTR dwData /* = 0 */)
+HANDLE OptionsCtrl::insertEdit(HANDLE hParent, const wchar_t* szLabel, const wchar_t* szEdit /* = L"" */, uint32_t dwFlags /* = 0 */, INT_PTR dwData /* = 0 */)
{
OCEDIT oce;
oce.dwFlags = dwFlags;
@@ -49,7 +49,7 @@ HANDLE OptionsCtrl::insertEdit(HANDLE hParent, const wchar_t* szLabel, const wch return reinterpret_cast<HANDLE>(SendMessage(m_hOptWnd, OCM_INSERTEDIT, reinterpret_cast<WPARAM>(hParent), reinterpret_cast<LPARAM>(&oce)));
}
-HANDLE OptionsCtrl::insertCombo(HANDLE hParent, const wchar_t* szLabel, DWORD dwFlags /* = 0 */, INT_PTR dwData /* = 0 */)
+HANDLE OptionsCtrl::insertCombo(HANDLE hParent, const wchar_t* szLabel, uint32_t dwFlags /* = 0 */, INT_PTR dwData /* = 0 */)
{
OCCOMBO occ;
occ.dwFlags = dwFlags;
@@ -59,7 +59,7 @@ HANDLE OptionsCtrl::insertCombo(HANDLE hParent, const wchar_t* szLabel, DWORD dw return reinterpret_cast<HANDLE>(SendMessage(m_hOptWnd, OCM_INSERTCOMBO, reinterpret_cast<WPARAM>(hParent), reinterpret_cast<LPARAM>(&occ)));
}
-HANDLE OptionsCtrl::insertButton(HANDLE hParent, const wchar_t* szLabel, const wchar_t* szButton, DWORD dwFlags /* = 0 */, INT_PTR dwData /* = 0 */)
+HANDLE OptionsCtrl::insertButton(HANDLE hParent, const wchar_t* szLabel, const wchar_t* szButton, uint32_t dwFlags /* = 0 */, INT_PTR dwData /* = 0 */)
{
OCBUTTON ocb;
ocb.dwFlags = dwFlags;
@@ -70,7 +70,7 @@ HANDLE OptionsCtrl::insertButton(HANDLE hParent, const wchar_t* szLabel, const w return reinterpret_cast<HANDLE>(SendMessage(m_hOptWnd, OCM_INSERTBUTTON, reinterpret_cast<WPARAM>(hParent), reinterpret_cast<LPARAM>(&ocb)));
}
-HANDLE OptionsCtrl::insertDateTime(HANDLE hParent, const wchar_t* szLabel, DWORD dwDateTime, const wchar_t* szFormat /* = L"%Y-%m-%d" */, DWORD dwFlags /* = 0 */, INT_PTR dwData /* = 0 */)
+HANDLE OptionsCtrl::insertDateTime(HANDLE hParent, const wchar_t* szLabel, uint32_t dwDateTime, const wchar_t* szFormat /* = L"%Y-%m-%d" */, uint32_t dwFlags /* = 0 */, INT_PTR dwData /* = 0 */)
{
OCDATETIME ocdt;
ocdt.dwFlags = dwFlags;
@@ -82,7 +82,7 @@ HANDLE OptionsCtrl::insertDateTime(HANDLE hParent, const wchar_t* szLabel, DWORD return reinterpret_cast<HANDLE>(SendMessage(m_hOptWnd, OCM_INSERTDATETIME, reinterpret_cast<WPARAM>(hParent), reinterpret_cast<LPARAM>(&ocdt)));
}
-HANDLE OptionsCtrl::insertColor(HANDLE hParent, const wchar_t* szLabel, COLORREF crColor /* = 0 */, DWORD dwFlags /* = 0 */, INT_PTR dwData /* = 0 */)
+HANDLE OptionsCtrl::insertColor(HANDLE hParent, const wchar_t* szLabel, COLORREF crColor /* = 0 */, uint32_t dwFlags /* = 0 */, INT_PTR dwData /* = 0 */)
{
OCCOLOR occ;
occ.dwFlags = dwFlags;
@@ -113,7 +113,7 @@ void OptionsCtrl::enableItem(HANDLE hItem, bool bEnable) SendMessage(m_hOptWnd, OCM_ENABLEITEM, reinterpret_cast<WPARAM>(hItem), BOOL_(bEnable));
}
-DWORD OptionsCtrl::getItemData(HANDLE hItem)
+uint32_t OptionsCtrl::getItemData(HANDLE hItem)
{
return SendMessage(m_hOptWnd, OCM_GETITEMDATA, reinterpret_cast<WPARAM>(hItem), 0);
}
@@ -248,10 +248,10 @@ void OptionsCtrl::setDateTimeNone(HANDLE hDateTime) SendMessage(m_hOptWnd, OCM_SETDATETIMENONE, reinterpret_cast<LPARAM>(hDateTime), 0);
}
-DWORD OptionsCtrl::getDateTime(HANDLE hDateTime, bool* pbNone /* = NULL */)
+uint32_t OptionsCtrl::getDateTime(HANDLE hDateTime, bool* pbNone /* = NULL */)
{
BOOL bMyNone = FALSE;
- DWORD dwResult = SendMessage(m_hOptWnd, OCM_GETDATETIME, reinterpret_cast<WPARAM>(hDateTime), reinterpret_cast<LPARAM>(&bMyNone));
+ uint32_t dwResult = SendMessage(m_hOptWnd, OCM_GETDATETIME, reinterpret_cast<WPARAM>(hDateTime), reinterpret_cast<LPARAM>(&bMyNone));
if (pbNone)
*pbNone = bool_(bMyNone);
@@ -259,7 +259,7 @@ DWORD OptionsCtrl::getDateTime(HANDLE hDateTime, bool* pbNone /* = NULL */) return dwResult;
}
-void OptionsCtrl::setDateTime(HANDLE hDateTime, DWORD dwDateTime)
+void OptionsCtrl::setDateTime(HANDLE hDateTime, uint32_t dwDateTime)
{
SendMessage(m_hOptWnd, OCM_SETDATETIME, reinterpret_cast<WPARAM>(hDateTime), dwDateTime);
}
@@ -268,7 +268,7 @@ void OptionsCtrl::setDateTime(HANDLE hDateTime, DWORD dwDateTime) ext::string OptionsCtrl::getDateTimeStr(HANDLE hDateTime)
{
bool bNone = false;
- DWORD dwTimestamp = getDateTime(hDateTime, &bNone);
+ uint32_t dwTimestamp = getDateTime(hDateTime, &bNone);
return bNone ? L"" : utils::formatDate(dwTimestamp);
}
diff --git a/plugins/HistoryStats/src/optionsctrl.h b/plugins/HistoryStats/src/optionsctrl.h index 13889ed564..4128e6f899 100644 --- a/plugins/HistoryStats/src/optionsctrl.h +++ b/plugins/HistoryStats/src/optionsctrl.h @@ -39,19 +39,19 @@ public: operator HWND() { return m_hOptWnd; }
public:
- HANDLE insertGroup(HANDLE hParent, const wchar_t* szLabel, DWORD dwFlags = 0, INT_PTR dwData = 0);
- HANDLE insertCheck(HANDLE hParent, const wchar_t* szLabel, DWORD dwFlags = 0, INT_PTR dwData = 0);
- HANDLE insertRadio(HANDLE hParent, HANDLE hSibling, const wchar_t* szLabel, DWORD dwFlags = 0, INT_PTR dwData = 0);
- HANDLE insertEdit(HANDLE hParent, const wchar_t* szLabel, const wchar_t* szEdit = L"", DWORD dwFlags = 0, INT_PTR dwData = 0);
- HANDLE insertCombo(HANDLE hParent, const wchar_t* szLabel, DWORD dwFlags = 0, INT_PTR dwData = 0);
- HANDLE insertButton(HANDLE hParent, const wchar_t* szLabel, const wchar_t* szButton, DWORD dwFlags = 0, INT_PTR dwData = 0);
- HANDLE insertDateTime(HANDLE hParent, const wchar_t* szLabel, DWORD dwDateTime, const wchar_t* szFormat = L"%Y-%m-%d", DWORD dwFlags = 0, INT_PTR dwData = 0);
- HANDLE insertColor(HANDLE hParent, const wchar_t* szLabel, COLORREF crColor = 0, DWORD dwFlags = 0, INT_PTR dwData = 0);
+ HANDLE insertGroup(HANDLE hParent, const wchar_t* szLabel, uint32_t dwFlags = 0, INT_PTR dwData = 0);
+ HANDLE insertCheck(HANDLE hParent, const wchar_t* szLabel, uint32_t dwFlags = 0, INT_PTR dwData = 0);
+ HANDLE insertRadio(HANDLE hParent, HANDLE hSibling, const wchar_t* szLabel, uint32_t dwFlags = 0, INT_PTR dwData = 0);
+ HANDLE insertEdit(HANDLE hParent, const wchar_t* szLabel, const wchar_t* szEdit = L"", uint32_t dwFlags = 0, INT_PTR dwData = 0);
+ HANDLE insertCombo(HANDLE hParent, const wchar_t* szLabel, uint32_t dwFlags = 0, INT_PTR dwData = 0);
+ HANDLE insertButton(HANDLE hParent, const wchar_t* szLabel, const wchar_t* szButton, uint32_t dwFlags = 0, INT_PTR dwData = 0);
+ HANDLE insertDateTime(HANDLE hParent, const wchar_t* szLabel, uint32_t dwDateTime, const wchar_t* szFormat = L"%Y-%m-%d", uint32_t dwFlags = 0, INT_PTR dwData = 0);
+ HANDLE insertColor(HANDLE hParent, const wchar_t* szLabel, COLORREF crColor = 0, uint32_t dwFlags = 0, INT_PTR dwData = 0);
const wchar_t* getItemLabel(HANDLE hItem);
void setItemLabel(HANDLE hItem, const wchar_t* szLabel);
bool isItemEnabled(HANDLE hItem);
void enableItem(HANDLE hItem, bool bEnable);
- DWORD getItemData(HANDLE hItem);
+ uint32_t getItemData(HANDLE hItem);
void setItemData(HANDLE hItem, INT_PTR dwData);
bool isItemChecked(HANDLE hItem);
void checkItem(HANDLE hItem, bool bCheck);
@@ -78,8 +78,8 @@ public: void setScrollPos(int nBar, int nPos);
bool isDateTimeNone(HANDLE hDateTime);
void setDateTimeNone(HANDLE hDateTime);
- DWORD getDateTime(HANDLE hDateTime, bool* pbNone = nullptr);
- void setDateTime(HANDLE hDateTime, DWORD dwDateTime);
+ uint32_t getDateTime(HANDLE hDateTime, bool* pbNone = nullptr);
+ void setDateTime(HANDLE hDateTime, uint32_t dwDateTime);
ext::string getDateTimeStr(HANDLE hDateTime);
void setDateTimeStr(HANDLE hDateTime, const ext::string& strDateTime);
COLORREF getColor(HANDLE hColor);
diff --git a/plugins/HistoryStats/src/optionsctrldefs.h b/plugins/HistoryStats/src/optionsctrldefs.h index 7b24009cdf..90218bfb7a 100644 --- a/plugins/HistoryStats/src/optionsctrldefs.h +++ b/plugins/HistoryStats/src/optionsctrldefs.h @@ -38,7 +38,7 @@ public: OCM_DELETEALLITEMS = WM_USER + 24, // (#, #) -> #
OCM_GETSELECTION = WM_USER + 25, // (#, #) -> HANDLE hItem
OCM_SELECTITEM = WM_USER + 26, // (HANDLE hItem, #) -> #
- OCM_GETITEM = WM_USER + 27, // (HANDLE hItem, DWORD dwFlag = OCGI_*) -> HANDLE hItem
+ OCM_GETITEM = WM_USER + 27, // (HANDLE hItem, uint32_t dwFlag = OCGI_*) -> HANDLE hItem
OCM_DELETEITEM = WM_USER + 28, // (HANDLE hItem, #) -> #
OCM_MOVEITEM = WM_USER + 29, // (HANDLE* phItem, HANDLE hInsertAfter) -> #
OCM_GETSCROLLPOS = WM_USER + 30, // (int nBar, #) -> int nPos
@@ -46,8 +46,8 @@ public: OCM_INSERTDATETIME = WM_USER + 32, // (HANDLE hParent, OCDATETIME* pDateTime) -> HANDLE hDateTime [DateTime]
OCM_ISDATETIMENONE = WM_USER + 33, // (HANDLE hDateTime, #) -> BOOL bNone [DateTime]
OCM_SETDATETIMENONE = WM_USER + 34, // (HANDLE hDateTime, #) -> # [DateTime]
- OCM_GETDATETIME = WM_USER + 35, // (HANDLE hDateTime, BOOL* pbNone) -> DWORD dwDateTime [DateTime]
- OCM_SETDATETIME = WM_USER + 36, // (HANDLE hDateTime, DWORD dwDateTime) -> # [DateTime]
+ OCM_GETDATETIME = WM_USER + 35, // (HANDLE hDateTime, BOOL* pbNone) -> uint32_t dwDateTime [DateTime]
+ OCM_SETDATETIME = WM_USER + 36, // (HANDLE hDateTime, uint32_t dwDateTime) -> # [DateTime]
OCM_INSERTCOLOR = WM_USER + 37, // (HANDLE hParent, OCCOLOR* pColor) -> HANDLE hColor [Color]
OCM_GETITEMCOLOR = WM_USER + 38, // (HANDLE hColor, #) -> COLORREF crColor [Color]
OCM_SETITEMCOLOR = WM_USER + 39, // (HANDLE hColor, COLORREF crColor) -> # [Color]
@@ -88,54 +88,54 @@ public: };
struct OCGROUP {
- DWORD dwFlags;
+ uint32_t dwFlags;
wchar_t* szLabel;
INT_PTR dwData;
};
struct OCCHECK {
- DWORD dwFlags;
+ uint32_t dwFlags;
wchar_t* szLabel;
INT_PTR dwData;
};
struct OCRADIO {
- DWORD dwFlags;
+ uint32_t dwFlags;
wchar_t* szLabel;
INT_PTR dwData;
HANDLE hSibling;
};
struct OCEDIT {
- DWORD dwFlags;
+ uint32_t dwFlags;
wchar_t* szLabel;
INT_PTR dwData;
wchar_t* szEdit;
};
struct OCCOMBO {
- DWORD dwFlags;
+ uint32_t dwFlags;
wchar_t* szLabel;
INT_PTR dwData;
};
struct OCBUTTON {
- DWORD dwFlags;
+ uint32_t dwFlags;
wchar_t* szLabel;
INT_PTR dwData;
wchar_t* szButton;
};
struct OCDATETIME {
- DWORD dwFlags;
+ uint32_t dwFlags;
wchar_t* szLabel;
INT_PTR dwData;
wchar_t* szFormat;
- DWORD dwDateTime;
+ uint32_t dwDateTime;
};
struct OCCOLOR {
- DWORD dwFlags;
+ uint32_t dwFlags;
wchar_t* szLabel;
INT_PTR dwData;
COLORREF crColor;
@@ -152,7 +152,7 @@ public: HANDLE hItem;
INT_PTR dwData;
HANDLE hDropTarget;
- DWORD dwDropTargetData;
+ uint32_t dwDropTargetData;
BOOL bAbove;
};
};
diff --git a/plugins/HistoryStats/src/optionsctrlimpl.cpp b/plugins/HistoryStats/src/optionsctrlimpl.cpp index b9a7927f95..a4c12ad133 100644 --- a/plugins/HistoryStats/src/optionsctrlimpl.cpp +++ b/plugins/HistoryStats/src/optionsctrlimpl.cpp @@ -426,7 +426,7 @@ OptionsCtrlImpl::~OptionsCtrlImpl() LRESULT OptionsCtrlImpl::onWMCreate(CREATESTRUCT* pCS)
{
- DWORD dwStyle = 0;
+ uint32_t dwStyle = 0;
if (!(pCS->style & OCS_ALLOWDRAGDROP))
dwStyle |= TVS_DISABLEDRAGDROP;
@@ -477,7 +477,7 @@ void OptionsCtrlImpl::onWMDestroy() void OptionsCtrlImpl::onNMClick()
{
- DWORD dwPoint = GetMessagePos();
+ uint32_t dwPoint = GetMessagePos();
POINTS pts = MAKEPOINTS(dwPoint);
TVHITTESTINFO hti = { { pts.x, pts.y } };
@@ -861,7 +861,7 @@ void OptionsCtrlImpl::onOCMEnableItem(HTREEITEM hItem, bool bEnable) getItem(hItem)->setEnabled(bEnable);
}
-DWORD OptionsCtrlImpl::onOCMGetItemData(HTREEITEM hItem)
+uint32_t OptionsCtrlImpl::onOCMGetItemData(HTREEITEM hItem)
{
return getItem(hItem)->m_dwData;
}
@@ -1002,7 +1002,7 @@ void OptionsCtrlImpl::onOCMSelectItem(HTREEITEM hItem) TreeView_SelectItem(m_hTree, hItem);
}
-HTREEITEM OptionsCtrlImpl::onOCMGetItem(HTREEITEM hItem, DWORD dwFlag)
+HTREEITEM OptionsCtrlImpl::onOCMGetItem(HTREEITEM hItem, uint32_t dwFlag)
{
switch (dwFlag) {
case OCGI_FIRST:
@@ -1072,7 +1072,7 @@ void OptionsCtrlImpl::onOCMSetDateTimeNone(HTREEITEM hDateTime) reinterpret_cast<DateTime*>(pDateTime)->setNone();
}
-DWORD OptionsCtrlImpl::onOCMGetDateTime(HTREEITEM hDateTime, BOOL* pbNone)
+uint32_t OptionsCtrlImpl::onOCMGetDateTime(HTREEITEM hDateTime, BOOL* pbNone)
{
Item* pDateTime = getItem(hDateTime);
@@ -1084,7 +1084,7 @@ DWORD OptionsCtrlImpl::onOCMGetDateTime(HTREEITEM hDateTime, BOOL* pbNone) return reinterpret_cast<DateTime*>(pDateTime)->getTimestamp();
}
-void OptionsCtrlImpl::onOCMSetDateTime(HTREEITEM hDateTime, DWORD dwTimestamp)
+void OptionsCtrlImpl::onOCMSetDateTime(HTREEITEM hDateTime, uint32_t dwTimestamp)
{
Item* pDateTime = getItem(hDateTime);
@@ -1111,7 +1111,7 @@ void OptionsCtrlImpl::onOCMSetItemColor(HTREEITEM hColor, COLORREF crColor) reinterpret_cast<Color*>(pColor)->setColor(crColor);
}
-void OptionsCtrlImpl::insertItem(Item* pParent, Item* pItem, const wchar_t* szNodeText, DWORD dwFlags, int iImage)
+void OptionsCtrlImpl::insertItem(Item* pParent, Item* pItem, const wchar_t* szNodeText, uint32_t dwFlags, int iImage)
{
assert(!pParent || pParent->m_hItem);
assert(pItem);
diff --git a/plugins/HistoryStats/src/optionsctrlimpl.h b/plugins/HistoryStats/src/optionsctrlimpl.h index 97d27a92a2..9ec79b6941 100644 --- a/plugins/HistoryStats/src/optionsctrlimpl.h +++ b/plugins/HistoryStats/src/optionsctrlimpl.h @@ -76,7 +76,7 @@ private: INT_PTR m_dwData;
protected:
- explicit Item(OptionsCtrlImpl* pCtrl, ItemType ItemType, const wchar_t* szLabel, DWORD dwFlags, INT_PTR dwData);
+ explicit Item(OptionsCtrlImpl* pCtrl, ItemType ItemType, const wchar_t* szLabel, uint32_t dwFlags, INT_PTR dwData);
void enableChilds(bool bEnable);
@@ -102,7 +102,7 @@ private: bool m_bDrawLine;
public:
- explicit Group(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, DWORD dwFlags, INT_PTR dwData);
+ explicit Group(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, uint32_t dwFlags, INT_PTR dwData);
virtual void setEnabled(bool bEnable);
virtual void childAdded(Item* pChild);
@@ -122,7 +122,7 @@ private: void updateItem();
public:
- explicit Check(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, DWORD dwFlags, INT_PTR dwData);
+ explicit Check(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, uint32_t dwFlags, INT_PTR dwData);
virtual void onToggle();
@@ -171,7 +171,7 @@ private: void updateItem();
public:
- explicit Radio(OptionsCtrlImpl* pCtrl, Item* pParent, Radio* pSibling, const wchar_t* szLabel, DWORD dwFlags, INT_PTR dwData);
+ explicit Radio(OptionsCtrlImpl* pCtrl, Item* pParent, Radio* pSibling, const wchar_t* szLabel, uint32_t dwFlags, INT_PTR dwData);
virtual ~Radio();
virtual void onToggle();
@@ -196,7 +196,7 @@ private: ext::string getCombinedText();
public:
- explicit Edit(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, const wchar_t* szEdit, DWORD dwFlags, INT_PTR dwData);
+ explicit Edit(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, const wchar_t* szEdit, uint32_t dwFlags, INT_PTR dwData);
virtual void onToggle() { onActivate(); }
virtual void onSelect();
@@ -230,7 +230,7 @@ private: ext::string getCombinedText();
public:
- explicit Combo(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, DWORD dwFlags, INT_PTR dwData);
+ explicit Combo(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, uint32_t dwFlags, INT_PTR dwData);
virtual void onToggle() { onActivate(); }
virtual void onSelect();
@@ -256,7 +256,7 @@ private: HWND m_hButtonWnd;
public:
- explicit Button(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, const wchar_t* szButton, DWORD dwFlags, INT_PTR dwData);
+ explicit Button(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, const wchar_t* szButton, uint32_t dwFlags, INT_PTR dwData);
virtual void onToggle() { onActivate(); }
virtual void onSelect();
@@ -294,7 +294,7 @@ private: ext::string getCombinedText();
public:
- explicit DateTime(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, const wchar_t* szFormat, time_t timestamp, DWORD dwFlags, INT_PTR dwData);
+ explicit DateTime(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, const wchar_t* szFormat, time_t timestamp, uint32_t dwFlags, INT_PTR dwData);
virtual void onToggle() { onActivate(); }
virtual void onSelect();
@@ -325,7 +325,7 @@ private: COLORREF getColorValue();
public:
- explicit Color(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, COLORREF crColor, DWORD dwFlags, INT_PTR dwData);
+ explicit Color(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, COLORREF crColor, uint32_t dwFlags, INT_PTR dwData);
virtual void onToggle() { onActivate(); }
virtual void onSelect();
@@ -406,7 +406,7 @@ private: void onOCMSetItemLabel(HTREEITEM hItem, const wchar_t* szLabel);
bool onOCMIsItemEnabled(HTREEITEM hItem);
void onOCMEnableItem(HTREEITEM hItem, bool bEnable);
- DWORD onOCMGetItemData(HTREEITEM hItem);
+ uint32_t onOCMGetItemData(HTREEITEM hItem);
void onOCMSetItemData(HTREEITEM hItem, INT_PTR dwData);
bool onOCMIsItemChecked(HTREEITEM hItem);
void onOCMCheckItem(HTREEITEM hItem, bool bCheck);
@@ -423,18 +423,18 @@ private: void onOCMDeleteAllItems();
HTREEITEM onOCMGetSelection();
void onOCMSelectItem(HTREEITEM hItem);
- HTREEITEM onOCMGetItem(HTREEITEM hItem, DWORD dwFlag);
+ HTREEITEM onOCMGetItem(HTREEITEM hItem, uint32_t dwFlag);
void onOCMDeleteItem(HTREEITEM hItem);
void onOCMMoveItem(HTREEITEM& hItem, HTREEITEM hInsertAfter);
bool onOCMIsDateTimeNone(HTREEITEM hDateTime);
void onOCMSetDateTimeNone(HTREEITEM hDateTime);
- DWORD onOCMGetDateTime(HTREEITEM hDateTime, BOOL* pbNone);
- void onOCMSetDateTime(HTREEITEM hDateTime, DWORD dwTimestamp);
+ uint32_t onOCMGetDateTime(HTREEITEM hDateTime, BOOL* pbNone);
+ void onOCMSetDateTime(HTREEITEM hDateTime, uint32_t dwTimestamp);
COLORREF onOCMGetItemColor(HTREEITEM hColor);
void onOCMSetItemColor(HTREEITEM hColor, COLORREF crColor);
private:
- void insertItem(Item* pParent, Item* pItem, const wchar_t* szNodeText, DWORD dwFlags, int iImage);
+ void insertItem(Item* pParent, Item* pItem, const wchar_t* szNodeText, uint32_t dwFlags, int iImage);
void setModified(Item* pItem, bool bModified = true);
bool isItemValid(HTREEITEM hItem);
Item* getItem(HTREEITEM hItem);
diff --git a/plugins/HistoryStats/src/optionsctrlimpl_button.cpp b/plugins/HistoryStats/src/optionsctrlimpl_button.cpp index 3c29971d7e..d3d5df9106 100644 --- a/plugins/HistoryStats/src/optionsctrlimpl_button.cpp +++ b/plugins/HistoryStats/src/optionsctrlimpl_button.cpp @@ -7,7 +7,7 @@ * OptionsCtrlImpl::Button
*/
-OptionsCtrlImpl::Button::Button(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, const wchar_t* szButton, DWORD dwFlags, INT_PTR dwData)
+OptionsCtrlImpl::Button::Button(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, const wchar_t* szButton, uint32_t dwFlags, INT_PTR dwData)
: Item(pCtrl, itButton, szLabel, dwFlags, dwData)
, m_hButtonWnd(nullptr)
, m_strButton(szButton)
@@ -42,7 +42,7 @@ void OptionsCtrlImpl::Button::onSelect() HWND hTempWnd;
- DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON | BS_TEXT | BS_CENTER | BS_VCENTER;
+ uint32_t dwStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON | BS_TEXT | BS_CENTER | BS_VCENTER;
if (hTempWnd = CreateWindowEx(
0, WC_BUTTON, m_strButton.c_str(), dwStyle,
diff --git a/plugins/HistoryStats/src/optionsctrlimpl_check.cpp b/plugins/HistoryStats/src/optionsctrlimpl_check.cpp index 8776224299..b2c439c101 100644 --- a/plugins/HistoryStats/src/optionsctrlimpl_check.cpp +++ b/plugins/HistoryStats/src/optionsctrlimpl_check.cpp @@ -25,7 +25,7 @@ void OptionsCtrlImpl::Check::updateItem() enableChilds(getChildEnable());
}
-OptionsCtrlImpl::Check::Check(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, DWORD dwFlags, INT_PTR dwData) :
+OptionsCtrlImpl::Check::Check(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, uint32_t dwFlags, INT_PTR dwData) :
Item(pCtrl, itCheck, szLabel, dwFlags, dwData)
{
m_bChecked = bool_(dwFlags & OCF_CHECKED);
diff --git a/plugins/HistoryStats/src/optionsctrlimpl_color.cpp b/plugins/HistoryStats/src/optionsctrlimpl_color.cpp index 171945b028..b7f9267840 100644 --- a/plugins/HistoryStats/src/optionsctrlimpl_color.cpp +++ b/plugins/HistoryStats/src/optionsctrlimpl_color.cpp @@ -12,7 +12,7 @@ COLORREF OptionsCtrlImpl::Color::getColorValue() return SendMessage(m_hColorWnd, CPM_GETCOLOUR, 0, 0);
}
-OptionsCtrlImpl::Color::Color(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, COLORREF crColor, DWORD dwFlags, INT_PTR dwData)
+OptionsCtrlImpl::Color::Color(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, COLORREF crColor, uint32_t dwFlags, INT_PTR dwData)
: Item(pCtrl, itColor, szLabel, dwFlags, dwData)
, m_hColorWnd(nullptr)
, m_crColor(crColor)
@@ -51,7 +51,7 @@ void OptionsCtrlImpl::Color::onSelect() HWND hTempWnd;
- DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP;
+ uint32_t dwStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP;
if (hTempWnd = CreateWindowEx(
0, _A2W(WNDCLASS_COLOURPICKER), nullptr, dwStyle,
diff --git a/plugins/HistoryStats/src/optionsctrlimpl_combo.cpp b/plugins/HistoryStats/src/optionsctrlimpl_combo.cpp index 8affd38574..663b4962fe 100644 --- a/plugins/HistoryStats/src/optionsctrlimpl_combo.cpp +++ b/plugins/HistoryStats/src/optionsctrlimpl_combo.cpp @@ -46,7 +46,7 @@ ext::string OptionsCtrlImpl::Combo::getCombinedText() }
}
-OptionsCtrlImpl::Combo::Combo(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, DWORD dwFlags, INT_PTR dwData)
+OptionsCtrlImpl::Combo::Combo(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, uint32_t dwFlags, INT_PTR dwData)
: Item(pCtrl, itCombo, szLabel, dwFlags, dwData), m_hComboWnd(nullptr), m_nSelected(-1)
{
m_bDisableChildsOnIndex0 = bool_(dwFlags & OCF_DISABLECHILDSONINDEX0);
@@ -83,7 +83,7 @@ void OptionsCtrlImpl::Combo::onSelect() HWND hTempWnd;
- DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST;
+ uint32_t dwStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST;
if (hTempWnd = CreateWindowEx(
WS_EX_CLIENTEDGE, WC_COMBOBOX, L"", dwStyle,
diff --git a/plugins/HistoryStats/src/optionsctrlimpl_datetime.cpp b/plugins/HistoryStats/src/optionsctrlimpl_datetime.cpp index 54c3ee7380..3befd6ee67 100644 --- a/plugins/HistoryStats/src/optionsctrlimpl_datetime.cpp +++ b/plugins/HistoryStats/src/optionsctrlimpl_datetime.cpp @@ -109,8 +109,8 @@ SYSTEMTIME OptionsCtrlImpl::DateTime::toSystemTime(time_t timestamp) FILETIME ft;
LONGLONG ll = Int32x32To64(timestamp, 10000000) + 116444736000000000;
- ft.dwLowDateTime = static_cast<DWORD>(ll);
- ft.dwHighDateTime = static_cast<DWORD>(ll >> 32);
+ ft.dwLowDateTime = static_cast<uint32_t>(ll);
+ ft.dwHighDateTime = static_cast<uint32_t>(ll >> 32);
FileTimeToSystemTime(&ft, &st);
@@ -180,7 +180,7 @@ ext::string OptionsCtrlImpl::DateTime::getCombinedText() return strTemp;
}
-OptionsCtrlImpl::DateTime::DateTime(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, const wchar_t* szFormat, time_t timestamp, DWORD dwFlags, INT_PTR dwData)
+OptionsCtrlImpl::DateTime::DateTime(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, const wchar_t* szFormat, time_t timestamp, uint32_t dwFlags, INT_PTR dwData)
: Item(pCtrl, itDateTime, szLabel, dwFlags, dwData), m_hDateTimeWnd(nullptr), m_strFormat(szFormat), m_timestamp(timestamp)
{
m_bDisableChildsOnNone = bool_(dwFlags & OCF_DISABLECHILDSONNONE);
@@ -216,7 +216,7 @@ void OptionsCtrlImpl::DateTime::onSelect() HWND hTempWnd;
- DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP | (m_bAllowNone ? DTS_SHOWNONE : 0);
+ uint32_t dwStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP | (m_bAllowNone ? DTS_SHOWNONE : 0);
if (hTempWnd = CreateWindowEx(
WS_EX_CLIENTEDGE, DATETIMEPICK_CLASS, L"", dwStyle,
diff --git a/plugins/HistoryStats/src/optionsctrlimpl_edit.cpp b/plugins/HistoryStats/src/optionsctrlimpl_edit.cpp index d44346a126..b868de5440 100644 --- a/plugins/HistoryStats/src/optionsctrlimpl_edit.cpp +++ b/plugins/HistoryStats/src/optionsctrlimpl_edit.cpp @@ -38,7 +38,7 @@ ext::string OptionsCtrlImpl::Edit::getCombinedText() }
}
-OptionsCtrlImpl::Edit::Edit(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, const wchar_t* szEdit, DWORD dwFlags, INT_PTR dwData)
+OptionsCtrlImpl::Edit::Edit(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, const wchar_t* szEdit, uint32_t dwFlags, INT_PTR dwData)
: Item(pCtrl, itEdit, szLabel, dwFlags, dwData), m_hEditWnd(nullptr)
{
m_strEdit = szEdit;
@@ -75,7 +75,7 @@ void OptionsCtrlImpl::Edit::onSelect() }
HWND hTempWnd;
- DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_LEFT | ES_AUTOHSCROLL;
+ uint32_t dwStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_LEFT | ES_AUTOHSCROLL;
if (m_bNumber)
{
diff --git a/plugins/HistoryStats/src/optionsctrlimpl_group.cpp b/plugins/HistoryStats/src/optionsctrlimpl_group.cpp index 2d36374668..f1496b7cfa 100644 --- a/plugins/HistoryStats/src/optionsctrlimpl_group.cpp +++ b/plugins/HistoryStats/src/optionsctrlimpl_group.cpp @@ -5,7 +5,7 @@ * OptionsCtrlImpl::Group
*/
-OptionsCtrlImpl::Group::Group(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, DWORD dwFlags, INT_PTR dwData)
+OptionsCtrlImpl::Group::Group(OptionsCtrlImpl* pCtrl, Item* pParent, const wchar_t* szLabel, uint32_t dwFlags, INT_PTR dwData)
: Item(pCtrl, itGroup, szLabel, dwFlags, dwData)
{
m_bDrawLine = bool_(dwFlags & OCF_DRAWLINE);
diff --git a/plugins/HistoryStats/src/optionsctrlimpl_item.cpp b/plugins/HistoryStats/src/optionsctrlimpl_item.cpp index faf8ec18e0..2afba7746f 100644 --- a/plugins/HistoryStats/src/optionsctrlimpl_item.cpp +++ b/plugins/HistoryStats/src/optionsctrlimpl_item.cpp @@ -5,7 +5,7 @@ * OptionsCtrlImpl::Item
*/
-OptionsCtrlImpl::Item::Item(OptionsCtrlImpl* pCtrl, ItemType ItemType, const wchar_t* szLabel, DWORD dwFlags, INT_PTR dwData) :
+OptionsCtrlImpl::Item::Item(OptionsCtrlImpl* pCtrl, ItemType ItemType, const wchar_t* szLabel, uint32_t dwFlags, INT_PTR dwData) :
m_pCtrl(pCtrl), m_hItem(nullptr), m_nRef(1), m_ItemType(ItemType), m_strLabel(szLabel), m_dwData(dwData)
{
m_bEnabled = !(dwFlags & OCF_DISABLED);
diff --git a/plugins/HistoryStats/src/optionsctrlimpl_radio.cpp b/plugins/HistoryStats/src/optionsctrlimpl_radio.cpp index a8fc86ae86..5909a6e907 100644 --- a/plugins/HistoryStats/src/optionsctrlimpl_radio.cpp +++ b/plugins/HistoryStats/src/optionsctrlimpl_radio.cpp @@ -74,7 +74,7 @@ void OptionsCtrlImpl::Radio::updateItem() }
}
-OptionsCtrlImpl::Radio::Radio(OptionsCtrlImpl* pCtrl, Item* pParent, Radio* pSibling, const wchar_t* szLabel, DWORD dwFlags, INT_PTR dwData)
+OptionsCtrlImpl::Radio::Radio(OptionsCtrlImpl* pCtrl, Item* pParent, Radio* pSibling, const wchar_t* szLabel, uint32_t dwFlags, INT_PTR dwData)
: Item(pCtrl, itRadio, szLabel, dwFlags, dwData)
{
m_bDisableChildsOnUncheck = bool_(dwFlags & OCF_DISABLECHILDSONUNCHECK);
diff --git a/plugins/HistoryStats/src/settings.cpp b/plugins/HistoryStats/src/settings.cpp index 08f1518ea7..2d28b1d212 100644 --- a/plugins/HistoryStats/src/settings.cpp +++ b/plugins/HistoryStats/src/settings.cpp @@ -478,7 +478,7 @@ Settings& Settings::operator =(const Settings& other) return *this;
}
-ext::string Settings::getOutputFile(DWORD timeStarted) const
+ext::string Settings::getOutputFile(uint32_t timeStarted) const
{
ext::string strFile = m_OutputFile;
@@ -492,7 +492,7 @@ ext::string Settings::getOutputFile(DWORD timeStarted) const return strFile;
}
-ext::string Settings::getOutputPrefix(DWORD timeStarted) const
+ext::string Settings::getOutputPrefix(uint32_t timeStarted) const
{
if (m_OutputExtraToFolder && !m_OutputExtraFolder.empty()) {
ext::string extraFolder = m_OutputExtraFolder;
@@ -522,12 +522,12 @@ bool Settings::isPNGOutputActiveAndAvailable() const return (m_GraphicsMode == gmPNG);
}
-DWORD Settings::getIgnoreBefore() const
+uint32_t Settings::getIgnoreBefore() const
{
return utils::parseDate(m_IgnoreBefore);
}
-DWORD Settings::getIgnoreAfter() const
+uint32_t Settings::getIgnoreAfter() const
{
return utils::parseDate(m_IgnoreAfter);
}
diff --git a/plugins/HistoryStats/src/settings.h b/plugins/HistoryStats/src/settings.h index 77cafca6e7..705ac05f23 100644 --- a/plugins/HistoryStats/src/settings.h +++ b/plugins/HistoryStats/src/settings.h @@ -204,7 +204,7 @@ public: static const wchar_t* getDefaultFilterWords();
public:
- const DWORD m_VersionCurrent;
+ const uint32_t m_VersionCurrent;
private:
// column settings
@@ -297,11 +297,11 @@ public: bool manageFilterWords(HWND hParent, Column* pCol);
const Filter* getFilter(const ext::string& strID) const;
- ext::string getOutputFile(DWORD timeStarted) const;
- ext::string getOutputPrefix(DWORD timeStarted) const;
+ ext::string getOutputFile(uint32_t timeStarted) const;
+ ext::string getOutputPrefix(uint32_t timeStarted) const;
bool isPNGOutputActiveAndAvailable() const;
- DWORD getIgnoreBefore() const;
- DWORD getIgnoreAfter() const;
+ uint32_t getIgnoreBefore() const;
+ uint32_t getIgnoreAfter() const;
void ensureConstraints();
diff --git a/plugins/HistoryStats/src/settingsserializer.h b/plugins/HistoryStats/src/settingsserializer.h index 3b1fc2269a..c39bdc5e52 100644 --- a/plugins/HistoryStats/src/settingsserializer.h +++ b/plugins/HistoryStats/src/settingsserializer.h @@ -11,7 +11,7 @@ class SettingsSerializer , private pattern::NotCopyable<SettingsSerializer>
{
private:
- DWORD m_VersionInDB;
+ uint32_t m_VersionInDB;
MirandaSettings m_DB;
public:
diff --git a/plugins/HistoryStats/src/statistic.cpp b/plugins/HistoryStats/src/statistic.cpp index 4ef53b9379..79c2eeac1e 100644 --- a/plugins/HistoryStats/src/statistic.cpp +++ b/plugins/HistoryStats/src/statistic.cpp @@ -119,7 +119,7 @@ const Contact& Statistic::getContact(int index) const return *m_Contacts[index];
}
-DWORD Statistic::getFirstTime()
+uint32_t Statistic::getFirstTime()
{
if (!m_bHistoryTimeAvailable) {
// put _all_ available contacts (including omitted/total) in one list
@@ -137,7 +137,7 @@ DWORD Statistic::getFirstTime() l.push_back(&getTotals());
if (l.size() > 0) {
- DWORD nFirstTime = con::MaxDateTime, nLastTime = con::MinDateTime;
+ uint32_t nFirstTime = con::MaxDateTime, nLastTime = con::MinDateTime;
citer_each_(Statistic::ContactListC, c, l)
{
@@ -163,7 +163,7 @@ DWORD Statistic::getFirstTime() return m_nFirstTime;
}
-DWORD Statistic::getLastTime()
+uint32_t Statistic::getLastTime()
{
if (!m_bHistoryTimeAvailable) // trigger calculation
getFirstTime();
@@ -171,7 +171,7 @@ DWORD Statistic::getLastTime() return m_nLastTime;
}
-DWORD Statistic::getHistoryTime()
+uint32_t Statistic::getHistoryTime()
{
if (!m_bHistoryTimeAvailable) // trigger calculation
getFirstTime();
@@ -253,7 +253,7 @@ void Statistic::handleAddMessage(Contact& contact, Message& msg) }
}
-void Statistic::handleAddChat(Contact& contact, bool bOutgoing, DWORD localTimestampStarted, DWORD duration)
+void Statistic::handleAddChat(Contact& contact, bool bOutgoing, uint32_t localTimestampStarted, uint32_t duration)
{
if (duration >= m_Settings.m_ChatSessionMinDur) {
contact.addChat(bOutgoing, localTimestampStarted, duration);
@@ -392,8 +392,8 @@ bool Statistic::stepReadDB() curContact.beginMessages();
// init data for chat detection
- DWORD lastAddedTime = 0;
- DWORD chatStartTime = 0;
+ uint32_t lastAddedTime = 0;
+ uint32_t chatStartTime = 0;
bool bChatOutgoing = false;
Message curMsg(m_Settings.m_FilterRawRTF && RTFFilter::available(), m_Settings.m_FilterBBCodes);
@@ -407,7 +407,7 @@ bool Statistic::stepReadDB() // filter logged status messages from tabSRMM
if (dbei.eventType == etMessage) {
// convert to local time (everything in this plugin is done in local time)
- DWORD localTimestamp = TimeZone_ToLocal(dbei.timestamp);
+ uint32_t localTimestamp = TimeZone_ToLocal(dbei.timestamp);
if (localTimestamp >= m_TimeMin && localTimestamp <= m_TimeMax) {
if (dbei.flags & DBEF_UTF) {
@@ -445,7 +445,7 @@ bool Statistic::stepReadDB() handleAddMessage(curContact, curMsg);
// handle chats
- if (localTimestamp - lastAddedTime >= (DWORD)m_Settings.m_ChatSessionTimeout || lastAddedTime == 0) {
+ if (localTimestamp - lastAddedTime >= (uint32_t)m_Settings.m_ChatSessionTimeout || lastAddedTime == 0) {
// new chat started
if (chatStartTime != 0)
handleAddChat(curContact, bChatOutgoing, chatStartTime, lastAddedTime - chatStartTime);
@@ -595,15 +595,15 @@ bool Statistic::stepSortContacts() break;
case Settings::skChatDurationTotal:
- pCmp = new ContactCompare<DWORD>(pPrev, &Contact::getChatDurSum);
+ pCmp = new ContactCompare<uint32_t>(pPrev, &Contact::getChatDurSum);
break;
case Settings::skTimeOfFirstMessage:
- pCmp = new ContactCompare<DWORD>(pPrev, &Contact::getFirstTime);
+ pCmp = new ContactCompare<uint32_t>(pPrev, &Contact::getFirstTime);
break;
case Settings::skTimeOfLastMessage:
- pCmp = new ContactCompare<DWORD>(pPrev, &Contact::getLastTime);
+ pCmp = new ContactCompare<uint32_t>(pPrev, &Contact::getLastTime);
break;
case Settings::skBytesOutAvg:
@@ -701,11 +701,11 @@ bool Statistic::stepOmitContacts() if (m_Settings.m_OmitByValue) {
static const struct
{
- int type; // 0 = int, 1 = double, 2 = DWORD
+ int type; // 0 = int, 1 = double, 2 = uint32_t
double factor; // factor to multiply function output with
int (Contact::*int_fn)() const;
double (Contact::*double_fn)() const;
- DWORD(Contact::*DWORD_fn)() const;
+ uint32_t(Contact::*DWORD_fn)() const;
} valueMap[] = {
{ 0, 1.0, &Contact::getInBytes, nullptr, nullptr },
{ 0, 1.0, &Contact::getOutBytes, nullptr, nullptr },
@@ -1235,7 +1235,7 @@ bool Statistic::createStatistics() if (bDone)
break;
- DWORD result = MsgWaitForMultipleObjects(1, &hThread, FALSE, INFINITE, QS_ALLINPUT);
+ uint32_t result = MsgWaitForMultipleObjects(1, &hThread, FALSE, INFINITE, QS_ALLINPUT);
if (result == WAIT_OBJECT_0 + 1) // there is a message in the queue
continue;
diff --git a/plugins/HistoryStats/src/statistic.h b/plugins/HistoryStats/src/statistic.h index 9c387af846..9897bf6732 100644 --- a/plugins/HistoryStats/src/statistic.h +++ b/plugins/HistoryStats/src/statistic.h @@ -84,12 +84,12 @@ private: m_bResult; // result of calculations
// start time for statistics
- DWORD m_TimeStarted;
- DWORD m_MSecStarted;
+ uint32_t m_TimeStarted;
+ uint32_t m_MSecStarted;
// minimum/maximum date/time to include
- DWORD m_TimeMin;
- DWORD m_TimeMax;
+ uint32_t m_TimeMin;
+ uint32_t m_TimeMax;
// error processing and the like
ext::string m_ErrorText;
@@ -113,11 +113,11 @@ private: // first/last message
bool m_bHistoryTimeAvailable;
- DWORD m_nFirstTime;
- DWORD m_nLastTime;
+ uint32_t m_nFirstTime;
+ uint32_t m_nLastTime;
// misc data
- DWORD m_AverageMinTime;
+ uint32_t m_AverageMinTime;
private:
// contact handling
@@ -129,10 +129,10 @@ private: Contact& addContact(const ext::string& nick, const ext::string& protoDisplayName, const ext::string& groupName, int nSources);
// misc routines
- DWORD getTimeStarted() { return m_TimeStarted; }
+ uint32_t getTimeStarted() { return m_TimeStarted; }
bool shouldTerminate() { return (WaitForSingleObject(m_hCancelEvent, 0) == WAIT_OBJECT_0) || bool_(Miranda_IsTerminated()); }
void handleAddMessage(Contact& contact, Message& msg);
- void handleAddChat(Contact& contact, bool bOutgoing, DWORD localTimestampStarted, DWORD duration);
+ void handleAddChat(Contact& contact, bool bOutgoing, uint32_t localTimestampStarted, uint32_t duration);
// progress dialog handling
static INT_PTR CALLBACK staticProgressProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
@@ -172,10 +172,10 @@ public: const Contact& getOmitted() const { assert(m_pOmitted); return *m_pOmitted; }
bool hasTotals() const { return (m_pTotals != nullptr) && m_Settings.m_CalcTotals; } // MEMO: only makes sense after 'calc totals'-step
bool hasOmitted() const { return (m_pOmitted != nullptr) && m_Settings.m_OmitContacts && m_Settings.m_OmittedInExtraRow && m_bActuallyOmitted; } // MEMO: only makes sense after 'omit'-step
- DWORD getFirstTime(); // MEMO: only makes sense after 'calc totals'-step
- DWORD getLastTime(); // MEMO: only makes sense after 'calc totals'-step
- DWORD getHistoryTime(); // MEMO: only makes sense after 'calc totals'-step
- DWORD getAverageMinTime() { return m_AverageMinTime; }
+ uint32_t getFirstTime(); // MEMO: only makes sense after 'calc totals'-step
+ uint32_t getLastTime(); // MEMO: only makes sense after 'calc totals'-step
+ uint32_t getHistoryTime(); // MEMO: only makes sense after 'calc totals'-step
+ uint32_t getAverageMinTime() { return m_AverageMinTime; }
// file management
ext::string createFile(const ext::string& desiredName);
diff --git a/plugins/HistoryStats/src/utils.cpp b/plugins/HistoryStats/src/utils.cpp index 71a7f78de3..740763958e 100644 --- a/plugins/HistoryStats/src/utils.cpp +++ b/plugins/HistoryStats/src/utils.cpp @@ -23,7 +23,7 @@ ext::string utils::tmStructToString(const tm& value, const wchar_t* format) return (ext::strfunc::ftime(temp, 100, format, &value) > 0) ? temp : L"";
}
-ext::string utils::durationToString(DWORD value)
+ext::string utils::durationToString(uint32_t value)
{
wchar_t temp[100] = { 0 };
@@ -38,7 +38,7 @@ ext::string utils::durationToString(DWORD value) return temp;
}
-DWORD utils::parseDate(const ext::string& date)
+uint32_t utils::parseDate(const ext::string& date)
{
if (date.length() != 10 || date[4] != '-' || date[7] != '-')
return 0;
@@ -367,7 +367,7 @@ ext::string utils::toUpperCase(const ext::string& text) return ret_str;
}
-DWORD utils::dottedToVersion(ext::string version)
+uint32_t utils::dottedToVersion(ext::string version)
{
union
{
@@ -392,7 +392,7 @@ DWORD utils::dottedToVersion(ext::string version) return res.combined;
}
-ext::string utils::versionToDotted(DWORD version)
+ext::string utils::versionToDotted(uint32_t version)
{
wchar_t temp[16] = { 0 };
diff --git a/plugins/HistoryStats/src/utils.h b/plugins/HistoryStats/src/utils.h index 7e07ba6cbb..ad1e0afc70 100644 --- a/plugins/HistoryStats/src/utils.h +++ b/plugins/HistoryStats/src/utils.h @@ -9,11 +9,11 @@ namespace utils // time formatting
ext::string timestampToString(time_t value, const wchar_t* format);
ext::string tmStructToString(const tm& value, const wchar_t* format);
- inline ext::string timestampToDateTime(DWORD value) { return timestampToString(value, L"%c"); }
- inline ext::string timestampToDate(DWORD value) { return timestampToString(value, L"%x"); }
- inline ext::string timestampToTime(DWORD value) { return timestampToString(value, L"%X"); }
- ext::string durationToString(DWORD value);
- DWORD parseDate(const ext::string& date);
+ inline ext::string timestampToDateTime(uint32_t value) { return timestampToString(value, L"%c"); }
+ inline ext::string timestampToDate(uint32_t value) { return timestampToString(value, L"%x"); }
+ inline ext::string timestampToTime(uint32_t value) { return timestampToString(value, L"%X"); }
+ ext::string durationToString(uint32_t value);
+ uint32_t parseDate(const ext::string& date);
inline ext::string formatDate(time_t timeValue) { return timestampToString(timeValue, L"%Y-%m-%d"); }
// number formatting
@@ -39,8 +39,8 @@ namespace utils ext::string toUpperCase(const ext::string& text);
// version conversion
- DWORD dottedToVersion(ext::string version);
- ext::string versionToDotted(DWORD version);
+ uint32_t dottedToVersion(ext::string version);
+ ext::string versionToDotted(uint32_t version);
// character conversion (wide, ansi, utf8)
ext::a::string convertWToA(const wchar_t* str, size_t len);
diff --git a/plugins/HistorySweeperLight/src/historysweeperlight.cpp b/plugins/HistorySweeperLight/src/historysweeperlight.cpp index 71017f9817..183b41be60 100644 --- a/plugins/HistorySweeperLight/src/historysweeperlight.cpp +++ b/plugins/HistorySweeperLight/src/historysweeperlight.cpp @@ -82,8 +82,8 @@ int KeepCriteria(int dwti) struct BEventData
{
MEVENT hDBEvent;
- DWORD CRC32;
- DWORD Timestamp;
+ uint32_t CRC32;
+ uint32_t Timestamp;
};
static int CompareBookmarks(const void* p1, const void* p2)
diff --git a/plugins/HistorySweeperLight/src/options.cpp b/plugins/HistorySweeperLight/src/options.cpp index 0c3ce0fef3..e56cb99562 100644 --- a/plugins/HistorySweeperLight/src/options.cpp +++ b/plugins/HistorySweeperLight/src/options.cpp @@ -205,7 +205,7 @@ INT_PTR CALLBACK DlgProcHSOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM lParam) break;
case NM_CLICK:
- HANDLE hItem; DWORD hitFlags; int iImage;
+ HANDLE hItem; uint32_t hitFlags; int iImage;
if (nmc->iColumn == -1)
break;
diff --git a/plugins/HwHotKeys/src/HwHotKeys_DllMain.cpp b/plugins/HwHotKeys/src/HwHotKeys_DllMain.cpp index a1fb302e8d..00af48c6dd 100644 --- a/plugins/HwHotKeys/src/HwHotKeys_DllMain.cpp +++ b/plugins/HwHotKeys/src/HwHotKeys_DllMain.cpp @@ -27,13 +27,13 @@ HWND hDialogWnd = nullptr; // Ñ…Ñндл окна наÑтроек, он глоРHHOOK hHook;
// там хранÑÑ‚ÑÑ Ð½Ð°Ñтройки - Ñканкоды кнопок Ð´Ð»Ñ Ð·Ð°ÐºÑ€Ñ‹Ñ‚Ð¸Ñ/показа/чтениÑ, на которые должны реагировать ÑоответÑтвующие дейÑтвиÑ
-DWORD code_Close = 0;
-DWORD code_HideShow = 0;
-DWORD code_ReadMsg = 0;
+uint32_t code_Close = 0;
+uint32_t code_HideShow = 0;
+uint32_t code_ReadMsg = 0;
// в _tmp копируютÑÑ Ð½Ð°Ñтройки на Ð²Ñ€ÐµÐ¼Ñ Ð´Ð¸Ð°Ð»Ð¾Ð³Ð° наÑтроек
-DWORD code_Close_tmp = 0;
-DWORD code_HideShow_tmp = 0;
-DWORD code_ReadMsg_tmp = 0;
+uint32_t code_Close_tmp = 0;
+uint32_t code_HideShow_tmp = 0;
+uint32_t code_ReadMsg_tmp = 0;
// формат Ñканкодов тут такой:
// младшие 0...7 биты - Ñто аппаратный Ñканкод (как он приходит в KbdLLHookStruct.scanCode&0xFF)
// 8 бит - Ñто как бы чаÑÑ‚ÑŒ Ñканкода, флаг LLKHF_EXTENDED ((LOBYTE(KbdLLHookStruct.flags)&1) - чаÑÑ‚ÑŒ кнопок Ñ Ñтим флагом
@@ -57,9 +57,9 @@ DWORD code_ReadMsg_tmp = 0; -DWORD key_code = 0; // там поÑтоÑнно обновлÑетÑÑ Ñканкод текущей нажатой комбинации
-DWORD key_code_raw = 0;
-DWORD key_code_assign = 0; // во Ð²Ñ€ÐµÐ¼Ñ Ð½Ð°Ñтроек там хранитÑÑ Ñканкод поÑледней нажатой комбинации, который можно назначить Ð´Ð»Ñ Ð´ÐµÐ¹ÑтвиÑ.
+uint32_t key_code = 0; // там поÑтоÑнно обновлÑетÑÑ Ñканкод текущей нажатой комбинации
+uint32_t key_code_raw = 0;
+uint32_t key_code_assign = 0; // во Ð²Ñ€ÐµÐ¼Ñ Ð½Ð°Ñтроек там хранитÑÑ Ñканкод поÑледней нажатой комбинации, который можно назначить Ð´Ð»Ñ Ð´ÐµÐ¹ÑтвиÑ.
CHAR key_name_buffer[150]; // буфер куда печатаетÑÑ Ð¸Ð¼Ñ ÐºÐ½Ð¾Ð¿ÐºÐ¸ в наÑтройках. ANSI.
// Ð¡Ð°Ð¼Ð°Ñ Ð´Ð»Ð¸Ð½Ð½Ð°Ñ Ð² теории Ñтрока - «L_Shift + L_Ctrl + L_Alt + L_Win + R_Shift + R_Ctrl + R_Alt + R_Win + MSO_Print, HP_TouchPadOff» - менее 100 букв.
diff --git a/plugins/HwHotKeys/src/HwHotKeys_KbdHook.cpp b/plugins/HwHotKeys/src/HwHotKeys_KbdHook.cpp index a0808bd8b4..e6ecf195ca 100644 --- a/plugins/HwHotKeys/src/HwHotKeys_KbdHook.cpp +++ b/plugins/HwHotKeys/src/HwHotKeys_KbdHook.cpp @@ -75,7 +75,7 @@ LRESULT CALLBACK key_hook(int nCode, WPARAM wParam, LPARAM lParam) // https://m key_code = (LOWORD(key_code_raw)) | (key_code & 0xFFFF0000); // в Ñтаршей половине там лежат биты модификаторов - их оÑтавлÑем (они там могут быть от предыдущего раза)
if (hDialogWnd) { // еÑли диалог наÑтроек открыт - выводим в него комплекÑную комбинацию (типа Shift+Key), которую потом можно назначить;
if (IsDlgButtonChecked(hDialogWnd, dlg_combine)) { // левые/правые модификаторы объединÑÑ‚ÑŒ в один?
- DWORD tmp1, tmp2;
+ uint32_t tmp1, tmp2;
tmp1 = ((key_code >> 4) | (key_code >> 8)) & 0x00F00000;
tmp2 = LOWORD(key_code) | tmp1;
tmp2 &= 0x00F001FF;
diff --git a/plugins/HwHotKeys/src/HwHotKeys_Util.cpp b/plugins/HwHotKeys/src/HwHotKeys_Util.cpp index ecbce8b736..f6e1ed732b 100644 --- a/plugins/HwHotKeys/src/HwHotKeys_Util.cpp +++ b/plugins/HwHotKeys/src/HwHotKeys_Util.cpp @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 - 1307, USA. // Ñравнивает текущий нажатый Ñканкод Ñ ÑƒÐºÐ°Ð·Ð°Ð½Ð½Ñ‹Ð¼
-BOOL HwHotKeys_CompareCurrentScancode(DWORD scancode)
+BOOL HwHotKeys_CompareCurrentScancode(uint32_t scancode)
{
if (key_code == scancode) // key_code - текущий нажатый на клавиатуре Ñканкод.
{
@@ -32,7 +32,7 @@ BOOL HwHotKeys_CompareCurrentScancode(DWORD scancode) {
return false;
}
- DWORD tmp1, tmp2; // битовые маÑки: 0xF0000000 - левые кнопки Sft/Ctr/Alt/Win, 0x0F000000 - правые кнопки, 0x00F00000 - любые кнопки Sft/Ctr/Alt/Win
+ uint32_t tmp1, tmp2; // битовые маÑки: 0xF0000000 - левые кнопки Sft/Ctr/Alt/Win, 0x0F000000 - правые кнопки, 0x00F00000 - любые кнопки Sft/Ctr/Alt/Win
tmp1 = key_code >> 8; // Ñдвигаем биты левых и правых кнопок.
tmp2 = key_code >> 4;
tmp1 |= tmp2;
@@ -49,7 +49,7 @@ BOOL HwHotKeys_CompareCurrentScancode(DWORD scancode) // печатает в буфер key_name_buffer текÑтовое опиÑание нажатой комбинации кнопок
// Кодировка ANSI (Ð´Ð»Ñ Ñкономии меÑта, вÑÑ‘ равно Ð½Ð°Ð·Ð²Ð°Ð½Ð¸Ñ ÐºÐ»Ð°Ð²Ð¸Ñˆ английÑкие)
-VOID HwHotKeys_PrintFullKeyname(DWORD scancode)
+VOID HwHotKeys_PrintFullKeyname(uint32_t scancode)
{
key_name_buffer[0] = 0;
if (!scancode) // еÑли нулевой Ñканкод - то пуÑтую Ñтроку делаем.
diff --git a/plugins/HwHotKeys/src/stdafx.h b/plugins/HwHotKeys/src/stdafx.h index cc32f8e7e8..84fecbe027 100644 --- a/plugins/HwHotKeys/src/stdafx.h +++ b/plugins/HwHotKeys/src/stdafx.h @@ -35,8 +35,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 - 1307, USA. int initializeOptions(WPARAM, LPARAM);
INT_PTR CALLBACK OptDlgProc(HWND, UINT, WPARAM, LPARAM);
-VOID HwHotKeys_PrintFullKeyname(DWORD);
-BOOL HwHotKeys_CompareCurrentScancode(DWORD);
+VOID HwHotKeys_PrintFullKeyname(uint32_t);
+BOOL HwHotKeys_CompareCurrentScancode(uint32_t);
LRESULT CALLBACK key_hook(INT, WPARAM, LPARAM);
struct CMPlugin : public PLUGIN<CMPlugin>
@@ -50,16 +50,16 @@ struct CMPlugin : public PLUGIN<CMPlugin> extern HWND hDialogWnd; // глобально иÑпользуетÑÑ Ð´Ð»Ñ Ð²Ñ‹Ð²Ð¾Ð´Ð° туда в реалтайме Ñканкодов клавы, из хука
extern HHOOK hHook;
-extern DWORD code_Close_tmp;
-extern DWORD code_HideShow_tmp;
-extern DWORD code_ReadMsg_tmp;
-extern DWORD code_Close;
-extern DWORD code_HideShow;
-extern DWORD code_ReadMsg;
+extern uint32_t code_Close_tmp;
+extern uint32_t code_HideShow_tmp;
+extern uint32_t code_ReadMsg_tmp;
+extern uint32_t code_Close;
+extern uint32_t code_HideShow;
+extern uint32_t code_ReadMsg;
-extern DWORD key_code;
-extern DWORD key_code_raw;
-extern DWORD key_code_assign;
+extern uint32_t key_code;
+extern uint32_t key_code_raw;
+extern uint32_t key_code_assign;
extern CHAR key_name_buffer[150];
diff --git a/plugins/IEHistory/src/IEHistory.cpp b/plugins/IEHistory/src/IEHistory.cpp index d0d5e853be..ed389e28a8 100644 --- a/plugins/IEHistory/src/IEHistory.cpp +++ b/plugins/IEHistory/src/IEHistory.cpp @@ -28,7 +28,7 @@ HINSTANCE hInstance; MWindowList hOpenWindowsList = nullptr; HMODULE hUxTheme = nullptr; -BOOL(WINAPI *MyEnableThemeDialogTexture)(HANDLE, DWORD) = nullptr; +BOOL(WINAPI *MyEnableThemeDialogTexture)(HANDLE, uint32_t) = nullptr; ///////////////////////////////////////////////////////////////////////////////////////// @@ -68,7 +68,7 @@ int CMPlugin::Load() InitCommonControlsEx(&icex); if ((hUxTheme = LoadLibraryA("uxtheme.dll")) != nullptr) - MyEnableThemeDialogTexture = (BOOL(WINAPI *)(HANDLE, DWORD))GetProcAddress(hUxTheme, "EnableThemeDialogTexture"); + MyEnableThemeDialogTexture = (BOOL(WINAPI *)(HANDLE, uint32_t))GetProcAddress(hUxTheme, "EnableThemeDialogTexture"); // all initialization here hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_HISTORYICON)); diff --git a/plugins/IEHistory/src/dlgHandlers.cpp b/plugins/IEHistory/src/dlgHandlers.cpp index 7d8e8a62da..7c650638dc 100644 --- a/plugins/IEHistory/src/dlgHandlers.cpp +++ b/plugins/IEHistory/src/dlgHandlers.cpp @@ -143,7 +143,7 @@ void FillIEViewInfo(IEVIEWEVENTDATA *fillData, DBEVENTINFO dbInfo, uint8_t *blob }
}
-DWORD WINAPI WorkerThread(LPVOID lpvData)
+uint32_t WINAPI WorkerThread(LPVOID lpvData)
{
Log("%s", "Inside worker thread ...");
WorkerThreadData *data = (WorkerThreadData *)lpvData;
diff --git a/plugins/IEHistory/src/stdafx.h b/plugins/IEHistory/src/stdafx.h index d0d04d4175..8aa31c8ae1 100644 --- a/plugins/IEHistory/src/stdafx.h +++ b/plugins/IEHistory/src/stdafx.h @@ -59,7 +59,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct CMPlugin : public PLUGIN<CMPlugin> { CMOption<uint8_t> bEnableRtl, bShowLastFirst, bUseWorker; - CMOption<DWORD> iLoadCount; + CMOption<uint32_t> iLoadCount; CMPlugin(); @@ -70,6 +70,6 @@ struct CMPlugin : public PLUGIN<CMPlugin> extern HICON hIcon; //history icon extern MWindowList hOpenWindowsList; -extern BOOL (WINAPI *MyEnableThemeDialogTexture)(HANDLE, DWORD); +extern BOOL (WINAPI *MyEnableThemeDialogTexture)(HANDLE, uint32_t); #endif diff --git a/plugins/IEHistory/src/utils.cpp b/plugins/IEHistory/src/utils.cpp index 8084269bea..c96baeff7c 100644 --- a/plugins/IEHistory/src/utils.cpp +++ b/plugins/IEHistory/src/utils.cpp @@ -95,7 +95,7 @@ void UnixTimeToFileTime(time_t t, LPFILETIME pft) LONGLONG ll; ll = Int32x32To64(t, 10000000) + 116444736000000000; - pft->dwLowDateTime = (DWORD)ll; + pft->dwLowDateTime = (uint32_t)ll; pft->dwHighDateTime = ll >> 32; } diff --git a/plugins/IEView/src/HTMLBuilder.cpp b/plugins/IEView/src/HTMLBuilder.cpp index fcbd404f80..bc46529b1d 100644 --- a/plugins/IEView/src/HTMLBuilder.cpp +++ b/plugins/IEView/src/HTMLBuilder.cpp @@ -129,12 +129,12 @@ void HTMLBuilder::setLastEventType(int t) iLastEventType = t;
}
-DWORD HTMLBuilder::getLastEventTime()
+uint32_t HTMLBuilder::getLastEventTime()
{
return lastEventTime;
}
-void HTMLBuilder::setLastEventTime(DWORD t)
+void HTMLBuilder::setLastEventTime(uint32_t t)
{
lastEventTime = t;
}
@@ -239,8 +239,8 @@ void HTMLBuilder::appendEventOld(IEView *view, IEVIEWEVENT *event) eventData->iType = IEED_EVENT_STATUSCHANGE;
}
else if (dbei.eventType == EVENTTYPE_FILE) {
- // blob is: sequenceid(DWORD),filename(ASCIIZ),description(ASCIIZ)
- char* filename = ((char *)dbei.pBlob) + sizeof(DWORD);
+ // blob is: sequenceid(uint32_t),filename(ASCIIZ),description(ASCIIZ)
+ char* filename = ((char *)dbei.pBlob) + sizeof(uint32_t);
char* descr = filename + mir_strlen(filename) + 1;
eventData->szText.w = DbEvent_GetString(&dbei, filename);
if (*descr != '\0')
@@ -248,13 +248,13 @@ void HTMLBuilder::appendEventOld(IEView *view, IEVIEWEVENT *event) eventData->iType = IEED_EVENT_FILE;
}
else if (dbei.eventType == EVENTTYPE_AUTHREQUEST) {
- // blob is: uin(DWORD), hContact(DWORD), nick(ASCIIZ), first(ASCIIZ), last(ASCIIZ), email(ASCIIZ)
+ // blob is: uin(uint32_t), hContact(uint32_t), nick(ASCIIZ), first(ASCIIZ), last(ASCIIZ), email(ASCIIZ)
eventData->szText.w = mir_wstrdup(TranslateT(" requested authorization"));
eventData->szNick.w = DbEvent_GetString(&dbei, (char *)dbei.pBlob + 8);
eventData->iType = IEED_EVENT_SYSTEM;
}
else if (dbei.eventType == EVENTTYPE_ADDED) {
- //blob is: uin(DWORD), hContact(DWORD), nick(ASCIIZ), first(ASCIIZ), last(ASCIIZ), email(ASCIIZ)
+ //blob is: uin(uint32_t), hContact(uint32_t), nick(ASCIIZ), first(ASCIIZ), last(ASCIIZ), email(ASCIIZ)
eventData->szText.w = mir_wstrdup(TranslateT(" was added."));
eventData->szNick.w = DbEvent_GetString(&dbei, (char *)dbei.pBlob + 8);
eventData->iType = IEED_EVENT_SYSTEM;
diff --git a/plugins/IEView/src/HTMLBuilder.h b/plugins/IEView/src/HTMLBuilder.h index 02793c3cdc..e1ebaa66d4 100644 --- a/plugins/IEView/src/HTMLBuilder.h +++ b/plugins/IEView/src/HTMLBuilder.h @@ -38,7 +38,7 @@ private: MIM_UNICODE = 2
};
protected:
- DWORD lastEventTime;
+ uint32_t lastEventTime;
int iLastEventType;
enum ENCODEFLAGS {
ENF_NONE = 0,
@@ -62,8 +62,8 @@ protected: virtual char* getEncodedContactName(MCONTACT hContact, const char *szProto);
virtual void getUINs(MCONTACT hContact, char *&uinIn, char *&uinOut);
- virtual DWORD getLastEventTime();
- virtual void setLastEventTime(DWORD);
+ virtual uint32_t getLastEventTime();
+ virtual void setLastEventTime(uint32_t);
virtual int getLastEventType();
virtual void setLastEventType(int);
diff --git a/plugins/IEView/src/HistoryHTMLBuilder.cpp b/plugins/IEView/src/HistoryHTMLBuilder.cpp index 4bbb51d85a..f4d4ffba07 100644 --- a/plugins/IEView/src/HistoryHTMLBuilder.cpp +++ b/plugins/IEView/src/HistoryHTMLBuilder.cpp @@ -221,7 +221,7 @@ void HistoryHTMLBuilder::buildHead(IEView *view, IEVIEWEVENT *event) void HistoryHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event)
{
- DWORD dwFlags = db_get_b(0, HPPMOD, SRMSGSET_SHOWICONS, 0) ? SMF_LOG_SHOWICONS : 0;
+ uint32_t dwFlags = db_get_b(0, HPPMOD, SRMSGSET_SHOWICONS, 0) ? SMF_LOG_SHOWICONS : 0;
IEVIEWEVENTDATA* eventData = event->eventData;
for (int eventIdx = 0; eventData != nullptr && (eventIdx < event->count || event->count == -1); eventData = eventData->next, eventIdx++) {
CMStringA str;
diff --git a/plugins/IEView/src/IEView.cpp b/plugins/IEView/src/IEView.cpp index 02478c5738..20b012c8ad 100644 --- a/plugins/IEView/src/IEView.cpp +++ b/plugins/IEView/src/IEView.cpp @@ -677,7 +677,7 @@ STDMETHODIMP IEView::GetSecurityId(LPCWSTR, uint8_t *, DWORD *, DWORD_PTR) STDMETHODIMP IEView::ProcessUrlAction(LPCWSTR pwszUrl, DWORD dwAction, uint8_t *pPolicy, DWORD cbPolicy, uint8_t *, DWORD, DWORD, DWORD)
{
- DWORD dwPolicy = URLPOLICY_ALLOW;
+ uint32_t dwPolicy = URLPOLICY_ALLOW;
if (pwszUrl != nullptr && !mir_wstrcmp(pwszUrl, L"about:blank")) {
if (dwAction <= URLACTION_ACTIVEX_MAX && dwAction >= URLACTION_ACTIVEX_MIN) {
//dwPolicy = URLPOLICY_DISALLOW;
@@ -697,8 +697,8 @@ STDMETHODIMP IEView::ProcessUrlAction(LPCWSTR pwszUrl, DWORD dwAction, uint8_t * }
else return INET_E_DEFAULT_ACTION;
- if (cbPolicy >= sizeof(DWORD)) {
- *(DWORD*)pPolicy = dwPolicy;
+ if (cbPolicy >= sizeof(uint32_t)) {
+ *(uint32_t*)pPolicy = dwPolicy;
return S_OK;
}
diff --git a/plugins/IEView/src/IEView.h b/plugins/IEView/src/IEView.h index d3e4677ed2..bb57ccd1a2 100644 --- a/plugins/IEView/src/IEView.h +++ b/plugins/IEView/src/IEView.h @@ -42,8 +42,8 @@ static const CLSID CLSID_MozillaBrowser = typedef struct _DOCHOSTUIINFO
{
ULONG cbSize;
- DWORD dwFlags;
- DWORD dwDoubleClick;
+ uint32_t dwFlags;
+ uint32_t dwDoubleClick;
OLECHAR *pchHostCss;
OLECHAR *pchHostNS;
} DOCHOSTUIINFO;
@@ -358,12 +358,12 @@ extern "C" { STDMETHOD(SetSecuritySite)(THIS_ IInternetSecurityMgrSite*) PURE;
STDMETHOD(GetSecuritySite)(THIS_ IInternetSecurityMgrSite**) PURE;
- STDMETHOD(MapUrlToZone)(THIS_ LPCWSTR,DWORD*,DWORD) PURE;
- STDMETHOD(GetSecurityId)(THIS_ LPCWSTR,uint8_t*,DWORD*,DWORD_PTR) PURE;
- STDMETHOD(ProcessUrlAction)(THIS_ LPCWSTR,DWORD,uint8_t*,DWORD,uint8_t*,DWORD,DWORD,DWORD) PURE;
- STDMETHOD(QueryCustomPolicy)(THIS_ LPCWSTR,REFGUID,uint8_t**,DWORD*,uint8_t*,DWORD,DWORD) PURE;
- STDMETHOD(SetZoneMapping)(THIS_ DWORD,LPCWSTR,DWORD) PURE;
- STDMETHOD(GetZoneMappings)(THIS_ DWORD,IEnumString**,DWORD) PURE;
+ STDMETHOD(MapUrlToZone)(THIS_ LPCWSTR,uint32_t*,uint32_t) PURE;
+ STDMETHOD(GetSecurityId)(THIS_ LPCWSTR,uint8_t*,uint32_t*,DWORD_PTR) PURE;
+ STDMETHOD(ProcessUrlAction)(THIS_ LPCWSTR,uint32_t,uint8_t*,uint32_t,uint8_t*,uint32_t,uint32_t,uint32_t) PURE;
+ STDMETHOD(QueryCustomPolicy)(THIS_ LPCWSTR,REFGUID,uint8_t**,uint32_t*,uint8_t*,uint32_t,uint32_t) PURE;
+ STDMETHOD(SetZoneMapping)(THIS_ uint32_t,LPCWSTR,uint32_t) PURE;
+ STDMETHOD(GetZoneMappings)(THIS_ uint32_t,IEnumString**,uint32_t) PURE;
};
#undef INTERFACE
@@ -453,7 +453,7 @@ class IEView :public IDispatch, public IOleClientSite, public IOleInPlaceSite, p STDMETHOD(GetTypeInfoCount)(UINT*);
STDMETHOD(GetTypeInfo)(UINT, LCID, LPTYPEINFO*);
STDMETHOD(GetIDsOfNames)(REFIID, LPOLESTR*, UINT, LCID, DISPID*);
- STDMETHOD(Invoke)(DISPID, REFIID, LCID, uint16_t, DISPPARAMS*, VARIANT*, EXCEPINFO*, UINT*);
+ STDMETHOD(Invoke)(DISPID, REFIID, LCID, WORD, DISPPARAMS*, VARIANT*, EXCEPINFO*, UINT*);
// IOleWindow
STDMETHOD(GetWindow)(HWND *phwnd);
STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode);
diff --git a/plugins/IEView/src/Options.cpp b/plugins/IEView/src/Options.cpp index 26f2d1a7d0..09e4226c82 100644 --- a/plugins/IEView/src/Options.cpp +++ b/plugins/IEView/src/Options.cpp @@ -159,7 +159,7 @@ static void UpdateControlsState(HWND hwndDlg) EnableWindow(GetDlgItem(hwndDlg, IDC_BROWSE_BACKGROUND_IMAGE), bChecked);
}
-static void SetIcon(HWND hwnd, DWORD id, int index, bool condition)
+static void SetIcon(HWND hwnd, uint32_t id, int index, bool condition)
{
HICON hIcon;
if (condition)
@@ -463,7 +463,7 @@ static INT_PTR CALLBACK IEViewGeneralOptDlgProc(HWND hwndDlg, UINT msg, WPARAM w case WM_NOTIFY:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- DWORD i = 0;
+ uint32_t i = 0;
if (IsDlgButtonChecked(hwndDlg, IDC_ENABLE_BBCODES))
i |= Options::GENERAL_ENABLE_BBCODES;
@@ -597,7 +597,7 @@ static INT_PTR CALLBACK IEViewSRMMOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar case NM_CLICK:
{
TVHITTESTINFO ht = { 0 };
- DWORD dwpos = GetMessagePos();
+ uint32_t dwpos = GetMessagePos();
POINTSTOPOINT(ht.pt, MAKEPOINTS(dwpos));
MapWindowPoints(HWND_DESKTOP, ((LPNMHDR)lParam)->hwndFrom, &ht.pt, 1);
TreeView_HitTest(((LPNMHDR)lParam)->hwndFrom, &ht);
@@ -735,7 +735,7 @@ static INT_PTR CALLBACK IEViewHistoryOptDlgProc(HWND hwndDlg, UINT msg, WPARAM w case NM_CLICK:
{
TVHITTESTINFO ht = {};
- DWORD dwpos = GetMessagePos();
+ uint32_t dwpos = GetMessagePos();
POINTSTOPOINT(ht.pt, MAKEPOINTS(dwpos));
MapWindowPoints(HWND_DESKTOP, ((LPNMHDR)lParam)->hwndFrom, &ht.pt, 1);
TreeView_HitTest(((LPNMHDR)lParam)->hwndFrom, &ht);
@@ -873,7 +873,7 @@ static INT_PTR CALLBACK IEViewGroupChatsOptDlgProc(HWND hwndDlg, UINT msg, WPARA case NM_CLICK:
{
TVHITTESTINFO ht = {};
- DWORD dwpos = GetMessagePos();
+ uint32_t dwpos = GetMessagePos();
POINTSTOPOINT(ht.pt, MAKEPOINTS(dwpos));
MapWindowPoints(HWND_DESKTOP, ((LPNMHDR)lParam)->hwndFrom, &ht.pt, 1);
TreeView_HitTest(((LPNMHDR)lParam)->hwndFrom, &ht);
@@ -1131,7 +1131,7 @@ void Options::uninit() void Options::setEmbedSize(int size)
{
- g_plugin.setDword("Embedsize", (DWORD)size);
+ g_plugin.setDword("Embedsize", (uint32_t)size);
}
int Options::getEmbedSize()
diff --git a/plugins/IEView/src/ScriverHTMLBuilder.cpp b/plugins/IEView/src/ScriverHTMLBuilder.cpp index 23f12d20f2..f0abd2c097 100644 --- a/plugins/IEView/src/ScriverHTMLBuilder.cpp +++ b/plugins/IEView/src/ScriverHTMLBuilder.cpp @@ -118,7 +118,7 @@ void ScriverHTMLBuilder::loadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour) }
}
-char* ScriverHTMLBuilder::timestampToString(DWORD dwFlags, time_t check, int mode)
+char* ScriverHTMLBuilder::timestampToString(uint32_t dwFlags, time_t check, int mode)
{
static char szResult[512]; szResult[0] = '\0';
char str[80];
@@ -260,7 +260,7 @@ void ScriverHTMLBuilder::buildHead(IEView *view, IEVIEWEVENT *event) void ScriverHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event)
{
bool showColon;
- DWORD dwFlags = db_get_b(0, SRMMMOD, SRMSGSET_SHOWTIME, 0) ? SMF_LOG_SHOWTIME : 0;
+ uint32_t dwFlags = db_get_b(0, SRMMMOD, SRMSGSET_SHOWTIME, 0) ? SMF_LOG_SHOWTIME : 0;
dwFlags |= !db_get_b(0, SRMMMOD, SRMSGSET_HIDENAMES, 0) ? SMF_LOG_SHOWNICK : 0;
dwFlags |= db_get_b(0, SRMMMOD, SRMSGSET_SHOWDATE, 0) ? SMF_LOG_SHOWDATE : 0;
dwFlags |= db_get_b(0, SRMMMOD, SRMSGSET_SHOWLOGICONS, 0) ? SMF_LOG_SHOWICONS : 0;
diff --git a/plugins/IEView/src/ScriverHTMLBuilder.h b/plugins/IEView/src/ScriverHTMLBuilder.h index 289cda6cf4..5b9d7170d0 100644 --- a/plugins/IEView/src/ScriverHTMLBuilder.h +++ b/plugins/IEView/src/ScriverHTMLBuilder.h @@ -29,7 +29,7 @@ class ScriverHTMLBuilder :public TemplateHTMLBuilder {
protected:
void loadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour);
- char *timestampToString(DWORD dwFlags, time_t check, int groupStart);
+ char *timestampToString(uint32_t dwFlags, time_t check, int groupStart);
bool isDbEventShown(DBEVENTINFO * dbei);
void appendEventNonTemplate(IEView *, IEVIEWEVENT *event);
public:
diff --git a/plugins/IEView/src/TabSRMMHTMLBuilder.cpp b/plugins/IEView/src/TabSRMMHTMLBuilder.cpp index 2eeb4baca9..85e6b8859e 100644 --- a/plugins/IEView/src/TabSRMMHTMLBuilder.cpp +++ b/plugins/IEView/src/TabSRMMHTMLBuilder.cpp @@ -82,7 +82,7 @@ TabSRMMHTMLBuilder::TabSRMMHTMLBuilder() startedTime = time(0);
}
-bool TabSRMMHTMLBuilder::isDbEventShown(DWORD dwFlags, DBEVENTINFO *dbei)
+bool TabSRMMHTMLBuilder::isDbEventShown(uint32_t dwFlags, DBEVENTINFO *dbei)
{
switch (dbei->eventType) {
case EVENTTYPE_MESSAGE:
@@ -103,7 +103,7 @@ bool TabSRMMHTMLBuilder::isDbEventShown(DWORD dwFlags, DBEVENTINFO *dbei) bool TabSRMMHTMLBuilder::isDbEventShown(DBEVENTINFO * dbei)
{
- DWORD dwFlags2 = db_get_b(0, SRMSGMOD_T, SRMSGSET_SHOWURLS, 0) ? MWF_SHOW_URLEVENTS : 0;
+ uint32_t dwFlags2 = db_get_b(0, SRMSGMOD_T, SRMSGSET_SHOWURLS, 0) ? MWF_SHOW_URLEVENTS : 0;
dwFlags2 |= db_get_b(0, SRMSGMOD_T, SRMSGSET_SHOWFILES, 0) ? MWF_SHOW_FILEEVENTS : 0;
return isDbEventShown(dwFlags2, dbei);
}
@@ -148,7 +148,7 @@ void TabSRMMHTMLBuilder::loadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour) }
}
-char* TabSRMMHTMLBuilder::timestampToString(DWORD dwFlags, time_t check, int isGroupBreak)
+char* TabSRMMHTMLBuilder::timestampToString(uint32_t dwFlags, time_t check, int isGroupBreak)
{
static char szResult[512];
char str[80];
@@ -218,7 +218,7 @@ void TabSRMMHTMLBuilder::buildHead(IEView *view, IEVIEWEVENT *event) HDC hdc = GetDC(nullptr);
int logPixelSY = GetDeviceCaps(hdc, LOGPIXELSY);
ReleaseDC(nullptr, hdc);
- DWORD dwFlags = db_get_dw(0, SRMSGMOD_T, "mwflags", MWF_LOG_DEFAULT);
+ uint32_t dwFlags = db_get_dw(0, SRMSGMOD_T, "mwflags", MWF_LOG_DEFAULT);
str.Append("<html><head><style type=\"text/css\">\n");
COLORREF inColor, outColor;
COLORREF bkgColor = db_get_dw(0, TABSRMM_FONTMODULE, "BkgColour", 0xFFFFFF);
@@ -288,10 +288,10 @@ time_t TabSRMMHTMLBuilder::getStartedTime() void TabSRMMHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event)
{
- DWORD today = (DWORD)time(0);
+ uint32_t today = (uint32_t)time(0);
today = today - today % 86400;
- DWORD dwFlags = db_get_dw(0, SRMSGMOD_T, "mwflags", MWF_LOG_DEFAULT);
- DWORD dwFlags2 = db_get_b(0, SRMSGMOD_T, SRMSGSET_SHOWURLS, 0) ? MWF_SHOW_URLEVENTS : 0;
+ uint32_t dwFlags = db_get_dw(0, SRMSGMOD_T, "mwflags", MWF_LOG_DEFAULT);
+ uint32_t dwFlags2 = db_get_b(0, SRMSGMOD_T, SRMSGSET_SHOWURLS, 0) ? MWF_SHOW_URLEVENTS : 0;
dwFlags2 |= db_get_b(0, SRMSGMOD_T, SRMSGSET_SHOWFILES, 0) ? MWF_SHOW_FILEEVENTS : 0;
dwFlags2 |= db_get_b(0, SRMSGMOD_T, "in_out_icons", 0) ? MWF_SHOW_INOUTICONS : 0;
dwFlags2 |= db_get_b(0, SRMSGMOD_T, "emptylinefix", 1) ? MWF_SHOW_EMPTYLINEFIX : 0;
@@ -304,11 +304,11 @@ void TabSRMMHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event bool isGroupBreak = true;
bool isSent = (eventData->dwFlags & IEEDF_SENT) != 0;
bool isRTL = (eventData->dwFlags & IEEDF_RTL) != 0;
- int isHistory = (eventData->time < (DWORD)getStartedTime() && (eventData->dwFlags & IEEDF_READ || eventData->dwFlags & IEEDF_SENT));
+ int isHistory = (eventData->time < (uint32_t)getStartedTime() && (eventData->dwFlags & IEEDF_READ || eventData->dwFlags & IEEDF_SENT));
if (dwFlags & MWF_LOG_GROUPMODE && eventData->dwFlags == LOWORD(getLastEventType()) &&
eventData->iType == IEED_EVENT_MESSAGE && HIWORD(getLastEventType()) == IEED_EVENT_MESSAGE &&
((eventData->time < today) == (getLastEventTime() < today)) &&
- (((eventData->time < (DWORD)startedTime) == (getLastEventTime() < (DWORD)startedTime)) || !(eventData->dwFlags & IEEDF_READ)))
+ (((eventData->time < (uint32_t)startedTime) == (getLastEventTime() < (uint32_t)startedTime)) || !(eventData->dwFlags & IEEDF_READ)))
{
isGroupBreak = FALSE;
}
diff --git a/plugins/IEView/src/TabSRMMHTMLBuilder.h b/plugins/IEView/src/TabSRMMHTMLBuilder.h index fcca7d1053..bfc7deb6ac 100644 --- a/plugins/IEView/src/TabSRMMHTMLBuilder.h +++ b/plugins/IEView/src/TabSRMMHTMLBuilder.h @@ -29,9 +29,9 @@ class TabSRMMHTMLBuilder :public TemplateHTMLBuilder {
protected:
virtual void loadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour);
- char *timestampToString(DWORD dwFlags, time_t check, int isGroupBreak);
+ char *timestampToString(uint32_t dwFlags, time_t check, int isGroupBreak);
time_t getStartedTime();
- virtual bool isDbEventShown(DWORD dwFlags, DBEVENTINFO * dbei);
+ virtual bool isDbEventShown(uint32_t dwFlags, DBEVENTINFO * dbei);
bool isDbEventShown(DBEVENTINFO * dbei);
void appendEventNonTemplate(IEView *, IEVIEWEVENT *event);
public:
diff --git a/plugins/IEView/src/TemplateHTMLBuilder.cpp b/plugins/IEView/src/TemplateHTMLBuilder.cpp index 632344d72c..a93f761fda 100644 --- a/plugins/IEView/src/TemplateHTMLBuilder.cpp +++ b/plugins/IEView/src/TemplateHTMLBuilder.cpp @@ -76,7 +76,7 @@ int TemplateHTMLBuilder::getFlags(ProtocolSettings * protoSettings) return protoSettings->getSRMMFlags();
}
-char *TemplateHTMLBuilder::timestampToString(DWORD dwFlags, time_t check, int mode)
+char *TemplateHTMLBuilder::timestampToString(uint32_t dwFlags, time_t check, int mode)
{
static char szResult[512]; szResult[0] = '\0';
wchar_t str[300];
@@ -363,12 +363,12 @@ void TemplateHTMLBuilder::appendEventTemplate(IEView *view, IEVIEWEVENT *event, CMStringA str;
bool isSent = (eventData->dwFlags & IEEDF_SENT) != 0;
bool isRTL = (eventData->dwFlags & IEEDF_RTL) && tmpm->isRTL();
- bool isHistory = (eventData->time < (DWORD)getStartedTime() && (eventData->dwFlags &IEEDF_READ || eventData->dwFlags & IEEDF_SENT));
+ bool isHistory = (eventData->time < (uint32_t)getStartedTime() && (eventData->dwFlags &IEEDF_READ || eventData->dwFlags & IEEDF_SENT));
bool isGroupBreak = true;
if ((getFlags(protoSettings) & Options::LOG_GROUP_MESSAGES) && eventData->dwFlags == LOWORD(getLastEventType())
&& eventData->iType == IEED_EVENT_MESSAGE && HIWORD(getLastEventType()) == IEED_EVENT_MESSAGE
&& (isSameDate(eventData->time, getLastEventTime()))
- && (((eventData->time < (DWORD)startedTime) == (getLastEventTime() < (DWORD)startedTime)) || !(eventData->dwFlags & IEEDF_READ)))
+ && (((eventData->time < (uint32_t)startedTime) == (getLastEventTime() < (uint32_t)startedTime)) || !(eventData->dwFlags & IEEDF_READ)))
isGroupBreak = false;
if (isSent) {
diff --git a/plugins/IEView/src/TemplateHTMLBuilder.h b/plugins/IEView/src/TemplateHTMLBuilder.h index 1264a302cf..96b850ef68 100644 --- a/plugins/IEView/src/TemplateHTMLBuilder.h +++ b/plugins/IEView/src/TemplateHTMLBuilder.h @@ -29,7 +29,7 @@ class TemplateHTMLBuilder; class TemplateHTMLBuilder :public HTMLBuilder
{
protected:
- char *timestampToString(DWORD dwFlags, time_t check, int mode);
+ char *timestampToString(uint32_t dwFlags, time_t check, int mode);
time_t startedTime;
time_t getStartedTime();
const char *groupTemplate;
diff --git a/plugins/IEView/src/TextToken.h b/plugins/IEView/src/TextToken.h index 4d1fa10e38..b893cd8368 100644 --- a/plugins/IEView/src/TextToken.h +++ b/plugins/IEView/src/TextToken.h @@ -27,7 +27,7 @@ private: int type;
bool end = false;
int tag = 0;
- DWORD value = 0;
+ uint32_t value = 0;
wchar_t *wtext;
char *text;
wchar_t *wlink = nullptr;
diff --git a/plugins/IgnoreState/src/options.cpp b/plugins/IgnoreState/src/options.cpp index b14fab1e38..b8f7b958fc 100644 --- a/plugins/IgnoreState/src/options.cpp +++ b/plugins/IgnoreState/src/options.cpp @@ -70,7 +70,7 @@ public: bool OnApply() override
{
- DWORD flags = 0;
+ uint32_t flags = 0;
TVITEMEX tvi;
tvi.mask = TVIF_HANDLE | TBIF_LPARAM;
tvi.hItem = m_tvFilter.GetRoot(); //check ignore all
diff --git a/plugins/Import/src/dbrw/dbevents.cpp b/plugins/Import/src/dbrw/dbevents.cpp index 59dccc99ce..2d18cb6528 100644 --- a/plugins/Import/src/dbrw/dbevents.cpp +++ b/plugins/Import/src/dbrw/dbevents.cpp @@ -80,12 +80,12 @@ STDMETHODIMP_(BOOL) CDbxSQLite::GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbei) if (sql_step(stmt) == SQLITE_ROW) { const void *blob = sqlite3_column_blob(stmt, 4); - dbei->timestamp = (DWORD)sqlite3_column_int(stmt, 1); - dbei->flags = (DWORD)sqlite3_column_int(stmt, 2); + dbei->timestamp = (uint32_t)sqlite3_column_int(stmt, 1); + dbei->flags = (uint32_t)sqlite3_column_int(stmt, 2); dbei->eventType = (uint16_t)sqlite3_column_int(stmt, 3); dbei->szModule = mir_strdup((char*)sqlite3_column_text(stmt, 7)); - DWORD cbBlob = sqlite3_column_int(stmt, 5); + uint32_t cbBlob = sqlite3_column_int(stmt, 5); size_t bytesToCopy = cbBlob; if (dbei->cbBlob == -1) dbei->pBlob = (uint8_t*)mir_calloc(cbBlob + 2); @@ -136,7 +136,7 @@ STDMETHODIMP_(MEVENT) CDbxSQLite::FindFirstUnreadEvent(MCONTACT contactID) mir_cslock lock(m_csDbAccess); int res = 0; - DWORD flags = 0; + uint32_t flags = 0; sqlite3_bind_int(evt_stmts_prep[SQL_EVT_STMT_FINDFIRSTUNREAD], 1, contactID); while (sql_step(evt_stmts_prep[SQL_EVT_STMT_FINDFIRSTUNREAD]) == SQLITE_ROW) { flags = sqlite3_column_int(evt_stmts_prep[SQL_EVT_STMT_FINDFIRSTUNREAD], 0); diff --git a/plugins/Import/src/dbrw/dbsettings.cpp b/plugins/Import/src/dbrw/dbsettings.cpp index 1002a8ff60..531b656b45 100644 --- a/plugins/Import/src/dbrw/dbsettings.cpp +++ b/plugins/Import/src/dbrw/dbsettings.cpp @@ -103,7 +103,7 @@ STDMETHODIMP_(BOOL) CDbxSQLite::GetContactSettingWorker(MCONTACT contactID, LPCS dbv->wVal = (uint16_t)sqlite3_column_int(set_stmts_prep[SQL_SET_STMT_READ], 1); break; case DBVT_DWORD: - dbv->dVal = (DWORD)sqlite3_column_int(set_stmts_prep[SQL_SET_STMT_READ], 1); + dbv->dVal = (uint32_t)sqlite3_column_int(set_stmts_prep[SQL_SET_STMT_READ], 1); break; case DBVT_UTF8: case DBVT_ASCIIZ: diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp index 2e5a8616d8..28e72d389d 100644 --- a/plugins/Import/src/import.cpp +++ b/plugins/Import/src/import.cpp @@ -109,7 +109,7 @@ MCONTACT CImportBatch::HContactFromChatID(const char *pszProtoName, const wchar_ return INVALID_CONTACT_ID;
}
-MCONTACT CImportBatch::HContactFromNumericID(const char *pszProtoName, const char *pszSetting, DWORD dwID)
+MCONTACT CImportBatch::HContactFromNumericID(const char *pszProtoName, const char *pszSetting, uint32_t dwID)
{
for (MCONTACT hContact = dstDb->FindFirstContact(pszProtoName); hContact; hContact = dstDb->FindNextContact(hContact, pszProtoName))
if (db_get_dw(hContact, pszProtoName, pszSetting, 0) == dwID)
@@ -879,7 +879,7 @@ void CImportBatch::ImportHistory(MCONTACT hContact, PROTOACCOUNT **protocol, int else hDst = NULL;
bool bSkipAll = false;
- DWORD cbAlloc = 4096;
+ uint32_t cbAlloc = 4096;
uint8_t *eventBuf = (uint8_t*)mir_alloc(cbAlloc);
// Get the start of the event chain
@@ -918,7 +918,7 @@ void CImportBatch::ImportHistory(MCONTACT hContact, PROTOACCOUNT **protocol, int if (!bSkipThis) {
bool bIsSent = (dbei.flags & DBEF_SENT) != 0;
- if (dbei.timestamp < (DWORD)m_dwSinceDate)
+ if (dbei.timestamp < (uint32_t)m_dwSinceDate)
bSkipThis = true;
if (!bSkipThis) {
@@ -1033,7 +1033,7 @@ void CImportBatch::DoImport() dstDb->SetCacheSafetyMode(FALSE);
// Start benchmark timer
- DWORD dwTimer = time(0);
+ uint32_t dwTimer = time(0);
OBJLIST<char> arSkippedAccs(1, CompareModules);
arSkippedAccs.insert(newStr("CListGroups"));
diff --git a/plugins/Import/src/mcontacts.cpp b/plugins/Import/src/mcontacts.cpp index 415f580ca9..8afe075d87 100644 --- a/plugins/Import/src/mcontacts.cpp +++ b/plugins/Import/src/mcontacts.cpp @@ -75,8 +75,8 @@ class CDbxMc : public MDatabaseReadonly, public MZeroedObject MC_FileHeader m_hdr; - std::vector<DWORD> m_events; - std::vector<DWORD>::iterator m_curr; + std::vector<uint32_t> m_events; + std::vector<uint32_t>::iterator m_curr; CMStringA readString() { @@ -228,7 +228,7 @@ public: else return 1; if (dbei->cbBlob && cbLen) { - DWORD copySize = min(DWORD(cbLen), dbei->cbBlob-1); + uint32_t copySize = min(uint32_t(cbLen), dbei->cbBlob-1); if (!ReadFile(m_hFile, dbei->pBlob, copySize, &dwRead, 0) || dwRead != copySize) return 0; diff --git a/plugins/Import/src/patterns.cpp b/plugins/Import/src/patterns.cpp index 0d6a40938d..6e1e3b4a39 100644 --- a/plugins/Import/src/patterns.cpp +++ b/plugins/Import/src/patterns.cpp @@ -151,7 +151,7 @@ class CDbxPattern : public MDatabaseReadonly, public MZeroedObject const uint8_t *m_pFile = 0; int m_iFileVersion = 0, m_iMsgHeaderSize = 0; - std::vector<DWORD> m_events; + std::vector<uint32_t> m_events; std::vector<CMStringW> m_files; bool CheckContact(MCONTACT hContact) @@ -354,7 +354,7 @@ public: auto *pPattern = g_pBatch->m_pPattern; // create a mask for loading multiple data files for a folder - DWORD dwAttr = GetFileAttributesW(profile); + uint32_t dwAttr = GetFileAttributesW(profile); if (dwAttr & FILE_ATTRIBUTE_DIRECTORY) { wszBaseFolder = profile; m_folder.AppendFormat(L"%s\\*.%s", profile, pPattern->wszExt.c_str()); diff --git a/plugins/Import/src/stdafx.h b/plugins/Import/src/stdafx.h index dd75756bb0..795ecf189c 100644 --- a/plugins/Import/src/stdafx.h +++ b/plugins/Import/src/stdafx.h @@ -267,7 +267,7 @@ class CImportBatch : public MZeroedObject OBJLIST<ContactMap> m_contacts;
LIST<DBCachedContact> m_metas;
- DWORD nDupes, nContactsCount, nMessagesCount, nGroupsCount, nSkippedEvents, nSkippedContacts;
+ uint32_t nDupes, nContactsCount, nMessagesCount, nGroupsCount, nSkippedEvents, nSkippedContacts;
MDatabaseCommon *srcDb, *dstDb;
bool ImportAccounts(OBJLIST<char> &arSkippedModules);
@@ -285,7 +285,7 @@ class CImportBatch : public MZeroedObject MCONTACT HContactFromID(const char *pszProtoName, const char *pszSetting, wchar_t *pwszID);
MCONTACT HContactFromChatID(const char *pszProtoName, const wchar_t *pszChatID);
- MCONTACT HContactFromNumericID(const char *pszProtoName, const char *pszSetting, DWORD dwID);
+ MCONTACT HContactFromNumericID(const char *pszProtoName, const char *pszSetting, uint32_t dwID);
public:
CImportBatch();
diff --git a/plugins/Import/src/textjson.cpp b/plugins/Import/src/textjson.cpp index c6cb30efb9..733d8cfa9b 100644 --- a/plugins/Import/src/textjson.cpp +++ b/plugins/Import/src/textjson.cpp @@ -161,7 +161,7 @@ public: dbei->flags |= DBEF_UTF; MBinBuffer buf; - DWORD tmp = 0; + uint32_t tmp = 0; buf.append(&tmp, sizeof(tmp)); buf.append(szFile.c_str(), szFile.size()); if (!szDescr.empty()) { @@ -181,11 +181,11 @@ public: switch (dbei->eventType) { case EVENTTYPE_ADDED: case EVENTTYPE_FILE: - offset = sizeof(DWORD); + offset = sizeof(uint32_t); break; case EVENTTYPE_AUTHREQUEST: - offset = sizeof(DWORD) * 2; + offset = sizeof(uint32_t) * 2; break; default: @@ -193,7 +193,7 @@ public: } dbei->flags |= DBEF_UTF; - dbei->cbBlob = (DWORD)szBody.size() + offset; + dbei->cbBlob = (uint32_t)szBody.size() + offset; dbei->pBlob = (uint8_t*)mir_calloc(dbei->cbBlob + 1); memcpy(dbei->pBlob + offset, szBody.c_str(), szBody.size()); dbei->pBlob[dbei->cbBlob] = 0; diff --git a/plugins/Import/src/utils.cpp b/plugins/Import/src/utils.cpp index 04e7861949..b96ab1281f 100644 --- a/plugins/Import/src/utils.cpp +++ b/plugins/Import/src/utils.cpp @@ -51,7 +51,7 @@ int CreateGroup(const wchar_t *group, MCONTACT hContact) // Returns TRUE if the event already exist in the database
bool IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO dbei)
{
- static DWORD dwPreviousTimeStamp = -1;
+ static uint32_t dwPreviousTimeStamp = -1;
static MCONTACT hPreviousContact = INVALID_CONTACT_ID;
static MEVENT hPreviousDbEvent = NULL;
@@ -62,7 +62,7 @@ bool IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO dbei) DBEVENTINFO dbeiExisting = {};
db_event_get(hExistingDbEvent, &dbeiExisting);
- DWORD dwEventTimeStamp = dbeiExisting.timestamp;
+ uint32_t dwEventTimeStamp = dbeiExisting.timestamp;
// compare with last timestamp
if (dbei.timestamp > dwEventTimeStamp) {
diff --git a/plugins/KeyboardNotify/src/ignore.cpp b/plugins/KeyboardNotify/src/ignore.cpp index 847c8288b4..825d7d9531 100644 --- a/plugins/KeyboardNotify/src/ignore.cpp +++ b/plugins/KeyboardNotify/src/ignore.cpp @@ -23,12 +23,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define IDI_FILLEDBLOB 212
#define IDI_EMPTYBLOB 213
-static const DWORD ignoreIdToPf1[IGNOREEVENT_MAX] = {PF1_IMRECV, 0xFFFFFFFF, PF1_FILERECV, 0xFFFFFFFF};
+static const uint32_t ignoreIdToPf1[IGNOREEVENT_MAX] = {PF1_IMRECV, 0xFFFFFFFF, PF1_FILERECV, 0xFFFFFFFF};
-static DWORD GetMask(MCONTACT hContact)
+static uint32_t GetMask(MCONTACT hContact)
{
- DWORD mask = g_plugin.getDword(hContact, "Mask1", (DWORD)(-1));
- if(mask == (DWORD)(-1)) {
+ uint32_t mask = g_plugin.getDword(hContact, "Mask1", (uint32_t)(-1));
+ if(mask == (uint32_t)(-1)) {
if(hContact == NULL)
mask=0;
else {
@@ -145,9 +145,9 @@ static void SetIconsForColumn(HWND hwndList, HANDLE hItem, HANDLE hItemAll, int }
}
-static void InitialiseItem(HWND hwndList, MCONTACT hContact, HANDLE hItem, DWORD protoCaps)
+static void InitialiseItem(HWND hwndList, MCONTACT hContact, HANDLE hItem, uint32_t protoCaps)
{
- DWORD mask = GetMask(hContact);
+ uint32_t mask = GetMask(hContact);
for (int i=0; i < IGNOREEVENT_MAX; i++)
if(ignoreIdToPf1[i] == 0xFFFFFFFF || protoCaps & ignoreIdToPf1[i])
SendMessage(hwndList, CLM_SETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(i, mask&(1<<i)?i+3:0));
@@ -157,7 +157,7 @@ static void InitialiseItem(HWND hwndList, MCONTACT hContact, HANDLE hItem, DWORD 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));
@@ -169,7 +169,7 @@ static void SaveItemMask(HWND hwndList, MCONTACT hContact, HANDLE hItem, const c static void SetAllContactIcons(HWND hwndList)
{
- DWORD protoCaps;
+ uint32_t protoCaps;
for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0);
@@ -256,7 +256,7 @@ INT_PTR CALLBACK DlgProcIgnoreOptions(HWND hwndDlg, UINT msg, WPARAM, LPARAM lPa case NM_CLICK:
{
int iImage;
- DWORD hitFlags;
+ uint32_t hitFlags;
NMCLISTCONTROL *nm = (NMCLISTCONTROL*)lParam;
if(nm->iColumn == -1)
@@ -321,7 +321,7 @@ INT_PTR CALLBACK DlgProcIgnoreOptions(HWND hwndDlg, UINT msg, WPARAM, LPARAM lPa BOOL IsIgnored(MCONTACT hContact, uint16_t eventType)
{
uint16_t ignoreID = 0;
- DWORD mask = GetMask(hContact);
+ uint32_t mask = GetMask(hContact);
switch(eventType) {
case EVENTTYPE_MESSAGE:
diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp index ddac9e72a9..5c454d239a 100644 --- a/plugins/KeyboardNotify/src/main.cpp +++ b/plugins/KeyboardNotify/src/main.cpp @@ -28,7 +28,7 @@ CMPlugin g_plugin;
-DWORD IDThread = 0;
+uint32_t IDThread = 0;
HANDLE hThread = nullptr;
HANDLE hFlashEvent;
HANDLE hExitEvent;
@@ -41,7 +41,7 @@ UINT hReminderTimer = 0; HHOOK hMouseHook = nullptr;
HHOOK hKeyBoardHook = nullptr;
uint8_t bEmulateKeypresses = 0;
-DWORD dwLastInput = 0;
+uint32_t dwLastInput = 0;
POINT lastGlobalMousePos = { 0, 0 };
uint8_t bFlashOnMsg;
@@ -262,7 +262,7 @@ BOOL checkUnopenEvents() static void __cdecl FlashThreadFunction(void*)
{
BOOL bEvent = FALSE;
- DWORD dwEventStarted = 0, dwFlashStarted = 0;
+ uint32_t dwEventStarted = 0, dwFlashStarted = 0;
uint8_t data, unchangedLeds;
Thread_SetName("KeyboardNotify: FlashThreadFunction");
@@ -327,7 +327,7 @@ static void __cdecl FlashThreadFunction(void*) }
}
-BOOL checkMsgTimestamp(MCONTACT hContact, MEVENT hEventCurrent, DWORD timestampCurrent)
+BOOL checkMsgTimestamp(MCONTACT hContact, MEVENT hEventCurrent, uint32_t timestampCurrent)
{
if (!bFlashIfMsgOlder)
return TRUE;
diff --git a/plugins/ListeningTo/src/listeningto.cpp b/plugins/ListeningTo/src/listeningto.cpp index 73e52445e6..6663254e73 100644 --- a/plugins/ListeningTo/src/listeningto.cpp +++ b/plugins/ListeningTo/src/listeningto.cpp @@ -27,7 +27,7 @@ static HANDLE hEnableStateChangedEvent; static HANDLE hTTB = nullptr;
BOOL loaded = FALSE;
static UINT hTimer = 0;
-static DWORD lastInfoSetTime = 0;
+static uint32_t lastInfoSetTime = 0;
static IconItem iconList[] =
{
@@ -716,7 +716,7 @@ static void CALLBACK GetInfoTimer(HWND, UINT, UINT_PTR, DWORD) }
// Check if we can set it now...
- DWORD now = GetTickCount();
+ uint32_t now = GetTickCount();
if (now < lastInfoSetTime + MIN_TIME_BEETWEEN_SETS) {
hTimer = SetTimer(nullptr, NULL, lastInfoSetTime + MIN_TIME_BEETWEEN_SETS - now, GetInfoTimer);
return;
diff --git a/plugins/ListeningTo/src/players/player.cpp b/plugins/ListeningTo/src/players/player.cpp index a27d5ee82f..c036452e0a 100644 --- a/plugins/ListeningTo/src/players/player.cpp +++ b/plugins/ListeningTo/src/players/player.cpp @@ -144,7 +144,7 @@ void CodeInjectionPlayer::InjectCode() len = strlen(dll_path);
// File exists?
- DWORD attribs = GetFileAttributesA(dll_path);
+ uint32_t attribs = GetFileAttributesA(dll_path);
if (attribs == 0xFFFFFFFF || !(attribs & FILE_ATTRIBUTE_ARCHIVE))
return;
diff --git a/plugins/ListeningTo/src/players/player.h b/plugins/ListeningTo/src/players/player.h index 282e44102f..654f53dc27 100644 --- a/plugins/ListeningTo/src/players/player.h +++ b/plugins/ListeningTo/src/players/player.h @@ -69,7 +69,7 @@ class CodeInjectionPlayer : public ExternalPlayer protected:
char *dll_name;
wchar_t *message_window_class;
- DWORD next_request_time;
+ uint32_t next_request_time;
virtual void InjectCode();
diff --git a/plugins/MenuItemEx/src/images.cpp b/plugins/MenuItemEx/src/images.cpp index aa1b7ab5bb..976904482f 100644 --- a/plugins/MenuItemEx/src/images.cpp +++ b/plugins/MenuItemEx/src/images.cpp @@ -6,7 +6,7 @@ extern HINSTANCE hinstance; void HalfBitmap32Alpha(HBITMAP hBitmap)
{
BITMAP bmp;
- DWORD dwLen;
+ uint32_t dwLen;
uint8_t *p;
int x, y;
@@ -43,7 +43,7 @@ void HalfBitmap32Alpha(HBITMAP hBitmap) //void MakeBmpTransparent(HBITMAP hBitmap)
//{
// BITMAP bmp;
-// DWORD dwLen;
+// uint32_t dwLen;
// uint8_t *p;
//
// GetObject(hBitmap, sizeof(bmp), &bmp);
@@ -67,7 +67,7 @@ void HalfBitmap32Alpha(HBITMAP hBitmap) void CorrectBitmap32Alpha(HBITMAP hBitmap, BOOL force)
{
BITMAP bmp;
- DWORD dwLen;
+ uint32_t dwLen;
uint8_t *p;
int x, y;
BOOL fixIt;
@@ -117,7 +117,7 @@ HBITMAP CopyBitmapTo32(HBITMAP hBitmap) uint8_t * ptPixels;
BITMAP bmp;
- DWORD dwLen;
+ uint32_t dwLen;
uint8_t *p;
GetObject(hBitmap, sizeof(bmp), &bmp);
@@ -221,7 +221,7 @@ BOOL MakeBitmap32(HBITMAP *hBitmap) //{
// uint8_t *p = NULL;
// uint8_t *p1;
-// DWORD dwLen;
+// uint32_t dwLen;
// int width, height, x, y;
// BITMAP bmp;
//
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index 36070f45b1..fee6f9234c 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -208,7 +208,7 @@ BOOL DirectoryExists(MCONTACT hContact) {
char path[MAX_PATH];
CallService(MS_FILE_GETRECEIVEDFILESFOLDER, hContact, (LPARAM)&path);
- DWORD attr = GetFileAttributesA(path);
+ uint32_t attr = GetFileAttributesA(path);
return (attr != -1) && (attr&FILE_ATTRIBUTE_DIRECTORY);
}
@@ -270,8 +270,8 @@ BOOL IPExists(MCONTACT hContact) LPSTR szProto = Proto_GetBaseAccountName(hContact);
if (!szProto) return 0;
- DWORD mIP = db_get_dw(hContact, szProto, "IP", 0);
- DWORD rIP = db_get_dw(hContact, szProto, "RealIP", 0);
+ uint32_t mIP = db_get_dw(hContact, szProto, "IP", 0);
+ uint32_t rIP = db_get_dw(hContact, szProto, "RealIP", 0);
return (mIP != 0 || rIP != 0);
}
@@ -488,7 +488,7 @@ static INT_PTR onCopyID(WPARAM hContact, LPARAM) static INT_PTR onCopyStatusMsg(WPARAM hContact, LPARAM)
{
- DWORD flags = g_plugin.getDword("flags", vf_default);
+ uint32_t flags = g_plugin.getDword("flags", vf_default);
LPSTR module = Proto_GetBaseAccountName(hContact);
if (!module)
@@ -527,11 +527,11 @@ static INT_PTR onCopyIP(WPARAM hContact, LPARAM) char *szProto = Proto_GetBaseAccountName(hContact);
CMStringW wszBuffer;
- DWORD mIP = db_get_dw(hContact, szProto, "IP", 0);
+ uint32_t mIP = db_get_dw(hContact, szProto, "IP", 0);
if (mIP)
wszBuffer.AppendFormat(L"External IP: %d.%d.%d.%d\r\n", mIP >> 24, (mIP >> 16) & 0xFF, (mIP >> 8) & 0xFF, mIP & 0xFF);
- DWORD rIP = db_get_dw(hContact, szProto, "RealIP", 0);
+ uint32_t rIP = db_get_dw(hContact, szProto, "RealIP", 0);
if (rIP)
wszBuffer.AppendFormat(L"Internal IP: %d.%d.%d.%d\r\n", rIP >> 24, (rIP >> 16) & 0xFF, (rIP >> 8) & 0xFF, rIP & 0xFF);
@@ -621,7 +621,7 @@ static INT_PTR onIgnore(WPARAM wparam, LPARAM lparam) return 0;
}
-static HGENMENU AddSubmenuItem(HGENMENU hRoot, wchar_t* name, HICON icon, DWORD flag, char* service, int pos, INT_PTR param)
+static HGENMENU AddSubmenuItem(HGENMENU hRoot, wchar_t* name, HICON icon, uint32_t flag, char* service, int pos, INT_PTR param)
{
CMenuItem mi(&g_plugin);
mi.root = hRoot;
@@ -649,7 +649,7 @@ static void ModifySubmenuItem(HGENMENU hItem, int checked, int hidden) // called when the contact-menu is built
static int BuildMenu(WPARAM wparam, LPARAM)
{
- DWORD flags = g_plugin.getDword("flags", vf_default);
+ uint32_t flags = g_plugin.getDword("flags", vf_default);
int j = 0, all = 0, hide = 0;
BOOL bIsOnline = FALSE, bShowAll = CTRL_IS_PRESSED;
MCONTACT hContact = (MCONTACT)wparam;
diff --git a/plugins/MenuItemEx/src/options.cpp b/plugins/MenuItemEx/src/options.cpp index a334e3f58b..061fa9af49 100644 --- a/plugins/MenuItemEx/src/options.cpp +++ b/plugins/MenuItemEx/src/options.cpp @@ -24,7 +24,7 @@ static const checkboxes[] = { class COptDialog : public CDlgBase
{
- DWORD m_flags;
+ uint32_t m_flags;
CCtrlCheck m_chkVis, m_chkAlpha, m_chkHide, m_chkIgnore, m_chkProtos, m_chkRecvFiles, m_chkCopyIP, m_chkCopyMirver, m_chkStatusMsg,
m_chkSMName, m_chkCopyID, m_chkCopyIDName, m_chkShowID, m_chkTrimID, m_chkIgnoreHide;
@@ -76,7 +76,7 @@ public: bool OnApply() override
{
- DWORD mod_flags = 0;
+ uint32_t mod_flags = 0;
for (auto &it : checkboxes) {
CCtrlCheck &item = *(CCtrlCheck*)FindControl(it.idc);
diff --git a/plugins/MimCmd/src/commands.cpp b/plugins/MimCmd/src/commands.cpp index a336784e76..ec18b162f3 100755 --- a/plugins/MimCmd/src/commands.cpp +++ b/plugins/MimCmd/src/commands.cpp @@ -41,9 +41,9 @@ int ConnectToMiranda() if (p) p[1] = 0;
wcsncat_s(tszPath, L"libs", _TRUNCATE);
- DWORD cbPath = (DWORD)wcslen(tszPath);
+ uint32_t cbPath = (uint32_t)wcslen(tszPath);
- DWORD cbSize = GetEnvironmentVariable(L"PATH", nullptr, 0);
+ uint32_t cbSize = GetEnvironmentVariable(L"PATH", nullptr, 0);
wchar_t *ptszVal = new wchar_t[cbSize + MAX_PATH + 2];
wcscpy(ptszVal, tszPath);
wcscat(ptszVal, L";");
diff --git a/plugins/MirFox/src/MirandaOptions.cpp b/plugins/MirFox/src/MirandaOptions.cpp index a7078cde8c..1826a1465a 100644 --- a/plugins/MirFox/src/MirandaOptions.cpp +++ b/plugins/MirFox/src/MirandaOptions.cpp @@ -405,7 +405,7 @@ INT_PTR CALLBACK DlgProcOpts_Tab2(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM }
// Find clicked item
- DWORD hitFlags;
+ uint32_t hitFlags;
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC2_CONTACTS_LIST, CLM_HITTEST, (WPARAM)&hitFlags, MAKELPARAM(nm->pt.x, nm->pt.y));
// Nothing was clicked
diff --git a/plugins/MirFox/src/MirandaUtils.cpp b/plugins/MirFox/src/MirandaUtils.cpp index 92904ae800..552263339c 100644 --- a/plugins/MirFox/src/MirandaUtils.cpp +++ b/plugins/MirFox/src/MirandaUtils.cpp @@ -295,8 +295,8 @@ void MirandaUtils::addMessageToDB(MCONTACT hContact, char* msgBuffer, std::size_ dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_SENT | DBEF_UTF;
dbei.szModule = targetHandleSzProto;
- dbei.timestamp = (DWORD)time(0);
- dbei.cbBlob = (DWORD)bufSize;
+ dbei.timestamp = (uint32_t)time(0);
+ dbei.cbBlob = (uint32_t)bufSize;
dbei.pBlob = (uint8_t*)msgBuffer;
db_event_add(hContact, &dbei);
}
@@ -323,8 +323,8 @@ void MirandaUtils::notifyHookToOpenMsgWindow(ActionThreadArgStruct* args, bool s //http://www.shloemi.com/2012/09/solved-setforegroundwindow-win32-api-not-always-works/
void MirandaUtils::ForceForegroundWindow(HWND hWnd)
{
- DWORD foreThread = GetWindowThreadProcessId(GetForegroundWindow(), nullptr);
- DWORD appThread = GetCurrentThreadId();
+ uint32_t foreThread = GetWindowThreadProcessId(GetForegroundWindow(), nullptr);
+ uint32_t appThread = GetCurrentThreadId();
if (foreThread != appThread) {
AttachThreadInput(foreThread, appThread, true);
diff --git a/plugins/MirLua/Modules/WinAPI/src/winapi.cpp b/plugins/MirLua/Modules/WinAPI/src/winapi.cpp index cd7a031286..783dcf359b 100755 --- a/plugins/MirLua/Modules/WinAPI/src/winapi.cpp +++ b/plugins/MirLua/Modules/WinAPI/src/winapi.cpp @@ -15,7 +15,7 @@ static HWND luaM_checkhwnd(lua_State *L, int idx) /***********************************************/
-EXTERN_C WINUSERAPI int WINAPI MessageBoxTimeoutA(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType, uint16_t wLanguageId, DWORD dwMilliseconds);
+EXTERN_C WINUSERAPI int WINAPI MessageBoxTimeoutA(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType, uint16_t wLanguageId, uint32_t dwMilliseconds);
#define MB_TIMEDOUT 32000
@@ -26,7 +26,7 @@ static int lua_MessageBox(lua_State *L) ptrA caption(mir_utf8decodeA(lua_tostring(L, 3)));
UINT flags = lua_tointeger(L, 4);
LANGID langId = GetUserDefaultUILanguage();
- DWORD timeout = luaL_optinteger(L, 5, 0xFFFFFFFF);
+ uint32_t timeout = luaL_optinteger(L, 5, 0xFFFFFFFF);
int res = ::MessageBoxTimeoutA(hwnd, text, caption, flags, langId, timeout);
lua_pushinteger(L, res);
@@ -205,8 +205,7 @@ static int lua_GetRegValue(lua_State *L) return 1;
}
- DWORD type = 0;
- DWORD length = 1024;
+ DWORD type = 0, length = 1024;
uint8_t* value = (uint8_t*)mir_alloc(length);
res = ::RegQueryValueEx(hKey, valueName, nullptr, &type, (LPBYTE)value, &length);
while (res == ERROR_MORE_DATA)
@@ -266,8 +265,8 @@ static int lua_SetRegValue(lua_State *L) return 1;
}
- DWORD type = 0;
- DWORD length = 0;
+ uint32_t type = 0;
+ uint32_t length = 0;
uint8_t* value = nullptr;
switch (lua_type(L, 4))
{
@@ -275,13 +274,13 @@ static int lua_SetRegValue(lua_State *L) if (lua_isinteger(L, 4) && lua_tointeger(L, 4) < UINT32_MAX)
{
type = REG_DWORD;
- length = sizeof(DWORD);
+ length = sizeof(uint32_t);
value = (uint8_t*)lua_tointeger(L, 4);
}
else
{
type = REG_QWORD;
- length = sizeof(DWORD) * 2;
+ length = sizeof(uint32_t) * 2;
lua_Number num = lua_tonumber(L, 4);
value = (uint8_t*)#
}
@@ -456,7 +455,7 @@ static int global_PostMessage(lua_State *L) static int global_PostThreadMessage(lua_State *L)
{
- DWORD tid = (DWORD)luaL_checknumber(L, 1);
+ uint32_t tid = (uint32_t)luaL_checknumber(L, 1);
UINT msg = (UINT)luaL_checknumber(L, 2);
WPARAM wparam = (WPARAM)luaL_checknumber(L, 3);
LPARAM lparam = (LPARAM)luaL_checknumber(L, 4);
@@ -533,7 +532,7 @@ static int global_DispatchMessage(lua_State *L) msg.message = (UINT)luaL_checknumber(L, 2);
msg.wParam = (WPARAM)luaL_checknumber(L, 3);
msg.lParam = (LPARAM)luaL_checknumber(L, 4);
- msg.time = (DWORD)luaL_checknumber(L, 5);
+ msg.time = (uint32_t)luaL_checknumber(L, 5);
msg.pt.x = (LONG)luaL_checknumber(L, 6);
msg.pt.y = (LONG)luaL_checknumber(L, 7);
@@ -616,7 +615,7 @@ static int global_CreateEvent(lua_State *L) static int global_OpenEvent(lua_State *L) {
long h;
- DWORD da = (DWORD)luaL_checknumber(L, 1);
+ uint32_t da = (uint32_t)luaL_checknumber(L, 1);
BOOL ih = (BOOL)luaL_checknumber(L, 2);
const char *name = luaL_checkstring(L, 3);
@@ -676,7 +675,7 @@ static int global_CreateMutex(lua_State *L) static int global_OpenMutex(lua_State *L)
{
- DWORD da = (DWORD)luaL_checknumber(L, 1);
+ uint32_t da = (uint32_t)luaL_checknumber(L, 1);
BOOL ih = (BOOL)luaL_checknumber(L, 2);
const char *name = luaL_checkstring(L, 3);
@@ -718,7 +717,7 @@ static int global_CreateSemaphore(lua_State *L) static int global_OpenSemaphore(lua_State *L)
{
- DWORD da = (DWORD)luaL_checknumber(L, 1);
+ uint32_t da = (uint32_t)luaL_checknumber(L, 1);
BOOL ih = (BOOL)luaL_checknumber(L, 2);
const char *name = luaL_checkstring(L, 3);
@@ -751,7 +750,7 @@ static int global_CreateProcess(lua_State *L) const char *an = luaL_optstring(L, 1, NULL);
const char *cl = luaL_optstring(L, 2, NULL);
BOOL ih = (BOOL)luaL_checknumber(L, 5);
- DWORD cf = (DWORD)luaL_checknumber(L, 6);
+ uint32_t cf = (uint32_t)luaL_checknumber(L, 6);
const char *cd = lua_tostring(L, 8);
psa.nLength = sizeof(psa);
@@ -791,28 +790,28 @@ static int global_CreateProcess(lua_State *L) si.lpTitle = mir_strdup(luaL_checkstring(L, -1));
}
else if (!mir_strcmp(key, "dwX")) {
- si.dwX = (DWORD)luaL_checknumber(L, -1);
+ si.dwX = (uint32_t)luaL_checknumber(L, -1);
}
else if (!mir_strcmp(key, "dwY")) {
- si.dwY = (DWORD)luaL_checknumber(L, -1);
+ si.dwY = (uint32_t)luaL_checknumber(L, -1);
}
else if (!mir_strcmp(key, "dwXSize")) {
- si.dwXSize = (DWORD)luaL_checknumber(L, -1);
+ si.dwXSize = (uint32_t)luaL_checknumber(L, -1);
}
else if (!mir_strcmp(key, "dwYSize")) {
- si.dwYSize = (DWORD)luaL_checknumber(L, -1);
+ si.dwYSize = (uint32_t)luaL_checknumber(L, -1);
}
else if (!mir_strcmp(key, "dwXCountChars")) {
- si.dwXCountChars = (DWORD)luaL_checknumber(L, -1);
+ si.dwXCountChars = (uint32_t)luaL_checknumber(L, -1);
}
else if (!mir_strcmp(key, "dwYCountChars")) {
- si.dwYCountChars = (DWORD)luaL_checknumber(L, -1);
+ si.dwYCountChars = (uint32_t)luaL_checknumber(L, -1);
}
else if (!mir_strcmp(key, "dwFillAttribute")) {
- si.dwFillAttribute = (DWORD)luaL_checknumber(L, -1);
+ si.dwFillAttribute = (uint32_t)luaL_checknumber(L, -1);
}
else if (!mir_strcmp(key, "dwFlags")) {
- si.dwFlags = (DWORD)luaL_checknumber(L, -1);
+ si.dwFlags = (uint32_t)luaL_checknumber(L, -1);
}
else if (!mir_strcmp(key, "wShowWindow")) {
si.wShowWindow = (uint16_t)luaL_checknumber(L, -1);
@@ -907,7 +906,7 @@ static int global_GetTempFileName(lua_State *L) static int global_GetTempPath(lua_State *L)
{
char tfn[MAX_PATH];
- DWORD rc = GetTempPathA(MAX_PATH, tfn);
+ uint32_t rc = GetTempPathA(MAX_PATH, tfn);
lua_pushnumber(L, rc);
luaM_PushStringIf(L, tfn, rc);
return(2);
@@ -917,12 +916,12 @@ static int global_GetTempPath(lua_State *L) static int global_CreateNamedPipe(lua_State *L)
{
LPCSTR lpName = luaL_checkstring(L, 1);
- DWORD dwOpenMode = luaL_checknumber(L, 2);
- DWORD dwPipeMode = luaL_checknumber(L, 3);
- DWORD nMaxInstances = luaL_checknumber(L, 4);
- DWORD nOutBufferSize = luaL_checknumber(L, 5);
- DWORD nInBufferSize = luaL_checknumber(L, 6);
- DWORD nDefaultTimeOut = luaL_checknumber(L, 7);
+ uint32_t dwOpenMode = luaL_checknumber(L, 2);
+ uint32_t dwPipeMode = luaL_checknumber(L, 3);
+ uint32_t nMaxInstances = luaL_checknumber(L, 4);
+ uint32_t nOutBufferSize = luaL_checknumber(L, 5);
+ uint32_t nInBufferSize = luaL_checknumber(L, 6);
+ uint32_t nDefaultTimeOut = luaL_checknumber(L, 7);
SECURITY_ATTRIBUTES sa = { sizeof(sa), nullptr, false };
HANDLE hPipe = CreateNamedPipeA(lpName, dwOpenMode, dwPipeMode, nMaxInstances, nOutBufferSize, nInBufferSize, nDefaultTimeOut, &sa);
@@ -957,10 +956,10 @@ static int global_CreateFile(lua_State *L) SECURITY_ATTRIBUTES sa;
HANDLE hFile;
const char *name = luaL_checkstring(L, 1);
- DWORD da = (DWORD)luaL_checknumber(L, 2);
- DWORD sm = (DWORD)luaL_checknumber(L, 3);
- DWORD cd = (DWORD)luaL_checknumber(L, 5);
- DWORD fa = (DWORD)luaL_checknumber(L, 6);
+ uint32_t da = (uint32_t)luaL_checknumber(L, 2);
+ uint32_t sm = (uint32_t)luaL_checknumber(L, 3);
+ uint32_t cd = (uint32_t)luaL_checknumber(L, 5);
+ uint32_t fa = (uint32_t)luaL_checknumber(L, 6);
intptr_t th = 0;
sa.nLength = sizeof(sa);
@@ -1003,7 +1002,7 @@ static int global_ReadFile(lua_State *L) { char *buf;
BOOL brc = FALSE;
HANDLE h = (HANDLE)(intptr_t)luaL_checknumber(L, 1);
- DWORD btoread = (DWORD)luaL_checknumber(L, 2);
+ uint32_t btoread = (uint32_t)luaL_checknumber(L, 2);
buf = (char*)mir_alloc(btoread);
if (buf != nullptr)
@@ -1040,7 +1039,7 @@ static int global_ReadFile(lua_State *L) { static int global_WriteFile(lua_State *L) {
DWORD bwrite;
- DWORD btowrite;
+ uint32_t btowrite;
BOOL brc;
HANDLE h = (HANDLE)(intptr_t)luaL_checknumber(L, 1);
const char *buf = luaL_checklstring(L, 2, (size_t*)&btowrite);
@@ -1073,7 +1072,7 @@ static int global_CopyFile(lua_State *L) static int global_WaitForSingleObject(lua_State *L) {
HANDLE h = (HANDLE)(intptr_t)luaL_checknumber(L, 1);
- DWORD t = (DWORD)luaL_checknumber(L, 2);
+ uint32_t t = (uint32_t)luaL_checknumber(L, 2);
lua_pushnumber(L, WaitForSingleObject(h, t));
return(1);
@@ -1082,9 +1081,9 @@ static int global_WaitForSingleObject(lua_State *L) { static int global_WaitForMultipleObjects(lua_State *L)
{
HANDLE ha[64];
- DWORD c = 0;
+ uint32_t c = 0;
BOOL wa = (BOOL)luaL_checknumber(L, 2);
- DWORD t = (DWORD)luaL_checknumber(L, 3);
+ uint32_t t = (uint32_t)luaL_checknumber(L, 3);
if (lua_istable(L, 1))
{
@@ -1104,7 +1103,7 @@ static int global_WaitForMultipleObjects(lua_State *L) static int global_TerminateProcess(lua_State *L) {
HANDLE h = (HANDLE)(intptr_t)luaL_checknumber(L, 1);
- DWORD ec = (DWORD)luaL_checknumber(L, 2);
+ uint32_t ec = (uint32_t)luaL_checknumber(L, 2);
lua_pushboolean(L, TerminateProcess(h, ec));
return(1);
@@ -1141,7 +1140,7 @@ static int global_RegQueryValueEx(lua_State *L) long rv;
HKEY hsk;
DWORD type;
- DWORD dwdata;
+ uint32_t dwdata;
DWORD len;
char *szdata;
HKEY hkey = (HKEY)(intptr_t)luaL_checknumber(L, 1);
@@ -1196,21 +1195,21 @@ static int global_RegQueryValueEx(lua_State *L) static int global_RegSetValueEx(lua_State *L) {
long rv;
HKEY hsk;
- DWORD type;
- DWORD dwdata;
- DWORD len = 0;
+ uint32_t type;
+ uint32_t dwdata;
+ uint32_t len = 0;
char *szdata = nullptr;
HKEY hkey = (HKEY)(intptr_t)luaL_checknumber(L, 1);
const char *subkey = luaL_checkstring(L, 2);
const char *valuename = luaL_checkstring(L, 3);
if (lua_isnumber(L, 4)) {
- dwdata = (DWORD)luaL_checknumber(L, 4);
- type = (DWORD)luaL_optnumber(L, 5, REG_DWORD);
+ dwdata = (uint32_t)luaL_checknumber(L, 4);
+ type = (uint32_t)luaL_optnumber(L, 5, REG_DWORD);
}
else {
szdata = (char *)luaL_checklstring(L, 4, (size_t*)&len);
- type = (DWORD)luaL_optnumber(L, 5, REG_SZ);
+ type = (uint32_t)luaL_optnumber(L, 5, REG_SZ);
}
rv = RegCreateKeyExA(hkey, subkey, 0, "", REG_OPTION_NON_VOLATILE, KEY_WRITE, nullptr, &hsk, nullptr);
@@ -1260,7 +1259,7 @@ static int global_RegEnumKeyEx(lua_State *L) long rv;
HKEY hsk;
DWORD len;
- DWORD index;
+ uint32_t index;
char name[256];
FILETIME ft;
HKEY hkey = (HKEY)(intptr_t)luaL_checknumber(L, 1);
@@ -1292,7 +1291,7 @@ static int global_RegEnumValue(lua_State *L) { long rv;
HKEY hsk;
DWORD len;
- DWORD index;
+ uint32_t index;
char name[256];
HKEY hkey = (HKEY)(intptr_t)luaL_checknumber(L, 1);
const char *subkey = luaL_checkstring(L, 2);
@@ -1321,7 +1320,7 @@ static int global_RegEnumValue(lua_State *L) { static int global_SetCurrentDirectory(lua_State *L)
{
- DWORD le;
+ uint32_t le;
BOOL ok;
const char *pname = luaL_checkstring(L, 1);
@@ -1348,7 +1347,7 @@ static int global_SHDeleteKey(lua_State *L) { static int global_Sleep(lua_State *L)
{
- DWORD tosleep = (DWORD)luaL_checknumber(L, 1);
+ uint32_t tosleep = (uint32_t)luaL_checknumber(L, 1);
Sleep(tosleep);
return 0;
}
@@ -1493,8 +1492,8 @@ static int global_SHGetSpecialFolderLocation(lua_State *L) }
static int global_GetFullPathName(lua_State *L) {
- DWORD le;
- DWORD rc;
+ uint32_t le;
+ uint32_t rc;
char fpname[MAX_PATH];
char *fpart;
const char *pname = luaL_checkstring(L, 1);
@@ -1543,9 +1542,9 @@ static int global_IsUserAdmin(lua_State *L) static int global_OpenProcess(lua_State *L) {
HANDLE h;
- DWORD da = (DWORD)luaL_checknumber(L, 1);
+ uint32_t da = (uint32_t)luaL_checknumber(L, 1);
BOOL ih = (BOOL)luaL_checknumber(L, 2);
- DWORD pid = (DWORD)luaL_checknumber(L, 3);
+ uint32_t pid = (uint32_t)luaL_checknumber(L, 3);
h = OpenProcess(da, ih, pid);
if (h != nullptr)
@@ -1559,7 +1558,7 @@ static int global_OpenProcess(lua_State *L) { static int global_IsRunning(lua_State *L) {
HANDLE h;
BOOL b = FALSE;
- DWORD pid = (DWORD)luaL_checknumber(L, 1);
+ uint32_t pid = (uint32_t)luaL_checknumber(L, 1);
h = OpenProcess(SYNCHRONIZE, FALSE, pid);
if (h != nullptr) {
@@ -1672,7 +1671,7 @@ static int global_ControlService(lua_State *L) SERVICE_STATUS ss;
BOOL brc;
SC_HANDLE h = (SC_HANDLE)lua_touserdata(L, 1);
- DWORD c = (DWORD)luaL_checknumber(L, 2);
+ uint32_t c = (uint32_t)luaL_checknumber(L, 2);
brc = ControlService(h, c, &ss);
lua_pushboolean(L, brc);
@@ -1698,7 +1697,7 @@ static int global_StartService(lua_State *L) static int global_mciSendString(lua_State *L)
{
const char *cmd = luaL_checkstring(L, 1); // only one string parameter is used
- DWORD lrc = mciSendStringA(cmd, nullptr, 0, nullptr);
+ uint32_t lrc = mciSendStringA(cmd, nullptr, 0, nullptr);
lua_pushnumber(L, lrc);
return(1);
}
@@ -1712,8 +1711,8 @@ static int global_MessageBeep(lua_State *L) static int global_Beep(lua_State *L)
{
- const DWORD dwFreq = luaL_checkinteger(L, 1);
- const DWORD dwDuration = luaL_checkinteger(L, 2);
+ const uint32_t dwFreq = luaL_checkinteger(L, 1);
+ const uint32_t dwDuration = luaL_checkinteger(L, 2);
lua_pushboolean(L, Beep(dwFreq, dwDuration));
return 1;
}
@@ -1733,7 +1732,7 @@ static int global_CoUninitialize(lua_State *) static int global_GetCurrentProcessId(lua_State *L)
{
- DWORD pid = GetCurrentProcessId();
+ uint32_t pid = GetCurrentProcessId();
lua_pushinteger(L, pid);
return 1;
}
diff --git a/plugins/MirLua/src/Modules/m_database.cpp b/plugins/MirLua/src/Modules/m_database.cpp index d758475f86..eb1bef16d3 100644 --- a/plugins/MirLua/src/Modules/m_database.cpp +++ b/plugins/MirLua/src/Modules/m_database.cpp @@ -304,9 +304,9 @@ void MakeDbEvent(lua_State *L, DBEVENTINFO &dbei) lua_getfield(L, -1, "Blob"); switch (lua_type(L, -1)) { case LUA_TTABLE: - dbei.cbBlob = (DWORD)lua_rawlen(L, 4); + dbei.cbBlob = (uint32_t)lua_rawlen(L, 4); dbei.pBlob = (uint8_t*)mir_calloc(dbei.cbBlob); - for (DWORD i = 0; i < dbei.cbBlob; i++) { + for (uint32_t i = 0; i < dbei.cbBlob; i++) { lua_geti(L, 4, i + 1); dbei.pBlob[i] = lua_tointeger(L, -1); lua_pop(L, 1); @@ -315,7 +315,7 @@ void MakeDbEvent(lua_State *L, DBEVENTINFO &dbei) case LUA_TSTRING: size_t nLen; const char *str = lua_tolstring(L, -1, &nLen); - dbei.cbBlob = (DWORD)nLen; + dbei.cbBlob = (uint32_t)nLen; dbei.pBlob = (uint8_t*)mir_alloc(nLen); memcpy(dbei.pBlob, str, nLen); break; @@ -649,7 +649,7 @@ int MT<DBEVENTINFO>::Get(lua_State *L, DBEVENTINFO *dbei) if (mir_strcmpi(key, "Blob") == 0) { lua_createtable(L, dbei->cbBlob, 0); - for (DWORD i = 0; i < dbei->cbBlob; i++) { + for (uint32_t i = 0; i < dbei->cbBlob; i++) { lua_pushinteger(L, dbei->pBlob[i]); lua_rawseti(L, -2, i + 1); } diff --git a/plugins/MirLua/src/Modules/m_message.cpp b/plugins/MirLua/src/Modules/m_message.cpp index 42e1de78c0..00b6b4c629 100644 --- a/plugins/MirLua/src/Modules/m_message.cpp +++ b/plugins/MirLua/src/Modules/m_message.cpp @@ -38,7 +38,7 @@ static int message_Send(lua_State *L) dbei.szModule = MODULENAME; dbei.timestamp = time(0); dbei.eventType = EVENTTYPE_MESSAGE; - dbei.cbBlob = (DWORD)mir_strlen(message); + dbei.cbBlob = (uint32_t)mir_strlen(message); dbei.pBlob = (uint8_t*)mir_strdup(message); dbei.flags = DBEF_UTF | DBEF_SENT; db_event_add(hContact, &dbei); diff --git a/plugins/MirOTR/Libgcrypt/random/rndw32.c b/plugins/MirOTR/Libgcrypt/random/rndw32.c index d50fa22215..a6430394eb 100644 --- a/plugins/MirOTR/Libgcrypt/random/rndw32.c +++ b/plugins/MirOTR/Libgcrypt/random/rndw32.c @@ -120,34 +120,34 @@ /* Type definitions for function pointers to call NetAPI32 functions. */ -typedef DWORD (WINAPI *NETSTATISTICSGET)(LPWSTR szServer, LPWSTR szService, - DWORD dwLevel, DWORD dwOptions, +typedef uint32_t (WINAPI *NETSTATISTICSGET)(LPWSTR szServer, LPWSTR szService, + uint32_t dwLevel, uint32_t dwOptions, LPBYTE *lpBuffer); -typedef DWORD (WINAPI *NETAPIBUFFERSIZE)(LPVOID lpBuffer, LPDWORD cbBuffer); -typedef DWORD (WINAPI *NETAPIBUFFERFREE)(LPVOID lpBuffer); +typedef uint32_t (WINAPI *NETAPIBUFFERSIZE)(LPVOID lpBuffer, LPDWORD cbBuffer); +typedef uint32_t (WINAPI *NETAPIBUFFERFREE)(LPVOID lpBuffer); /* Type definitions for function pointers to call native NT functions. */ -typedef DWORD (WINAPI *NTQUERYSYSTEMINFORMATION)(DWORD systemInformationClass, +typedef uint32_t (WINAPI *NTQUERYSYSTEMINFORMATION)(uint32_t systemInformationClass, PVOID systemInformation, ULONG systemInformationLength, PULONG returnLength); -typedef DWORD (WINAPI *NTQUERYINFORMATIONPROCESS) - (HANDLE processHandle, DWORD processInformationClass, +typedef uint32_t (WINAPI *NTQUERYINFORMATIONPROCESS) + (HANDLE processHandle, uint32_t processInformationClass, PVOID processInformation, ULONG processInformationLength, PULONG returnLength); -typedef DWORD (WINAPI *NTPOWERINFORMATION) - (DWORD powerInformationClass, PVOID inputBuffer, +typedef uint32_t (WINAPI *NTPOWERINFORMATION) + (uint32_t powerInformationClass, PVOID inputBuffer, ULONG inputBufferLength, PVOID outputBuffer, ULONG outputBufferLength ); /* Type definitions for function pointers to call CryptoAPI functions. */ typedef BOOL (WINAPI *CRYPTACQUIRECONTEXT)(HCRYPTPROV *phProv, LPCTSTR pszContainer, LPCTSTR pszProvider, - DWORD dwProvType, - DWORD dwFlags); -typedef BOOL (WINAPI *CRYPTGENRANDOM)(HCRYPTPROV hProv, DWORD dwLen, + uint32_t dwProvType, + uint32_t dwFlags); +typedef BOOL (WINAPI *CRYPTGENRANDOM)(HCRYPTPROV hProv, uint32_t dwLen, uint8_t *pbBuffer); -typedef BOOL (WINAPI *CRYPTRELEASECONTEXT)(HCRYPTPROV hProv, DWORD dwFlags); +typedef BOOL (WINAPI *CRYPTRELEASECONTEXT)(HCRYPTPROV hProv, uint32_t dwFlags); /* Somewhat alternative functionality available as a direct call, for Windows XP and newer. This is the CryptoAPI RNG, which isn't anywhere @@ -361,7 +361,7 @@ registry_poll (void (*add)(const void*, size_t, enum random_origins), { static int cbPerfData = PERFORMANCE_BUFFER_SIZE; int iterations; - DWORD dwSize, status; + uint32_t dwSize, status; PERF_DATA_BLOCK *pPerfData; /* Get information from the system performance counters. This can take a @@ -488,7 +488,7 @@ slow_gatherer ( void (*add)(const void*, size_t, enum random_origins), static int is_initialized = 0; static int is_workstation = 1; HANDLE hDevice; - DWORD dwType, dwSize, dwResult; + uint32_t dwType, dwSize, dwResult; ULONG ulSize; int drive_no, status; int no_results = 0; @@ -985,7 +985,7 @@ _gcry_rndw32_gather_random_fast (void (*add)(const void*, size_t, else { /* Millisecond accuracy at best... */ - DWORD aword = GetTickCount (); + uint32_t aword = GetTickCount (); (*add) (&aword, sizeof (aword), origin ); } } diff --git a/plugins/MirOTR/Libgpg-error/estream.c b/plugins/MirOTR/Libgpg-error/estream.c index f4bda2a1c0..0ec22a0ba0 100644 --- a/plugins/MirOTR/Libgpg-error/estream.c +++ b/plugins/MirOTR/Libgpg-error/estream.c @@ -263,7 +263,7 @@ mem_free (void *p) #ifdef HAVE_W32_SYSTEM static int -map_w32_to_errno (DWORD w32_err) +map_w32_to_errno (uint32_t w32_err) { switch (w32_err) { @@ -1075,7 +1075,7 @@ es_func_w32_read (void *cookie, void *buffer, size_t size) pre_syscall_func (); do { - DWORD nread, ec; + uint32_t nread, ec; if (!ReadFile (w32_cookie->hd, buffer, size, &nread, NULL)) { @@ -1117,7 +1117,7 @@ es_func_w32_write (void *cookie, const void *buffer, size_t size) pre_syscall_func (); do { - DWORD nwritten; + uint32_t nwritten; if (!WriteFile (w32_cookie->hd, buffer, size, &nwritten, NULL)) { @@ -1140,7 +1140,7 @@ static int es_func_w32_seek (void *cookie, gpgrt_off_t *offset, int whence) { estream_cookie_w32_t w32_cookie = cookie; - DWORD method; + uint32_t method; LARGE_INTEGER distance, newoff; if (w32_cookie->hd == INVALID_HANDLE_VALUE) diff --git a/plugins/MirOTR/Libgpg-error/init.c b/plugins/MirOTR/Libgpg-error/init.c index 6305fe31af..4f3ca57af8 100644 --- a/plugins/MirOTR/Libgpg-error/init.c +++ b/plugins/MirOTR/Libgpg-error/init.c @@ -433,7 +433,7 @@ _gpg_err_set_errno (int err) /* Entry point called by the DLL loader. */ #ifdef DLL_EXPORT int WINAPI -DllMain (HINSTANCE hinst, DWORD reason, LPVOID reserved) +DllMain (HINSTANCE hinst, uint32_t reason, LPVOID reserved) { struct tls_space_s *tls; (void)reserved; diff --git a/plugins/MirOTR/Libgpg-error/w32-gettext.c b/plugins/MirOTR/Libgpg-error/w32-gettext.c index 89f505d91d..e52e3aee82 100644 --- a/plugins/MirOTR/Libgpg-error/w32-gettext.c +++ b/plugins/MirOTR/Libgpg-error/w32-gettext.c @@ -58,9 +58,9 @@ static wchar_t *utf8_to_wchar (const char *string, size_t length, size_t *retlen); static HANDLE -MyCreateFileA (LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dwSharedMode, +MyCreateFileA (LPCSTR lpFileName, uint32_t dwDesiredAccess, uint32_t dwSharedMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, - DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, + uint32_t dwCreationDisposition, uint32_t dwFlagsAndAttributes, HANDLE hTemplateFile) { wchar_t *filename; @@ -1230,7 +1230,7 @@ static struct loaded_domain * load_domain (const char *filename) { HANDLE fh; - DWORD size; + uint32_t size; struct mo_file_header *data = NULL; struct loaded_domain *domain = NULL; size_t to_read; @@ -1260,7 +1260,7 @@ load_domain (const char *filename) do { BOOL res; - DWORD nb; + uint32_t nb; res = ReadFile (fh, read_ptr, to_read, &nb, NULL); if (! res || nb < to_read) diff --git a/plugins/MirOTR/src/options.cpp b/plugins/MirOTR/src/options.cpp index da607a301f..f593f738e9 100644 --- a/plugins/MirOTR/src/options.cpp +++ b/plugins/MirOTR/src/options.cpp @@ -597,7 +597,7 @@ public: { for (auto &it : m_map) { if (!it.first) continue; - db_set_dw(it.first, MODULENAME, "Policy", (DWORD)it.second.policy); + db_set_dw(it.first, MODULENAME, "Policy", (uint32_t)it.second.policy); db_set_b(it.first, MODULENAME, "HTMLConv", it.second.htmlconv); } return true; diff --git a/plugins/MirOTR/src/otr.cpp b/plugins/MirOTR/src/otr.cpp index eed207e7ae..51e2633f24 100644 --- a/plugins/MirOTR/src/otr.cpp +++ b/plugins/MirOTR/src/otr.cpp @@ -80,7 +80,7 @@ extern "C" { OtrlPolicy otr_gui_policy(void *opdata, ConnContext *context) { DEBUGOUTA("OTR_GUI_POLICY\n"); MCONTACT hContact = (UINT_PTR)opdata; - DWORD pol; + uint32_t pol; if (hContact) { pol = g_plugin.getDword(hContact, "Policy", CONTACT_DEFAULT_POLICY); if (options.bHaveSecureIM && pol != OTRL_POLICY_MANUAL_MOD && pol != OTRL_POLICY_NEVER && db_get_b(hContact, "SecureIM", "StatusID", 0)) { diff --git a/plugins/MirOTR/src/svcs_menu.cpp b/plugins/MirOTR/src/svcs_menu.cpp index 955265ac6b..50829b2f16 100644 --- a/plugins/MirOTR/src/svcs_menu.cpp +++ b/plugins/MirOTR/src/svcs_menu.cpp @@ -13,7 +13,7 @@ int StartOTR(MCONTACT hContact) if (!uname) return 1; // error - DWORD pol = g_plugin.getDword(hContact, "Policy", CONTACT_DEFAULT_POLICY); + uint32_t pol = g_plugin.getDword(hContact, "Policy", CONTACT_DEFAULT_POLICY); if (pol == CONTACT_DEFAULT_POLICY) pol = options.default_policy; @@ -199,7 +199,7 @@ int SVC_PrebuildContactMenu(WPARAM hContact, LPARAM) if ((caps & PF1_IM) == 0) return 0; - DWORD pol = g_plugin.getDword(hContact, "Policy", CONTACT_DEFAULT_POLICY); + uint32_t pol = g_plugin.getDword(hContact, "Policy", CONTACT_DEFAULT_POLICY); if (pol == CONTACT_DEFAULT_POLICY) pol = options.default_policy; diff --git a/plugins/MirOTR/src/svcs_proto.cpp b/plugins/MirOTR/src/svcs_proto.cpp index 2207ea09fd..038500363b 100644 --- a/plugins/MirOTR/src/svcs_proto.cpp +++ b/plugins/MirOTR/src/svcs_proto.cpp @@ -125,7 +125,7 @@ INT_PTR SVC_OTRRecvMessage(WPARAM wParam,LPARAM lParam) if (newmessage == nullptr) return Proto_ChainRecv(wParam, ccs); - DWORD oldflags = pre->flags; + uint32_t oldflags = pre->flags; typedef void (*msg_free_t)(void*); msg_free_t msg_free = (msg_free_t)otrl_message_free; diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp index 944d5c3f16..0de4d4de9b 100644 --- a/plugins/MirandaG15/src/CAppletManager.cpp +++ b/plugins/MirandaG15/src/CAppletManager.cpp @@ -707,15 +707,15 @@ void CAppletManager::SendTypingNotification(MCONTACT hContact, bool bEnable) if (!szProto) return; - DWORD typeCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0); + uint32_t typeCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0); if (!(typeCaps & PF4_SUPPORTTYPING)) return; - DWORD protoStatus = Proto_GetStatus(szProto); + uint32_t protoStatus = Proto_GetStatus(szProto); if (protoStatus < ID_STATUS_ONLINE) return; - DWORD protoCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0); + uint32_t protoCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0); if (protoCaps & PF1_VISLIST && db_get_w(hContact, szProto, "ApparentMode", 0) == ID_STATUS_OFFLINE) return; if (protoCaps & PF1_INVISLIST && protoStatus == ID_STATUS_INVISIBLE && db_get_w(hContact, szProto, "ApparentMode", 0) != ID_STATUS_ONLINE) @@ -1454,7 +1454,7 @@ int CAppletManager::HookStatusChanged(WPARAM wParam, LPARAM lParam) Event.strSummary = TranslateString(L"Contactlist event"); // Block notifications after connecting/disconnecting - if (pProtocolData->iStatus == ID_STATUS_OFFLINE || (DWORD)pProtocolData->lTimeStamp + PROTOCOL_NOTIFY_DELAY > GetTickCount()) + if (pProtocolData->iStatus == ID_STATUS_OFFLINE || (uint32_t)pProtocolData->lTimeStamp + PROTOCOL_NOTIFY_DELAY > GetTickCount()) Event.bNotification = false; //CAppletManager::GetInstance()->ActivateNotificationScreen(&Event); diff --git a/plugins/MirandaG15/src/CAppletManager.h b/plugins/MirandaG15/src/CAppletManager.h index 80a29d9603..a443f8a842 100644 --- a/plugins/MirandaG15/src/CAppletManager.h +++ b/plugins/MirandaG15/src/CAppletManager.h @@ -20,10 +20,10 @@ struct SMessageJob {
MEVENT hEvent;
MCONTACT hContact;
- DWORD dwFlags;
+ uint32_t dwFlags;
char *pcBuffer;
int iBufferSize;
- DWORD dwTimestamp;
+ uint32_t dwTimestamp;
};
class CAppletManager : public CLCDOutputManager
diff --git a/plugins/MirandaG15/src/CChatScreen.cpp b/plugins/MirandaG15/src/CChatScreen.cpp index d735218093..1408d787ae 100644 --- a/plugins/MirandaG15/src/CChatScreen.cpp +++ b/plugins/MirandaG15/src/CChatScreen.cpp @@ -523,7 +523,7 @@ void CChatScreen::DeactivateMessageMode() //************************************************************************
// maximizes the content object
//************************************************************************
-void CChatScreen::Maximize(DWORD dwTimer)
+void CChatScreen::Maximize(uint32_t dwTimer)
{
m_bMaximizedTimer = true;
m_dwMaximizedTimer = GetTickCount();
diff --git a/plugins/MirandaG15/src/CChatScreen.h b/plugins/MirandaG15/src/CChatScreen.h index d888c62a92..b9861f1e61 100644 --- a/plugins/MirandaG15/src/CChatScreen.h +++ b/plugins/MirandaG15/src/CChatScreen.h @@ -60,7 +60,7 @@ protected: void AddIncomingMessage(tstring strMessage, tm *time, bool bIRC = false);
// maximizes the content object
- void Maximize(DWORD dwTimer = INFINITE);
+ void Maximize(uint32_t dwTimer = INFINITE);
// minimizes the content object
void Minimize();
// returns wether the content is maximized
@@ -87,10 +87,10 @@ protected: bool m_bTyping = false;
enum { REPLY_STATE_NONE, REPLY_STATE_INPUT, REPLY_STATE_SENDING, REPLY_STATE_FAILED } m_eReplyState = REPLY_STATE_NONE;
- DWORD m_dwCloseTimer = 0;
+ uint32_t m_dwCloseTimer = 0;
bool m_bCloseTimer = false;
- DWORD m_dwMaximizedTimer = 0;
- DWORD m_dwMaximizedDuration = 0;
+ uint32_t m_dwMaximizedTimer = 0;
+ uint32_t m_dwMaximizedDuration = 0;
MCONTACT m_hContact = 0;
MEVENT m_hMessage = 0;
diff --git a/plugins/MirandaG15/src/CContactList.h b/plugins/MirandaG15/src/CContactList.h index ba60174b2c..12a5e3cefa 100644 --- a/plugins/MirandaG15/src/CContactList.h +++ b/plugins/MirandaG15/src/CContactList.h @@ -137,7 +137,7 @@ protected: bool m_bUseGroups = false;
bool m_bUseMetaContacts = false;
vector<CContactListGroup*> m_Groups;
- DWORD m_dwLastScroll = 0;
+ uint32_t m_dwLastScroll = 0;
HBITMAP m_ahBitmaps[8];
};
diff --git a/plugins/MirandaG15/src/CCreditsScreen.cpp b/plugins/MirandaG15/src/CCreditsScreen.cpp index 72f679523e..b1b836da8b 100644 --- a/plugins/MirandaG15/src/CCreditsScreen.cpp +++ b/plugins/MirandaG15/src/CCreditsScreen.cpp @@ -59,7 +59,7 @@ bool CCreditsScreen::Update() if (!CScreen::Update())
return false;
- DWORD dwTimeElapsed = GetTickCount() - m_dwActivation;
+ uint32_t dwTimeElapsed = GetTickCount() - m_dwActivation;
int iOldPosition = m_iPosition;
if (dwTimeElapsed > m_dwDuration) {
diff --git a/plugins/MirandaG15/src/CCreditsScreen.h b/plugins/MirandaG15/src/CCreditsScreen.h index fce21c0551..9d5f706241 100644 --- a/plugins/MirandaG15/src/CCreditsScreen.h +++ b/plugins/MirandaG15/src/CCreditsScreen.h @@ -45,8 +45,8 @@ private: CLCDLabel m_Label;
CLCDLabel m_Label2;
- DWORD m_dwActivation = 0;
- DWORD m_dwDuration = 0;
+ uint32_t m_dwActivation = 0;
+ uint32_t m_dwDuration = 0;
int m_iPosition = 0;
};
diff --git a/plugins/MirandaG15/src/CEvent.h b/plugins/MirandaG15/src/CEvent.h index 42f435480a..093c6b87a9 100644 --- a/plugins/MirandaG15/src/CEvent.h +++ b/plugins/MirandaG15/src/CEvent.h @@ -39,7 +39,7 @@ enum EventType struct CEvent
{
enum EventType eType;
- DWORD dwFlags = 0;
+ uint32_t dwFlags = 0;
MCONTACT hContact = 0;
struct tm Time = {};
bool bTime = false;
diff --git a/plugins/MirandaG15/src/CEventLog.h b/plugins/MirandaG15/src/CEventLog.h index cf08b5f214..fa6161d1c3 100644 --- a/plugins/MirandaG15/src/CEventLog.h +++ b/plugins/MirandaG15/src/CEventLog.h @@ -40,7 +40,7 @@ protected: // Called to draw the specified entry
void DrawEntry(CLCDGfx *pGfx, CEventLogEntry *pEntry, bool bSelected);
- DWORD m_dwLastScroll = 0;
+ uint32_t m_dwLastScroll = 0;
};
#endif
diff --git a/plugins/MirandaG15/src/CScreensaverScreen.cpp b/plugins/MirandaG15/src/CScreensaverScreen.cpp index 492274a2cc..e82e119ac1 100644 --- a/plugins/MirandaG15/src/CScreensaverScreen.cpp +++ b/plugins/MirandaG15/src/CScreensaverScreen.cpp @@ -70,7 +70,7 @@ bool CScreensaverScreen::Update() if (!CScreen::Update())
return false;
- DWORD dwTimeElapsed = GetTickCount() - m_dwActivation;
+ uint32_t dwTimeElapsed = GetTickCount() - m_dwActivation;
int iOldPosition = m_iPosition;
if (dwTimeElapsed > m_dwDuration) {
diff --git a/plugins/MirandaG15/src/CScreensaverScreen.h b/plugins/MirandaG15/src/CScreensaverScreen.h index 9390df47b5..403a0b6bcb 100644 --- a/plugins/MirandaG15/src/CScreensaverScreen.h +++ b/plugins/MirandaG15/src/CScreensaverScreen.h @@ -43,8 +43,8 @@ public: private:
CLCDLabel m_Label, m_Label2;
- DWORD m_dwActivation = 0;
- DWORD m_dwDuration = 0;
+ uint32_t m_dwActivation = 0;
+ uint32_t m_dwDuration = 0;
int m_iPosition = 0;
};
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp index 33ed23a2e9..134295b142 100644 --- a/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp +++ b/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp @@ -31,7 +31,7 @@ void CLCDConnectionLogitech::runDrawingThread() m_hStopEvent = CreateEvent(nullptr, FALSE, FALSE, nullptr);
m_hDrawEvent = CreateEvent(nullptr, FALSE, FALSE, nullptr);
- DWORD dwRes = 0;
+ uint32_t dwRes = 0;
while (1) {
HANDLE hArray[2] = {m_hStopEvent, m_hDrawEvent};
@@ -40,7 +40,7 @@ void CLCDConnectionLogitech::runDrawingThread() break;
}
else if (dwRes == WAIT_OBJECT_0 + 1) {
- DWORD rc;
+ uint32_t rc;
if (GetConnectionState() != CONNECTED) {
continue;
}
@@ -227,7 +227,7 @@ CLgLCDDevice* CLCDConnectionLogitech::GetConnectedDevice() //************************************************************************
bool CLCDConnectionLogitech::Connect(int iIndex)
{
- DWORD rc;
+ uint32_t rc;
lgLcdOpenByTypeContext OpenContext;
if (m_bConnected && (iIndex == 0 || iIndex == GetConnectedDevice()->GetIndex()))
return true;
@@ -335,7 +335,7 @@ bool CLCDConnectionLogitech::HIDReadData(uint8_t* data) return false;
}
- DWORD dwRes = WaitForSingleObject(hReadEvent, 0);
+ uint32_t dwRes = WaitForSingleObject(hReadEvent, 0);
if (dwRes == WAIT_OBJECT_0) {
bool bRes = false;
if (GetOverlappedResult(m_hHIDDeviceHandle, &olRead, &TransBytes, false)) {
@@ -347,7 +347,7 @@ bool CLCDConnectionLogitech::HIDReadData(uint8_t* data) olRead.hEvent = hReadEvent;
if (!ReadFile(m_hHIDDeviceHandle, privateBuffer, 9, &TransBytes, &olRead)) {
- DWORD error = GetLastError();
+ uint32_t error = GetLastError();
if (error != ERROR_IO_PENDING) {
return false;
}
@@ -358,12 +358,12 @@ bool CLCDConnectionLogitech::HIDReadData(uint8_t* data) return false;
}
-void CLCDConnectionLogitech::OnSoftButtonCB(DWORD state)
+void CLCDConnectionLogitech::OnSoftButtonCB(uint32_t state)
{
m_dwButtonState = state;
}
-void CLCDConnectionLogitech::OnNotificationCB(DWORD notificationCode, DWORD notifyParm1, DWORD, DWORD, DWORD)
+void CLCDConnectionLogitech::OnNotificationCB(uint32_t notificationCode, uint32_t notifyParm1, uint32_t, uint32_t, uint32_t)
{
CLgLCDDevice *device;
@@ -513,7 +513,7 @@ bool CLCDConnectionLogitech::GetButtonState(int iButton) if (!GetConnectionState() == CONNECTED)
return false;
- DWORD dwButton = GetButtonId(iButton);
+ uint32_t dwButton = GetButtonId(iButton);
if (m_dwButtonState & dwButton)
return true;
@@ -528,7 +528,7 @@ bool CLCDConnectionLogitech::HideApplet() if (!GetConnectionState() == CONNECTED)
return false;
- DWORD rc;
+ uint32_t rc;
rc = lgLcdUpdateBitmap(m_hDevice, &m_lcdBitmap.hdr, LGLCD_ASYNC_UPDATE(LGLCD_PRIORITY_IDLE_NO_SHOW));
if (rc != ERROR_SUCCESS)
@@ -626,7 +626,7 @@ uint8_t *CLCDConnectionLogitech::GetPixelBuffer() //************************************************************************
// CLCDConnectionLogitech::HandleErrorFromAPI
//************************************************************************
-void CLCDConnectionLogitech::HandleErrorFromAPI(DWORD dwRes)
+void CLCDConnectionLogitech::HandleErrorFromAPI(uint32_t dwRes)
{
switch (dwRes) {
// all is well
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.h b/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.h index 916b0f9110..237eb8f11c 100644 --- a/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.h +++ b/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.h @@ -90,8 +90,8 @@ public: //----------------------------------------------
//----------------------------------------------
// Special functions for callbacks
- void OnSoftButtonCB(DWORD state);
- void OnNotificationCB(DWORD notificationCode, DWORD notifyParm1, DWORD notifyParm2, DWORD notifyParm3, DWORD notifyParm4);
+ void OnSoftButtonCB(uint32_t state);
+ void OnNotificationCB(uint32_t notificationCode, uint32_t notifyParm1, uint32_t notifyParm2, uint32_t notifyParm3, uint32_t notifyParm4);
//----------------------------------------------
// Special functions for the volume wheel hook
// Activates/Deactivates the volumewheel hook
@@ -121,7 +121,7 @@ private: bool m_bVolumeWheelHook;
// handles API Errors
- void HandleErrorFromAPI(DWORD dwRes);
+ void HandleErrorFromAPI(uint32_t dwRes);
int m_iNumQVGADevices;
int m_iNumBWDevices;
@@ -135,10 +135,10 @@ private: int m_iPixels;
int m_hDevice;
int m_hConnection;
- DWORD m_dwButtonState;
+ uint32_t m_dwButtonState;
int m_iPriority;
- DWORD m_dwForegroundCheck;
+ uint32_t m_dwForegroundCheck;
bool m_bSetAsForeground;
std::vector<CLgLCDDevice*> m_lcdDevices;
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDDevice.h b/plugins/MirandaG15/src/LCDFramework/CLCDDevice.h index 657b31e999..e177a9b210 100644 --- a/plugins/MirandaG15/src/LCDFramework/CLCDDevice.h +++ b/plugins/MirandaG15/src/LCDFramework/CLCDDevice.h @@ -38,7 +38,7 @@ private: int m_iBPP;
public:
- CLgLCDDevice(DWORD type, SIZE size, int buttons, int BPP) : CLCDDevice(type)
+ CLgLCDDevice(uint32_t type, SIZE size, int buttons, int BPP) : CLCDDevice(type)
{
m_size = size;
m_iButtons = buttons;
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDGfx.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDGfx.cpp index 7d994666a7..977f645441 100644 --- a/plugins/MirandaG15/src/LCDFramework/CLCDGfx.cpp +++ b/plugins/MirandaG15/src/LCDFramework/CLCDGfx.cpp @@ -368,7 +368,7 @@ void CLCDGfx::EndDraw(void) uint8_t *pScreen1 = m_pSavedBitmapBits;
uint8_t *pScreen2 = m_pBitmapBits;
- DWORD dwTimeElapsed = GetTickCount() - m_dwTransitionStart;
+ uint32_t dwTimeElapsed = GetTickCount() - m_dwTransitionStart;
/* if(m_eTransition == TRANSITION_BT || m_eTransition == TRANSITION_TB)
{
@@ -587,7 +587,7 @@ int CLCDGfx::findNearestMatch(uint8_t *targetArray, int iSourceIndex) //************************************************************************
void CLCDGfx::Cache()
{
- DWORD dwStart = GetTickCount();
+ uint32_t dwStart = GetTickCount();
// Initialize pixels
if (m_eTransition == TRANSITION_MORPH) {
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDGfx.h b/plugins/MirandaG15/src/LCDFramework/CLCDGfx.h index 2246064e43..6ccb5075e8 100644 --- a/plugins/MirandaG15/src/LCDFramework/CLCDGfx.h +++ b/plugins/MirandaG15/src/LCDFramework/CLCDGfx.h @@ -67,7 +67,7 @@ protected: bool m_bInitialized;
- DWORD m_dwTransitionStart;
+ uint32_t m_dwTransitionStart;
bool m_bTransition;
ETransitionType m_eTransition;
@@ -75,7 +75,7 @@ protected: vector<SLCDPixel*> m_LStaticPixels;
double m_dWave;
- DWORD m_dwLastDraw;
+ uint32_t m_dwLastDraw;
};
#endif
\ No newline at end of file diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.cpp index 1694707897..4291450ea0 100644 --- a/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.cpp +++ b/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.cpp @@ -149,8 +149,8 @@ void CLCDOutputManager::InitializeGfxObject() int iButtonCount = m_pLcdConnection->GetButtonCount(); m_pbButtonStates = (bool*)malloc(sizeof(bool)*iButtonCount); - m_pdwButtonRepeatTimers = (DWORD*)malloc(sizeof(DWORD)*iButtonCount); - m_pdwButtonRepeatStarts = (DWORD*)malloc(sizeof(DWORD)*iButtonCount); + m_pdwButtonRepeatTimers = (uint32_t*)malloc(sizeof(uint32_t)*iButtonCount); + m_pdwButtonRepeatStarts = (uint32_t*)malloc(sizeof(uint32_t)*iButtonCount); for (int i = 0; i < iButtonCount; i++) { m_pbButtonStates[i] = false; m_pdwButtonRepeatTimers[i] = 0; @@ -236,7 +236,7 @@ bool CLCDOutputManager::Update() iId = m_pLcdConnection->GetButtonId(i); // reduce the delay by 5% per second - DWORD dwNewDelay = m_dwButtonRepeatDelay - ((float)m_dwButtonRepeatDelay * 0.05 * (GetTickCount() - m_pdwButtonRepeatStarts[i]) / 250); + uint32_t dwNewDelay = m_dwButtonRepeatDelay - ((float)m_dwButtonRepeatDelay * 0.05 * (GetTickCount() - m_pdwButtonRepeatStarts[i]) / 250); // delay may not be less than 25% of the original value if (dwNewDelay < m_dwButtonRepeatDelay * 0.25) dwNewDelay = m_dwButtonRepeatDelay * 0.25; @@ -354,7 +354,7 @@ void CLCDOutputManager::StartTransition(ETransitionType eTransition, LPRECT rect //************************************************************************ // specifies the button repeat delay //************************************************************************ -void CLCDOutputManager::SetButtonRepeatDelay(DWORD dwDelay) +void CLCDOutputManager::SetButtonRepeatDelay(uint32_t dwDelay) { m_dwButtonRepeatDelay = dwDelay; } diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.h b/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.h index 076f41a570..8d9f6d68cd 100644 --- a/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.h +++ b/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.h @@ -46,7 +46,7 @@ public: CLCDConnection *GetLCDConnection();
// specifies the button repeat delay
- void SetButtonRepeatDelay(DWORD dwDelay);
+ void SetButtonRepeatDelay(uint32_t dwDelay);
// starts a screen transition
void StartTransition(ETransitionType eTransition = TRANSITION_RANDOM, LPRECT rect = nullptr);
@@ -58,6 +58,7 @@ public: // Called by the LCDManager to open a config dialog
static DWORD WINAPI configDialogCallback(IN int connection, IN const PVOID pContext);
+
protected:
void InitializeGfxObject();
void DeinitializeGfxObject();
@@ -88,12 +89,12 @@ protected: private:
static CLCDOutputManager *m_pInstance;
- DWORD m_dwLastUpdate = 0;
- DWORD m_dwButtonRepeatDelay = 300;
+ uint32_t m_dwLastUpdate = 0;
+ uint32_t m_dwButtonRepeatDelay = 300;
bool m_bInitialized = false;
bool *m_pbButtonStates = nullptr;
- DWORD *m_pdwButtonRepeatTimers = nullptr;
- DWORD *m_pdwButtonRepeatStarts = nullptr;
+ uint32_t *m_pdwButtonRepeatTimers = nullptr;
+ uint32_t *m_pdwButtonRepeatStarts = nullptr;
tstring m_strAppletName;
CLCDConnection *m_pLcdConnection = nullptr;
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDScreen.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDScreen.cpp index e2d878db2f..65d6756e66 100644 --- a/plugins/MirandaG15/src/LCDFramework/CLCDScreen.cpp +++ b/plugins/MirandaG15/src/LCDFramework/CLCDScreen.cpp @@ -124,7 +124,7 @@ bool CLCDScreen::Draw(CLCDGfx *pGfx) //************************************************************************
// Set the screen's time until expiration
//************************************************************************
-void CLCDScreen::SetExpiration(DWORD dwTime)
+void CLCDScreen::SetExpiration(uint32_t dwTime)
{
if (dwTime == INFINITE)
m_dwExpiration = INFINITE;
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDScreen.h b/plugins/MirandaG15/src/LCDFramework/CLCDScreen.h index f8b6c432e1..1ae251afe0 100644 --- a/plugins/MirandaG15/src/LCDFramework/CLCDScreen.h +++ b/plugins/MirandaG15/src/LCDFramework/CLCDScreen.h @@ -22,7 +22,7 @@ public: virtual bool Draw(CLCDGfx *pGfx);
// Sets the screen's time until expiration
- void SetExpiration(DWORD dwTime);
+ void SetExpiration(uint32_t dwTime);
// Check if the screen has expired
bool HasExpired();
@@ -60,7 +60,7 @@ public: private:
SIZE m_Size;
bool m_bAlert = false;
- DWORD m_dwExpiration = INFINITE;
+ uint32_t m_dwExpiration = INFINITE;
vector<CLCDObject*> m_Objects;
};
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDTextLog.h b/plugins/MirandaG15/src/LCDFramework/CLCDTextLog.h index bd94745e5e..0109af5198 100644 --- a/plugins/MirandaG15/src/LCDFramework/CLCDTextLog.h +++ b/plugins/MirandaG15/src/LCDFramework/CLCDTextLog.h @@ -79,7 +79,7 @@ private: int m_iTextLines = 0;
int m_iLastScrollDirection = 0;
- DWORD m_dwLastScroll = 0;
+ uint32_t m_dwLastScroll = 0;
list<CLogEntry*> m_Entrys;
CLCDBar *m_pScrollbar = nullptr;
diff --git a/plugins/MsgPopup/src/main.cpp b/plugins/MsgPopup/src/main.cpp index bad9fed4d3..6f30cf7dae 100644 --- a/plugins/MsgPopup/src/main.cpp +++ b/plugins/MsgPopup/src/main.cpp @@ -133,10 +133,9 @@ void HookOnImport(HMODULE hModule, char *lpszImpModName, PVOID lpOrigFunc, PVOID if (*ppfn != lpOrigFunc)
continue;
- DWORD oldProtect;
-
g_mod++;
+ DWORD oldProtect;
if (!VirtualProtect((LPVOID)ppfn, sizeof(void*), PAGE_EXECUTE_READWRITE, &oldProtect)) {
if (!g_HookError)
g_HookError = TRUE;
@@ -201,10 +200,10 @@ void LoadConfig() mir_snprintf(szNameTO, "TO%d", indx);
options.FG[indx] = g_plugin.getDword(szNameFG, optionsDefault.FG[indx]);
options.BG[indx] = g_plugin.getDword(szNameBG, optionsDefault.BG[indx]);
- options.Timeout[indx] = g_plugin.getDword(szNameTO, (DWORD)optionsDefault.Timeout[indx]);
+ options.Timeout[indx] = g_plugin.getDword(szNameTO, (uint32_t)optionsDefault.Timeout[indx]);
}
- options.Sound = g_plugin.getByte("Sound", (DWORD)optionsDefault.Sound);
+ options.Sound = g_plugin.getByte("Sound", (uint32_t)optionsDefault.Sound);
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/MsgPopup/src/options.cpp b/plugins/MsgPopup/src/options.cpp index 1c42fc6734..3e8cdfd0fa 100644 --- a/plugins/MsgPopup/src/options.cpp +++ b/plugins/MsgPopup/src/options.cpp @@ -28,7 +28,7 @@ int idOptionControls[4][3] = { IDC_QUESTION_FG, IDC_QUESTION_BG, IDC_TIMEOUT4
};
-static int __inline DBWriteContactSettingDwordDef(MCONTACT hContact, const char *szModule, const char *szSetting, DWORD val, DWORD defValue)
+static int __inline DBWriteContactSettingDwordDef(MCONTACT hContact, const char *szModule, const char *szSetting, uint32_t val, uint32_t defValue)
{
if (val == db_get_dw(hContact, szModule, szSetting, defValue))
return 0;
@@ -78,7 +78,7 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l if (HIWORD(wParam) != EN_CHANGE) return FALSE;
if ((HWND)lParam != GetFocus()) return FALSE;
- value = (DWORD)GetDlgItemInt(hWnd, LOWORD(wParam), &Translated, TRUE);
+ value = (uint32_t)GetDlgItemInt(hWnd, LOWORD(wParam), &Translated, TRUE);
if (Translated)
options.Timeout[indx] = value;
}
@@ -105,7 +105,7 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l DBWriteContactSettingDwordDef(0, MODULENAME, szNameFG, options.FG[indx], optionsDefault.FG[indx]);
DBWriteContactSettingDwordDef(0, MODULENAME, szNameBG, options.BG[indx], optionsDefault.BG[indx]);
- DBWriteContactSettingDwordDef(0, MODULENAME, szNameTO, options.Timeout[indx], (DWORD)optionsDefault.Timeout[indx]);
+ DBWriteContactSettingDwordDef(0, MODULENAME, szNameTO, options.Timeout[indx], (uint32_t)optionsDefault.Timeout[indx]);
}
DBWriteContactSettingDwordDef(0, MODULENAME, "Sound", options.Sound, optionsDefault.Sound);
diff --git a/plugins/Msg_Export/src/FileViewer.cpp b/plugins/Msg_Export/src/FileViewer.cpp index 55e99279ff..6390f435e1 100755 --- a/plugins/Msg_Export/src/FileViewer.cpp +++ b/plugins/Msg_Export/src/FileViewer.cpp @@ -256,7 +256,7 @@ int CLStreamRTFInfo::nLoadFileStream(LPBYTE pbBuff, LONG cb) for (; n < dwRead; n++) {
// worst case is a file ending with \n or a unicode letter. resulting in a big unicode string
// here we need szNewLine and szRtfEnd. the 10 is a small safty margin.
- if (dwCurrent + (sizeof(szNewLine) + sizeof(szRtfEnd) + 10) > (DWORD)cb) {
+ if (dwCurrent + (sizeof(szNewLine) + sizeof(szRtfEnd) + 10) > (uint32_t)cb) {
// oh no !!! we have almost reached the end of the windows supplyed buffer
// we are writing to. we need to abort mision *S*!!
// and rewinde file
@@ -432,12 +432,12 @@ bool bUseInternalViewer(bool bNew) // pbBuff - ?
// cb - ?
// pcb - ?
-// Returns : DWORD CALLBACK
+// Returns : uint32_t CALLBACK
DWORD CALLBACK RichEditStreamLoadFile(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
{
ReadFile((HANDLE)dwCookie, pbBuff, (DWORD)cb, (DWORD *)pcb, (LPOVERLAPPED)nullptr);
- return (DWORD)(*pcb >= 0 ? NOERROR : (*pcb = 0, E_FAIL));
+ return (uint32_t)(*pcb >= 0 ? NOERROR : (*pcb = 0, E_FAIL));
}
DWORD CALLBACK RichEditRTFStreamLoadFile(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
@@ -445,12 +445,12 @@ DWORD CALLBACK RichEditRTFStreamLoadFile(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG *pcb = ((CLStreamRTFInfo *)dwCookie)->nLoadFileStream(pbBuff, cb);
if (*pcb)
return NOERROR;
- return (DWORD)E_FAIL;
+ return (uint32_t)E_FAIL;
}
DWORD CALLBACK RichEditStreamSaveFile(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
{
- WriteFile((HANDLE)dwCookie, pbBuff, cb, (DWORD*)pcb, (LPOVERLAPPED)nullptr);
+ WriteFile((HANDLE)dwCookie, pbBuff, cb, (DWORD *)pcb, (LPOVERLAPPED)nullptr);
return *pcb != cb;
}
@@ -463,7 +463,7 @@ DWORD CALLBACK RichEditStreamSaveFile(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb bool bLoadFile(HWND hwndDlg, CLHistoryDlg *pclDlg)
{
- DWORD dwStart = GetTickCount();
+ uint32_t dwStart = GetTickCount();
HWND hRichEdit = GetDlgItem(hwndDlg, IDC_RICHEDIT);
if (!hRichEdit)
@@ -526,7 +526,7 @@ bool bLoadFile(HWND hwndDlg, CLHistoryDlg *pclDlg) GETTEXTLENGTHEX sData = { 0 };
sData.flags = GTL_DEFAULT;
- DWORD dwDataRead = (DWORD)SendMessage(hRichEdit, EM_GETTEXTLENGTHEX, (WPARAM)&sData, 0);
+ uint32_t dwDataRead = (uint32_t)SendMessage(hRichEdit, EM_GETTEXTLENGTHEX, (WPARAM)&sData, 0);
SendMessage(hRichEdit, EM_SETSEL, dwDataRead - 1, dwDataRead - 1);
if (!bScrollToBottom)
@@ -604,7 +604,7 @@ LRESULT CALLBACK EditSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa POINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };
if (pt.x == -1 && pt.y == -1) {
- DWORD dwStart, dwEnd;
+ uint32_t dwStart, dwEnd;
SendMessage(hwnd, EM_GETSEL, (WPARAM)&dwStart, (LPARAM)&dwEnd);
SendMessage(hwnd, EM_POSFROMCHAR, (WPARAM)&pt, (LPARAM)dwEnd);
ClientToScreen(hwnd, &pt);
@@ -838,7 +838,7 @@ static INT_PTR CALLBACK DlgProcFileViewer(HWND hwndDlg, UINT msg, WPARAM wParam, LOGFONT lf = { 0 };
lf.lfHeight = 14L;
- DWORD dwEffects = g_plugin.getDword(szFileViewDB "TEffects", 0);
+ uint32_t dwEffects = g_plugin.getDword(szFileViewDB "TEffects", 0);
lf.lfWeight = (dwEffects & CFE_BOLD) ? FW_BOLD : 0;
lf.lfUnderline = (dwEffects & CFE_UNDERLINE) != 0;
lf.lfStrikeOut = (dwEffects & CFE_STRIKEOUT) != 0;
diff --git a/plugins/Msg_Export/src/options.cpp b/plugins/Msg_Export/src/options.cpp index 32b9607dfc..90f87f8067 100755 --- a/plugins/Msg_Export/src/options.cpp +++ b/plugins/Msg_Export/src/options.cpp @@ -39,7 +39,7 @@ const int nProtoColWitdh = 100; // width in pixels of the UIN column in the List class CLDBEvent
{
- DWORD time;
+ uint32_t time;
public:
MCONTACT hUser;
MEVENT hDbEvent;
@@ -82,8 +82,8 @@ int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort) return mir_strcmp(Proto_GetBaseAccountName((MCONTACT)lParam1), Proto_GetBaseAccountName((MCONTACT)lParam2));
if (lParamSort == 3) {
- DWORD dwUin1 = db_get_dw((MCONTACT)lParam1, Proto_GetBaseAccountName((MCONTACT)lParam1), "UIN", 0);
- DWORD dwUin2 = db_get_dw((MCONTACT)lParam2, Proto_GetBaseAccountName((MCONTACT)lParam2), "UIN", 0);
+ uint32_t dwUin1 = db_get_dw((MCONTACT)lParam1, Proto_GetBaseAccountName((MCONTACT)lParam1), "UIN", 0);
+ uint32_t dwUin2 = db_get_dw((MCONTACT)lParam2, Proto_GetBaseAccountName((MCONTACT)lParam2), "UIN", 0);
if (dwUin1 == dwUin2)
return 0;
return (dwUin1 > dwUin2) ? -1 : 1;
@@ -417,7 +417,7 @@ public: bool OnInitDialog() override
{
- DWORD dw = listUsers.GetExtendedListViewStyle();
+ uint32_t dw = listUsers.GetExtendedListViewStyle();
dw |= LVS_EX_HEADERDRAGDROP | LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES;
listUsers.SetExtendedListViewStyle(dw);
diff --git a/plugins/Msg_Export/src/utils.cpp b/plugins/Msg_Export/src/utils.cpp index 479723781c..7a67870ed2 100755 --- a/plugins/Msg_Export/src/utils.cpp +++ b/plugins/Msg_Export/src/utils.cpp @@ -143,7 +143,7 @@ static void ReplaceAll(wstring &sSrc, const wchar_t *pszReplace, const wchar_t * // Parameters : dwError - ?
// Returns : string
-CMStringW sGetErrorString(DWORD dwError)
+CMStringW sGetErrorString(uint32_t dwError)
{
LPVOID lpMsgBuf;
FormatMessage(
@@ -174,7 +174,7 @@ CMStringW sGetErrorString() void LogLastError(const wchar_t *pszError)
{
- DWORD error = GetLastError();
+ uint32_t error = GetLastError();
CMStringW sError = pszError;
@@ -199,7 +199,7 @@ static bool bWriteToFile(HANDLE hFile, const char *pszSrc, int nLen = -1) nLen = (int)mir_strlen(pszSrc);
DWORD dwBytesWritten;
- return WriteFile(hFile, pszSrc, nLen, &dwBytesWritten, nullptr) && (dwBytesWritten == (DWORD)nLen);
+ return WriteFile(hFile, pszSrc, nLen, &dwBytesWritten, nullptr) && (dwBytesWritten == (uint32_t)nLen);
}
@@ -251,7 +251,7 @@ static bool bWriteTextToFile(HANDLE hFile, const char *pszSrc, bool bUtf8File, i // Returns : Returns true if all the data was written to the file
const char szNewLineIndent[] = "\r\n ";
-bool bWriteNewLine(HANDLE hFile, DWORD dwIndent)
+bool bWriteNewLine(HANDLE hFile, uint32_t dwIndent)
{
if (dwIndent > sizeof(szNewLineIndent) - 2)
dwIndent = sizeof(szNewLineIndent) - 2;
@@ -460,7 +460,7 @@ void ReplaceDefines(MCONTACT hContact, wstring &sTarget) ReplaceAll(sTarget, L"%nick%", FileNickFromHandle(hContact));
if (sTarget.find(L"%UIN%") != string::npos) {
- DWORD dwUIN = db_get_dw(hContact, szProto, "UIN", 0);
+ uint32_t dwUIN = db_get_dw(hContact, szProto, "UIN", 0);
wstring sReplaceUin;
if (dwUIN) {
wchar_t sTmp[20];
@@ -779,7 +779,7 @@ static bool ExportDBEventInfo(MCONTACT hContact, HANDLE hFile, const wstring &sF pRoot.push_back(JSONNode("flags", flags));
if (dbei.eventType == EVENTTYPE_FILE) {
- char *p = (char*)dbei.pBlob + sizeof(DWORD);
+ char *p = (char*)dbei.pBlob + sizeof(uint32_t);
ptrW wszFileName(getEventString(dbei, p));
ptrW wszDescr(getEventString(dbei, p));
@@ -824,7 +824,7 @@ static bool ExportDBEventInfo(MCONTACT hContact, HANDLE hFile, const wstring &sF case EVENTTYPE_FILE:
{
- char *p = (char*)dbei.pBlob + sizeof(DWORD);
+ char *p = (char*)dbei.pBlob + sizeof(uint32_t);
ptrW wszFileName(getEventString(dbei, p));
ptrW wszDescr(getEventString(dbei, p));
@@ -860,14 +860,14 @@ static bool ExportDBEventInfo(MCONTACT hContact, HANDLE hFile, const wstring &sF const wchar_t *pszTitle;
char *pszCurBlobPos;
if (dbei.eventType == EVENTTYPE_AUTHREQUEST) { // request
- //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)
nStringCount = 5;
- pszCurBlobPos = (char *)dbei.pBlob + sizeof(DWORD) * 2;
+ pszCurBlobPos = (char *)dbei.pBlob + sizeof(uint32_t) * 2;
pszTitle = LPGENW("The following user made an authorization request:");
}
else { // Added
- //blob is: uin(DWORD), nick(ASCIIZ), first(ASCIIZ), last(ASCIIZ), email(ASCIIZ)
- pszCurBlobPos = (char *)dbei.pBlob + sizeof(DWORD);
+ //blob is: uin(uint32_t), nick(ASCIIZ), first(ASCIIZ), last(ASCIIZ), email(ASCIIZ)
+ pszCurBlobPos = (char *)dbei.pBlob + sizeof(uint32_t);
nStringCount = 4;
pszTitle = LPGENW("The following user added you to their contact list:");
}
@@ -875,7 +875,7 @@ static bool ExportDBEventInfo(MCONTACT hContact, HANDLE hFile, const wstring &sF if (bWriteTextToFile(hFile, pszTitle, bWriteUTF8Format) &&
bWriteNewLine(hFile, nIndent) &&
bWriteTextToFile(hFile, LPGENW("UIN :"), bWriteUTF8Format)) {
- DWORD uin = *((PDWORD)(dbei.pBlob));
+ uint32_t uin = *((PDWORD)(dbei.pBlob));
int n = mir_snwprintf(szTemp, L"%d", uin);
if (bWriteTextToFile(hFile, szTemp, bWriteUTF8Format, n)) {
char *pszEnd = (char *)(dbei.pBlob + sizeof(dbei));
diff --git a/plugins/Msg_Export/src/utils.h b/plugins/Msg_Export/src/utils.h index 7db695bbd9..8e50aeff9a 100755 --- a/plugins/Msg_Export/src/utils.h +++ b/plugins/Msg_Export/src/utils.h @@ -66,7 +66,7 @@ void ReplaceDefines(MCONTACT hContact, wstring &sTarget); void ReplaceTimeVariables(wstring &sRet);
bool bWriteIndentedToFile(HANDLE hFile, int nIndent, const wchar_t *pszSrc, bool bUtf8File);
-bool bWriteNewLine(HANDLE hFile, DWORD dwIndent);
+bool bWriteNewLine(HANDLE hFile, uint32_t dwIndent);
bool bIsUtf8Header(uint8_t *pucByteOrder);
#endif
diff --git a/plugins/MyDetails/src/data.cpp b/plugins/MyDetails/src/data.cpp index b6a4c95ecf..da53008a27 100644 --- a/plugins/MyDetails/src/data.cpp +++ b/plugins/MyDetails/src/data.cpp @@ -80,7 +80,7 @@ void Protocol::lcopystr(wchar_t *dest, wchar_t *src, size_t maxlen) {
if (mir_wstrcmp(dest, src) != 0) {
data_changed = true;
- mir_wstrncpy(dest, src, (DWORD)maxlen);
+ mir_wstrncpy(dest, src, (uint32_t)maxlen);
}
}
diff --git a/plugins/MyDetails/src/frame.cpp b/plugins/MyDetails/src/frame.cpp index 779b71327a..6179262aac 100644 --- a/plugins/MyDetails/src/frame.cpp +++ b/plugins/MyDetails/src/frame.cpp @@ -1463,7 +1463,7 @@ static void ShowProtocolStatusMenu(HWND hwnd, MyDetailsFrameData *data, Protocol TranslateMenu(submenu);
// Hide menu
- DWORD flags = CallProtoService(proto->name, PS_GETCAPS, PFLAGNUM_2, 0);
+ uint32_t flags = CallProtoService(proto->name, PS_GETCAPS, PFLAGNUM_2, 0);
for (int i = GetMenuItemCount(submenu) - 1; i >= 0; i--)
if (!(flags & statusModePf2List[i]))
RemoveMenu(submenu, i, MF_BYPOSITION);
diff --git a/plugins/NewAwaySysMod/src/AwayOpt.cpp b/plugins/NewAwaySysMod/src/AwayOpt.cpp index a6b248ccb7..b12c350604 100644 --- a/plugins/NewAwaySysMod/src/AwayOpt.cpp +++ b/plugins/NewAwaySysMod/src/AwayOpt.cpp @@ -858,7 +858,7 @@ static LRESULT CALLBACK ContactsSubclassProc(HWND hWnd, UINT Msg, WPARAM wParam, {
switch (Msg) {
case WM_LBUTTONDBLCLK:
- DWORD hitFlags;
+ uint32_t hitFlags;
HANDLE hItem = (HANDLE)SendMessage(hWnd, CLM_HITTEST, (WPARAM)&hitFlags, lParam);
if (hItem && (hitFlags & CLCHT_ONITEMEXTRA))
Msg = WM_LBUTTONDOWN; // may be considered as a hack, but it's needed to make clicking on extra icons more convenient
@@ -946,7 +946,7 @@ INT_PTR CALLBACK ContactsOptDlg(HWND hwndDlg, UINT msg, WPARAM, LPARAM lParam) if (nm->iColumn == -1)
break;
- DWORD hitFlags;
+ uint32_t hitFlags;
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_HITTEST, (WPARAM)&hitFlags, MAKELPARAM(nm->pt.x, nm->pt.y));
if (!hItem || !(hitFlags & CLCHT_ONITEMEXTRA))
break;
diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp index cb5dbbd74e..eb50f63ee7 100644 --- a/plugins/NewAwaySysMod/src/AwaySys.cpp +++ b/plugins/NewAwaySysMod/src/AwaySys.cpp @@ -91,7 +91,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SRAWAY /////////////////////////////////////////////////////////////////////////////////////////
-TCString GetDynamicStatMsg(MCONTACT hContact, char *szProto, DWORD UIN, int iStatus)
+TCString GetDynamicStatMsg(MCONTACT hContact, char *szProto, uint32_t UIN, int iStatus)
{
// hContact is the contact that requests the status message
if (hContact != INVALID_CONTACT_ID)
@@ -139,8 +139,8 @@ int StatusChanged(WPARAM wParam, LPARAM lParam) g_fNoProcessing = false; // take it off
return 0;
}
- DWORD Flag1 = 0;
- DWORD Flag3 = 0;
+ uint32_t Flag1 = 0;
+ uint32_t Flag3 = 0;
if (lParam) {
Flag1 = CallProtoService((char*)lParam, PS_GETCAPS, PFLAGNUM_1, 0);
Flag3 = CallProtoService((char*)lParam, PS_GETCAPS, PFLAGNUM_3, 0);
diff --git a/plugins/NewAwaySysMod/src/Client.cpp b/plugins/NewAwaySysMod/src/Client.cpp index b99f28bf58..ad25887e96 100644 --- a/plugins/NewAwaySysMod/src/Client.cpp +++ b/plugins/NewAwaySysMod/src/Client.cpp @@ -33,7 +33,7 @@ void __cdecl UpdateMsgsThreadProc(void *) Thread_SetName("NewAwaySysMod: UpdateMsgsThreadProc");
while (WaitForSingleObject(g_hTerminateUpdateMsgsThread, 0) == WAIT_TIMEOUT && !Miranda_IsTerminated()) {
- DWORD MinUpdateTimeDifference = (DWORD)g_MoreOptPage.GetDBValueCopy(IDC_MOREOPTDLG_UPDATEMSGSPERIOD) * 1000; // in milliseconds
+ uint32_t MinUpdateTimeDifference = (uint32_t)g_MoreOptPage.GetDBValueCopy(IDC_MOREOPTDLG_UPDATEMSGSPERIOD) * 1000; // in milliseconds
for (auto &p : Accounts()) {
if (CallProtoService(p->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND) {
int Status = Proto_GetStatus(p->szModuleName);
diff --git a/plugins/NewAwaySysMod/src/ContactList.cpp b/plugins/NewAwaySysMod/src/ContactList.cpp index e10229465e..43a5dabb66 100644 --- a/plugins/NewAwaySysMod/src/ContactList.cpp +++ b/plugins/NewAwaySysMod/src/ContactList.cpp @@ -499,13 +499,13 @@ int CCList::GetItemType(HTREEITEM hItem) // returns a MCLCIT_ (see below) return (IsHContactInfo(hContact)) ? MCLCIT_INFO : ((IsHContactGroup(hContact)) ? MCLCIT_GROUP : MCLCIT_CONTACT);
}
-DWORD CCList::GetItemTypeAsCLGNFlag(HTREEITEM hItem)
+uint32_t CCList::GetItemTypeAsCLGNFlag(HTREEITEM hItem)
{
MCONTACT hContact = GetItemData(hItem).hContact;
return (IsHContactInfo(hContact)) ? MCLGN_INFO : ((IsHContactGroup(hContact)) ? MCLGN_GROUP : MCLGN_CONTACT);
}
-HTREEITEM CCList::GetNextItem(DWORD Flags, HTREEITEM hItem)
+HTREEITEM CCList::GetNextItem(uint32_t Flags, HTREEITEM hItem)
{
switch (Flags & ~(MCLGN_MULTILEVEL | MCLGN_NOTCHILD | MCLGN_ANY)) {
case MCLGN_ROOT:
diff --git a/plugins/NewAwaySysMod/src/ContactList.h b/plugins/NewAwaySysMod/src/ContactList.h index df629133ee..5ffa8de589 100644 --- a/plugins/NewAwaySysMod/src/ContactList.h +++ b/plugins/NewAwaySysMod/src/ContactList.h @@ -57,7 +57,7 @@ public: void SetExtraImage(HTREEITEM hItem, int iColumn, int iImage); // set iImage to CLC_EXTRAICON_EMPTY to reset image
void SetExtraImageList(HIMAGELIST hImgList);
int GetItemType(HTREEITEM hItem); // returns a MCLCIT_ (see below)
- HTREEITEM GetNextItem(DWORD Flags, HTREEITEM hItem);
+ HTREEITEM GetNextItem(uint32_t Flags, HTREEITEM hItem);
void SortContacts();
MCONTACT GethContact(HTREEITEM hItem); // returns hContact, hGroup or hInfo
HTREEITEM HitTest(LPPOINT pt, PDWORD hitFlags); // pt is relative to control; returns hItem or NULL
@@ -78,7 +78,7 @@ private: HTREEITEM TreeView_GetLastChild(HWND hTreeView, HTREEITEM hItem);
HTREEITEM FindContact(MCONTACT hContact); // returns NULL if not found
void SelectGroups(HTREEITEM hCurItem, bool bSelected);
- DWORD GetItemTypeAsCLGNFlag(HTREEITEM hItem); // returns MCLGN_CONTACT, MCLGN_GROUP or MCLGN_INFO
+ uint32_t GetItemTypeAsCLGNFlag(HTREEITEM hItem); // returns MCLGN_CONTACT, MCLGN_GROUP or MCLGN_INFO
HWND hTreeView;
WNDPROC OrigTreeViewProc;
diff --git a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp index 4338e1f4b6..7851b535db 100644 --- a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp +++ b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp @@ -93,10 +93,10 @@ int IsSRMsgWindowOpen(MCONTACT hContact) class CMetacontactEvent
{
public:
- CMetacontactEvent(MCONTACT hMetaContact, DWORD timestamp, int bMsgWindowIsOpen) : hMetaContact(hMetaContact), timestamp(timestamp), bMsgWindowIsOpen(bMsgWindowIsOpen) {};
+ CMetacontactEvent(MCONTACT hMetaContact, uint32_t timestamp, int bMsgWindowIsOpen) : hMetaContact(hMetaContact), timestamp(timestamp), bMsgWindowIsOpen(bMsgWindowIsOpen) {};
MCONTACT hMetaContact;
- DWORD timestamp;
+ uint32_t timestamp;
int bMsgWindowIsOpen;
};
@@ -119,7 +119,7 @@ int MsgEventAdded(WPARAM hContact, LPARAM lParam) if (!szProto)
return 0;
- DWORD Flags1 = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0);
+ uint32_t Flags1 = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0);
if (!(Flags1 & PF1_IMSEND)) // don't reply to protocols that don't support outgoing messages
return 0;
@@ -131,7 +131,7 @@ int MsgEventAdded(WPARAM hContact, LPARAM lParam) return 0;
// remove outdated events first
- DWORD CurTime = time(0);
+ uint32_t CurTime = time(0);
int i;
for (i = MetacontactEvents.GetSize() - 1; i >= 0; i--)
if (CurTime - MetacontactEvents[i].timestamp > MAX_REPLY_TIMEDIFF)
@@ -153,7 +153,7 @@ int MsgEventAdded(WPARAM hContact, LPARAM lParam) // ugly workaround for metacontacts, part i; store all metacontacts' events to a temporary array, so we'll be able to get the 'source' protocol when subcontact event happens later. we need the protocol to get its status and per-status settings properly
if (!mir_strcmp(szProto, META_PROTO)) {
// remove outdated events first
- DWORD CurTime = time(0);
+ uint32_t CurTime = time(0);
for (int i = MetacontactEvents.GetSize() - 1; i >= 0; i--)
if (CurTime - MetacontactEvents[i].timestamp > MAX_REPLY_TIMEDIFF)
MetacontactEvents.RemoveElem(i);
diff --git a/plugins/NewAwaySysMod/src/Options.cpp b/plugins/NewAwaySysMod/src/Options.cpp index 223b678f81..ee7fa7edbd 100644 --- a/plugins/NewAwaySysMod/src/Options.cpp +++ b/plugins/NewAwaySysMod/src/Options.cpp @@ -352,7 +352,7 @@ void COptItem_TreeCtrl::WndToMem(HWND hWnd) {
HWND hTreeView = GetDlgItem(hWnd, m_dlgItemID);
for (int i = 0; i < m_value.GetSize(); i++) {
- DWORD State = TreeView_GetItemState(hTreeView, m_value[i].hItem, TVIS_EXPANDED | TVIS_STATEIMAGEMASK);
+ uint32_t State = TreeView_GetItemState(hTreeView, m_value[i].hItem, TVIS_EXPANDED | TVIS_STATEIMAGEMASK);
int OldFlags = m_value[i].Flags;
if (State & TVIS_EXPANDED)
m_value[i].Flags |= TIF_EXPANDED;
diff --git a/plugins/NewAwaySysMod/src/Options.h b/plugins/NewAwaySysMod/src/Options.h index c73ba45420..4dd6b22432 100644 --- a/plugins/NewAwaySysMod/src/Options.h +++ b/plugins/NewAwaySysMod/src/Options.h @@ -237,8 +237,8 @@ public: virtual COptItem* Copy() { return new COptItem_Colourpicker(*this); }
- DWORD m_defValue;
- DWORD m_value;
+ uint32_t m_defValue;
+ uint32_t m_value;
};
diff --git a/plugins/NewAwaySysMod/src/Properties.h b/plugins/NewAwaySysMod/src/Properties.h index c17ce00a82..ab6a80596a 100644 --- a/plugins/NewAwaySysMod/src/Properties.h +++ b/plugins/NewAwaySysMod/src/Properties.h @@ -117,13 +117,13 @@ public: return *this;
}
operator TCString() { return CurStatusMsg; }
- DWORD GetUpdateTimeDifference()
+ uint32_t GetUpdateTimeDifference()
{
ULARGE_INTEGER CurTime;
SYSTEMTIME st;
GetLocalTime(&st);
SystemTimeToFileTime(&st, (LPFILETIME)&CurTime);
- return (DWORD)((CurTime.QuadPart - LastUpdateTime.QuadPart) / 10000); // in milliseconds
+ return (uint32_t)((CurTime.QuadPart - LastUpdateTime.QuadPart) / 10000); // in milliseconds
}
private:
TCString CurStatusMsg;
diff --git a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp index 10a6260029..9645eae32e 100644 --- a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp +++ b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp @@ -73,7 +73,7 @@ static LRESULT CALLBACK MsgEditSubclassProc(HWND hWnd, UINT Msg, WPARAM wParam, return 0;
}
if (wParam == 127) { // ctrl-backspace
- DWORD start, end;
+ uint32_t start, end;
SendMessage(hWnd, EM_GETSEL, (WPARAM)&end, NULL);
SendMessage(hWnd, WM_KEYDOWN, VK_LEFT, 0);
SendMessage(hWnd, EM_GETSEL, (WPARAM)&start, NULL);
@@ -130,18 +130,19 @@ static LRESULT CALLBACK SplitterSubclassProc(HWND hWnd, UINT Msg, WPARAM wParam, static LRESULT CALLBACK CListSubclassProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{
CCList *dat = CWndUserData(GetParent(hWnd)).GetCList();
+ DWORD hitFlags;
+
switch (Msg) {
case WM_MOUSEMOVE:
{
- DWORD hitFlags;
POINT pt = { (short)LOWORD(lParam), (short)HIWORD(lParam) };
if (dat->HitTest(&pt, &hitFlags) && hitFlags & MCLCHT_ONITEMEXTRA)
lParam = 0; // reset mouse coordinates, so TreeView's wndproc will not draw any item in a hovered state
}
break;
+
case WM_LBUTTONDOWN:
case WM_LBUTTONDBLCLK:
- DWORD hitFlags;
POINT pt = { (short)LOWORD(lParam), (short)HIWORD(lParam) };
if (dat->HitTest(&pt, &hitFlags) && hitFlags & MCLCHT_ONITEMEXTRA) {
SetFocus(hWnd);
diff --git a/plugins/NewAwaySysMod/src/stdafx.h b/plugins/NewAwaySysMod/src/stdafx.h index c7cab6df0d..26d2ba01f6 100644 --- a/plugins/NewAwaySysMod/src/stdafx.h +++ b/plugins/NewAwaySysMod/src/stdafx.h @@ -230,7 +230,7 @@ struct VAR_PARSE_DATA {
char *szProto;
TCString Message;
- DWORD UIN;
+ uint32_t UIN;
int Flags; // a combination of VPF_ flags
};
@@ -274,7 +274,7 @@ extern bool g_fNoProcessing; extern int g_bIsIdle;
// AwaySys.cpp
-TCString GetDynamicStatMsg(MCONTACT hContact, char *szProto = nullptr, DWORD UIN = 0, int iStatus = 0);
+TCString GetDynamicStatMsg(MCONTACT hContact, char *szProto = nullptr, uint32_t UIN = 0, int iStatus = 0);
// Client.cpp
void InitUpdateMsgs();
diff --git a/plugins/NewEventNotify/src/options.cpp b/plugins/NewEventNotify/src/options.cpp index a434392cfe..9bb9d51fdb 100644 --- a/plugins/NewEventNotify/src/options.cpp +++ b/plugins/NewEventNotify/src/options.cpp @@ -209,9 +209,9 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hWnd, UINT message, WPARAM wParam, L g_plugin.bMenuitem = IsDlgButtonChecked(hWnd, IDC_CHKMENUITEM);
g_plugin.bDisable = IsDlgButtonChecked(hWnd, IDC_CHKDISABLE);
g_plugin.bPreview = IsDlgButtonChecked(hWnd, IDC_CHKPREVIEW);
- g_plugin.iDelayMsg = IsDlgButtonChecked(hWnd, IDC_CHKINFINITE_MESSAGE) ? -1 : (DWORD)GetDlgItemInt(hWnd, IDC_DELAY_MESSAGE, nullptr, FALSE);
- g_plugin.iDelayFile = IsDlgButtonChecked(hWnd, IDC_CHKINFINITE_FILE) ? -1 : (DWORD)GetDlgItemInt(hWnd, IDC_DELAY_FILE, nullptr, FALSE);
- g_plugin.iDelayOthers = IsDlgButtonChecked(hWnd, IDC_CHKINFINITE_OTHERS) ? -1 : (DWORD)GetDlgItemInt(hWnd, IDC_DELAY_OTHERS, nullptr, FALSE);
+ g_plugin.iDelayMsg = IsDlgButtonChecked(hWnd, IDC_CHKINFINITE_MESSAGE) ? -1 : (uint32_t)GetDlgItemInt(hWnd, IDC_DELAY_MESSAGE, nullptr, FALSE);
+ g_plugin.iDelayFile = IsDlgButtonChecked(hWnd, IDC_CHKINFINITE_FILE) ? -1 : (uint32_t)GetDlgItemInt(hWnd, IDC_DELAY_FILE, nullptr, FALSE);
+ g_plugin.iDelayOthers = IsDlgButtonChecked(hWnd, IDC_CHKINFINITE_OTHERS) ? -1 : (uint32_t)GetDlgItemInt(hWnd, IDC_DELAY_OTHERS, nullptr, FALSE);
g_plugin.bMergePopup = IsDlgButtonChecked(hWnd, IDC_CHKMERGEPOPUP);
g_plugin.bMsgWindowCheck = IsDlgButtonChecked(hWnd, IDC_CHKWINDOWCHECK);
g_plugin.bMsgReplyWindow = IsDlgButtonChecked(hWnd, IDC_CHKREPLYWINDOW);
diff --git a/plugins/NewEventNotify/src/popup.cpp b/plugins/NewEventNotify/src/popup.cpp index b2bd6190f0..6fdb090a42 100644 --- a/plugins/NewEventNotify/src/popup.cpp +++ b/plugins/NewEventNotify/src/popup.cpp @@ -191,7 +191,7 @@ static wchar_t* GetEventPreview(DBEVENTINFO *dbei) case EVENTTYPE_FILE:
if (dbei->pBlob) {
- char *p = (char*)dbei->pBlob + sizeof(DWORD);
+ char *p = (char*)dbei->pBlob + sizeof(uint32_t);
// filenames
comment2 = (dbei->flags & DBEF_UTF) ? mir_utf8decodeW(p) : mir_a2u(p);
p += mir_strlen(p) + 1;
@@ -229,8 +229,8 @@ static wchar_t* GetEventPreview(DBEVENTINFO *dbei) case EVENTTYPE_ADDED:
// blob format is:
- // DWORD numeric uin (ICQ only afaik)
- // DWORD HANDLE to contact
+ // uint32_t numeric uin (ICQ only afaik)
+ // uint32_t HANDLE to contact
// ASCIIZ nick (or text UID)
// ASCIIZ first name
// ASCIIZ last name
@@ -244,7 +244,7 @@ static wchar_t* GetEventPreview(DBEVENTINFO *dbei) char *pszLast = pszFirst + mir_strlen(pszFirst) + 1;
char *pszEmail = pszLast + mir_strlen(pszLast) + 1;
- mir_snprintf(szUin, "%d", *((DWORD*)dbei->pBlob));
+ mir_snprintf(szUin, "%d", *((uint32_t*)dbei->pBlob));
if (mir_strlen(pszNick) > 0) {
if (dbei->flags & DBEF_UTF)
szNick = mir_utf8decodeW(pszNick);
@@ -257,7 +257,7 @@ static wchar_t* GetEventPreview(DBEVENTINFO *dbei) else
szNick = mir_a2u(pszEmail);
}
- else if (*((DWORD*)dbei->pBlob) > 0)
+ else if (*((uint32_t*)dbei->pBlob) > 0)
szNick = mir_a2u(szUin);
if (szNick) {
diff --git a/plugins/NewStory/src/history.cpp b/plugins/NewStory/src/history.cpp index 96357f5366..1f07f11105 100644 --- a/plugins/NewStory/src/history.cpp +++ b/plugins/NewStory/src/history.cpp @@ -129,7 +129,7 @@ class CHistoryDlg : public CDlgBase bool disableTimeTreeChange = false; // window flags - DWORD m_dwOptions = 0; + uint32_t m_dwOptions = 0; // toolbar buttons HWND m_hwndBtnToolbar[TBTN_COUNT]; @@ -878,7 +878,7 @@ public: /* GetWindowRect(GetDlgItem(m_hwnd, LOWORD(wParam)), &rc); - // DWORD itemID = 0; + // uint32_t itemID = 0; bool doFilter = true; switch (TrackPopupMenu(GetSubMenu(hMenu, 1), TPM_RETURNCMD, rc.left, rc.bottom, 0, m_hwnd, NULL)) { diff --git a/plugins/NewStory/src/history_array.cpp b/plugins/NewStory/src/history_array.cpp index 3b289dc110..6ce9ed2116 100644 --- a/plugins/NewStory/src/history_array.cpp +++ b/plugins/NewStory/src/history_array.cpp @@ -66,7 +66,7 @@ bool ItemData::isLink(POINT pt) const CHARFORMAT2 cf = {}; cf.cbSize = sizeof(cf); cf.dwMask = CFM_LINK; - DWORD res = MTextSendMessage(0, data, EM_GETCHARFORMAT, SCF_SELECTION, LPARAM(&cf)); + uint32_t res = MTextSendMessage(0, data, EM_GETCHARFORMAT, SCF_SELECTION, LPARAM(&cf)); return ((res & CFM_LINK) && (cf.dwEffects & CFE_LINK)) || ((res & CFM_REVISED) && (cf.dwEffects & CFE_REVISED)); } diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp index 9417843ffc..bf292ba1b7 100644 --- a/plugins/NewStory/src/history_control.cpp +++ b/plugins/NewStory/src/history_control.cpp @@ -122,7 +122,7 @@ struct NewstoryListData : public MZeroedObject int fontid, colorid; item->getFontColor(fontid, colorid); - DWORD dwStyle = WS_CHILD | WS_BORDER | ES_MULTILINE | ES_AUTOVSCROLL; + uint32_t dwStyle = WS_CHILD | WS_BORDER | ES_MULTILINE | ES_AUTOVSCROLL; if (bReadOnly) dwStyle |= ES_READONLY; diff --git a/plugins/NewStory/src/options.cpp b/plugins/NewStory/src/options.cpp index 1daf9e065e..ca65c3654b 100644 --- a/plugins/NewStory/src/options.cpp +++ b/plugins/NewStory/src/options.cpp @@ -90,7 +90,7 @@ public: DBEVENTINFO dbei = {}; dbei.pBlob = (uint8_t *)"The quick brown fox jumps over the lazy dog"; - dbei.cbBlob = (DWORD)strlen((char *)dbei.pBlob); + dbei.cbBlob = (uint32_t)strlen((char *)dbei.pBlob); dbei.flags = DBEF_TEMPORARY; dbei.eventType = EVENTTYPE_MESSAGE; dbei.timestamp = time(0); diff --git a/plugins/NewStory/src/utils.cpp b/plugins/NewStory/src/utils.cpp index a112d23514..4102ab3887 100644 --- a/plugins/NewStory/src/utils.cpp +++ b/plugins/NewStory/src/utils.cpp @@ -1,6 +1,6 @@ #include "stdafx.h" -DWORD toggleBit(DWORD dw, DWORD bit) +uint32_t toggleBit(uint32_t dw, uint32_t bit) { if (dw & bit) return dw & ~bit; diff --git a/plugins/NewStory/src/utils.h b/plugins/NewStory/src/utils.h index 3b558bda94..903134dc4b 100644 --- a/plugins/NewStory/src/utils.h +++ b/plugins/NewStory/src/utils.h @@ -1,4 +1,4 @@ -DWORD toggleBit(DWORD dw, DWORD bit); +uint32_t toggleBit(uint32_t dw, uint32_t bit); bool CheckFilter(wchar_t *buf, wchar_t *filter); void CopyText(HWND hwnd, const wchar_t *text); diff --git a/plugins/NewXstatusNotify/src/indsnd.cpp b/plugins/NewXstatusNotify/src/indsnd.cpp index 8b5fe47e8f..2cbf75bd2d 100644 --- a/plugins/NewXstatusNotify/src/indsnd.cpp +++ b/plugins/NewXstatusNotify/src/indsnd.cpp @@ -63,7 +63,7 @@ wchar_t *SelectSound(HWND hwndDlg, wchar_t *buff, size_t bufflen) OPENFILENAME ofn = { 0 };
HWND hList = GetDlgItem(hwndDlg, IDC_INDSNDLIST);
- ListView_GetItemText(hList, ListView_GetNextItem(hList, -1, LVNI_SELECTED), 1, buff, (DWORD)bufflen);
+ ListView_GetItemText(hList, ListView_GetNextItem(hList, -1, LVNI_SELECTED), 1, buff, (uint32_t)bufflen);
if (!mir_wstrcmp(buff, TranslateW(DEFAULT_SOUND)))
buff = nullptr;
@@ -478,7 +478,7 @@ INT_PTR CALLBACK DlgProcFiltering(HWND hwndDlg, UINT msg, WPARAM, LPARAM lParam) case NM_CLICK:
{
NMCLISTCONTROL *nm = (NMCLISTCONTROL *)lParam;
- DWORD hitFlags;
+ uint32_t hitFlags;
// Make sure we have an extra column
if (nm->iColumn == -1)
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index 27bee1fdd9..4b195b0982 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -271,11 +271,11 @@ void LogSMsgToDB(STATUSMSGINFO *smi, const wchar_t *tmplt) T2Utf blob(str);
DBEVENTINFO dbei = {};
- dbei.cbBlob = (DWORD)mir_strlen(blob) + 1;
+ dbei.cbBlob = (uint32_t)mir_strlen(blob) + 1;
dbei.pBlob = (uint8_t*)blob;
dbei.eventType = EVENTTYPE_STATUSCHANGE;
dbei.flags = DBEF_READ | DBEF_UTF;
- dbei.timestamp = (DWORD)time(0);
+ dbei.timestamp = (uint32_t)time(0);
dbei.szModule = MODULENAME;
MEVENT hDBEvent = db_event_add(smi->hContact, &dbei);
@@ -355,11 +355,11 @@ int ContactStatusChanged(MCONTACT hContact, uint16_t oldStatus, uint16_t newStat T2Utf blob(stzStatusText);
DBEVENTINFO dbei = {};
- dbei.cbBlob = (DWORD)mir_strlen(blob) + 1;
+ dbei.cbBlob = (uint32_t)mir_strlen(blob) + 1;
dbei.pBlob = (uint8_t*)blob;
dbei.eventType = EVENTTYPE_STATUSCHANGE;
dbei.flags = DBEF_READ | DBEF_UTF;
- dbei.timestamp = (DWORD)time(0);
+ dbei.timestamp = (uint32_t)time(0);
dbei.szModule = MODULENAME;
MEVENT hDBEvent = db_event_add(hContact, &dbei);
diff --git a/plugins/NewXstatusNotify/src/options.cpp b/plugins/NewXstatusNotify/src/options.cpp index 6712414044..ca81fac8ba 100644 --- a/plugins/NewXstatusNotify/src/options.cpp +++ b/plugins/NewXstatusNotify/src/options.cpp @@ -412,7 +412,7 @@ INT_PTR CALLBACK DlgProcPopupOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM case WM_NOTIFY:
if (((LPNMHDR)lParam)->code == PSN_APPLY) {
char str[8];
- DWORD ctlColour = 0;
+ uint32_t ctlColour = 0;
for (int i = ID_STATUS_MIN; i <= ID_STATUS_MAX2; i++) {
ctlColour = SendDlgItemMessage(hwndDlg, (i + 2000), CPM_GETCOLOUR, 0, 0);
StatusList[Index(i)].colorBack = SendDlgItemMessage(hwndDlg, (i + 2000), CPM_GETCOLOUR, 0, 0);
diff --git a/plugins/NewXstatusNotify/src/options.h b/plugins/NewXstatusNotify/src/options.h index 41c8c2db78..1becf69abf 100644 --- a/plugins/NewXstatusNotify/src/options.h +++ b/plugins/NewXstatusNotify/src/options.h @@ -40,7 +40,7 @@ typedef struct tagOPTIONS { uint8_t PXOnConnect;
uint8_t PXDisableForMusic;
uint8_t PXMsgTruncate;
- DWORD PXMsgLen;
+ uint32_t PXMsgLen;
// IDD_OPT_GENERAL
uint8_t FromOffline;
uint8_t AutoDisable;
@@ -73,7 +73,7 @@ typedef struct tagOPTIONS { // IDD_OPT_SMPOPUP
uint8_t PSMsgOnConnect;
uint8_t PSMsgTruncate;
- DWORD PSMsgLen;
+ uint32_t PSMsgLen;
// OTHER
uint8_t TempDisabled;
uint8_t PopupAutoDisabled;
diff --git a/plugins/NewXstatusNotify/src/xstatus.cpp b/plugins/NewXstatusNotify/src/xstatus.cpp index 1338e1d031..292de34fd7 100644 --- a/plugins/NewXstatusNotify/src/xstatus.cpp +++ b/plugins/NewXstatusNotify/src/xstatus.cpp @@ -288,11 +288,11 @@ void LogChangeToDB(XSTATUSCHANGE *xsc) T2Utf blob(stzLogText);
DBEVENTINFO dbei = {};
- dbei.cbBlob = (DWORD)mir_strlen(blob) + 1;
+ dbei.cbBlob = (uint32_t)mir_strlen(blob) + 1;
dbei.pBlob = (uint8_t*)(char*)blob;
dbei.eventType = EVENTTYPE_STATUSCHANGE;
dbei.flags = DBEF_READ | DBEF_UTF;
- dbei.timestamp = (DWORD)time(0);
+ dbei.timestamp = (uint32_t)time(0);
dbei.szModule = MODULENAME;
MEVENT hDBEvent = db_event_add(xsc->hContact, &dbei);
diff --git a/plugins/New_GPG/src/gpg_wrapper.h b/plugins/New_GPG/src/gpg_wrapper.h index 8eb39a6d41..1a428804ab 100644 --- a/plugins/New_GPG/src/gpg_wrapper.h +++ b/plugins/New_GPG/src/gpg_wrapper.h @@ -39,7 +39,7 @@ struct gpg_execution_params std::vector<std::wstring> aargv; CMStringA out; - DWORD code = 0; + uint32_t code = 0; int bNoOutput = false; pxResult result = pxSuccess; boost::process::child *child = nullptr; diff --git a/plugins/New_GPG/src/main.cpp b/plugins/New_GPG/src/main.cpp index 99a1143a64..e2bbae74f4 100755 --- a/plugins/New_GPG/src/main.cpp +++ b/plugins/New_GPG/src/main.cpp @@ -407,7 +407,7 @@ void InitCheck() } { CMStringW path(g_plugin.getMStringW("szHomePath")); - DWORD dwFileAttr = GetFileAttributes(path); + uint32_t dwFileAttr = GetFileAttributes(path); if (dwFileAttr != INVALID_FILE_ATTRIBUTES) { dwFileAttr &= ~FILE_ATTRIBUTE_READONLY; SetFileAttributes(path, dwFileAttr); diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp index 2d0ac82b36..e14fa6bc19 100755 --- a/plugins/New_GPG/src/messages.cpp +++ b/plugins/New_GPG/src/messages.cpp @@ -20,7 +20,7 @@ std::list<HANDLE> sent_msgs; struct RecvParams { - RecvParams(MCONTACT _p1, std::wstring _p2, const char *_p3, DWORD _p4) : + RecvParams(MCONTACT _p1, std::wstring _p2, const char *_p3, uint32_t _p4) : hContact(_p1), str(_p2), msg(_p3), @@ -30,7 +30,7 @@ struct RecvParams MCONTACT hContact; std::wstring str; std::string msg; - DWORD timestamp; + uint32_t timestamp; }; static void RecvMsgSvc_func(RecvParams *param) @@ -501,7 +501,7 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l) return 0; } -void SendMsgSvc_func(MCONTACT hContact, char *msg, DWORD flags) +void SendMsgSvc_func(MCONTACT hContact, char *msg, uint32_t flags) { string str = msg; if (g_plugin.bStripTags && g_plugin.bAppendTags) { @@ -762,7 +762,7 @@ int HookSendMsg(WPARAM w, LPARAM l) str_event.insert(0, toUTF8(globals.wszOutopentag.c_str())); str_event.append(toUTF8(globals.wszOutclosetag.c_str())); dbei->pBlob = (uint8_t*)mir_strdup(str_event.c_str()); - dbei->cbBlob = (DWORD)str_event.length() + 1; + dbei->cbBlob = (uint32_t)str_event.length() + 1; } return 0; diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp index e8f3ad030e..62f6d16a69 100755 --- a/plugins/New_GPG/src/utilities.cpp +++ b/plugins/New_GPG/src/utilities.cpp @@ -469,25 +469,25 @@ INT_PTR onSendFile(WPARAM w, LPARAM l) return Proto_ChainSend(w, ccs); } -void HistoryLog(MCONTACT hContact, const char *msg, DWORD _time, DWORD flags) +void HistoryLog(MCONTACT hContact, const char *msg, uint32_t _time, uint32_t flags) { DBEVENTINFO dbei = {}; dbei.szModule = MODULENAME; dbei.flags = DBEF_UTF | flags; - dbei.timestamp = (_time) ? _time : (DWORD)time(0); - dbei.cbBlob = (DWORD)mir_strlen(msg) + 1; + dbei.timestamp = (_time) ? _time : (uint32_t)time(0); + dbei.cbBlob = (uint32_t)mir_strlen(msg) + 1; dbei.pBlob = (uint8_t*)msg; db_event_add(hContact, &dbei); } -static int ControlAddStringUtf(HWND ctrl, DWORD msg, const wchar_t *szString) +static int ControlAddStringUtf(HWND ctrl, uint32_t msg, const wchar_t *szString) { int item = -1; item = SendMessage(ctrl, msg, 0, (LPARAM)szString); return item; } -int ComboBoxAddStringUtf(HWND hCombo, const wchar_t *szString, DWORD data) +int ComboBoxAddStringUtf(HWND hCombo, const wchar_t *szString, uint32_t data) { int item = ControlAddStringUtf(hCombo, CB_ADDSTRING, szString); SendMessage(hCombo, CB_SETITEMDATA, item, data); @@ -867,8 +867,8 @@ const bool StriStr(const char *str, const char *substr) char *str_up = NEWTSTR_MALLOC(str); char *substr_up = NEWTSTR_MALLOC(substr); - CharUpperBuffA(str_up, (DWORD)mir_strlen(str_up)); - CharUpperBuffA(substr_up, (DWORD)mir_strlen(substr_up)); + CharUpperBuffA(str_up, (uint32_t)mir_strlen(str_up)); + CharUpperBuffA(substr_up, (uint32_t)mir_strlen(substr_up)); if (strstr(str_up, substr_up)) i = true; @@ -1334,7 +1334,7 @@ bool gpg_validate_paths(wchar_t *gpg_bin_path, wchar_t *gpg_home_path) } { CMStringW path = g_plugin.getMStringW("szHomePath"); - DWORD dwFileAttr = GetFileAttributes(path); + uint32_t dwFileAttr = GetFileAttributes(path); if (dwFileAttr != INVALID_FILE_ATTRIBUTES) { dwFileAttr &= ~FILE_ATTRIBUTE_READONLY; SetFileAttributes(path, dwFileAttr); diff --git a/plugins/New_GPG/src/utilities.h b/plugins/New_GPG/src/utilities.h index 748225669a..5da77a2fdd 100755 --- a/plugins/New_GPG/src/utilities.h +++ b/plugins/New_GPG/src/utilities.h @@ -25,7 +25,7 @@ void setSrmmIcon(MCONTACT); void send_encrypted_msgs_thread(void*); -int ComboBoxAddStringUtf(HWND hCombo, const wchar_t *szString, DWORD data); +int ComboBoxAddStringUtf(HWND hCombo, const wchar_t *szString, uint32_t data); bool isContactSecured(MCONTACT hContact); bool isContactHaveKey(MCONTACT hContact); bool isGPGKeyExist(); @@ -41,7 +41,7 @@ string toUTF8(wstring str); wstring toUTF16(string str); string get_random(int length); -void HistoryLog(MCONTACT, const char *msg, DWORD _time = 0, DWORD _flags = 0); +void HistoryLog(MCONTACT, const char *msg, uint32_t _time = 0, uint32_t _flags = 0); void fix_line_term(std::string &s); void strip_line_term(std::wstring &s); void strip_line_term(std::string &s); diff --git a/plugins/NoHistory/src/options.cpp b/plugins/NoHistory/src/options.cpp index f6ec5a1fda..dd613dc0ae 100644 --- a/plugins/NoHistory/src/options.cpp +++ b/plugins/NoHistory/src/options.cpp @@ -172,7 +172,7 @@ public: return;
// Find clicked item
- DWORD hitFlags;
+ uint32_t hitFlags;
HANDLE hItem = clist.HitTest(nm->pt.x, nm->pt.y, &hitFlags);
if (hItem == nullptr || !(hitFlags & CLCHT_ONITEMEXTRA))
return;
diff --git a/plugins/NoHistory/src/options.h b/plugins/NoHistory/src/options.h index 921661cd7a..3fe3a6b016 100644 --- a/plugins/NoHistory/src/options.h +++ b/plugins/NoHistory/src/options.h @@ -1,7 +1,7 @@ #ifndef _OPTIONS_INC
#define _OPTIONS_INC
-extern DWORD event_timeout;
+extern uint32_t event_timeout;
int OptInit(WPARAM, LPARAM);
diff --git a/plugins/NotesAndReminders/src/miscutils.cpp b/plugins/NotesAndReminders/src/miscutils.cpp index c03ae641d0..f7e41d3b6a 100644 --- a/plugins/NotesAndReminders/src/miscutils.cpp +++ b/plugins/NotesAndReminders/src/miscutils.cpp @@ -28,7 +28,7 @@ unsigned long WS_ResolveName(char *name, uint16_t *port, int defaultPort) free(nameCopy);
return *(u_long*)lk->h_addr_list[0];
}
- DWORD ret = inet_addr(nameCopy);
+ uint32_t ret = inet_addr(nameCopy);
free(nameCopy);
return ret;
}
diff --git a/plugins/NotesAndReminders/src/notes.cpp b/plugins/NotesAndReminders/src/notes.cpp index c267e4c3f7..d717730fb8 100644 --- a/plugins/NotesAndReminders/src/notes.cpp +++ b/plugins/NotesAndReminders/src/notes.cpp @@ -76,8 +76,8 @@ struct STICKYNOTE : public MZeroedObject ULONGLONG ID; // FILETIME in UTC wchar_t *pwszTitle; BOOL CustomTitle; - DWORD BgColor; // custom bg color override (only valid if non-zero) - DWORD FgColor; // custom fg/text color override (only valid if non-zero) + uint32_t BgColor; // custom bg color override (only valid if non-zero) + uint32_t FgColor; // custom fg/text color override (only valid if non-zero) STICKYNOTEFONT *pCustomFont;// custom (body) font override (NULL if default font is used) ~STICKYNOTE() @@ -102,9 +102,9 @@ static class CNotesListDlg *pListDialog; COLORREF GetCaptionColor(COLORREF bodyClr) { - const DWORD r = ((bodyClr & 0xff) * 4) / 5; - const DWORD g = (((bodyClr & 0xff00) * 4) / 5) & 0xff00; - const DWORD b = (((bodyClr & 0xff0000) * 4) / 5) & 0xff0000; + const uint32_t r = ((bodyClr & 0xff) * 4) / 5; + const uint32_t g = (((bodyClr & 0xff00) * 4) / 5) & 0xff00; + const uint32_t b = (((bodyClr & 0xff0000) * 4) / 5) & 0xff0000; return (COLORREF)(r | g | b); } @@ -261,7 +261,7 @@ static void JustSaveNotes(STICKYNOTE *pModified = nullptr) int TH = wp.rcNormalPosition.bottom - wp.rcNormalPosition.top; // set flags - DWORD flags = 0; + uint32_t flags = 0; if (pNote->bVisible) flags |= 1; if (pNote->bOnTop) flags |= 2; @@ -586,7 +586,7 @@ LRESULT CALLBACK StickyNoteWndProc(HWND hdlg, UINT message, WPARAM wParam, LPARA case WM_CREATE: { CREATESTRUCT *CS = (CREATESTRUCT *)lParam; - DWORD mystyle; + uint32_t mystyle; SN = (STICKYNOTE*)CS->lpCreateParams; SetPropA(hdlg, "ctrldata", (HANDLE)SN); @@ -1055,7 +1055,7 @@ static STICKYNOTE* NewNoteEx(int Ax, int Ay, int Aw, int Ah, const wchar_t *pwsz { WNDCLASSEX TWC = {0}; WINDOWPLACEMENT TWP; - DWORD L1, L2; + uint32_t L1, L2; SYSTEMTIME tm; const BOOL bIsStartup = bVisible & 0x10000; @@ -1206,7 +1206,7 @@ static void LoadNote(char *Value, bool bIsStartup) } BOOL bVisible = 0, bOnTop = 0; - DWORD flags = strtoul(TVal, nullptr, 16); + uint32_t flags = strtoul(TVal, nullptr, 16); if (flags & 1) bVisible = TRUE; if (flags & 2) diff --git a/plugins/NotesAndReminders/src/reminders.cpp b/plugins/NotesAndReminders/src/reminders.cpp index 36eb94843a..f047751a6b 100644 --- a/plugins/NotesAndReminders/src/reminders.cpp +++ b/plugins/NotesAndReminders/src/reminders.cpp @@ -20,7 +20,7 @@ static void RemoveReminderSystemEvent(struct REMINDERDATA *p); struct REMINDERDATA : public MZeroedObject
{
HWND handle;
- DWORD uid;
+ uint32_t uid;
CMStringW wszText;
ULONGLONG When; // FILETIME in UTC
UINT RepeatSound;
@@ -82,7 +82,7 @@ void TzLocalSTToFileTime(const SYSTEMTIME *tmLocal, FILETIME *lpUtc) SystemTimeToFileTime(&tm, lpUtc);
}
-static REMINDERDATA* FindReminder(DWORD uid)
+static REMINDERDATA* FindReminder(uint32_t uid)
{
for (auto &pReminder : arReminders)
if (pReminder->uid == uid)
@@ -98,13 +98,13 @@ static void InsertReminder(REMINDERDATA *p) arReminders.insert(p);
}
-static DWORD CreateUid()
+static uint32_t CreateUid()
{
if (!arReminders.getCount())
return 1;
// check existing reminders if uid is in use
- for (DWORD uid = 1;; uid++)
+ for (uint32_t uid = 1;; uid++)
if (!FindReminder(uid)) // uid in use
return uid;
}
@@ -359,9 +359,9 @@ static void Skin_PlaySoundPoly(LPCSTR pszSoundName) }
}
-static void UpdateReminderEvent(REMINDERDATA *pReminder, UINT nElapsedSeconds, DWORD *pHasPlayedSound)
+static void UpdateReminderEvent(REMINDERDATA *pReminder, UINT nElapsedSeconds, uint32_t *pHasPlayedSound)
{
- DWORD dwSoundMask;
+ uint32_t dwSoundMask;
if (pReminder->RepeatSound) {
if (nElapsedSeconds >= pReminder->RepeatSoundTTL) {
@@ -384,7 +384,7 @@ static void UpdateReminderEvent(REMINDERDATA *pReminder, UINT nElapsedSeconds, D }
}
-static void FireReminder(REMINDERDATA *pReminder, DWORD *pHasPlayedSound)
+static void FireReminder(REMINDERDATA *pReminder, uint32_t *pHasPlayedSound)
{
if (pReminder->bSystemEventQueued)
return;
@@ -404,7 +404,7 @@ static void FireReminder(REMINDERDATA *pReminder, DWORD *pHasPlayedSound) if (pReminder->SoundSel < 0) // sound disabled
return;
- DWORD dwSoundMask = 1 << pReminder->SoundSel;
+ uint32_t dwSoundMask = 1 << pReminder->SoundSel;
pReminder->RepeatSoundTTL = pReminder->RepeatSound;
@@ -738,7 +738,7 @@ protected: // tweak style of picker
if (IsWinVerVistaPlus()) {
- DWORD dw = m_date.SendMsg(DTM_GETMCSTYLE, 0, 0);
+ uint32_t dw = m_date.SendMsg(DTM_GETMCSTYLE, 0, 0);
dw |= MCS_WEEKNUMBERS | MCS_NOSELCHANGEONNAV;
m_date.SendMsg(DTM_SETMCSTYLE, 0, dw);
}
@@ -1267,7 +1267,7 @@ INT_PTR OpenTriggeredReminder(WPARAM, LPARAM l) l = ((CLISTEVENT*)l)->lParam;
- REMINDERDATA *pReminder = (REMINDERDATA*)FindReminder((DWORD)l);
+ REMINDERDATA *pReminder = (REMINDERDATA*)FindReminder((uint32_t)l);
if (!pReminder || !pReminder->bSystemEventQueued)
return 0;
@@ -1785,7 +1785,7 @@ bool CheckRemindersAndStart(void) bool bResult = false;
// var used to avoid playing multiple alarm sounds during a single update
- DWORD bHasPlayedSound = 0;
+ uint32_t bHasPlayedSound = 0;
// if there are queued (triggered) reminders then iterate through entire list, becaue of WM_TIMECHANGE events
// and for example daylight saving changes it's possible for an already triggered event to end up with When>curT
diff --git a/plugins/NotifyAnything/src/main.cpp b/plugins/NotifyAnything/src/main.cpp index bcfee4a9b3..55d2530b61 100644 --- a/plugins/NotifyAnything/src/main.cpp +++ b/plugins/NotifyAnything/src/main.cpp @@ -924,12 +924,12 @@ void __cdecl udptcpThreadFunc(void *useUdp) std::string t = err;
t += "\nWSAGetLastError: ";
- DWORD ec = WSAGetLastError();
+ uint32_t ec = WSAGetLastError();
char buf[4096];
mir_strcpy(buf, Translate("NotifyAnything: Failed to format error message"));
- DWORD fm = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
+ uint32_t fm = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
nullptr, ec, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), buf, 4096, nullptr);
if (!fm) {
diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp index d9957a0fff..8dbf4c33a2 100644 --- a/plugins/Nudge/src/main.cpp +++ b/plugins/Nudge/src/main.cpp @@ -94,8 +94,8 @@ static int NudgeReceived(WPARAM hContact, LPARAM lParam) {
char *protoName = Proto_GetBaseAccountName(hContact);
- DWORD currentTimestamp = time(0);
- DWORD nudgeSentTimestamp = lParam ? (DWORD)lParam : currentTimestamp;
+ uint32_t currentTimestamp = time(0);
+ uint32_t nudgeSentTimestamp = lParam ? (uint32_t)lParam : currentTimestamp;
int diff = currentTimestamp - db_get_dw(hContact, "Nudge", "LastReceived", currentTimestamp - 30);
int diff2 = nudgeSentTimestamp - db_get_dw(hContact, "Nudge", "LastReceived2", nudgeSentTimestamp - 30);
@@ -155,7 +155,7 @@ static int NudgeReceived(WPARAM hContact, LPARAM lParam) if (DefaultNudge.useIgnoreSettings && Ignore_IsIgnored(hContact, IGNOREEVENT_USERONLINE))
return 0;
- DWORD Status = CallService(MS_CLIST_GETSTATUSMODE, 0, 0);
+ uint32_t Status = CallService(MS_CLIST_GETSTATUSMODE, 0, 0);
if (((DefaultNudge.statusFlags & NUDGE_ACC_ST0) && (Status <= ID_STATUS_OFFLINE)) ||
((DefaultNudge.statusFlags & NUDGE_ACC_ST1) && (Status == ID_STATUS_ONLINE)) ||
((DefaultNudge.statusFlags & NUDGE_ACC_ST2) && (Status == ID_STATUS_AWAY)) ||
@@ -288,14 +288,14 @@ void Nudge_SentStatus(CNudgeElement *n, MCONTACT hContact) DBEVENTINFO dbei = {};
dbei.szModule = MODULENAME;
dbei.flags = DBEF_SENT | DBEF_UTF;
- dbei.timestamp = (DWORD)time(0);
+ dbei.timestamp = (uint32_t)time(0);
dbei.eventType = 1;
- dbei.cbBlob = (DWORD)mir_strlen(buff) + 1;
+ dbei.cbBlob = (uint32_t)mir_strlen(buff) + 1;
dbei.pBlob = (uint8_t*)buff;
db_event_add(hContact, &dbei);
}
-void Nudge_ShowStatus(CNudgeElement *n, MCONTACT hContact, DWORD timestamp)
+void Nudge_ShowStatus(CNudgeElement *n, MCONTACT hContact, uint32_t timestamp)
{
T2Utf buff(n->recText);
@@ -304,7 +304,7 @@ void Nudge_ShowStatus(CNudgeElement *n, MCONTACT hContact, DWORD timestamp) dbei.eventType = 1;
dbei.flags = DBEF_UTF;
dbei.timestamp = timestamp;
- dbei.cbBlob = (DWORD)mir_strlen(buff) + 1;
+ dbei.cbBlob = (uint32_t)mir_strlen(buff) + 1;
dbei.pBlob = (uint8_t*)buff;
db_event_add(hContact, &dbei);
}
diff --git a/plugins/Nudge/src/nudge.h b/plugins/Nudge/src/nudge.h index 8b48a3ccf8..899b83b4b8 100644 --- a/plugins/Nudge/src/nudge.h +++ b/plugins/Nudge/src/nudge.h @@ -42,7 +42,7 @@ struct CNudgeElement : public MZeroedObject bool shakeChat;
bool enabled;
bool autoResend;
- DWORD statusFlags;
+ uint32_t statusFlags;
int iProtoNumber;
HANDLE hEvent;
diff --git a/plugins/Nudge/src/options.cpp b/plugins/Nudge/src/options.cpp index fada736a01..daede3ec81 100644 --- a/plugins/Nudge/src/options.cpp +++ b/plugins/Nudge/src/options.cpp @@ -125,7 +125,7 @@ static INT_PTR CALLBACK DlgProcShakeOpt(HWND hwnd,UINT msg,WPARAM wParam,LPARAM || (HWND)lParam == GetDlgItem(hwnd, IDC_SSCALE_CLIST) || (HWND)lParam == GetDlgItem(hwnd, IDC_SSCALE_CHAT))
{
wchar_t szBuf[20];
- DWORD dwPos = SendMessage((HWND)lParam, TBM_GETPOS, 0, 0);
+ uint32_t dwPos = SendMessage((HWND)lParam, TBM_GETPOS, 0, 0);
mir_snwprintf(szBuf, L"%d", dwPos);
if ((HWND)lParam == GetDlgItem(hwnd, IDC_SNUMBER_CLIST))
SetDlgItemText(hwnd, IDC_LNUMBER_CLIST, szBuf);
@@ -334,7 +334,7 @@ static INT_PTR CALLBACK DlgProcNudgeOpt(HWND hwnd, UINT msg, WPARAM wParam, LPAR {
TVHITTESTINFO ht = { 0 };
- DWORD dwpos = GetMessagePos();
+ uint32_t dwpos = GetMessagePos();
POINTSTOPOINT(ht.pt, MAKEPOINTS(dwpos));
MapWindowPoints(HWND_DESKTOP, ((LPNMHDR)lParam)->hwndFrom, &ht.pt, 1);
diff --git a/plugins/Nudge/src/stdafx.h b/plugins/Nudge/src/stdafx.h index a93ce13dca..7ba2deb812 100644 --- a/plugins/Nudge/src/stdafx.h +++ b/plugins/Nudge/src/stdafx.h @@ -48,7 +48,7 @@ void Nudge_ShowPopup(CNudgeElement*, MCONTACT, wchar_t *); /*
*
****************************/
-void Nudge_ShowStatus(CNudgeElement*, MCONTACT, DWORD timestamp);
+void Nudge_ShowStatus(CNudgeElement*, MCONTACT, uint32_t timestamp);
/*
*
diff --git a/plugins/PackUpdater/Src/Options.cpp b/plugins/PackUpdater/Src/Options.cpp index ab704e57b1..5d02faef0b 100644 --- a/plugins/PackUpdater/Src/Options.cpp +++ b/plugins/PackUpdater/Src/Options.cpp @@ -329,7 +329,7 @@ INT_PTR CALLBACK DlgPopupOpts(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam) case PSN_APPLY:
//Text color
char szSetting[20] = { 0 };
- DWORD ctlColor = 0;
+ uint32_t ctlColor = 0;
for (i = 0; i <= POPUPS - 1; i++) {
ctlColor = SendDlgItemMessage(hdlg, (i + 42071), CPM_GETCOLOUR, 0, 0);
PopupsList[i].colorBack = ctlColor;
diff --git a/plugins/PackUpdater/Src/Utils.cpp b/plugins/PackUpdater/Src/Utils.cpp index f6302454e5..e16c9937a3 100644 --- a/plugins/PackUpdater/Src/Utils.cpp +++ b/plugins/PackUpdater/Src/Utils.cpp @@ -130,7 +130,7 @@ BOOL DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal) if (200 == pReply->resultCode && pReply->dataLength > 0) {
HANDLE hFile = CreateFile(tszLocal, GENERIC_READ | GENERIC_WRITE, NULL, nullptr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr);
DWORD dwBytes;
- WriteFile(hFile, pReply->pData, (DWORD)pReply->dataLength, &dwBytes, nullptr);
+ WriteFile(hFile, pReply->pData, (uint32_t)pReply->dataLength, &dwBytes, nullptr);
ret = true;
if (hFile)
CloseHandle(hFile);
@@ -413,7 +413,7 @@ void InitTimer() _int64 qwDueTime = -10000i64 * interval;
LARGE_INTEGER li = { 0 };
- li.LowPart = (DWORD)(qwDueTime & 0xFFFFFFFF);
+ li.LowPart = (uint32_t)(qwDueTime & 0xFFFFFFFF);
li.HighPart = (LONG)(qwDueTime >> 32);
SetWaitableTimer(Timer, &li, interval, TimerAPCProc, nullptr, 0);
diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp index a8b0b869b0..b97a356162 100644 --- a/plugins/PasteIt/src/PasteIt.cpp +++ b/plugins/PasteIt/src/PasteIt.cpp @@ -116,8 +116,8 @@ static void PasteIt(MCONTACT hContact, int mode) dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_SENT;
dbei.szModule = szProto;
- dbei.timestamp = (DWORD)time(0);
- dbei.cbBlob = (DWORD)mir_strlen(pasteToWeb->szFileLink) + 1;
+ dbei.timestamp = (uint32_t)time(0);
+ dbei.cbBlob = (uint32_t)mir_strlen(pasteToWeb->szFileLink) + 1;
dbei.pBlob = (uint8_t*)pasteToWeb->szFileLink;
db_event_add(hContact, &dbei);
ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)pasteToWeb->szFileLink);
diff --git a/plugins/Ping/src/icmp.cpp b/plugins/Ping/src/icmp.cpp index 26e7379845..6081ecf21f 100644 --- a/plugins/Ping/src/icmp.cpp +++ b/plugins/Ping/src/icmp.cpp @@ -58,10 +58,10 @@ bool ICMP::ping(char *host, ICMP_ECHO_REPLY &reply) if (hIP == INVALID_HANDLE_VALUE)
return false;
- DWORD rep_cnt = IcmpSendEcho2(hIP, nullptr, nullptr, nullptr, address, data, sizeof(data), nullptr, buff, BUFFER_SIZE, timeout);
+ uint32_t rep_cnt = IcmpSendEcho2(hIP, nullptr, nullptr, nullptr, address, data, sizeof(data), nullptr, buff, BUFFER_SIZE, timeout);
if (rep_cnt == 0)
{
- DWORD code = GetLastError();
+ uint32_t code = GetLastError();
if (code != 11010)
{
char winmsg[512], msg[1024];
diff --git a/plugins/Ping/src/options.cpp b/plugins/Ping/src/options.cpp index 0c672435a8..676a864ea0 100644 --- a/plugins/Ping/src/options.cpp +++ b/plugins/Ping/src/options.cpp @@ -110,11 +110,11 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA BOOL trans_success;
- DWORD new_ping_period = GetDlgItemInt(hwndDlg, IDC_PPM, &trans_success, FALSE);
+ uint32_t new_ping_period = GetDlgItemInt(hwndDlg, IDC_PPM, &trans_success, FALSE);
if (trans_success) {
options.ping_period = new_ping_period;
}
- DWORD new_ping_timeout = GetDlgItemInt(hwndDlg, IDC_PT, &trans_success, FALSE);
+ uint32_t new_ping_timeout = GetDlgItemInt(hwndDlg, IDC_PT, &trans_success, FALSE);
if (trans_success) {
options.ping_timeout = new_ping_timeout;
}
@@ -130,7 +130,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA options.indent = SendDlgItemMessage(hwndDlg, IDC_SP_INDENT, UDM_GETPOS, 0, 0);
options.row_height = SendDlgItemMessage(hwndDlg, IDC_SP_ROWHEIGHT, UDM_GETPOS, 0, 0);
- DWORD new_retries = GetDlgItemInt(hwndDlg, IDC_RPT, &trans_success, FALSE);
+ uint32_t new_retries = GetDlgItemInt(hwndDlg, IDC_RPT, &trans_success, FALSE);
if (trans_success) {
options.retries = new_retries;
}
@@ -547,7 +547,7 @@ void SaveOptions() { g_plugin.setWord("Indent", options.indent);
g_plugin.setWord("RowHeight", options.row_height);
- g_plugin.setDword("Retries", (DWORD)options.retries);
+ g_plugin.setDword("Retries", (uint32_t)options.retries);
CallService(MODULENAME "/SetLogFilename", (WPARAM)MAX_PATH, (LPARAM)options.log_filename);
diff --git a/plugins/Ping/src/pinggraph.cpp b/plugins/Ping/src/pinggraph.cpp index 9731a9ecd5..3a4e509e94 100644 --- a/plugins/Ping/src/pinggraph.cpp +++ b/plugins/Ping/src/pinggraph.cpp @@ -5,7 +5,7 @@ HistoryMap history_map; #define ID_REPAINT_TIMER 10101
struct WindowData {
- DWORD item_id;
+ uint32_t item_id;
HistoryList list;
HWND hwnd_chk_grid;
HWND hwnd_chk_stat;
@@ -254,7 +254,7 @@ LRESULT CALLBACK GraphWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar INT_PTR ShowGraph(WPARAM wParam, LPARAM lParam) {
char buff[30];
- mir_snprintf(buff, "WindowHandle%d", (DWORD)wParam);
+ mir_snprintf(buff, "WindowHandle%d", (uint32_t)wParam);
HWND hGraphWnd = (HWND)g_plugin.getDword(buff, 0);
if (hGraphWnd) {
ShowWindow(hGraphWnd, SW_SHOW);
@@ -288,7 +288,7 @@ INT_PTR ShowGraph(WPARAM wParam, LPARAM lParam) { 0, 0, 800, 600, parent, nullptr, g_plugin.getInst(), nullptr);
WindowData *wd = new WindowData;
- wd->item_id = (DWORD)wParam; // wParam is destination id
+ wd->item_id = (uint32_t)wParam; // wParam is destination id
wd->hwnd_chk_grid = nullptr;
wd->hwnd_chk_stat = nullptr;
wd->show_grid = g_plugin.getByte("ShowGridLines", 0) ? true : false;
diff --git a/plugins/Ping/src/pinglist.cpp b/plugins/Ping/src/pinglist.cpp index 485aabe51f..bf6c9c59df 100644 --- a/plugins/Ping/src/pinglist.cpp +++ b/plugins/Ping/src/pinglist.cpp @@ -4,7 +4,7 @@ PINGLIST list_items; mir_cs list_cs;
HANDLE reload_event_handle;
-DWORD NextID = 1;
+uint32_t NextID = 1;
BOOL clist_handle_changing = FALSE;
diff --git a/plugins/Ping/src/pingthread.cpp b/plugins/Ping/src/pingthread.cpp index e1e32665fc..8f866bb8b9 100644 --- a/plugins/Ping/src/pingthread.cpp +++ b/plugins/Ping/src/pingthread.cpp @@ -294,7 +294,7 @@ void CALLBACK TimerProc(HWND, UINT, UINT_PTR, DWORD) }
}
-DWORD context_point;
+uint32_t context_point;
bool context_point_valid = false;
LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
@@ -409,7 +409,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar ScreenToClient(list_hwnd, &pt);
PINGADDRESS itemData;
- DWORD item = SendMessage(list_hwnd, LB_ITEMFROMPOINT, 0, MAKELPARAM(pt.x, pt.y));
+ uint32_t item = SendMessage(list_hwnd, LB_ITEMFROMPOINT, 0, MAKELPARAM(pt.x, pt.y));
bool found = false;
if (HIWORD(item) == 0) {
int count = LOWORD(item);
@@ -546,7 +546,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar break;
#ifdef WS_EX_LAYERED
if (GetWindowLongPtr(hwnd, GWL_EXSTYLE)&WS_EX_LAYERED) {
- DWORD thisTick, startTick;
+ uint32_t thisTick, startTick;
int sourceAlpha, destAlpha;
if (wParam) {
sourceAlpha = 0;
@@ -584,7 +584,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar if (context_point_valid) {
uint16_t x = LOWORD(context_point), y = HIWORD(context_point);
GetWindowRect(list_hwnd, &r);
- DWORD item = SendMessage(list_hwnd, LB_ITEMFROMPOINT, 0, MAKELPARAM(x - r.left, y - r.top));
+ uint32_t item = SendMessage(list_hwnd, LB_ITEMFROMPOINT, 0, MAKELPARAM(x - r.left, y - r.top));
if (HIWORD(item) == 0) {
int count = LOWORD(item);
bool found = false;
@@ -606,7 +606,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar if (context_point_valid) {
uint16_t x = LOWORD(context_point), y = HIWORD(context_point);
GetWindowRect(list_hwnd, &r);
- DWORD item = SendMessage(list_hwnd, LB_ITEMFROMPOINT, 0, MAKELPARAM(x - r.left, y - r.top));
+ uint32_t item = SendMessage(list_hwnd, LB_ITEMFROMPOINT, 0, MAKELPARAM(x - r.left, y - r.top));
if (HIWORD(item) == 0) {
int count = LOWORD(item);
@@ -623,7 +623,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar if (context_point_valid) {
uint16_t x = LOWORD(context_point), y = HIWORD(context_point);
GetWindowRect(list_hwnd, &r);
- DWORD item = SendMessage(list_hwnd, LB_ITEMFROMPOINT, 0, MAKELPARAM(x - r.left, y - r.top));
+ uint32_t item = SendMessage(list_hwnd, LB_ITEMFROMPOINT, 0, MAKELPARAM(x - r.left, y - r.top));
PINGADDRESS *temp = nullptr;
if (HIWORD(item) == 0) {
int count = LOWORD(item);
@@ -671,7 +671,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar PINGADDRESS *pItemData = (PINGADDRESS *)lp;
if (pItemData) {
- DWORD item_id = pItemData->item_id;
+ uint32_t item_id = pItemData->item_id;
int wake = CallService(MODULENAME "/DblClick", (WPARAM)item_id, 0);
InvalidateRect(list_hwnd, nullptr, FALSE);
diff --git a/plugins/Ping/src/rawping.cpp b/plugins/Ping/src/rawping.cpp index 7e66a7450e..a2c59aef81 100644 --- a/plugins/Ping/src/rawping.cpp +++ b/plugins/Ping/src/rawping.cpp @@ -107,7 +107,7 @@ extern int raw_ping(char *host, int timeout) bool use_hi_res = false;
LARGE_INTEGER hr_freq = { 0 }, hr_send_time = { 0 };
- DWORD send_time;
+ uint32_t send_time;
if (QueryPerformanceFrequency(&hr_freq)) {
use_hi_res = true;
QueryPerformanceCounter(&hr_send_time);
@@ -128,7 +128,7 @@ extern int raw_ping(char *host, int timeout) int fromlen = sizeof(source);
IPHeader *reply_header = (IPHeader *)recv_buff;
ICMPHeader *reply;
- DWORD start, current_time;
+ uint32_t start, current_time;
LARGE_INTEGER hr_start = { 0 }, hr_current_time = { 0 }, hr_timeout = { 0 };
if (use_hi_res) {
hr_timeout.QuadPart = (timeout * hr_freq.QuadPart / 1000LL);
diff --git a/plugins/Ping/src/stdafx.h b/plugins/Ping/src/stdafx.h index 7fbb838d85..7dfa5e5b09 100644 --- a/plugins/Ping/src/stdafx.h +++ b/plugins/Ping/src/stdafx.h @@ -90,7 +90,7 @@ typedef LinkedList< HistPair > HistoryList; struct PINGADDRESS {
int cbSize; //size in bytes of this structure
- DWORD item_id;
+ uint32_t item_id;
wchar_t pszName[MAX_PINGADDRESS_STRING_LENGTH]; //IP address or domain name
wchar_t pszLabel[MAX_PINGADDRESS_STRING_LENGTH];
bool responding;
@@ -111,7 +111,7 @@ struct PINGADDRESS { #include "options.h"
-typedef Map<DWORD, HistoryList> HistoryMap;
+typedef Map<uint32_t, HistoryList> HistoryMap;
typedef std::list<PINGADDRESS> PINGLIST;
typedef std::list<PINGADDRESS>::iterator pinglist_it;
diff --git a/plugins/Ping/src/utils.cpp b/plugins/Ping/src/utils.cpp index 43c777f315..3eedce7b9e 100644 --- a/plugins/Ping/src/utils.cpp +++ b/plugins/Ping/src/utils.cpp @@ -130,7 +130,7 @@ INT_PTR ToggleEnabled(WPARAM wParam, LPARAM) { PINGLIST pl;
CallService(MODULENAME "/GetPingList", 0, (LPARAM)&pl);
for (pinglist_it i = pl.begin(); i != pl.end(); ++i) {
- if (i->item_id == (DWORD)wParam) {
+ if (i->item_id == (uint32_t)wParam) {
if (i->status == PS_DISABLED)
i->status = PS_NOTRESPONDING;
@@ -152,7 +152,7 @@ INT_PTR EditContact(WPARAM wParam, LPARAM) CallService(MODULENAME "/GetPingList", 0, (LPARAM)&pl);
for (pinglist_it i = pl.begin(); i != pl.end(); ++i) {
- if (i->item_id == (DWORD)wParam) {
+ if (i->item_id == (uint32_t)wParam) {
add_edit_addr = *i;
@@ -171,7 +171,7 @@ INT_PTR DblClick(WPARAM wParam, LPARAM) { PINGLIST pl;
CallService(MODULENAME "/GetPingList", 0, (LPARAM)&pl);
for (pinglist_it i = pl.begin(); i != pl.end(); ++i) {
- if (i->item_id == (DWORD)wParam) {
+ if (i->item_id == (uint32_t)wParam) {
if (mir_wstrlen(i->pszCommand)) {
ShellExecute(nullptr, L"open", i->pszCommand, i->pszParams, nullptr, SW_SHOW);
}
diff --git a/plugins/PluginUpdater/pu_stub/src/pu_stub.cpp b/plugins/PluginUpdater/pu_stub/src/pu_stub.cpp index 84362caad6..3da0773ec8 100644 --- a/plugins/PluginUpdater/pu_stub/src/pu_stub.cpp +++ b/plugins/PluginUpdater/pu_stub/src/pu_stub.cpp @@ -25,7 +25,7 @@ int CreateDirectoryTreeW(const wchar_t* szDir) if (lstrcpynW(szTestDir, szDir, MAX_PATH) == nullptr) szTestDir[MAX_PATH] = 0; - DWORD dwAttributes = GetFileAttributesW(szTestDir); + uint32_t dwAttributes = GetFileAttributesW(szTestDir); if (dwAttributes != INVALID_FILE_ATTRIBUTES && (dwAttributes & FILE_ATTRIBUTE_DIRECTORY)) return 0; @@ -74,7 +74,7 @@ void CreatePathToFileW(wchar_t *wszFilePath) int APIENTRY wWinMain(HINSTANCE /*hInstance*/, HINSTANCE, LPTSTR lpCmdLine, int) { - DWORD dwError; + uint32_t dwError; wchar_t tszPipeName[MAX_PATH]; #if _MSC_VER < 1400 @@ -95,8 +95,8 @@ int APIENTRY wWinMain(HINSTANCE /*hInstance*/, HINSTANCE, LPTSTR lpCmdLine, int) uint8_t szReadBuffer[1024] = { 0 }; DWORD dwBytes; while (ReadFile(hPipe, szReadBuffer, sizeof(szReadBuffer), &dwBytes, nullptr)) { - DWORD dwAction = *(DWORD*)szReadBuffer; - wchar_t *ptszFile1 = (wchar_t*)(szReadBuffer + sizeof(DWORD)); + uint32_t dwAction = *(uint32_t*)szReadBuffer; + wchar_t *ptszFile1 = (wchar_t*)(szReadBuffer + sizeof(uint32_t)); wchar_t *ptszFile2 = ptszFile1 + wcslen(ptszFile1) + 1; dwError = 0; log(L"Received command: %d <%s> <%s>", dwAction, ptszFile1, ptszFile2); @@ -108,7 +108,7 @@ int APIENTRY wWinMain(HINSTANCE /*hInstance*/, HINSTANCE, LPTSTR lpCmdLine, int) case 2: // move if (!DeleteFileW(ptszFile2)) { - DWORD err = GetLastError(); + uint32_t err = GetLastError(); if (err != ERROR_ACCESS_DENIED && err != ERROR_FILE_NOT_FOUND) { dwError = err; break; @@ -116,7 +116,7 @@ int APIENTRY wWinMain(HINSTANCE /*hInstance*/, HINSTANCE, LPTSTR lpCmdLine, int) } if (!MoveFileW(ptszFile1, ptszFile2)) { // use copy on error - switch (DWORD err = GetLastError()) { + switch (uint32_t err = GetLastError()) { case ERROR_ALREADY_EXISTS: case ERROR_FILE_NOT_FOUND: dwError = 0; @@ -164,7 +164,7 @@ int APIENTRY wWinMain(HINSTANCE /*hInstance*/, HINSTANCE, LPTSTR lpCmdLine, int) dwError = ERROR_UNKNOWN_FEATURE; } - WriteFile(hPipe, &dwError, sizeof(DWORD), &dwBytes, nullptr); + WriteFile(hPipe, &dwError, sizeof(uint32_t), &dwBytes, nullptr); } dwError = GetLastError(); diff --git a/plugins/PluginUpdater/src/DlgListNew.cpp b/plugins/PluginUpdater/src/DlgListNew.cpp index d93b3fc043..8dcbc35592 100644 --- a/plugins/PluginUpdater/src/DlgListNew.cpp +++ b/plugins/PluginUpdater/src/DlgListNew.cpp @@ -393,7 +393,7 @@ static void GetList(void *) Thread_SetName("PluginUpdater: GetList");
TFileName wszTempPath;
- DWORD dwLen = GetTempPath(_countof(wszTempPath), wszTempPath);
+ uint32_t dwLen = GetTempPath(_countof(wszTempPath), wszTempPath);
if (wszTempPath[dwLen - 1] == '\\')
wszTempPath[dwLen - 1] = 0;
diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp index 02c40eaea6..baa2d0e90d 100644 --- a/plugins/PluginUpdater/src/DlgUpdate.cpp +++ b/plugins/PluginUpdater/src/DlgUpdate.cpp @@ -21,12 +21,12 @@ Boston, MA 02111-1307, USA. static bool bShowDetails;
static HWND hwndDialog;
-static DWORD dwCheckThreadId;
+static uint32_t dwCheckThreadId;
static HANDLE hTimer;
class CUpdateDLg : public CDlgBase
{
- DWORD dwThreadId = 0;
+ uint32_t dwThreadId = 0;
CCtrlButton btnDetails, btnSelAll, btnSelNone, btnOk;
CCtrlListView m_list;
OBJLIST<FILEINFO> *m_todo;
@@ -82,7 +82,7 @@ class CUpdateDLg : public CDlgBase Netlib_CloseHandle(nlc);
// 3) Unpack all zips
- DWORD dwErrorCode;
+ uint32_t dwErrorCode;
for (auto &it : todo) {
if (it->bEnabled) {
if (it->bDeleteOnly) {
@@ -432,7 +432,7 @@ static void DlgUpdateSilent(void *param) }
// 3) Unpack all zips
- DWORD dwErrorCode;
+ uint32_t dwErrorCode;
VARSW wszMirandaPath(L"%miranda_path%");
for (auto &it : UpdateFiles) {
if (it->bEnabled) {
@@ -805,7 +805,7 @@ static void CheckUpdates(void *) ThreadWatch threadId(dwCheckThreadId);
TFileName wszTempPath;
- DWORD dwLen = GetTempPath(_countof(wszTempPath), wszTempPath);
+ uint32_t dwLen = GetTempPath(_countof(wszTempPath), wszTempPath);
if (wszTempPath[dwLen - 1] == '\\')
wszTempPath[dwLen - 1] = 0;
diff --git a/plugins/PluginUpdater/src/PluginUpdater.cpp b/plugins/PluginUpdater/src/PluginUpdater.cpp index 9d9879d607..129f66e0ec 100644 --- a/plugins/PluginUpdater/src/PluginUpdater.cpp +++ b/plugins/PluginUpdater/src/PluginUpdater.cpp @@ -90,7 +90,7 @@ int CMPlugin::Load() g_plugin.setByte(DB_SETTING_NEED_RESTART, 0);
- DWORD dwLen = GetTempPath(_countof(g_wszTempPath), g_wszTempPath);
+ uint32_t dwLen = GetTempPath(_countof(g_wszTempPath), g_wszTempPath);
if (g_wszTempPath[dwLen-1] == '\\')
g_wszTempPath[dwLen-1] = 0;
diff --git a/plugins/PluginUpdater/src/checksum.cpp b/plugins/PluginUpdater/src/checksum.cpp index 39beb73c49..217bdb579f 100644 --- a/plugins/PluginUpdater/src/checksum.cpp +++ b/plugins/PluginUpdater/src/checksum.cpp @@ -71,7 +71,7 @@ static void PatchResourcesDirectory(PIMAGE_RESOURCE_DIRECTORY pIRD, uint8_t *pBa PatchResourceEntry(pIRDE, pBase);
}
-__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);
}
@@ -110,7 +110,7 @@ LBL_NotPE: goto LBL_NotPE;
uint16_t machine = pINTH->FileHeader.Machine;
- DWORD sections = pINTH->FileHeader.NumberOfSections;
+ uint32_t sections = pINTH->FileHeader.NumberOfSections;
if (!sections)
return RESULT_INVALID;
@@ -120,13 +120,13 @@ LBL_NotPE: ULONGLONG base = 0;
// try to found correct offset independent of architectures
- DWORD offset = pIDH->e_lfanew + pINTH->FileHeader.SizeOfOptionalHeader + sizeof(IMAGE_NT_HEADERS) - sizeof(IMAGE_OPTIONAL_HEADER);
+ uint32_t offset = pIDH->e_lfanew + pINTH->FileHeader.SizeOfOptionalHeader + sizeof(IMAGE_NT_HEADERS) - sizeof(IMAGE_OPTIONAL_HEADER);
if ((machine == IMAGE_FILE_MACHINE_I386) &&
(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 ((machine == IMAGE_FILE_MACHINE_AMD64) &&
(pINTH->FileHeader.SizeOfOptionalHeader >= sizeof(IMAGE_OPTIONAL_HEADER64)) &&
@@ -137,30 +137,30 @@ LBL_NotPE: else return RESULT_CORRUPTED;
// Debugging information entry
- DWORD dbgAddr = pIDD[IMAGE_DIRECTORY_ENTRY_DEBUG].VirtualAddress;
- DWORD dbgSize = pIDD[IMAGE_DIRECTORY_ENTRY_DEBUG].Size;
+ uint32_t dbgAddr = pIDD[IMAGE_DIRECTORY_ENTRY_DEBUG].VirtualAddress;
+ uint32_t dbgSize = pIDD[IMAGE_DIRECTORY_ENTRY_DEBUG].Size;
// 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;
// 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;
// Reallocation information entry
- DWORD relocAddr = pIDD[IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress;
- DWORD relocSize = pIDD[IMAGE_DIRECTORY_ENTRY_BASERELOC].Size;
+ uint32_t relocAddr = pIDD[IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress;
+ uint32_t relocSize = pIDD[IMAGE_DIRECTORY_ENTRY_BASERELOC].Size;
// verify image integrity
- for (DWORD idx = 0; idx < sections; idx++) {
+ for (uint32_t idx = 0; idx < sections; idx++) {
PIMAGE_SECTION_HEADER pISH = (PIMAGE_SECTION_HEADER)(map.ptr + offset + idx * sizeof(IMAGE_SECTION_HEADER));
if (((uint8_t*)pISH + sizeof(IMAGE_SECTION_HEADER) > map.ptr + filesize) || (pISH->PointerToRawData + pISH->SizeOfRawData > filesize))
return RESULT_CORRUPTED;
// erase timestamp
if (dbgSize >= sizeof(IMAGE_DEBUG_DIRECTORY) && Contains(pISH, dbgAddr, dbgSize)) {
- DWORD shift = dbgAddr - pISH->VirtualAddress;
+ uint32_t shift = dbgAddr - pISH->VirtualAddress;
pDBG = (PIMAGE_DEBUG_DIRECTORY)(map.ptr + shift + pISH->PointerToRawData);
for (int i = dbgSize / sizeof(IMAGE_DEBUG_DIRECTORY); i > 0; i--)
pDBG[i - 1].TimeDateStamp = 0;
@@ -168,14 +168,14 @@ LBL_NotPE: // erase export timestamp
if (expSize >= sizeof(IMAGE_EXPORT_DIRECTORY) && Contains(pISH, expAddr, expSize)) {
- DWORD shift = expAddr - pISH->VirtualAddress;
+ uint32_t shift = expAddr - pISH->VirtualAddress;
PIMAGE_EXPORT_DIRECTORY pEXP = (PIMAGE_EXPORT_DIRECTORY)(map.ptr + shift + pISH->PointerToRawData);
pEXP->TimeDateStamp = 0;
}
// find realocation table
if ((relocSize >= sizeof(IMAGE_BASE_RELOCATION)) && Contains(pISH, relocAddr, relocSize)) {
- DWORD shift = relocAddr - pISH->VirtualAddress;
+ uint32_t shift = relocAddr - pISH->VirtualAddress;
pRealloc = map.ptr + shift + pISH->PointerToRawData;
}
}
@@ -193,33 +193,33 @@ LBL_NotPE: // patch resources
if (resSize > 0 && Contains(pISH, resAddr, resSize)) {
- DWORD shift = resAddr - pISH->VirtualAddress + pISH->PointerToRawData;
+ uint32_t shift = resAddr - pISH->VirtualAddress + pISH->PointerToRawData;
IMAGE_RESOURCE_DIRECTORY *pIRD = (IMAGE_RESOURCE_DIRECTORY*)(map.ptr + shift);
PatchResourcesDirectory(pIRD, map.ptr + shift);
}
// rebase to zero address
if (pRealloc) {
- DWORD blocklen = relocSize;
+ uint32_t blocklen = relocSize;
PIMAGE_BASE_RELOCATION pIBR = (PIMAGE_BASE_RELOCATION)pRealloc;
while (pIBR) {
if (Contains(pISH, pIBR->VirtualAddress) && pIBR->SizeOfBlock <= blocklen) {
- DWORD shift = pIBR->VirtualAddress - pISH->VirtualAddress + pISH->PointerToRawData;
+ uint32_t shift = pIBR->VirtualAddress - pISH->VirtualAddress + pISH->PointerToRawData;
int len = pIBR->SizeOfBlock - sizeof(IMAGE_BASE_RELOCATION);
PWORD pw = (PWORD)((uint8_t*)pIBR + sizeof(IMAGE_BASE_RELOCATION));
while (len > 0) {
- DWORD type = *pw >> 12;
- DWORD addr = (*pw & 0x0FFF);
+ uint32_t type = *pw >> 12;
+ uint32_t addr = (*pw & 0x0FFF);
uint8_t *pAddr = map.ptr + shift + addr;
switch (type) {
case IMAGE_REL_BASED_HIGHLOW:
- if (addr + pIBR->VirtualAddress + sizeof(DWORD) >= pISH->VirtualAddress + pISH->SizeOfRawData) {
+ if (addr + pIBR->VirtualAddress + sizeof(uint32_t) >= pISH->VirtualAddress + pISH->SizeOfRawData) {
len = 0;
break;
}
- *(PDWORD)pAddr = (DWORD)((*(PDWORD)pAddr) - (DWORD)base);
+ *(PDWORD)pAddr = (uint32_t)((*(PDWORD)pAddr) - (uint32_t)base);
break;
case IMAGE_REL_BASED_DIR64:
diff --git a/plugins/PluginUpdater/src/stdafx.h b/plugins/PluginUpdater/src/stdafx.h index f4a4416b73..b28a96ed02 100644 --- a/plugins/PluginUpdater/src/stdafx.h +++ b/plugins/PluginUpdater/src/stdafx.h @@ -149,7 +149,7 @@ enum using namespace std;
-extern DWORD g_mirandaVersion;
+extern uint32_t g_mirandaVersion;
extern wchar_t g_wszRoot[MAX_PATH], g_wszTempPath[MAX_PATH];
extern HNETLIBUSER g_hNetlibUser;
@@ -182,11 +182,11 @@ struct CMPlugin : public PLUGIN<CMPlugin> // common options
CMOption<bool> bUpdateOnStartup, bUpdateOnPeriod, bOnlyOnceADay, bSilentMode, bBackup, bChangePlatform, bUseHttps, bAutoRestart;
CMOption<int> iPeriod, iPeriodMeasure, iNumberBackups;
- CMOption<DWORD> dwLastUpdate;
+ CMOption<uint32_t> dwLastUpdate;
// popup options
CMOption<uint8_t> PopupDefColors, PopupLeftClickAction, PopupRightClickAction;
- CMOption<DWORD> PopupTimeout;
+ CMOption<uint32_t> PopupTimeout;
};
void DoCheck(bool bSilent = true);
@@ -195,10 +195,10 @@ void UninitListNew(void); class ThreadWatch
{
- DWORD &pId;
+ uint32_t &pId;
public:
- ThreadWatch(DWORD &_1) :
+ ThreadWatch(uint32_t &_1) :
pId(_1)
{
pId = ::GetCurrentThreadId();
@@ -227,7 +227,7 @@ struct ServListEntry }
wchar_t *m_name;
- DWORD m_crc;
+ uint32_t m_crc;
char m_szHash[32+1];
};
diff --git a/plugins/Popup/src/actions.cpp b/plugins/Popup/src/actions.cpp index 8b5d58d027..9cc7cfc61b 100644 --- a/plugins/Popup/src/actions.cpp +++ b/plugins/Popup/src/actions.cpp @@ -60,7 +60,7 @@ void RegisterAction(POPUPACTION *action) {
int index;
if ((index = gActions.getIndex(action)) >= 0) {
- DWORD flags = gActions[index]->flags;
+ uint32_t flags = gActions[index]->flags;
*gActions[index] = *action;
gActions[index]->flags = flags;
}
@@ -93,10 +93,10 @@ bool IsActionEnabled(char *name) return IsActionEnabled(&action);
}
-DWORD MouseOverride(HWND hCombo, int number)
+uint32_t MouseOverride(HWND hCombo, int number)
{
- DWORD dwItem = 0;
- DWORD ItemActive = 0;
+ uint32_t dwItem = 0;
+ uint32_t ItemActive = 0;
if (number < 0 || number > 7)
number = 0;
dwItem = SendMessage(hCombo, CB_ADDSTRING, 0, (LPARAM)TranslateT("No overwrite"));
@@ -193,7 +193,7 @@ INT_PTR CALLBACK DlgProcPopupActions(HWND hwnd, UINT msg, WPARAM wParam, LPARAM CheckDlgButton(hwnd, IDC_RD_RIGHTICONS, PopupOptions.actions & ACT_RIGHTICONS ? BST_CHECKED : BST_UNCHECKED);
{
- DWORD dwActiveItem = 0;
+ uint32_t dwActiveItem = 0;
HWND hCombo = GetDlgItem(hwnd, IDC_CB_LEFT);
dwActiveItem = MouseOverride(hCombo, PopupOptions.overrideLeft);
SendDlgItemMessage(hwnd, IDC_CB_LEFT, CB_SETCURSEL, dwActiveItem, 0);
diff --git a/plugins/Popup/src/bitmap_funcs.cpp b/plugins/Popup/src/bitmap_funcs.cpp index 6fba66ad66..2d8af56be2 100644 --- a/plugins/Popup/src/bitmap_funcs.cpp +++ b/plugins/Popup/src/bitmap_funcs.cpp @@ -625,11 +625,11 @@ HRGN MyBitmap::buildOpaqueRgn(int level, bool opaque) for (int i = 0; i < height; i++) {
int j; // we will need j after the loop!
for (j = 0; j < width; j++) {
- ismask = opaque ? geta(this->getRow(i)[j]) > (DWORD)level : geta(this->getRow(i)[j]) < (DWORD)level;
+ ismask = opaque ? geta(this->getRow(i)[j]) > (uint32_t)level : geta(this->getRow(i)[j]) < (uint32_t)level;
if (wasfirst) {
if (!ismask) {
SetRect(&pRects[pRgnData->rdh.nCount++], first, i, j, i + 1);
- if (pRgnData->rdh.nCount >= (DWORD)rectsCount) {
+ if (pRgnData->rdh.nCount >= (uint32_t)rectsCount) {
rectsCount += addRectsCount;
LPRGNDATA pRgnDataNew = (LPRGNDATA)(new uint8_t[sizeof(RGNDATAHEADER) + (rectsCount)*sizeof(RECT)]);
memcpy(pRgnDataNew, pRgnData, sizeof(RGNDATAHEADER) + pRgnData->rdh.nCount * sizeof(RECT));
@@ -648,7 +648,7 @@ HRGN MyBitmap::buildOpaqueRgn(int level, bool opaque) if (wasfirst && ismask) {
SetRect(&pRects[pRgnData->rdh.nCount++], first, i, j, i + 1);
- if (pRgnData->rdh.nCount >= (DWORD)rectsCount) {
+ if (pRgnData->rdh.nCount >= (uint32_t)rectsCount) {
rectsCount += addRectsCount;
LPRGNDATA pRgnDataNew = (LPRGNDATA)(new uint8_t[sizeof(RGNDATAHEADER) + (rectsCount)*sizeof(RECT)]);
memcpy(pRgnDataNew, pRgnData, sizeof(RGNDATAHEADER) + pRgnData->rdh.nCount * sizeof(RECT));
diff --git a/plugins/Popup/src/config.cpp b/plugins/Popup/src/config.cpp index 51223de387..5dbcca1324 100644 --- a/plugins/Popup/src/config.cpp +++ b/plugins/Popup/src/config.cpp @@ -92,13 +92,13 @@ void PopupPreview() CallService(MS_POPUP_ADDPOPUP2, (WPARAM)&ppd, APF_NO_HISTORY);
if (PopupOptions.UseAnimations || PopupOptions.UseEffect) Sleep((ANIM_TIME * 2) / 3); // Pause
- PUShowMessageW(TranslateT("This is a notification message"), (DWORD)SM_NOTIFY | 0x80000000);
+ PUShowMessageW(TranslateT("This is a notification message"), (uint32_t)SM_NOTIFY | 0x80000000);
if (PopupOptions.UseAnimations || PopupOptions.UseEffect) Sleep((ANIM_TIME * 2) / 3); // Pause
- PUShowMessageW(TranslateT("This is a warning message"), (DWORD)SM_WARNING | 0x80000000);
+ PUShowMessageW(TranslateT("This is a warning message"), (uint32_t)SM_WARNING | 0x80000000);
if (PopupOptions.UseAnimations || PopupOptions.UseEffect) Sleep((ANIM_TIME * 2) / 3); // Pause
- PUShowMessageW(TranslateT("This is an error message"), (DWORD)SM_ERROR | 0x80000000);
+ PUShowMessageW(TranslateT("This is an error message"), (uint32_t)SM_ERROR | 0x80000000);
}
//////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/Popup/src/config.h b/plugins/Popup/src/config.h index 74b10b996c..a38ccb1bc0 100644 --- a/plugins/Popup/src/config.h +++ b/plugins/Popup/src/config.h @@ -60,7 +60,7 @@ typedef struct tagPOPUPOPTIONS { uint8_t UseWinColors;
uint8_t UseMText;
//==Page Actions====
- DWORD actions;
+ uint32_t actions;
//Mouse Override
int overrideLeft;
int overrideRight;
@@ -86,8 +86,8 @@ typedef struct tagPOPUPOPTIONS { uint8_t UseAnimations;
uint8_t UseEffect;
LPTSTR Effect;
- DWORD FadeIn;
- DWORD FadeOut;
+ uint32_t FadeIn;
+ uint32_t FadeOut;
//Others
uint16_t MaxPopups;
} POPUPOPTIONS;
@@ -162,7 +162,7 @@ extern bool OptionLoaded; #define AC_SRC_ALPHA 0x01
#endif
#ifndef INVALID_FILE_ATTRIBUTES
-#define INVALID_FILE_ATTRIBUTES (DWORD (-1))
+#define INVALID_FILE_ATTRIBUTES (uint32_t (-1))
#endif
#define DWM_BB_ENABLE 0x00000001
@@ -170,7 +170,7 @@ extern bool OptionLoaded; #define DWM_BB_TRANSITIONONMAXIMIZED 0x00000004
struct DWM_BLURBEHIND
{
- DWORD dwFlags;
+ uint32_t dwFlags;
BOOL fEnable;
HRGN hRgnBlur;
BOOL fTransitionOnMaximized;
diff --git a/plugins/Popup/src/font.cpp b/plugins/Popup/src/font.cpp index b274615963..349dccd1e2 100644 --- a/plugins/Popup/src/font.cpp +++ b/plugins/Popup/src/font.cpp @@ -114,10 +114,10 @@ void ReloadFonts() for (auto &it : gTreeData) {
if (it->typ == 2) {
mir_snprintf(setting, "%s/TextCol", it->pupClass.pszName);
- it->colorText = it->pupClass.colorText = (COLORREF)db_get_dw(0, PU_MODULCLASS, setting, (DWORD)fonts.clText);
+ it->colorText = it->pupClass.colorText = (COLORREF)db_get_dw(0, PU_MODULCLASS, setting, (uint32_t)fonts.clText);
mir_snprintf(setting, "%s/BgCol", it->pupClass.pszName);
- it->colorBack = it->pupClass.colorBack = (COLORREF)db_get_dw(0, PU_MODULCLASS, setting, (DWORD)fonts.clBack/*pc->colorBack*/);
+ it->colorBack = it->pupClass.colorBack = (COLORREF)db_get_dw(0, PU_MODULCLASS, setting, (uint32_t)fonts.clBack/*pc->colorBack*/);
}
}
}
diff --git a/plugins/Popup/src/notifications.cpp b/plugins/Popup/src/notifications.cpp index 5876781cb9..96158a2890 100644 --- a/plugins/Popup/src/notifications.cpp +++ b/plugins/Popup/src/notifications.cpp @@ -218,7 +218,7 @@ HANDLE FindTreeData(LPTSTR group, LPTSTR name, uint8_t typ) return nullptr;
}
-void FillNotificationData(POPUPDATA2 *ppd, DWORD *disableWhen)
+void FillNotificationData(POPUPDATA2 *ppd, uint32_t *disableWhen)
{
if (!IsValidNotification(ppd->lchNotification)) {
*disableWhen = 0;
diff --git a/plugins/Popup/src/notifications.h b/plugins/Popup/src/notifications.h index 3a56992b33..b9a6baa709 100644 --- a/plugins/Popup/src/notifications.h +++ b/plugins/Popup/src/notifications.h @@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct POPUPTREEDATA
{
int cbSize;
- DWORD signature;
+ uint32_t signature;
LPTSTR pszTreeRoot;
LPTSTR pszDescription;
uint8_t typ;
@@ -36,7 +36,7 @@ struct POPUPTREEDATA POPUPCLASS pupClass;
};
uint8_t enabled;
- DWORD disableWhen;
+ uint32_t disableWhen;
int timeoutValue;
char leftAction[MAXMODULELABELLENGTH];
char rightAction[MAXMODULELABELLENGTH];
@@ -56,7 +56,7 @@ void UnloadTreeData(); void LoadNotifications();
HANDLE RegisterNotification(POPUPNOTIFICATION *notification);
-void FillNotificationData(POPUPDATA2 *ppd, DWORD *disableWhen);
+void FillNotificationData(POPUPDATA2 *ppd, uint32_t *disableWhen);
bool PerformAction(HANDLE hNotification, HWND hwnd, UINT message, WPARAM wparal, LPARAM lparam);
bool IsValidNotification(HANDLE hNotification);
diff --git a/plugins/Popup/src/opt_adv.cpp b/plugins/Popup/src/opt_adv.cpp index 8b8b056d9e..8ea71bd4b8 100644 --- a/plugins/Popup/src/opt_adv.cpp +++ b/plugins/Popup/src/opt_adv.cpp @@ -206,9 +206,9 @@ INT_PTR CALLBACK DlgProcPopupAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM HWND hCtrl = GetDlgItem(hwnd, IDC_EFFECT);
ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("No effect")), -2);
ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("Fade in/out")), -1);
- DWORD dwActiveItem = (DWORD)PopupOptions.UseEffect;
+ uint32_t dwActiveItem = (uint32_t)PopupOptions.UseEffect;
for (int i = 0; i < g_lstPopupVfx.getCount(); ++i) {
- DWORD dwItem = ComboBox_AddString(hCtrl, TranslateW(g_lstPopupVfx[i]));
+ uint32_t dwItem = ComboBox_AddString(hCtrl, TranslateW(g_lstPopupVfx[i]));
ComboBox_SetItemData(hCtrl, dwItem, i);
if (PopupOptions.UseEffect && !mir_wstrcmp(g_lstPopupVfx[i], PopupOptions.Effect))
dwActiveItem = dwItem;
diff --git a/plugins/Popup/src/opt_class.cpp b/plugins/Popup/src/opt_class.cpp index 30376308f9..d6d28f42d8 100644 --- a/plugins/Popup/src/opt_class.cpp +++ b/plugins/Popup/src/opt_class.cpp @@ -132,8 +132,8 @@ struct { int idCtrl;
int iconId;
char *title;
- DWORD statusFlag;
- DWORD disableWhenFlag;
+ uint32_t statusFlag;
+ uint32_t disableWhenFlag;
}
static statusButtons[] = {
{ IDC_SOFFLINE, SKINICON_STATUS_OFFLINE, "Offline", PF2_IDLE, PF2_IDLE },
diff --git a/plugins/Popup/src/opt_contacts.cpp b/plugins/Popup/src/opt_contacts.cpp index 55b17d1655..b6ce031048 100644 --- a/plugins/Popup/src/opt_contacts.cpp +++ b/plugins/Popup/src/opt_contacts.cpp @@ -32,7 +32,7 @@ static void sttSetAllContactIcons(HWND hwndList) {
for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0);
- DWORD dwMode = g_plugin.getByte(hContact, "ShowMode", 0);
+ uint32_t dwMode = g_plugin.getByte(hContact, "ShowMode", 0);
for (int i = 0; i < 4 /*_countof(sttIcons)*/; ++i)
// hIml element [0] = SKINICON_OTHER_SMALLDOT
// hIml element [1..5] = IcoLib_GetIcon(....) ~ old sttIcons
@@ -79,7 +79,7 @@ INT_PTR CALLBACK DlgProcContactOpts(HWND hwnd, UINT msg, WPARAM, LPARAM lParam) NMCLISTCONTROL *nm = (NMCLISTCONTROL*)lParam;
if (nm->iColumn == -1) break;
- DWORD hitFlags;
+ uint32_t hitFlags;
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwnd, IDC_LIST, CLM_HITTEST, (WPARAM)&hitFlags, MAKELPARAM(nm->pt.x, nm->pt.y));
if (hItem == nullptr) break;
if (!(hitFlags&CLCHT_ONITEMEXTRA)) break;
diff --git a/plugins/Popup/src/opt_gen.cpp b/plugins/Popup/src/opt_gen.cpp index cf034a0e71..ca491e23af 100644 --- a/plugins/Popup/src/opt_gen.cpp +++ b/plugins/Popup/src/opt_gen.cpp @@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. INT_PTR CALLBACK PositionBoxDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
// Helper for Status Tree
-static int CountStatusModes(DWORD flags)
+static int CountStatusModes(uint32_t flags)
{
int res = 0;
if (flags & PF2_ONLINE) ++res;
@@ -40,7 +40,7 @@ static int CountStatusModes(DWORD flags) return res;
}
-int AddStatusMode(OPTTREE_OPTION *options, int pos, LPTSTR prefix, DWORD flag)
+int AddStatusMode(OPTTREE_OPTION *options, int pos, LPTSTR prefix, uint32_t flag)
{
if (!flag) return pos;
options[pos].dwFlag = flag;
@@ -65,7 +65,7 @@ int AddStatusMode(OPTTREE_OPTION *options, int pos, LPTSTR prefix, DWORD flag) return pos + 1;
}
-int AddStatusModes(OPTTREE_OPTION *options, int pos, LPTSTR prefix, DWORD flags)
+int AddStatusModes(OPTTREE_OPTION *options, int pos, LPTSTR prefix, uint32_t flags)
{
pos = AddStatusMode(options, pos, prefix, PF2_IDLE);
pos = AddStatusMode(options, pos, prefix, flags & PF2_ONLINE);
@@ -199,11 +199,11 @@ INT_PTR CALLBACK DlgProcPopupGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM // new status options
{
statusOptionsCount = 0;
- DWORD globalFlags = 0;
+ uint32_t globalFlags = 0;
auto &accs = Accounts();
for (auto &pa : accs) {
if (!pa->bIsVirtual) {
- DWORD protoFlags = CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0);
+ uint32_t protoFlags = CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0);
globalFlags |= protoFlags;
statusOptionsCount += CountStatusModes(protoFlags);
}
@@ -215,7 +215,7 @@ INT_PTR CALLBACK DlgProcPopupGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM int pos = AddStatusModes(statusOptions, 0, LPGENW("Global Status"), globalFlags);
for (auto &pa : accs) {
if (!pa->bIsVirtual) {
- DWORD protoFlags = CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0);
+ uint32_t protoFlags = CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0);
if (!CountStatusModes(protoFlags))
continue;
@@ -230,7 +230,7 @@ INT_PTR CALLBACK DlgProcPopupGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM for (auto &pa : accs) {
if (!pa->bIsVirtual) {
- DWORD protoFlags = CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0);
+ uint32_t protoFlags = CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0);
if (!CountStatusModes(protoFlags))
continue;
diff --git a/plugins/Popup/src/opt_skins.cpp b/plugins/Popup/src/opt_skins.cpp index 43267d16b4..e62c48909a 100644 --- a/plugins/Popup/src/opt_skins.cpp +++ b/plugins/Popup/src/opt_skins.cpp @@ -160,7 +160,7 @@ LRESULT CALLBACK WndProcPreviewBox(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP return mir_callNextSubclass(hwnd, WndProcPreviewBox, msg, wParam, lParam);
}
-int SkinOptionList_AddSkin(OPTTREE_OPTION* &options, int *OptionsCount, int pos, DWORD *dwGlobalOptions) {
+int SkinOptionList_AddSkin(OPTTREE_OPTION* &options, int *OptionsCount, int pos, uint32_t *dwGlobalOptions) {
const PopupSkin *skin = nullptr;
if (skin = skins.getSkin(PopupOptions.SkinPack)) {
for (int i = 1; i <= 10; i++) {
@@ -168,7 +168,7 @@ int SkinOptionList_AddSkin(OPTTREE_OPTION* &options, int *OptionsCount, int pos continue;
*OptionsCount += 1;
options = (OPTTREE_OPTION*)mir_realloc(options, sizeof(OPTTREE_OPTION)*(*OptionsCount));
- options[pos].dwFlag = (DWORD)(1 << (i - 1));
+ options[pos].dwFlag = (uint32_t)(1 << (i - 1));
options[pos].groupId = OPTTREE_CHECK;
options[pos].iconIndex = 0;
options[pos].pszSettingName = mir_wstrdup(L"Skin options");
@@ -195,7 +195,7 @@ static LPTSTR mainOption[] = { LPGENW("Use Windows colors"),
LPGENW("Use advanced text render") };
-int SkinOptionList_AddMain(OPTTREE_OPTION* &options, int *OptionsCount, int pos, DWORD *dwGlobalOptions)
+int SkinOptionList_AddMain(OPTTREE_OPTION* &options, int *OptionsCount, int pos, uint32_t *dwGlobalOptions)
{
for (int i = 0; i < _countof(mainOption); i++) {
BOOL bCheck = 0;
@@ -256,10 +256,10 @@ bool SkinOptionList_Update(OPTTREE_OPTION* &options, int *OptionsCount, HWND hwn *OptionsCount = 0;
}
// add "Global options"
- DWORD dwGlobalOptions = 0;
+ uint32_t dwGlobalOptions = 0;
int pos = SkinOptionList_AddMain(options, OptionsCount, 0, &dwGlobalOptions);
// add "Skin options"
- DWORD dwSkinOptions = 0;
+ uint32_t dwSkinOptions = 0;
pos = SkinOptionList_AddSkin(options, OptionsCount, pos, &dwSkinOptions);
// generate treeview
int index = -1;
@@ -341,7 +341,7 @@ INT_PTR CALLBACK DlgProcPopSkinsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR HWND hCtrl = GetDlgItem(hwndDlg, IDC_SKINLIST);
ListBox_ResetContent(hCtrl);
for (const Skins::SKINLIST *sl = skins.getSkinList(); sl; sl = sl->next) {
- DWORD dwIndex = ListBox_AddString(hCtrl, sl->name);
+ uint32_t dwIndex = ListBox_AddString(hCtrl, sl->name);
ListBox_SetItemData(hCtrl, dwIndex, sl->name);
}
ListBox_SetCurSel(hCtrl, ListBox_FindString(hCtrl, 0, PopupOptions.SkinPack));
@@ -395,7 +395,7 @@ INT_PTR CALLBACK DlgProcPopSkinsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR hCtrl = GetDlgItem(hwndDlg, IDC_SKINLIST);
ListBox_ResetContent(hCtrl);
for (const Skins::SKINLIST *sl = skins.getSkinList(); sl; sl = sl->next) {
- DWORD dwIndex = ListBox_AddString(hCtrl, sl->name);
+ uint32_t dwIndex = ListBox_AddString(hCtrl, sl->name);
ListBox_SetItemData(hCtrl, dwIndex, sl->name);
}
ListBox_SetCurSel(hCtrl, ListBox_FindString(hCtrl, 0, PopupOptions.SkinPack));
diff --git a/plugins/Popup/src/opttree.cpp b/plugins/Popup/src/opttree.cpp index a1c827d81d..21a5bf6524 100644 --- a/plugins/Popup/src/opttree.cpp +++ b/plugins/Popup/src/opttree.cpp @@ -317,10 +317,10 @@ BOOL OptTree_ProcessMessage(HWND hwnd, UINT msg, WPARAM, LPARAM lparam, int *res return FALSE;
}
-DWORD OptTree_GetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int optionCount, LPTSTR pszSettingName)
+uint32_t OptTree_GetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int optionCount, LPTSTR pszSettingName)
{
HWND hwndTree = GetDlgItem(hwnd, idcTree);
- DWORD result = 0;
+ uint32_t result = 0;
int i;
for (i = 0; i < optionCount; ++i) {
if ((!options[i].pszSettingName && !pszSettingName) ||
@@ -337,7 +337,7 @@ DWORD OptTree_GetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int op return result;
}
-void OptTree_SetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int optionCount, DWORD dwOptions, LPTSTR pszSettingName)
+void OptTree_SetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int optionCount, uint32_t dwOptions, LPTSTR pszSettingName)
{
HWND hwndTree = GetDlgItem(hwnd, idcTree);
for (int i = 0; i < optionCount; ++i) {
diff --git a/plugins/Popup/src/opttree.h b/plugins/Popup/src/opttree.h index c13087b072..9d4213057a 100644 --- a/plugins/Popup/src/opttree.h +++ b/plugins/Popup/src/opttree.h @@ -30,7 +30,7 @@ typedef struct { int iconIndex;
LPTSTR pszOptionName;
int groupId;
- DWORD dwFlag;
+ uint32_t dwFlag;
HTREEITEM hItem;
LPTSTR pszSettingName;
BOOL bState;
@@ -38,8 +38,8 @@ typedef struct { } OPTTREE_OPTION;
BOOL OptTree_ProcessMessage(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, BOOL *result, int idcTree, OPTTREE_OPTION *options, int optionCount);
-DWORD OptTree_GetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int optionCount, LPTSTR pszSettingName = nullptr);
-void OptTree_SetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int optionCount, DWORD dwOptions, LPTSTR pszSettingName = nullptr);
+uint32_t OptTree_GetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int optionCount, LPTSTR pszSettingName = nullptr);
+void OptTree_SetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int optionCount, uint32_t dwOptions, LPTSTR pszSettingName = nullptr);
void OptTree_Translate(HWND hwndTree);
HTREEITEM OptTree_FindNamedTreeItemAt(HWND hwndTree, HTREEITEM hItem, LPCTSTR name);
diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp index f0c2f3ede5..b0a7d60635 100644 --- a/plugins/Popup/src/popup_wnd2.cpp +++ b/plugins/Popup/src/popup_wnd2.cpp @@ -306,8 +306,8 @@ void PopupWnd2::show() if ((m_options->UseEffect || (m_options->UseAnimations && !m_customPopup)) && m_options->FadeIn) {
IPopupPlusEffect *effect = nullptr;
m_bSlide = m_bFade = false;
- DWORD dwTime, dwTime0 = GetTickCount();
- DWORD dwTime1 = dwTime0 + m_options->FadeIn;
+ uint32_t dwTime, dwTime0 = GetTickCount();
+ uint32_t dwTime1 = dwTime0 + m_options->FadeIn;
if (m_options->UseEffect) {
m_bFade = true;
m_btAlpha0 = 0;
@@ -393,8 +393,8 @@ void PopupWnd2::hide() m_bDestroy = true;
IPopupPlusEffect *effect = nullptr;
m_bFade = m_bSlide = false;
- DWORD dwTime, dwTime0 = GetTickCount();
- DWORD dwTime1 = dwTime0 + m_options->FadeOut;
+ uint32_t dwTime, dwTime0 = GetTickCount();
+ uint32_t dwTime1 = dwTime0 + m_options->FadeOut;
if (m_options->UseEffect) {
m_bFade = true;
m_btAlpha0 = m_options->UseTransparency ? m_options->Alpha : 255;
diff --git a/plugins/Popup/src/popup_wnd2.h b/plugins/Popup/src/popup_wnd2.h index 3f4632f5d8..7f381684ac 100644 --- a/plugins/Popup/src/popup_wnd2.h +++ b/plugins/Popup/src/popup_wnd2.h @@ -45,7 +45,7 @@ public: ActionInfo() : hover(false) {}
};
- DWORD m_signature;
+ uint32_t m_signature;
private:
// style
@@ -97,7 +97,7 @@ private: // system
POPUPOPTIONS *m_options;
- DWORD m_lockCount;
+ uint32_t m_lockCount;
PopupSkin::RenderInfo m_renderInfo;
@@ -122,8 +122,8 @@ public: void hide();
void idle();
- DWORD lock() { return ++m_lockCount; }
- DWORD unlock() { return m_lockCount = m_lockCount ? m_lockCount - 1 : 0; }
+ uint32_t lock() { return ++m_lockCount; }
+ uint32_t unlock() { return m_lockCount = m_lockCount ? m_lockCount - 1 : 0; }
bool isLocked() { return m_lockCount != 0; }
void setIcon(HICON);
diff --git a/plugins/Popup/src/services.cpp b/plugins/Popup/src/services.cpp index a089a10a0c..eb8107d2fe 100644 --- a/plugins/Popup/src/services.cpp +++ b/plugins/Popup/src/services.cpp @@ -81,9 +81,9 @@ INT_PTR Popup_AddPopupW(WPARAM wParam, LPARAM lParam) }
//===== Popup/AddPopup2
-static __forceinline DWORD Proto_Status2Flag_My(DWORD status)
+static __forceinline uint32_t Proto_Status2Flag_My(uint32_t status)
{
- if (DWORD res = Proto_Status2Flag(status))
+ if (uint32_t res = Proto_Status2Flag(status))
return res;
return PF2_IDLE;
}
@@ -106,7 +106,7 @@ INT_PTR Popup_AddPopup2(WPARAM wParam, LPARAM lParam) POPUPDATA2 *ppd = &ppdFixed;
memcpy(ppd, ppdIn, min(ppdIn->cbSize, sizeof(POPUPDATA2)));
- DWORD disableWhen;
+ uint32_t disableWhen;
FillNotificationData(ppd, &disableWhen);
if (!(lParam & APF_NO_HISTORY))
@@ -363,7 +363,7 @@ INT_PTR Popup_RegisterPopupClass(WPARAM, LPARAM lParam) // we ignore pc->colorBack and use fonts.clBack as default (if no setting found in DB)
mir_snprintf(setting, "%s/BgCol", ptd->pupClass.pszName);
- ptd->pupClass.colorBack = (COLORREF)db_get_dw(0, PU_MODULCLASS, setting, (DWORD)fonts.clBack/*pc->colorBack*/);
+ ptd->pupClass.colorBack = (COLORREF)db_get_dw(0, PU_MODULCLASS, setting, (uint32_t)fonts.clBack/*pc->colorBack*/);
ColourIDW cid = {};
mir_snwprintf(cid.group, L"%S/%s", PU_FNT_AND_COLOR, ptd->pszDescription);
diff --git a/plugins/Popup/src/skin.cpp b/plugins/Popup/src/skin.cpp index 9c045ec41b..6d16d9bee3 100644 --- a/plugins/Popup/src/skin.cpp +++ b/plugins/Popup/src/skin.cpp @@ -418,7 +418,7 @@ void PopupSkin::measure(HDC hdc, PopupWnd2 *wnd, int maxw, POPUPOPTIONS *options wnd->setSize(sz);
}
-void PopupSkin::display(MyBitmap *bmp, PopupWnd2 *wnd, POPUPOPTIONS *options, DWORD drawFlags) const
+void PopupSkin::display(MyBitmap *bmp, PopupWnd2 *wnd, POPUPOPTIONS *options, uint32_t drawFlags) const
{
if (!m_elements) return;
@@ -1103,7 +1103,7 @@ bool Skins::load() }
else {
mir_wstrncpy(dir, VARSW(L"%miranda_path%\\skins\\popup"), _countof(dir));
- DWORD fa = GetFileAttributes(dir);
+ uint32_t fa = GetFileAttributes(dir);
if ((fa == INVALID_FILE_ATTRIBUTES) || !(fa&FILE_ATTRIBUTE_DIRECTORY))
return false;
}
diff --git a/plugins/Popup/src/skin.h b/plugins/Popup/src/skin.h index b2c23cf37b..5b64fbfe4a 100644 --- a/plugins/Popup/src/skin.h +++ b/plugins/Popup/src/skin.h @@ -128,7 +128,7 @@ public: ~PopupSkin();
void measure(HDC hdc, PopupWnd2 *wnd, int maxw, POPUPOPTIONS *options) const;
- void display(MyBitmap *bmp, PopupWnd2 *wnd, POPUPOPTIONS *options, DWORD drawFlags = DF_ALL) const;
+ void display(MyBitmap *bmp, PopupWnd2 *wnd, POPUPOPTIONS *options, uint32_t drawFlags = DF_ALL) const;
bool onMouseMove(PopupWnd2 *wnd, int x, int y) const;
bool onMouseLeave(PopupWnd2 *wnd) const;
diff --git a/plugins/ProxySwitch/src/ip.cpp b/plugins/ProxySwitch/src/ip.cpp index 1962ca7382..5b5966d664 100644 --- a/plugins/ProxySwitch/src/ip.cpp +++ b/plugins/ProxySwitch/src/ip.cpp @@ -16,7 +16,7 @@ void IP_WatchDog(void*) while (true) { HANDLE hResult; - DWORD ret = NotifyAddrChange(&hResult, &overlap); + uint32_t ret = NotifyAddrChange(&hResult, &overlap); if (ret != NO_ERROR && WSAGetLastError() != WSA_IO_PENDING) { Netlib_Logf(0, "NotifyAddrChange Error: %d/nRestart Miranda NG to restore IP monitor.", WSAGetLastError()); break; @@ -143,7 +143,7 @@ int Create_NIF_List(NETWORK_INTERFACE_LIST *list) PIP_ADAPTER_ADDRESSES pAddresses, pAddr; ULONG outBufLen; wchar_t *tmp_opt, *intf, *rest, *name; - DWORD out; + uint32_t out; // prepare and load IP_ADAPTER_ADDRESSES outBufLen = 0; diff --git a/plugins/ProxySwitch/src/opt.cpp b/plugins/ProxySwitch/src/opt.cpp index c02bee1a57..3f9048ce3e 100644 --- a/plugins/ProxySwitch/src/opt.cpp +++ b/plugins/ProxySwitch/src/opt.cpp @@ -180,6 +180,6 @@ void SaveSettings(void) g_plugin.setByte("PopupEnabled", (uint8_t)opt_popups); g_plugin.setByte("PopupDefaultColors", (uint8_t)opt_defaultColors); g_plugin.setByte("ShowProxyStatus", (uint8_t)opt_showProxyState); - g_plugin.setDword("PopupBgColor", (DWORD)opt_bgColor); - g_plugin.setDword("PopupTxtColor", (DWORD)opt_txtColor); + g_plugin.setDword("PopupBgColor", (uint32_t)opt_bgColor); + g_plugin.setDword("PopupTxtColor", (uint32_t)opt_txtColor); } diff --git a/plugins/ProxySwitch/src/proxy.cpp b/plugins/ProxySwitch/src/proxy.cpp index 45ac91f303..403b39c3b8 100644 --- a/plugins/ProxySwitch/src/proxy.cpp +++ b/plugins/ProxySwitch/src/proxy.cpp @@ -28,7 +28,7 @@ int Enum_Settings(const char *szSetting, LPARAM lParam) return 0; } -int Enum_Modules(const char *szModuleName, DWORD, LPARAM lParam) +int Enum_Modules(const char *szModuleName, uint32_t, LPARAM lParam) { //DBCONTACTENUMSETTINGS e; MCONTACT hContact = NULL; diff --git a/plugins/ProxySwitch/src/stdafx.h b/plugins/ProxySwitch/src/stdafx.h index f9044260f3..ea19ffdd1a 100644 --- a/plugins/ProxySwitch/src/stdafx.h +++ b/plugins/ProxySwitch/src/stdafx.h @@ -184,7 +184,7 @@ typedef struct { typedef struct { char ProtoName[MAXLABELLENGTH]; - DWORD Status; + uint32_t Status; } PROTO_SETTING, *PPROTO_SETTING; typedef struct { diff --git a/plugins/QuickContacts/src/dialog.cpp b/plugins/QuickContacts/src/dialog.cpp index 9418d9f7d1..bd43307bd4 100644 --- a/plugins/QuickContacts/src/dialog.cpp +++ b/plugins/QuickContacts/src/dialog.cpp @@ -331,8 +331,8 @@ LRESULT CALLBACK EditProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) break; wchar_t sztext[120] = L""; - DWORD start; - DWORD end; + uint32_t start; + uint32_t end; int ret = SendMessage(hdlg, EM_GETSEL, (WPARAM)&start, (LPARAM)&end); @@ -664,7 +664,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA Clist_MenuProcessCommand(LOWORD(ret), MPCF_CONTACTMENU, hContact); } - g_plugin.setDword("LastSentTo", (DWORD)hContact); + g_plugin.setDword("LastSentTo", (uint32_t)hContact); } break; diff --git a/plugins/QuickMessages/src/Utils.cpp b/plugins/QuickMessages/src/Utils.cpp index 47f50d34b5..5cff23a20b 100644 --- a/plugins/QuickMessages/src/Utils.cpp +++ b/plugins/QuickMessages/src/Utils.cpp @@ -237,7 +237,7 @@ static HANDLE AddIcon(char* szIcoName) return g_plugin.addIcon(&sid); } -DWORD BalanceButtons(int buttonsWas, int buttonsNow) +uint32_t BalanceButtons(int buttonsWas, int buttonsNow) { BBButton bb = {}; bb.pszModuleName = MODULENAME; diff --git a/plugins/QuickMessages/src/Utils.h b/plugins/QuickMessages/src/Utils.h index 872d6e0b15..1ed67497cc 100644 --- a/plugins/QuickMessages/src/Utils.h +++ b/plugins/QuickMessages/src/Utils.h @@ -28,15 +28,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. typedef struct _tagButtonData
{
- DWORD dwPos;
- DWORD dwOPPos;
+ uint32_t dwPos;
+ uint32_t dwOPPos;
uint8_t fEntryType;
uint8_t fEntryOpType;
uint8_t bIsServName;
uint8_t bIsOpServName;
uint8_t bInQMenu;
uint8_t bOpInQMenu;
- DWORD dwOPFlags;
+ uint32_t dwOPFlags;
wchar_t *pszName;
wchar_t *pszValue;
wchar_t *pszOpValue;
@@ -46,19 +46,19 @@ typedef struct _tagButtonData typedef struct _tagListData
{
SortedList* sl;
- DWORD dwPos;
- DWORD dwOPPos;
+ uint32_t dwPos;
+ uint32_t dwOPPos;
wchar_t* ptszQValue;
wchar_t* ptszOPQValue;
wchar_t* ptszButtonName;
uint8_t bIsServName;
uint8_t bIsOpServName;
- DWORD dwOPFlags;
+ uint32_t dwOPFlags;
}ListData;
typedef struct _tagQuickData
{
- DWORD dwPos;
+ uint32_t dwPos;
BOOL bIsService;
uint8_t fEntryType;
wchar_t* ptszValue;
@@ -77,5 +77,5 @@ void RemoveMenuEntryNode(SortedList *pList, int index); void DestroyButton(int listnum);
void SaveModuleSettings(int buttonnum,ButtonData* bd);
void CleanSettings(int buttonnum,int from);
-DWORD BalanceButtons(int buttonsWas,int buttonsNow);
+uint32_t BalanceButtons(int buttonsWas,int buttonsNow);
wchar_t* ParseString(MCONTACT hContact,wchar_t* ptszQValueIn,wchar_t* ptszText,wchar_t* ptszClip,int QVSize,int TextSize ,int ClipSize);
diff --git a/plugins/QuickMessages/src/options.cpp b/plugins/QuickMessages/src/options.cpp index 35bb822645..4923e55023 100644 --- a/plugins/QuickMessages/src/options.cpp +++ b/plugins/QuickMessages/src/options.cpp @@ -500,7 +500,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) {
switch (msg) {
case WM_INITDIALOG: {
- DWORD style;
+ uint32_t style;
g_opHdlg = hdlg;
bOptionsInit = TRUE;
TranslateDialogDefault(hdlg);
diff --git a/plugins/QuickReplies/src/options.cpp b/plugins/QuickReplies/src/options.cpp index e3c1df2cad..81ec12ddcd 100644 --- a/plugins/QuickReplies/src/options.cpp +++ b/plugins/QuickReplies/src/options.cpp @@ -34,7 +34,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;
wchar_t text[1024];
SendMessage(hwnd, EM_GETSEL, (WPARAM)&end, 0);
diff --git a/plugins/QuickSearch/src/stdafx.h b/plugins/QuickSearch/src/stdafx.h index 71481a7b36..84ca0c16a7 100644 --- a/plugins/QuickSearch/src/stdafx.h +++ b/plugins/QuickSearch/src/stdafx.h @@ -78,7 +78,7 @@ struct ServiceDescr { char *service; LPARAM wParam, lParam; - DWORD wFlags, lFlags, flags; + uint32_t wFlags, lFlags, flags; }; struct ColumnItem : public MZeroedObject @@ -195,18 +195,18 @@ struct CMPlugin : public PLUGIN<CMPlugin> RECT m_rect; OBJLIST<ColumnItem> m_columns; int m_sortOrder; - DWORD m_flags; // QSO_* constants + uint32_t m_flags; // QSO_* constants void LoadOptWnd(); void SaveOptWnd(); int LoadColumns(OBJLIST<ColumnItem>&); void LoadColumn(int n, ColumnItem &col); - void LoadParamValue(char *buf, DWORD &flags, LPARAM &value); + void LoadParamValue(char *buf, uint32_t &flags, LPARAM &value); void SaveOptions(); void SaveColumn(int n, const ColumnItem &col); - void SaveParamValue(char *buf, DWORD flags, LPARAM value); + void SaveParamValue(char *buf, uint32_t flags, LPARAM value); int Load() override; int Unload() override; @@ -225,9 +225,9 @@ void SnapToScreen(RECT &rc); const wchar_t* cnf2str(int); -wchar_t* BuildLastSeenTime(DWORD timestamp); -DWORD BuildLastSeenTimeInt(MCONTACT hContact, const char *szModule); -wchar_t* TimeToStrW(DWORD timestamp); +wchar_t* BuildLastSeenTime(uint32_t timestamp); +uint32_t BuildLastSeenTimeInt(MCONTACT hContact, const char *szModule); +wchar_t* TimeToStrW(uint32_t timestamp); ///////////////////////////////////////////////////////////////////////////////////////// // windows.cpp @@ -235,7 +235,7 @@ wchar_t* TimeToStrW(DWORD timestamp); struct QSFlags { union { - DWORD flags = 0; + uint32_t flags = 0; struct { bool bInList : 1; // in constant list bool bActive : 1; // contact in listview diff --git a/plugins/QuickSearch/src/utils.cpp b/plugins/QuickSearch/src/utils.cpp index 930329c3ee..8703c25220 100644 --- a/plugins/QuickSearch/src/utils.cpp +++ b/plugins/QuickSearch/src/utils.cpp @@ -338,7 +338,7 @@ void CMPlugin::LoadColumn(int n, ColumnItem &col) } } -void CMPlugin::LoadParamValue(char *buf, DWORD &dwFlags, LPARAM &dwWalue) +void CMPlugin::LoadParamValue(char *buf, uint32_t &dwFlags, LPARAM &dwWalue) { char *pEnd = buf + strlen(buf); strcpy(pEnd, "flags"); dwFlags = getDword(buf); @@ -432,7 +432,7 @@ void CMPlugin::SaveColumn(int n, const ColumnItem &col) } } -void CMPlugin::SaveParamValue(char *buf, DWORD flags, LPARAM value) +void CMPlugin::SaveParamValue(char *buf, uint32_t flags, LPARAM value) { char *pEnd = buf + strlen(buf); strcpy(pEnd, "flags"); setDword(buf, flags); @@ -500,7 +500,7 @@ const wchar_t* cnf2str(int cnf) ///////////////////////////////////////////////////////////////////////////////////////// // formatters -wchar_t* BuildLastSeenTime(DWORD ts) +wchar_t* BuildLastSeenTime(uint32_t ts) { int year = ts / (60 * 24 * 31 * 356); if (year == 0) @@ -516,7 +516,7 @@ wchar_t* BuildLastSeenTime(DWORD ts) return CMStringW(FORMAT, L"%02d.%02d.%04d - %02d:%02d", year, month, day, hours, mins).Detach(); } -DWORD BuildLastSeenTimeInt(MCONTACT hContact, const char *szModule) +uint32_t BuildLastSeenTimeInt(MCONTACT hContact, const char *szModule) { int year = db_get_w(hContact, szModule, "Year"); if (year == 0) @@ -530,7 +530,7 @@ DWORD BuildLastSeenTimeInt(MCONTACT hContact, const char *szModule) return ((((year - 1980) * 356 + month) * 31 + day) * 24 + hours) * 60 + minutes; } -wchar_t* TimeToStrW(DWORD timestamp) +wchar_t* TimeToStrW(uint32_t timestamp) { wchar_t buf[63]; TimeZone_ToStringW(timestamp, L"d - t", buf, _countof(buf)); diff --git a/plugins/QuickSearch/src/window_row.cpp b/plugins/QuickSearch/src/window_row.cpp index c86148dff0..9b225b8874 100644 --- a/plugins/QuickSearch/src/window_row.cpp +++ b/plugins/QuickSearch/src/window_row.cpp @@ -96,14 +96,14 @@ void CRowItem::GetCellColor(int idx, COLORREF &clrBack, COLORREF &clrText) ///////////////////////////////////////////////////////////////////////////////////////// -static wchar_t* int2strw(DWORD num) +static wchar_t* int2strw(uint32_t num) { wchar_t buf[64]; _itow_s(num, buf, 10); return mir_wstrdup(buf); } -static wchar_t* hex2strw(DWORD num) +static wchar_t* hex2strw(uint32_t num) { wchar_t buf[64]; _itow_s(num, buf, 16); diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp index 6d75e6afc1..9b2970e5af 100644 --- a/plugins/RecentContacts/src/RecentContacts.cpp +++ b/plugins/RecentContacts/src/RecentContacts.cpp @@ -447,8 +447,8 @@ int Create_MenuitemShowList(void) static void SaveLastUsedTimeStamp(MCONTACT hContact)
{
__time64_t ct = _time64(nullptr);
- g_plugin.setDword(hContact, dbLastUC_LastUsedTimeLo, (DWORD)ct);
- g_plugin.setDword(hContact, dbLastUC_LastUsedTimeHi, (DWORD)(ct >> 32));
+ g_plugin.setDword(hContact, dbLastUC_LastUsedTimeLo, (uint32_t)ct);
+ g_plugin.setDword(hContact, dbLastUC_LastUsedTimeHi, (uint32_t)(ct >> 32));
}
static int OnGCInEvent(WPARAM, LPARAM lParam)
diff --git a/plugins/RemovePersonalSettings/src/rps.cpp b/plugins/RemovePersonalSettings/src/rps.cpp index 1f38b1620e..8829c265ee 100644 --- a/plugins/RemovePersonalSettings/src/rps.cpp +++ b/plugins/RemovePersonalSettings/src/rps.cpp @@ -77,7 +77,7 @@ BOOL GetSettingBool(const char *section, const char *key, BOOL defaultValue) BOOL GetSettings(const char *section, char *buffer, size_t bufferSize)
{
buffer[0] = '\0\0';
- return (BOOL)GetPrivateProfileSectionA(section, buffer, (DWORD)bufferSize, gIniFile) != 0;
+ return (BOOL)GetPrivateProfileSectionA(section, buffer, (uint32_t)bufferSize, gIniFile) != 0;
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -85,7 +85,7 @@ BOOL GetSettings(const char *section, char *buffer, size_t bufferSize) void DeleteFileOrFolder(const char *name)
{
- DWORD attibs = GetFileAttributesA(name);
+ uint32_t attibs = GetFileAttributesA(name);
if (attibs == INVALID_FILE_ATTRIBUTES) { // Not exists
// Try to find it
diff --git a/plugins/Scriver/src/chat_options.cpp b/plugins/Scriver/src/chat_options.cpp index a195e40644..adc391c014 100644 --- a/plugins/Scriver/src/chat_options.cpp +++ b/plugins/Scriver/src/chat_options.cpp @@ -71,7 +71,7 @@ static HTREEITEM InsertBranch(HWND hwndTree, wchar_t *pszDescr, BOOL bExpanded) return TreeView_InsertItem(hwndTree, &tvis);
}
-static void FillBranch(HWND hwndTree, HTREEITEM hParent, struct branch_t *branch, int nValues, DWORD defaultval)
+static void FillBranch(HWND hwndTree, HTREEITEM hParent, struct branch_t *branch, int nValues, uint32_t defaultval)
{
int iState;
@@ -106,7 +106,7 @@ static void SaveBranch(HWND hwndTree, struct branch_t *branch, int nValues) iState |= branch[i].iMode;
if (iState&GC_EVENT_ADDSTATUS)
iState |= GC_EVENT_REMOVESTATUS;
- db_set_dw(0, CHAT_MODULE, branch[i].szDBName, (DWORD)iState);
+ db_set_dw(0, CHAT_MODULE, branch[i].szDBName, (uint32_t)iState);
}
else db_set_b(0, CHAT_MODULE, branch[i].szDBName, bChecked);
}
@@ -614,9 +614,9 @@ static INT_PTR CALLBACK DlgProcOptionsPopup(HWND hwndDlg, UINT uMsg, WPARAM wPar db_set_w(0, CHAT_MODULE, "PopupTimeout", (uint16_t)iLen);
g_Settings.crPUBkgColour = SendDlgItemMessage(hwndDlg, IDC_CHAT_BKG, CPM_GETCOLOUR, 0, 0);
- db_set_dw(0, CHAT_MODULE, "PopupColorBG", (DWORD)SendDlgItemMessage(hwndDlg, IDC_CHAT_BKG, CPM_GETCOLOUR, 0, 0));
+ db_set_dw(0, CHAT_MODULE, "PopupColorBG", (uint32_t)SendDlgItemMessage(hwndDlg, IDC_CHAT_BKG, CPM_GETCOLOUR, 0, 0));
g_Settings.crPUTextColour = SendDlgItemMessage(hwndDlg, IDC_CHAT_TEXT, CPM_GETCOLOUR, 0, 0);
- db_set_dw(0, CHAT_MODULE, "PopupColorText", (DWORD)SendDlgItemMessage(hwndDlg, IDC_CHAT_TEXT, CPM_GETCOLOUR, 0, 0));
+ db_set_dw(0, CHAT_MODULE, "PopupColorText", (uint32_t)SendDlgItemMessage(hwndDlg, IDC_CHAT_TEXT, CPM_GETCOLOUR, 0, 0));
}
return TRUE;
}
diff --git a/plugins/Scriver/src/globals.h b/plugins/Scriver/src/globals.h index 19b61bdcb9..af10248c72 100644 --- a/plugins/Scriver/src/globals.h +++ b/plugins/Scriver/src/globals.h @@ -90,17 +90,17 @@ struct TabFlags struct GlobalMessageData
{
union {
- DWORD dwFlags;
+ uint32_t dwFlags;
WindowFlags flags;
};
union {
- DWORD dwFlags2;
+ uint32_t dwFlags2;
TabFlags flags2;
};
- DWORD openFlags;
- DWORD limitNamesLength;
+ uint32_t openFlags;
+ uint32_t limitNamesLength;
int activeAlpha;
int inactiveAlpha;
SendMode sendMode;
@@ -116,7 +116,7 @@ struct GlobalMessageData HBRUSH hInfobarBrush;
int toolbarPosition;
HWND hFocusWnd;
- DWORD logLineColour;
+ uint32_t logLineColour;
int logPixelSX;
int logPixelSY;
HICON hMsgIcon;
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index 640060ee22..cb898c9107 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -283,7 +283,7 @@ bool CMsgDialog::OnInitDialog() else
db_event_get(m_hDbEventFirst, &dbei);
- DWORD firstTime = dbei.timestamp - 60 * g_plugin.iLoadTime;
+ uint32_t firstTime = dbei.timestamp - 60 * g_plugin.iLoadTime;
for (;;) {
hPrevEvent = pCursor.FetchNext();
if (hPrevEvent == 0)
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp index 76b1a7bde8..7149c1d410 100644 --- a/plugins/Scriver/src/msglog.cpp +++ b/plugins/Scriver/src/msglog.cpp @@ -110,7 +110,7 @@ EventData* CMsgDialog::GetEventFromDB(MCONTACT hContact, MEVENT hDbEvent) evt->szNick.w = mir_wstrdup(Clist_GetContactDisplayName(hContact));
if (evt->eventType == EVENTTYPE_FILE) {
- char *filename = ((char*)dbei.pBlob) + sizeof(DWORD);
+ char *filename = ((char*)dbei.pBlob) + sizeof(uint32_t);
char *descr = filename + mir_strlen(filename) + 1;
evt->szText.w = DbEvent_GetString(&dbei, filename);
if (*descr != 0)
@@ -124,7 +124,7 @@ EventData* CMsgDialog::GetEventFromDB(MCONTACT hContact, MEVENT hDbEvent) return evt;
}
-static EventData* GetTestEvent(DWORD flags)
+static EventData* GetTestEvent(uint32_t flags)
{
EventData *evt = (EventData *)mir_calloc(sizeof(EventData));
evt->eventType = EVENTTYPE_MESSAGE;
@@ -706,7 +706,7 @@ void CLogWindow::Attach() {
CSuper::Attach();
- DWORD dwExStyle = GetWindowLongPtr(m_rtf.GetHwnd(), GWL_EXSTYLE);
+ uint32_t dwExStyle = GetWindowLongPtr(m_rtf.GetHwnd(), GWL_EXSTYLE);
SetWindowLongPtr(m_rtf.GetHwnd(), GWL_EXSTYLE, (m_pDlg.m_bUseRtl) ? dwExStyle | WS_EX_LEFTSCROLLBAR : dwExStyle & ~WS_EX_LEFTSCROLLBAR);
// Workaround to make Richedit display RTL messages correctly
diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp index 04aff9202f..9b0f0c8d57 100644 --- a/plugins/Scriver/src/msgoptions.cpp +++ b/plugins/Scriver/src/msgoptions.cpp @@ -193,7 +193,7 @@ public: struct CheckBoxValues_t
{
- DWORD style;
+ uint32_t style;
const wchar_t *szDescr;
};
@@ -211,7 +211,7 @@ static const struct CheckBoxValues_t statusValues[] = class CMainOptionsDlg : public CBaseOptionDlg
{
- void FillCheckBoxTree(const struct CheckBoxValues_t *values, int nValues, DWORD style)
+ void FillCheckBoxTree(const struct CheckBoxValues_t *values, int nValues, uint32_t style)
{
TVINSERTSTRUCT tvis;
tvis.hParent = nullptr;
@@ -226,9 +226,9 @@ class CMainOptionsDlg : public CBaseOptionDlg }
}
- DWORD MakeCheckBoxTreeFlags()
+ uint32_t MakeCheckBoxTreeFlags()
{
- DWORD flags = 0;
+ uint32_t flags = 0;
TVITEMEX tvi;
tvi.mask = TVIF_HANDLE | TVIF_PARAM | TVIF_STATE;
tvi.hItem = m_tree.GetRoot();
diff --git a/plugins/Scriver/src/msgs.h b/plugins/Scriver/src/msgs.h index 06dbefe672..aa33a9031d 100644 --- a/plugins/Scriver/src/msgs.h +++ b/plugins/Scriver/src/msgs.h @@ -55,7 +55,7 @@ struct EventData {
int cbSize;
int iType;
- DWORD dwFlags;
+ uint32_t dwFlags;
const char *fontName;
int fontSize;
int fontStyle;
@@ -63,8 +63,8 @@ struct EventData MAllStrings szNick; // Nick, usage depends on type of event
MAllStrings szText; // Text, usage depends on type of event
MAllStrings szText2; // Text, usage depends on type of event
- DWORD time;
- DWORD eventType;
+ uint32_t time;
+ uint32_t eventType;
BOOL custom;
EventData *next;
};
@@ -115,7 +115,7 @@ class CMsgDialog : public CSrmmBaseDialog int m_minLogBoxHeight, m_minEditBoxHeight;
int m_iShowUnread;
uint16_t m_wStatus;
- DWORD m_lastMessage;
+ uint32_t m_lastMessage;
int m_iMessagesInProgress;
int m_iSendAllConfirm;
HICON m_hStatusIcon, m_hStatusIconBig, m_hStatusIconOverlay;
diff --git a/plugins/Scriver/src/msgutils.cpp b/plugins/Scriver/src/msgutils.cpp index 6764ff9598..934823bc9a 100644 --- a/plugins/Scriver/src/msgutils.cpp +++ b/plugins/Scriver/src/msgutils.cpp @@ -92,7 +92,7 @@ bool CMsgDialog::IsTypingNotificationSupported() if (!m_hContact || !m_szProto) return false; - 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 false; return true; @@ -103,11 +103,11 @@ bool CMsgDialog::IsTypingNotificationEnabled() if (!g_plugin.getByte(m_hContact, SRMSGSET_TYPING, g_plugin.bTypingNew)) return FALSE; - DWORD protoStatus = Proto_GetStatus(m_szProto); + uint32_t protoStatus = Proto_GetStatus(m_szProto); if (protoStatus < ID_STATUS_ONLINE) return FALSE; - 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 FALSE; diff --git a/plugins/Scriver/src/stdafx.h b/plugins/Scriver/src/stdafx.h index 5868e94aa4..1f72d10d64 100644 --- a/plugins/Scriver/src/stdafx.h +++ b/plugins/Scriver/src/stdafx.h @@ -80,7 +80,7 @@ struct CMPlugin : public PLUGIN<CMPlugin> CMOption<uint8_t> bShowTyping, bShowTypingWin, bShowTypingTray, bShowTypingClist, bShowTypingSwitch;
CMOption<uint8_t> iFlashCount, iHistoryMode;
CMOption<uint16_t> iLimitNames, iLimitTabs, iLimitChatTabs, iLoadCount, iLoadTime, iIndentSize, iAutoResizeLines;
- CMOption<DWORD> iPopFlags, iMsgTimeout, iActiveAlpha, iInactiveAlpha;
+ CMOption<uint32_t> iPopFlags, iMsgTimeout, iActiveAlpha, iInactiveAlpha;
CMPlugin();
diff --git a/plugins/Scriver/src/tabs.cpp b/plugins/Scriver/src/tabs.cpp index 2a138e80ee..7ac7de89c7 100644 --- a/plugins/Scriver/src/tabs.cpp +++ b/plugins/Scriver/src/tabs.cpp @@ -332,7 +332,7 @@ void ParentWindowData::SetContainerWindowStyle() {
ShowWindow(m_hwndStatus, (flags2.bShowStatusBar) ? SW_SHOW : SW_HIDE);
- DWORD ws = GetWindowLongPtr(m_hwnd, GWL_STYLE) & ~(WS_CAPTION);
+ uint32_t ws = GetWindowLongPtr(m_hwnd, GWL_STYLE) & ~(WS_CAPTION);
if (flags2.bShowTitleBar)
ws |= WS_CAPTION;
@@ -393,7 +393,7 @@ void ParentWindowData::ToggleTitleBar() {
flags2.bShowTitleBar = !flags2.bShowTitleBar;
- DWORD ws = GetWindowLongPtr(m_hwnd, GWL_STYLE) & ~(WS_CAPTION);
+ uint32_t ws = GetWindowLongPtr(m_hwnd, GWL_STYLE) & ~(WS_CAPTION);
if (flags2.bShowTitleBar)
ws |= WS_CAPTION;
SetWindowLongPtr(m_hwnd, GWL_STYLE, ws);
@@ -1030,7 +1030,7 @@ static INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wPara case WM_ACTIVATE:
if (LOWORD(wParam) == WA_INACTIVE) {
- DWORD ws = GetWindowLongPtr(hwndDlg, GWL_EXSTYLE) & ~WS_EX_LAYERED;
+ uint32_t ws = GetWindowLongPtr(hwndDlg, GWL_EXSTYLE) & ~WS_EX_LAYERED;
ws |= dat->flags2.bUseTransparency ? WS_EX_LAYERED : 0;
SetWindowLongPtr(hwndDlg, GWL_EXSTYLE, ws);
if (dat->flags2.bUseTransparency)
@@ -1048,7 +1048,7 @@ static INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wPara }
{
- DWORD ws = GetWindowLongPtr(hwndDlg, GWL_EXSTYLE) & ~WS_EX_LAYERED;
+ uint32_t ws = GetWindowLongPtr(hwndDlg, GWL_EXSTYLE) & ~WS_EX_LAYERED;
ws |= dat->flags2.bUseTransparency ? WS_EX_LAYERED : 0;
SetWindowLongPtr(hwndDlg, GWL_EXSTYLE, ws);
}
diff --git a/plugins/SecureIM/src/gettime.cpp b/plugins/SecureIM/src/gettime.cpp index 4da5fe98c8..04bcef35f7 100644 --- a/plugins/SecureIM/src/gettime.cpp +++ b/plugins/SecureIM/src/gettime.cpp @@ -7,7 +7,7 @@ const static long div_100_nsec = 10000000; /* POSIX or Unix Epoch (1-Jan-1970 00:00) in FILETIME units */
const static ULONGLONG ix_epoch = 116444736000000000;
-DWORD gettime(void)
+uint32_t gettime(void)
{
ULONGLONG diff_100_nsec;
union
@@ -20,5 +20,5 @@ DWORD gettime(void) diff_100_nsec = now.u.QuadPart - ix_epoch;
- return (DWORD)(diff_100_nsec / div_100_nsec);
+ return (uint32_t)(diff_100_nsec / div_100_nsec);
}
diff --git a/plugins/SecureIM/src/gettime.h b/plugins/SecureIM/src/gettime.h index 05d2d1b96a..6c5820c77a 100644 --- a/plugins/SecureIM/src/gettime.h +++ b/plugins/SecureIM/src/gettime.h @@ -1,6 +1,6 @@ #ifndef __GETTIME_H__
#define __GETTIME_H__
-DWORD gettime(void);
+uint32_t gettime(void);
#endif
diff --git a/plugins/SecureIM/src/images.cpp b/plugins/SecureIM/src/images.cpp index acf8c3ac7c..0d75da04d1 100644 --- a/plugins/SecureIM/src/images.cpp +++ b/plugins/SecureIM/src/images.cpp @@ -7,7 +7,7 @@ void HalfBitmap32Alpha(HBITMAP hBitmap) if (bmp.bmBitsPixel != 32)
return;
- DWORD dwLen = bmp.bmWidth * bmp.bmHeight * (bmp.bmBitsPixel / 8);
+ uint32_t dwLen = bmp.bmWidth * bmp.bmHeight * (bmp.bmBitsPixel / 8);
uint8_t *p = (uint8_t *)malloc(dwLen);
if (p == nullptr)
return;
@@ -37,7 +37,7 @@ void MakeBmpTransparent(HBITMAP hBitmap) if (bmp.bmBitsPixel != 32)
return;
- DWORD dwLen = bmp.bmWidth * bmp.bmHeight * (bmp.bmBitsPixel / 8);
+ uint32_t dwLen = bmp.bmWidth * bmp.bmHeight * (bmp.bmBitsPixel / 8);
uint8_t *p = (uint8_t *)malloc(dwLen);
if (p == nullptr)
return;
@@ -52,7 +52,7 @@ void MakeBmpTransparent(HBITMAP hBitmap) void CorrectBitmap32Alpha(HBITMAP hBitmap, BOOL force)
{
BITMAP bmp;
- DWORD dwLen;
+ uint32_t dwLen;
uint8_t *p;
int x, y;
BOOL fixIt;
@@ -99,7 +99,7 @@ HBITMAP CopyBitmapTo32(HBITMAP hBitmap) uint8_t * ptPixels;
BITMAP bmp;
- DWORD dwLen;
+ uint32_t dwLen;
uint8_t *p;
GetObject(hBitmap, sizeof(bmp), &bmp);
@@ -199,7 +199,7 @@ BOOL MakeGrayscale(HBITMAP *hBitmap) {
uint8_t *p = nullptr;
uint8_t *p1;
- DWORD dwLen;
+ uint32_t dwLen;
int width, height, x, y;
BITMAP bmp;
diff --git a/plugins/SecureIM/src/mmi.cpp b/plugins/SecureIM/src/mmi.cpp index 8e77158930..51e6011903 100644 --- a/plugins/SecureIM/src/mmi.cpp +++ b/plugins/SecureIM/src/mmi.cpp @@ -103,13 +103,13 @@ void __fastcall safe_delete(void** p) }
// преобразуем текÑÑ‚ из чиÑтого UTF8 в формат миранды
-LPSTR utf8_to_miranda(LPCSTR szUtfMsg, DWORD& flags)
+LPSTR utf8_to_miranda(LPCSTR szUtfMsg, uint32_t& flags)
{
return mir_strdup(szUtfMsg);
}
// преобразуем текÑÑ‚ из формата миранды в чиÑтый UTF8
-LPSTR miranda_to_utf8(LPCSTR szMirMsg, DWORD flags)
+LPSTR miranda_to_utf8(LPCSTR szMirMsg, uint32_t flags)
{
return mir_strdup(szMirMsg);
}
diff --git a/plugins/SecureIM/src/mmi.h b/plugins/SecureIM/src/mmi.h index e82f2419ab..0c792b172f 100644 --- a/plugins/SecureIM/src/mmi.h +++ b/plugins/SecureIM/src/mmi.h @@ -7,8 +7,8 @@ char *m_aastrcat(LPCSTR,LPCSTR); char *m_ustrcat(LPCSTR,LPCSTR);
LPSTR to_hex(uint8_t*,int);
-LPSTR utf8_to_miranda(LPCSTR,DWORD&);
-LPSTR miranda_to_utf8(LPCSTR,DWORD);
+LPSTR utf8_to_miranda(LPCSTR,uint32_t&);
+LPSTR miranda_to_utf8(LPCSTR,uint32_t);
void *operator new(size_t sz);
void operator delete(void *p);
diff --git a/plugins/SecureIM/src/popupOptions.cpp b/plugins/SecureIM/src/popupOptions.cpp index 5d66fb436f..cbf0fa81a9 100644 --- a/plugins/SecureIM/src/popupOptions.cpp +++ b/plugins/SecureIM/src/popupOptions.cpp @@ -74,7 +74,7 @@ INT_PTR CALLBACK PopOptionsDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM l case WM_COMMAND:
if (HIWORD(wParam) == CPN_COLOURCHANGED) {
//It's a colour picker change. LOWORD(wParam) is the control id.
- DWORD color = SendDlgItemMessage(hDlg, LOWORD(wParam), CPM_GETCOLOUR, 0, 0);
+ uint32_t color = SendDlgItemMessage(hDlg, LOWORD(wParam), CPM_GETCOLOUR, 0, 0);
switch (LOWORD(wParam)) {
case IDC_BACKKEY:
diff --git a/plugins/SeenPlugin/src/options.cpp b/plugins/SeenPlugin/src/options.cpp index 01b8237256..af07e1fee6 100644 --- a/plugins/SeenPlugin/src/options.cpp +++ b/plugins/SeenPlugin/src/options.cpp @@ -112,7 +112,7 @@ public: for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_MAX; i++) {
char szSetting[100];
mir_snprintf(szSetting, "Col_%d", i - ID_STATUS_OFFLINE);
- DWORD sett = g_plugin.getDword(szSetting, StatusColors15bits[i - ID_STATUS_OFFLINE]);
+ uint32_t sett = g_plugin.getDword(szSetting, StatusColors15bits[i - ID_STATUS_OFFLINE]);
COLORREF back, text;
GetColorsFromDWord(&back, &text, sett);
@@ -137,7 +137,7 @@ public: for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_MAX; i++) {
COLORREF back = SendDlgItemMessage(m_hwnd, i, CPM_GETCOLOUR, 0, 0);
COLORREF text = SendDlgItemMessage(m_hwnd, i + 20, CPM_GETCOLOUR, 0, 0);
- DWORD sett = GetDWordFromColors(back, text);
+ uint32_t sett = GetDWordFromColors(back, text);
char szSetting[100];
mir_snprintf(szSetting, "Col_%d", i - ID_STATUS_OFFLINE);
@@ -161,7 +161,7 @@ public: POPUPDATAW ppd;
ppd.colorBack = SendDlgItemMessage(m_hwnd, idBack, CPM_GETCOLOUR, 0, 0);
ppd.colorText = SendDlgItemMessage(m_hwnd, idText, CPM_GETCOLOUR, 0, 0);
- DWORD temp = GetDWordFromColors(ppd.colorBack, ppd.colorText);
+ uint32_t temp = GetDWordFromColors(ppd.colorBack, ppd.colorText);
GetColorsFromDWord(&ppd.colorBack, &ppd.colorText, temp);
SendDlgItemMessage(m_hwnd, idBack, CPM_SETCOLOUR, 0, ppd.colorBack);
SendDlgItemMessage(m_hwnd, idText, CPM_SETCOLOUR, 0, ppd.colorText);
@@ -194,7 +194,7 @@ public: void onClick_Reset(CCtrlButton *)
{
for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_MAX; i++) {
- DWORD sett = StatusColors15bits[i - ID_STATUS_OFFLINE];
+ uint32_t sett = StatusColors15bits[i - ID_STATUS_OFFLINE];
COLORREF back, text;
GetColorsFromDWord(&back, &text, sett);
SendDlgItemMessage(m_hwnd, i, CPM_SETCOLOUR, 0, back);
diff --git a/plugins/SeenPlugin/src/stdafx.h b/plugins/SeenPlugin/src/stdafx.h index 167289d503..c636358661 100644 --- a/plugins/SeenPlugin/src/stdafx.h +++ b/plugins/SeenPlugin/src/stdafx.h @@ -106,8 +106,8 @@ typedef struct{ int IsWatchedProtocol(const char* szProto);
CMStringW ParseString(const wchar_t *pwszFormat, MCONTACT);
-void GetColorsFromDWord(LPCOLORREF First, LPCOLORREF Second, DWORD colDword);
-DWORD GetDWordFromColors(COLORREF First, COLORREF Second);
+void GetColorsFromDWord(LPCOLORREF First, LPCOLORREF Second, uint32_t colDword);
+uint32_t GetDWordFromColors(COLORREF First, COLORREF Second);
int OptionsInit(WPARAM,LPARAM);
int UserinfoInit(WPARAM,LPARAM);
void InitMenuitem(void);
@@ -129,12 +129,12 @@ struct logthread_info uint16_t currStatus;
};
-extern DWORD StatusColors15bits[];
+extern uint32_t StatusColors15bits[];
extern BOOL includeIdle;
extern HANDLE ehmissed, ehuserinfo, ehmissed_proto;
extern MWindowList g_pUserInfo;
extern HGENMENU hmenuitem;
-extern DWORD dwmirver;
+extern uint32_t dwmirver;
extern bool g_bFileActive;
diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp index 45d47447ad..ee2089f5a5 100644 --- a/plugins/SeenPlugin/src/utils.cpp +++ b/plugins/SeenPlugin/src/utils.cpp @@ -75,16 +75,16 @@ bool isJabber(const char *protoname) return false;
}
-DWORD isSeen(MCONTACT hcontact, SYSTEMTIME *st)
+uint32_t isSeen(MCONTACT hcontact, SYSTEMTIME *st)
{
FILETIME ft;
ULONGLONG ll;
- DWORD res = g_plugin.getDword(hcontact, "seenTS", 0);
+ uint32_t res = g_plugin.getDword(hcontact, "seenTS", 0);
if (res) {
if (st) {
ll = UInt32x32To64(TimeZone_ToLocal(res), 10000000) + NUM100NANOSEC;
- ft.dwLowDateTime = (DWORD)ll;
- ft.dwHighDateTime = (DWORD)(ll >> 32);
+ ft.dwLowDateTime = (uint32_t)ll;
+ ft.dwHighDateTime = (uint32_t)(ll >> 32);
FileTimeToSystemTime(&ft, st);
}
return res;
@@ -104,7 +104,7 @@ DWORD isSeen(MCONTACT hcontact, SYSTEMTIME *st) ll -= NUM100NANOSEC;
ll /= 10000000;
//perform LOCALTOTIMESTAMP
- res = (DWORD)ll - TimeZone_ToLocal(0);
+ res = (uint32_t)ll - TimeZone_ToLocal(0);
//nevel look for Year/Month/Day/Hour/Minute/Second again
g_plugin.setDword(hcontact, "seenTS", res);
}
@@ -324,13 +324,13 @@ LBL_noData: return res;
}
-void DBWriteTimeTS(DWORD t, MCONTACT hcontact)
+void DBWriteTimeTS(uint32_t t, MCONTACT hcontact)
{
ULONGLONG ll = UInt32x32To64(TimeZone_ToLocal(t), 10000000) + NUM100NANOSEC;
FILETIME ft;
- ft.dwLowDateTime = (DWORD)ll;
- ft.dwHighDateTime = (DWORD)(ll >> 32);
+ ft.dwLowDateTime = (uint32_t)ll;
+ ft.dwHighDateTime = (uint32_t)(ll >> 32);
SYSTEMTIME st;
FileTimeToSystemTime(&ft, &st);
@@ -344,7 +344,7 @@ void DBWriteTimeTS(DWORD t, MCONTACT hcontact) g_plugin.setWord(hcontact, "WeekDay", st.wDayOfWeek);
}
-void GetColorsFromDWord(LPCOLORREF First, LPCOLORREF Second, DWORD colDword)
+void GetColorsFromDWord(LPCOLORREF First, LPCOLORREF Second, uint32_t colDword)
{
uint16_t temp;
COLORREF res = 0;
@@ -361,7 +361,7 @@ void GetColorsFromDWord(LPCOLORREF First, LPCOLORREF Second, DWORD colDword) if (Second) *Second = res;
}
-DWORD StatusColors15bits[] = {
+uint32_t StatusColors15bits[] = {
0x63180000, // 0x00C0C0C0, 0x00000000, Offline - LightGray
0x7B350000, // 0x00F0C8A8, 0x00000000, Online - LightBlue
0x33fe0000, // 0x0070E0E0, 0x00000000, Away - LightOrange
@@ -372,9 +372,9 @@ DWORD StatusColors15bits[] = { 0x76AF0000, // 0x00E8A878, 0x00000000, Invisible
};
-DWORD GetDWordFromColors(COLORREF First, COLORREF Second)
+uint32_t GetDWordFromColors(COLORREF First, COLORREF Second)
{
- DWORD res = 0;
+ uint32_t res = 0;
res |= (First & 0xF8) >> 3;
res |= (First & 0xF800) >> 6;
res |= (First & 0xF80000) >> 9;
@@ -412,7 +412,7 @@ void ShowPopup(MCONTACT hcontact, const char * lpzProto, int newStatus) char szSetting[10];
mir_snprintf(szSetting, "Col_%d", newStatus - ID_STATUS_OFFLINE);
- DWORD sett = g_plugin.getDword(szSetting, StatusColors15bits[newStatus - ID_STATUS_OFFLINE]);
+ uint32_t sett = g_plugin.getDword(szSetting, StatusColors15bits[newStatus - ID_STATUS_OFFLINE]);
POPUPDATAW ppd;
GetColorsFromDWord(&ppd.colorBack, &ppd.colorText, sett);
@@ -511,7 +511,7 @@ int UpdateValues(WPARAM hContact, LPARAM lparam) char str[MAXMODULELABELLENGTH + 9];
mir_snprintf(str, "OffTime-%s", szProto);
- DWORD t = g_plugin.getDword(str, 0);
+ uint32_t t = g_plugin.getDword(str, 0);
if (!t)
t = time(0);
DBWriteTimeTS(t, hContact);
diff --git a/plugins/SendScreenshotPlus/src/CSend.cpp b/plugins/SendScreenshotPlus/src/CSend.cpp index bea4f55d33..fd8c6280b7 100644 --- a/plugins/SendScreenshotPlus/src/CSend.cpp +++ b/plugins/SendScreenshotPlus/src/CSend.cpp @@ -333,7 +333,7 @@ int CSend::OnSend(void *obj, WPARAM, LPARAM lParam) break; case ACKTYPE_FILE: self->m_szEventMsg.Insert(0, "aaaa"); - self->m_cbEventMsg += sizeof(DWORD); + self->m_cbEventMsg += sizeof(uint32_t); self->DB_EventAdd((uint16_t)EVENTTYPE_FILE); break; } @@ -481,7 +481,7 @@ int CSend::HTTPFormCreate(NETLIBHTTPREQUEST* nlhr, int requestType, const char* { union { - DWORD num; + uint32_t num; unsigned char cr[4]; }; num = GetTickCount() ^ 0x8000; for (int i = 0; i < 4; ++i) { diff --git a/plugins/SendScreenshotPlus/src/CSend.h b/plugins/SendScreenshotPlus/src/CSend.h index 3d45488836..d54dad24a5 100644 --- a/plugins/SendScreenshotPlus/src/CSend.h +++ b/plugins/SendScreenshotPlus/src/CSend.h @@ -89,7 +89,7 @@ protected: void svcSendMsgExit(const char* szMessage); void Exit(unsigned int Result); - DWORD m_cbEventMsg; // sizeof EventMsg(T) buffer + uint32_t m_cbEventMsg; // sizeof EventMsg(T) buffer CMStringA m_szEventMsg; // EventMsg char* HANDLE m_hSend; // protocol send handle HANDLE m_hOnSend; // HookEventObj on ME_PROTO_ACK diff --git a/plugins/SendScreenshotPlus/src/UMainForm.cpp b/plugins/SendScreenshotPlus/src/UMainForm.cpp index bf41b3a463..8d3b3c5b59 100644 --- a/plugins/SendScreenshotPlus/src/UMainForm.cpp +++ b/plugins/SendScreenshotPlus/src/UMainForm.cpp @@ -276,7 +276,7 @@ void TfrmMain::wmInitdialog(WPARAM, LPARAM) ShowWindow(m_hwndTabPage, SW_SHOW); // enable Drag&Drop for local file pane - typedef BOOL(WINAPI *ChangeWindowMessageFilterEx_t)(HWND hwnd, UINT message, DWORD action, PCHANGEFILTERSTRUCT pChangeFilterStruct); + typedef BOOL(WINAPI *ChangeWindowMessageFilterEx_t)(HWND hwnd, UINT message, uint32_t action, PCHANGEFILTERSTRUCT pChangeFilterStruct); ChangeWindowMessageFilterEx_t pChangeWindowMessageFilterEx; pChangeWindowMessageFilterEx = (ChangeWindowMessageFilterEx_t)GetProcAddress(GetModuleHandleA("user32"), "ChangeWindowMessageFilterEx"); if (pChangeWindowMessageFilterEx) { // Win7+, UAC fix @@ -732,7 +732,7 @@ TfrmMain::~TfrmMain() void TfrmMain::LoadOptions(void) { - DWORD rgb = g_plugin.getDword("AlphaColor", 16777215); + uint32_t rgb = g_plugin.getDword("AlphaColor", 16777215); m_AlphaColor.rgbRed = GetRValue(rgb); m_AlphaColor.rgbGreen = GetGValue(rgb); m_AlphaColor.rgbBlue = GetBValue(rgb); @@ -760,7 +760,7 @@ void TfrmMain::SaveOptions(void) { if (m_bOnExitSave) { g_plugin.setDword("AlphaColor", - (DWORD)RGB(m_AlphaColor.rgbRed, m_AlphaColor.rgbGreen, m_AlphaColor.rgbBlue)); + (uint32_t)RGB(m_AlphaColor.rgbRed, m_AlphaColor.rgbGreen, m_AlphaColor.rgbBlue)); g_plugin.setByte("JpegQuality", m_opt_edtQuality); @@ -1084,7 +1084,7 @@ void TfrmMain::FormClose() shex.nShow = SW_SHOWNORMAL; ShellExecuteEx(&shex); if (shex.hProcess) { - DWORD res; + uint32_t res; MSG msg; do { // wait for editor exit or messages/input diff --git a/plugins/SendScreenshotPlus/src/Utils.h b/plugins/SendScreenshotPlus/src/Utils.h index feacba0947..58b450157b 100644 --- a/plugins/SendScreenshotPlus/src/Utils.h +++ b/plugins/SendScreenshotPlus/src/Utils.h @@ -66,7 +66,7 @@ public: inline ~EventHandle() { CloseHandle(_hEvent); } inline void Set() { SetEvent(_hEvent); } inline void Wait() { WaitForSingleObject(_hEvent, INFINITE); } - inline void Wait(DWORD dwMilliseconds) { WaitForSingleObject(_hEvent, dwMilliseconds); } + inline void Wait(uint32_t dwMilliseconds) { WaitForSingleObject(_hEvent, dwMilliseconds); } inline operator HANDLE() { return _hEvent; } }; diff --git a/plugins/SendScreenshotPlus/src/ctrl_button.cpp b/plugins/SendScreenshotPlus/src/ctrl_button.cpp index 1a32592248..e3d29d71b0 100644 --- a/plugins/SendScreenshotPlus/src/ctrl_button.cpp +++ b/plugins/SendScreenshotPlus/src/ctrl_button.cpp @@ -36,7 +36,7 @@ typedef struct TMBCtrl HBITMAP hBitmap; HFONT hFont; // font - DWORD dwStyle; + uint32_t dwStyle; uint8_t bFocus; int stateId; // button state diff --git a/plugins/SendScreenshotPlus/src/stdafx.h b/plugins/SendScreenshotPlus/src/stdafx.h index 11b55b6e2f..f65a9c0193 100644 --- a/plugins/SendScreenshotPlus/src/stdafx.h +++ b/plugins/SendScreenshotPlus/src/stdafx.h @@ -95,7 +95,7 @@ using namespace std; #define MSGINFO (text) MessageBox(NULL, text, L"SendSS", MB_OK | MB_ICONINFORMATION) typedef struct _MGLOBAL { - DWORD mirandaVersion; // mirandaVersion + uint32_t mirandaVersion; // mirandaVersion BOOLEAN PopupActionsExist : 1; // Popup+ or MS_POPUP_REGISTERACTIONS exist BOOLEAN PluginHTTPExist : 1; // HTTPServer or MS_HTTP_ACCEPT_CONNECTIONS exist BOOLEAN PluginFTPExist : 1; // FTPFile or MS_FTPFILE_UPLOAD exist diff --git a/plugins/ShellExt/src/main.cpp b/plugins/ShellExt/src/main.cpp index 3d5f1b7d0b..5be14e6fdc 100644 --- a/plugins/ShellExt/src/main.cpp +++ b/plugins/ShellExt/src/main.cpp @@ -5,7 +5,7 @@ CMPlugin g_plugin; bool bIsVistaPlus;
-BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID)
+BOOL WINAPI DllMain(HINSTANCE hinstDLL, uint32_t fdwReason, LPVOID)
{
if (fdwReason == DLL_PROCESS_ATTACH) {
bIsVistaPlus = GetProcAddress(GetModuleHandleA("kernel32.dll"), "GetProductInfo") != 0;
diff --git a/plugins/ShellExt/src/shlcom.cpp b/plugins/ShellExt/src/shlcom.cpp index 1c21c710f9..662d62a8df 100644 --- a/plugins/ShellExt/src/shlcom.cpp +++ b/plugins/ShellExt/src/shlcom.cpp @@ -9,13 +9,13 @@ int DllFactoryCount, DllObjectCount; struct TCMInvokeCommandInfo
{
int cbSize;
- DWORD fMask;
+ uint32_t fMask;
HWND hwnd;
char* lpVerb; // maybe index, type cast as Integer
char* lpParams;
char* lpDir;
int nShow;
- DWORD dwHotkey;
+ uint32_t dwHotkey;
HICON hIcon;
};
@@ -71,7 +71,7 @@ BOOL AddToList(TAddArgList& args) char szBuf[MAX_PATH];
LPSTR szThis;
- DWORD attr = GetFileAttributesA(args.szFile);
+ uint32_t attr = GetFileAttributesA(args.szFile);
if (attr != 0xFFFFFFFF && (attr & FILE_ATTRIBUTE_HIDDEN) == 0) {
if ((args.count % 10) == 5)
if (Miranda_IsTerminated() != 0)
@@ -199,7 +199,7 @@ void ipcGetSkinIcons(THeaderIPC * ipch) PROTOACCOUNT* pa = *pp;
lstrcpyA(szTmp, pa->szModuleName);
lstrcatA(szTmp, PS_GETCAPS);
- DWORD dwCaps = CallService(szTmp, PFLAGNUM_1, 0);
+ uint32_t dwCaps = CallService(szTmp, PFLAGNUM_1, 0);
if (dwCaps & PF1_FILESEND) {
TSlotIPC* pct = ipcAlloc(ipch, sizeof(TSlotProtoIcons));
if (pct != nullptr) {
@@ -259,7 +259,7 @@ bool ipcGetSortedContacts(THeaderIPC * ipch, int* pSlot, bool bGroupMode) char* szProto = Proto_GetBaseAccountName(hContact);
if (szProto != nullptr) {
// does it support file sends?
- DWORD dwCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0);
+ uint32_t dwCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0);
if ((dwCaps & PF1_FILESEND) == 0)
continue;
diff --git a/plugins/ShellExt/src/shlcom.h b/plugins/ShellExt/src/shlcom.h index a3ae5bf261..44de14ffec 100644 --- a/plugins/ShellExt/src/shlcom.h +++ b/plugins/ShellExt/src/shlcom.h @@ -55,7 +55,7 @@ struct TGroupNode int cchGroup;
HMENU hMenu;
int hMenuGroupID;
- DWORD dwItems;
+ uint32_t dwItems;
};
struct TGroupNodeList
@@ -99,10 +99,10 @@ struct TSlotIPC struct THeaderIPC
{
int cbSize;
- DWORD dwVersion;
+ uint32_t dwVersion;
void* pServerBaseAddress, * pClientBaseAddress;
int fRequests;
- DWORD dwFlags;
+ uint32_t dwFlags;
int Slots;
HANDLE Param;
char SignalEventName[64];
@@ -174,7 +174,7 @@ struct TEnumData THeaderIPC* ipch;
// OpenEvent()'d handle to give each IPC server an object to set signalled
HANDLE hWaitFor;
- DWORD pid; // sub-unique value used to make work object name
+ uint32_t pid; // sub-unique value used to make work object name
};
struct TClassFactoryRec : public IClassFactory
@@ -223,12 +223,12 @@ struct TMenuDrawInfo /////////////////////////////////////////////////////////////////////////////////////////
-void ipcPrepareRequests(int ipcPacketSize, THeaderIPC* pipch, DWORD fRequests);
-DWORD ipcSendRequest(HANDLE hSignal, HANDLE hWaitFor, THeaderIPC* pipch, DWORD dwTimeoutMsecs);
+void ipcPrepareRequests(int ipcPacketSize, THeaderIPC* pipch, uint32_t fRequests);
+uint32_t ipcSendRequest(HANDLE hSignal, HANDLE hWaitFor, THeaderIPC* pipch, uint32_t dwTimeoutMsecs);
TSlotIPC* ipcAlloc(THeaderIPC* pipch, int nSize);
void ipcFixupAddresses(THeaderIPC* pipch);
TGroupNode* AllocGroupNode(TGroupNodeList* list, TGroupNode* Root, int Depth);
-TGroupNode* FindGroupNode(TGroupNode* p, const DWORD Hash, int Depth);
+TGroupNode* FindGroupNode(TGroupNode* p, const uint32_t Hash, int Depth);
char* CreateProcessUID(int pid, char* buf, size_t bufLen);
diff --git a/plugins/ShellExt/src/shlext.cpp b/plugins/ShellExt/src/shlext.cpp index 51b1895a8e..d05e703e5f 100644 --- a/plugins/ShellExt/src/shlext.cpp +++ b/plugins/ShellExt/src/shlext.cpp @@ -593,7 +593,7 @@ BOOL __stdcall ProcessRequest(HWND hwnd, LPARAM param) // slots will be in the order of icon data, groups contacts, the first
// slot will contain the profile name
- DWORD replyBits = ipcSendRequest(hMirandaWorkEvent, lParam->hWaitFor, lParam->ipch, 1000);
+ uint32_t replyBits = ipcSendRequest(hMirandaWorkEvent, lParam->hWaitFor, lParam->ipch, 1000);
// replyBits will be REPLY_FAIL if the wait timed out, or it'll be the request
// bits as sent or a series of *_NOTIMPL bits where the request bit were, if there are no
@@ -625,8 +625,8 @@ BOOL __stdcall ProcessRequest(HWND hwnd, LPARAM param) struct DllVersionInfo
{
- DWORD cbSize;
- DWORD dwMajorVersion, dwMinorVersion, dwBuildNumber, dwPlatformID;
+ uint32_t cbSize;
+ uint32_t dwMajorVersion, dwMinorVersion, dwBuildNumber, dwPlatformID;
};
typedef HRESULT(__stdcall * pfnDllGetVersion)(DllVersionInfo*);
diff --git a/plugins/ShellExt/src/shlicons.cpp b/plugins/ShellExt/src/shlicons.cpp index d8337318ab..a963fc0b6d 100644 --- a/plugins/ShellExt/src/shlicons.cpp +++ b/plugins/ShellExt/src/shlicons.cpp @@ -52,7 +52,7 @@ HBITMAP ARGB_BitmapFromIcon(IWICImagingFactory* Factory, HDC hDC, HICON hIcon) void *pbBuffer;
hBmp = CreateDIBSection(hDC, &bmi, DIB_RGB_COLORS, &pbBuffer, nullptr, 0);
if (hBmp != nullptr) {
- UINT cbStride = cx * sizeof(DWORD); // ARGB = DWORD
+ UINT cbStride = cx * sizeof(uint32_t); // ARGB = uint32_t
UINT cbBuffer = cy * cbStride;
// note: the pbBuffer memory is owned by the DIB and will be freed when the bitmap is released
hr = bitmap->CopyPixels(nullptr, cbStride, cbBuffer, (uint8_t*)pbBuffer);
diff --git a/plugins/ShellExt/src/shlipc.cpp b/plugins/ShellExt/src/shlipc.cpp index 65e6541b4f..ac15c5ecf5 100644 --- a/plugins/ShellExt/src/shlipc.cpp +++ b/plugins/ShellExt/src/shlipc.cpp @@ -1,7 +1,7 @@ #include "stdafx.h"
#include "shlcom.h"
-TGroupNode* FindGroupNode(TGroupNode* p, const DWORD Hash, int Depth)
+TGroupNode* FindGroupNode(TGroupNode* p, const uint32_t Hash, int Depth)
{
while (p != nullptr) {
if (p->Hash == Hash && p->Depth == Depth)
@@ -41,7 +41,7 @@ TGroupNode* AllocGroupNode(TGroupNodeList *list, TGroupNode *Root, int Depth) return p;
}
-void ipcPrepareRequests(int ipcPacketSize, THeaderIPC * pipch, DWORD fRequests)
+void ipcPrepareRequests(int ipcPacketSize, THeaderIPC * pipch, uint32_t fRequests)
{
// some fields may already have values like the event object name to open
pipch->cbSize = sizeof(THeaderIPC);
@@ -68,7 +68,7 @@ void ipcPrepareRequests(int ipcPacketSize, THeaderIPC * pipch, DWORD fRequests) memset(pipch->DataPtr, 0, pipch->DataSize);
}
-DWORD ipcSendRequest(HANDLE hSignal, HANDLE hWaitFor, THeaderIPC * pipch, DWORD dwTimeoutMsecs)
+uint32_t ipcSendRequest(HANDLE hSignal, HANDLE hWaitFor, THeaderIPC * pipch, uint32_t dwTimeoutMsecs)
{
// signal ST to work
SetEvent(hSignal);
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp index 6a126d34e4..cc0834e987 100644 --- a/plugins/SimpleStatusMsg/src/main.cpp +++ b/plugins/SimpleStatusMsg/src/main.cpp @@ -1246,7 +1246,7 @@ void RegisterHotkey(void) static int ChangeStatusMsgPrebuild(WPARAM, LPARAM)
{
int iStatusMenuItemCount = 0;
- DWORD iStatusMsgFlags = 0;
+ uint32_t iStatusMsgFlags = 0;
auto &accs = Accounts();
hProtoStatusMenuItem = (HANDLE *)mir_realloc(hProtoStatusMenuItem, sizeof(HANDLE) * accs.getCount());
diff --git a/plugins/SimpleStatusMsg/src/msgbox.cpp b/plugins/SimpleStatusMsg/src/msgbox.cpp index 18978758fc..20d1a60343 100644 --- a/plugins/SimpleStatusMsg/src/msgbox.cpp +++ b/plugins/SimpleStatusMsg/src/msgbox.cpp @@ -530,7 +530,7 @@ static LRESULT CALLBACK EditBoxSubProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L return 0; } if (wParam == 127 && GetKeyState(VK_CONTROL) & 0x8000) { // Ctrl + Backspace - DWORD start, end; + uint32_t start, end; wchar_t *text; int textLen; SendMessage(hwndDlg, EM_GETSEL, (WPARAM)&end, NULL); diff --git a/plugins/SimpleStatusMsg/src/options.cpp b/plugins/SimpleStatusMsg/src/options.cpp index 6d3e02a87c..a4a891f6b7 100644 --- a/plugins/SimpleStatusMsg/src/options.cpp +++ b/plugins/SimpleStatusMsg/src/options.cpp @@ -58,7 +58,7 @@ static LRESULT CALLBACK OptEditBoxSubProc(HWND hwndDlg, UINT uMsg, WPARAM wParam }
if (wParam == 127 && GetKeyState(VK_CONTROL) & 0x8000) // Ctrl + Backspace
{
- DWORD start, end;
+ uint32_t start, end;
wchar_t *text;
int textLen;
SendMessage(hwndDlg, EM_GETSEL, (WPARAM)&end, NULL);
diff --git a/plugins/SimpleStatusMsg/src/simplestatusmsg.h b/plugins/SimpleStatusMsg/src/simplestatusmsg.h index a18012a5fe..8a75f181b4 100644 --- a/plugins/SimpleStatusMsg/src/simplestatusmsg.h +++ b/plugins/SimpleStatusMsg/src/simplestatusmsg.h @@ -26,9 +26,9 @@ struct PROTOACCOUNTS PROTOACCOUNT **pa;
int count;
int statusCount;
- DWORD statusFlags;
+ uint32_t statusFlags;
int statusMsgCount;
- DWORD statusMsgFlags;
+ uint32_t statusMsgFlags;
};
extern PROTOACCOUNTS *accounts;
diff --git a/plugins/SkypeStatusChange/src/main.cpp b/plugins/SkypeStatusChange/src/main.cpp index 01ae8cf5f4..e1ce328a51 100644 --- a/plugins/SkypeStatusChange/src/main.cpp +++ b/plugins/SkypeStatusChange/src/main.cpp @@ -142,7 +142,7 @@ static void ThreadFunc(void*) }
}
else {
- DWORD dwResult = ::MsgWaitForMultipleObjects(1, &g_hEventShutdown, FALSE, INFINITE, QS_ALLEVENTS);
+ uint32_t dwResult = ::MsgWaitForMultipleObjects(1, &g_hEventShutdown, FALSE, INFINITE, QS_ALLEVENTS);
assert(WAIT_FAILED != dwResult);
if (WAIT_OBJECT_0 == dwResult)
break;
@@ -182,7 +182,7 @@ LRESULT APIENTRY SkypeAPI_WindowProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) const char szSkypeCmdSetStatus[] = "SET USERSTATUS ";
::strncpy_s(szSkypeCmd, szSkypeCmdSetStatus, sizeof(szSkypeCmdSetStatus) / sizeof(szSkypeCmdSetStatus[0]));
::strncat_s(szSkypeCmd, ms.m_pszSkypeStatus, _countof(szSkypeCmd) - mir_strlen(szSkypeCmd));
- DWORD cLength = static_cast<DWORD>(mir_strlen(szSkypeCmd));
+ uint32_t cLength = static_cast<uint32_t>(mir_strlen(szSkypeCmd));
COPYDATASTRUCT oCopyData;
oCopyData.dwData = 0;
@@ -207,7 +207,7 @@ LRESULT APIENTRY SkypeAPI_WindowProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) oCopyData.dwData = 0;
oCopyData.lpData = szSkypeCmd;
- oCopyData.cbData = static_cast<DWORD>(mir_strlen(szSkypeCmd)) + 1;
+ oCopyData.cbData = static_cast<uint32_t>(mir_strlen(szSkypeCmd)) + 1;
SendMessage(wndSkypeAPIWindow, WM_COPYDATA, (WPARAM)hWnd, (LPARAM)&oCopyData);
}
}
@@ -245,7 +245,7 @@ int SSC_OnPreShutdown(WPARAM/* wParam*/, LPARAM/* lParam*/) BOOL b = SetEvent(g_hEventShutdown);
assert(b && "SetEvent failed");
- DWORD dwResult = ::WaitForSingleObject(g_hThread, INFINITE);
+ uint32_t dwResult = ::WaitForSingleObject(g_hThread, INFINITE);
assert(WAIT_FAILED != dwResult);
b = ::CloseHandle(g_hEventShutdown);
diff --git a/plugins/SkypeStatusChange/src/options.cpp b/plugins/SkypeStatusChange/src/options.cpp index ee990c5762..e5dacd4291 100644 --- a/plugins/SkypeStatusChange/src/options.cpp +++ b/plugins/SkypeStatusChange/src/options.cpp @@ -257,7 +257,7 @@ static INT_PTR CALLBACK SettingsDlgProc(HWND hdlg,UINT msg,WPARAM wp,LPARAM lp) case NM_CLICK:
if (IDC_TREE_PROTOCOLS == wp) {
- DWORD pos = ::GetMessagePos();
+ uint32_t pos = ::GetMessagePos();
HWND hwndTree = ::GetDlgItem(hdlg,IDC_TREE_PROTOCOLS);
diff --git a/plugins/SkypeStatusChange/src/stdafx.h b/plugins/SkypeStatusChange/src/stdafx.h index b289ef3b4a..97c4d1e730 100644 --- a/plugins/SkypeStatusChange/src/stdafx.h +++ b/plugins/SkypeStatusChange/src/stdafx.h @@ -79,19 +79,19 @@ public: bool IsProtocolExcluded(const char* pszProtocol)const
{
- DWORD dwSettings = db_get_dw(NULL, pszProtocol, "ChangeSkypeStatus_Exclusions", 0);
+ uint32_t dwSettings = db_get_dw(NULL, pszProtocol, "ChangeSkypeStatus_Exclusions", 0);
return ((dwSettings&cssAll) ? true : false);
}
bool IsProtocolStatusExcluded(const char* pszProtocol, int nStatus)const
{
- DWORD dwSettings = db_get_dw(NULL, pszProtocol, "ChangeSkypeStatus_Exclusions", 0);
+ uint32_t dwSettings = db_get_dw(NULL, pszProtocol, "ChangeSkypeStatus_Exclusions", 0);
return ((dwSettings&Status2Flag(nStatus)) ? true : false);
}
void ExcludeProtocol(const char* pszProtocol, bool bExclude)
{
- DWORD dwSettings = db_get_dw(NULL, pszProtocol, "ChangeSkypeStatus_Exclusions", 0);
+ uint32_t dwSettings = db_get_dw(NULL, pszProtocol, "ChangeSkypeStatus_Exclusions", 0);
if (bExclude)
dwSettings |= cssAll;
else
@@ -102,7 +102,7 @@ public: void ExcludeProtocolStatus(const char* pszProtocol, int nStatus, bool bExclude)
{
- DWORD dwSettings = db_get_dw(NULL, pszProtocol, "ChangeSkypeStatus_Exclusions", 0);
+ uint32_t dwSettings = db_get_dw(NULL, pszProtocol, "ChangeSkypeStatus_Exclusions", 0);
if (bExclude)
dwSettings |= Status2Flag(nStatus);
else
diff --git a/plugins/SmileyAdd/src/SmileyBase.cpp b/plugins/SmileyAdd/src/SmileyBase.cpp index 6394a9ba6a..868cac3d88 100644 --- a/plugins/SmileyAdd/src/SmileyBase.cpp +++ b/plugins/SmileyAdd/src/SmileyBase.cpp @@ -326,7 +326,7 @@ HRESULT ISmileyBase::SetAdvise(DWORD aspect, DWORD advf, IAdviseSink *pAdvSink) SendOnViewChange();
return S_OK;
}
-HRESULT ISmileyBase::GetAdvise(DWORD*, DWORD*, IAdviseSink **ppAdvSink)
+HRESULT ISmileyBase::GetAdvise(DWORD *, DWORD *, IAdviseSink **ppAdvSink)
{
if (!ppAdvSink) return E_POINTER;
*ppAdvSink = m_spAdviseSink;
@@ -334,7 +334,7 @@ HRESULT ISmileyBase::GetAdvise(DWORD*, DWORD*, IAdviseSink **ppAdvSink) return S_OK;
}
-HRESULT ISmileyBase::Freeze(DWORD, long, void*, DWORD*) { return E_NOTIMPL; }
+HRESULT ISmileyBase::Freeze(DWORD, long, void*, DWORD *) { return E_NOTIMPL; }
HRESULT ISmileyBase::Unfreeze(DWORD) { return E_NOTIMPL; }
HRESULT ISmileyBase::GetColorSet(DWORD, long, void*, DVTARGETDEVICE*, HDC, LOGPALETTE**) { return E_NOTIMPL; }
diff --git a/plugins/SmileyAdd/src/SmileyBase.h b/plugins/SmileyAdd/src/SmileyBase.h index 7b366ac781..69de79fc98 100644 --- a/plugins/SmileyAdd/src/SmileyBase.h +++ b/plugins/SmileyAdd/src/SmileyBase.h @@ -38,7 +38,7 @@ class ISmileyBase : public IOleObject, public IViewObject2, public ITooltipData IAdviseSink* m_spAdviseSink;
IOleClientSite* m_spClientSite;
- DWORD m_advf;
+ uint32_t m_advf;
LONG m_lRefCount;
wchar_t* m_smltxt;
@@ -100,8 +100,8 @@ public: // IViewObject members
//
STDMETHOD(SetAdvise)(DWORD aspect, DWORD advf, IAdviseSink* pAdvSink);
- STDMETHOD(GetAdvise)(DWORD* /*pAspects*/, DWORD* /*pAdvf*/, IAdviseSink** ppAdvSink);
- STDMETHOD(Freeze)(DWORD, long, void*, DWORD*);
+ STDMETHOD(GetAdvise)(DWORD * /*pAspects*/, DWORD * /*pAdvf*/, IAdviseSink** ppAdvSink);
+ STDMETHOD(Freeze)(DWORD, long, void*, DWORD *);
STDMETHOD(Unfreeze)(DWORD);
STDMETHOD(GetColorSet)(DWORD, long, void*, DVTARGETDEVICE*, HDC, LOGPALETTE**);
diff --git a/plugins/Spamotron/src/bayes.cpp b/plugins/Spamotron/src/bayes.cpp index b9a9fe376b..d4d7d26d5f 100644 --- a/plugins/Spamotron/src/bayes.cpp +++ b/plugins/Spamotron/src/bayes.cpp @@ -220,7 +220,7 @@ double get_msg_score(wchar_t *msg) return tmp1 / (tmp1 + tmp2);
}
-void queue_message(MCONTACT hContact, DWORD msgtime, wchar_t *message)
+void queue_message(MCONTACT hContact, uint32_t msgtime, wchar_t *message)
{
char *tmp;
sqlite3_stmt *stmt;
@@ -235,7 +235,7 @@ void queue_message(MCONTACT hContact, DWORD msgtime, wchar_t *message) OpenBayes();
sqlite3_prepare_v2(bayesdb, "INSERT INTO queue VALUES(?,?,?)", -1, &stmt, nullptr);
- sqlite3_bind_int(stmt, 1, (DWORD)hContact);
+ sqlite3_bind_int(stmt, 1, (uint32_t)hContact);
sqlite3_bind_int(stmt, 2, msgtime);
tmp = mir_u2a(message);
sqlite3_bind_text(stmt, 3, tmp, (int)mir_strlen(tmp), nullptr);
@@ -255,7 +255,7 @@ void bayes_approve_contact(MCONTACT hContact) return;
sqlite3_prepare_v2(bayesdb, "SELECT message FROM queue WHERE contact=?", -1, &stmt, nullptr);
- sqlite3_bind_int(stmt, 1, (DWORD)hContact);
+ sqlite3_bind_int(stmt, 1, (uint32_t)hContact);
while (sqlite3_step(stmt) == SQLITE_ROW)
{
d = 1;
@@ -267,7 +267,7 @@ void bayes_approve_contact(MCONTACT hContact) sqlite3_finalize(stmt);
if (d) {
sqlite3_prepare_v2(bayesdb, "DELETE FROM queue WHERE contact=?", -1, &stmt, nullptr);
- sqlite3_bind_int(stmt, 1, (DWORD)hContact);
+ sqlite3_bind_int(stmt, 1, (uint32_t)hContact);
sqlite3_step(stmt);
sqlite3_finalize(stmt);
}
@@ -287,7 +287,7 @@ void dequeue_messages() sqlite3_prepare_v2(bayesdb, "SELECT message FROM queue WHERE msgtime + ? < ?", -1, &stmt, nullptr);
sqlite3_bind_int(stmt, 1, g_plugin.getDword("BayesWaitApprove", defaultBayesWaitApprove)*86400);
- sqlite3_bind_int(stmt, 2, (DWORD)t);
+ sqlite3_bind_int(stmt, 2, (uint32_t)t);
while (sqlite3_step(stmt) == SQLITE_ROW) {
d = 1;
message = (char*)sqlite3_column_text(stmt, 0);
@@ -299,7 +299,7 @@ void dequeue_messages() if (d) {
sqlite3_prepare_v2(bayesdb, "DELETE FROM queue WHERE msgtime + ? < ?", -1, &stmt, nullptr);
sqlite3_bind_int(stmt, 1, g_plugin.getDword("BayesWaitApprove", defaultBayesWaitApprove)*86400);
- sqlite3_bind_int(stmt, 2, (DWORD)t);
+ sqlite3_bind_int(stmt, 2, (uint32_t)t);
sqlite3_step(stmt);
sqlite3_finalize(stmt);
}
diff --git a/plugins/Spamotron/src/spamotron.cpp b/plugins/Spamotron/src/spamotron.cpp index f22e25b595..0841a06bef 100644 --- a/plugins/Spamotron/src/spamotron.cpp +++ b/plugins/Spamotron/src/spamotron.cpp @@ -42,7 +42,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) // get hContact from DBEVENTINFO as icq_proto.c doesn't pass hContact the usual way for some reason.
if (dbei->eventType == EVENTTYPE_AUTHREQUEST)
- hContact = (MCONTACT)*(PDWORD(dbei->pBlob+sizeof(DWORD)));
+ hContact = (MCONTACT)*(PDWORD(dbei->pBlob+sizeof(uint32_t)));
// get maximum length of the message a protocol supports
maxmsglen = CallProtoService(dbei->szModule, PS_GETCAPS, PFLAG_MAXLENOFMESSAGE, hContact);
@@ -109,7 +109,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) msgblob = (char *)dbei->pBlob;
}
else if (dbei->eventType == EVENTTYPE_AUTHREQUEST) {
- msgblob = (char *)(dbei->pBlob + sizeof(DWORD) + sizeof(DWORD));
+ msgblob = (char *)(dbei->pBlob + sizeof(uint32_t) + sizeof(uint32_t));
for(a = 4; a > 0; a--)
msgblob += mir_strlen(msgblob)+1;
}
@@ -228,13 +228,13 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) char* szAuthEventModule;
if (db_get(hContact, MODULENAME, "AuthEvent", &_dbv) == 0) {
DBEVENTINFO dbei2 = {};
- dbei2.cbBlob = *(DWORD *)_dbv.pbVal;
+ dbei2.cbBlob = *(uint32_t *)_dbv.pbVal;
dbei2.eventType = EVENTTYPE_AUTHREQUEST;
_getCOptS(AuthEventModule, 100, hContact, "AuthEventModule", L"ICQ");
szAuthEventModule = mir_u2a(AuthEventModule);
dbei2.szModule = szAuthEventModule;
dbei2.timestamp = dbei->timestamp;
- dbei2.pBlob = _dbv.pbVal + sizeof(DWORD);
+ dbei2.pBlob = _dbv.pbVal + sizeof(uint32_t);
db_event_add(hContact, &dbei2);
g_plugin.delSetting(hContact, "AuthEvent");
@@ -426,11 +426,11 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) if (g_plugin.getByte("KeepBlockedMsg", defaultKeepBlockedMsg)) {
if (dbei->eventType == EVENTTYPE_AUTHREQUEST) {
// Save the request to database so that it can be automatically submitted on user approval
- uint8_t *eventdata = (uint8_t*)malloc(sizeof(DWORD) + dbei->cbBlob);
+ uint8_t *eventdata = (uint8_t*)malloc(sizeof(uint32_t) + dbei->cbBlob);
if (eventdata != nullptr && dbei->cbBlob > 0) {
- memcpy(eventdata, &dbei->cbBlob, sizeof(DWORD));
- memcpy(eventdata + sizeof(DWORD), dbei->pBlob, dbei->cbBlob);
- db_set_blob(hContact, MODULENAME, "AuthEvent", eventdata, sizeof(DWORD) + dbei->cbBlob);
+ memcpy(eventdata, &dbei->cbBlob, sizeof(uint32_t));
+ memcpy(eventdata + sizeof(uint32_t), dbei->pBlob, dbei->cbBlob);
+ db_set_blob(hContact, MODULENAME, "AuthEvent", eventdata, sizeof(uint32_t) + dbei->cbBlob);
g_plugin.setString(hContact, "AuthEventModule", dbei->szModule);
g_plugin.setByte(hContact, "AuthEventPending", TRUE);
free(eventdata);
@@ -439,7 +439,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) else {
if (g_plugin.getByte("MarkMsgUnreadOnApproval", defaultMarkMsgUnreadOnApproval)) {
DBVARIANT _dbv;
- DWORD dbei_size = 3 * sizeof(DWORD) + sizeof(uint16_t) + dbei->cbBlob + (DWORD)mir_strlen(dbei->szModule) + 1;
+ uint32_t dbei_size = 3 * sizeof(uint32_t) + sizeof(uint16_t) + dbei->cbBlob + (uint32_t)mir_strlen(dbei->szModule) + 1;
uint8_t *eventdata = (uint8_t*)malloc(dbei_size);
uint8_t *pos = eventdata;
if (eventdata != nullptr && dbei->cbBlob > 0) {
@@ -451,11 +451,11 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) db_free(&_dbv);
}
memcpy(pos, &dbei->eventType, sizeof(uint16_t));
- memcpy(pos + sizeof(uint16_t), &dbei->flags, sizeof(DWORD));
- memcpy(pos + sizeof(uint16_t) + sizeof(DWORD), &dbei->timestamp, sizeof(DWORD));
- memcpy(pos + sizeof(uint16_t) + sizeof(DWORD) * 2, dbei->szModule, mir_strlen(dbei->szModule) + 1);
- memcpy(pos + sizeof(uint16_t) + sizeof(DWORD) * 2 + mir_strlen(dbei->szModule) + 1, &dbei->cbBlob, sizeof(DWORD));
- memcpy(pos + sizeof(uint16_t) + sizeof(DWORD) * 3 + mir_strlen(dbei->szModule) + 1, dbei->pBlob, dbei->cbBlob);
+ memcpy(pos + sizeof(uint16_t), &dbei->flags, sizeof(uint32_t));
+ memcpy(pos + sizeof(uint16_t) + sizeof(uint32_t), &dbei->timestamp, sizeof(uint32_t));
+ memcpy(pos + sizeof(uint16_t) + sizeof(uint32_t) * 2, dbei->szModule, mir_strlen(dbei->szModule) + 1);
+ memcpy(pos + sizeof(uint16_t) + sizeof(uint32_t) * 2 + mir_strlen(dbei->szModule) + 1, &dbei->cbBlob, sizeof(uint32_t));
+ memcpy(pos + sizeof(uint16_t) + sizeof(uint32_t) * 3 + mir_strlen(dbei->szModule) + 1, dbei->pBlob, dbei->cbBlob);
db_set_blob(hContact, MODULENAME, "LastMsgEvents", eventdata, (pos - eventdata) + dbei_size);
free(eventdata);
}
diff --git a/plugins/Spamotron/src/stdafx.h b/plugins/Spamotron/src/stdafx.h index 98a18700c7..d51269ee37 100644 --- a/plugins/Spamotron/src/stdafx.h +++ b/plugins/Spamotron/src/stdafx.h @@ -91,7 +91,7 @@ BOOL _isregex(wchar_t* strSearch); BOOL _isvalidregex(wchar_t* strSearch);
BOOL _regmatch(wchar_t* str, wchar_t* strSearch);
BOOL Contains(wchar_t* dst, wchar_t* src);
-BOOL isOneDay(DWORD timestamp1, DWORD timestamp2);
+BOOL isOneDay(uint32_t timestamp1, uint32_t timestamp2);
void MarkUnread(MCONTACT hContact);
int ShowPopup(MCONTACT hContact, uint8_t popupType, wchar_t *line1, wchar_t *line2);
@@ -132,7 +132,7 @@ void learn_spam(wchar_t *msg); int get_token_count(int type);
int get_msg_count(int type);
double get_msg_score(wchar_t *msg);
-void queue_message(MCONTACT hContact, DWORD msgtime, wchar_t *message);
+void queue_message(MCONTACT hContact, uint32_t msgtime, wchar_t *message);
void bayes_approve_contact(MCONTACT hContact);
void dequeue_messages();
diff --git a/plugins/Spamotron/src/utils.cpp b/plugins/Spamotron/src/utils.cpp index 506dfec548..c829b5f101 100644 --- a/plugins/Spamotron/src/utils.cpp +++ b/plugins/Spamotron/src/utils.cpp @@ -299,7 +299,7 @@ err_out: return ret; } -BOOL isOneDay(DWORD timestamp1, DWORD timestamp2) +BOOL isOneDay(uint32_t timestamp1, uint32_t timestamp2) { time_t t1, t2; int at1[3], at2[3]; @@ -490,14 +490,14 @@ void MarkUnread(MCONTACT hContact) while (pos - _dbv.pbVal < _dbv.cpbVal) { DBEVENTINFO dbei = {}; memcpy(&dbei.eventType, pos, sizeof(uint16_t)); pos += sizeof(uint16_t); - memcpy(&dbei.flags, pos, sizeof(DWORD)); pos += sizeof(DWORD); - memcpy(&dbei.timestamp, pos, sizeof(DWORD)); pos += sizeof(DWORD); + memcpy(&dbei.flags, pos, sizeof(uint32_t)); pos += sizeof(uint32_t); + memcpy(&dbei.timestamp, pos, sizeof(uint32_t)); pos += sizeof(uint32_t); dbei.szModule = (char*)malloc(mir_strlen((const char*)pos)+1); mir_strcpy((char*)dbei.szModule, (const char*)pos); pos += mir_strlen((const char*)pos)+1; - memcpy(&dbei.cbBlob, pos, sizeof(DWORD)); pos += sizeof(DWORD); + memcpy(&dbei.cbBlob, pos, sizeof(uint32_t)); pos += sizeof(uint32_t); dbei.pBlob = (uint8_t*)malloc(dbei.cbBlob); memcpy(dbei.pBlob, pos, dbei.cbBlob); pos += dbei.cbBlob; diff --git a/plugins/SpellChecker/src/RichEdit.h b/plugins/SpellChecker/src/RichEdit.h index 17ebe1e438..e65f04d3cf 100644 --- a/plugins/SpellChecker/src/RichEdit.h +++ b/plugins/SpellChecker/src/RichEdit.h @@ -12,7 +12,7 @@ class RichEdit POINT m_old_scroll_pos;
CHARRANGE m_old_sel;
POINT m_caretPos;
- DWORD m_old_mask;
+ uint32_t m_old_mask;
BOOL m_inverse;
public:
diff --git a/plugins/SpellChecker/src/dictionary.cpp b/plugins/SpellChecker/src/dictionary.cpp index 28b412000e..4c251a6682 100644 --- a/plugins/SpellChecker/src/dictionary.cpp +++ b/plugins/SpellChecker/src/dictionary.cpp @@ -815,7 +815,7 @@ void GetHunspellDictionariesFromFolder(LIST<Dictionary> &dicts, wchar_t *path, w mir_snwprintf(file, L"%s\\%s", path, ffd.cFileName); // Check .dic - DWORD attrib = GetFileAttributes(file); + uint32_t attrib = GetFileAttributes(file); if (attrib == 0xFFFFFFFF || (attrib & FILE_ATTRIBUTE_DIRECTORY)) continue; @@ -882,7 +882,7 @@ void GetAvaibleDictionaries(LIST<Dictionary> &dicts, wchar_t *path, wchar_t *use numValues = 0; lResult = ERROR_NO_MORE_ITEMS; - for (DWORD local = 0; local < numValues; local++) { + for (uint32_t local = 0; local < numValues; local++) { DWORD cchValue = _countof(key); if (ERROR_SUCCESS != RegEnumValue(hKey, local, key, &cchValue, nullptr, nullptr, nullptr, nullptr)) break; diff --git a/plugins/StartPosition/src/options.h b/plugins/StartPosition/src/options.h index f903e37580..812834699c 100644 --- a/plugins/StartPosition/src/options.h +++ b/plugins/StartPosition/src/options.h @@ -37,10 +37,10 @@ struct ClistOptions CMOption<uint8_t> isDocked; CMOption<uint8_t> state; - CMOption<DWORD> x; - CMOption<DWORD> y; - CMOption<DWORD> width; - CMOption<DWORD> height; + CMOption<uint32_t> x; + CMOption<uint32_t> y; + CMOption<uint32_t> width; + CMOption<uint32_t> height; ClistOptions() : isDocked(CLIST_MODULE_NAME, "Docked", 0), @@ -62,10 +62,10 @@ struct StartPositionOptions CMOption<uint8_t> setClistStartState; CMOption<uint8_t> clistState; - CMOption<DWORD> pixelsFromTop; - CMOption<DWORD> pixelsFromBottom; - CMOption<DWORD> pixelsFromSide; - CMOption<DWORD> clistWidth; + CMOption<uint32_t> pixelsFromTop; + CMOption<uint32_t> pixelsFromBottom; + CMOption<uint32_t> pixelsFromSide; + CMOption<uint32_t> clistWidth; StartPositionOptions(); }; diff --git a/plugins/StartPosition/src/startposition.cpp b/plugins/StartPosition/src/startposition.cpp index 086ceab000..7e2dce02af 100644 --- a/plugins/StartPosition/src/startposition.cpp +++ b/plugins/StartPosition/src/startposition.cpp @@ -17,15 +17,15 @@ void CMPlugin::positionClist() clOptions.state = static_cast<uint8_t>(spOptions.clistState); if (spOptions.setClistWidth && spOptions.clistWidth > 0) - clOptions.width = static_cast<DWORD>(spOptions.clistWidth); + clOptions.width = static_cast<uint32_t>(spOptions.clistWidth); else - spOptions.clistWidth = static_cast<DWORD>(clOptions.width); + spOptions.clistWidth = static_cast<uint32_t>(clOptions.width); if (spOptions.setTopPosition || spOptions.setBottomPosition || spOptions.setSidePosition) clOptions.isDocked = false; if (spOptions.setTopPosition) - clOptions.y = static_cast<DWORD>(spOptions.pixelsFromTop); + clOptions.y = static_cast<uint32_t>(spOptions.pixelsFromTop); RECT WorkArea; SystemParametersInfo(SPI_GETWORKAREA, 0, &WorkArea, 0); diff --git a/plugins/StartupSilence/src/main.cpp b/plugins/StartupSilence/src/main.cpp index e7faaeecee..317e005f15 100644 --- a/plugins/StartupSilence/src/main.cpp +++ b/plugins/StartupSilence/src/main.cpp @@ -30,9 +30,9 @@ HANDLE hTTBarloaded = nullptr; HANDLE Buttons = nullptr;
uint8_t Enabled;
-DWORD delay;
+uint32_t delay;
uint8_t PopUp;
-DWORD PopUpTime;
+uint32_t PopUpTime;
uint8_t TTBButtons;
uint8_t DefSound;
uint8_t DefPopup;
@@ -184,13 +184,13 @@ void LoadSettings() DefEnabled = g_plugin.getByte(DefEnabledComp);
NonStatusAllow = g_plugin.getByte(NonStatusAllowComp);
if (PopUpTime < 1)
- PopUpTime = (DWORD)1;
+ PopUpTime = (uint32_t)1;
if (PopUpTime > 30)
- PopUpTime = (DWORD)30;
+ PopUpTime = (uint32_t)30;
if (delay < 10)
- delay = (DWORD)10;
+ delay = (uint32_t)10;
if (delay > 300)
- delay = (DWORD)300;
+ delay = (uint32_t)300;
g_plugin.setDword(DelayComp, delay);
g_plugin.setDword(PopUpTimeComp, PopUpTime);
}
@@ -311,12 +311,12 @@ static INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LP case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDC_SSTIME:
- DWORD min;
+ uint32_t min;
if ((HWND)lParam != GetFocus() || HIWORD(wParam) != EN_CHANGE) return FALSE;
min = GetDlgItemInt(hwndDlg, IDC_SSTIME, nullptr, FALSE);
if (min == 0 && GetWindowTextLength(GetDlgItem(hwndDlg, IDC_SSTIME)))
SendDlgItemMessage(hwndDlg, IDC_SSSPIN, UDM_SETPOS, 0, MAKELONG((short)1, 0));
- delay = db_set_dw(0, MODULENAME, DelayComp, (DWORD)(SendDlgItemMessage(hwndDlg, IDC_SSSPIN, UDM_GETPOS, 0, 0)));
+ delay = db_set_dw(0, MODULENAME, DelayComp, (uint32_t)(SendDlgItemMessage(hwndDlg, IDC_SSSPIN, UDM_GETPOS, 0, 0)));
break;
case IDC_SSPOPUPTIME:
@@ -324,7 +324,7 @@ static INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LP min = GetDlgItemInt(hwndDlg, IDC_SSPOPUPTIME, nullptr, FALSE);
if (min == 0 && GetWindowTextLength(GetDlgItem(hwndDlg, IDC_SSPOPUPTIME)))
SendDlgItemMessage(hwndDlg, IDC_SSSPIN2, UDM_SETPOS, 0, MAKELONG((short)1, 0));
- PopUpTime = db_set_dw(0, MODULENAME, PopUpTimeComp, (DWORD)(SendDlgItemMessage(hwndDlg, IDC_SSSPIN2, UDM_GETPOS, 0, 0)));
+ PopUpTime = db_set_dw(0, MODULENAME, PopUpTimeComp, (uint32_t)(SendDlgItemMessage(hwndDlg, IDC_SSSPIN2, UDM_GETPOS, 0, 0)));
break;
case IDC_DELAY:
diff --git a/plugins/StatusChange/src/main.cpp b/plugins/StatusChange/src/main.cpp index e12160e3ca..e1147faacb 100644 --- a/plugins/StatusChange/src/main.cpp +++ b/plugins/StatusChange/src/main.cpp @@ -88,7 +88,7 @@ static int StatusChangeGetMessage(WPARAM, LPARAM hDbEvent) }
// If is a message sent...
- if (((DWORD)(dbe.flags & ((DWORD)DBEF_SENT))) == ((DWORD)(DBEF_SENT))) {
+ if (((uint32_t)(dbe.flags & ((uint32_t)DBEF_SENT))) == ((uint32_t)(DBEF_SENT))) {
if (send) {
// change status
CallProtoService(dbe.szModule, PS_SETSTATUS, (LPARAM)Options.ChangeTo, 0);
@@ -243,7 +243,7 @@ static INT_PTR CALLBACK DlgProcStatusChangeOpts(HWND hwndDlg, UINT msg, WPARAM w g_plugin.setByte("MessageSend", (uint8_t)Options.MessageSend);
g_plugin.setByte("FileRead", (uint8_t)Options.FileRead);
g_plugin.setByte("FileSend", (uint8_t)Options.FileSend);
- g_plugin.setDword("ChangeTo", (DWORD)Options.ChangeTo);
+ g_plugin.setDword("ChangeTo", (uint32_t)Options.ChangeTo);
g_plugin.setByte("IfOffline", (uint8_t)Options.IfOffline);
g_plugin.setByte("IfOnline", (uint8_t)Options.IfOnline);
g_plugin.setByte("IfAway", (uint8_t)Options.IfAway);
diff --git a/plugins/StatusManager/src/aaa_main.cpp b/plugins/StatusManager/src/aaa_main.cpp index 49ee3e5444..5cfa722dc9 100644 --- a/plugins/StatusManager/src/aaa_main.cpp +++ b/plugins/StatusManager/src/aaa_main.cpp @@ -44,16 +44,16 @@ static int mouseStationaryTimer; HHOOK hMirandaMouseHook = nullptr; HHOOK hMirandaKeyBoardHook = nullptr; #pragma data_seg("Shared") -DWORD lastInput = 0; +uint32_t lastInput = 0; POINT lastMousePos = { 0 }; HHOOK hMouseHook = nullptr; HHOOK hKeyBoardHook = nullptr; #pragma data_seg() #pragma comment(linker, "/section:Shared,rws") -DWORD lastMirandaInput = 0; +uint32_t lastMirandaInput = 0; static UINT_PTR hAutoAwayTimer; // prototypes -extern DWORD StatusModeToProtoFlag(int status); +extern uint32_t StatusModeToProtoFlag(int status); int AutoAwayOptInitialise(WPARAM wParam, LPARAM lParam); diff --git a/plugins/StatusManager/src/aaa_options.cpp b/plugins/StatusManager/src/aaa_options.cpp index a773698ef1..296b54c7d6 100644 --- a/plugins/StatusManager/src/aaa_options.cpp +++ b/plugins/StatusManager/src/aaa_options.cpp @@ -60,7 +60,7 @@ INT_PTR CALLBACK DlgProcAutoAwayMsgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L break; } - DWORD protoModeMsgFlags = 0; + uint32_t protoModeMsgFlags = 0; for (int i = 0; i < protoCount; i++) if (CallProtoService(proto[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND & ~PF1_INDIVMODEMSG) protoModeMsgFlags |= CallProtoService(proto[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0); diff --git a/plugins/StatusManager/src/commonstatus.cpp b/plugins/StatusManager/src/commonstatus.cpp index a50b1917fa..f0ffb071b6 100644 --- a/plugins/StatusManager/src/commonstatus.cpp +++ b/plugins/StatusManager/src/commonstatus.cpp @@ -98,7 +98,7 @@ char* StatusModeToDbSetting(int status, const char *suffix) return str; } -DWORD StatusModeToProtoFlag(int status) +uint32_t StatusModeToProtoFlag(int status) { // *not* the same as in core, <offline> switch (status) { diff --git a/plugins/StatusManager/src/ks_main.cpp b/plugins/StatusManager/src/ks_main.cpp index 0772dc3cb9..ce3f747921 100644 --- a/plugins/StatusManager/src/ks_main.cpp +++ b/plugins/StatusManager/src/ks_main.cpp @@ -65,7 +65,7 @@ INT_PTR IsProtocolEnabledService(WPARAM wParam, LPARAM lParam); static int ProcessPopup(int reason, LPARAM lParam); LRESULT CALLBACK KSPopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); -static DWORD CALLBACK MessageWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); +static uint32_t CALLBACK MessageWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); // options.c extern int KeepStatusOptionsInit(WPARAM wparam, LPARAM); @@ -497,7 +497,7 @@ static int ProcessProtoAck(WPARAM, LPARAM lParam) return 0; } -static VOID CALLBACK CheckConnectingTimer(HWND, UINT, UINT_PTR, DWORD) +static void CALLBACK CheckConnectingTimer(HWND, UINT, UINT_PTR, DWORD) { StopTimer(IDT_CHECKCONNECTING); @@ -516,7 +516,7 @@ static VOID CALLBACK CheckConnectingTimer(HWND, UINT, UINT_PTR, DWORD) } } -static VOID CALLBACK CheckAckStatusTimer(HWND, UINT, UINT_PTR, DWORD) +static void CALLBACK CheckAckStatusTimer(HWND, UINT, UINT_PTR, DWORD) { bool needChecking = false; @@ -552,7 +552,7 @@ static VOID CALLBACK CheckAckStatusTimer(HWND, UINT, UINT_PTR, DWORD) StartTimer(IDT_CHECKCONN, initDelay, FALSE); } -static VOID CALLBACK CheckConnectionTimer(HWND, UINT, UINT_PTR, DWORD) +static void CALLBACK CheckConnectionTimer(HWND, UINT, UINT_PTR, DWORD) { log_debug(0, "CheckConnectionTimer"); bool setStatus = false; @@ -678,7 +678,7 @@ static void CheckContinuouslyFunction(void *) else { char *start, *end; char host[MAX_PATH]; - DWORD *addr; + uint32_t *addr; struct hostent *hostent; char reply[sizeof(ICMP_ECHO_REPLY) + 8]; @@ -698,7 +698,7 @@ static void CheckContinuouslyFunction(void *) strncpy(host, start, end - start); hostent = gethostbyname(host); if (hostent != nullptr) { - addr = (DWORD *)(*hostent->h_addr_list); + addr = (uint32_t *)(*hostent->h_addr_list); bLastPingResult = (IcmpSendEcho(hICMPFile, *addr, nullptr, 0, nullptr, reply, sizeof(ICMP_ECHO_REPLY) + 8, 5000) != 0); if (bLastPingResult) @@ -995,7 +995,7 @@ INT_PTR AnnounceStatusChangeService(WPARAM, LPARAM lParam) ///////////////////////////////////////////////////////////////////////////////////////// // window for suspend -static DWORD CALLBACK MessageWndProc(HWND, UINT msg, WPARAM wParam, LPARAM lParam) +static uint32_t CALLBACK MessageWndProc(HWND, UINT msg, WPARAM wParam, LPARAM lParam) { static TProtoSettings *ps = nullptr; diff --git a/plugins/StatusManager/src/ks_options.cpp b/plugins/StatusManager/src/ks_options.cpp index 4848eff393..d2afed8488 100644 --- a/plugins/StatusManager/src/ks_options.cpp +++ b/plugins/StatusManager/src/ks_options.cpp @@ -120,7 +120,7 @@ static INT_PTR CALLBACK DlgProcKSBasicOpts(HWND hwndDlg, UINT msg, WPARAM wParam KSPlugin.setByte(SETTING_MAXRETRIES, (uint8_t)GetDlgItemInt(hwndDlg, IDC_MAXRETRIES, nullptr, FALSE)); KSPlugin.setByte(SETTING_CHECKCONNECTION, (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_CHECKCONNECTION)); KSPlugin.setByte(SETTING_SHOWCONNECTIONPOPUPS, (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_SHOWCONNECTIONPOPUPS)); - KSPlugin.setDword(SETTING_INITDELAY, (DWORD)GetDlgItemInt(hwndDlg, IDC_INITDELAY, nullptr, FALSE)); + KSPlugin.setDword(SETTING_INITDELAY, (uint32_t)GetDlgItemInt(hwndDlg, IDC_INITDELAY, nullptr, FALSE)); KSPlugin.setByte(SETTING_CHKINET, (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_CHKINET)); KSPlugin.setByte(SETTING_CONTCHECK, (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_CONTCHECK)); KSPlugin.setByte(SETTING_BYPING, (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_BYPING)); @@ -215,8 +215,8 @@ static INT_PTR CALLBACK DlgProcKSAdvOpts(HWND hwndDlg, UINT msg, WPARAM wParam, case PSN_APPLY: KSPlugin.setByte(SETTING_INCREASEEXPONENTIAL, (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_INCREASEEXPONENTIAL)); - KSPlugin.setDword(SETTING_MAXDELAY, (DWORD)GetDlgItemInt(hwndDlg, IDC_MAXDELAY, nullptr, FALSE)); - KSPlugin.setDword(SETTING_MAXCONNECTINGTIME, (DWORD)GetDlgItemInt(hwndDlg, IDC_MAXCONNECTINGTIME, nullptr, FALSE)); + KSPlugin.setDword(SETTING_MAXDELAY, (uint32_t)GetDlgItemInt(hwndDlg, IDC_MAXDELAY, nullptr, FALSE)); + KSPlugin.setDword(SETTING_MAXCONNECTINGTIME, (uint32_t)GetDlgItemInt(hwndDlg, IDC_MAXCONNECTINGTIME, nullptr, FALSE)); KSPlugin.setByte(SETTING_FIRSTOFFLINE, (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_FIRSTOFFLINE)); KSPlugin.setByte(SETTING_NOLOCKED, (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_NOLOCKED)); KSPlugin.setByte(SETTING_CNCOTHERLOC, (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_CNCOTHERLOC)); @@ -232,7 +232,7 @@ static INT_PTR CALLBACK DlgProcKSAdvOpts(HWND hwndDlg, UINT msg, WPARAM wParam, KSPlugin.setByte(SETTING_CHECKAPMRESUME, (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_CHECKAPMRESUME)); KSPlugin.setWord(SETTING_PINGCOUNT, (uint16_t)GetDlgItemInt(hwndDlg, IDC_PINGCOUNT, nullptr, FALSE)); - KSPlugin.setDword(SETTING_CNTDELAY, (DWORD)GetDlgItemInt(hwndDlg, IDC_CNTDELAY, nullptr, FALSE) == 0 ? CHECKCONTIN_DELAY : GetDlgItemInt(hwndDlg, IDC_CNTDELAY, nullptr, FALSE)); + KSPlugin.setDword(SETTING_CNTDELAY, (uint32_t)GetDlgItemInt(hwndDlg, IDC_CNTDELAY, nullptr, FALSE) == 0 ? CHECKCONTIN_DELAY : GetDlgItemInt(hwndDlg, IDC_CNTDELAY, nullptr, FALSE)); } break; } diff --git a/plugins/StatusManager/src/ss_main.cpp b/plugins/StatusManager/src/ss_main.cpp index 2f10ca761f..f838c1cdd7 100644 --- a/plugins/StatusManager/src/ss_main.cpp +++ b/plugins/StatusManager/src/ss_main.cpp @@ -314,7 +314,7 @@ static int OnShutdown(WPARAM, LPARAM) } /* Window proc for poweroff event */ -static DWORD CALLBACK MessageWndProc(HWND, UINT msg, WPARAM wParam, LPARAM) +static uint32_t CALLBACK MessageWndProc(HWND, UINT msg, WPARAM wParam, LPARAM) { switch (msg) { case WM_ENDSESSION: diff --git a/plugins/StatusManager/src/ss_profiles.cpp b/plugins/StatusManager/src/ss_profiles.cpp index da945ccb85..ac309881ba 100644 --- a/plugins/StatusManager/src/ss_profiles.cpp +++ b/plugins/StatusManager/src/ss_profiles.cpp @@ -231,7 +231,7 @@ static UINT GetFsModifiers(uint16_t wHotKey) return fsm; } -static DWORD CALLBACK MessageWndProc(HWND, UINT msg, WPARAM wParam, LPARAM) +static uint32_t CALLBACK MessageWndProc(HWND, UINT msg, WPARAM wParam, LPARAM) { if (msg == WM_HOTKEY) { for (int i = 0; i < hkiCount; i++) diff --git a/plugins/StatusManager/src/stdafx.h b/plugins/StatusManager/src/stdafx.h index 79f1a1e99b..4d348ca203 100644 --- a/plugins/StatusManager/src/stdafx.h +++ b/plugins/StatusManager/src/stdafx.h @@ -63,6 +63,6 @@ int OnCommonOptionsInit(WPARAM wParam, LPARAM); void InitCommonOptions(); char* StatusModeToDbSetting(int status, const char *suffix); -DWORD StatusModeToProtoFlag(int status); +uint32_t StatusModeToProtoFlag(int status); #endif //_COMMON_H_ diff --git a/plugins/StopSpamMod/src/init.cpp b/plugins/StopSpamMod/src/init.cpp index 2496667941..45323d770b 100755 --- a/plugins/StopSpamMod/src/init.cpp +++ b/plugins/StopSpamMod/src/init.cpp @@ -24,7 +24,7 @@ HANDLE hEventFilter = nullptr, hOptInitialise = nullptr, hSettingChanged = nullp BOOL gbDosServiceExist = 0;
BOOL gbVarsServiceExist = 0;
-DWORD gbMaxQuestCount = 5;
+uint32_t gbMaxQuestCount = 5;
BOOL gbInfTalkProtection = 0;
BOOL gbAddPermanent = 0;
BOOL gbHandleAuthReq = 1;
diff --git a/plugins/StopSpamMod/src/stopspam.cpp b/plugins/StopSpamMod/src/stopspam.cpp index 627536d182..a01b18ff76 100755 --- a/plugins/StopSpamMod/src/stopspam.cpp +++ b/plugins/StopSpamMod/src/stopspam.cpp @@ -258,7 +258,7 @@ int OnDbEventFilterAdd(WPARAM hContact, LPARAM l) ProtoChainSend(hContact, PSS_MESSAGE, 0, ptrA(mir_utf8encodeW(q.c_str()))); // increment question count - DWORD questCount = g_plugin.getDword(hContact, "QuestionCount"); + uint32_t questCount = g_plugin.getDword(hContact, "QuestionCount"); g_plugin.setDword(hContact, "QuestionCount", questCount + 1); } else { diff --git a/plugins/StopSpamMod/src/stopspam.h b/plugins/StopSpamMod/src/stopspam.h index e467c4a666..6285433209 100755 --- a/plugins/StopSpamMod/src/stopspam.h +++ b/plugins/StopSpamMod/src/stopspam.h @@ -2,7 +2,7 @@ extern BOOL gbDosServiceExist; extern BOOL gbVarsServiceExist; -extern DWORD gbMaxQuestCount; +extern uint32_t gbMaxQuestCount; extern BOOL gbInfTalkProtection; extern BOOL gbAddPermanent; extern BOOL gbHandleAuthReq; diff --git a/plugins/StopSpamMod/src/utilities.cpp b/plugins/StopSpamMod/src/utilities.cpp index eba39ebf02..c051761ad6 100755 --- a/plugins/StopSpamMod/src/utilities.cpp +++ b/plugins/StopSpamMod/src/utilities.cpp @@ -130,8 +130,8 @@ wchar_t* ReqGetText(DBEVENTINFO* dbei) if (!dbei->pBlob)
return nullptr;
- char * ptr = (char *)&dbei->pBlob[sizeof(DWORD) * 2];
- int len = dbei->cbBlob - sizeof(DWORD) * 2;
+ char * ptr = (char *)&dbei->pBlob[sizeof(uint32_t) * 2];
+ int len = dbei->cbBlob - sizeof(uint32_t) * 2;
int i = 0;
while (len && (i < 4)) {
@@ -317,8 +317,8 @@ void HistoryLog(MCONTACT hContact, char *data, int event_type, int flags) Event.szModule = MODULENAME;
Event.eventType = event_type;
Event.flags = flags | DBEF_UTF;
- Event.timestamp = (DWORD)time(0);
- Event.cbBlob = (DWORD)mir_strlen(data) + 1;
+ Event.timestamp = (uint32_t)time(0);
+ Event.cbBlob = (uint32_t)mir_strlen(data) + 1;
Event.pBlob = (uint8_t*)_strdup(data);
db_event_add(hContact, &Event);
}
diff --git a/plugins/StopSpamPlus/src/events.cpp b/plugins/StopSpamPlus/src/events.cpp index b13bd5c0af..10f69769ac 100644 --- a/plugins/StopSpamPlus/src/events.cpp +++ b/plugins/StopSpamPlus/src/events.cpp @@ -137,7 +137,7 @@ int OnDbEventFilterAdd(WPARAM w, LPARAM l) // increment question count
- DWORD questCount = g_plugin.getDword(hContact, DB_KEY_QUESTCOUNT);
+ uint32_t questCount = g_plugin.getDword(hContact, DB_KEY_QUESTCOUNT);
g_plugin.setDword(hContact, DB_KEY_QUESTCOUNT, questCount + 1);
}
diff --git a/plugins/StopSpamPlus/src/services.cpp b/plugins/StopSpamPlus/src/services.cpp index 8e40075c64..4a9a0417de 100644 --- a/plugins/StopSpamPlus/src/services.cpp +++ b/plugins/StopSpamPlus/src/services.cpp @@ -31,7 +31,7 @@ INT_PTR RemoveTempContacts(WPARAM, LPARAM lParam) char *szProto = Proto_GetBaseAccountName(hContact);
if (szProto != nullptr) {
// Check if protocol uses server side lists
- DWORD caps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0);
+ uint32_t caps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0);
if (caps & PF1_SERVERCLIST) {
int status = Proto_GetStatus(szProto);
if (status == ID_STATUS_OFFLINE || IsStatusConnecting(status))
diff --git a/plugins/StopSpamPlus/src/settings.h b/plugins/StopSpamPlus/src/settings.h index 7d3e3218cb..42a7f2125d 100644 --- a/plugins/StopSpamPlus/src/settings.h +++ b/plugins/StopSpamPlus/src/settings.h @@ -7,7 +7,7 @@ struct Settings CMOption<bool> InfTalkProtection, AddPermanent, HandleAuthReq, AnswNotCaseSens, RemTmpAll, HistLog;
CMOption<wchar_t*> Question, AuthRepl, Answer, Congratulation, AnswSplitString;
CMOption<char*> DisabledProtoList;
- CMOption<DWORD> MaxQuestCount;
+ CMOption<uint32_t> MaxQuestCount;
const wchar_t* getQuestion();
const wchar_t* getReply();
diff --git a/plugins/TabSRMM/src/ImageDataObject.h b/plugins/TabSRMM/src/ImageDataObject.h index 3f46b44d6d..c50af974c2 100644 --- a/plugins/TabSRMM/src/ImageDataObject.h +++ b/plugins/TabSRMM/src/ImageDataObject.h @@ -114,7 +114,7 @@ public: return E_NOTIMPL;
}
- STDMETHOD(DAdvise)(FORMATETC*, DWORD, IAdviseSink*, DWORD*) {
+ STDMETHOD(DAdvise)(FORMATETC*, DWORD, IAdviseSink*, DWORD *) {
return E_NOTIMPL;
}
diff --git a/plugins/TabSRMM/src/buttonsbar.cpp b/plugins/TabSRMM/src/buttonsbar.cpp index 11de4bfef8..535937acf4 100644 --- a/plugins/TabSRMM/src/buttonsbar.cpp +++ b/plugins/TabSRMM/src/buttonsbar.cpp @@ -331,7 +331,7 @@ void CMsgDialog::CB_DestroyAllButtons() } } -void CMsgDialog::CB_DestroyButton(DWORD dwButtonCID, DWORD dwFlags) +void CMsgDialog::CB_DestroyButton(uint32_t dwButtonCID, uint32_t dwFlags) { HWND hwndButton = GetDlgItem(m_hwnd, dwButtonCID); if (hwndButton == nullptr) diff --git a/plugins/TabSRMM/src/chat.h b/plugins/TabSRMM/src/chat.h index c083973fa7..0f77f3317e 100644 --- a/plugins/TabSRMM/src/chat.h +++ b/plugins/TabSRMM/src/chat.h @@ -46,7 +46,7 @@ class CMUCHighlight; struct MODULEINFO : public GCModuleInfoBase
{
- DWORD idleTimeStamp;
+ uint32_t idleTimeStamp;
wchar_t tszIdleMsg[60];
};
diff --git a/plugins/TabSRMM/src/chat_main.cpp b/plugins/TabSRMM/src/chat_main.cpp index ae2fffe1f3..93e42e4fab 100644 --- a/plugins/TabSRMM/src/chat_main.cpp +++ b/plugins/TabSRMM/src/chat_main.cpp @@ -187,7 +187,7 @@ static void CheckUpdate() }
if (compat == 1) {
- DWORD oldBackColor = db_get_dw(0, FONTMODULE, "BkgColourMUC", SRMSGDEFSET_BKGCOLOUR);
+ uint32_t oldBackColor = db_get_dw(0, FONTMODULE, "BkgColourMUC", SRMSGDEFSET_BKGCOLOUR);
db_set_dw(0, CHAT_MODULE, "ColorLogBG", oldBackColor);
db_unset(0, FONTMODULE, "BkgColourMUC");
compat++;
diff --git a/plugins/TabSRMM/src/chat_options.cpp b/plugins/TabSRMM/src/chat_options.cpp index a08f5effc6..3f4414cbf0 100644 --- a/plugins/TabSRMM/src/chat_options.cpp +++ b/plugins/TabSRMM/src/chat_options.cpp @@ -852,7 +852,7 @@ public: if (wszText)
edtNick.SetText(wszText);
- DWORD dwFlags = db_get_b(0, CHAT_MODULE, "HighlightEnabled", CMUCHighlight::MATCH_TEXT);
+ uint32_t dwFlags = db_get_b(0, CHAT_MODULE, "HighlightEnabled", CMUCHighlight::MATCH_TEXT);
chkNick.SetState(dwFlags & CMUCHighlight::MATCH_NICKNAME); onChange_Nick(0);
chkText.SetState(dwFlags & CMUCHighlight::MATCH_TEXT); onChange_Text(0);
diff --git a/plugins/TabSRMM/src/chat_tools.cpp b/plugins/TabSRMM/src/chat_tools.cpp index eec305efc6..39faf05df2 100644 --- a/plugins/TabSRMM/src/chat_tools.cpp +++ b/plugins/TabSRMM/src/chat_tools.cpp @@ -366,15 +366,15 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight void Chat_SetFilters(SESSION_INFO *si)
{
- DWORD dwFlags_default = db_get_dw(0, CHAT_MODULE, "FilterFlags", GC_EVENT_ALL);
- DWORD dwFlags_local = db_get_dw(si->hContact, CHAT_MODULE, "FilterFlags", GC_EVENT_ALL);
- DWORD dwMask = db_get_dw(si->hContact, CHAT_MODULE, "FilterMask", 0);
+ uint32_t dwFlags_default = db_get_dw(0, CHAT_MODULE, "FilterFlags", GC_EVENT_ALL);
+ uint32_t dwFlags_local = db_get_dw(si->hContact, CHAT_MODULE, "FilterFlags", GC_EVENT_ALL);
+ uint32_t dwMask = db_get_dw(si->hContact, CHAT_MODULE, "FilterMask", 0);
CMsgDialog *pDlg = si->pDlg;
if (pDlg) {
pDlg->m_iLogFilterFlags = dwFlags_default;
for (int i = 0; i < 32; i++) {
- DWORD dwBit = 1 << i;
+ uint32_t dwBit = 1 << i;
if (dwMask & dwBit)
pDlg->m_iLogFilterFlags = (dwFlags_local & dwBit) ? pDlg->m_iLogFilterFlags | dwBit : pDlg->m_iLogFilterFlags & ~dwBit;
}
@@ -386,7 +386,7 @@ void Chat_SetFilters(SESSION_INFO *si) si->iLogPopupFlags = dwFlags_default;
for (int i = 0; i < 32; i++) {
- DWORD dwBit = 1 << i;
+ uint32_t dwBit = 1 << i;
if (dwMask & dwBit)
si->iLogPopupFlags = (dwFlags_local & dwBit) ? si->iLogPopupFlags | dwBit : si->iLogPopupFlags & ~dwBit;
}
@@ -397,7 +397,7 @@ void Chat_SetFilters(SESSION_INFO *si) si->iLogTrayFlags = dwFlags_default;
for (int i = 0; i < 32; i++) {
- DWORD dwBit = 1 << i;
+ uint32_t dwBit = 1 << i;
if (dwMask & dwBit)
si->iLogTrayFlags = (dwFlags_local & dwBit) ? si->iLogTrayFlags | dwBit : si->iLogTrayFlags & ~dwBit;
}
diff --git a/plugins/TabSRMM/src/contactcache.h b/plugins/TabSRMM/src/contactcache.h index 0f3471e725..d816349053 100644 --- a/plugins/TabSRMM/src/contactcache.h +++ b/plugins/TabSRMM/src/contactcache.h @@ -60,7 +60,7 @@ class CContactCache : public MZeroedObject wchar_t m_szNick[80], m_szUIN[80];
wchar_t *m_szStatusMsg, *m_xStatusMsg, *m_ListeningInfo;
uint8_t m_xStatus;
- DWORD m_idleTS;
+ uint32_t m_idleTS;
bool m_isMeta;
bool m_isValid;
int m_nMax;
@@ -89,7 +89,7 @@ public: __forceinline LPCWSTR getNick() const { return m_szNick; }
__forceinline MCONTACT getContact() const { return m_hContact; }
__forceinline MCONTACT getActiveContact() const { return (m_isMeta) ? m_hSub : m_hContact; }
- __forceinline DWORD getIdleTS() const { return m_idleTS; }
+ __forceinline uint32_t getIdleTS() const { return m_idleTS; }
__forceinline LPCSTR getProto() const { return cc->szProto; }
__forceinline LPCSTR getActiveProto() const { return m_isMeta ? (m_szMetaProto ? m_szMetaProto : cc->szProto) : cc->szProto; }
@@ -103,7 +103,7 @@ public: __forceinline LPCWSTR getListeningInfo() const { return m_ListeningInfo; }
__forceinline uint8_t getXStatusId() const { return m_xStatus; }
- __forceinline DWORD getSessionStart() const { return m_stats->started; }
+ __forceinline uint32_t getSessionStart() const { return m_stats->started; }
__forceinline int getSessionMsgCount() const { return (int)m_stats->messageCount; }
__forceinline CMsgDialog* getDat() const { return m_dat; }
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index 3412bf1e33..f33ac02fd6 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -149,14 +149,14 @@ void TContainerData::ActivateExistingTab(CMsgDialog *dat) void TContainerData::AdjustTabClientRect(RECT &rc)
{
- DWORD dwStyle = GetWindowLongPtr(m_hwndTabs, GWL_STYLE);
+ uint32_t dwStyle = GetWindowLongPtr(m_hwndTabs, GWL_STYLE);
RECT rcTab, rcTabOrig;
GetClientRect(m_hwndTabs, &rcTab);
if (!m_flags.m_bSideBar && (m_iChilds > 1 || !m_flags.m_bHideTabs)) {
rcTabOrig = rcTab;
TabCtrl_AdjustRect(m_hwndTabs, FALSE, &rcTab);
- DWORD dwTopPad = rcTab.top - rcTabOrig.top;
+ uint32_t dwTopPad = rcTab.top - rcTabOrig.top;
rc.left += m_tBorder;
rc.right -= m_tBorder;
@@ -224,7 +224,7 @@ void TContainerData::CloseTabByMouse(POINT *pt) void TContainerData::Configure()
{
- DWORD wsold, ws = wsold = GetWindowLong(m_hwnd, GWL_STYLE);
+ uint32_t wsold, ws = wsold = GetWindowLong(m_hwnd, GWL_STYLE);
if (!CSkin::m_frameSkins) {
ws = (m_flags.m_bNoTitle) ?
((IsWindowVisible(m_hwnd) ? WS_VISIBLE : 0) | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_CLIPCHILDREN | WS_THICKFRAME | (CSkin::m_frameSkins ? WS_SYSMENU : WS_SYSMENU | WS_SIZEBOX)) :
@@ -241,12 +241,12 @@ void TContainerData::Configure() BOOL fTransAllowed = !CSkin::m_skinEnabled || IsWinVerVistaPlus();
- DWORD ex = GetWindowLong(m_hwnd, GWL_EXSTYLE);
+ uint32_t ex = GetWindowLong(m_hwnd, GWL_EXSTYLE);
ex = (m_flags.m_bTransparent && (!CSkin::m_skinEnabled || fTransAllowed)) ? (ex | WS_EX_LAYERED) : (ex & ~WS_EX_LAYERED);
SetWindowLong(m_hwnd, GWL_EXSTYLE, ex);
if (m_flags.m_bTransparent && fTransAllowed) {
- DWORD trans = LOWORD(m_pSettings->dwTransparency);
+ uint32_t trans = LOWORD(m_pSettings->dwTransparency);
SetLayeredWindowAttributes(m_hwnd, Skin->getColorKey(), (uint8_t)trans, (/* m_bSkinned ? LWA_COLORKEY : */ 0) | (m_flags.m_bTransparent ? LWA_ALPHA : 0));
}
@@ -341,7 +341,7 @@ void TContainerData::InitDialog(HWND hwndDlg) m_hwnd = hwndDlg;
m_hwndTabs = ::GetDlgItem(hwndDlg, IDC_MSGTABS);
{
- DWORD dwCreateFlags = m_flags.dw;
+ uint32_t dwCreateFlags = m_flags.dw;
m_isCloned = m_flags.m_bCreateCloned;
m_fPrivateThemeChanged = FALSE;
@@ -349,7 +349,7 @@ void TContainerData::InitDialog(HWND hwndDlg) m_flags.dw |= dwCreateFlags;
LoadOverrideTheme();
- DWORD ws = ::GetWindowLong(m_hwndTabs, GWL_STYLE);
+ uint32_t ws = ::GetWindowLong(m_hwndTabs, GWL_STYLE);
if (m_flagsEx.m_bTabFlat)
ws |= TCS_BUTTONS;
@@ -525,13 +525,13 @@ void TContainerData::QueryClientArea(RECT &rc) void TContainerData::QueryPending()
{
int iMostRecent = -1;
- DWORD dwMostRecent = 0;
+ uint32_t dwMostRecent = 0;
HWND hwndMostRecent = nullptr;
int iItems = TabCtrl_GetItemCount(m_hwndTabs);
for (int i = 0; i < iItems; i++) {
HWND hDlg = GetTabWindow(m_hwndTabs, i);
- DWORD dwTimestamp;
+ uint32_t dwTimestamp;
SendMessage(hDlg, DM_QUERYLASTUNREAD, 0, (LPARAM)&dwTimestamp);
if (dwTimestamp > dwMostRecent) {
dwMostRecent = dwTimestamp;
@@ -557,15 +557,15 @@ void TContainerData::ReflashContainer() if (m_flags.m_bNoFlash || m_dwFlashingStarted == 0)
return; // dont care about containers which should never flash
- DWORD dwStartTime = m_dwFlashingStarted;
+ uint32_t dwStartTime = m_dwFlashingStarted;
if (m_flags.m_bFlashAlways)
FlashContainer(1, 0);
else {
// recalc the remaining flashes
- DWORD dwInterval = M.GetDword("flashinterval", 1000);
+ uint32_t dwInterval = M.GetDword("flashinterval", 1000);
int iFlashesElapsed = (GetTickCount() - dwStartTime) / dwInterval;
- DWORD dwFlashesDesired = M.GetByte("nrflash", 4);
+ uint32_t dwFlashesDesired = M.GetByte("nrflash", 4);
if (iFlashesElapsed < (int)dwFlashesDesired)
FlashContainer(1, dwFlashesDesired - iFlashesElapsed);
else {
@@ -1433,7 +1433,7 @@ panel_found: pContainer->m_pMenuBar->Cancel();
dat = (CMsgDialog*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
- DWORD dwOldFlags = pContainer->m_flags.dw;
+ uint32_t dwOldFlags = pContainer->m_flags.dw;
auto &f = pContainer->m_flags;
@@ -1839,7 +1839,7 @@ panel_found: }
if (pContainer->m_flags.m_bTransparent && fTransAllowed) {
- DWORD trans = LOWORD(pContainer->m_pSettings->dwTransparency);
+ uint32_t trans = LOWORD(pContainer->m_pSettings->dwTransparency);
SetLayeredWindowAttributes(hwndDlg, Skin->getColorKey(), (uint8_t)trans, (pContainer->m_flags.m_bTransparent ? LWA_ALPHA : 0));
}
if (pContainer->m_flags.m_bNeedsUpdateTitle) {
@@ -2229,7 +2229,7 @@ void TSAPI AutoCreateWindow(MCONTACT hContact, MEVENT hDbEvent) bool bAutoPopup = M.GetBool(SRMSGSET_AUTOPOPUP, SRMSGDEFSET_AUTOPOPUP);
bool bAutoContainer = M.GetBool("autocontainer", true);
- DWORD dwStatusMask = M.GetDword("autopopupmask", -1);
+ uint32_t dwStatusMask = M.GetDword("autopopupmask", -1);
if (dwStatusMask == -1)
bAllowAutoCreate = true;
else {
diff --git a/plugins/TabSRMM/src/containeroptions.cpp b/plugins/TabSRMM/src/containeroptions.cpp index f38dcb48c2..d5e5c63c18 100644 --- a/plugins/TabSRMM/src/containeroptions.cpp +++ b/plugins/TabSRMM/src/containeroptions.cpp @@ -348,7 +348,7 @@ do_apply: Utils::enableDlgControl(hwndDlg, IDC_APPLY, true); auto flags = cs->flags;
auto flagsEx = cs->flagsEx;
- DWORD dwTransparency = cs->dwTransparency;
+ uint32_t dwTransparency = cs->dwTransparency;
BOOL fAllowTrans = FALSE;
if (IsWinVerVistaPlus())
diff --git a/plugins/TabSRMM/src/controls.cpp b/plugins/TabSRMM/src/controls.cpp index c9b04eb7c3..8eac56a0bb 100644 --- a/plugins/TabSRMM/src/controls.cpp +++ b/plugins/TabSRMM/src/controls.cpp @@ -436,7 +436,7 @@ void CMenuBar::Cancel(void) /////////////////////////////////////////////////////////////////////////////////////////
-static void MY_CheckMenu(const HMENU hMenu, int id, DWORD key)
+static void MY_CheckMenu(const HMENU hMenu, int id, uint32_t key)
{
::CheckMenuItem(hMenu, id, MF_BYCOMMAND | (key ? MF_CHECKED : MF_UNCHECKED));
}
diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp index 82caf1009b..e8ad031771 100644 --- a/plugins/TabSRMM/src/eventpopups.cpp +++ b/plugins/TabSRMM/src/eventpopups.cpp @@ -92,7 +92,7 @@ int TSAPI NEN_ReadOptions(NEN_OPTIONS *options) options->bNoRSS = (BOOL)db_get_b(0, MODULE, OPT_NORSS, FALSE);
options->iDisable = (uint8_t)db_get_b(0, MODULE, OPT_DISABLE, 0);
options->iMUCDisable = (uint8_t)db_get_b(0, MODULE, OPT_MUCDISABLE, 0);
- options->dwStatusMask = db_get_dw(0, MODULE, "statusmask", (DWORD)-1);
+ options->dwStatusMask = db_get_dw(0, MODULE, "statusmask", (uint32_t)-1);
options->bWindowCheck = (BOOL)db_get_b(0, MODULE, OPT_WINDOWCHECK, 0);
options->bNoRSS = (BOOL)db_get_b(0, MODULE, OPT_NORSS, 0);
options->iLimitPreview = db_get_dw(0, MODULE, OPT_LIMITPREVIEW, 0);
@@ -110,19 +110,19 @@ int TSAPI NEN_WriteOptions(NEN_OPTIONS *options) db_set_b(0, MODULE, OPT_COLDEFAULT_MESSAGE, (uint8_t)options->bDefaultColorMsg);
db_set_b(0, MODULE, OPT_COLDEFAULT_OTHERS, (uint8_t)options->bDefaultColorOthers);
db_set_b(0, MODULE, OPT_COLDEFAULT_ERR, (uint8_t)options->bDefaultColorErr);
- db_set_dw(0, MODULE, OPT_COLBACK_MESSAGE, (DWORD)options->colBackMsg);
- db_set_dw(0, MODULE, OPT_COLTEXT_MESSAGE, (DWORD)options->colTextMsg);
- db_set_dw(0, MODULE, OPT_COLBACK_OTHERS, (DWORD)options->colBackOthers);
- db_set_dw(0, MODULE, OPT_COLTEXT_OTHERS, (DWORD)options->colTextOthers);
- db_set_dw(0, MODULE, OPT_COLBACK_ERR, (DWORD)options->colBackErr);
- db_set_dw(0, MODULE, OPT_COLTEXT_ERR, (DWORD)options->colTextErr);
+ db_set_dw(0, MODULE, OPT_COLBACK_MESSAGE, (uint32_t)options->colBackMsg);
+ db_set_dw(0, MODULE, OPT_COLTEXT_MESSAGE, (uint32_t)options->colTextMsg);
+ db_set_dw(0, MODULE, OPT_COLBACK_OTHERS, (uint32_t)options->colBackOthers);
+ db_set_dw(0, MODULE, OPT_COLTEXT_OTHERS, (uint32_t)options->colTextOthers);
+ db_set_dw(0, MODULE, OPT_COLBACK_ERR, (uint32_t)options->colBackErr);
+ db_set_dw(0, MODULE, OPT_COLTEXT_ERR, (uint32_t)options->colTextErr);
db_set_b(0, MODULE, OPT_MASKACTL, (uint8_t)options->maskActL);
db_set_b(0, MODULE, OPT_MASKACTR, (uint8_t)options->maskActR);
db_set_b(0, MODULE, OPT_MASKACTTE, (uint8_t)options->maskActTE);
db_set_b(0, MODULE, OPT_MERGEPOPUP, (uint8_t)options->bMergePopup);
- db_set_dw(0, MODULE, OPT_DELAY_MESSAGE, (DWORD)options->iDelayMsg);
- db_set_dw(0, MODULE, OPT_DELAY_OTHERS, (DWORD)options->iDelayOthers);
- db_set_dw(0, MODULE, OPT_DELAY_ERR, (DWORD)options->iDelayErr);
+ db_set_dw(0, MODULE, OPT_DELAY_MESSAGE, (uint32_t)options->iDelayMsg);
+ db_set_dw(0, MODULE, OPT_DELAY_OTHERS, (uint32_t)options->iDelayOthers);
+ db_set_dw(0, MODULE, OPT_DELAY_ERR, (uint32_t)options->iDelayErr);
db_set_b(0, MODULE, OPT_SHOW_HEADERS, (uint8_t)options->bShowHeaders);
db_set_b(0, MODULE, OPT_DISABLE, (uint8_t)options->iDisable);
db_set_b(0, MODULE, OPT_MUCDISABLE, (uint8_t)options->iMUCDisable);
@@ -263,18 +263,18 @@ static wchar_t* GetPreviewT(uint16_t eventType, DBEVENTINFO *dbe) if (!nen_options.bPreview)
return mir_wstrdup(TranslateT("Incoming file"));
- if (dbe->cbBlob > 5) { // min valid size = (sizeof(DWORD) + 1 character file name + terminating 0)
- char* szFileName = (char *)dbe->pBlob + sizeof(DWORD);
+ if (dbe->cbBlob > 5) { // min valid size = (sizeof(uint32_t) + 1 character file name + terminating 0)
+ char* szFileName = (char *)dbe->pBlob + sizeof(uint32_t);
char* szDescr = nullptr;
- size_t namelength = Utils::safe_strlen(szFileName, dbe->cbBlob - sizeof(DWORD));
+ size_t namelength = Utils::safe_strlen(szFileName, dbe->cbBlob - sizeof(uint32_t));
- if (dbe->cbBlob > (sizeof(DWORD) + namelength + 1))
+ if (dbe->cbBlob > (sizeof(uint32_t) + namelength + 1))
szDescr = szFileName + namelength + 1;
ptrW tszFileName(DbEvent_GetString(dbe, szFileName));
wchar_t buf[1024];
- if (szDescr && Utils::safe_strlen(szDescr, dbe->cbBlob - sizeof(DWORD) - namelength - 1) > 0) {
+ if (szDescr && Utils::safe_strlen(szDescr, dbe->cbBlob - sizeof(uint32_t) - namelength - 1) > 0) {
ptrW tszDescr(DbEvent_GetString(dbe, szDescr));
if (tszFileName && tszDescr) {
mir_snwprintf(buf, L"%s: %s (%s)", TranslateT("Incoming file"), tszFileName.get(), tszDescr.get());
@@ -617,7 +617,7 @@ public: INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override
{
if (msg == WM_COMMAND && wParam == DM_STATUSMASKSET) {
- db_set_dw(0, MODULE, "statusmask", (DWORD)lParam);
+ db_set_dw(0, MODULE, "statusmask", (uint32_t)lParam);
tmpOpts.dwStatusMask = (int)lParam;
}
@@ -761,7 +761,7 @@ passed: }
// remove all popups for hContact, but only if the mask matches the current "mode"
-void TSAPI DeletePopupsForContact(MCONTACT hContact, DWORD dwMask)
+void TSAPI DeletePopupsForContact(MCONTACT hContact, uint32_t dwMask)
{
if (!(dwMask & nen_options.dwRemoveMask) || nen_options.iDisable)
return;
diff --git a/plugins/TabSRMM/src/functions.h b/plugins/TabSRMM/src/functions.h index 7a2c9bde03..9141b94745 100644 --- a/plugins/TabSRMM/src/functions.h +++ b/plugins/TabSRMM/src/functions.h @@ -50,7 +50,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP int TSAPI NEN_ReadOptions(NEN_OPTIONS *options);
int TSAPI NEN_WriteOptions(NEN_OPTIONS *options);
-void TSAPI DeletePopupsForContact(MCONTACT hContact, DWORD dwMask);
+void TSAPI DeletePopupsForContact(MCONTACT hContact, uint32_t dwMask);
/*
* gneric msgwindow functions(creation, container management etc.)
@@ -84,8 +84,8 @@ LRESULT CALLBACK HPPKFSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP /*
* skinning engine
*/
-void TSAPI DrawAlpha(HDC hdcwnd, PRECT rc, DWORD basecolor, int alpha, DWORD basecolor2,
- uint8_t transparent, uint8_t FLG_GRADIENT, uint8_t FLG_CORNER, DWORD BORDERSTYLE, CImageItem *imageItem);
+void TSAPI DrawAlpha(HDC hdcwnd, PRECT rc, uint32_t basecolor, int alpha, uint32_t basecolor2,
+ uint8_t transparent, uint8_t FLG_GRADIENT, uint8_t FLG_CORNER, uint32_t BORDERSTYLE, CImageItem *imageItem);
// the cached message log icons
void TSAPI CacheMsgLogIcons();
@@ -116,7 +116,7 @@ int _DebugPopup(MCONTACT hContact, const wchar_t *fmt, ...); const wchar_t* TSAPI GetThemeFileName(int iMode);
int TSAPI CheckThemeVersion(const wchar_t *szIniFilename);
void TSAPI WriteThemeToINI(const wchar_t *szIniFilename, CMsgDialog *dat);
-void TSAPI ReadThemeFromINI(const wchar_t *szIniFilename, TContainerData *dat, int noAdvanced, DWORD dwFlags);
+void TSAPI ReadThemeFromINI(const wchar_t *szIniFilename, TContainerData *dat, int noAdvanced, uint32_t dwFlags);
// TypingNotify
int TN_ModuleInit();
@@ -124,6 +124,6 @@ int TN_OptionsInitialize(WPARAM wParam, LPARAM lParam); int TN_ModuleDeInit();
void TN_TypingMessage(MCONTACT hContact, int iMode);
-void TSAPI DrawMenuItem(DRAWITEMSTRUCT *dis, HICON hIcon, DWORD dwIdle);
+void TSAPI DrawMenuItem(DRAWITEMSTRUCT *dis, HICON hIcon, uint32_t dwIdle);
#endif /* _TABSRMM_FUNCTIONS_H */
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index d80846dc20..0ef190872d 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -611,7 +611,7 @@ void CMsgDialog::DM_SetDBButtonStates() result = (db_get_w(hFinalContact, szModule, szSetting, 0) == *((uint16_t *)&buttonItem->bValuePush)); break; case DBVT_DWORD: - result = (db_get_dw(hFinalContact, szModule, szSetting, 0) == *((DWORD *)&buttonItem->bValuePush)); + result = (db_get_dw(hFinalContact, szModule, szSetting, 0) == *((uint32_t *)&buttonItem->bValuePush)); break; case DBVT_ASCIIZ: ptrA szValue(db_get_sa(hFinalContact, szModule, szSetting)); @@ -818,7 +818,7 @@ void CMsgDialog::DM_NotifyTyping(int mode) return; // check status and capabilities of the protocol - DWORD typeCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0); + uint32_t typeCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0); if (!(typeCaps & PF4_SUPPORTTYPING)) return; @@ -827,13 +827,13 @@ void CMsgDialog::DM_NotifyTyping(int mode) Chat_DoEventHook(m_si, GC_USER_TYPNOTIFY, 0, 0, m_nTypeMode); } else { - DWORD protoStatus = Proto_GetStatus(szProto); + uint32_t protoStatus = Proto_GetStatus(szProto); if (protoStatus < ID_STATUS_ONLINE) return; // check visibility/invisibility lists to not "accidentially" send MTN to contacts who // should not see them (privacy issue) - DWORD protoCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0); + uint32_t protoCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0); if (protoCaps & PF1_VISLIST && db_get_w(hContact, szProto, "ApparentMode", 0) == ID_STATUS_OFFLINE) return; diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index b8ba8a3202..6df3b4cf57 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -145,7 +145,7 @@ void CGlobals::reloadSettings(bool fReloadSkins) m_bAlwaysFullToolbarWidth = M.GetBool("alwaysfulltoolbar", true);
m_LimitStaticAvatarHeight = M.GetDword("avatarheight", 96);
m_SendFormat = M.GetByte("sendformat", 0);
- m_panelHeight = (DWORD)M.GetDword("panelheight", CInfoPanel::DEGRADE_THRESHOLD);
+ m_panelHeight = (uint32_t)M.GetDword("panelheight", CInfoPanel::DEGRADE_THRESHOLD);
m_MUCpanelHeight = db_get_dw(0, CHAT_MODULE, "panelheight", CInfoPanel::DEGRADE_THRESHOLD);
m_bIdleDetect = M.GetBool("dimIconsForIdleContacts", true);
m_smcxicon = m_smcyicon = 16;
diff --git a/plugins/TabSRMM/src/globals.h b/plugins/TabSRMM/src/globals.h index 9dababbc3e..c2e70fb3c5 100644 --- a/plugins/TabSRMM/src/globals.h +++ b/plugins/TabSRMM/src/globals.h @@ -114,13 +114,13 @@ public: COLORREF crIncoming, crOutgoing, crOldIncoming, crOldOutgoing, crStatus;
BOOL bUnicodeBuild;
HFONT hFontCaption;
- DWORD m_LangPackCP;
+ uint32_t m_LangPackCP;
uint8_t m_SmileyButtonOverride;
HICON m_AnimTrayIcons[4];
BOOL m_visualMessageSizeIndicator;
BOOL m_autoSplit;
BOOL m_FlashOnMTN;
- DWORD dwThreadID;
+ uint32_t dwThreadID;
MWindowList m_hMessageWindowList, hUserPrefsWindowList;
HMENU m_MenuBar;
COLORREF m_ipBackgroundGradient;
diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp index 547105fd7a..ca9e641425 100644 --- a/plugins/TabSRMM/src/hotkeyhandler.cpp +++ b/plugins/TabSRMM/src/hotkeyhandler.cpp @@ -131,7 +131,7 @@ static INT_PTR HotkeyProcessor(WPARAM, LPARAM lParam) return 0;
}
-void TSAPI DrawMenuItem(DRAWITEMSTRUCT *dis, HICON hIcon, DWORD dwIdle)
+void TSAPI DrawMenuItem(DRAWITEMSTRUCT *dis, HICON hIcon, uint32_t dwIdle)
{
FillRect(dis->hDC, &dis->rcItem, GetSysColorBrush(COLOR_MENU));
if (dwIdle)
@@ -183,7 +183,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP LPDRAWITEMSTRUCT dis = (LPDRAWITEMSTRUCT)lParam;
if (dis->CtlType == ODT_MENU) {
HWND hWnd = Srmm_FindWindow((MCONTACT)dis->itemID);
- DWORD idle = 0;
+ uint32_t idle = 0;
if (hWnd == nullptr) {
SESSION_INFO *si = SM_FindSessionByHCONTACT((MCONTACT)dis->itemID);
diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp index 7eee42f021..bf237ef046 100644 --- a/plugins/TabSRMM/src/infopanel.cpp +++ b/plugins/TabSRMM/src/infopanel.cpp @@ -413,7 +413,7 @@ void CInfoPanel::RenderIPNickname(const HDC hdc, RECT &rcItem) ::GetTextExtentPoint32(hdc, L"A", 1, &sMask);
::GetTextExtentPoint32(hdc, szStatusMsg, (int)mir_wstrlen(szStatusMsg), &sStatusMsg);
- DWORD dtFlagsNick = DT_SINGLELINE | DT_WORD_ELLIPSIS | DT_NOPREFIX;
+ uint32_t dtFlagsNick = DT_SINGLELINE | DT_WORD_ELLIPSIS | DT_NOPREFIX;
if ((m_szNick.cx + sStatusMsg.cx + 6) < (rcItem.right - rcItem.left) || (rcItem.bottom - rcItem.top) < (2 * sMask.cy)) {
dtFlagsNick |= DT_VCENTER;
mapRealRect(rcItem, m_rcNick, m_szNick);
@@ -433,7 +433,7 @@ void CInfoPanel::RenderIPNickname(const HDC hdc, RECT &rcItem) rcItem.left += (m_szNick.cx + 10);
- DWORD dtFlags;
+ uint32_t dtFlags;
if (!(dtFlagsNick & DT_VCENTER))
dtFlags = DT_WORDBREAK | DT_END_ELLIPSIS | DT_NOPREFIX;
else
@@ -517,7 +517,7 @@ void CInfoPanel::RenderIPUIN(const HDC hdc, RECT& rcItem) void CInfoPanel::RenderIPStatus(const HDC hdc, RECT& rcItem)
{
SIZE sProto = { 0 }, sStatus = { 0 }, sTime = { 0 };
- DWORD oldPanelStatusCX = m_dat->m_panelStatusCX;
+ uint32_t oldPanelStatusCX = m_dat->m_panelStatusCX;
if (m_dat->m_wszStatus[0])
GetTextExtentPoint32(hdc, m_dat->m_wszStatus, (int)mir_wstrlen(m_dat->m_wszStatus), &sStatus);
@@ -819,7 +819,7 @@ void CInfoPanel::trackMouse(POINT &pt) int result = hitTest(pt);
- DWORD dwOldHovering = m_hoverFlags;
+ uint32_t dwOldHovering = m_hoverFlags;
m_hoverFlags = 0;
switch (result) {
diff --git a/plugins/TabSRMM/src/infopanel.h b/plugins/TabSRMM/src/infopanel.h index 34784514c0..afed4652f5 100644 --- a/plugins/TabSRMM/src/infopanel.h +++ b/plugins/TabSRMM/src/infopanel.h @@ -135,7 +135,7 @@ public: __forceinline const LONG getHeight() const { return m_height; }
__forceinline bool isActive() const { return m_active; }
__forceinline bool isPrivateHeight() const { return m_fPrivateHeight; }
- __forceinline DWORD isHovered() const { return m_active ? m_hoverFlags : 0; }
+ __forceinline uint32_t isHovered() const { return m_active ? m_hoverFlags : 0; }
__forceinline const CMsgDialog* getDat() const { return m_dat; }
void setHeight(LONG newHeight, bool fBroadcast = false);
@@ -194,7 +194,7 @@ private: RECT m_rcNick;
RECT m_rcUIN;
RECT m_rcStatus;
- DWORD m_hoverFlags;
+ uint32_t m_hoverFlags;
CTip *m_tip;
};
diff --git a/plugins/TabSRMM/src/mim.h b/plugins/TabSRMM/src/mim.h index 84765e9945..6f20741e32 100644 --- a/plugins/TabSRMM/src/mim.h +++ b/plugins/TabSRMM/src/mim.h @@ -41,15 +41,15 @@ typedef HRESULT(WINAPI *DEFICA)(HWND hwnd, const MARGINS *margins); typedef HRESULT(WINAPI *DICE)(BOOL *);
typedef HRESULT(WINAPI *DRT)(HWND, HWND, PHTHUMBNAIL);
typedef HRESULT(WINAPI *BBW)(HWND, DWM_BLURBEHIND *);
-typedef HRESULT(WINAPI *DGC)(DWORD *, BOOL *);
+typedef HRESULT(WINAPI *DGC)(uint32_t *, BOOL *);
typedef HRESULT(WINAPI *DWMIIB)(HWND);
-typedef HRESULT(WINAPI *DWMSWA)(HWND, DWORD, LPCVOID, DWORD);
+typedef HRESULT(WINAPI *DWMSWA)(HWND, uint32_t, LPCVOID, uint32_t);
typedef HRESULT(WINAPI *DWMUT)(HTHUMBNAIL, DWM_THUMBNAIL_PROPERTIES *);
typedef HRESULT(WINAPI *DURT)(HTHUMBNAIL);
-typedef HRESULT(WINAPI *DSIT)(HWND, HBITMAP, DWORD);
-typedef HRESULT(WINAPI *DSILP)(HWND, HBITMAP, POINT *, DWORD);
+typedef HRESULT(WINAPI *DSIT)(HWND, HBITMAP, uint32_t);
+typedef HRESULT(WINAPI *DSILP)(HWND, HBITMAP, POINT *, uint32_t);
//uxtheme
-typedef UINT(WINAPI *PDTTE)(HANDLE, HDC, int, int, LPCWSTR, int, DWORD, RECT *, const DTTOPTS *);
+typedef UINT(WINAPI *PDTTE)(HANDLE, HDC, int, int, LPCWSTR, int, uint32_t, RECT *, const DTTOPTS *);
typedef HANDLE(WINAPI *BBP)(HDC, RECT *, BP_BUFFERFORMAT, BP_PAINTPARAMS *, HDC *);
typedef HRESULT(WINAPI *EBP)(HANDLE, BOOL);
typedef HRESULT(WINAPI *BPI)(void);
@@ -97,10 +97,10 @@ public: * database functions
*/
- static DWORD __forceinline GetDword(const char *szSetting, DWORD uDefault)
+ static uint32_t __forceinline GetDword(const char *szSetting, uint32_t uDefault)
{ return db_get_dw(0, SRMSGMOD_T, szSetting, uDefault);
}
- static DWORD __forceinline GetDword(const MCONTACT hContact, const char *szSetting, DWORD uDefault)
+ static uint32_t __forceinline GetDword(const MCONTACT hContact, const char *szSetting, uint32_t uDefault)
{ return db_get_dw(hContact, SRMSGMOD_T, szSetting, uDefault);
}
@@ -128,10 +128,10 @@ public: { db_set_b(hContact, SRMSGMOD_T, "isFavorite", bValue);
}
- static DWORD __forceinline IsRecent(const MCONTACT hContact)
+ static uint32_t __forceinline IsRecent(const MCONTACT hContact)
{ return db_get_dw(hContact, SRMSGMOD_T, "isRecent", 0);
}
- static void __forceinline SetRecent(const MCONTACT hContact, DWORD dwValue)
+ static void __forceinline SetRecent(const MCONTACT hContact, uint32_t dwValue)
{ db_set_dw(hContact, SRMSGMOD_T, "isRecent", dwValue);
}
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index cf7c408d2e..ee8dc5ca04 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -272,7 +272,7 @@ LRESULT CALLBACK SplitterSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM case ID_SPLITTERCONTEXT_SAVEGLOBALFORALLSESSIONS:
{
- DWORD dwOff_IM = 0, dwOff_CHAT = 0;
+ uint32_t dwOff_IM = 0, dwOff_CHAT = 0;
dwOff_CHAT = -(2 + (PluginConfig.m_DPIscaleY > 1.0 ? 1 : 0));
dwOff_IM = 2 + (PluginConfig.m_DPIscaleY > 1.0 ? 1 : 0);
@@ -964,9 +964,9 @@ void CMsgDialog::onClick_Quote(CCtrlButton*) }
if (dbei.eventType == EVENTTYPE_FILE) {
- size_t iDescr = mir_strlen((char *)(szText + sizeof(DWORD)));
- memmove(szText, szText + sizeof(DWORD), iDescr);
- memmove(szText + iDescr + 2, szText + sizeof(DWORD) + iDescr, dbei.cbBlob - iDescr - sizeof(DWORD) - 1);
+ size_t iDescr = mir_strlen((char *)(szText + sizeof(uint32_t)));
+ memmove(szText, szText + sizeof(uint32_t), iDescr);
+ memmove(szText + iDescr + 2, szText + sizeof(uint32_t) + iDescr, dbei.cbBlob - iDescr - sizeof(uint32_t) - 1);
szText[iDescr] = '\r';
szText[iDescr + 1] = '\n';
szConverted = (wchar_t*)mir_alloc(sizeof(wchar_t)* (1 + mir_strlen((char *)szText)));
@@ -1392,7 +1392,7 @@ int CMsgDialog::Resizer(UTILRESIZECONTROL *urc) int CMsgDialog::OnFilter(MSGFILTER *pFilter)
{
- DWORD msg = pFilter->msg;
+ uint32_t msg = pFilter->msg;
WPARAM wp = pFilter->wParam;
LPARAM lp = pFilter->lParam;
@@ -1467,9 +1467,9 @@ int CMsgDialog::OnFilter(MSGFILTER *pFilter) case TABSRMM_HK_TOGGLERTL:
m_dwFlags ^= MWF_LOG_RTL;
{
- DWORD dwGlobal = M.GetDword("mwflags", MWF_LOG_DEFAULT);
- DWORD dwMask = M.GetDword(m_hContact, "mwmask", 0);
- DWORD dwFlags = M.GetDword(m_hContact, "mwflags", 0);
+ uint32_t dwGlobal = M.GetDword("mwflags", MWF_LOG_DEFAULT);
+ uint32_t dwMask = M.GetDword(m_hContact, "mwmask", 0);
+ uint32_t dwFlags = M.GetDword(m_hContact, "mwflags", 0);
if ((dwGlobal & MWF_LOG_RTL) != (dwFlags & MWF_LOG_RTL)) {
dwMask |= MWF_LOG_RTL;
@@ -2202,8 +2202,8 @@ INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) HANDLE hpb = nullptr;
GetClientRect(m_hwnd, &rcClient);
- DWORD cx = rcClient.right - rcClient.left;
- DWORD cy = rcClient.bottom - rcClient.top;
+ uint32_t cx = rcClient.right - rcClient.left;
+ uint32_t cy = rcClient.bottom - rcClient.top;
if (CMimAPI::m_haveBufferedPaint) {
hpb = CMimAPI::m_pfnBeginBufferedPaint(hdc, &rcClient, BPBF_TOPDOWNDIB, nullptr, &hdcMem);
@@ -2632,7 +2632,7 @@ INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) // 0 if there is none
// lParam = pointer to a dword receiving the value.
{
- DWORD *pdw = (DWORD *)lParam;
+ uint32_t *pdw = (uint32_t *)lParam;
if (pdw)
*pdw = m_dwTickLastEvent;
}
@@ -2863,7 +2863,7 @@ INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_APPCOMMAND:
{
- DWORD cmd = GET_APPCOMMAND_LPARAM(lParam);
+ uint32_t cmd = GET_APPCOMMAND_LPARAM(lParam);
if (cmd == APPCOMMAND_BROWSER_BACKWARD || cmd == APPCOMMAND_BROWSER_FORWARD) {
m_pContainer->SelectTab(cmd == APPCOMMAND_BROWSER_BACKWARD ? DM_SELECT_PREV : DM_SELECT_NEXT);
return 1;
@@ -2877,7 +2877,7 @@ INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_CONTEXTMENU:
{
- DWORD idFrom = GetDlgCtrlID((HWND)wParam);
+ uint32_t idFrom = GetDlgCtrlID((HWND)wParam);
if (idFrom >= MIN_CBUTTONID && idFrom <= MAX_CBUTTONID) {
Srmm_ClickToolbarIcon(m_hContact, idFrom, m_hwnd, 1);
break;
@@ -2950,7 +2950,7 @@ INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_CBD_REMOVED:
if (lParam)
- CB_DestroyButton((DWORD)wParam, (DWORD)lParam);
+ CB_DestroyButton((uint32_t)wParam, (uint32_t)lParam);
else
CB_DestroyAllButtons();
return 0;
diff --git a/plugins/TabSRMM/src/msgdlgother.cpp b/plugins/TabSRMM/src/msgdlgother.cpp index e23e5e8858..c22b31d46a 100644 --- a/plugins/TabSRMM/src/msgdlgother.cpp +++ b/plugins/TabSRMM/src/msgdlgother.cpp @@ -495,7 +495,7 @@ void CMsgDialog::FindFirstEvent() else db_event_get(m_hDbEventFirst, &dbei); - DWORD firstTime = dbei.timestamp - 60 * g_plugin.getWord(SRMSGSET_LOADTIME, SRMSGDEFSET_LOADTIME); + uint32_t firstTime = dbei.timestamp - 60 * g_plugin.getWord(SRMSGSET_LOADTIME, SRMSGDEFSET_LOADTIME); while (MEVENT hPrevEvent = pCursor.FetchNext()) { dbei.cbBlob = 0; @@ -1211,7 +1211,7 @@ void CMsgDialog::NotifyDeliveryFailure() const ppd.PluginWindowProc = Utils::PopupDlgProcError; ppd.lchIcon = PluginConfig.g_iconErr; ppd.PluginData = nullptr; - ppd.iSeconds = (int)db_get_dw(0, MODULE, OPT_DELAY_ERR, (DWORD)DEFAULT_DELAY); + ppd.iSeconds = (int)db_get_dw(0, MODULE, OPT_DELAY_ERR, (uint32_t)DEFAULT_DELAY); PUAddPopupW(&ppd); } @@ -1246,7 +1246,7 @@ void CMsgDialog::SaveAvatarToFile(HBITMAP hbm, int isOwnPic) wchar_t szFinalFilename[MAX_PATH]; time_t t = time(0); struct tm *lt = localtime(&t); - DWORD setView = 1; + uint32_t setView = 1; wchar_t szTimestamp[100]; mir_snwprintf(szTimestamp, L"%04u %02u %02u_%02u%02u", lt->tm_year + 1900, lt->tm_mon, lt->tm_mday, lt->tm_hour, lt->tm_min); @@ -1341,8 +1341,8 @@ void CMsgDialog::SendHBitmapAsFile(HBITMAP hbmp) const const char *szProto = m_cache->getActiveProto(); int wMyStatus = Proto_GetStatus(szProto); - DWORD protoCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0); - DWORD typeCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0); + uint32_t protoCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0); + uint32_t typeCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0); // check protocol capabilities, status modes and visibility lists (privacy) // to determine whether the file can be sent. Throw a warning if any of @@ -1481,14 +1481,14 @@ INT_PTR CALLBACK CMsgDialog::FilterWndProc(HWND hwndDlg, UINT uMsg, WPARAM wPara pDlg = (CMsgDialog *)lParam; SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam); { - DWORD dwMask = db_get_dw(pDlg->m_hContact, CHAT_MODULE, "FilterMask", 0); - DWORD dwFlags = db_get_dw(pDlg->m_hContact, CHAT_MODULE, "FilterFlags", 0); + uint32_t dwMask = db_get_dw(pDlg->m_hContact, CHAT_MODULE, "FilterMask", 0); + uint32_t dwFlags = db_get_dw(pDlg->m_hContact, CHAT_MODULE, "FilterFlags", 0); - DWORD dwPopupMask = db_get_dw(pDlg->m_hContact, CHAT_MODULE, "PopupMask", 0); - DWORD dwPopupFlags = db_get_dw(pDlg->m_hContact, CHAT_MODULE, "PopupFlags", 0); + uint32_t dwPopupMask = db_get_dw(pDlg->m_hContact, CHAT_MODULE, "PopupMask", 0); + uint32_t dwPopupFlags = db_get_dw(pDlg->m_hContact, CHAT_MODULE, "PopupFlags", 0); - DWORD dwTrayMask = db_get_dw(pDlg->m_hContact, CHAT_MODULE, "TrayIconMask", 0); - DWORD dwTrayFlags = db_get_dw(pDlg->m_hContact, CHAT_MODULE, "TrayIconFlags", 0); + uint32_t dwTrayMask = db_get_dw(pDlg->m_hContact, CHAT_MODULE, "TrayIconMask", 0); + uint32_t dwTrayFlags = db_get_dw(pDlg->m_hContact, CHAT_MODULE, "TrayIconFlags", 0); for (int i = 0; i < _countof(_eventorder); i++) { CheckDlgButton(hwndDlg, IDC_1 + i, dwMask & _eventorder[i] ? (dwFlags & _eventorder[i] ? BST_CHECKED : BST_UNCHECKED) : BST_INDETERMINATE); @@ -1507,7 +1507,7 @@ INT_PTR CALLBACK CMsgDialog::FilterWndProc(HWND hwndDlg, UINT uMsg, WPARAM wPara case WM_CLOSE: if (wParam == 1 && lParam == 1 && pDlg) { int iFlags = 0; - DWORD dwMask = 0; + uint32_t dwMask = 0; for (int i = 0; i < _countof(_eventorder); i++) { int result = IsDlgButtonChecked(hwndDlg, IDC_1 + i); @@ -2141,11 +2141,11 @@ void CMsgDialog::UpdateStatusBar() wchar_t szFinalStatusBarText[512]; if (m_pPanel.isActive()) { time_t now = time(0); - DWORD diff = (now - mi->idleTimeStamp) / 60; + uint32_t diff = (now - mi->idleTimeStamp) / 60; if (diff >= 1) { if (diff > 59) { - DWORD hours = diff / 60; - DWORD minutes = diff % 60; + uint32_t hours = diff / 60; + uint32_t minutes = diff % 60; mir_snwprintf(mi->tszIdleMsg, TranslateT(", %d %s, %d %s idle"), hours, hours > 1 ? TranslateT("hours") : TranslateT("hour"), minutes, minutes > 1 ? TranslateT("minutes") : TranslateT("minute")); @@ -2231,7 +2231,7 @@ void CMsgDialog::UpdateTitle() } } else { - DWORD dwOldIdle = m_idle; + uint32_t dwOldIdle = m_idle; const char *szActProto = nullptr; m_wszStatus[0] = 0; @@ -2357,7 +2357,7 @@ void CMsgDialog::UpdateWindowState(UINT msg) if (msg == WM_ACTIVATE) { if (m_pContainer->m_flags.m_bTransparent) { - DWORD trans = LOWORD(m_pContainer->m_pSettings->dwTransparency); + uint32_t trans = LOWORD(m_pContainer->m_pSettings->dwTransparency); SetLayeredWindowAttributes(m_pContainer->m_hwnd, CSkin::m_ContainerColorKey, (uint8_t)trans, (m_pContainer->m_flags.m_bTransparent ? LWA_ALPHA : 0)); } } diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index 6cf37d76cc..08ee584481 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -200,9 +200,9 @@ UINT_PTR CALLBACK OpenFileSubclass(HWND hwnd, UINT msg, WPARAM, LPARAM lParam) HWND hwndParent = GetParent(hwnd);
HWND hwndLv = FindWindowEx(hwndParent, nullptr, L"SHELLDLL_DefView", nullptr);
- if (hwndLv != nullptr && *((DWORD *)(ofn->lCustData))) {
+ if (hwndLv != nullptr && *((uint32_t *)(ofn->lCustData))) {
SendMessage(hwndLv, WM_COMMAND, SHVIEW_THUMBNAIL, 0);
- *((DWORD *)(ofn->lCustData)) = 0;
+ *((uint32_t *)(ofn->lCustData)) = 0;
}
break;
}
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp index 77393e5cbb..4f188ff6e5 100644 --- a/plugins/TabSRMM/src/msglog.cpp +++ b/plugins/TabSRMM/src/msglog.cpp @@ -98,7 +98,7 @@ struct LogStreamData DBEVENTINFO *dbei;
};
-__forceinline char* GetRTFFont(DWORD dwIndex)
+__forceinline char* GetRTFFont(uint32_t dwIndex)
{
return rtfFonts + (dwIndex * RTFCACHELINESIZE);
}
@@ -476,7 +476,7 @@ static char* Template_CreateRTFFromDbEvent(CMsgDialog *dat, MCONTACT hContact, M if (dbei.flags & DBEF_RTL)
dat->m_bRtlText = true;
- DWORD dwEffectiveFlags = dat->m_dwFlags;
+ uint32_t dwEffectiveFlags = dat->m_dwFlags;
dat->m_bIsHistory = (dbei.timestamp < dat->m_cache->getSessionStart() && dbei.markedRead());
int iFontIDOffset = dat->m_bIsHistory ? 8 : 0; // offset into the font table for either history (old) or new events... (# of fonts per configuration set)
@@ -855,7 +855,7 @@ static char* Template_CreateRTFFromDbEvent(CMsgDialog *dat, MCONTACT hContact, M str.AppendChar(' ');
}
{
- char *szFileName = (char *)dbei.pBlob + sizeof(DWORD);
+ char *szFileName = (char *)dbei.pBlob + sizeof(uint32_t);
ptrW tszFileName(DbEvent_GetString(&dbei, szFileName));
char *szDescr = szFileName + mir_strlen(szFileName) + 1;
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp index 58a44987f9..f6a5446ec0 100644 --- a/plugins/TabSRMM/src/msgoptions.cpp +++ b/plugins/TabSRMM/src/msgoptions.cpp @@ -32,7 +32,7 @@ /////////////////////////////////////////////////////////////////////////////////////////
-void TreeViewInit(CCtrlTreeView &ctrl, TOptionListGroup *lvGroups, TOptionListItem *lvItems, const char *DBPath, DWORD dwFlags, bool bFromMem)
+void TreeViewInit(CCtrlTreeView &ctrl, TOptionListGroup *lvGroups, TOptionListItem *lvItems, const char *DBPath, uint32_t dwFlags, bool bFromMem)
{
SetWindowLongPtr(ctrl.GetHwnd(), GWL_STYLE, GetWindowLongPtr(ctrl.GetHwnd(), GWL_STYLE) | (TVS_HASBUTTONS | TVS_CHECKBOXES | TVS_NOHSCROLL));
@@ -83,7 +83,7 @@ void TreeViewInit(CCtrlTreeView &ctrl, TOptionListGroup *lvGroups, TOptionListIt }
}
-void TreeViewSetFromDB(CCtrlTreeView &ctrl, TOptionListItem *lvItems, DWORD dwFlags)
+void TreeViewSetFromDB(CCtrlTreeView &ctrl, TOptionListItem *lvItems, uint32_t dwFlags)
{
for (auto *p = lvItems; p->szName != nullptr; p++) {
bool bCheck = false;
@@ -95,7 +95,7 @@ void TreeViewSetFromDB(CCtrlTreeView &ctrl, TOptionListItem *lvItems, DWORD dwFl }
}
-void TreeViewToDB(CCtrlTreeView &ctrl, TOptionListItem *lvItems, const char *DBPath, DWORD *dwFlags)
+void TreeViewToDB(CCtrlTreeView &ctrl, TOptionListItem *lvItems, const char *DBPath, uint32_t *dwFlags)
{
for (auto *p = lvItems; p->szName != nullptr; p++) {
UINT iState = ctrl.GetCheckState(p->handle);
@@ -366,7 +366,7 @@ public: return;
const wchar_t *szFilename = GetThemeFileName(0);
- DWORD dwFlags = THEME_READ_FONTS;
+ uint32_t dwFlags = THEME_READ_FONTS;
if (szFilename != nullptr) {
int result = MessageBox(nullptr, TranslateT("Do you want to also read message templates from the theme?\nCaution: This will overwrite the stored template set which may affect the look of your message window significantly.\nSelect Cancel to not load anything at all."),
@@ -901,7 +901,7 @@ public: bool OnInitDialog() override
{
- DWORD dwFlags = M.GetDword("mwflags", MWF_LOG_DEFAULT);
+ uint32_t dwFlags = M.GetDword("mwflags", MWF_LOG_DEFAULT);
switch (g_plugin.getByte(SRMSGSET_LOADHISTORY, SRMSGDEFSET_LOADHISTORY)) {
case LOADHISTORY_UNREAD:
@@ -927,7 +927,7 @@ public: spnLoadCount.SetPosition(g_plugin.getWord(SRMSGSET_LOADCOUNT, SRMSGDEFSET_LOADCOUNT));
spnLoadTime.SetPosition(g_plugin.getWord(SRMSGSET_LOADTIME, SRMSGDEFSET_LOADTIME));
- DWORD maxhist = M.GetDword("maxhist", 0);
+ uint32_t maxhist = M.GetDword("maxhist", 0);
spnTrim.SetPosition(maxhist);
spnTrim.Enable(maxhist != 0);
Utils::enableDlgControl(m_hwnd, IDC_TRIM, maxhist != 0);
@@ -937,7 +937,7 @@ public: bool OnApply() override
{
- DWORD dwFlags = M.GetDword("mwflags", MWF_LOG_DEFAULT);
+ uint32_t dwFlags = M.GetDword("mwflags", MWF_LOG_DEFAULT);
dwFlags &= ~(MWF_LOG_ALL);
@@ -1234,7 +1234,7 @@ public: INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override
{
if (msg == WM_COMMAND && wParam == DM_STATUSMASKSET)
- db_set_dw(0, SRMSGMOD_T, "autopopupmask", (DWORD)lParam);
+ db_set_dw(0, SRMSGMOD_T, "autopopupmask", (uint32_t)lParam);
return CDlgBase::DlgProc(msg, wParam, lParam);
}
@@ -1447,8 +1447,8 @@ struct OptCheckBox {
UINT idc;
- DWORD defValue; // should be full combined value for masked items!
- DWORD dwBit;
+ uint32_t defValue; // should be full combined value for masked items!
+ uint32_t dwBit;
uint8_t dbType;
char *dbModule;
@@ -1462,12 +1462,12 @@ struct OptCheckBox char *charValue;
int *intValue;
uint8_t *byteValue;
- DWORD *dwordValue;
+ uint32_t *dwordValue;
BOOL *boolValue;
};
};
-DWORD OptCheckBox_LoadValue(struct OptCheckBox *cb)
+uint32_t OptCheckBox_LoadValue(struct OptCheckBox *cb)
{
switch (cb->valueType) {
case CBVT_NONE:
@@ -1498,17 +1498,17 @@ DWORD OptCheckBox_LoadValue(struct OptCheckBox *cb) void OptCheckBox_Load(HWND hwnd, OptCheckBox *cb)
{
- DWORD value = OptCheckBox_LoadValue(cb);
+ uint32_t value = OptCheckBox_LoadValue(cb);
if (cb->dwBit) value &= cb->dwBit;
CheckDlgButton(hwnd, cb->idc, value ? BST_CHECKED : BST_UNCHECKED);
}
void OptCheckBox_Save(HWND hwnd, OptCheckBox *cb)
{
- DWORD value = IsDlgButtonChecked(hwnd, cb->idc) == BST_CHECKED;
+ uint32_t value = IsDlgButtonChecked(hwnd, cb->idc) == BST_CHECKED;
if (cb->dwBit) {
- DWORD curValue = OptCheckBox_LoadValue(cb);
+ uint32_t curValue = OptCheckBox_LoadValue(cb);
value = value ? (curValue | cb->dwBit) : (curValue & ~cb->dwBit);
}
@@ -1520,7 +1520,7 @@ void OptCheckBox_Save(HWND hwnd, OptCheckBox *cb) db_set_w(0, cb->dbModule, cb->dbSetting, (uint16_t)value);
break;
case DBVT_DWORD:
- db_set_dw(0, cb->dbModule, cb->dbSetting, (DWORD)value);
+ db_set_dw(0, cb->dbModule, cb->dbSetting, (uint32_t)value);
break;
}
@@ -1535,7 +1535,7 @@ void OptCheckBox_Save(HWND hwnd, OptCheckBox *cb) *cb->byteValue = (uint8_t)value;
break;
case CBVT_DWORD:
- *cb->dwordValue = (DWORD)value;
+ *cb->dwordValue = (uint32_t)value;
break;
case CBVT_BOOL:
*cb->boolValue = (BOOL)value;
@@ -1545,8 +1545,8 @@ void OptCheckBox_Save(HWND hwnd, OptCheckBox *cb) INT_PTR CALLBACK DlgProcSetupStatusModes(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- DWORD dwStatusMask = GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
- static DWORD dwNewStatusMask = 0;
+ uint32_t dwStatusMask = GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ static uint32_t dwNewStatusMask = 0;
switch (msg) {
case WM_INITDIALOG:
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h index 90f2a5e9ad..64a84e74a2 100644 --- a/plugins/TabSRMM/src/msgs.h +++ b/plugins/TabSRMM/src/msgs.h @@ -189,8 +189,8 @@ struct TLogTheme COLORREF inbg, outbg, bg, oldinbg, oldoutbg, statbg, inputbg;
COLORREF hgrid;
COLORREF custom_colors[5];
- DWORD dwFlags;
- DWORD left_indent, right_indent;
+ uint32_t dwFlags;
+ uint32_t left_indent, right_indent;
LOGFONTW *logFonts;
COLORREF *fontColors;
char *rtfFonts;
@@ -199,7 +199,7 @@ struct TLogTheme union TContainerFlags
{
- DWORD dw;
+ uint32_t dw;
struct {
bool m_bUnused1 : 1;
bool m_bNoTitle : 1;
@@ -238,7 +238,7 @@ union TContainerFlags union TContainerFlagsEx
{
- DWORD dw;
+ uint32_t dw;
struct
{
bool m_bTabFlat : 1;
@@ -264,8 +264,8 @@ struct TContainerSettings TContainerFlags flags;
TContainerFlagsEx flagsEx;
- DWORD dwTransparency;
- DWORD panelheight;
+ uint32_t dwTransparency;
+ uint32_t panelheight;
int iSplitterX, iSplitterY;
wchar_t szTitleFormat[TITLE_FORMATLEN + 2];
uint16_t avatarMode;
@@ -301,10 +301,10 @@ struct TContainerData : public MZeroedObject BOOL m_isCloned;
HWND m_hwndStatus;
int m_statusBarHeight;
- DWORD m_dwLastActivity;
+ uint32_t m_dwLastActivity;
int m_hIcon; // current window icon stick indicator
HICON m_hIconTaskbarOverlay; // contains a "sticky" taskbar overlay (e.g. new message icon)
- DWORD m_dwFlashingStarted;
+ uint32_t m_dwFlashingStarted;
HWND m_hWndOptions;
BOOL m_bSizingLoop;
HDC m_cachedDC;
@@ -317,7 +317,7 @@ struct TContainerData : public MZeroedObject HWND m_hwndSaved;
RECT m_rcSaved, m_rcLogSaved;
POINT m_ptLogSaved;
- DWORD m_exFlags;
+ uint32_t m_exFlags;
BOOL m_fPrivateThemeChanged;
MARGINS m_mOld;
HDC m_cachedToolbarDC;
@@ -428,7 +428,7 @@ class CMsgDialog : public CSrmmBaseDialog }
void CB_DestroyAllButtons(void);
- void CB_DestroyButton(DWORD dwButtonCID, DWORD dwFlags);
+ void CB_DestroyButton(uint32_t dwButtonCID, uint32_t dwFlags);
void CB_ChangeButton(CustomButtonData *cbd);
void DM_AddDivider(void);
@@ -488,8 +488,8 @@ class CMsgDialog : public CSrmmBaseDialog RECT m_rcNick, m_rcUIN, m_rcStatus, m_rcPic;
int m_originalSplitterY;
SIZE m_minEditBoxSize;
- DWORD m_lastMessage;
- DWORD m_dwTickLastEvent;
+ uint32_t m_lastMessage;
+ uint32_t m_dwTickLastEvent;
HBITMAP m_hOwnPic;
SIZE m_pic;
@@ -510,21 +510,21 @@ class CMsgDialog : public CSrmmBaseDialog int m_iRealAvatarHeight;
int m_iButtonBarReallyNeeds;
- DWORD m_dwLastActivity;
+ uint32_t m_dwLastActivity;
MEVENT m_hFlashingEvent;
int m_SendFormat;
LCID m_lcid;
wchar_t m_lcID[10];
int m_iPanelAvatarX, m_iPanelAvatarY;
HWND m_hwndTip;
- DWORD m_panelStatusCX;
+ uint32_t m_panelStatusCX;
int m_textLen; // current text len
LONG m_ipFieldHeight;
WPARAM m_wParam; // used for "delayed" actions like moved splitters in minimized windows
LPARAM m_lParam;
int m_iHaveRTLLang;
- DWORD m_iSplitterSaved;
+ uint32_t m_iSplitterSaved;
POINT m_ptTipActivation;
protected:
@@ -551,9 +551,9 @@ public: int m_sendMode;
HKL m_hkl; // keyboard layout identifier
- DWORD m_idle;
- DWORD m_dwFlags;
- DWORD m_dwUnread;
+ uint32_t m_idle;
+ uint32_t m_dwFlags;
+ uint32_t m_dwUnread;
HANDLE m_hTheme, m_hThemeIP, m_hThemeToolbar;
HICON m_hXStatusIcon, m_hTabStatusIcon, m_hTabIcon, m_iFlashIcon, m_hTaskbarIcon, m_hClientIcon;
MEVENT m_hDbEventFirst, m_hDbEventLast;
@@ -721,7 +721,7 @@ struct myTabCtrl HFONT m_hMenuFont;
COLORREF colors[10];
HBRUSH m_brushes[4];
- DWORD m_fixedwidth;
+ uint32_t m_fixedwidth;
int m_bottomAdjust;
};
@@ -939,7 +939,7 @@ struct TOptionListItem struct SIDEBARITEM
{
UINT uId;
- DWORD dwFlags;
+ uint32_t dwFlags;
HICON *hIcon, *hIconPressed, *hIconHover;
wchar_t *szName;
void (*pfnAction)(ButtonItem *item, HWND hwndDlg, CMsgDialog *dat, HWND hwndItem);
diff --git a/plugins/TabSRMM/src/muchighlight.cpp b/plugins/TabSRMM/src/muchighlight.cpp index c9d6351bf3..1a245bd8ae 100644 --- a/plugins/TabSRMM/src/muchighlight.cpp +++ b/plugins/TabSRMM/src/muchighlight.cpp @@ -109,7 +109,7 @@ void CMUCHighlight::tokenize(wchar_t *tszString, wchar_t**& patterns, UINT& nr) }
}
-bool CMUCHighlight::match(const GCEVENT *pgce, const SESSION_INFO *psi, DWORD dwFlags)
+bool CMUCHighlight::match(const GCEVENT *pgce, const SESSION_INFO *psi, uint32_t dwFlags)
{
int result = 0, nResult = 0;
diff --git a/plugins/TabSRMM/src/muchighlight.h b/plugins/TabSRMM/src/muchighlight.h index 02db895430..1ecdf08286 100644 --- a/plugins/TabSRMM/src/muchighlight.h +++ b/plugins/TabSRMM/src/muchighlight.h @@ -50,12 +50,12 @@ public: void init();
void cleanup();
- bool match(const GCEVENT *pgce, const SESSION_INFO *psi, DWORD dwFlags = MATCH_NICKNAME);
+ bool match(const GCEVENT *pgce, const SESSION_INFO *psi, uint32_t dwFlags = MATCH_NICKNAME);
private:
void tokenize(wchar_t *tszString, wchar_t** &patterns, UINT &nr);
- DWORD m_iMode = 0; // combination of MATCH_* masks
+ uint32_t m_iMode = 0; // combination of MATCH_* masks
UINT m_iNickPatterns = 0;
UINT m_iTextPatterns = 0;
bool m_fInitialized = false;
diff --git a/plugins/TabSRMM/src/nen.h b/plugins/TabSRMM/src/nen.h index d5e33c1b3a..29bd8e536f 100644 --- a/plugins/TabSRMM/src/nen.h +++ b/plugins/TabSRMM/src/nen.h @@ -119,7 +119,7 @@ struct NEN_OPTIONS int iLimitPreview;
uint16_t wMaxRecent;
uint16_t wMaxFavorites;
- DWORD dwRemoveMask;
+ uint32_t dwRemoveMask;
COLORREF colBackMsg;
COLORREF colTextMsg;
@@ -133,7 +133,7 @@ struct EVENT_DATAT {
MEVENT hEvent;
wchar_t tszText[MAX_SECONDLINE + 2];
- DWORD timestamp;
+ uint32_t timestamp;
};
struct PLUGIN_DATAT
diff --git a/plugins/TabSRMM/src/sendlater.cpp b/plugins/TabSRMM/src/sendlater.cpp index a9ec1ba160..b34d20c48a 100644 --- a/plugins/TabSRMM/src/sendlater.cpp +++ b/plugins/TabSRMM/src/sendlater.cpp @@ -59,7 +59,7 @@ struct CSendLaterJob : public MZeroedObject time_t lastSent; // time at which the delivery was initiated. used to handle timeouts
char *sendBuffer; // utf-8 send buffer
uint8_t *pBuf; // conventional send buffer (for non-utf8 protocols)
- DWORD dwFlags;
+ uint32_t dwFlags;
int iSendCount; // # of times we tried to send it...
bool fSuccess, fFailed;
uint8_t bCode; // error/progress code (for the UI)
@@ -135,7 +135,7 @@ struct CSendLaterJob : public MZeroedObject {
if (isPersistentJob()) {
char szKey[100];
- DWORD localFlags;
+ uint32_t localFlags;
mir_snprintf(szKey, "$%s", szId);
localFlags = db_get_dw(hContact, "SendLater", szKey, 0);
@@ -150,7 +150,7 @@ struct CSendLaterJob : public MZeroedObject void writeFlags()
{
if (isPersistentJob()) {
- DWORD localFlags = (bCode == JOB_HOLD ? SLF_SUSPEND : 0);
+ uint32_t localFlags = (bCode == JOB_HOLD ? SLF_SUSPEND : 0);
char szKey[100];
mir_snprintf(szKey, "$%s", szId);
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp index 0860d7e54d..ffa77edc85 100644 --- a/plugins/TabSRMM/src/sendqueue.cpp +++ b/plugins/TabSRMM/src/sendqueue.cpp @@ -252,7 +252,7 @@ int SendQueue::sendQueued(CMsgDialog *dat, const int iEntry) m_jobs[iEntry].iAcksNeeded = 1; m_jobs[iEntry].chunkSize = (int)iMaxSize; - DWORD dwOldFlags = m_jobs[iEntry].dwFlags; + uint32_t dwOldFlags = m_jobs[iEntry].dwFlags; mir_forkthread(DoSplitSendA, (LPVOID)iEntry); m_jobs[iEntry].dwFlags = dwOldFlags; } diff --git a/plugins/TabSRMM/src/sendqueue.h b/plugins/TabSRMM/src/sendqueue.h index 0a6d9737c6..0ac4480662 100644 --- a/plugins/TabSRMM/src/sendqueue.h +++ b/plugins/TabSRMM/src/sendqueue.h @@ -48,11 +48,11 @@ struct SendJob HWND hOwnerWnd;
unsigned iStatus;
wchar_t szErrorMsg[128];
- DWORD dwFlags;
+ uint32_t dwFlags;
int iAcksNeeded;
HANDLE hEventSplit;
int chunkSize;
- DWORD dwTime;
+ uint32_t dwTime;
};
class SendQueue {
diff --git a/plugins/TabSRMM/src/sidebar.cpp b/plugins/TabSRMM/src/sidebar.cpp index 3a433f2a19..06a236afe7 100644 --- a/plugins/TabSRMM/src/sidebar.cpp +++ b/plugins/TabSRMM/src/sidebar.cpp @@ -248,8 +248,8 @@ void CSideBarButton::renderIconAndNick(const HDC hdc, const RECT *rcItem) const RECT rc = *rcItem;
if (!m_dat->m_bCanFlashTab || (m_dat->m_bCanFlashTab == TRUE && m_dat->m_bTabFlash) || !pContainer->m_flagsEx.m_bTabFlashIcon) {
- DWORD ix = rc.left + 4;
- DWORD iy = (rc.bottom + rc.top - iSize) / 2;
+ uint32_t ix = rc.left + 4;
+ uint32_t iy = (rc.bottom + rc.top - iSize) / 2;
if (m_dat->m_bIsIdle && PluginConfig.m_bIdleDetect)
CSkin::DrawDimmedIcon(hdc, ix, iy, iSize, iSize, hIcon, 180);
else
@@ -283,7 +283,7 @@ void CSideBarButton::renderIconAndNick(const HDC hdc, const RECT *rcItem) const else
clr = PluginConfig.tabConfig.colors[0];
- DWORD dwTextFlags = DT_SINGLELINE | DT_VCENTER | DT_WORD_ELLIPSIS;
+ uint32_t dwTextFlags = DT_SINGLELINE | DT_VCENTER | DT_WORD_ELLIPSIS;
CSkin::RenderText(hdc, m_buttonControl->hThemeButton, m_dat->m_wszTitle, &rc, dwTextFlags, CSkin::m_glowSize, clr);
}
}
@@ -702,7 +702,7 @@ void CSideBar::moveButtons() HDWP hdwp = ::BeginDeferWindowPos(1);
BOOL topEnabled = FALSE, bottomEnabled = FALSE;
- DWORD dwFlags = SWP_NOZORDER | SWP_NOACTIVATE | SWP_SHOWWINDOW;
+ uint32_t dwFlags = SWP_NOZORDER | SWP_NOACTIVATE | SWP_SHOWWINDOW;
m_firstVisibleOffset = max(0, m_firstVisibleOffset);
m_totalItemHeight = 0;
@@ -1064,7 +1064,7 @@ void __fastcall CSideBar::m_AdvancedContentRenderer(const HDC hdc, const RECT *r LONG required = szFirstLine.cy + szSecondLine.cy;
bool fSecondLine = (required < cy ? true : false);
- DWORD dtFlags = DT_SINGLELINE | DT_WORD_ELLIPSIS | DT_END_ELLIPSIS | (!fSecondLine ? DT_VCENTER : 0);
+ uint32_t dtFlags = DT_SINGLELINE | DT_WORD_ELLIPSIS | DT_END_ELLIPSIS | (!fSecondLine ? DT_VCENTER : 0);
::SelectObject(hdc, CInfoPanel::m_ipConfig.hFonts[IPFONTID_NICK]);
rc.top++;
diff --git a/plugins/TabSRMM/src/sidebar.h b/plugins/TabSRMM/src/sidebar.h index f1a3a7e75e..579e2c47e2 100644 --- a/plugins/TabSRMM/src/sidebar.h +++ b/plugins/TabSRMM/src/sidebar.h @@ -41,7 +41,7 @@ struct TSideBarLayout wchar_t szName[50]; // everything wants a name...
LONG width; // width of the switchbar element (a single button)
LONG height; // height of a single switchbar element
- DWORD dwFlags; // flags, obviously :)
+ uint32_t dwFlags; // flags, obviously :)
/*
* the following 4 items define pointers to the actual renderer functions for that sidebar layout
@@ -144,7 +144,7 @@ public: void showAll(int showCmd);
const LONG getWidth() const { return(m_isVisible ? m_width + SIDEBAR_GAP : 0); }
- const DWORD getFlags() const { return(m_dwFlags); }
+ const uint32_t getFlags() const { return(m_dwFlags); }
const TContainerData* getContainer() const { return(m_pContainer); }
const UINT getLayoutId() const { return(m_uLayout); }
const bool isVisible() const { return(m_isVisible); }
@@ -191,7 +191,7 @@ private: OBJLIST<CSideBarButton> m_buttonlist; // our list of buttons
TContainerData* m_pContainer; // our master and commander...
LONG m_width; // required width of the bar (m_elementWidth + padding)
- DWORD m_dwFlags;
+ uint32_t m_dwFlags;
CSideBarButton* m_up, *m_down; // the scroller buttons (up down)
CSideBarButton* m_activeItem; // active button item (for highlighting)
const CSideBarButton* m_hoveredClose; // item which must display an active close button
diff --git a/plugins/TabSRMM/src/stdafx.h b/plugins/TabSRMM/src/stdafx.h index a419b2f617..5d688e6ce5 100644 --- a/plugins/TabSRMM/src/stdafx.h +++ b/plugins/TabSRMM/src/stdafx.h @@ -96,7 +96,7 @@ typedef HTHUMBNAIL* PHTHUMBNAIL; typedef struct _DWM_BLURBEHIND
{
- DWORD dwFlags;
+ uint32_t dwFlags;
BOOL fEnable;
HRGN hRgnBlur;
BOOL fTransitionOnMaximized;
@@ -104,7 +104,7 @@ typedef struct _DWM_BLURBEHIND typedef struct _DWM_THUMBNAIL_PROPERTIES
{
- DWORD dwFlags;
+ uint32_t dwFlags;
RECT rcDestination;
RECT rcSource;
uint8_t opacity;
@@ -179,8 +179,8 @@ typedef enum _BP_BUFFERFORMAT typedef struct _BP_PAINTPARAMS
{
- DWORD cbSize;
- DWORD dwFlags; // BPPF_ flags
+ uint32_t cbSize;
+ uint32_t dwFlags; // BPPF_ flags
const RECT * prcExclude;
const BLENDFUNCTION * pBlendFunction;
} BP_PAINTPARAMS, *PBP_PAINTPARAMS;
@@ -244,9 +244,9 @@ INT_PTR SendMessageCommand(WPARAM, LPARAM); INT_PTR SendMessageCommand_W(WPARAM, LPARAM);
INT_PTR SetUserPrefs(WPARAM, LPARAM);
-void TreeViewInit(CCtrlTreeView&, TOptionListGroup *lvGroups, TOptionListItem *lvItems, const char *DBPath, DWORD dwFlags = 0, bool bFromMem = false);
-void TreeViewSetFromDB(CCtrlTreeView&, TOptionListItem *lvItems, DWORD dwFlags);
-void TreeViewToDB(CCtrlTreeView&, TOptionListItem *lvItems, const char *DBPath, DWORD *dwFlags);
+void TreeViewInit(CCtrlTreeView&, TOptionListGroup *lvGroups, TOptionListItem *lvItems, const char *DBPath, uint32_t dwFlags = 0, bool bFromMem = false);
+void TreeViewSetFromDB(CCtrlTreeView&, TOptionListItem *lvItems, uint32_t dwFlags);
+void TreeViewToDB(CCtrlTreeView&, TOptionListItem *lvItems, const char *DBPath, uint32_t *dwFlags);
INT_PTR CALLBACK DlgProcSetupStatusModes(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
diff --git a/plugins/TabSRMM/src/tabctrl.cpp b/plugins/TabSRMM/src/tabctrl.cpp index bb8b9e3c2e..d01ef5fc67 100644 --- a/plugins/TabSRMM/src/tabctrl.cpp +++ b/plugins/TabSRMM/src/tabctrl.cpp @@ -39,8 +39,8 @@ static WNDPROC OldTabControlClassProc; struct TabControlData
{
HWND hwnd;
- DWORD dwStyle;
- DWORD cx, cy;
+ uint32_t dwStyle;
+ uint32_t cx, cy;
HANDLE hTheme, hThemeButton, hbp;
int xpad;
int iBeginIndex;
@@ -225,8 +225,8 @@ static void DrawItem(TabControlData *tabdat, HDC dc, RECT *rcItem, int nHint, in }
if (!dat->m_bCanFlashTab || (dat->m_bCanFlashTab == TRUE && dat->m_bTabFlash) || !dat->m_pContainer->m_flagsEx.m_bTabFlashIcon) {
- DWORD ix = rcItem->left + tabdat->xpad - 1;
- DWORD iy = (rcItem->bottom + rcItem->top - iSize) / 2;
+ uint32_t ix = rcItem->left + tabdat->xpad - 1;
+ uint32_t iy = (rcItem->bottom + rcItem->top - iSize) / 2;
if (dat->m_bIsIdle && PluginConfig.m_bIdleDetect)
CSkin::DrawDimmedIcon(dc, ix, iy, iSize, iSize, hIcon, 180);
else
@@ -247,7 +247,7 @@ static void DrawItem(TabControlData *tabdat, HDC dc, RECT *rcItem, int nHint, in }
if (!dat->m_bCanFlashTab || (dat->m_bCanFlashTab == TRUE && dat->m_bTabFlash) || !dat->m_pContainer->m_flagsEx.m_bTabFlashLabel) {
- DWORD dwTextFlags = DT_SINGLELINE | DT_VCENTER;
+ uint32_t dwTextFlags = DT_SINGLELINE | DT_VCENTER;
HFONT oldFont = (HFONT)SelectObject(dc, (HFONT)SendMessage(tabdat->hwnd, WM_GETFONT, 0, 0));
if (tabdat->dwStyle & TCS_BUTTONS || !(tabdat->dwStyle & TCS_MULTILINE)) {
rcItem->right -= tabdat->xpad;
@@ -268,7 +268,7 @@ static RECT rcTabPage = { 0 }; static void DrawItemRect(TabControlData *tabdat, HDC dc, RECT *rcItem, int nHint, const CMsgDialog *dat)
{
POINT pt;
- DWORD dwStyle = tabdat->dwStyle;
+ uint32_t dwStyle = tabdat->dwStyle;
rcItem->bottom -= 1;
if (rcItem->left < 0)
@@ -628,7 +628,7 @@ static void PaintWorker(HWND hwnd, TabControlData *tabdat) RECT rectTemp, rctPage, rctActive, rcItem, rctClip, rctOrig;
RECT rectUpDn = { 0, 0, 0, 0 };
int nCount = TabCtrl_GetItemCount(hwnd), i;
- DWORD dwStyle = tabdat->dwStyle;
+ uint32_t dwStyle = tabdat->dwStyle;
bool isAero = M.isAero();
bool bClassicDraw = !isAero && (tabdat->bVisualStyles == false || CSkin::m_skinEnabled);
@@ -1115,7 +1115,7 @@ static LRESULT CALLBACK TabControlSubclassProc(HWND hwnd, UINT msg, WPARAM wPara RECT rcClient, rc;
GetClientRect(hwnd, &rcClient);
TabCtrl_GetItemRect(hwnd, iTabs - 1, &rc);
- DWORD newItemSize = (rcClient.right - 6) - (tabdat->dwStyle & TCS_BUTTONS ? (iTabs)* 10 : 0);
+ uint32_t newItemSize = (rcClient.right - 6) - (tabdat->dwStyle & TCS_BUTTONS ? (iTabs)* 10 : 0);
newItemSize = newItemSize / iTabs;
if (newItemSize < PluginConfig.tabConfig.m_fixedwidth)
TabCtrl_SetItemSize(hwnd, newItemSize, rc.bottom - rc.top);
diff --git a/plugins/TabSRMM/src/taskbar.cpp b/plugins/TabSRMM/src/taskbar.cpp index 094cebf30a..6db7e6ac75 100644 --- a/plugins/TabSRMM/src/taskbar.cpp +++ b/plugins/TabSRMM/src/taskbar.cpp @@ -82,8 +82,8 @@ bool CTaskbarInteract::haveLargeIcons() m_fHaveLargeicons = false;
if (m_pTaskbarInterface && m_isEnabled) {
- DWORD val = 0;
- DWORD valGrouping = 2;
+ uint32_t val = 0;
+ uint32_t valGrouping = 2;
/*
* check whether the taskbar is set to show large icons. This is necessary, because the method SetOverlayIcon()
* always returns S_OK, but the icon is simply ignored when using small taskbar icons.
diff --git a/plugins/TabSRMM/src/taskbar.h b/plugins/TabSRMM/src/taskbar.h index f791846bca..bc9d5807d7 100644 --- a/plugins/TabSRMM/src/taskbar.h +++ b/plugins/TabSRMM/src/taskbar.h @@ -56,7 +56,7 @@ protected: LONG m_width, m_height;
HDC m_hdc;
RECT m_rc, m_rcTop, m_rcBottom, m_rcIcon;
- DWORD m_dtFlags;
+ uint32_t m_dtFlags;
SIZE m_sz;
LONG m_cx, m_cy;
HFONT m_hOldFont;
diff --git a/plugins/TabSRMM/src/themeio.cpp b/plugins/TabSRMM/src/themeio.cpp index 864ce0cfed..552d6ec6f5 100644 --- a/plugins/TabSRMM/src/themeio.cpp +++ b/plugins/TabSRMM/src/themeio.cpp @@ -36,7 +36,7 @@ struct { char* szIniName;
char* szDbModule;
char* szDbSetting;
- DWORD dwDef;
+ uint32_t dwDef;
}
static _extSettings[] =
{
@@ -64,7 +64,7 @@ struct char* szIniName;
char* szDbModule;
char* szDbSetting;
- DWORD dwDef;
+ uint32_t dwDef;
}
static _extSettings_v5[] =
{
@@ -241,7 +241,7 @@ void TSAPI WriteThemeToINI(const wchar_t *szIniFilenameT, CMsgDialog *dat) mir_free(szIniFilename);
}
-void TSAPI ReadThemeFromINI(const wchar_t *szIniFilenameT, TContainerData *dat, int noAdvanced, DWORD dwFlags)
+void TSAPI ReadThemeFromINI(const wchar_t *szIniFilenameT, TContainerData *dat, int noAdvanced, uint32_t dwFlags)
{
char szBuf[512], szTemp[100], szAppname[100];
int i, n = 0;
diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp index 9dc47521f3..76b004fbbe 100644 --- a/plugins/TabSRMM/src/themes.cpp +++ b/plugins/TabSRMM/src/themes.cpp @@ -41,11 +41,11 @@ CSkin* Skin = nullptr; static void __inline gradientVertical(UCHAR *ubRedFinal, UCHAR *ubGreenFinal, UCHAR *ubBlueFinal,
ULONG ulBitmapHeight, UCHAR ubRed, UCHAR ubGreen, UCHAR ubBlue, UCHAR ubRed2,
- UCHAR ubGreen2, UCHAR ubBlue2, DWORD FLG_GRADIENT, BOOL transparent, UINT32 y, UCHAR *ubAlpha);
+ UCHAR ubGreen2, UCHAR ubBlue2, uint32_t FLG_GRADIENT, BOOL transparent, UINT32 y, UCHAR *ubAlpha);
static void __inline gradientHorizontal(UCHAR *ubRedFinal, UCHAR *ubGreenFinal, UCHAR *ubBlueFinal,
ULONG ulBitmapWidth, UCHAR ubRed, UCHAR ubGreen, UCHAR ubBlue, UCHAR ubRed2,
- UCHAR ubGreen2, UCHAR ubBlue2, DWORD FLG_GRADIENT, BOOL transparent, UINT32 x, UCHAR *ubAlpha);
+ UCHAR ubGreen2, UCHAR ubBlue2, uint32_t FLG_GRADIENT, BOOL transparent, UINT32 x, UCHAR *ubAlpha);
UINT nextButtonID;
@@ -95,7 +95,7 @@ HPEN CSkin::m_SkinLightShadowPen = nullptr, CSkin::m_SkinDarkShadowPen = nul HICON CSkin::m_closeIcon = nullptr, CSkin::m_maxIcon = nullptr, CSkin::m_minIcon = nullptr;
UINT CSkin::m_aeroEffect = 0;
-DWORD CSkin::m_glowSize = 0;
+uint32_t CSkin::m_glowSize = 0;
HBRUSH CSkin::m_BrushBack = nullptr, CSkin::m_BrushFill = nullptr;
HBITMAP CSkin::m_tabCloseBitmap = nullptr, CSkin::m_tabCloseOldBitmap = nullptr;
@@ -181,8 +181,8 @@ AeroEffect CSkin::m_aeroEffects[AERO_EFFECT_LAST] = { 1,
0,
0xc0c0c0,
- DWORD(-1),
- DWORD(-1),
+ uint32_t(-1),
+ uint32_t(-1),
AeroEffectCallback_Solid
},
{
@@ -325,13 +325,13 @@ static COLORREF __inline revcolref(COLORREF colref) return RGB(GetBValue(colref), GetGValue(colref), GetRValue(colref));
}
-static DWORD __inline argb_from_cola(COLORREF col, UINT32 alpha)
+static uint32_t __inline argb_from_cola(COLORREF col, UINT32 alpha)
{
return((uint8_t)percent_to_byte(alpha) << 24 | col);
}
-void TSAPI DrawAlpha(HDC hDC, PRECT rc, DWORD clr_base, int alpha, DWORD clr_dest, uint8_t clr_dest_trans, uint8_t bGradient,
- uint8_t bCorner, DWORD dwRadius, CImageItem *imageItem)
+void TSAPI DrawAlpha(HDC hDC, PRECT rc, uint32_t clr_base, int alpha, uint32_t clr_dest, uint8_t clr_dest_trans, uint8_t bGradient,
+ uint8_t bCorner, uint32_t dwRadius, CImageItem *imageItem)
{
if (rc == nullptr)
return;
@@ -568,7 +568,7 @@ void TSAPI DrawAlpha(HDC hDC, PRECT rc, DWORD clr_base, int alpha, DWORD clr_de DeleteDC(hdc);
}
-void __inline gradientHorizontal(UCHAR *ubRedFinal, UCHAR *ubGreenFinal, UCHAR *ubBlueFinal, ULONG ulBitmapWidth, UCHAR ubRed, UCHAR ubGreen, UCHAR ubBlue, UCHAR ubRed2, UCHAR ubGreen2, UCHAR ubBlue2, DWORD FLG_GRADIENT, BOOL transparent, UINT32 x, UCHAR *ubAlpha)
+void __inline gradientHorizontal(UCHAR *ubRedFinal, UCHAR *ubGreenFinal, UCHAR *ubBlueFinal, ULONG ulBitmapWidth, UCHAR ubRed, UCHAR ubGreen, UCHAR ubBlue, UCHAR ubRed2, UCHAR ubGreen2, UCHAR ubBlue2, uint32_t FLG_GRADIENT, BOOL transparent, UINT32 x, UCHAR *ubAlpha)
{
FLOAT fSolidMulti, fInvSolidMulti;
@@ -598,7 +598,7 @@ void __inline gradientHorizontal(UCHAR *ubRedFinal, UCHAR *ubGreenFinal, UCHAR * }
}
-void __inline gradientVertical(UCHAR *ubRedFinal, UCHAR *ubGreenFinal, UCHAR *ubBlueFinal, ULONG ulBitmapHeight, UCHAR ubRed, UCHAR ubGreen, UCHAR ubBlue, UCHAR ubRed2, UCHAR ubGreen2, UCHAR ubBlue2, DWORD FLG_GRADIENT, BOOL transparent, UINT32 y, UCHAR *ubAlpha)
+void __inline gradientVertical(UCHAR *ubRedFinal, UCHAR *ubGreenFinal, UCHAR *ubBlueFinal, ULONG ulBitmapHeight, UCHAR ubRed, UCHAR ubGreen, UCHAR ubBlue, UCHAR ubRed2, UCHAR ubGreen2, UCHAR ubBlue2, uint32_t FLG_GRADIENT, BOOL transparent, UINT32 y, UCHAR *ubAlpha)
{
// solid to transparent
if (transparent) {
@@ -927,7 +927,7 @@ void CImageItem::SetBitmap32Alpha(HBITMAP hBitmap, uint8_t bAlpha) if (bmp.bmBitsPixel != 32)
return;
- DWORD dwLen = bmp.bmWidth * bmp.bmHeight * (bmp.bmBitsPixel / 8);
+ uint32_t dwLen = bmp.bmWidth * bmp.bmHeight * (bmp.bmBitsPixel / 8);
uint8_t *p = (uint8_t *)mir_alloc(dwLen);
if (p == nullptr)
return;
@@ -954,7 +954,7 @@ void CImageItem::PreMultiply(HBITMAP hBitmap, int mode) int width = bmp.bmWidth;
int height = bmp.bmHeight;
- DWORD dwLen = width * height * 4;
+ uint32_t dwLen = width * height * 4;
uint8_t *p = (uint8_t *)mir_alloc(dwLen);
if (p) {
::GetBitmapBits(hBitmap, dwLen, p);
@@ -2040,7 +2040,7 @@ UINT CSkin::DrawRichEditFrame(HWND hwnd, const CMsgDialog *mwdat, UINT skinID, U //
// @return COLORREF representation of the string value.
-DWORD CSkin::HexStringToLong(const wchar_t *szSource)
+uint32_t CSkin::HexStringToLong(const wchar_t *szSource)
{
wchar_t *stopped;
COLORREF clr = wcstol(szSource, &stopped, 16);
@@ -2053,7 +2053,7 @@ DWORD CSkin::HexStringToLong(const wchar_t *szSource) // Render text to the given HDC. This function is aero aware and will use uxtheme DrawThemeTextEx() when needed.
// Paramaters are pretty much comparable to GDI DrawText() API
-int CSkin::RenderText(HDC hdc, HANDLE hTheme, const wchar_t *szText, RECT *rc, DWORD dtFlags, const int iGlowSize, COLORREF clr, bool fForceAero)
+int CSkin::RenderText(HDC hdc, HANDLE hTheme, const wchar_t *szText, RECT *rc, uint32_t dtFlags, const int iGlowSize, COLORREF clr, bool fForceAero)
{
if ((IsWinVerVistaPlus() && !CSkin::m_skinEnabled && hTheme) || fForceAero) {
DTTOPTS dto = { 0 };
@@ -2299,7 +2299,7 @@ void CSkin::AeroEffectCallback_Milk(const HDC hdc, const RECT *rc, int iEffectAr if (iEffectArea == AERO_EFFECT_AREA_MENUBAR)
alpha = 90;
uint8_t color2_trans = (iEffectArea == AERO_EFFECT_AREA_MENUBAR) ? 0 : 1;
- DWORD corner = (iEffectArea == AERO_EFFECT_AREA_INFOPANEL) ? m_pCurrentAeroEffect->m_cornerRadius : 6;
+ uint32_t corner = (iEffectArea == AERO_EFFECT_AREA_INFOPANEL) ? m_pCurrentAeroEffect->m_cornerRadius : 6;
DrawAlpha(hdc, const_cast<RECT *>(rc), m_pCurrentAeroEffect->m_baseColor, alpha, m_pCurrentAeroEffect->m_gradientColor,
color2_trans, m_pCurrentAeroEffect->m_gradientType, m_pCurrentAeroEffect->m_cornerType, corner, nullptr);
diff --git a/plugins/TabSRMM/src/themes.h b/plugins/TabSRMM/src/themes.h index 67a187567e..8124d11d27 100644 --- a/plugins/TabSRMM/src/themes.h +++ b/plugins/TabSRMM/src/themes.h @@ -119,14 +119,14 @@ void CustomizeButton(HWND hwndButton); struct AeroEffect
{
wchar_t tszName[40];
- DWORD m_baseColor;
- DWORD m_gradientColor;
+ uint32_t m_baseColor;
+ uint32_t m_gradientColor;
uint8_t m_baseAlpha;
uint8_t m_finalAlpha;
uint8_t m_cornerType;
uint8_t m_gradientType;
- DWORD m_cornerRadius;
- DWORD m_glowSize;
+ uint32_t m_cornerRadius;
+ uint32_t m_glowSize;
COLORREF m_clrBack, m_clrToolbar, m_clrToolbar2;
void (TSAPI *pfnEffectRenderer)(const HDC hdc, const RECT *rc, int iEffectArea);
@@ -155,7 +155,7 @@ public: m_szName[39] = 0;
}
- CImageItem(uint8_t bottom, uint8_t left, uint8_t top, uint8_t right, HDC hdc, HBITMAP hbm, DWORD dwFlags,
+ CImageItem(uint8_t bottom, uint8_t left, uint8_t top, uint8_t right, HDC hdc, HBITMAP hbm, uint32_t dwFlags,
HBRUSH brush, uint8_t alpha, LONG inner_height, LONG inner_width, LONG height, LONG width)
{
m_bBottom = bottom;
@@ -213,7 +213,7 @@ public: CImageItem* getNextItem() const { return(m_nextItem); }
void setNextItem(CImageItem *item) { m_nextItem = item; }
HBITMAP getHbm() const { return(m_hbm); }
- DWORD getFlags() const { return(m_dwFlags); }
+ uint32_t getFlags() const { return(m_dwFlags); }
HDC getDC() const { return(m_hdc); }
const BLENDFUNCTION& getBF() const
{
@@ -235,7 +235,7 @@ private: HBITMAP m_hbm; // the bitmap handle
uint8_t m_bLeft, m_bRight, m_bTop, m_bBottom; // sizing margins for the outer 8 image parts
uint8_t m_alpha; // constant alpha for the entire image, applied via m_bf. sums with perpixel alpha
- DWORD m_dwFlags; // flags
+ uint32_t m_dwFlags; // flags
HDC m_hdc; // *can* hold a pre-created hdc to speed up rendering
HBITMAP m_hbmOld; // old bitmap, needs to be selected into m_hdc before destroying it
LONG m_inner_height, m_inner_width; // dimensions of the inner image part
@@ -256,12 +256,12 @@ struct CSkinItem { uint8_t GRADIENT;
uint8_t CORNER;
- DWORD COLOR;
- DWORD COLOR2;
+ uint32_t COLOR;
+ uint32_t COLOR2;
uint8_t COLOR2_TRANSPARENT;
- DWORD TEXTCOLOR;
+ uint32_t TEXTCOLOR;
int ALPHA;
@@ -270,7 +270,7 @@ struct CSkinItem { int MARGIN_RIGHT;
int MARGIN_BOTTOM;
uint8_t IGNORED;
- DWORD BORDERSTYLE;
+ uint32_t BORDERSTYLE;
CImageItem *imageItem;
};
@@ -342,7 +342,7 @@ public: void ReadButtonItem(const wchar_t *itemName) const;
bool haveGlyphItem() const { return(m_fHaveGlyph); }
int getNrIcons() const { return(m_nrSkinIcons); }
- DWORD getDwmColor() const { return(m_dwmColor); }
+ uint32_t getDwmColor() const { return(m_dwmColor); }
const TIconDescW* getIconDesc(const int id) const { return(&m_skinIcons[id]); }
/**
@@ -370,11 +370,11 @@ public: static void TSAPI SkinDrawBGFromDC(HWND hwndClient, HWND hwnd, RECT *rcClient, HDC hdcTarget);
static void TSAPI SkinDrawBG(HWND hwndClient, HWND hwnd, TContainerData *pContainer, RECT *rcClient, HDC hdcTarget);
static void TSAPI DrawDimmedIcon(HDC hdc, LONG left, LONG top, LONG dx, LONG dy, HICON hIcon, uint8_t alpha);
- static DWORD TSAPI HexStringToLong(const wchar_t *szSource);
+ static uint32_t TSAPI HexStringToLong(const wchar_t *szSource);
static UINT TSAPI DrawRichEditFrame(HWND hwnd, const CMsgDialog *mwdat, UINT skinID, UINT msg, WPARAM wParam, LPARAM lParam, WNDPROC OldWndProc);
static UINT TSAPI NcCalcRichEditFrame(HWND hwnd, const CMsgDialog *mwdat, UINT skinID, UINT msg, WPARAM wParam, LPARAM lParam, WNDPROC OldWndProc);
static HBITMAP TSAPI CreateAeroCompatibleBitmap(const RECT &rc, HDC dc);
- static int TSAPI RenderText(HDC hdc, HANDLE hTheme, const wchar_t *szText, RECT *rc, DWORD dtFlags, const int iGlowSize = DEFAULT_GLOW_SIZE, COLORREF clr = 0, bool fForceAero = false);
+ static int TSAPI RenderText(HDC hdc, HANDLE hTheme, const wchar_t *szText, RECT *rc, uint32_t dtFlags, const int iGlowSize = DEFAULT_GLOW_SIZE, COLORREF clr = 0, bool fForceAero = false);
static void TSAPI MapClientToParent(HWND hwndClient, HWND hwndParent, RECT &rc);
static void TSAPI ApplyAeroEffect(const HDC hdc, const RECT* rc, int iEffectArea);
static void TSAPI setAeroEffect(const LRESULT effect);
@@ -419,7 +419,7 @@ public: static AeroEffect m_aeroEffects[AERO_EFFECT_LAST];
static AeroEffect m_currentAeroEffect;
static AeroEffect* m_pCurrentAeroEffect;
- static DWORD m_glowSize;
+ static uint32_t m_glowSize;
static HBRUSH m_BrushBack, m_BrushFill;
static COLORREF m_dwmColorRGB;
@@ -438,7 +438,7 @@ private: void SkinCalcFrameWidth();
TIconDescW *m_skinIcons;
int m_nrSkinIcons;
- DWORD m_dwmColor;
+ uint32_t m_dwmColor;
static void TSAPI AeroEffectCallback_Milk(const HDC hdc, const RECT *rc, int iEffectArea);
static void TSAPI AeroEffectCallback_Carbon(const HDC hdc, const RECT *rc, int iEffectArea);
@@ -460,13 +460,13 @@ struct ButtonItem { LONG_PTR normalGlyphMetrics[4];
LONG_PTR hoverGlyphMetrics[4];
LONG_PTR pressedGlyphMetrics[4];
- DWORD dwFlags, dwStockFlags;
- DWORD uId;
+ uint32_t dwFlags, dwStockFlags;
+ uint32_t uId;
wchar_t szTip[256];
char szService[256];
char szModule[256], szSetting[256];
uint8_t bValuePush[256], bValueRelease[256];
- DWORD type;
+ uint32_t type;
void(*pfnAction)(ButtonItem *item, HWND hwndDlg, CMsgDialog *dat, HWND hwndItem);
void(*pfnCallback)(ButtonItem *item, HWND hwndDlg, CMsgDialog *dat, HWND hwndItem);
wchar_t tszLabel[40];
diff --git a/plugins/TabSRMM/src/userprefs.cpp b/plugins/TabSRMM/src/userprefs.cpp index 3a8660e028..4b2bc1bb09 100644 --- a/plugins/TabSRMM/src/userprefs.cpp +++ b/plugins/TabSRMM/src/userprefs.cpp @@ -58,7 +58,7 @@ public: bool OnInitDialog() override
{
- DWORD maxhist = M.GetDword(m_hContact, "maxhist", 0);
+ uint32_t maxhist = M.GetDword(m_hContact, "maxhist", 0);
int iLocalFormat = M.GetDword(m_hContact, "sendformat", 0);
uint8_t bSplit = M.GetByte(m_hContact, "splitoverride", 0);
uint8_t bInfoPanel = M.GetByte(m_hContact, "infopanel", 0);
@@ -127,7 +127,7 @@ public: SendMessage(dat->GetHwnd(), DM_SETINFOPANEL, 0, 0);
}
if (chkAlwaysTrim.GetState())
- db_set_dw(m_hContact, SRMSGMOD_T, "maxhist", (DWORD)SendDlgItemMessage(m_hwnd, IDC_TRIMSPIN, UDM_GETPOS, 0, 0));
+ db_set_dw(m_hContact, SRMSGMOD_T, "maxhist", (uint32_t)SendDlgItemMessage(m_hwnd, IDC_TRIMSPIN, UDM_GETPOS, 0, 0));
else
db_set_dw(m_hContact, SRMSGMOD_T, "maxhist", 0);
@@ -201,9 +201,9 @@ checkboxes[] = { int CMsgDialog::LoadLocalFlags()
{
- DWORD dwMask = M.GetDword(m_hContact, "mwmask", 0);
- DWORD dwLocal = M.GetDword(m_hContact, "mwflags", 0);
- DWORD dwGlobal = M.GetDword("mwflags", MWF_LOG_DEFAULT);
+ uint32_t dwMask = M.GetDword(m_hContact, "mwmask", 0);
+ uint32_t dwLocal = M.GetDword(m_hContact, "mwflags", 0);
+ uint32_t dwGlobal = M.GetDword("mwflags", MWF_LOG_DEFAULT);
m_dwFlags &= ~MWF_LOG_ALL;
if (m_pContainer->m_theme.isPrivate)
@@ -212,7 +212,7 @@ int CMsgDialog::LoadLocalFlags() m_dwFlags |= (dwGlobal & MWF_LOG_ALL);
for (int i = 0; checkboxes[i].uId; i++) {
- DWORD maskval = checkboxes[i].uFlag;
+ uint32_t maskval = checkboxes[i].uFlag;
if (dwMask & maskval)
m_dwFlags = (dwLocal & maskval) ? m_dwFlags | maskval : m_dwFlags & ~maskval;
}
@@ -243,7 +243,7 @@ public: bool OnInitDialog() override
{
- DWORD dwLocalFlags, dwLocalMask, maskval;
+ uint32_t dwLocalFlags, dwLocalMask, maskval;
dwLocalFlags = M.GetDword(m_hContact, "mwflags", 0);
dwLocalMask = M.GetDword(m_hContact, "mwmask", 0);
@@ -268,7 +268,7 @@ public: bool OnApply() override
{
- DWORD dwMask = 0, dwFlags = 0, maskval;
+ uint32_t dwMask = 0, dwFlags = 0, maskval;
int i = 0;
while (checkboxes[i].uId) {
@@ -341,7 +341,7 @@ public: {
CMsgDialog *dat = Srmm_FindDialog(m_hContact);
if (dat) {
- DWORD dwOldFlags = (dat->m_dwFlags & MWF_LOG_ALL);
+ uint32_t dwOldFlags = (dat->m_dwFlags & MWF_LOG_ALL);
dat->SetDialogToType();
dat->LoadLocalFlags();
if ((dat->m_dwFlags & MWF_LOG_ALL) != dwOldFlags) {
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp index c902b8ee9a..b0ef140f0d 100644 --- a/plugins/TabSRMM/src/utils.cpp +++ b/plugins/TabSRMM/src/utils.cpp @@ -468,10 +468,10 @@ LRESULT CALLBACK Utils::PopupDlgProcError(HWND hWnd, UINT message, WPARAM wParam struct TOldContainerSettings
{
BOOL fPrivate;
- DWORD dwFlags;
- DWORD dwFlagsEx;
- DWORD dwTransparency;
- DWORD panelheight;
+ uint32_t dwFlags;
+ uint32_t dwFlagsEx;
+ uint32_t dwTransparency;
+ uint32_t panelheight;
int iSplitterY;
wchar_t szTitleFormat[32];
uint16_t avatarMode;
@@ -789,7 +789,7 @@ void Utils::showDlgControl(const HWND hwnd, UINT id, int showCmd) /////////////////////////////////////////////////////////////////////////////////////////
// stream function to write the contents of the message log to an rtf file
-DWORD CALLBACK Utils::StreamOut(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG * pcb)
+uint32_t CALLBACK Utils::StreamOut(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG * pcb)
{
wchar_t *szFilename = (wchar_t*)dwCookie;
HANDLE hFile = CreateFile(szFilename, GENERIC_WRITE, FILE_SHARE_READ, nullptr, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr);
@@ -816,7 +816,7 @@ bool Utils::extractResource(const HMODULE h, const UINT uID, const wchar_t *tszN HGLOBAL hResource = LoadResource(h, hRes);
if (hResource) {
char *pData = (char *)LockResource(hResource);
- DWORD dwSize = SizeofResource(g_plugin.getInst(), hRes), written = 0;
+ DWORD dwSize = SizeofResource(g_plugin.getInst(), hRes), written = 0;
wchar_t szFilename[MAX_PATH];
mir_snwprintf(szFilename, L"%s%s", tszPath, tszFilename);
@@ -1050,7 +1050,7 @@ static wchar_t* warnings[] = { LPGENW("Loading a theme|Loading a color and font theme can overwrite the settings defined by your skin.\n\nDo you want to continue?"), /* WARN_THEME_OVERWRITE */
};
-CWarning::CWarning(const wchar_t *tszTitle, const wchar_t *tszText, const UINT uId, const DWORD dwFlags) :
+CWarning::CWarning(const wchar_t *tszTitle, const wchar_t *tszText, const UINT uId, const uint32_t dwFlags) :
m_szTitle(mir_wstrdup(tszTitle)),
m_szText(mir_wstrdup(tszText))
{
@@ -1081,8 +1081,8 @@ __int64 CWarning::getMask() {
__int64 mask = 0;
- DWORD dwLow = M.GetDword("cWarningsL", 0);
- DWORD dwHigh = M.GetDword("cWarningsH", 0);
+ uint32_t dwLow = M.GetDword("cWarningsL", 0);
+ uint32_t dwHigh = M.GetDword("cWarningsH", 0);
mask = ((((__int64)dwHigh) << 32) & 0xffffffff00000000) | dwLow;
return(mask);
@@ -1105,7 +1105,7 @@ void CWarning::destroyAll() // not show this message again. This has room for 64 different warning dialogs, which
// should be enough in the first place. Extending it should not be too hard though.
-LRESULT CWarning::show(const int uId, DWORD dwFlags, const wchar_t* tszTxt)
+LRESULT CWarning::show(const int uId, uint32_t dwFlags, const wchar_t* tszTxt)
{
wchar_t* separator_pos = nullptr;
__int64 mask = 0, val = 0;
@@ -1292,9 +1292,9 @@ INT_PTR CALLBACK CWarning::dlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP newVal = mask | val64;
if (::IsDlgButtonChecked(hwnd, IDC_DONTSHOWAGAIN)) {
- DWORD val = (DWORD)(newVal & 0x00000000ffffffff);
+ uint32_t val = (uint32_t)(newVal & 0x00000000ffffffff);
db_set_dw(0, SRMSGMOD_T, "cWarningsL", val);
- val = (DWORD)((newVal >> 32) & 0x00000000ffffffff);
+ val = (uint32_t)((newVal >> 32) & 0x00000000ffffffff);
db_set_dw(0, SRMSGMOD_T, "cWarningsH", val);
}
}
diff --git a/plugins/TabSRMM/src/utils.h b/plugins/TabSRMM/src/utils.h index d1319ff2ef..2c73cba5de 100644 --- a/plugins/TabSRMM/src/utils.h +++ b/plugins/TabSRMM/src/utils.h @@ -63,7 +63,7 @@ namespace Utils void ReadPrivateContainerSettings(TContainerData *pContainer, bool fForce = false);
void SaveContainerSettings(TContainerData *pContainer, const char *szSetting);
- DWORD CALLBACK StreamOut(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG * pcb);
+ uint32_t CALLBACK StreamOut(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG * pcb);
void addMenuItem(const HMENU& m, MENUITEMINFO& mii, HICON hIcon, const wchar_t *szText, UINT uID, UINT pos);
void enableDlgControl(const HWND hwnd, UINT id, bool fEnable = true);
@@ -143,12 +143,12 @@ struct CWarning CWF_NOALLOWHIDE = 0x00020000 // critical message, hide the "do not show this again" check box
};
- CWarning(const wchar_t* tszTitle, const wchar_t* tszText, const UINT uId, const DWORD dwFlags);
+ CWarning(const wchar_t* tszTitle, const wchar_t* tszText, const UINT uId, const uint32_t dwFlags);
~CWarning();
public:
// static function to construct and show the dialog, returns the user's choice
- static LRESULT show(const int uId, DWORD dwFlags = 0, const wchar_t* tszTxt = nullptr);
+ static LRESULT show(const int uId, uint32_t dwFlags = 0, const wchar_t* tszTxt = nullptr);
static void destroyAll();
LRESULT ShowDialog() const;
@@ -156,7 +156,7 @@ private: ptrW m_szTitle, m_szText;
UINT m_uId;
HFONT m_hFontCaption;
- DWORD m_dwFlags;
+ uint32_t m_dwFlags;
HWND m_hwnd = nullptr;
bool m_fIsModal;
diff --git a/plugins/TipperYM/src/bitmap_func.cpp b/plugins/TipperYM/src/bitmap_func.cpp index 3915087916..1cfad4ac46 100644 --- a/plugins/TipperYM/src/bitmap_func.cpp +++ b/plugins/TipperYM/src/bitmap_func.cpp @@ -460,7 +460,7 @@ BOOL IsAlphaTransparent(HBITMAP hBitmap) if (bmp.bmBitsPixel != 32)
return FALSE;
- DWORD dwLen = bmp.bmWidth * bmp.bmHeight * (bmp.bmBitsPixel / 8);
+ uint32_t dwLen = bmp.bmWidth * bmp.bmHeight * (bmp.bmBitsPixel / 8);
uint8_t *p = (uint8_t *)mir_calloc(dwLen);
if (p == nullptr)
return FALSE;
diff --git a/plugins/TipperYM/src/message_pump.h b/plugins/TipperYM/src/message_pump.h index 9bb7d755b2..5b4df9c742 100644 --- a/plugins/TipperYM/src/message_pump.h +++ b/plugins/TipperYM/src/message_pump.h @@ -35,7 +35,7 @@ Boston, MA 02111-1307, USA. struct DWM_BLURBEHIND
{
- DWORD dwFlags;
+ uint32_t dwFlags;
BOOL fEnable;
HRGN hRgnBlur;
BOOL fTransitionOnMaximized;
diff --git a/plugins/TipperYM/src/options.cpp b/plugins/TipperYM/src/options.cpp index ad60f95536..20b97c1b5b 100644 --- a/plugins/TipperYM/src/options.cpp +++ b/plugins/TipperYM/src/options.cpp @@ -163,12 +163,12 @@ bool LoadDS(DISPLAYSUBST *ds, int index) }
mir_snprintf(setting, "TransFuncId%d", index);
- ds->iTranslateFuncId = db_get_dw(0, MODULE_ITEMS, setting, (DWORD)-1);
+ ds->iTranslateFuncId = db_get_dw(0, MODULE_ITEMS, setting, (uint32_t)-1);
// a little backward compatibility
- if ((DWORD)ds->iTranslateFuncId == (DWORD)-1) {
+ if ((uint32_t)ds->iTranslateFuncId == (uint32_t)-1) {
mir_snprintf(setting, "TransFunc%d", index);
- ds->iTranslateFuncId = (DWORD)db_get_w(0, MODULE_ITEMS, setting, 0);
+ ds->iTranslateFuncId = (uint32_t)db_get_w(0, MODULE_ITEMS, setting, 0);
}
return true;
@@ -282,9 +282,9 @@ void SaveOptions() g_plugin.setWord("InnerAvatarPadding", opt.iInnerAvatarPadding);
g_plugin.setWord("TextPadding", opt.iTextPadding);
g_plugin.setByte("Position", (uint8_t)opt.pos);
- g_plugin.setDword("MinWidth", (DWORD)opt.iMinWidth);
- g_plugin.setDword("MinHeight", (DWORD)opt.iMinHeight);
- g_plugin.setDword("SidebarWidth", (DWORD)opt.iSidebarWidth);
+ g_plugin.setDword("MinWidth", (uint32_t)opt.iMinWidth);
+ g_plugin.setDword("MinHeight", (uint32_t)opt.iMinHeight);
+ g_plugin.setDword("SidebarWidth", (uint32_t)opt.iSidebarWidth);
g_plugin.setByte("MouseTollerance", (uint8_t)opt.iMouseTollerance);
g_plugin.setByte("SBarTips", (opt.bStatusBarTips ? 1 : 0));
@@ -352,7 +352,7 @@ void LoadObsoleteSkinSetting() }
mir_snprintf(setting, "SGlyphMargins%d", i);
- DWORD margins = g_plugin.getDword(setting, 0);
+ uint32_t margins = g_plugin.getDword(setting, 0);
opt.margins[i].top = LOBYTE(LOWORD(margins));
opt.margins[i].right = HIBYTE(LOWORD(margins));
opt.margins[i].bottom = LOBYTE(HIWORD(margins));
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp index 65e75e48b4..799dc9bee7 100644 --- a/plugins/TipperYM/src/popwin.cpp +++ b/plugins/TipperYM/src/popwin.cpp @@ -1433,7 +1433,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa pwd->rows = nullptr; pwd->iRowCount = 0; - DWORD dwItems = (wParam == 0) ? opt.iFirstItems : opt.iSecondItems; + uint32_t dwItems = (wParam == 0) ? opt.iFirstItems : opt.iSecondItems; bool bFirstItem = true; wchar_t buff[64]; diff --git a/plugins/TipperYM/src/subst.cpp b/plugins/TipperYM/src/subst.cpp index efa18fbd4a..45e7abd4d5 100644 --- a/plugins/TipperYM/src/subst.cpp +++ b/plugins/TipperYM/src/subst.cpp @@ -119,7 +119,7 @@ void StripBBCodesInPlace(wchar_t *ptszText) } } -DWORD LastMessageTimestamp(MCONTACT hContact, bool received) +uint32_t LastMessageTimestamp(MCONTACT hContact, bool received) { for (MEVENT hDbEvent = db_event_last(hContact); hDbEvent; hDbEvent = db_event_prev(hContact, hDbEvent)) { DBEVENTINFO dbei = {}; @@ -131,7 +131,7 @@ DWORD LastMessageTimestamp(MCONTACT hContact, bool received) return 0; } -void FormatTimestamp(DWORD ts, char *szFormat, wchar_t *buff, int bufflen) +void FormatTimestamp(uint32_t ts, char *szFormat, wchar_t *buff, int bufflen) { wchar_t swzForm[16]; a2t(szFormat, swzForm, 16); @@ -324,22 +324,22 @@ bool GetSysSubstText(MCONTACT hContact, wchar_t *swzRawSpec, wchar_t *buff, int return GetSysSubstText(hSubContact, L"account", buff, bufflen); } else if ((recv = !mir_wstrcmp(swzRawSpec, L"last_msg_time")) || !mir_wstrcmp(swzRawSpec, L"last_msg_out_time")) { - DWORD ts = LastMessageTimestamp(hContact, recv); + uint32_t ts = LastMessageTimestamp(hContact, recv); if (ts == 0) return false; FormatTimestamp(ts, "t", buff, bufflen); return true; } else if ((recv = !mir_wstrcmp(swzRawSpec, L"last_msg_date")) || !mir_wstrcmp(swzRawSpec, L"last_msg_out_date")) { - DWORD ts = LastMessageTimestamp(hContact, recv); + uint32_t ts = LastMessageTimestamp(hContact, recv); if (ts == 0) return false; FormatTimestamp(ts, "d", buff, bufflen); return true; } else if ((recv = !mir_wstrcmp(swzRawSpec, L"last_msg_reltime")) || !mir_wstrcmp(swzRawSpec, L"last_msg_out_reltime")) { - DWORD ts = LastMessageTimestamp(hContact, recv); + uint32_t ts = LastMessageTimestamp(hContact, recv); if (ts == 0) return false; - DWORD t = (DWORD)time(0); - DWORD diff = (t - ts); + uint32_t t = (uint32_t)time(0); + uint32_t diff = (t - ts); int d = (diff / 60 / 60 / 24); int h = (diff - d * 60 * 60 * 24) / 60 / 60; int m = (diff - d * 60 * 60 * 24 - h * 60 * 60) / 60; @@ -349,10 +349,10 @@ bool GetSysSubstText(MCONTACT hContact, wchar_t *swzRawSpec, wchar_t *buff, int return true; } else if (!mir_wstrcmp(swzRawSpec, L"msg_count_all") || !mir_wstrcmp(swzRawSpec, L"msg_count_out") || !mir_wstrcmp(swzRawSpec, L"msg_count_in")) { - DWORD dwCountOut, dwCountIn; - DWORD dwMetaCountOut = 0, dwMetaCountIn = 0; - DWORD dwLastTs, dwNewTs, dwRecountTs; - DWORD dwTime, dwDiff; + uint32_t dwCountOut, dwCountIn; + uint32_t dwMetaCountOut = 0, dwMetaCountIn = 0; + uint32_t dwLastTs, dwNewTs, dwRecountTs; + uint32_t dwTime, dwDiff; int iNumber = 1; MCONTACT hTmpContact = hContact; @@ -366,7 +366,7 @@ bool GetSysSubstText(MCONTACT hContact, wchar_t *swzRawSpec, wchar_t *buff, int if (i > 0) hTmpContact = db_mc_getSub(hContact, i); dwRecountTs = g_plugin.getDword(hTmpContact, "LastCountTS"); - dwTime = (DWORD)time(0); + dwTime = (uint32_t)time(0); dwDiff = (dwTime - dwRecountTs); if (dwDiff > (60 * 60 * 24 * 3)) { g_plugin.setDword(hTmpContact, "LastCountTS", dwTime); @@ -422,7 +422,7 @@ bool GetSubstText(MCONTACT hContact, const DISPLAYSUBST &ds, wchar_t *buff, int { TranslateFunc *transFunc = nullptr; for (int i = 0; i < iTransFuncsCount; i++) - if (translations[i].id == (DWORD)ds.iTranslateFuncId) { + if (translations[i].id == (uint32_t)ds.iTranslateFuncId) { transFunc = translations[i].transFunc; break; } diff --git a/plugins/TipperYM/src/tipper.cpp b/plugins/TipperYM/src/tipper.cpp index 4c67fbe5c3..aabbdfe388 100644 --- a/plugins/TipperYM/src/tipper.cpp +++ b/plugins/TipperYM/src/tipper.cpp @@ -241,7 +241,7 @@ static int ModulesLoaded(WPARAM, LPARAM) CallService(MS_CLC_SETINFOTIPHOVERTIME, opt.iTimeIn, 0);
// set Miranda start timestamp
- g_plugin.setDword("MirandaStartTS", (DWORD)time(0));
+ g_plugin.setDword("MirandaStartTS", (uint32_t)time(0));
return 0;
}
diff --git a/plugins/TipperYM/src/translations.cpp b/plugins/TipperYM/src/translations.cpp index d5b301ff95..32431f8991 100644 --- a/plugins/TipperYM/src/translations.cpp +++ b/plugins/TipperYM/src/translations.cpp @@ -23,7 +23,7 @@ Boston, MA 02111-1307, USA. int iTransFuncsCount = 0;
DBVTranslation *translations = nullptr;
-DWORD dwNextFuncId;
+uint32_t dwNextFuncId;
HANDLE hServiceAdd;
static LISTTYPEDATAITEM languages[] =
@@ -131,7 +131,7 @@ void AddTranslation(DBVTranslation *newTrans) translations[iTransFuncsCount - 1].id = 0;
}
else {
- DWORD id = db_get_dw(0, MODULE_ITEMS, szSetting, 0);
+ uint32_t id = db_get_dw(0, MODULE_ITEMS, szSetting, 0);
if (id != 0) {
translations[iTransFuncsCount - 1].id = id;
if (dwNextFuncId <= id) dwNextFuncId = id + 1;
@@ -156,7 +156,7 @@ wchar_t *NullTranslation(MCONTACT hContact, const char *szModuleName, const char wchar_t* TimestampToShortDate(MCONTACT hContact, const char *szModuleName, const char *szSettingName, wchar_t *buff, int bufflen)
{
- DWORD ts = db_get_dw(hContact, szModuleName, szSettingName, 0);
+ uint32_t ts = db_get_dw(hContact, szModuleName, szSettingName, 0);
if (ts == 0)
return nullptr;
@@ -165,7 +165,7 @@ wchar_t* TimestampToShortDate(MCONTACT hContact, const char *szModuleName, const wchar_t* TimestampToLongDate(MCONTACT hContact, const char *szModuleName, const char *szSettingName, wchar_t *buff, int bufflen)
{
- DWORD ts = db_get_dw(hContact, szModuleName, szSettingName, 0);
+ uint32_t ts = db_get_dw(hContact, szModuleName, szSettingName, 0);
if (ts == 0)
return nullptr;
@@ -174,7 +174,7 @@ wchar_t* TimestampToLongDate(MCONTACT hContact, const char *szModuleName, const wchar_t* TimestampToTime(MCONTACT hContact, const char *szModuleName, const char *szSettingName, wchar_t *buff, int bufflen)
{
- DWORD ts = db_get_dw(hContact, szModuleName, szSettingName, 0);
+ uint32_t ts = db_get_dw(hContact, szModuleName, szSettingName, 0);
if (ts == 0)
return nullptr;
@@ -183,7 +183,7 @@ wchar_t* TimestampToTime(MCONTACT hContact, const char *szModuleName, const char wchar_t* TimestampToTimeNoSecs(MCONTACT hContact, const char *szModuleName, const char *szSettingName, wchar_t *buff, int bufflen)
{
- DWORD ts = db_get_dw(hContact, szModuleName, szSettingName, 0);
+ uint32_t ts = db_get_dw(hContact, szModuleName, szSettingName, 0);
if (ts == 0)
return nullptr;
@@ -192,11 +192,11 @@ wchar_t* TimestampToTimeNoSecs(MCONTACT hContact, const char *szModuleName, cons wchar_t* TimestampToTimeDifference(MCONTACT hContact, const char *szModuleName, const char *szSettingName, wchar_t *buff, int bufflen)
{
- DWORD ts = db_get_dw(hContact, szModuleName, szSettingName, 0);
- DWORD t = (DWORD)time(0);
+ uint32_t ts = db_get_dw(hContact, szModuleName, szSettingName, 0);
+ uint32_t t = (uint32_t)time(0);
if (ts == 0) return nullptr;
- DWORD diff = (ts > t) ? 0 : (t - ts);
+ uint32_t diff = (ts > t) ? 0 : (t - ts);
int d = (diff / 60 / 60 / 24);
int h = (diff - d * 60 * 60 * 24) / 60 / 60;
int m = (diff - d * 60 * 60 * 24 - h * 60 * 60) / 60;
@@ -212,7 +212,7 @@ wchar_t* TimestampToTimeDifference(MCONTACT hContact, const char *szModuleName, wchar_t *SecondsToTimeDifference(MCONTACT hContact, const char *szModuleName, const char *szSettingName, wchar_t *buff, int bufflen)
{
- DWORD diff = db_get_dw(hContact, szModuleName, szSettingName, 0);
+ uint32_t diff = db_get_dw(hContact, szModuleName, szSettingName, 0);
int d = (diff / 60 / 60 / 24);
int h = (diff - d * 60 * 60 * 24) / 60 / 60;
int m = (diff - d * 60 * 60 * 24 - h * 60 * 60) / 60;
@@ -282,7 +282,7 @@ wchar_t *WordToCountry(MCONTACT hContact, const char *szModuleName, const char * wchar_t *DwordToIp(MCONTACT hContact, const char *szModuleName, const char *szSettingName, wchar_t *buff, int bufflen)
{
- DWORD ip = db_get_dw(hContact, szModuleName, szSettingName, 0);
+ uint32_t ip = db_get_dw(hContact, szModuleName, szSettingName, 0);
if (ip) {
unsigned char *ipc = (unsigned char*)&ip;
mir_snwprintf(buff, bufflen, L"%u.%u.%u.%u", ipc[3], ipc[2], ipc[1], ipc[0]);
@@ -718,23 +718,23 @@ static DBVTranslation internalTranslations[] = {
{ NullTranslation, LPGENW("[No translation]") },
{ WordToStatusDesc, LPGENW("uint16_t to status description") },
- { TimestampToTime, LPGENW("DWORD timestamp to time") },
- { TimestampToTimeDifference, LPGENW("DWORD timestamp to time difference") },
+ { TimestampToTime, LPGENW("uint32_t timestamp to time") },
+ { TimestampToTimeDifference, LPGENW("uint32_t timestamp to time difference") },
{ ByteToYesNo, LPGENW("uint8_t to Yes/No") },
{ ByteToGender, LPGENW("uint8_t to Male/Female (ICQ)") },
{ WordToCountry, LPGENW("uint16_t to country name") },
- { DwordToIp, LPGENW("DWORD to IP address") },
+ { DwordToIp, LPGENW("uint32_t to IP address") },
{ DayMonthYearToDate, LPGENW("<prefix>Day|Month|Year to date") },
{ DayMonthYearToAge, LPGENW("<prefix>Day|Month|Year to age") },
{ HoursMinutesSecondsToTime, LPGENW("<prefix>Hours|Minutes|Seconds to time") },
{ DmyToTimeDifference, LPGENW("<prefix>Day|Month|Year|Hours|Minutes|Seconds to time difference") },
{ DayMonthToDaysToNextBirthday, LPGENW("<prefix>Day|Month to days to next birthday") },
- { TimestampToTimeNoSecs, LPGENW("DWORD timestamp to time (no seconds)") },
+ { TimestampToTimeNoSecs, LPGENW("uint32_t timestamp to time (no seconds)") },
{ HoursMinutesToTime, LPGENW("<prefix>Hours|Minutes to time") },
- { TimestampToShortDate, LPGENW("DWORD timestamp to date (short)") },
- { TimestampToLongDate, LPGENW("DWORD timestamp to date (long)") },
+ { TimestampToShortDate, LPGENW("uint32_t timestamp to date (short)") },
+ { TimestampToLongDate, LPGENW("uint32_t timestamp to date (long)") },
{ EmptyXStatusToDefaultName, LPGENW("xStatus: empty xStatus name to default name") },
- { SecondsToTimeDifference, LPGENW("DWORD seconds to time difference") },
+ { SecondsToTimeDifference, LPGENW("uint32_t seconds to time difference") },
{ TimezoneToTime, LPGENW("uint8_t timezone to time") },
{ ByteToDay, LPGENW("uint16_t to name of a day (0..6, 0 is Sunday)") },
{ ByteToMonth, LPGENW("uint16_t to name of a month (1..12, 1 is January)") },
diff --git a/plugins/TooltipNotify/src/Tooltip.h b/plugins/TooltipNotify/src/Tooltip.h index b451316705..87366232fa 100644 --- a/plugins/TooltipNotify/src/Tooltip.h +++ b/plugins/TooltipNotify/src/Tooltip.h @@ -23,8 +23,8 @@ public: void set_Translucency(uint8_t bAlpha);
void set_Text(const wchar_t* szText);
void set_Font(const LOGFONT& Font) { m_lfFont = Font; }
- void set_TextColor(DWORD TextColor) { m_dwTextColor = TextColor; }
- void set_BgColor(DWORD BgColor) { m_dwBgColor = BgColor; }
+ void set_TextColor(uint32_t TextColor) { m_dwTextColor = TextColor; }
+ void set_BgColor(uint32_t BgColor) { m_dwBgColor = BgColor; }
static void Initialize();
static void Deinitialize();
@@ -42,8 +42,8 @@ private: HFONT m_hFont;
// tooltip parameters
- DWORD m_dwTextColor;
- DWORD m_dwBgColor;
+ uint32_t m_dwTextColor;
+ uint32_t m_dwBgColor;
LOGFONT m_lfFont;
wchar_t *m_szText;
uint8_t m_bAlpha;
diff --git a/plugins/TopToolBar/src/stdafx.h b/plugins/TopToolBar/src/stdafx.h index 949f641402..8a86393492 100644 --- a/plugins/TopToolBar/src/stdafx.h +++ b/plugins/TopToolBar/src/stdafx.h @@ -51,7 +51,7 @@ struct TopButtonInt : public MZeroedObject {
~TopButtonInt();
- DWORD CheckFlags(DWORD Flags);
+ uint32_t CheckFlags(uint32_t Flags);
void CreateWnd(void);
void LoadSettings(void);
void SaveSettings(int *SepCnt, int *LaunchCnt);
diff --git a/plugins/TopToolBar/src/toolbar.cpp b/plugins/TopToolBar/src/toolbar.cpp index 777c36c536..884b0b4b0b 100644 --- a/plugins/TopToolBar/src/toolbar.cpp +++ b/plugins/TopToolBar/src/toolbar.cpp @@ -433,7 +433,7 @@ INT_PTR TTBSetOptions(WPARAM wParam, LPARAM lParam) if (b->dwFlags == lParam)
return 0;
- DWORD retval = b->CheckFlags(lParam);
+ uint32_t retval = b->CheckFlags(lParam);
if (retval & TTBBF_PUSHED)
b->SetBitmap();
@@ -455,7 +455,7 @@ INT_PTR TTBSetOptions(WPARAM wParam, LPARAM lParam) case TTBO_ALLDATA:
if (lParam) {
TTBButton *lpTTB = (TTBButton*)lParam;
- DWORD retval = b->CheckFlags(lpTTB->dwFlags);
+ uint32_t retval = b->CheckFlags(lpTTB->dwFlags);
bool changed = false;
if (b->hIconUp != lpTTB->hIconUp) {
diff --git a/plugins/TopToolBar/src/topbutton.cpp b/plugins/TopToolBar/src/topbutton.cpp index 50b89aae5a..5fe01c3106 100644 --- a/plugins/TopToolBar/src/topbutton.cpp +++ b/plugins/TopToolBar/src/topbutton.cpp @@ -22,7 +22,7 @@ TopButtonInt::~TopButtonInt() mir_free(ptszTooltipUp);
}
-DWORD TopButtonInt::CheckFlags(DWORD Flags)
+uint32_t TopButtonInt::CheckFlags(uint32_t Flags)
{
int res = 0;
if (BitChanged(TTBBF_DISABLED)) {
diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp index f6bb3d5b9e..c4931fb019 100644 --- a/plugins/TrafficCounter/src/TrafficCounter.cpp +++ b/plugins/TrafficCounter/src/TrafficCounter.cpp @@ -215,7 +215,7 @@ int TrafficSend(WPARAM wParam, LPARAM lParam) return 0;
}
-int TrafficCounter_PaintCallbackProc(HWND hWnd, HDC hDC, RECT*, HRGN, DWORD, void*)
+int TrafficCounter_PaintCallbackProc(HWND hWnd, HDC hDC, RECT*, HRGN, uint32_t, void*)
{
return TrafficCounter_Draw(hWnd, hDC);
}
@@ -252,7 +252,7 @@ int PaintTrafficCounterWindow(HWND hwnd, HDC hDC) {
RECT rect, rect2;
BLENDFUNCTION aga = { AC_SRC_OVER, 0, 0xFF, AC_SRC_ALPHA };
- DWORD SummarySession, SummaryTotal;
+ uint32_t SummarySession, SummaryTotal;
uint8_t ClistModernPresent = (GetModuleHandleA("clist_modern.dll") || GetModuleHandleA("clist_modern_dora.dll"))
&& !db_get_b(0, "ModernData", "DisableEngine", 0)
@@ -570,7 +570,7 @@ int PaintTrafficCounterWindow(HWND hwnd, HDC hDC) void ProtocolIsOnLine(int num)
{
- DWORD CurrentTimeMs;
+ uint32_t CurrentTimeMs;
if (ProtoList[num].State) return;
@@ -688,7 +688,7 @@ LRESULT CALLBACK TrafficCounterWndProc_MW(HWND hwnd, UINT msg, WPARAM wParam, LP case TIMER_REDRAW: // ПерериÑовка раз в полÑекунды.
{
- DWORD CurrentTimeMs;
+ uint32_t CurrentTimeMs;
SYSTEMTIME stNow;
SaveSettings(1);
@@ -710,7 +710,7 @@ LRESULT CALLBACK TrafficCounterWndProc_MW(HWND hwnd, UINT msg, WPARAM wParam, LP Stat_CheckStatistics(p);
// ЗдеÑÑŒ на оÑновании ÑтатиÑтики вычиÑлÑÑŽÑ‚ÑÑ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð²Ñех трафиков и времени.
- DWORD Sum1 = 0, Sum2 = 0;
+ uint32_t Sum1 = 0, Sum2 = 0;
// Ð—Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ñ‚ÐµÐºÑƒÑ‰ÐµÐ¹ ÑеÑÑии.
for (int j = p.StartIndex; j < p.NumberOfRecords; j++) {
diff --git a/plugins/TrafficCounter/src/misc.cpp b/plugins/TrafficCounter/src/misc.cpp index 581a812da5..e94229f426 100644 --- a/plugins/TrafficCounter/src/misc.cpp +++ b/plugins/TrafficCounter/src/misc.cpp @@ -118,10 +118,10 @@ Buffer - Ð°Ð´Ñ€ÐµÑ Ñтроки Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи результата; Size - размер буфера.
Возвращаемое значение: требуемый размер буфера.
*/
-size_t GetFormattedTraffic(DWORD Value, uint8_t Unit, wchar_t *Buffer, size_t Size)
+size_t GetFormattedTraffic(uint32_t Value, uint8_t Unit, wchar_t *Buffer, size_t Size)
{
wchar_t Str1[32], szUnit[4] = { ' ', 0 };
- DWORD Divider;
+ uint32_t Divider;
NUMBERFMT nf = { 0, 1, 3, L",", L" ", 0 };
wchar_t *Res; // Промежуточный результат.
@@ -174,7 +174,7 @@ Format: Ñтрока формата; Buffer: Ð°Ð´Ñ€ÐµÑ Ð±ÑƒÑ„ÐµÑ€Ð°, куда Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ Ð¿Ð¾Ð¼ÐµÑ‰Ð°ÐµÑ‚ результат.
Size - размер буфера. */
-size_t GetDurationFormatM(DWORD Duration, wchar_t *Format, wchar_t *Buffer, size_t Size)
+size_t GetDurationFormatM(uint32_t Duration, wchar_t *Format, wchar_t *Buffer, size_t Size)
{
size_t Length;
wchar_t Token[256]; // ÐккумулÑтор.
diff --git a/plugins/TrafficCounter/src/misc.h b/plugins/TrafficCounter/src/misc.h index d75b09415d..5c24ffa8bd 100644 --- a/plugins/TrafficCounter/src/misc.h +++ b/plugins/TrafficCounter/src/misc.h @@ -27,8 +27,8 @@ uint8_t DayOfWeek(uint8_t Day, uint8_t Month, uint16_t Year); Buffer - Ð°Ð´Ñ€ÐµÑ Ñтроки Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи результата;
Size - размер буфера.
Возвращаемое значение: требуемый размер буфера. */
-size_t GetFormattedTraffic(DWORD Value, uint8_t Unit, wchar_t *Buffer, size_t Size);
+size_t GetFormattedTraffic(uint32_t Value, uint8_t Unit, wchar_t *Buffer, size_t Size);
-size_t GetDurationFormatM(DWORD Duration, wchar_t *Format, wchar_t *Buffer, size_t Size);
+size_t GetDurationFormatM(uint32_t Duration, wchar_t *Format, wchar_t *Buffer, size_t Size);
signed short int TimeCompare(SYSTEMTIME st1, SYSTEMTIME st2);
\ No newline at end of file diff --git a/plugins/TrafficCounter/src/opttree.cpp b/plugins/TrafficCounter/src/opttree.cpp index fb9ffe8f91..9acdac62b5 100644 --- a/plugins/TrafficCounter/src/opttree.cpp +++ b/plugins/TrafficCounter/src/opttree.cpp @@ -344,12 +344,12 @@ BOOL OptTree_ProcessMessage(HWND hwnd, UINT msg, WPARAM, LPARAM lparam, BOOL*, return FALSE;
}
-DWORD OptTree_GetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int optionCount, char *szSettingName)
+uint32_t OptTree_GetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int optionCount, char *szSettingName)
{
enum { IMG_GROUP, IMG_CHECK, IMG_NOCHECK, IMG_RCHECK, IMG_NORCHECK, IMG_GRPOPEN, IMG_GRPCLOSED };
HWND hwndTree = GetDlgItem(hwnd, idcTree);
- DWORD result = 0;
+ uint32_t result = 0;
int i;
for (i = 0; i < optionCount; ++i)
{
@@ -367,7 +367,7 @@ DWORD OptTree_GetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int op return result;
}
-void OptTree_SetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int optionCount, DWORD dwOptions, char *szSettingName)
+void OptTree_SetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int optionCount, uint32_t dwOptions, char *szSettingName)
{
enum { IMG_GROUP, IMG_CHECK, IMG_NOCHECK, IMG_RCHECK, IMG_NORCHECK, IMG_GRPOPEN, IMG_GRPCLOSED };
diff --git a/plugins/TrafficCounter/src/opttree.h b/plugins/TrafficCounter/src/opttree.h index 4fde5a2387..c1951678a1 100644 --- a/plugins/TrafficCounter/src/opttree.h +++ b/plugins/TrafficCounter/src/opttree.h @@ -33,15 +33,15 @@ typedef struct { int iconIndex;
wchar_t *szOptionName;
int groupId;
- DWORD dwFlag;
+ uint32_t dwFlag;
HTREEITEM hItem;
char *szSettingName;
} OPTTREE_OPTION;
BOOL OptTree_ProcessMessage(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, BOOL *result, int idcTree, OPTTREE_OPTION *options, int optionCount);
-DWORD OptTree_GetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int optionCount, char *szSettingName);
-void OptTree_SetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int optionCount, DWORD dwOptions, char *szSettingName);
+uint32_t OptTree_GetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int optionCount, char *szSettingName);
+void OptTree_SetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int optionCount, uint32_t dwOptions, char *szSettingName);
void OptTree_Translate(HWND hwndTree);
diff --git a/plugins/TrafficCounter/src/statistics.cpp b/plugins/TrafficCounter/src/statistics.cpp index d3b83a4d2b..f6e739207a 100644 --- a/plugins/TrafficCounter/src/statistics.cpp +++ b/plugins/TrafficCounter/src/statistics.cpp @@ -102,7 +102,7 @@ INT_PTR CALLBACK DlgProcOptStatistics(HWND hwndDlg, UINT msg, WPARAM wParam, LPA break; // WM_INITDIALOG
case WM_COMMAND:
if ((HWND)lParam == hListAccs) {
- DWORD SelItems[16];
+ uint32_t SelItems[16];
uint8_t SelItemsCount;
if (HIWORD(wParam) == LBN_SELCHANGE) {
SelItemsCount = SendMessage(hListAccs, LB_GETSELCOUNT, 0, 0);
@@ -171,7 +171,7 @@ INT_PTR CALLBACK DlgProcOptStatistics(HWND hwndDlg, UINT msg, WPARAM wParam, LPA {
NMLVDISPINFO* pdi = (NMLVDISPINFO*)lParam;
SYSTEMTIME st = { 0 };
- DWORD Index, Value;
+ uint32_t Index, Value;
double vartime;
wchar_t szBufW[64];
uint8_t EldestAcc;
@@ -239,7 +239,7 @@ INT_PTR CALLBACK DlgProcOptStatistics(HWND hwndDlg, UINT msg, WPARAM wParam, LPA case NM_CLICK:
case LVN_ITEMCHANGED:
{
- DWORD j = -1, dwTotalIncoming = 0, dwTotalOutgoing = 0;
+ uint32_t j = -1, dwTotalIncoming = 0, dwTotalOutgoing = 0;
int i = SendDlgItemMessage(hwndDlg, IDC_LIST_DATA, LVM_GETSELECTEDCOUNT, 0, 0);
for (; i--;) {
@@ -311,7 +311,7 @@ void Stat_ReadFile(PROTOLIST &p) if (Size.QuadPart != 0) // ЕÑли файл Ñо ÑтатиÑтикой ÑущеÑтвует и имеет ненулевой размер...
{
// ...то читаем ÑтатиÑтику из файла
- p.NumberOfRecords = DWORD(Size.QuadPart / sizeof(HOURLYSTATS));
+ p.NumberOfRecords = uint32_t(Size.QuadPart / sizeof(HOURLYSTATS));
p.AllStatistics = (HOURLYSTATS*)mir_alloc(sizeof(HOURLYSTATS)*p.NumberOfRecords);
ReadFile(p.hFile, &p.AllStatistics[0], sizeof(HOURLYSTATS)*p.NumberOfRecords, &BytesRead, nullptr);
if (!BytesRead) {
@@ -336,7 +336,7 @@ void Stat_ReadFile(PROTOLIST &p) Ðргументы: hwndDialog - Ñ…Ñндл окна диалога. */
void Stat_Show(HWND hwndDialog)
{
- DWORD MaxRecords;
+ uint32_t MaxRecords;
// Ðужно узнать количеÑтво запиÑей.
MaxRecords = Stat_GetRecordsNumber(Stat_GetEldestAcc(Stat_SelAcc), unOptions.Stat_Tab);
@@ -346,7 +346,7 @@ void Stat_Show(HWND hwndDialog) SendDlgItemMessage(hwndDialog, IDC_LIST_DATA, LVM_ENSUREVISIBLE, (WPARAM)(MaxRecords - 1), 0);
}
-void Stat_UpdateTotalTraffic(HWND hwndDialog, DWORD Incoming, DWORD Outgoing)
+void Stat_UpdateTotalTraffic(HWND hwndDialog, uint32_t Incoming, uint32_t Outgoing)
{
wchar_t tmp[32];
@@ -415,7 +415,7 @@ void Stat_CheckStatistics(PROTOLIST &p) // ПоÑледнÑÑ Ð·Ð°Ð¿Ð¸ÑÑŒ из ÑтатиÑтики понадобитÑÑ Ð´Ð»Ñ Ð²Ñ‹Ñ‡Ð¸ÑÐ»ÐµÐ½Ð¸Ñ Ð½Ð¾Ð²Ñ‹Ñ… запиÑей, поÑтому копируем её (кроме трафика и времени).
memcpy(&htTmp, &p.AllStatistics[p.NumberOfRecords - 1],
- sizeof(HOURLYSTATS) - 2 * sizeof(DWORD) - sizeof(uint16_t));
+ sizeof(HOURLYSTATS) - 2 * sizeof(uint32_t) - sizeof(uint16_t));
// Счётчик времени каждый Ñ‡Ð°Ñ Ð´Ð¾Ð»Ð¶ÐµÐ½ начинать Ñчитать Ñ Ð½ÑƒÐ»Ñ.
p.Total.TimeAtStart = GetTickCount() - stNow.wMilliseconds;
@@ -453,7 +453,7 @@ void Stat_CheckStatistics(PROTOLIST &p) ItemNumber - номер Ñтроки в ListView (номер периода).
stReq - дата, ÑоответÑÑ‚Ð²ÑƒÑŽÑ‰Ð°Ñ Ð²Ñ‹Ñ‡Ð¸Ñленному индекÑу.
*/
-DWORD Stat_GetStartIndex(uint8_t AccNum, uint8_t Interval, int ItemNumber, SYSTEMTIME *stReq)
+uint32_t Stat_GetStartIndex(uint8_t AccNum, uint8_t Interval, int ItemNumber, SYSTEMTIME *stReq)
{
int Left, Right, Probe; // Границы интервала Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка (индекÑÑ‹ ÑтатиÑтики).
SYSTEMTIME stProbe = { 0 }; // Ð’Ñ€ÐµÐ¼Ñ Ñ‚Ñ‹ÐºÐ°.
@@ -529,7 +529,7 @@ DWORD Stat_GetStartIndex(uint8_t AccNum, uint8_t Interval, int ItemNumber, SYSTE дата которой ÑоответÑтвует началу ÑтатиÑтики указанного аккаунта. */
void Stat_SetAccShift(uint8_t AccNum, uint8_t EldestAccount)
{
- DWORD Left, Right, Probe = 0; // Границы интервала Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка (индекÑÑ‹ ÑтатиÑтики).
+ uint32_t Left, Right, Probe = 0; // Границы интервала Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка (индекÑÑ‹ ÑтатиÑтики).
SYSTEMTIME stReq = { 0 }, stProbe;
signed short int d = 1;
@@ -571,9 +571,9 @@ Interval - выбранный интервал; ItemNum - номер Ñтроки в ListVew;
SubitemNum - номер колонки, определÑет вид информации. */
-DWORD Stat_GetItemValue(uint16_t SelectedAccs, uint8_t Interval, DWORD ItemNum, uint8_t SubItemNum)
+uint32_t Stat_GetItemValue(uint16_t SelectedAccs, uint8_t Interval, uint32_t ItemNum, uint8_t SubItemNum)
{
- DWORD Result = 0;
+ uint32_t Result = 0;
SYSTEMTIME st = { 0 };
int Index, IndexP, i;
signed long int IndexM;
@@ -644,9 +644,9 @@ DWORD Stat_GetItemValue(uint16_t SelectedAccs, uint8_t Interval, DWORD ItemNum, /* Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ð²Ð¾Ð·Ð²Ñ€Ð°Ñ‰Ð°ÐµÑ‚ количеÑтво запиÑей в ÑтатиÑтике длÑ
заданного аккаунта и заданного интервала. */
-DWORD Stat_GetRecordsNumber(uint8_t AccNum, uint8_t Interval)
+uint32_t Stat_GetRecordsNumber(uint8_t AccNum, uint8_t Interval)
{
- DWORD Result, i;
+ uint32_t Result, i;
// Ðужно узнать количеÑтво запиÑей.
switch (Interval) {
diff --git a/plugins/TrafficCounter/src/statistics.h b/plugins/TrafficCounter/src/statistics.h index 74916e4237..8bfcebae19 100644 --- a/plugins/TrafficCounter/src/statistics.h +++ b/plugins/TrafficCounter/src/statistics.h @@ -34,12 +34,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. INT_PTR CALLBACK DlgProcOptStatistics(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
void Stat_ReadFile(PROTOLIST &p);
void Stat_Show(HWND);
-void Stat_UpdateTotalTraffic(HWND, DWORD, DWORD);
+void Stat_UpdateTotalTraffic(HWND, uint32_t, uint32_t);
void Stat_CheckStatistics(PROTOLIST &p);
-DWORD Stat_GetStartIndex(uint8_t AccNum, uint8_t Interval, int ItemNumber, SYSTEMTIME *st);
+uint32_t Stat_GetStartIndex(uint8_t AccNum, uint8_t Interval, int ItemNumber, SYSTEMTIME *st);
void Stat_SetAccShift(uint8_t AccNum, uint8_t EldestAccount);
-DWORD Stat_GetItemValue(uint16_t SelectedAccs, uint8_t Interval, DWORD ItemNum, uint8_t SubitemNum);
-DWORD Stat_GetRecordsNumber(uint8_t AccNum, uint8_t Interval);
+uint32_t Stat_GetItemValue(uint16_t SelectedAccs, uint8_t Interval, uint32_t ItemNum, uint8_t SubitemNum);
+uint32_t Stat_GetRecordsNumber(uint8_t AccNum, uint8_t Interval);
uint8_t Stat_GetEldestAcc(uint16_t SelectedAccs);
#endif // _statistics_h
\ No newline at end of file diff --git a/plugins/TrafficCounter/src/stdafx.h b/plugins/TrafficCounter/src/stdafx.h index d180fecf6c..9a60ab8008 100644 --- a/plugins/TrafficCounter/src/stdafx.h +++ b/plugins/TrafficCounter/src/stdafx.h @@ -64,15 +64,15 @@ typedef struct {
uint8_t Hour, Day, Month;
uint16_t Year;
- DWORD Incoming, Outgoing;
+ uint32_t Incoming, Outgoing;
uint16_t Time;
} HOURLYSTATS;
#pragma pack(pop)
typedef struct tagTimer
{
- DWORD TimeAtStart; // Ð’Ñ€ÐµÐ¼Ñ Ð² момент запуÑка таймера - в миллиÑекундах.
- DWORD Timer; // КоличеÑтво Ñекунд Ñо времени запуÑка таймера.
+ uint32_t TimeAtStart; // Ð’Ñ€ÐµÐ¼Ñ Ð² момент запуÑка таймера - в миллиÑекундах.
+ uint32_t Timer; // КоличеÑтво Ñекунд Ñо времени запуÑка таймера.
} TIMER;
struct PROTOLIST
@@ -82,7 +82,7 @@ struct PROTOLIST TIMER Session; // Таймер текущей ÑеÑÑии (протокол в онлайне).
TIMER Total; // Таймер общий.
- DWORD TotalRecvTraffic, // Общий трафик протокола (за выбранный период)
+ uint32_t TotalRecvTraffic, // Общий трафик протокола (за выбранный период)
TotalSentTraffic,
CurrentRecvTraffic, // Текущий трафик протокола (за ÑеÑÑию)
CurrentSentTraffic;
@@ -123,7 +123,7 @@ struct PROTOLIST //---------------------------------------------------------------------------------------------
typedef union
{
- DWORD Flags;
+ uint32_t Flags;
struct
{
unsigned int NotifyBySize:1; //0
diff --git a/plugins/TrafficCounter/src/vars.cpp b/plugins/TrafficCounter/src/vars.cpp index f0e52b825d..68d4467147 100644 --- a/plugins/TrafficCounter/src/vars.cpp +++ b/plugins/TrafficCounter/src/vars.cpp @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. static wchar_t* GetTraffic(ARGUMENTSINFO *ai)
{
- DWORD tmp, tmpsn = 0, tmprn = 0, tmpst = 0, tmprt = 0;
+ uint32_t tmp, tmpsn = 0, tmprn = 0, tmpst = 0, tmprt = 0;
uint8_t ed;
if (ai->argc != 5) return nullptr;
@@ -105,7 +105,7 @@ static wchar_t* GetTraffic(ARGUMENTSINFO *ai) static wchar_t* GetTime(ARGUMENTSINFO *ai)
{
uint8_t ed, flag;
- DWORD Duration = 0;
+ uint32_t Duration = 0;
if (ai->argc != 4) return nullptr;
diff --git a/plugins/TranslitSwitcher/src/Layoutproc.cpp b/plugins/TranslitSwitcher/src/Layoutproc.cpp index 04a6c2f934..5ac0ba1115 100644 --- a/plugins/TranslitSwitcher/src/Layoutproc.cpp +++ b/plugins/TranslitSwitcher/src/Layoutproc.cpp @@ -45,7 +45,7 @@ static DWORD CALLBACK StreamOutCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG return 0;
}
-wchar_t* Message_GetFromStream(HWND hwndRtf, DWORD dwPassedFlags)
+wchar_t* Message_GetFromStream(HWND hwndRtf, uint32_t dwPassedFlags)
{
if (hwndRtf == nullptr)
return nullptr;
@@ -415,7 +415,7 @@ void SwitchLayout(bool lastword) keys[VK_CONTROL] = (HIBYTE(vks) & 2) ? 0xFF : 0x00; // ctrl
keys[VK_MENU] = (HIBYTE(vks) & 4) ? 0xFF : 0x00; // alt
- if (!isItSmiley(DWORD(i))) {
+ if (!isItSmiley(uint32_t(i))) {
wchar_t tchr;
if (ToUnicodeEx(LOBYTE(vks), 0, keys, &tchr, 1, 0, GetKeyboardLayout(dwThreadID)) == 1)
buf[i] = tchr;
@@ -438,7 +438,7 @@ void SwitchLayout(bool lastword) uint8_t keys[256] = { 0 };
HKL hkl = GetKeyboardLayout(dwThreadID);
- DWORD dwStart, dwEnd, dwFlags = SF_TEXT | SF_UNICODE;
+ uint32_t dwStart, dwEnd, dwFlags = SF_TEXT | SF_UNICODE;
SendMessage(hwnd2, EM_GETSEL, (WPARAM)&dwStart, (LPARAM)&dwEnd);
bool somethingIsSelected = (dwStart != dwEnd);
if (somethingIsSelected)
@@ -516,7 +516,7 @@ void TranslitLayout(bool lastword) if (mir_wstrcmpi(szClassName, L"RichEdit50W") != 0)
return;
- DWORD dwStart, dwEnd, dwFlags = SF_TEXT | SF_UNICODE;
+ uint32_t dwStart, dwEnd, dwFlags = SF_TEXT | SF_UNICODE;
SendMessage(hwnd2, EM_GETSEL, (WPARAM)&dwStart, (LPARAM)&dwEnd);
bool somethingIsSelected = (dwStart != dwEnd);
if (somethingIsSelected)
@@ -584,7 +584,7 @@ void InvertCase(bool lastword) if (mir_wstrcmpi(szClassName, L"RichEdit50W") != 0)
return;
- DWORD dwStart, dwEnd, dwFlags = SF_TEXT | SF_UNICODE;
+ uint32_t dwStart, dwEnd, dwFlags = SF_TEXT | SF_UNICODE;
SendMessage(hwnd2, EM_GETSEL, (WPARAM)&dwStart, (LPARAM)&dwEnd);
bool somethingIsSelected = (dwStart != dwEnd);
if (somethingIsSelected)
diff --git a/plugins/UserInfoEx/src/Flags/svc_flags.cpp b/plugins/UserInfoEx/src/Flags/svc_flags.cpp index 8b694f83a0..e7054db2cc 100644 --- a/plugins/UserInfoEx/src/Flags/svc_flags.cpp +++ b/plugins/UserInfoEx/src/Flags/svc_flags.cpp @@ -205,7 +205,7 @@ void SvcFlagsLoadModule() HookEvent(ME_SKIN_ICONSCHANGED, OnStatusIconsChanged);
// get local langID for descIcon (try to use user local Flag as icon)
- DWORD langid = 0;
+ uint32_t langid = 0;
if (!CallService(MS_UTILS_GETCOUNTRYBYNUMBER, langid, 0))
langid = 1;
diff --git a/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp b/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp index 8dbf01f9ec..6695e60fe9 100644 --- a/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp +++ b/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp @@ -185,7 +185,7 @@ FIBITMAP *LoadResource(UINT ID, LPTSTR lpType) FIBITMAP *dib = nullptr;
if (lpType) {
HRSRC hResInfo = FindResource(g_plugin.getInst(), MAKEINTRESOURCE(ID), lpType);
- DWORD ResSize = SizeofResource(g_plugin.getInst(), hResInfo);
+ uint32_t ResSize = SizeofResource(g_plugin.getInst(), hResInfo);
HGLOBAL hRes = LoadResource(g_plugin.getInst(), hResInfo);
uint8_t *buffer = (uint8_t *)LockResource(hRes);
if (buffer) {
diff --git a/plugins/UserInfoEx/src/classMAnnivDate.cpp b/plugins/UserInfoEx/src/classMAnnivDate.cpp index cd3e87ab53..be8f50995f 100644 --- a/plugins/UserInfoEx/src/classMAnnivDate.cpp +++ b/plugins/UserInfoEx/src/classMAnnivDate.cpp @@ -146,13 +146,13 @@ uint8_t MAnnivDate::IsEqual(const SYSTEMTIME &st) const /**
* name: DateStamp
* class: MAnnivDate
- * desc: return the current date encoded as an DWORD
+ * desc: return the current date encoded as an uint32_t
* param: nothing
- * return: DWORD encoded date
+ * return: uint32_t encoded date
**/
-DWORD MAnnivDate::DateStamp() const
+uint32_t MAnnivDate::DateStamp() const
{
- DWORD dwStamp;
+ uint32_t dwStamp;
if (!IsValid()) return 0;
@@ -169,7 +169,7 @@ DWORD MAnnivDate::DateStamp() const * param: dwStamp - the dword encoded date
* return: nothing
**/
-void MAnnivDate::DateStamp(const DWORD dwStamp)
+void MAnnivDate::DateStamp(const uint32_t dwStamp)
{
Day((const uint16_t)((dwStamp & 0xFF000000) >> 24));
Month((const uint16_t)((dwStamp & 0x00FF0000) >> 16));
@@ -411,7 +411,7 @@ int MAnnivDate::DBDeleteDate(MCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, /**
* name: DBGetDateStamp
* class: MAnnivDate
- * desc: Read a datestamp from database. A datestamp is an DWORD of the form <ddmmyyyy>.
+ * desc: Read a datestamp from database. A datestamp is an uint32_t of the form <ddmmyyyy>.
* param: hContact - handle to a contact to read the datestamp from
* pszModule - module to read the datestamp from
* pszSetting - key used to identify the datestamp
@@ -434,7 +434,7 @@ int MAnnivDate::DBGetDateStamp(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSe /**
* name: DBWriteDateStamp
* class: MAnnivDate
- * desc: Write a datestamp to database. A datestamp is an DWORD of the form <ddmmyyyy>.
+ * desc: Write a datestamp to database. A datestamp is an uint32_t of the form <ddmmyyyy>.
* param: hContact - handle to a contact to write the datestamp to
* pszModule - module to write the datestamp to
* pszSetting - key used to save the datestamp
@@ -445,7 +445,7 @@ int MAnnivDate::DBWriteDateStamp(MCONTACT hContact, LPCSTR pszModule, LPCSTR psz if (hContact == INVALID_CONTACT_ID || pszModule == nullptr || *pszModule == 0 || pszSetting == nullptr || *pszSetting == 0)
return 1;
- DWORD dwStamp = DateStamp();
+ uint32_t dwStamp = DateStamp();
return (dwStamp == 0) ? 1 : db_set_dw(hContact, pszModule, pszSetting, dwStamp);
}
diff --git a/plugins/UserInfoEx/src/classMAnnivDate.h b/plugins/UserInfoEx/src/classMAnnivDate.h index b11713e235..bb4cce0dee 100644 --- a/plugins/UserInfoEx/src/classMAnnivDate.h +++ b/plugins/UserInfoEx/src/classMAnnivDate.h @@ -69,8 +69,8 @@ public: __inline uint16_t Id() const { return _wID; };
__inline void Id(uint16_t wId) { if (_wID == ANID_NONE) _wID = wId; };
- DWORD DateStamp() const;
- void DateStamp(const DWORD dwStamp);
+ uint32_t DateStamp() const;
+ void DateStamp(const uint32_t dwStamp);
// basic checks
__inline uint8_t IsValid() const;
diff --git a/plugins/UserInfoEx/src/classMTime.cpp b/plugins/UserInfoEx/src/classMTime.cpp index e78d76192f..82394ad08a 100644 --- a/plugins/UserInfoEx/src/classMTime.cpp +++ b/plugins/UserInfoEx/src/classMTime.cpp @@ -56,7 +56,7 @@ MTime::MTime(LARGE_INTEGER &li, bool bIsLocal) Set(li, bIsLocal);
}
-MTime::MTime(DWORD dwStamp)
+MTime::MTime(uint32_t dwStamp)
{
ZeroDate();
FromStampAsUTC(dwStamp);
@@ -93,7 +93,7 @@ uint8_t MTime::IsLeapYear() const return (!(((_SysTime.wYear) % 4 != 0) || (((_SysTime.wYear) % 100 == 0) && ((_SysTime.wYear) % 400 != 0))));
}
-LONG MTime::Compare(const DWORD dwTimeStamp) const
+LONG MTime::Compare(const uint32_t dwTimeStamp) const
{
return (LONG)(TimeStamp() - dwTimeStamp);
}
@@ -266,7 +266,7 @@ FILETIME MTime::FileTime() const return ftFileTime;
}
-DWORD MTime::TimeStamp() const
+uint32_t MTime::TimeStamp() const
{
LARGE_INTEGER li;
@@ -284,7 +284,7 @@ DWORD MTime::TimeStamp() const if (li.QuadPart < 0)
return 0;
- return (DWORD)li.QuadPart;
+ return (uint32_t)li.QuadPart;
}
uint16_t MTime::DaysInMonth(const uint16_t &wMonth) const
@@ -392,14 +392,14 @@ uint16_t MTime::DateFormatLong(LPTSTR ptszTimeFormat, uint16_t cchTimeFormat) * set class value
*********************************************/
-void MTime::FromStampAsUTC(const DWORD dwTimeStamp)
+void MTime::FromStampAsUTC(const uint32_t dwTimeStamp)
{
LARGE_INTEGER li;
li.QuadPart = (dwTimeStamp + 11644473600i64) * 10000000i64;
Set(li, FALSE);
}
-void MTime::FromStampAsLocal(const DWORD dwTimeStamp)
+void MTime::FromStampAsLocal(const uint32_t dwTimeStamp)
{
FromStampAsUTC(dwTimeStamp);
UTCToLocal();
@@ -463,7 +463,7 @@ int MTime::DBGetStamp (MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting) return 1;
}
- DWORD dwTimeStamp = db_get_dw(hContact, pszModule, pszSetting, 0);
+ uint32_t dwTimeStamp = db_get_dw(hContact, pszModule, pszSetting, 0);
if (dwTimeStamp == 0) {
ZeroDate();
return 1;
diff --git a/plugins/UserInfoEx/src/classMTime.h b/plugins/UserInfoEx/src/classMTime.h index eaf5508130..508de1c34a 100644 --- a/plugins/UserInfoEx/src/classMTime.h +++ b/plugins/UserInfoEx/src/classMTime.h @@ -33,7 +33,7 @@ public: MTime(SYSTEMTIME &st, bool bIsLocal);
MTime(FILETIME &ft, bool bIsLocal);
MTime(LARGE_INTEGER &li, bool bIsLocal);
- MTime(DWORD dwStamp);
+ MTime(uint32_t dwStamp);
MTime(const MTime& mtime);
// checks
@@ -45,12 +45,12 @@ public: LONG Compare(SYSTEMTIME st) const;
LONG Compare(const FILETIME &ft) const;
LONG Compare(const MTime &mt) const;
- LONG Compare(const DWORD dwTimeStamp) const;
+ LONG Compare(const uint32_t dwTimeStamp) const;
// get value from class
LARGE_INTEGER LargeInt() const;
FILETIME FileTime() const;
- DWORD TimeStamp() const;
+ uint32_t TimeStamp() const;
SYSTEMTIME SystemTime() const { return _SysTime; }
uint16_t DaysInMonth(const uint16_t &wMonth) const;
@@ -81,8 +81,8 @@ public: // set value to class
void ZeroDate();
- void FromStampAsUTC(const DWORD dwTimeStamp);
- void FromStampAsLocal(const DWORD dwTimeStamp);
+ void FromStampAsUTC(const uint32_t dwTimeStamp);
+ void FromStampAsLocal(const uint32_t dwTimeStamp);
void Set(const FILETIME &ftFileTime, bool bIsLocal);
void Set(LARGE_INTEGER liFileTime, bool bIsLocal);
void Set(const SYSTEMTIME &st, bool bIsLocal);
@@ -105,7 +105,7 @@ public: int DBWriteStamp(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
// operatoren
- void operator=(DWORD& dwTimeStamp) { FromStampAsUTC(dwTimeStamp); };
+ void operator=(uint32_t& dwTimeStamp) { FromStampAsUTC(dwTimeStamp); };
void operator=(FILETIME &ftFileTime) { Set(ftFileTime, FALSE); };
void operator=(LARGE_INTEGER &liFileTime) { Set(liFileTime, FALSE); };
void operator=(SYSTEMTIME &st) { Set(st, FALSE); };
diff --git a/plugins/UserInfoEx/src/classPsTreeItem.cpp b/plugins/UserInfoEx/src/classPsTreeItem.cpp index 4a25156767..12d3ceef79 100644 --- a/plugins/UserInfoEx/src/classPsTreeItem.cpp +++ b/plugins/UserInfoEx/src/classPsTreeItem.cpp @@ -177,7 +177,7 @@ int CPsTreeItem::Name(LPTSTR ptszTitle, const uint8_t bIsUnicode) if (_pszName)
{
// convert disallowed characters
- for (DWORD i = 0; _pszName[i] != 0; i++)
+ for (uint32_t i = 0; _pszName[i] != 0; i++)
{
switch (_pszName[i])
{
@@ -467,7 +467,7 @@ int CPsTreeItem::Create(CPsHdr* pPsh, OPTIONSDIALOGPAGE *odp) * dwFlags - tells what to save
* return: handle to new (moved) treeitem if successful or NULL otherwise
**/
-uint16_t CPsTreeItem::DBSaveItemState(LPCSTR pszGroup, int iItemPosition, UINT iState, DWORD dwFlags)
+uint16_t CPsTreeItem::DBSaveItemState(LPCSTR pszGroup, int iItemPosition, UINT iState, uint32_t dwFlags)
{
uint16_t numErrors = 0;
diff --git a/plugins/UserInfoEx/src/ctrl_base.h b/plugins/UserInfoEx/src/ctrl_base.h index 5cdab6cdb1..d98ffb1be2 100644 --- a/plugins/UserInfoEx/src/ctrl_base.h +++ b/plugins/UserInfoEx/src/ctrl_base.h @@ -74,7 +74,7 @@ union CCtrlFlags class CBaseCtrl
{
public:
- DWORD _cbSize;
+ uint32_t _cbSize;
friend class CCtrlList;
diff --git a/plugins/UserInfoEx/src/ctrl_button.cpp b/plugins/UserInfoEx/src/ctrl_button.cpp index cffd91bd88..2962b7fd76 100644 --- a/plugins/UserInfoEx/src/ctrl_button.cpp +++ b/plugins/UserInfoEx/src/ctrl_button.cpp @@ -35,7 +35,7 @@ typedef struct TMBCtrl{ HBITMAP hBitmap;
HFONT hFont; // font
- DWORD dwStyle;
+ uint32_t dwStyle;
uint8_t bFocus;
int stateId; // button state
diff --git a/plugins/UserInfoEx/src/ctrl_combo.cpp b/plugins/UserInfoEx/src/ctrl_combo.cpp index e2d7bdeaf1..81d82220f0 100644 --- a/plugins/UserInfoEx/src/ctrl_combo.cpp +++ b/plugins/UserInfoEx/src/ctrl_combo.cpp @@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * @param hDlg - HWND of the owning propertysheet page
* @param idCtrl - the ID of the control to associate with this class's instance
* @param pszSetting - the database setting to be handled by this class
- * @param bDBDataType - datatype of of the associated database setting (uint16_t, DWORD, ...)
+ * @param bDBDataType - datatype of of the associated database setting (uint16_t, uint32_t, ...)
* @param pList - pointer to a LPIDSTRLIST list, which holds the items to insert into the combobox.
* @param nListCount - number of items in the list
*
@@ -45,7 +45,7 @@ CBaseCtrl* CCombo::CreateObj(HWND hDlg, uint16_t idCtrl, LPCSTR pszSetting, uint * @param hDlg - HWND of the owning propertysheet page
* @param idCtrl - the ID of the control to associate with this class's instance
* @param pszSetting - the database setting to be handled by this class
- * @param bDBDataType - datatype of of the associated database setting (uint16_t, DWORD, ...)
+ * @param bDBDataType - datatype of of the associated database setting (uint16_t, uint32_t, ...)
* @param pList - pointer to a LPIDSTRLIST list, which holds the items to insert into the combobox.
* @param nListCount - number of items in the list
*
diff --git a/plugins/UserInfoEx/src/ctrl_contact.cpp b/plugins/UserInfoEx/src/ctrl_contact.cpp index df0651487d..66c153a110 100644 --- a/plugins/UserInfoEx/src/ctrl_contact.cpp +++ b/plugins/UserInfoEx/src/ctrl_contact.cpp @@ -34,7 +34,7 @@ typedef struct TCbExItem {
uint16_t wMask;
uint16_t wFlags;
- DWORD dwID;
+ uint32_t dwID;
wchar_t szCat[MAX_CAT];
LPTSTR pszVal;
int iIcon;
diff --git a/plugins/UserInfoEx/src/ctrl_contact.h b/plugins/UserInfoEx/src/ctrl_contact.h index 1313428b6a..f934fe5054 100644 --- a/plugins/UserInfoEx/src/ctrl_contact.h +++ b/plugins/UserInfoEx/src/ctrl_contact.h @@ -59,7 +59,7 @@ struct CBEXITEM uint16_t wMask; // determines which element of this structure is valid
uint16_t wFlags; // standard control flags
int iItem; // position of the item in the data array
- DWORD dwID; // unique number for each setting read from db to identify it, new entries have dwID = 0
+ uint32_t dwID; // unique number for each setting read from db to identify it, new entries have dwID = 0
LPTSTR pszCat; // pointer to a descriptive category string to set or retrieve for the data entry
uint16_t ccCat;
LPTSTR pszVal;
diff --git a/plugins/UserInfoEx/src/ctrl_edit.cpp b/plugins/UserInfoEx/src/ctrl_edit.cpp index 12537bbfcd..fb3b5d9e83 100644 --- a/plugins/UserInfoEx/src/ctrl_edit.cpp +++ b/plugins/UserInfoEx/src/ctrl_edit.cpp @@ -168,7 +168,7 @@ void CEditCtrl::OnApply(MCONTACT hContact, LPCSTR pszProto) const char* pszModule = hContact ? _pszModule : pszProto; if (_Flags.B.hasCustom || !hContact) { - DWORD cch = GetWindowTextLength(_hwnd); + uint32_t cch = GetWindowTextLength(_hwnd); if (cch > 0) { LPTSTR val = (LPTSTR)mir_alloc((cch + 1) * sizeof(wchar_t)); @@ -187,7 +187,7 @@ void CEditCtrl::OnApply(MCONTACT hContact, LPCSTR pszProto) break; case DBVT_DWORD: - dbv.dVal = (DWORD)wcstol(val, nullptr, 10); + dbv.dVal = (uint32_t)wcstol(val, nullptr, 10); break; case DBVT_WCHAR: @@ -235,7 +235,7 @@ void CEditCtrl::OnApply(MCONTACT hContact, LPCSTR pszProto) void CEditCtrl::OnChangedByUser(uint16_t wChangedMsg) { if ((wChangedMsg == EN_UPDATE) || (wChangedMsg == EN_CHANGE)) { - DWORD cch = GetWindowTextLength(_hwnd); + uint32_t cch = GetWindowTextLength(_hwnd); _Flags.B.hasChanged = mir_wstrlen(_pszValue) != cch; _Flags.B.hasCustom = (cch > 0); diff --git a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp index de64451ba9..25b15c6206 100644 --- a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp +++ b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp @@ -704,7 +704,7 @@ class CAnnivList {
MAnnivDate ad;
int i = 0;
- DWORD age = 0;
+ uint32_t age = 0;
int wDaysBefore = g_plugin.getWord(SET_REMIND_OFFSET, DEFVAL_REMIND_OFFSET);
int numMale = 0;
int numFemale = 0;
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.h b/plugins/UserInfoEx/src/dlg_propsheet.h index dec1525be7..d8aea78665 100644 --- a/plugins/UserInfoEx/src/dlg_propsheet.h +++ b/plugins/UserInfoEx/src/dlg_propsheet.h @@ -37,7 +37,7 @@ class CPsTreeItem HINSTANCE _hInst; // instance handle of the owning plugin dll
DLGPROC _pfnDlgProc; // dialog procedure for the property page
HWND _hWnd; // window handle for the property page if shown jet
- DWORD _dwFlags; // some flags
+ uint32_t _dwFlags; // some flags
int _iPosition; // initiating position if custom (used for sorting)
LPARAM _initParam;
MCONTACT _hContact; // contact the page is accociated with (may be a meta subcontact if details dialog is shown for a meta contact)
@@ -82,10 +82,10 @@ public: __inline int Parent() const { return _iParent; };
__inline void Parent(const int iParent) { _iParent = iParent; };
- __inline DWORD Flags() const { return _dwFlags; };
- __inline void Flags(DWORD dwFlags) { _dwFlags = dwFlags; };
- __inline void AddFlags(DWORD dwFlags) { _dwFlags |= dwFlags; };
- __inline void RemoveFlags(DWORD dwFlags) { _dwFlags &= ~dwFlags; };
+ __inline uint32_t Flags() const { return _dwFlags; };
+ __inline void Flags(uint32_t dwFlags) { _dwFlags = dwFlags; };
+ __inline void AddFlags(uint32_t dwFlags) { _dwFlags |= dwFlags; };
+ __inline void RemoveFlags(uint32_t dwFlags) { _dwFlags &= ~dwFlags; };
uint8_t HasName(const LPCSTR pszName) const;
@@ -96,7 +96,7 @@ public: LPSTR ParentItemName();
HWND CreateWnd(LPPS pPs);
- uint16_t DBSaveItemState(LPCSTR pszGroup, int iItemPosition, UINT iState, DWORD dwFlags);
+ uint16_t DBSaveItemState(LPCSTR pszGroup, int iItemPosition, UINT iState, uint32_t dwFlags);
// notification handlers
void OnInfoChanged();
@@ -139,7 +139,7 @@ class CPsTree HWND _hWndTree = nullptr;
HIMAGELIST _hImages = nullptr;
int _curItem = -1;
- DWORD _dwFlags = 0;
+ uint32_t _dwFlags = 0;
HWND _hLabelEdit = nullptr;
HTREEITEM _hDragItem = nullptr;
bool _isDragging = false;
@@ -156,10 +156,10 @@ public: __inline bool IsDragging() const { return _isDragging; }
__inline HTREEITEM DragItem() const { return _hDragItem; }
- __inline DWORD Flags() const { return _dwFlags; }
- __inline void Flags(DWORD dwFlags) { _dwFlags = dwFlags; }
- __inline void AddFlags(DWORD dwFlags) { _dwFlags |= dwFlags; }
- __inline void RemoveFlags(DWORD dwFlags) { _dwFlags &= ~dwFlags; }
+ __inline uint32_t Flags() const { return _dwFlags; }
+ __inline void Flags(uint32_t dwFlags) { _dwFlags = dwFlags; }
+ __inline void AddFlags(uint32_t dwFlags) { _dwFlags |= dwFlags; }
+ __inline void RemoveFlags(uint32_t dwFlags) { _dwFlags &= ~dwFlags; }
__inline int NumItems() const { return _pages.getCount(); }
__inline HWND Window() const { return _hWndTree; }
@@ -224,7 +224,7 @@ struct CPsHdr LPCSTR _pszPrefix = 0; // name prefix for treeitem settings
CPsTreeItem** _pPages = 0; // the pages
uint16_t _numPages = 0; // number of pages
- DWORD _dwFlags = 0; // some option flags
+ uint32_t _dwFlags = 0; // some option flags
HIMAGELIST _hImages = 0; // the imagelist with all tree item icons
LIST<wchar_t> _ignore; // list of skipped items when adding metasubcontacts pages
int _nSubContact = 0; // index of a current subcontact
@@ -258,7 +258,7 @@ struct TPropSheet RECT rcDisplay;
uint8_t updateAnimFrame;
CHAR szUpdating[64];
- DWORD dwFlags;
+ uint32_t dwFlags;
TAckInfo *infosUpdated;
int nSubContacts;
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp index 429b4225ff..50903e7681 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp +++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp @@ -319,7 +319,7 @@ void CExImContactBase::toIni(FILE *file, int modCount) uint8_t CExImContactBase::compareUID(DBVARIANT *dbv) { - DWORD hash = 0; + uint32_t hash = 0; switch (dbv->type) { case DBVT_BYTE: if (dbv->bVal == _dbvUID.bVal) { diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.h b/plugins/UserInfoEx/src/ex_import/classExImContactBase.h index 741182c913..ad173a1402 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.h +++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.h @@ -33,7 +33,7 @@ protected: LPSTR _pszProto;
LPSTR _pszProtoOld;
LPSTR _pszUIDKey;
- DWORD _dbvUIDHash;
+ uint32_t _dbvUIDHash;
DBVARIANT _dbvUID;
MCONTACT _hContact;
uint8_t _isNewContact; // is this contact a new one?
@@ -55,8 +55,8 @@ public: __inline void uidk(LPCSTR val) { _pszUIDKey = val ? mir_strdup(val) : nullptr; }
__inline void uid(uint8_t val) { _dbvUID.type = DBVT_BYTE; _dbvUID.bVal = val; }
__inline void uid(uint16_t val) { _dbvUID.type = DBVT_WORD; _dbvUID.wVal = val; }
- __inline void uid(DWORD val) { _dbvUID.type = DBVT_DWORD; _dbvUID.dVal = val; }
- __inline void uidn(uint8_t *val, DWORD len) { _dbvUID.type = DBVT_BLOB; _dbvUID.pbVal = val; _dbvUID.cpbVal = (uint16_t)len; }
+ __inline void uid(uint32_t val) { _dbvUID.type = DBVT_DWORD; _dbvUID.dVal = val; }
+ __inline void uidn(uint8_t *val, uint32_t len) { _dbvUID.type = DBVT_BLOB; _dbvUID.pbVal = val; _dbvUID.cpbVal = (uint16_t)len; }
__inline void uida(LPCSTR val)
{
_dbvUID.type = (_dbvUID.pszVal = mir_utf8decodeA(val)) ? DBVT_ASCIIZ : DBVT_DELETED;
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp index 7b31b83f26..6827856ce7 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp +++ b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp @@ -67,7 +67,7 @@ uint8_t CExImContactXML::IsContactInfo(LPCSTR pszKey) {
// This is a sorted list of all hashvalues of the contact information.
// This is the same as the szCiKey[] array below but sorted
- const DWORD dwCiHash[] = {
+ const uint32_t dwCiHash[] = {
0x6576F145,0x65780A70,0x6719120C,0x6776F145,0x67780A70,0x6EDB33D7,0x6F0466B5,
0x739B6915,0x73B11E48,0x760D8AD5,0x786A70D0,0x8813C350,0x88641AF8,0x8ED5652D,
0x96D64541,0x97768A14,0x9B786F9C,0x9B7889F9,0x9C26E6ED,0xA6675748,0xA813C350,
@@ -83,7 +83,7 @@ uint8_t CExImContactXML::IsContactInfo(LPCSTR pszKey) if (pszKey && *pszKey) {
char buf[MAXSETTING];
// convert to hash and make bsearch as it is much faster then working with strings
- const DWORD dwHash = mir_hashstr(_strlwr(mir_strncpy(buf, pszKey, _countof(buf))));
+ const uint32_t dwHash = mir_hashstr(_strlwr(mir_strncpy(buf, pszKey, _countof(buf))));
return bsearch(&dwHash, dwCiHash, _countof(dwCiHash), sizeof(dwCiHash[0]), (int(*)(const void *, const void *))SortProc) != nullptr;
}
return FALSE;
@@ -444,7 +444,7 @@ uint8_t CExImContactXML::ExportEvents() * return: nothing
**/
-void CExImContactXML::CountKeys(DWORD &numSettings, DWORD &numEvents)
+void CExImContactXML::CountKeys(uint32_t &numSettings, uint32_t &numEvents)
{
numSettings = numEvents = 0;
@@ -531,7 +531,7 @@ int CExImContactXML::LoadXmlElement(const TiXmlElement *xContact) uid((uint16_t)atoi(pUID));
break;
case 'd':
- uid((DWORD)_atoi64(pUID));
+ uid((uint32_t)_atoi64(pUID));
break;
case 's':
// utf8 -> asci
@@ -545,7 +545,7 @@ int CExImContactXML::LoadXmlElement(const TiXmlElement *xContact) {
uint8_t *pbVal = (uint8_t*)mir_base64_decode(pUID, &valLen);
if (pbVal != nullptr)
- uidn(pbVal, (DWORD)valLen);
+ uidn(pbVal, (uint32_t)valLen);
}
break;
default:
@@ -576,7 +576,7 @@ int CExImContactXML::ImportContact() _hEvent = NULL;
// count settings and events and init progress dialog
- DWORD numSettings, numEvents;
+ uint32_t numSettings, numEvents;
CountKeys(numSettings, numEvents);
_pXmlFile->_progress.SetSettingsCount(numSettings + numEvents);
_pXmlFile->_numSettingsTodo += numSettings;
@@ -854,7 +854,7 @@ int CExImContactXML::ImportSetting(LPCSTR pszModule, const TiXmlElement *xmlEntr break;
case 'd': //'d' dVal and lVal are valid
dbv.type = DBVT_DWORD;
- dbv.dVal = (DWORD)_atoi64(value + 1);
+ dbv.dVal = (uint32_t)_atoi64(value + 1);
break;
case 's': //'s' pszVal is valid
dbv.type = DBVT_ASCIIZ;
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactXML.h b/plugins/UserInfoEx/src/ex_import/classExImContactXML.h index cd2343f967..f1a5e8793d 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactXML.h +++ b/plugins/UserInfoEx/src/ex_import/classExImContactXML.h @@ -67,7 +67,7 @@ class CExImContactXML : public CExImContactBase int ImportContact();
int ImportNormalContact();
int ImportMetaSubContact(CExImContactXML *pMetaContact);
- void CountKeys(DWORD &numSettings, DWORD &numEvents);
+ void CountKeys(uint32_t &numSettings, uint32_t &numEvents);
// private exporting methods
int ExportModule(LPCSTR pszModule);
diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp index 29d48a95b5..c0a1310f87 100644 --- a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp +++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp @@ -49,15 +49,15 @@ static void InitAlteredPlacesBar() result = RegCreateKey(HKEY_CURRENT_USER, HKEY_WINPOL_PLACESBAR, &hkPlacesBar);
// install the places bar
if (SUCCEEDED(result)) {
- DWORD dwFolderID;
+ uint32_t dwFolderID;
LPSTR p;
CHAR szMirandaPath[MAX_PATH];
CHAR szProfilePath[MAX_PATH];
// default places: Desktop, My Documents, My Computer
- dwFolderID = 0; RegSetValueEx(hkPlacesBar, L"Place0", 0, REG_DWORD, (uint8_t*)&dwFolderID, sizeof(DWORD));
- dwFolderID = 5; RegSetValueEx(hkPlacesBar, L"Place1", 0, REG_DWORD, (uint8_t*)&dwFolderID, sizeof(DWORD));
- dwFolderID = 17; RegSetValueEx(hkPlacesBar, L"Place2", 0, REG_DWORD, (uint8_t*)&dwFolderID, sizeof(DWORD));
+ dwFolderID = 0; RegSetValueEx(hkPlacesBar, L"Place0", 0, REG_DWORD, (uint8_t*)&dwFolderID, sizeof(uint32_t));
+ dwFolderID = 5; RegSetValueEx(hkPlacesBar, L"Place1", 0, REG_DWORD, (uint8_t*)&dwFolderID, sizeof(uint32_t));
+ dwFolderID = 17; RegSetValueEx(hkPlacesBar, L"Place2", 0, REG_DWORD, (uint8_t*)&dwFolderID, sizeof(uint32_t));
// Miranda's installation path
GetModuleFileNameA(GetModuleHandleA("mir_app.mir"), szMirandaPath, _countof(szMirandaPath));
@@ -68,7 +68,7 @@ static void InitAlteredPlacesBar() // Miranda's profile path
if (!Profile_GetPathA(_countof(szProfilePath), szProfilePath)) {
// only add if different from profile path
- RegSetValueExA(hkPlacesBar, "Place4", 0, REG_SZ, (uint8_t*)szProfilePath, (DWORD)mir_strlen(szProfilePath) + 1);
+ RegSetValueExA(hkPlacesBar, "Place4", 0, REG_SZ, (uint8_t*)szProfilePath, (uint32_t)mir_strlen(szProfilePath) + 1);
}
RegCloseKey(hkPlacesBar);
@@ -278,7 +278,7 @@ int DlgExIm_OpenFileName(HWND hWndParent, const wchar_t *pszTitle, const wchar_t InitOpenFileNameStruct(&ofn, hWndParent, pszTitle, pszFilter, szInitialDir, pszFile);
ofn.Flags |= OFN_PATHMUSTEXIST;
if (!GetOpenFileNameW(&ofn)) {
- DWORD dwError = CommDlgExtendedError();
+ uint32_t dwError = CommDlgExtendedError();
if (dwError) MsgErr(ofn.hwndOwner, LPGENW("The OpenFileDialog returned an error: %d!"), dwError);
return -1;
}
@@ -304,7 +304,7 @@ int DlgExIm_SaveFileName(HWND hWndParent, const wchar_t *pszTitle, const wchar_t ofn.Flags |= OFN_OVERWRITEPROMPT;
if (!GetSaveFileNameW(&ofn)) {
- DWORD dwError = CommDlgExtendedError();
+ uint32_t dwError = CommDlgExtendedError();
if (dwError)
MsgErr(ofn.hwndOwner, LPGENW("The SaveFileDialog returned an error: %d!"), dwError);
return -1;
diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp index f70df32bb6..f16f5048e5 100644 --- a/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp +++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp @@ -114,7 +114,7 @@ CProgress::~CProgress() * return: nothing
**/
-void CProgress::SetContactCount(DWORD numContacts)
+void CProgress::SetContactCount(uint32_t numContacts)
{
if (_hDlg) {
HWND hProgress = GetDlgItem(_hDlg, IDC_PROGRESS2);
@@ -131,7 +131,7 @@ void CProgress::SetContactCount(DWORD numContacts) * return: nothing
**/
-void CProgress::SetSettingsCount(DWORD numSettings)
+void CProgress::SetSettingsCount(uint32_t numSettings)
{
if (_hDlg) {
HWND hProgress = GetDlgItem(_hDlg, IDC_PROGRESS);
diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.h b/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.h index c6d72d2cb8..408df14ad6 100644 --- a/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.h +++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.h @@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. class CProgress
{
HWND _hDlg;
- DWORD _dwStartTime;
+ uint32_t _dwStartTime;
uint8_t Update();
@@ -37,8 +37,8 @@ public: void Hide();
- void SetContactCount(DWORD numContacts);
- void SetSettingsCount(DWORD numSettings);
+ void SetContactCount(uint32_t numContacts);
+ void SetSettingsCount(uint32_t numSettings);
uint8_t UpdateContact(LPCTSTR pszFormat, ...);
uint8_t UpdateSetting(LPCTSTR pszFormat, ...);
diff --git a/plugins/UserInfoEx/src/ex_import/mir_rfcCodecs.h b/plugins/UserInfoEx/src/ex_import/mir_rfcCodecs.h index 8c131bc17b..562a6037d7 100644 --- a/plugins/UserInfoEx/src/ex_import/mir_rfcCodecs.h +++ b/plugins/UserInfoEx/src/ex_import/mir_rfcCodecs.h @@ -49,7 +49,7 @@ inline INT_PTR QPDecodeGetRequiredLength(INT_PTR nSrcLen) return nSrcLen;
}
-inline BOOL QPEncode(uint8_t *pbSrcData, INT_PTR nSrcLen, LPSTR szDest, INT_PTR *pnDestLen, uint8_t *bEncoded, DWORD dwFlags = 0)
+inline BOOL QPEncode(uint8_t *pbSrcData, INT_PTR nSrcLen, LPSTR szDest, INT_PTR *pnDestLen, uint8_t *bEncoded, uint32_t dwFlags = 0)
{
//The hexadecimal character set
static const CHAR s_chHexChars[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
@@ -111,7 +111,7 @@ inline BOOL QPEncode(uint8_t *pbSrcData, INT_PTR nSrcLen, LPSTR szDest, INT_PTR return TRUE;
}
-inline BOOL QPDecode(uint8_t *pbSrcData, INT_PTR nSrcLen, LPSTR szDest, INT_PTR *pnDestLen, DWORD dwFlags = 0)
+inline BOOL QPDecode(uint8_t *pbSrcData, INT_PTR nSrcLen, LPSTR szDest, INT_PTR *pnDestLen, uint32_t dwFlags = 0)
{
if (!pbSrcData || !szDest || !pnDestLen) {
return FALSE;
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp index 854c2ad622..d86e3f3d5c 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp @@ -175,7 +175,7 @@ int SvcExImINI_Export(lpExImParam ExImContact, const wchar_t *pszFileName) * importing stuff ***********************************************************************************************************/ -LPSTR strnrchr(LPSTR string, int ch, DWORD len) +LPSTR strnrchr(LPSTR string, int ch, uint32_t len) { LPSTR start = (LPSTR)string; string += len; /* find end of string */ @@ -195,9 +195,9 @@ LPSTR strnrchr(LPSTR string, int ch, DWORD len) * return: pointer to the buffer on success or NULL on error **/ -static DWORD ImportreadLine(FILE *file, LPSTR &str) +static uint32_t ImportreadLine(FILE *file, LPSTR &str) { - DWORD l = 0; + uint32_t l = 0; bool bComment = false; str[0] = 0; @@ -329,7 +329,7 @@ int ImportSetting(MCONTACT hContact, LPCSTR pszModule, LPSTR &strLine) if (size_t brk = strspn(value, "0123456789-")) *(value + brk) = 0; dbv.type = DBVT_DWORD; - dbv.dVal = (DWORD)_atoi64(value); + dbv.dVal = (uint32_t)_atoi64(value); break; case 's': @@ -403,7 +403,7 @@ int SvcExImINI_Import(MCONTACT hContact, const wchar_t *pszFileName) } MCONTACT hNewContact = INVALID_CONTACT_ID; - DWORD end, numLines = 0; + uint32_t end, numLines = 0; CHAR szModule[MAXSETTING] = { 0 }; int numContactsInFile = 0; // number of contacts in the inifile int numContactsAdded = 0; // number of contacts, that were added to the database diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp index 9a48a5e3fe..f7cba427a6 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp @@ -285,7 +285,7 @@ size_t CLineBuffer::operator + (const LONG lVal) * return: length of the string, added
**/
-size_t CLineBuffer::operator + (const DWORD dVal)
+size_t CLineBuffer::operator + (const uint32_t dVal)
{
size_t cbLength = 10;
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h index 1cbb11ac3c..2a21d3f9ba 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h @@ -44,7 +44,7 @@ public: size_t operator + (const SHORT sVal);
size_t operator + (const uint16_t wVal);
size_t operator + (const LONG lVal);
- size_t operator + (const DWORD dVal);
+ size_t operator + (const uint32_t dVal);
size_t GetLength();
LPCSTR GetBuffer();
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp index d5a9b3b9e9..1d008719ad 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp @@ -91,7 +91,7 @@ int CFileXml::Export(lpExImParam ExImContact, const wchar_t *pszFileName) {
DB::CEnumList Modules;
- DWORD result = (DWORD)DialogBox(g_plugin.getInst(), MAKEINTRESOURCE(IDD_EXPORT_DATAHISTORY), nullptr, DlgProc_DataHistory);
+ uint32_t result = (uint32_t)DialogBox(g_plugin.getInst(), MAKEINTRESOURCE(IDD_EXPORT_DATAHISTORY), nullptr, DlgProc_DataHistory);
if (LOWORD(result) != IDOK)
return 0;
@@ -284,9 +284,9 @@ int CFileXml::ImportContacts(const TiXmlElement *xmlParent) * return: nothing
**/
-DWORD CFileXml::CountContacts(const TiXmlElement *xmlParent)
+uint32_t CFileXml::CountContacts(const TiXmlElement *xmlParent)
{
- DWORD dwCount = 0;
+ uint32_t dwCount = 0;
// count contacts in file for progress bar
for (auto *xContact : TiXmlEnum(xmlParent))
if (!mir_strcmpi(xContact->Name(), XKEY_CONTACT) || !mir_strcmpi(xContact->Name(), XKEY_OWNER))
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h index 0152fcac9b..e0508eb82f 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h @@ -29,13 +29,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. class CFileXml {
friend class CExImContactXML;
- DWORD _numContactsTodo;
- DWORD _numContactsDone;
- DWORD _numSettingsTodo;
- DWORD _numSettingsDone;
- DWORD _numEventsTodo;
- DWORD _numEventsDone;
- DWORD _numEventsDuplicated;
+ uint32_t _numContactsTodo;
+ uint32_t _numContactsDone;
+ uint32_t _numSettingsTodo;
+ uint32_t _numSettingsDone;
+ uint32_t _numEventsTodo;
+ uint32_t _numEventsDone;
+ uint32_t _numEventsDuplicated;
MCONTACT _hContactToWorkOn; // contact to ex/import (NULL=owner|INVALID_HANDLE_VALUE=all|HADNLE=one user)
@@ -46,7 +46,7 @@ class CFileXml { int ImportOwner(const TiXmlElement* xmlContact);
int ImportContacts(const TiXmlElement* xmlParent);
- DWORD CountContacts(const TiXmlElement* xmlParent);
+ uint32_t CountContacts(const TiXmlElement* xmlParent);
/*
int ExportOwner(FILE *xmlfile, uint8_t bExportEvents);
diff --git a/plugins/UserInfoEx/src/mir_contactqueue.h b/plugins/UserInfoEx/src/mir_contactqueue.h index f40553ede6..66aee2efda 100644 --- a/plugins/UserInfoEx/src/mir_contactqueue.h +++ b/plugins/UserInfoEx/src/mir_contactqueue.h @@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. **/
struct CQueueItem
{
- DWORD check_time;
+ uint32_t check_time;
MCONTACT hContact;
PVOID param;
};
diff --git a/plugins/UserInfoEx/src/mir_db.cpp b/plugins/UserInfoEx/src/mir_db.cpp index 83867be920..f10a850566 100644 --- a/plugins/UserInfoEx/src/mir_db.cpp +++ b/plugins/UserInfoEx/src/mir_db.cpp @@ -31,7 +31,7 @@ namespace Contact { /**
* This function trys to guess, when an ICQ contact was added to database.
**/
-DWORD WhenAdded(DWORD dwUIN, LPCSTR)
+uint32_t WhenAdded(uint32_t dwUIN, LPCSTR)
{
DBEVENTINFO dbei = {};
DB::ECPTR pCursor(DB::Events(0));
@@ -40,8 +40,8 @@ DWORD WhenAdded(DWORD dwUIN, LPCSTR) if (!DB::Event::GetInfo(edbe, &dbei) && dbei.eventType == EVENTTYPE_ADDED) {
if (!DB::Event::GetInfoWithData(edbe, &dbei)) {
// extract UIN and compare with given one
- DWORD dwEvtUIN;
- memcpy(&dwEvtUIN, dbei.pBlob, sizeof(DWORD));
+ uint32_t dwEvtUIN;
+ memcpy(&dwEvtUIN, dbei.pBlob, sizeof(uint32_t));
MIR_FREE(dbei.pBlob);
if (dwEvtUIN == dwUIN)
return dbei.timestamp;
@@ -421,7 +421,7 @@ uint8_t ConvertString(DBVARIANT* dbv, const uint8_t destType) /**
* This function completely converts a DBVARIANT to the destination string type.
-* It includes uint8_t, uint16_t, DWORD and all string types
+* It includes uint8_t, uint16_t, uint32_t and all string types
* @param dbv - pointer to DBVARIANT structure which is to manipulate
* @param destType - one of (DBVT_ASCIIZ, DBVT_UTF8 or DBVT_WCHAR)
*
@@ -533,7 +533,7 @@ bool GetInfoWithData(MEVENT hEvent, DBEVENTINFO *dbei) {
if (!dbei->cbBlob) {
INT_PTR size = db_event_getBlobSize(hEvent);
- dbei->cbBlob = (size != -1) ? (DWORD)size : 0;
+ dbei->cbBlob = (size != -1) ? (uint32_t)size : 0;
}
if (dbei->cbBlob) {
dbei->pBlob = (uint8_t*) mir_alloc(dbei->cbBlob);
@@ -558,7 +558,7 @@ bool GetInfoWithData(MEVENT hEvent, DBEVENTINFO *dbei) * @retval timestamp
**/
-DWORD TimeOf(MEVENT hEvent)
+uint32_t TimeOf(MEVENT hEvent)
{
DBEVENTINFO dbei;
if (!GetInfo(hEvent, &dbei))
diff --git a/plugins/UserInfoEx/src/mir_db.h b/plugins/UserInfoEx/src/mir_db.h index 61f8c86fba..6ede82c18f 100644 --- a/plugins/UserInfoEx/src/mir_db.h +++ b/plugins/UserInfoEx/src/mir_db.h @@ -29,7 +29,7 @@ namespace DB { **/
namespace Contact {
- DWORD WhenAdded(DWORD dwUIN, LPCSTR szBaseProto);
+ uint32_t WhenAdded(uint32_t dwUIN, LPCSTR szBaseProto);
} /* namespace Contact */
namespace Module {
@@ -101,7 +101,7 @@ namespace Event { HANDLE FindLast(MCONTACT hContact);
bool GetInfo(MEVENT hEvent, DBEVENTINFO *dbei);
bool GetInfoWithData(MEVENT hEvent, DBEVENTINFO *dbei);
- DWORD GetTime(MEVENT hEvent);
+ uint32_t GetTime(MEVENT hEvent);
bool Exists(MCONTACT hContact, MEVENT& hDbExistingEvent, DBEVENTINFO *dbei);
} /* namespace Events */
diff --git a/plugins/UserInfoEx/src/psp_options.cpp b/plugins/UserInfoEx/src/psp_options.cpp index 46bd0f9d64..d4cb66ed4d 100644 --- a/plugins/UserInfoEx/src/psp_options.cpp +++ b/plugins/UserInfoEx/src/psp_options.cpp @@ -144,7 +144,7 @@ static uint8_t DBWriteCheckBtn(HWND hDlg, const int idCtrl, LPCSTR pszSetting) }
/**
- * This function reads a DWORD from database and interprets it as an color value
+ * This function reads a uint32_t from database and interprets it as an color value
* to set to the color control.
*
* @param hWnd - the dialog's window handle
@@ -154,13 +154,13 @@ static uint8_t DBWriteCheckBtn(HWND hDlg, const int idCtrl, LPCSTR pszSetting) *
* @return nothing
**/
-static void DBGetColor(HWND hDlg, const int idCtrl, LPCSTR pszSetting, DWORD bDefault)
+static void DBGetColor(HWND hDlg, const int idCtrl, LPCSTR pszSetting, uint32_t bDefault)
{
SendDlgItemMessage(hDlg, idCtrl, CPM_SETCOLOUR, 0, g_plugin.getDword(pszSetting, bDefault));
}
/**
- * This function writes a DWORD to database according to the value
+ * This function writes a uint32_t to database according to the value
* of the color control identified by 'idCtrl'.
*
* @param hWnd - the dialog's window handle
@@ -171,7 +171,7 @@ static void DBGetColor(HWND hDlg, const int idCtrl, LPCSTR pszSetting, DWORD bDe **/
static void DBWriteColor(HWND hDlg, const int idCtrl, LPCSTR pszSetting)
{
- g_plugin.setDword(pszSetting, (DWORD)SendDlgItemMessage(hDlg, idCtrl, CPM_GETCOLOUR, 0, 0));
+ g_plugin.setDword(pszSetting, (uint32_t)SendDlgItemMessage(hDlg, idCtrl, CPM_GETCOLOUR, 0, 0));
}
/**
diff --git a/plugins/UserInfoEx/src/psp_origin.cpp b/plugins/UserInfoEx/src/psp_origin.cpp index 2d8d48faa5..c10d4c0fc0 100644 --- a/plugins/UserInfoEx/src/psp_origin.cpp +++ b/plugins/UserInfoEx/src/psp_origin.cpp @@ -79,7 +79,7 @@ INT_PTR CALLBACK PSPProcOrigin(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara MTime mt;
if (mt.DBGetStamp(hContact, USERINFO, SET_CONTACT_ADDEDTIME) && strstr(pszProto, "ICQ")) {
- DWORD dwStamp;
+ uint32_t dwStamp;
dwStamp = DB::Contact::WhenAdded(db_get_dw(hContact, pszProto, "UIN", 0), pszProto);
if (dwStamp > 0)
diff --git a/plugins/UserInfoEx/src/psp_profile.cpp b/plugins/UserInfoEx/src/psp_profile.cpp index db61cce98b..9101d41d13 100644 --- a/plugins/UserInfoEx/src/psp_profile.cpp +++ b/plugins/UserInfoEx/src/psp_profile.cpp @@ -523,7 +523,7 @@ static int ProfileList_AddItemlistFromDB( continue;
break;
case DBVT_DWORD:
- if (dbvCat.dVal != (DWORD)idList[j].nID)
+ if (dbvCat.dVal != (uint32_t)idList[j].nID)
continue;
break;
case DBVT_ASCIIZ:
diff --git a/plugins/UserInfoEx/src/svc_refreshci.cpp b/plugins/UserInfoEx/src/svc_refreshci.cpp index 4f36b7dede..68a0fffce2 100644 --- a/plugins/UserInfoEx/src/svc_refreshci.cpp +++ b/plugins/UserInfoEx/src/svc_refreshci.cpp @@ -721,7 +721,7 @@ static INT_PTR RefreshService(WPARAM, LPARAM) static int OnContactAdded(WPARAM hContact, LPARAM)
{
- DWORD dwStmp = db_get_dw(hContact, USERINFO, SET_CONTACT_ADDEDTIME, 0);
+ uint32_t dwStmp = db_get_dw(hContact, USERINFO, SET_CONTACT_ADDEDTIME, 0);
if (!dwStmp) {
MTime mt;
mt.GetLocalTime();
diff --git a/plugins/Variables/src/contact.cpp b/plugins/Variables/src/contact.cpp index 2f1420d1e4..1eeb5e0d99 100644 --- a/plugins/Variables/src/contact.cpp +++ b/plugins/Variables/src/contact.cpp @@ -76,7 +76,7 @@ static builtinCnfs[] = /* contact cache entry */
struct CONTACTCE
{
- DWORD flags;
+ uint32_t flags;
wchar_t* tszContact;
MCONTACT hContact;
};
@@ -140,7 +140,7 @@ wchar_t* getContactInfoT(uint8_t type, MCONTACT hContact) case CCNF_INTERNALIP:
case CCNF_EXTERNALIP:
{
- DWORD ip = db_get_dw(hContact, szProto, (type == CCNF_INTERNALIP) ? "RealIP" : "IP", 0);
+ uint32_t ip = db_get_dw(hContact, szProto, (type == CCNF_INTERNALIP) ? "RealIP" : "IP", 0);
if (ip != 0) {
struct in_addr in;
in.s_addr = htonl(ip);
@@ -168,7 +168,7 @@ wchar_t* getContactInfoT(uint8_t type, MCONTACT hContact) }
// MS_VARS_GETCONTACTFROMSTRING
-MCONTACT getContactFromString(const wchar_t *tszContact, DWORD dwFlags, int nMatch)
+MCONTACT getContactFromString(const wchar_t *tszContact, uint32_t dwFlags, int nMatch)
{
/* service to retrieve a contact's HANDLE from a given string */
if (tszContact == nullptr || *tszContact == 0)
diff --git a/plugins/Variables/src/enumprocs.cpp b/plugins/Variables/src/enumprocs.cpp index 373904a59a..069286256f 100644 --- a/plugins/Variables/src/enumprocs.cpp +++ b/plugins/Variables/src/enumprocs.cpp @@ -21,9 +21,9 @@ struct EnumInfoStruct
{
- DWORD dwPID;
+ uint32_t dwPID;
PROCENUMPROC lpProc;
- DWORD lParam;
+ uint32_t lParam;
BOOL bEnd;
};
@@ -37,7 +37,7 @@ struct EnumInfoStruct // the callback routine.
//
// Callback function definition:
-// BOOL CALLBACK Proc(DWORD dw, uint16_t w, LPCSTR lpstr, LPARAM lParam);
+// BOOL CALLBACK Proc(uint32_t dw, uint16_t w, LPCSTR lpstr, LPARAM lParam);
BOOL WINAPI EnumProcs(PROCENUMPROC lpProc, LPARAM lParam)
{
diff --git a/plugins/Variables/src/enumprocs.h b/plugins/Variables/src/enumprocs.h index c24387f39a..170705852a 100644 --- a/plugins/Variables/src/enumprocs.h +++ b/plugins/Variables/src/enumprocs.h @@ -20,5 +20,5 @@ #pragma once
/*** Process names are ANSI only ***/
-typedef BOOL (CALLBACK *PROCENUMPROC)(DWORD, uint16_t, char *, LPARAM);
+typedef BOOL (CALLBACK *PROCENUMPROC)(uint32_t, uint16_t, char *, LPARAM);
BOOL WINAPI EnumProcs(PROCENUMPROC lpProc, LPARAM lParam);
diff --git a/plugins/Variables/src/parse_miranda.cpp b/plugins/Variables/src/parse_miranda.cpp index 0373b33837..147f359045 100644 --- a/plugins/Variables/src/parse_miranda.cpp +++ b/plugins/Variables/src/parse_miranda.cpp @@ -434,7 +434,7 @@ static MEVENT findDbEvent(MCONTACT hContact, MEVENT hDbEvent, int flags) }
else {
MEVENT hMatchEvent = NULL, hSearchEvent = NULL;
- DWORD matchTimestamp = 0, priorTimestamp = 0;
+ uint32_t matchTimestamp = 0, priorTimestamp = 0;
DBEVENTINFO dbe = {};
if (flags & DBE_FIRST) {
diff --git a/plugins/Variables/src/parse_miranda.h b/plugins/Variables/src/parse_miranda.h index 20ffab9b73..830a6420c9 100644 --- a/plugins/Variables/src/parse_miranda.h +++ b/plugins/Variables/src/parse_miranda.h @@ -69,5 +69,5 @@ #define DBE_CONTACTS 0x00000400 // pBlob = 'some format', no string
#define DBE_ADDED 0x00000800 // pBlob = 'some format', no string
#define DBE_AUTHREQUEST 0x00001000 // pBlob = message
-#define DBE_FILE 0x00002000 // pBlob = DWORD + file + description
+#define DBE_FILE 0x00002000 // pBlob = uint32_t + file + description
#define DBE_OTHER 0x00008000
diff --git a/plugins/Variables/src/parse_system.cpp b/plugins/Variables/src/parse_system.cpp index c3edd3b079..339fb0077a 100644 --- a/plugins/Variables/src/parse_system.cpp +++ b/plugins/Variables/src/parse_system.cpp @@ -300,7 +300,7 @@ static wchar_t* parseEnvironmentVariable(ARGUMENTSINFO *ai) if (ai->argc != 2)
return nullptr;
- DWORD len = ExpandEnvironmentStrings(ai->argv.w[1], nullptr, 0);
+ uint32_t len = ExpandEnvironmentStrings(ai->argv.w[1], nullptr, 0);
if (len <= 0)
return nullptr;
@@ -415,7 +415,7 @@ static wchar_t* parseListDir(ARGUMENTSINFO *ai) }
#ifndef WINE
-static BOOL CALLBACK MyProcessEnumerator(DWORD, uint16_t, char *szProcess, LPARAM lParam)
+static BOOL CALLBACK MyProcessEnumerator(uint32_t, uint16_t, char *szProcess, LPARAM lParam)
{
char **szProc = (char **)lParam;
if ((*szProc != nullptr) && (!_stricmp(*szProc, szProcess)))
@@ -586,7 +586,7 @@ static wchar_t* parseTextFile(ARGUMENTSINFO *ai) if (hFile == INVALID_HANDLE_VALUE)
return nullptr;
- DWORD fileSz = GetFileSize(hFile, nullptr);
+ uint32_t fileSz = GetFileSize(hFile, nullptr);
if (fileSz == INVALID_FILE_SIZE) {
CloseHandle(hFile);
return nullptr;
@@ -750,7 +750,7 @@ static wchar_t* parseTextFile(ARGUMENTSINFO *ai) return res;
}
}
- if (((DWORD)(linePos + (pCur - pBuf)) == fileSz)) { // eof
+ if (((uint32_t)(linePos + (pCur - pBuf)) == fileSz)) { // eof
CloseHandle(hFile);
if (tUC) {
diff --git a/plugins/Variables/src/parse_variables.h b/plugins/Variables/src/parse_variables.h index 08b3bd71df..08acc99bed 100644 --- a/plugins/Variables/src/parse_variables.h +++ b/plugins/Variables/src/parse_variables.h @@ -23,7 +23,7 @@ struct VARIABLEREGISTER {
wchar_t *szName;
wchar_t *szText;
- DWORD dwOwnerThread;
+ uint32_t dwOwnerThread;
};
#define PUT L"put"
diff --git a/plugins/Variables/src/stdafx.h b/plugins/Variables/src/stdafx.h index bb3e040e30..d0c550ccfc 100644 --- a/plugins/Variables/src/stdafx.h +++ b/plugins/Variables/src/stdafx.h @@ -165,7 +165,7 @@ int deinitTokenRegister(); // contact.c
uint8_t getContactInfoType(wchar_t* type);
wchar_t* getContactInfoT(uint8_t type, MCONTACT hContact);
-MCONTACT getContactFromString(const wchar_t *tszContact, DWORD dwFlags, int nMatch = 0);
+MCONTACT getContactFromString(const wchar_t *tszContact, uint32_t dwFlags, int nMatch = 0);
int initContactModule();
int deinitContactModule();
// alias
diff --git a/plugins/Variables/src/tokenregister.cpp b/plugins/Variables/src/tokenregister.cpp index 327df5f475..b41d408fe5 100644 --- a/plugins/Variables/src/tokenregister.cpp +++ b/plugins/Variables/src/tokenregister.cpp @@ -22,7 +22,7 @@ struct TokenRegisterEntry
{
TOKENREGISTEREX tr;
- DWORD nameHash;
+ uint32_t nameHash;
};
static int CompareTokens(const TokenRegisterEntry* p1, const TokenRegisterEntry* p2)
@@ -91,7 +91,7 @@ int deRegisterToken(wchar_t *token) INT_PTR registerToken(WPARAM, LPARAM lParam)
{
- DWORD hash;
+ uint32_t hash;
TOKENREGISTEREX *newVr = (TOKENREGISTEREX*)lParam;
if (newVr == nullptr || newVr->szTokenString.w == nullptr || newVr->cbSize <= 0)
diff --git a/plugins/WhenWasIt/src/services.cpp b/plugins/WhenWasIt/src/services.cpp index 9c3770f100..b2b622dc00 100644 --- a/plugins/WhenWasIt/src/services.cpp +++ b/plugins/WhenWasIt/src/services.cpp @@ -104,7 +104,7 @@ INT_PTR CheckBirthdaysService(WPARAM, LPARAM lParam) SYSTEMTIME today;
GetLocalTime(&today);
- DWORD lastChecked = g_plugin.getDword("LastChecked", 0); //get last checked date
+ uint32_t lastChecked = g_plugin.getDword("LastChecked", 0); //get last checked date
int lcDay = LOBYTE(LOWORD(lastChecked));
int lcMonth = HIBYTE(LOWORD(lastChecked));
int lcYear = HIWORD(lastChecked);
diff --git a/plugins/WhenWasIt/src/stdafx.h b/plugins/WhenWasIt/src/stdafx.h index 080ce8256f..d9a47dc38f 100644 --- a/plugins/WhenWasIt/src/stdafx.h +++ b/plugins/WhenWasIt/src/stdafx.h @@ -75,8 +75,8 @@ extern HWND hUpcomingDlg; extern MWindowList hAddBirthdayWndsList;
struct CommonData{
- DWORD foreground;
- DWORD background;
+ uint32_t foreground;
+ uint32_t background;
int checkInterval;
int daysInAdvance;
int popupTimeout;
diff --git a/plugins/WhoUsesMyFiles/src/list.cpp b/plugins/WhoUsesMyFiles/src/list.cpp index a597d99235..7b9251cc19 100644 --- a/plugins/WhoUsesMyFiles/src/list.cpp +++ b/plugins/WhoUsesMyFiles/src/list.cpp @@ -1,13 +1,13 @@ #include "stdafx.h"
-PWumf new_wumf( DWORD dwID,
+PWumf new_wumf( uint32_t dwID,
LPTSTR szUser,
LPTSTR szPath,
LPTSTR szComp,
LPTSTR szUNC,
- DWORD dwSess,
- DWORD dwPerm,
- DWORD dwAttr)
+ uint32_t dwSess,
+ uint32_t dwPerm,
+ uint32_t dwAttr)
{
PWumf w = (PWumf)mir_calloc(sizeof(Wumf));
if (!w)
@@ -96,7 +96,7 @@ PWumf cpy_list(PWumf *l) return p;
}
-PWumf fnd_cell(PWumf *l, DWORD dwID)
+PWumf fnd_cell(PWumf *l, uint32_t dwID)
{
if (!l || !*l)return nullptr;
PWumf w = *l;
diff --git a/plugins/WhoUsesMyFiles/src/options.cpp b/plugins/WhoUsesMyFiles/src/options.cpp index de674b67c4..f04e35f7f6 100644 --- a/plugins/WhoUsesMyFiles/src/options.cpp +++ b/plugins/WhoUsesMyFiles/src/options.cpp @@ -223,8 +223,8 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg,UINT msg,WPARAM wparam,LPARAM lpara return TRUE; case PSN_APPLY: - g_plugin.setDword(COLOR_TEXT, (DWORD)WumfOptions.ColorText); - g_plugin.setDword(COLOR_BACK, (DWORD)WumfOptions.ColorBack); + g_plugin.setDword(COLOR_TEXT, (uint32_t)WumfOptions.ColorText); + g_plugin.setDword(COLOR_BACK, (uint32_t)WumfOptions.ColorBack); g_plugin.setByte(COLOR_DEF, (uint8_t)WumfOptions.UseDefColor); g_plugin.setByte(COLOR_WIN, (uint8_t)WumfOptions.UseWinColor); g_plugin.setByte(COLOR_SET, (uint8_t)WumfOptions.SelectColor ); diff --git a/plugins/WhoUsesMyFiles/src/stdafx.h b/plugins/WhoUsesMyFiles/src/stdafx.h index 36db3d98f4..db434fd83b 100644 --- a/plugins/WhoUsesMyFiles/src/stdafx.h +++ b/plugins/WhoUsesMyFiles/src/stdafx.h @@ -70,16 +70,16 @@ struct WUMF_OPTIONS struct Wumf
{
- DWORD dwID;
+ uint32_t dwID;
wchar_t szID[10], szPerm[10];
LPTSTR szUser;
LPTSTR szPath;
LPTSTR szComp;
LPTSTR szUNC;
- DWORD dwSess;
- DWORD dwLocks;
- DWORD dwAttr;
- DWORD dwPerm;
+ uint32_t dwSess;
+ uint32_t dwLocks;
+ uint32_t dwAttr;
+ uint32_t dwPerm;
BOOL mark;
Wumf *next;
};
@@ -87,19 +87,19 @@ struct Wumf typedef Wumf *PWumf;
PWumf new_wumf(
- DWORD dwID,
+ uint32_t dwID,
LPTSTR szUser,
LPTSTR szPath,
LPTSTR szComp,
LPTSTR szUNC,
- DWORD szSess,
- DWORD dwPerm,
- DWORD dwAttr);
+ uint32_t szSess,
+ uint32_t dwPerm,
+ uint32_t dwAttr);
BOOL add_cell (PWumf* l, PWumf w);
BOOL del_cell (PWumf* l, PWumf w);
BOOL cpy_cell (PWumf* l, PWumf w);
-PWumf fnd_cell (PWumf* l, DWORD dwID);
+PWumf fnd_cell (PWumf* l, uint32_t dwID);
PWumf cpy_list (PWumf* l);
BOOL del_all (PWumf* l);
void mark_all (PWumf* l, BOOL mark);
@@ -129,7 +129,7 @@ void ShowWumfPopup(PWumf w); void process_session(SESSION_INFO_1 s_info);
void process_file(SESSION_INFO_1 s_info, FILE_INFO_3 f_info);
-void printError(DWORD res);
+void printError(uint32_t res);
#define msg(X) MessageBox(NULL, X, L"WUMF", MB_OK|MB_ICONSTOP)
#define MS_WUMF_SWITCHPOPUP "WUMF/SwitchPopup"
diff --git a/plugins/WhoUsesMyFiles/src/wumf.cpp b/plugins/WhoUsesMyFiles/src/wumf.cpp index 66a287eea8..c2d037e673 100644 --- a/plugins/WhoUsesMyFiles/src/wumf.cpp +++ b/plugins/WhoUsesMyFiles/src/wumf.cpp @@ -206,7 +206,7 @@ void process_file(SESSION_INFO_1 s_info, FILE_INFO_3 f_info) else w->mark = FALSE;
}
-void printError(DWORD res)
+void printError(uint32_t res)
{
LPVOID lpMsgBuf;
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, nullptr, res, 0, (LPTSTR) &lpMsgBuf, 0, nullptr );
diff --git a/plugins/WinterSpeak/src/DialogConfigActive.cpp b/plugins/WinterSpeak/src/DialogConfigActive.cpp index dad1d5153b..d2ca1ee64f 100644 --- a/plugins/WinterSpeak/src/DialogConfigActive.cpp +++ b/plugins/WinterSpeak/src/DialogConfigActive.cpp @@ -112,7 +112,7 @@ void DialogConfigActive::notify(HWND hwndDlg, LPARAM lParam) if (nm->iColumn == -1)
break;
- DWORD hitFlags;
+ uint32_t hitFlags;
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_ACTIVE_USERS, CLM_HITTEST, (WPARAM)&hitFlags, MAKELPARAM(nm->pt.x, nm->pt.y));
if (hItem == nullptr || !(hitFlags & CLCHT_ONITEMEXTRA))
break;
diff --git a/plugins/WinterSpeak/src/SpeechApi40a.cpp b/plugins/WinterSpeak/src/SpeechApi40a.cpp index b562e45369..2b46a085e2 100644 --- a/plugins/WinterSpeak/src/SpeechApi40a.cpp +++ b/plugins/WinterSpeak/src/SpeechApi40a.cpp @@ -92,7 +92,7 @@ bool SpeechApi40a::say(const std::wstring &sentence) }
else {
SDATA data;
- data.dwSize = (DWORD)(sentence.size() * sizeof(wchar_t));
+ data.dwSize = (uint32_t)(sentence.size() * sizeof(wchar_t));
data.pData = (wchar_t *)sentence.c_str();
m_tts_central->TextData(CHARSET_TEXT, 0, data, nullptr, IID_ITTSBufNotifySinkA);
}
@@ -109,7 +109,7 @@ bool SpeechApi40a::setVolume(int volume) return true;
}
- DWORD new_vol = volume / 100.0 * 0xffff;
+ uint32_t new_vol = volume / 100.0 * 0xffff;
new_vol |= new_vol << 16;
if (FAILED(m_tts_attribs->VolumeSet(new_vol))) {
diff --git a/plugins/YARelay/src/main.cpp b/plugins/YARelay/src/main.cpp index 33265400a3..089adfe23e 100644 --- a/plugins/YARelay/src/main.cpp +++ b/plugins/YARelay/src/main.cpp @@ -68,7 +68,7 @@ int ProtoAck(WPARAM,LPARAM lparam) dbei.timestamp = ltime;
dbei.flags = DBEF_SENT | DBEF_UTF;
dbei.eventType = EVENTTYPE_MESSAGE;
- dbei.cbBlob = (DWORD)mir_strlen(p->msgText) + 1;
+ dbei.cbBlob = (uint32_t)mir_strlen(p->msgText) + 1;
dbei.pBlob = (uint8_t*)p->msgText;
db_event_add(hForwardTo, &dbei);
}
diff --git a/plugins/YARelay/src/options.cpp b/plugins/YARelay/src/options.cpp index 7e4d1eceef..39c107cfbf 100644 --- a/plugins/YARelay/src/options.cpp +++ b/plugins/YARelay/src/options.cpp @@ -168,8 +168,8 @@ static INT_PTR CALLBACK OptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, iSplitMaxSize = 1;
// write to database
- g_plugin.setDword("ForwardFrom", (DWORD)hForwardFrom);
- g_plugin.setDword("ForwardTo", (DWORD)hForwardTo);
+ g_plugin.setDword("ForwardFrom", (uint32_t)hForwardFrom);
+ g_plugin.setDword("ForwardTo", (uint32_t)hForwardTo);
g_plugin.setDword("ForwardOnStatus", iForwardOnStatus);
g_plugin.setWString("ForwardTemplate", tszForwardTemplate);
g_plugin.setDword("Split", iSplit);
diff --git a/plugins/ZeroNotification/src/options.cpp b/plugins/ZeroNotification/src/options.cpp index 35a78b7a6b..6550c46f3d 100644 --- a/plugins/ZeroNotification/src/options.cpp +++ b/plugins/ZeroNotification/src/options.cpp @@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. struct CheckBoxValues_t { - DWORD style; + uint32_t style; wchar_t *szDescr; } static const statusValues[] = @@ -33,7 +33,7 @@ static const statusValues[] = { PF2_INVISIBLE, TEXT("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; @@ -48,9 +48,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; @@ -66,7 +66,7 @@ static DWORD MakeCheckBoxTreeFlags(HWND hwndTree) static INT_PTR CALLBACK DlgProcNoSoundOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM lParam) { - DWORD test; + uint32_t test; switch (msg) { case WM_INITDIALOG: TranslateDialogDefault(hwndDlg); diff --git a/plugins/wbOSD/src/events.cpp b/plugins/wbOSD/src/events.cpp index 6355db4b9f..2b6f0b2372 100644 --- a/plugins/wbOSD/src/events.cpp +++ b/plugins/wbOSD/src/events.cpp @@ -60,7 +60,7 @@ int ProtoAck(WPARAM, LPARAM lparam) return 0;
if (ack->result == ACKRESULT_SUCCESS && (LPARAM)ack->hProcess != ack->lParam) {
- DWORD ann = g_plugin.getDword("announce", DEFAULT_ANNOUNCE);
+ uint32_t ann = g_plugin.getDword("announce", DEFAULT_ANNOUNCE);
if (ann & (1 << (ack->lParam - ID_STATUS_OFFLINE))) {
wchar_t buffer[512];
mir_snwprintf(buffer, TranslateT("%s is %s"), Clist_GetContactDisplayName(ack->hContact), Clist_GetStatusModeDescription(ack->lParam, 0));
@@ -92,7 +92,7 @@ int ContactSettingChanged(WPARAM wParam, LPARAM lParam) if (Ignore_IsIgnored(wParam, IGNOREEVENT_USERONLINE)) return 0;
- DWORD dwStatuses = MAKELPARAM(oldStatus, newStatus);
+ uint32_t dwStatuses = MAKELPARAM(oldStatus, newStatus);
NotifyEventHooks(hHookContactStatusChanged, wParam, (LPARAM)dwStatuses);
return 0;
@@ -102,7 +102,7 @@ int ContactStatusChanged(WPARAM wParam, LPARAM lParam) {
MCONTACT hContact = (MCONTACT)wParam;
uint16_t newStatus = HIWORD(lParam);
- DWORD ann = g_plugin.getDword("announce", DEFAULT_ANNOUNCE);
+ uint32_t ann = g_plugin.getDword("announce", DEFAULT_ANNOUNCE);
logmsg("ContactStatusChanged1");
diff --git a/plugins/wbOSD/src/options.cpp b/plugins/wbOSD/src/options.cpp index 472411de62..0908dda4f3 100644 --- a/plugins/wbOSD/src/options.cpp +++ b/plugins/wbOSD/src/options.cpp @@ -13,7 +13,7 @@ COLORREF pencustcolors[16]; const static osdmsg defstr = { L"", 0, RGB(0, 0, 0), nullptr, 0 };
-void FillCheckBoxTree(HWND hwndTree, DWORD style)
+void FillCheckBoxTree(HWND hwndTree, uint32_t style)
{
logmsg("FillCheckBoxTree");
@@ -30,9 +30,9 @@ void FillCheckBoxTree(HWND hwndTree, DWORD style) }
}
-DWORD MakeCheckBoxTreeFlags(HWND hwndTree)
+uint32_t MakeCheckBoxTreeFlags(HWND hwndTree)
{
- DWORD flags = 0;
+ uint32_t flags = 0;
logmsg("MakeCheckBoxTreeFlags");
diff --git a/plugins/wbOSD/src/stdafx.h b/plugins/wbOSD/src/stdafx.h index 41a85c54ab..3a81b1f417 100644 --- a/plugins/wbOSD/src/stdafx.h +++ b/plugins/wbOSD/src/stdafx.h @@ -92,7 +92,7 @@ typedef struct _plgsettings { wchar_t msgformat[256];
int winx, winy, winxpos, winypos, alpha, transparent, timeout;
COLORREF clr_msg, clr_status, clr_shadow, bkclr;
- DWORD announce, showWhen;
+ uint32_t announce, showWhen;
LOGFONT lf;
} plgsettings;
|