| 71 | } |
| 72 | |
| 73 | std::string sfh::GetFileContent(const std::wstring& path) |
| 74 | { |
| 75 | std::string ret; |
| 76 | wil::unique_file fp; |
| 77 | if (_wfopen_s(fp.put(), path.c_str(), L"rb")) |
| 78 | throw std::runtime_error("unable to open file"); |
| 79 | fseek(fp.get(), 0, SEEK_END); |
| 80 | ret.resize(ftell(fp.get())); |
| 81 | rewind(fp.get()); |
| 82 | fread(ret.data(), sizeof(char), ret.size(), fp.get()); |
| 83 | return ret; |
| 84 | } |
| 85 | |
| 86 | std::wstring sfh::GetCurrentProcessUserSid() |
| 87 | { |
nothing calls this directly
no outgoing calls
no test coverage detected