| 90 | } |
| 91 | |
| 92 | string 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 | |
| 110 | void printUsage() { |
| 111 | std::cout << "Usage:" << endl; |