?? mfnettraffic.h
字號:
// MFNetTraffic.h: interface for the MFNetTraffic class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_MFNETTRAFFIC_H__9CA9C41F_F929_4F26_BD1F_2B5827090494__INCLUDED_)
#define AFX_MFNETTRAFFIC_H__9CA9C41F_F929_4F26_BD1F_2B5827090494__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <afxtempl.h>
class MFNetTraffic
{
public:
enum TrafficType //流量類型
{
AllTraffic = 388,//總的流量
IncomingTraffic = 264,//輸入流量
OutGoingTraffic = 506 //輸出流量
};
void SetTrafficType(int trafficType); //設置流量類型
DWORD GetInterfaceTotalTraffic(int index); //得到index索引接口的總流量
BOOL GetNetworkInterfaceName(CString *InterfaceName, int index);//得到網絡接口名字
int GetNetworkInterfacesCount(); //得到接口的數目
double GetTraffic(int interfaceNumber); //得到流量
DWORD GetInterfaceBandwidth(int index); //得到index索引接口的帶寬
MFNetTraffic();
virtual ~MFNetTraffic();
private:
BOOL GetInterfaces();
double lasttraffic;
CStringList Interfaces;
CList < DWORD, DWORD &> Bandwidths; //帶寬
CList < DWORD, DWORD &> TotalTraffics;//總的流量
int CurrentInterface;
int CurrentTrafficType;
};
#endif // !defined(AFX_MFNETTRAFFIC_H__9CA9C41F_F929_4F26_BD1F_2B5827090494__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -