| 69 | } |
| 70 | |
| 71 | void Utils::Win32::InjectedModule::Clear() { |
| 72 | if (m_hProcess && m_rpModule) { |
| 73 | try { |
| 74 | try { |
| 75 | Call("CallFreeLibrary", m_rpModule, "CallFreeLibrary"); |
| 76 | } catch (const std::out_of_range&) { |
| 77 | m_hProcess.UnloadModule(m_rpModule); |
| 78 | } |
| 79 | } catch (const std::exception&) { |
| 80 | |
| 81 | // suppress error if the process is already dead |
| 82 | if (WaitForSingleObject(m_hProcess, 0) == WAIT_TIMEOUT) |
| 83 | throw; |
| 84 | } |
| 85 | } |
| 86 | m_path.clear(); |
| 87 | m_hProcess = nullptr; |
| 88 | m_rpModule = nullptr; |
| 89 | } |
nothing calls this directly
no test coverage detected