| 110 | } |
| 111 | |
| 112 | std::string our_exe_path () |
| 113 | { |
| 114 | std::vector<char> buffer(128); |
| 115 | size_t len; |
| 116 | |
| 117 | while ((len = GetModuleFileNameA(nullptr, &buffer[0], buffer.size())) == buffer.size()) { |
| 118 | // buffer may have been truncated - grow and try again |
| 119 | buffer.resize(buffer.size() * 2); |
| 120 | } |
| 121 | if (len == 0) { |
| 122 | throw System_error("GetModuleFileNameA", "", GetLastError()); |
| 123 | } |
| 124 | |
| 125 | return std::string(buffer.begin(), buffer.begin() + len); |
| 126 | } |
| 127 | |
| 128 | int exit_status (int status) |
| 129 | { |
nothing calls this directly
no test coverage detected