MCPcopy Create free account
hub / github.com/HO-COOH/FastCopy / ExplorerGuard

Class ExplorerGuard

SpeedTest/main.cpp:47–59  ·  view source on GitHub ↗

* This class kills explorer.exe in constructor and then restart it in the destructor */

Source from the content-addressed store, hash-verified

45 * This class kills explorer.exe in constructor and then restart it in the destructor
46 */
47struct ExplorerGuard
48{
49 ExplorerGuard()
50 {
51 puts("Killing explorer.exe for accurate result. It will be restarted after test.\n");
52 std::system("taskkill /f /im explorer.exe");
53 }
54
55 ~ExplorerGuard()
56 {
57 Process<wchar_t> explorer{ Env::GetFolderPath(Env::SpecialFolder::Windows) + L"\\explorer.exe" };
58 }
59};
60
61/**
62 * If there is command line args, run what command line specified.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected