Commit fe86203b authored by jan.koester's avatar jan.koester
Browse files

test

parent 348627b0
Loading
Loading
Loading
Loading
+3 −11
Original line number Diff line number Diff line
@@ -3514,17 +3514,9 @@ int _tmain(int argc, TCHAR* argv[]) {

    try {
        std::wstring exe_dir = getexecdir();

        if (!SetCurrentDirectoryW( exe_dir.c_str() ) ) {
            // Note: Use LogToEventViewer here if you couldn't set the directory,
            // but this is before service dispatch, so std::wcerr is safer if not installed.
            std::wcerr << L"Failed to set current directory to: " << exe_dir << std::endl;
            return -1;
        }
    } catch (const std::exception& ex) {
        std::cerr << "Exception while setting current directory: " << ex.what() << std::endl;
        return -1;
    }
        if (!exe_dir.empty())
            SetCurrentDirectoryW(exe_dir.c_str());
    } catch (...) {}

    SERVICE_TABLE_ENTRY ServiceTable[] = {
        {SERVICE_NAME, (LPSERVICE_MAIN_FUNCTION)ServiceMain},