

Zjištění MAC adresy v Pascal/assembler/DOS programu pod XP
Až do Windows98SE mi bez problémů fungovala funkce MS-DOS EEh, která vrací MAC adresu síťové karty. Pod XP mi to ale hází nějaký hausnumero.
Zřejmě Xp už nepodporují "staré" MS-DOS služby.
Poradíte někdo jestli existuje něco takového i pod XP? Zatím Googluju bezúspěchu
PROCEDURE GetNode( var hex_addr: string; var retcode: integer );
{ get the physical station address }
Const
Hex_Set :packed array[0..15] of char = '0123456789ABCDEF';
Begin { GetNode }
{Get the physical address from the Network Card}
Regs.Ah := $EE;
regs.ds := 0;
regs.es := 0;
MsDos(Regs);
hex_addr := '';
hex_addr := hex_addr + hex_set[(regs.ch shr 4)];
hex_addr := hex_addr + hex_set[(regs.ch and $0f)];
hex_addr := hex_addr + hex_set[(regs.cl shr 4) ];
hex_addr := hex_addr + hex_set[(regs.cl and $0f)];
hex_addr := hex_addr + hex_set[(regs.bh shr 4)];
hex_addr := hex_addr + hex_set[(regs.bh and $0f)];
hex_addr := hex_addr + hex_set[(regs.bl shr 4)];
hex_addr := hex_addr + hex_set[(regs.bl and $0f)];
hex_addr := hex_addr + hex_set[(regs.ah shr 4)];
hex_addr := hex_addr + hex_set[(regs.ah and $0f)];
hex_addr := hex_addr + hex_set[(regs.al shr 4)];
hex_addr := hex_addr + hex_set[(regs.al and $0f)];
retcode := 0;
End; { Getnode }
Funguje pod Vista, preložené v Delphi2007
Tohle je pokud tomu dobře rozumím zjišťování MAC adresy síťovky jiného počítače podle zadané IP. Já potřebuju zjistit MAC adresu siťovky počítače na kterém to spouštím, IP adresu ani nemusí mít nastavenu.
Tak hlásím, že problém je vyřešen, použil jsem jinou službu: E3h, která funguje i pod XP. Vlastně obchází XP a dotazuje se na MAC mého PC přes Novell server.