📄 proclist.h
字号:
#pragma once
#include <list>
using namespace std;
// process key stucture
typedef struct _PROCKEY
{
DWORD dwPid;
char cProtocol;
char cReserved[3];
DWORD dwLocalIP;
DWORD dwRemoteIP;
WORD wLocalPort;
WORD wRemotePort;
} PROCKEY_S;
// list node structure
typedef struct _NETPROC
{
PROCKEY_S stProcessKey;
TCHAR szState[16];
TCHAR szPath[MAX_PATH];
} NETPROC_S;
typedef struct _SYSPROC
{
DWORD dwPid;
WORD wPriority;
WORD wThreads;
DWORD dwMemUsage;
TCHAR szPath[MAX_PATH];
} SYSPROC_S;
// CProcList definition
class CProcList :
public list<NETPROC_S *>
{
public:
CProcList(void);
~CProcList(void);
BOOL CompareKey(PROCKEY_S *pKeyFirst, PROCKEY_S *pKeySecond)
{
if( !(pKeyFirst && pKeySecond) )
{
return FALSE;
}
if( (pKeyFirst->dwPid == pKeySecond->dwPid)
&& (pKeyFirst->cProtocol == pKeySecond->cProtocol)
&& (pKeyFirst->dwLocalIP == pKeySecond->dwLocalIP)
&& (pKeyFirst->wLocalPort == pKeySecond->wLocalPort)
&& (pKeyFirst->dwRemoteIP == pKeySecond->dwRemoteIP)
&& (pKeyFirst->wRemotePort == pKeySecond->wRemotePort) )
{
return TRUE;
}
return FALSE;
}
NETPROC_S *FindProc(PROCKEY_S *pstProcKey);
void RemoveAll(void);
void AddNetProc(NETPROC_S *pstNetProc);
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -