P.S. riguardo la funzione CreateCode che ho postato che usa microtime come seme, secondo me dovrebbe garantire l'unicità a meno che due pesone nello stesso microsecondo facciano la stessa operazione.

Sbaglio?