MCPcopy Create free account
hub / github.com/bananabr/TimeException / getUuid

Function getUuid

TimeException.cpp:92–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92string getUuid() {
93 UUID uuid;
94 if (UuidCreate(&uuid) != RPC_S_OK) {
95 throw std::runtime_error("Failed to generate UUID");
96 }
97 RPC_CSTR szUuid = NULL;
98 string cstrUuid;
99 if (UuidToStringA(&uuid, &szUuid) == RPC_S_OK)
100 {
101 cstrUuid = (char*)szUuid;
102 RpcStringFreeA(&szUuid);
103 }
104 else {
105 throw std::runtime_error("Failed to generate file name");
106 }
107 return cstrUuid;
108}
109
110void printUsage() {
111 std::cout << "Usage:" << endl;

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected