1.delphiè·åMACå°å代ç
delphiè·åMACå°å代ç
å¯ä»¥ç¨ä»¥ä¸å½æ°:
uses NB;
function GetMACAdress: string; //uses NB;
var
NCB: PNCB;
Adapter: PAdapterStatus;
URetCode: PChar;
RetCode: char;
I: integer;
Lenum: PlanaEnum;
_SystemID: string;
TMPSTR: string;
begin
Result := '';
_SystemID := '';
Getmem(NCB,源码社区系统源码搭建教程图片 SizeOf(TNCB));
Fillchar(NCB^, SizeOf(TNCB), 0);
Getmem(Lenum, SizeOf(TLanaEnum));
Fillchar(Lenum^, SizeOf(TLanaEnum), 0);
Getmem(Adapter, SizeOf(TAdapterStatus));
Fillchar(Adapter^, SizeOf(TAdapterStatus), 0);
Lenum.Length := chr(0);
NCB.ncb_command := chr(NCBENUM);
NCB.ncb_buffer := Pointer(Lenum);
NCB.ncb_length := SizeOf(Lenum);
RetCode := Netbios(NCB);
i := 0;
repeat
Fillchar(NCB^, SizeOf(TNCB), 0);
Ncb.ncb_command := chr(NCBRESET);
Ncb.ncb_lana_num := lenum.lana[I];
RetCode := Netbios(Ncb);
Fillchar(NCB^, SizeOf(TNCB), 0);
Ncb.ncb_command := chr(NCBASTAT);
Ncb.ncb_lana_num := lenum.lana[I];
// Must be
Ncb.ncb_callname := ('*');
Ncb.ncb_buffer := Pointer(Adapter);
Ncb.ncb_length := SizeOf(TAdapterStatus);
RetCode := Netbios(Ncb);
//---- calc _systemId from mac-address[2-5] XOR mac-address[1]...
if (RetCode = chr(0)) or (RetCode = chr(6)) then
begin
_SystemId := IntToHex(Ord(Adapter.adapter_address[0]), 2) + '-' +
IntToHex(Ord(Adapter.adapter_address[1]), 2) + '-' +
IntToHex(Ord(Adapter.adapter_address[2]), 2) + '-' +
IntToHex(Ord(Adapter.adapter_address[3]), 2) + '-' +
IntToHex(Ord(Adapter.adapter_address[4]), 2) + '-' +
IntToHex(Ord(Adapter.adapter_address[5]), 2);
end;
Inc(i);
until (I >= Ord(Lenum.Length)) or (_SystemID <> '-----');
FreeMem(NCB);
FreeMem(Adapter);
FreeMem(Lenum);
GetMacAdress := _SystemID;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
wxymac : String;
begin
wxymac:=GetMACAdress;
end;
2025-01-19 23:47105人浏览
2025-01-19 23:252802人浏览
2025-01-19 22:421875人浏览
2025-01-19 21:522926人浏览
2025-01-19 21:43228人浏览
2025-01-19 21:261308人浏览
台湾电影最近在大陆观众的视野中似有回暖之势。继《周处除三害》票房大爆后,另一部收获金马奖青睐的电影也在大陆吸引了不少关注。获得金马奖最佳导演、最佳男配角、最佳配乐等奖项的《老狐狸》,由侯孝贤门下弟子萧
1.隐藏进程之FU怎么用?2.the special wishes come from zck.exe 怎么制作隐藏进程之FU怎么用? 下面简单介绍一下<隐藏外挂进程之FU>的使用方法
1.深圳市国御文物公司有了解的吗?2.湖北省文化市场管理暂行条例第七章美术作品及文物市场管理深圳市国御文物公司有了解的吗? 深圳市国御文物有限公司成立于年月日,注册地位于深圳市福田区沙头街道新洲南