Delphi UUID generator

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.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)