Home > Back-end >  C Builder5 read MAC address
C Builder5 read MAC address

Time:10-11

How in c + + builder5 read the MAC address of card, please advise;

CodePudding user response:

The search is a major
http://bbs.csdn.net/topics/190155711
http://download.csdn.net/download/skysonya_shisy/2436246
Too much, can search of baidu, Google keyword in c + + builder MAC address

CodePudding user response:

BCB6 I ever did, I'll give you a look oh

CodePudding user response:

 
AnsiString __fastcall GetNetCardNumber ()//MAC
{
ASTAT Adapter.
NCB NCB;
UCHAR uRetCode;
Memset (& amp; NCB, 0, sizeof (NCB));
NCB. Ncb_command=NCBRESET;
NCB. Ncb_lana_num=0;
Netbios (& amp; NCB);
Memset (& amp; NCB, 0, sizeof (NCB));
NCB. Ncb_command=NCBASTAT;
NCB. Ncb_lana_num=0;
Strcpy (NCB (char *) ncb_callname, "*");
NCB. Ncb_buffer=(unsigned char *) & amp; Adapter.
NCB. Ncb_length=sizeof (Adapter);
URetCode=Netbios (& amp; NCB);
AnsiString STR="";
If (uRetCode==0)
{
02 x - STR. Printf (" % % % % 02 x - 02 x - 02 x - 02 x - 02 x % % ",
Adapter. Adapt. Adapter_address [0],
Adapter. Adapt. Adapter_address [1],
Adapter. Adapt. Adapter_address [2],
Adapter. Adapt. Adapter_address [3],
Adapter. Adapt. Adapter_address [4],
Adapter. Adapt. Adapter_address [5]);
Return the STR;
}
The else
{
Return "MAC Error!" ;
}
}

Like is a, you try
  • Related