Click here to Skip to main content
16,016,489 members
Home / Discussions / COM
   

COM

 
GeneralRe: CLSID's Pin
#realJSOP13-Oct-01 14:56
professional#realJSOP13-Oct-01 14:56 
GeneralRe: CLSID's Pin
#realJSOP13-Oct-01 15:42
professional#realJSOP13-Oct-01 15:42 
GeneralRe: CLSID's Pin
Not Active14-Oct-01 6:31
mentorNot Active14-Oct-01 6:31 
GeneralRe: CLSID's Pin
#realJSOP14-Oct-01 7:01
professional#realJSOP14-Oct-01 7:01 
GeneralRe: CLSID's Pin
Not Active14-Oct-01 9:10
mentorNot Active14-Oct-01 9:10 
GeneralRe: CLSID's Pin
#realJSOP14-Oct-01 10:29
professional#realJSOP14-Oct-01 10:29 
GeneralRe: CLSID's Pin
#realJSOP15-Oct-01 5:09
professional#realJSOP15-Oct-01 5:09 
GeneralRe: CLSID's Pin
Aaron Schaefer15-Oct-01 9:53
Aaron Schaefer15-Oct-01 9:53 
Hi John,

You can create consecutive GUID's with the UuidGen utility. Use the -nXXX command line switch. According to the MSDN documentation, you can create sequential guid's programmatically by creating a single GUID (with CoCreateGuid), and then incrementing the FIRST word of each subsequent GUID. So, I don't think you want to increment the last word of the GUID as shown, since this may result in non-unique GUID's; it appears that the first word of the set is the one that is generated from the time on the machine, not the last one. This should satisfy that the GUID's are unique across machines as well, since you aren't messing with the part that contains the MAC address of the machine.

// MSDN Documentation, search for "GUID Creation and Optimizations"
For example, if you were to type

uuidgen -n5 -s >guids.txt

the uuidgen utility would generate a block of UUIDs similar to the following:

{12340001-4980-1920-6788-123456789012}
{12340002-4980-1920-6788-123456789012}
{12340003-4980-1920-6788-123456789012}
{12340004-4980-1920-6788-123456789012}
{12340005-4980-1920-6788-123456789012}

One method for generating and tracking GUIDs for an entire project begins with generating a block of some arbitrarily large number of UUIDs—say, 500. For example, if you were to type

uuidgen -n500 -s >guids.txt

the utility would generate 500 consecutive UUIDs and write them to the specified text file. You could then check this file into your source tree, providing a single repository for all GUIDs to be used in a project. As people require GUIDs for their portions of the project, they can check out the file, take however many GUIDs they need, marking them as taken and leaving a note about where in the code or "spec" they are using them.


GeneralRe: CLSID's Pin
Tim Smith15-Oct-01 10:34
Tim Smith15-Oct-01 10:34 
GeneralRe: CLSID's Pin
#realJSOP16-Oct-01 2:58
professional#realJSOP16-Oct-01 2:58 
GeneralNetmeeting 3 -- help! Pin
aniel12-Oct-01 13:17
aniel12-Oct-01 13:17 
GeneralRe: Netmeeting 3 -- help! Pin
aniel15-Oct-01 8:15
aniel15-Oct-01 8:15 
GeneralCWnd inside a COleControl does'nt work Pin
Remi Morin12-Oct-01 5:38
Remi Morin12-Oct-01 5:38 
GeneralDCOMCNFG and InstallShield Pin
Firoz12-Oct-01 3:03
Firoz12-Oct-01 3:03 
GeneralRe: DCOMCNFG and InstallShield Pin
Tim Smith12-Oct-01 3:11
Tim Smith12-Oct-01 3:11 
GeneralRe: DCOMCNFG and InstallShield Pin
Firoz14-Oct-01 19:26
Firoz14-Oct-01 19:26 
QuestionHOWTO: Pass VB string into VC++ created ATL Object? Pin
Tim Rymer11-Oct-01 10:31
Tim Rymer11-Oct-01 10:31 
AnswerRe: HOWTO: Pass VB string into VC++ created ATL Object? Pin
Chris Losinger11-Oct-01 10:33
professionalChris Losinger11-Oct-01 10:33 
GeneralCOM client structure Pin
Peter Molnar11-Oct-01 8:29
Peter Molnar11-Oct-01 8:29 
GeneralRe: COM client structure Pin
Amit Dey13-Oct-01 6:21
Amit Dey13-Oct-01 6:21 
GeneralRe: COM client structure Pin
Michael Dunn13-Oct-01 7:56
sitebuilderMichael Dunn13-Oct-01 7:56 
QuestionWhere I have to call CoUnInitialize function if I have COM interfaces in (MFC) application main class? Pin
Rula Ghabbiesh11-Oct-01 5:42
Rula Ghabbiesh11-Oct-01 5:42 
AnswerRe: Where I have to call CoUnInitialize function if I have COM interfaces in (MFC) application main class? Pin
Shadi Al-Kahwaji12-Oct-01 9:05
Shadi Al-Kahwaji12-Oct-01 9:05 
AnswerRe: Where I have to call CoUnInitialize function if I have COM interfaces in (MFC) application main class? Pin
Michael Dunn12-Oct-01 16:06
sitebuilderMichael Dunn12-Oct-01 16:06 
GeneralRe: Where I have to call CoUnInitialize function if I have COM interfaces in (MFC) application main class? Pin
Rula Ghabbiesh14-Oct-01 22:00
Rula Ghabbiesh14-Oct-01 22:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.