-
January 23rd, 2004, 04:39 PM
#1
create a GUID using c++
Hi -
I want to create a GUID in c++ and then write the value to a table using ADO and SQL Server. I understand that SQL Server supports GUIDs as a data type ...
I only know how to use uuidgen.exe or guidgen.exe to create GUIDs ... is there a way in c++ ???
Peace!
Chris
-
January 23rd, 2004, 06:26 PM
#2
Henri Hein
Principal Engineer, Propel
Do not credit Propel with my views or opinions.
-
January 24th, 2004, 11:47 AM
#3
Thanks !!
Here is the code to round out the discussion ...
Thanks again!
Chris
_TUCHAR *guidStr = 0x00;
GUID *pguid = 0x00;
pguid = new GUID;
CoCreateGuid(pguid);
// Convert the GUID to a string
UuidToString(pguid, &guidStr);
delete pguid;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|