Mastodon
Programmierung

How to create unique strings

> Hi
>
> How can I make really really really, extremely, unique names??? I need
> about 100 of them at a time, so Random, GetTempPath(i think), wont work…
> Anyone has any idea?

[code lang=”delphi”]uses
ComObj, ActiveX;

var
ID: TGUID;
AUniqueString: string;

if CoCreateGUID(ID) = S_OK then
AUniqueString := GUIDToString(ID);[/code]

[tags]Delphi, API[/tags]

0 Kommentare zu “How to create unique strings

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht.