Archived

This topic is now archived and is closed to further replies.

Infinisearch

GUID's, CLSID's????

Recommended Posts

What are they? Does the programmer have do deal with them manually or does the compiler do it? I remember vaguely read about GUID''s and how they are used so u can prevent the user from opening multiple copies of your program at the same time, is this correct? Thanks for any help in advance. -potential energy is easily made kinetic-

Share this post


Link to post
Share on other sites
quote:
Original post by Infinisearch
What are they?

GUID = G lobally U nique Id entifiers.
CLSID = Cl as s Id entifier.
They''re really just extensive 128-bit symbols that are guaranteed to be universally unique, no matter how many different developers on different computers churn out IDs by the hour.

quote:
Does the programmer have do deal with them manually or does the compiler do it?

Manually. There is a tool to generate them, and large/popular APIs will provide mnemonic aliases so you don''t have to remember that {1DD9E8DA-1C77-4D40-B0CF-98FEFDFF9512} is the IID for IDirect3D8.

quote:
I remember vaguely read about GUID''s and how they are used so u can prevent the user from opening multiple copies of your program at the same time, is this correct?

No. To prevent multiple copies of your application you can query the OS whether an existing app with the same title exists, or you can use named mutexes.

[ GDNet Start Here | GDNet FAQ | MS RTFM | STL | Google ]
Thanks to Kylotan for the idea!

Share this post


Link to post
Share on other sites
quote:
Original post by Oluseyi
GUID = G lobally U nique Id entifiers.
CLSID = Cl as s Id entifier.
They''re really just extensive 128-bit symbols that are guaranteed to be universally unique, no matter how many different developers on different computers churn out IDs by the hour.

how does that work?

--- krez (krezisback@aol.com)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by krez
[quote]Original post by Oluseyi
GUID = G lobally U nique Id entifiers.
CLSID = Cl as s Id entifier.
They''re really just extensive 128-bit symbols that are guaranteed to be universally unique, no matter how many different developers on different computers churn out IDs by the hour.

how does that work?

--- krez (<A HREF="mailto:krezisback@aol.com">krezisback@aol.com</A>

Basically a random number generator seeded with system info on the generating system. It''s partially based off of the unique NIC id on your network card. As a matter of fact, the only time GUIDs aren''t guaranteeded unique is when they''re generated on a machine without a lan adaptor.

Share this post


Link to post
Share on other sites