ProjectGuid

  • Thread starter Thread starter 2G
  • Start date Start date
2

2G

Hi,

How is ProjectGuid generated? Or is it just some random generation.

Thanks.
 
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]
 

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

Back
Top