New Function GetNetCardInfo
Posted: Tue May 31, 2011 2:13 am
Hello
New function GetNetCardInfo() return a array with information about a particular network adapter on the local computer.
the source code is reserved by fivewin...
example
http://www.sitasoft.net/fivewin/samples/getmac.zip
New function GetNetCardInfo() return a array with information about a particular network adapter on the local computer.
the source code is reserved by fivewin...
example
http://www.sitasoft.net/fivewin/samples/getmac.zip
Code: Select all
#include "fivewin.ch"
//positions inside array returned by GetNetCardInfo()
#define ADP_NAME 1 //An ANSI character string of the name of the adapter. (STRING)
#define ADP_DESCRIPTION 2 //An ANSI character string that contains the description
//of the adapter. (STRING)
#define ADP_ADDRESS 3 //The hardware address for the adapter (STRING)
#define ADP_INDEX 4 //The adapter index.
//The adapter index may change when an adapter is disabled
//and then enabled, or under other circumstances,
//and should not be considered persistent.(NUMERIC)
#define ADP_TYPE 5 //The adapter type. see define list type (bellow) (NUMERIC)
#define ADP_DHCPENABLED 6 //An option value that specifies whether the dynamic host
//configuration protocol (DHCP) is enabled for this adapter.(LOGICAL)
#define ADP_ADDRESSLIST 7 //The list of IPv4 addresses associated with this adapter(STRING)
#define ADP_GATEWAY 8 //The IPv4 address of the gateway for this adapter (STRING)
#define ADP_DHCPSERVER 9 //The IPv4 address of the DHCP server for this adapter represented(STRING)
#define ADP_HAVEWINS 10 //An option value that specifies whether this adapter uses (LOGICAL)
//the Windows Internet Name Service (WINS).(LOGICAL)
#define ADP_PRIMARY 11 //the IPv4 address of the primary WINS server
#define ADP_SECUNDARY 12 //The IPv4 address of the secondary WINS server
//Types
#define MIB_IF_TYPE_OTHER 1 //Some other type of network interface.
#define MIB_IF_TYPE_ETHERNET 6 //An Ethernet network interface.
#define MIB_IF_TYPE_TOKENRING 9
#define MIB_IF_TYPE_PPP 23 //A PPP network interface.
#define MIB_IF_TYPE_LOOPBACK 24 //A software loopback network interface.
#define MIB_IF_TYPE_SLIP 28 //An ATM network interface.
#define IF_TYPE_IEEE80211 71 //An IEEE 802.11 wireless network interface.
//Note This adapter type is returned on Windows Vista and later.
//On Windows Server 2003 and Windows XP ,
//an IEEE 802.11 wireless network interface returns an adapter
//type of MIB_IF_TYPE_ETHERNET.
function main()
xbrowse( GetNetCardInfo() )
return nil