www.pudn.com > IP_phone.rar > NetSettingInfo.h


/**********************************************************/ 
/*类名:CSystemInfo                                       */ 
/*简述:网络信息检测类                                    */ 
/**********************************************************/ 
// NetSettingInfo.h: interface for the CNetSettingInfo class. 
// 
////////////////////////////////////////////////////////////////////// 
 
#if !defined(AFX_NETSETTINGINFO_H__60629401_6A01_4FB5_8FD3_7AB8ADDE1C87__INCLUDED_) 
#define AFX_NETSETTINGINFO_H__60629401_6A01_4FB5_8FD3_7AB8ADDE1C87__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
//引入所需头文件 
#include "Iphlpapi.h" 
#include 		// MFC socket extensions 
 
#define IDP_SOCKETS_INIT_FAILED         103//用于socket初始化 
 
//typedef  DWORD(CALLBACK * PGNOINTERFACE)(PDWORD);//GetNumberOfInterfaces 
typedef  DWORD(CALLBACK * PGAINFO)(PIP_ADAPTER_INFO,PULONG);//GetAdaptersInfo 
//typedef  DWORD(CALLBACK * PGIINFO)(PIP_INTERFACE_INFO,PULONG );//GetInterfaceInfo 
//typedef  DWORD(CALLBACK * PGIAT)(PMIB_IPADDRTABLE,PULONG,BOOL);//GetIpAddrTable 
//typedef  DWORD(CALLBACK * PAIA)(IPAddr,IPMask,DWORD,PULONG,PULONG);//AddIPAddress 
 
/*****************网络信息结构*******************/ 
typedef struct _NETINFO 
{ 
	char HostName[128];	        //主机名 
 
	CString AdapterName;		//网卡名 
	CString Description;		//网卡描述信息 
	CString AdapterType;		//网卡类型 
	CString MACAddress;		    //网卡地址 
	CString IpAddress;		    //绑定于网卡的IP地址 
	CString SubNet;		        //子网掩码 
	CString GateWay;	        //默认网关 
	CString WinsServer;	        //Wins 服务器数据 
	CString DHCPServer;	        //DHCP 服务器数据 
 
}NETINFO, *LPNETINFO; 
 
/*****************网络信息检测类*******************/ 
class CNetSettingInfo   
{ 
public: 
	CNetSettingInfo(); 
	virtual ~CNetSettingInfo(); 
      
	LPNETINFO GetNetInfo(); 
 
protected: 
	NETINFO m_lpNetInfo; 
 
}; 
 
#endif // !defined(AFX_NETSETTINGINFO_H__60629401_6A01_4FB5_8FD3_7AB8ADDE1C87__INCLUDED_)