Marina,
Why mostly the first half, instead of mostly the second half or even mostly
the middle half? Isn't which half an implementation detail that might
change? Especially considering the change to CoCreateGUID from NT 4.0 to
Windows 2000, as suggested by:
http://support.microsoft.com/default.aspx?scid=kb;en-us;275280
Which GUID format are you suggesting using ("N", "D", "B", or "P")? As each
one causes different delimiters to be included.
For the different GUID formats & their lengths try:
Dim aGuid As Guid = Guid.NewGuid
Debug.WriteLine(aGuid.ToString("N"), "N")
Debug.WriteLine(aGuid.ToString("N").Length, "N")
Debug.WriteLine(aGuid.ToString("D"), "D")
Debug.WriteLine(aGuid.ToString("D").Length, "D")
Debug.WriteLine(aGuid.ToString("B"), "B")
Debug.WriteLine(aGuid.ToString("B").Length, "B")
Debug.WriteLine(aGuid.ToString("P"), "P")
Debug.WriteLine(aGuid.ToString("P").Length, "P")
Return
Remember a Guid is 128-bit (16 byte) value, so taking the first 16
characters of a GUID just doubled the memory you are using! (16 Chars = 32
Bytes)
Hence I find it safest to simply use the full 16-byte GUID, as again I would
not rely on IMHO a fragile design!
BTW: The following KB article is interesting:
http://support.microsoft.com/default.aspx?scid=kb;en-us;320375
I would considering using one of those the routines presented to create a
short GUID, instead of slicing & dicing System.Guid.
Hope this helps
Jay