summaryrefslogtreecommitdiffstats
path: root/Source/CPack/WiX/cmCPackWIXGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CPack/WiX/cmCPackWIXGenerator.cxx')
-rw-r--r--Source/CPack/WiX/cmCPackWIXGenerator.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
index 91701c2..1b9b20a 100644
--- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx
+++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
@@ -23,6 +23,7 @@
#include <cmsys/SystemTools.hxx>
#include <cmsys/Directory.hxx>
+#include <cmsys/Encoding.hxx>
#include <rpc.h> // for GUID generation
@@ -954,11 +955,12 @@ std::string cmCPackWIXGenerator::GenerateGUID()
UUID guid;
UuidCreate(&guid);
- unsigned char *tmp = 0;
- UuidToString(&guid, &tmp);
+ unsigned short *tmp = 0;
+ UuidToStringW(&guid, &tmp);
- std::string result(reinterpret_cast<char*>(tmp));
- RpcStringFree(&tmp);
+ std::string result =
+ cmsys::Encoding::ToNarrow(reinterpret_cast<wchar_t*>(tmp));
+ RpcStringFreeW(&tmp);
return cmSystemTools::UpperCase(result);
}