Thanks. I hadn't seen UUID. But I don't see installing it is possible on windows?
As for your testing, if you generate them sequentially, there is probably little danger of collision, but what happens if two (or more) concurrent processes or threads call it at the same time?
My program is threaded and different threads will be generating their own spill files concurrently so this is a significant possibility. And most "UUID" simulate the "clock sequence" value of the spec. which is meant to be initialised once per system/NIC card change using per process globals derived from the same time source as they use for the time component, rendering its purpose negated.
In reply to Re^4: Generate a unique ID
by BrowserUk
in thread Generate a unique ID
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |