How to generate a less random GUID

A

aaronfude

Hi,

I would like all of my GUID's to start with letters AF (my initials,
which is a bit lucky) so I can then easily identify them as likely
mine. Is there a way to produce such ID's w/o doing it manually until
one get lucky?

Thanks,

Aaron
 
P

Patrick Schmid [MVP]

Not really.
You could automate the manual process by writing a program that
generates new GUIDs (using the Win32 API) until it gets one with AF in
front. But that program could run for a very long time...

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Office 2007 RTM Issues: http://pschmid.net/blog/2006/11/13/80
***
Customize Office 2007: http://pschmid.net/office2007/customize
RibbonCustomizer Add-In: http://pschmid.net/office2007/ribboncustomizer
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed
 
D

David Thielen

A GUID is not so much guaranteed to be unique as it is statistically very
unlikely to be a duplicate. Changing 2 chars in one lowers the odds slightly
but not much.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




Patrick Schmid said:
But then it would not be guaranteed to be unique anymore.

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Office 2007 RTM Issues: http://pschmid.net/blog/2006/11/13/80
***
Customize Office 2007: http://pschmid.net/office2007/customize
RibbonCustomizer Add-In: http://pschmid.net/office2007/ribboncustomizer
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed

Sure - generate a GUID and replace the first 2 chars with AF.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
A

aaronfude

And how badly will the system malfunction if it happens to be a
duplicate of something else? What will happen?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top