| 50 | } |
| 51 | |
| 52 | bool ProcessHelper::ReplaceTaskManager(bool revert) { |
| 53 | CRegKey key; |
| 54 | DWORD disp; |
| 55 | if (ERROR_SUCCESS != key.Create(HKEY_LOCAL_MACHINE, ifeoKey + L"taskmgr.exe", nullptr, 0, KEY_READ | KEY_WRITE | DELETE, nullptr, &disp)) |
| 56 | return false; |
| 57 | |
| 58 | ATLASSERT(!revert || (revert && disp == REG_OPENED_EXISTING_KEY)); |
| 59 | |
| 60 | if (revert) |
| 61 | return key.DeleteValue(L"Debugger") == ERROR_SUCCESS; |
| 62 | |
| 63 | return key.SetStringValue(L"Debugger", GetProcessImageName(), REG_SZ) == ERROR_SUCCESS; |
| 64 | } |
| 65 | |
| 66 | CString ProcessHelper::GetProcessImageName() { |
| 67 | static CString path; |
nothing calls this directly
no test coverage detected