产生不重复的随机数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;




你可能感兴趣的:(随机数)