Mercurial > hg > orthanc-wsi
diff Framework/Orthanc/Core/Toolbox.cpp @ 54:06847108819c
sync
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 24 Nov 2016 12:59:50 +0100 |
parents | 9621fd6f17c9 |
children |
line wrap: on
line diff
--- a/Framework/Orthanc/Core/Toolbox.cpp Thu Nov 17 15:47:09 2016 +0100 +++ b/Framework/Orthanc/Core/Toolbox.cpp Thu Nov 24 12:59:50 2016 +0100 @@ -77,18 +77,9 @@ #endif - -// Inclusions for UUID -// http://stackoverflow.com/a/1626302 - -extern "C" -{ -#ifdef WIN32 -# include <rpc.h> -#else -# include <uuid/uuid.h> +#if defined(_WIN32) +# include <windows.h> // For ::Sleep #endif -} #if ORTHANC_ENABLE_PUGIXML == 1 @@ -1226,28 +1217,6 @@ } - std::string Toolbox::GenerateUuid() - { -#ifdef WIN32 - UUID uuid; - UuidCreate ( &uuid ); - - unsigned char * str; - UuidToStringA ( &uuid, &str ); - - std::string s( ( char* ) str ); - - RpcStringFreeA ( &str ); -#else - uuid_t uuid; - uuid_generate_random ( uuid ); - char s[37]; - uuid_unparse ( uuid, s ); -#endif - return s; - } - - bool Toolbox::IsUuid(const std::string& str) { if (str.size() != 36)