CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Fri, 15 Aug 2025 20:18:38 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20080426005948
location: https://web.archive.org/web/20080426005948/https://www.daniweb.com/code/snippet473.html
server-timing: captures_list;dur=0.589435, exclusion.robots;dur=0.026872, exclusion.robots.policy;dur=0.014988, esindex;dur=0.011401, cdx.remote;dur=22.948790, LoadShardBlock;dur=287.291140, PetaboxLoader3.datanode;dur=126.053083, PetaboxLoader3.resolve;dur=54.113076
x-app-server: wwwb-app200
x-ts: 302
x-tr: 336
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=1
set-cookie: wb-p-SERVER=wwwb-app200; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Fri, 15 Aug 2025 20:18:39 GMT
content-type: text/html; charset=utf-8
x-archive-orig-date: Sat, 26 Apr 2008 00:59:48 GMT
x-archive-orig-server: Apache/2.2
x-archive-orig-x-powered-by: PHP/5.1.6
x-archive-orig-set-cookie: bblastvisit=1209165270; expires=Sun, 26-Apr-2009 00:59:48 GMT; path=/; domain=.daniweb.com
x-archive-orig-set-cookie: bblastactivity=0; expires=Sun, 26-Apr-2009 00:59:48 GMT; path=/; domain=.daniweb.com
x-archive-orig-cache-control: private
x-archive-orig-pragma: private
x-archive-orig-vary: Accept-Encoding,User-Agent
x-archive-orig-connection: close
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Sat, 26 Apr 2008 00:59:48 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Sat, 08 Apr 2006 07:00:22 GMT", ; rel="prev memento"; datetime="Wed, 12 Dec 2007 02:47:47 GMT", ; rel="memento"; datetime="Sat, 26 Apr 2008 00:59:48 GMT", ; rel="next memento"; datetime="Sat, 20 Sep 2008 15:27:53 GMT", ; rel="last memento"; datetime="Fri, 17 May 2013 16:00:20 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 51_3_20080425163614_crawl102-c/51_3_20080426004128_crawl104.arc.gz
server-timing: captures_list;dur=0.474477, exclusion.robots;dur=0.021467, exclusion.robots.policy;dur=0.012049, esindex;dur=0.012270, cdx.remote;dur=45.857333, LoadShardBlock;dur=194.884858, PetaboxLoader3.datanode;dur=163.526569, PetaboxLoader3.resolve;dur=236.428640, load_resource;dur=277.680286
x-app-server: wwwb-app200
x-ts: 200
x-tr: 587
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=1
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
Get MAC (Ethernet) Address of NIC - delphi
Get MAC (Ethernet) Address of NIC
•
•
•
•

What is DaniWeb IT Discussion Community?
You're currently browsing the Pascal and Delphi section within the Software Development category of DaniWeb, a massive community of 318,687 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,098 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Pascal and Delphi advertiser:
In case there are mote than one NIC (Network Interface Card) the coe gives the MAC of the first adapter. You can change the 0 on the line qoted below to take the MAC of other NICs if present.
"Result := GetAdapterInfo(AdapterList.lana[0]) "
"Result := GetAdapterInfo(AdapterList.lana[0]) "
uses NB30; function GetAdapterInfo(Lana: Char): String; var Adapter: TAdapterStatus; NCB: TNCB; begin FillChar(NCB, SizeOf(NCB), 0); NCB.ncb_command := Char(NCBRESET); NCB.ncb_lana_num := Lana; if Netbios(@NCB) <> Char(NRC_GOODRET) then begin Result := 'mac not found'; Exit; end; FillChar(NCB, SizeOf(NCB), 0); NCB.ncb_command := Char(NCBASTAT); NCB.ncb_lana_num := Lana; NCB.ncb_callname := '*'; FillChar(Adapter, SizeOf(Adapter), 0); NCB.ncb_buffer := @Adapter; NCB.ncb_length := SizeOf(Adapter); if Netbios(@NCB) <> Char(NRC_GOODRET) then begin Result := 'mac not found'; Exit; end; Result := IntToHex(Byte(Adapter.adapter_address[0]), 2) + '-' + IntToHex(Byte(Adapter.adapter_address[1]), 2) + '-' + IntToHex(Byte(Adapter.adapter_address[2]), 2) + '-' + IntToHex(Byte(Adapter.adapter_address[3]), 2) + '-' + IntToHex(Byte(Adapter.adapter_address[4]), 2) + '-' + IntToHex(Byte(Adapter.adapter_address[5]), 2); end; function GetMACAddress: string; var AdapterList: TLanaEnum; NCB: TNCB; begin FillChar(NCB, SizeOf(NCB), 0); NCB.ncb_command := Char(NCBENUM); NCB.ncb_buffer := @AdapterList; NCB.ncb_length := SizeOf(AdapterList); Netbios(@NCB); if Byte(AdapterList.length) > 0 then Result := GetAdapterInfo(AdapterList.lana[0]) else Result := 'mac not found'; end; // usage procedure TForm1.Button1Click(Sender: TObject); begin ShowMessage(GetMACAddress); end;
Post Comment
•
•
•
•
DaniWeb Marketplace (Sponsored Links)
- Today's Posts
- Unanswered Threads
Related Features
DANIWEB FEATURE INDEX
ADVERTISEMENT
STATISTICS