{"id":109011,"date":"2023-11-13T07:00:00","date_gmt":"2023-11-13T15:00:00","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/oldnewthing\/?p=109011"},"modified":"2023-11-13T07:19:29","modified_gmt":"2023-11-13T15:19:29","slug":"20231113-00","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20231113-00\/?p=109011","title":{"rendered":"What is the difference between UuidToString, StringFromCLSID, StringFromIID, and StringFromGUID2?"},"content":{"rendered":"<p>This is the counterpart article to <a title=\"What's the difference between UuidFromString, IIDFromString, CLSIDFromString, GUIDFromString...\" href=\"https:\/\/devblogs.microsoft.com\/oldnewthing\/20151015-00\/?p=91351\"> What&#8217;s the difference between UuidFromString, IIDFromString, CLSIDFromString, GUIDFromString&#8230;<\/a>.<\/p>\n<p>Here&#8217;s the table:<\/p>\n<table class=\"cp3\" style=\"border-collapse: collapse;\" border=\"1\" cellspacing=\"0\" cellpadding=\"3\">\n<tbody>\n<tr>\n<th rowspan=\"2\">Function<\/th>\n<th colspan=\"2\">Output<\/th>\n<\/tr>\n<tr>\n<th>Buffer management<\/th>\n<th>Character set support<\/th>\n<\/tr>\n<tr>\n<td rowspan=\"2\"><code>Uuid\u00adTo\u00adString<\/code><\/td>\n<td colspan=\"2\"><tt>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx<\/tt><\/td>\n<\/tr>\n<tr>\n<td>Free with <code>Rpc\u00adString\u00adFree<\/code><\/td>\n<td>ANSI and Unicode<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\"><code>String\u00adFrom\u00adIID<\/code><\/td>\n<td colspan=\"2\"><tt>{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}<\/tt><\/td>\n<\/tr>\n<tr>\n<td>Free with <code>Co\u00adTask\u00adMem\u00adFree<\/code><\/td>\n<td>Unicode only<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\"><code>String\u00adFrom\u00adCLSID<\/code><\/td>\n<td colspan=\"2\"><tt>{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}<\/tt><\/td>\n<\/tr>\n<tr>\n<td>Free with <code>Co\u00adTask\u00adMem\u00adFree<\/code><\/td>\n<td>Unicode only<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\"><code>String\u00adFrom\u00adGUID2<\/code><\/td>\n<td colspan=\"2\"><tt>{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}<\/tt><\/td>\n<\/tr>\n<tr>\n<td>Provided by caller<\/td>\n<td>Unicode only<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Since the size of a stringized <code>GUID<\/code>\/<wbr \/><code>UUID<\/code>\/<wbr \/><code>IID<\/code> is fixed, <code>String\u00adFrom\u00adGUID2<\/code> is probably the most convenient function to use, since you can just have it generate the string into its final destination.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Different ways of stringizing a GUID.<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[25],"class_list":["post-109011","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>Different ways of stringizing a GUID.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/109011","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=109011"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/109011\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=109011"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=109011"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=109011"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}