Make your own free website on Tripod.com
 
« February 2007 »
S M T W T F S
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28
You are not logged in. Log in

Programming Tips
Thursday, 22 February 2007
How to Create a GUID programmatically
Mood:  cool
Topic: VC++

Do the following... 

GUID guId = { 0 };
CoCreateGuid( &guId );

or
    
UUID uid = { 0 };
UuidCreate( &uid );

To convert to string use...

PUCHAR pChar = 0;
// Convert to string

UuidToString( &uid, &pChar );
MessageBox( NULL, (char*)pChar, NULL, MB_OK );

//Don't forget to free allocated string
RpcStringFree( &pChar );


Posted by Nibu babu thomas at 3:18 PM

View Latest Entries