guid.hpp 278 B

123456789101112131415161718
  1. #pragma once
  2. #include <nall/string.hpp>
  3. namespace nall {
  4. inline auto guid() -> string {
  5. GUID guidInstance;
  6. CoCreateGuid(&guidInstance);
  7. wchar_t guidString[39];
  8. StringFromGUID2(guidInstance, guidString, 39);
  9. return (char*)utf8_t(guidString);
  10. }
  11. }