@@ -18,6 +18,7 @@ #include #ifdef _WIN32 +#include #ifdef UUID_SYSTEM_GENERATOR #include @@ -613,7 +614,11 @@ namespace uuids #ifdef _WIN32 GUID newId; - ::CoCreateGuid(&newId); + HRESULT hr = ::CoCreateGuid(&newId); + if( hr < 0 ) + { + throw std::system_error(hr, std::system_category(), "CoCreateGuid"); + } std::array bytes = { {