Answered by:
Tool to generate unique GUIDs?

Question
-
Hi,
Does Visual Studio 2008 contain a tool that can generate unique GUIDs? I remember there is such one but cannot find it. If there are no such tools, then is there a function to do the task?
Thanks
Friday, August 3, 2018 7:05 AM
Answers
-
GuidGen ?
- Proposed as answer by Guido Franzke Friday, August 3, 2018 7:32 AM
- Marked as answer by chcw Wednesday, August 8, 2018 1:38 AM
Friday, August 3, 2018 7:26 AM -
Friday, August 3, 2018 10:18 AM
-
You also can use uuidCreate()
or
GUID guid; OLECHAR szGUID[40] ={0}; if(::CoCreateGuid(&guid) == S_OK) { if(::StringFromGUID2(guid,szGUID,GUID_STRING_LEN)!=0) { std::string strGUID = MBFromW(szGUID,CP_ACP); // This GUID contain open and close curly {} braces ,remove them before using it } }
Thanks
Rupesh Shukla
Friday, August 3, 2018 3:04 PM
All replies
-
GuidGen ?
- Proposed as answer by Guido Franzke Friday, August 3, 2018 7:32 AM
- Marked as answer by chcw Wednesday, August 8, 2018 1:38 AM
Friday, August 3, 2018 7:26 AM -
Friday, August 3, 2018 10:18 AM
-
You also can use uuidCreate()
or
GUID guid; OLECHAR szGUID[40] ={0}; if(::CoCreateGuid(&guid) == S_OK) { if(::StringFromGUID2(guid,szGUID,GUID_STRING_LEN)!=0) { std::string strGUID = MBFromW(szGUID,CP_ACP); // This GUID contain open and close curly {} braces ,remove them before using it } }
Thanks
Rupesh Shukla
Friday, August 3, 2018 3:04 PM