Autor Beitrag
Biarchiv
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 688



BeitragVerfasst: Di 13.03.07 19:56 
Hallo,

mit folgenden Code sollte man die MacAdresse aufrufen können.

Warum ändert sich der Wert aber bei jedem ausführen immer?

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
function CoCreateGuid(var guid: TGUID): HResult; stdcall; far external 'ole32.dll';
function GetMacAddress: PChar;
var
  id: TGUID;
  b: Byte;
begin
  Result := '';
  CoCreateGuid(id);
  for b := 2 to 7 do
    Result := PChar(Result + IntToHex(id.D4[b], 2));
end;
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Di 13.03.07 20:09 
weil das nicht die MAC Adresse ist, sondern eine GUID so wie es aussieht!

_________________
In the beginning was the word.
And the word was content-type: text/plain.
matze.de
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 576

Win95, Win98 SE, WinXp Prof SP2
D7P, D8P, FPC2.0
BeitragVerfasst: Mi 14.03.07 09:06 
Ja genau.. probier für die MAC Adresse mal folgendes: swissdelphicenter.ch.../showcode.php?id=651

mfg matze

_________________
si tacuisses, philosophus mansisses.