| 196 | } |
| 197 | |
| 198 | int __stdcall wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nShowCmd) |
| 199 | { |
| 200 | // initialize locale for ACP |
| 201 | setlocale(LC_ALL, ""); |
| 202 | SetEnvironmentVariableW(L"__NO_DETOUR", L"TRUE"); |
| 203 | auto cmdline = sfh::GetCommandLineVector(lpCmdLine); |
| 204 | try |
| 205 | { |
| 206 | sfh::SingleInstanceLock lock; |
| 207 | return sfh::Daemon().DaemonMain(cmdline); |
| 208 | } |
| 209 | catch (std::exception& e) |
| 210 | { |
| 211 | MessageBoxA(nullptr, e.what(), "Error", MB_OK | MB_ICONERROR); |
| 212 | return 1; |
| 213 | } |
| 214 | } |
nothing calls this directly
no test coverage detected