I take a look at "adapterinfo_beta.zip" and im triying to get MAC ADDRESS from every adapter ... but dont work.

invoke SetDlgItemText,hWnd,IDC_MAC,ADDR .Address


:?
Posted on 2002-06-12 11:43:06 by hunter
You must assume edi to be an IP_ADAPTER_INFO before the call.

assume edi:ptr IP_ADAPTER_INFO
Posted on 2002-06-20 22:19:52 by rdaneel
mov edi,AdapterMem
assume edi:PTR IP_ADAPTER_INFO

.WHILE edi

invoke SendDlgItemMessageA,hWnd,1100,CB_INSERTSTRING,curAdapter,ADDR .Description <- this works!


..............


invoke SetDlgItemText,hWnd,1102,ADDR .Address <- this not :(

.....

and the rest works ok! :???


and other question for the stats (GetIpStatistics, GetTcpStatistics ...)


mov edi,IpStats
assume edi:PTR MIB_IPSTATS

error A2022: instruction operands must be the same size


mov edi,IpStats
assume di:PTR MIB_IPSTATS

error A2158: type is wrong size for register
error A2022: instruction operands must be the same size


i`m a bit confused X)
Posted on 2002-06-21 03:39:43 by hunter
Do a search on "MAC Address" and you will find that several working examples are noteworthy.

MAC_NIC.zip ( yes, I uploaded that one. ) has code that walks through the LANA adapters for your system. With some insights, I gleaned from my experience in doing the some thing.

Enjoy your work, P1
Posted on 2002-06-21 12:13:04 by Pone
yeah but i dont want to use netbios or other method if i can use 'iphlp' API. i dont understand WHY doesnt work ONKY with the MAC address field ...

typedef struct _IP_ADAPTER_INFO {
struct _IP_ADAPTER_INFO* Next;
DWORD ComboIndex;
char AdapterName;
char Description;
UINT AddressLength;
BYTE Address;
DWORD Index;
UINT Type;
UINT DhcpEnabled;
PIP_ADDR_STRING CurrentIpAddress;
IP_ADDR_STRING IpAddressList;
IP_ADDR_STRING GatewayList;
IP_ADDR_STRING DhcpServer;
BOOL HaveWins;
IP_ADDR_STRING PrimaryWinsServer;
IP_ADDR_STRING SecondaryWinsServer;
time_t LeaseObtained;
time_t LeaseExpires;
} IP_ADAPTER_INFO, *PIP_ADAPTER_INFO;



AddressLength
Specifies the length of the hardware address for the adapter.
Address
Specifies the hardware address for the adapter.
Posted on 2002-06-23 17:45:26 by hunter