From cddcd7483a7c472598af098e759e5d309024f606 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 26 Dec 2021 20:31:39 +0300 Subject: DWORD -> uint32_t --- protocols/ConnectionNotify/src/ConnectionNotify.cpp | 10 +++++----- protocols/ConnectionNotify/src/netstat.cpp | 2 +- protocols/ConnectionNotify/src/netstat.h | 2 +- protocols/ConnectionNotify/src/pid2name.cpp | 2 +- protocols/ConnectionNotify/src/pid2name.h | 2 +- protocols/ConnectionNotify/src/stdafx.h | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) (limited to 'protocols/ConnectionNotify/src') diff --git a/protocols/ConnectionNotify/src/ConnectionNotify.cpp b/protocols/ConnectionNotify/src/ConnectionNotify.cpp index f6fd89cb20..df5997621c 100644 --- a/protocols/ConnectionNotify/src/ConnectionNotify.cpp +++ b/protocols/ConnectionNotify/src/ConnectionNotify.cpp @@ -11,8 +11,8 @@ HANDLE hFilterOptionsThread = nullptr; HANDLE killCheckThreadEvent = nullptr; HANDLE hExceptionsMutex = nullptr; -DWORD FilterOptionsThreadId; -DWORD ConnectionCheckThreadId; +uint32_t FilterOptionsThreadId; +uint32_t ConnectionCheckThreadId; CONNECTION *first = nullptr; CONNECTION *connExceptions = nullptr; @@ -144,8 +144,8 @@ void LoadSettings() g_plugin.iDefaultAction = g_plugin.getByte("FilterDefaultAction", TRUE); g_plugin.bSetColours = g_plugin.getBool("PopupSetColours"); - g_plugin.BgColor = g_plugin.getDword("PopupBgColor", (DWORD)0xFFFFFF); - g_plugin.FgColor = g_plugin.getDword("PopupFgColor", (DWORD)0x000000); + g_plugin.BgColor = g_plugin.getDword("PopupBgColor", (uint32_t)0xFFFFFF); + g_plugin.FgColor = g_plugin.getDword("PopupFgColor", (uint32_t)0x000000); g_plugin.iFiltersCount = g_plugin.getDword("FiltersCount"); g_plugin.iStatusMask = g_plugin.getWord("StatusMask", 16); for (int i = 0; i < MAX_STATUS_COUNT; i++) { @@ -318,7 +318,7 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA } //show popup -void showMsg(wchar_t *pName, DWORD pid, wchar_t *intIp, wchar_t *extIp, int intPort, int extPort, int state) +void showMsg(wchar_t *pName, uint32_t pid, wchar_t *intIp, wchar_t *extIp, int intPort, int extPort, int state) { CONNECTION *mpd = (CONNECTION*)mir_alloc(sizeof(CONNECTION)); diff --git a/protocols/ConnectionNotify/src/netstat.cpp b/protocols/ConnectionNotify/src/netstat.cpp index 6efa62533c..b682ddea24 100644 --- a/protocols/ConnectionNotify/src/netstat.cpp +++ b/protocols/ConnectionNotify/src/netstat.cpp @@ -33,7 +33,7 @@ CONNECTION *GetConnectionsTable() //printf("Number of entries: %d\n", (int) pTcpTable->dwNumEntries); struct in_addr IpAddr; CONNECTION *connHead = nullptr; - for (DWORD i = 0; i < pTcpTable->dwNumEntries; i++) { + for (uint32_t i = 0; i < pTcpTable->dwNumEntries; i++) { CONNECTION *newConn = (CONNECTION*)mir_alloc(sizeof(CONNECTION)); memset(newConn, 0, sizeof(CONNECTION)); //pid2name(pTcpTable->table[i].dwOwningPid,&newConn->Pname); diff --git a/protocols/ConnectionNotify/src/netstat.h b/protocols/ConnectionNotify/src/netstat.h index de54663906..8272defa2a 100644 --- a/protocols/ConnectionNotify/src/netstat.h +++ b/protocols/ConnectionNotify/src/netstat.h @@ -7,7 +7,7 @@ struct CONNECTION int intIntPort; int intExtPort; int state; - DWORD Pid; + uint32_t Pid; wchar_t PName[260]; CONNECTION *next; }; diff --git a/protocols/ConnectionNotify/src/pid2name.cpp b/protocols/ConnectionNotify/src/pid2name.cpp index f5c10ca9e6..0a4cc90d67 100644 --- a/protocols/ConnectionNotify/src/pid2name.cpp +++ b/protocols/ConnectionNotify/src/pid2name.cpp @@ -1,6 +1,6 @@ #include "stdafx.h" -void pid2name(DWORD procid, wchar_t *buffer, size_t bufLen) +void pid2name(uint32_t procid, wchar_t *buffer, size_t bufLen) { PROCESSENTRY32 ProcessStruct; ProcessStruct.dwSize = sizeof(PROCESSENTRY32); diff --git a/protocols/ConnectionNotify/src/pid2name.h b/protocols/ConnectionNotify/src/pid2name.h index 96338a14b1..493379b8aa 100644 --- a/protocols/ConnectionNotify/src/pid2name.h +++ b/protocols/ConnectionNotify/src/pid2name.h @@ -3,6 +3,6 @@ #ifndef _INC_PID2NAME #define _INC_PID2NAME -void pid2name(DWORD, wchar_t*, size_t); +void pid2name(uint32_t, wchar_t*, size_t); #endif diff --git a/protocols/ConnectionNotify/src/stdafx.h b/protocols/ConnectionNotify/src/stdafx.h index cbb3bb9ef0..436385367b 100644 --- a/protocols/ConnectionNotify/src/stdafx.h +++ b/protocols/ConnectionNotify/src/stdafx.h @@ -54,7 +54,7 @@ struct CMPlugin : public PLUGIN int Unload() override; }; -void showMsg(wchar_t *pName,DWORD pid,wchar_t *intIp,wchar_t *extIp,int intPort,int extPort,int state); +void showMsg(wchar_t *pName,uint32_t pid,wchar_t *intIp,wchar_t *extIp,int intPort,int extPort,int state); static unsigned __stdcall checkthread(void *dummy); CONNECTION * LoadSettingsConnections(); void saveSettingsConnections(CONNECTION *connHead); @@ -62,7 +62,7 @@ void LoadSettings(); extern CONNECTION *connExceptions; extern HANDLE hFilterOptionsThread; -extern DWORD FilterOptionsThreadId; +extern uint32_t FilterOptionsThreadId; extern CONNECTION *connCurrentEdit; extern HANDLE hExceptionsMutex; extern BOOL bOptionsOpen; -- cgit v1.2.3