ProjectGuid

  • Thread starter Thread starter 2G
  • Start date Start date
How is ProjectGuid generated? Or is it just some random generation.

If it wouldn't be generated randomly it wouldn't be a GUID.
 
2G,

It is most likely generated through the CoCreateGuid function. When you
create a new Guid structure, this is ultimately called to generate a new
GUID.

Hope this helps.
 
How is ProjectGuid generated? Or is it just some random generation.
It's more the other way round: if it were randomly generated it would
not be a GUID. AFAIK CoCreateGuid() takes into account
machine-"specific" data and time.
However, MSDN says:

"To a very high degree of certainty, this function returns a unique
value – no other invocation, on the same or any other system (networked
or not), should return the same value."


Sure, this way it is guaranteed to be (almost) unique.
 
cody said:
If it wouldn't be generated randomly it wouldn't be a GUID.

It's more the other way round: if it were randomly generated it would
not be a GUID. AFAIK CoCreateGuid() takes into account
machine-"specific" data and time.
However, MSDN says:

"To a very high degree of certainty, this function returns a unique
value – no other invocation, on the same or any other system (networked
or not), should return the same value."

[http://msdn.microsoft.com/library/en-us/com/htm/cmf_a2c_05r8.asp]
 
Back
Top