program Guid;
{$APPTYPE CONSOLE}
uses
SysUtils;
var
Uid: TGuid;
Result: HResult;
begin
Result := CreateGuid(Uid);
if Result = S_OK then
WriteLn(GuidToString(Uid));
end.
Under the covers CreateGuid()
calls one of the various APIs, depending on the platform. For example on Windows, it nowadays calls UuidCreate
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…