⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ethernetspyaboutdlg.cpp

📁 网卡驱动相关实例 这是和网卡NT KMD驱动程序有关的一些资料和例子。主要是以下三方面内容: 3.1 article 一些有用的文档 3.2 Canberra 网络诊听工具Ethern
💻 CPP
字号:
// EthernetSpyAboutDlg.cpp : implementation file
//

#include "stdafx.h"
#include "ethernetspy.h"
#include <winsock.h>
#include "packet32.h"
#include "ethernetspyreader.h"
#include "EthernetSpyAboutDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CEthernetSpyAboutDlg dialog


CEthernetSpyAboutDlg::CEthernetSpyAboutDlg(EthernetSpyReader* p, CWnd* pParent /*=NULL*/)
	: CDialog(CEthernetSpyAboutDlg::IDD, pParent)
{
	TCHAR Testo[255];
	int i;

	SpyReader = p;

	for(i=0; i<12; i+=2)
	{
		sprintf(&(Testo[i]), TEXT("%02X"), SpyReader->HardwareAddress[i/2]);
	}

	//{{AFX_DATA_INIT(CEthernetSpyAboutDlg)
	m_HwAddr = TEXT(Testo);
	m_IPAddr = inet_ntoa(*(in_addr*)(&SpyReader->IPAddress));
	m_NetCard = (WCHAR*)SpyReader->AdapterName;
	//}}AFX_DATA_INIT

}


void CEthernetSpyAboutDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CEthernetSpyAboutDlg)
	DDX_Text(pDX, IDC_HW_ADDR, m_HwAddr);
	DDX_Text(pDX, IDC_IP_ADDR, m_IPAddr);
	DDX_Text(pDX, IDC_NETCARD, m_NetCard);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CEthernetSpyAboutDlg, CDialog)
	//{{AFX_MSG_MAP(CEthernetSpyAboutDlg)
		// NOTE: the ClassWizard will add message map macros here
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CEthernetSpyAboutDlg message handlers

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -