Detaches r77 from all running processes.
()
| 198 | /// Detaches r77 from all running processes. |
| 199 | /// </summary> |
| 200 | public static async Task DetachAll() |
| 201 | { |
| 202 | await Task.Run(() => |
| 203 | { |
| 204 | int injectedCount = GetInjectedCount(); |
| 205 | |
| 206 | if (injectedCount == 0) |
| 207 | { |
| 208 | Log.Information(new LogTextItem("No processes are injected.")); |
| 209 | return; |
| 210 | } |
| 211 | |
| 212 | if (!HelperDll.DetachAll()) |
| 213 | { |
| 214 | Log.Error(new LogTextItem("Detaching processes failed.")); |
| 215 | return; |
| 216 | } |
| 217 | |
| 218 | int newInjectedCount = GetInjectedCount(); |
| 219 | |
| 220 | if (newInjectedCount < injectedCount) |
| 221 | { |
| 222 | Log.Information(new LogTextItem($"Detached from {injectedCount - newInjectedCount} processes.")); |
| 223 | } |
| 224 | |
| 225 | if (newInjectedCount > 0) |
| 226 | { |
| 227 | Log.Warning(new LogTextItem($"{newInjectedCount} processes could not be detached.")); |
| 228 | } |
| 229 | }); |
| 230 | } |
| 231 | /// <summary> |
| 232 | /// Hides a process ID by entering the PID into the r77 configuration system. |
| 233 | /// </summary> |
nothing calls this directly
no test coverage detected