首页 > 代码库 > 产生不重复的随机数TGUID

产生不重复的随机数TGUID

uses ActiveX;
procedure TForm1.BtnNewClick(Sender: TObject);
var
  ID: TGUID;
  S: string;
begin
  if CoCreateGuid (Id) = s_OK then
  begin
    s := GUIDToString (Id);
    Memo1.Lines.Add (S);
  end;
end;


来自为知笔记(Wiz)