Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Cross-Platform-Entwicklung (https://www.delphipraxis.net/91-cross-platform-entwicklung/)
-   -   Hardware UUID auslesen? (https://www.delphipraxis.net/213519-hardware-uuid-auslesen.html)

softtouch 10. Aug 2023 15:57

Hardware UUID auslesen?
 
Weiss jemand, wie ich an die Hardware UUID unter macOS komme?
Das ist die, welche unter Hardware Overview auf dem Mac angezeigt wird, wo auch die System Serial, Memory und mehr angezeigt wird.

Sherlock 11. Aug 2023 09:48

AW: Hardware UUID auslesen?
 
Du könntest ausgehend von der Antwort auf diese Frage (https://stackoverflow.com/questions/...-x-programming) zu einer Lösung kommen. An Übersetzungen ObjectiveC -> Delphi hast Du Dich sicher schon gewöhnt...

Sherlock

softtouch 11. Aug 2023 10:51

AW: Hardware UUID auslesen?
 
Zitat:

Zitat von Sherlock (Beitrag 1525524)
Du könntest ausgehend von der Antwort auf diese Frage (https://stackoverflow.com/questions/...-x-programming) zu einer Lösung kommen. An Übersetzungen ObjectiveC -> Delphi hast Du Dich sicher schon gewöhnt...

Sherlock

Danke, schaue ich mir gleich mal an.

philipp.hofmann 11. Aug 2023 19:20

AW: Hardware UUID auslesen?
 
Ich mache es unter MacOS folgendermaßen:

Delphi-Quellcode:
var PlatformExpert: io_service_t;
    M: CFMutableDictionaryRef;
    SerialNumberAsCFString: CFTypeRef;
    _AnsiChar: PAnsiChar;
begin
  M := IOServiceMatching('IOPlatformExpertDevice');
  PlatformExpert := IOServiceGetMatchingService(kIOMasterPortDefault,CFDictionaryRef(M));
  SerialNumberAsCFString := IORegistryEntryCreateCFProperty(PlatformExpert, CFSTR('IOPlatformSerialNumber'),kCFAllocatorDefault,0);
    _AnsiChar := CFStringGetCStringPtr(SerialNumberAsCFString,0);
    Result := String(AnsiString(_AnsiChar));
    IOObjectRelease(PlatformExpert);
end;


Alle Zeitangaben in WEZ +1. Es ist jetzt 01:06 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz