| 259 | } |
| 260 | |
| 261 | void AntiRootkitUnload(_In_ PDRIVER_OBJECT DriverObject) { |
| 262 | ExFreePool(g_RegisterPath.Buffer); |
| 263 | UNICODE_STRING symLink = RTL_CONSTANT_STRING(L"\\??\\AntiRootkit"); |
| 264 | // delete symbolic link |
| 265 | IoDeleteSymbolicLink(&symLink); |
| 266 | IoUnregisterShutdownNotification(g_DeviceObject); |
| 267 | // delete device object |
| 268 | IoDeleteDevice(DriverObject->DeviceObject); |
| 269 | KdPrint(("Driver Unload called\n")); |
| 270 | TraceLoggingWrite(g_Provider, "Unload", |
| 271 | TraceLoggingLevel(TRACE_LEVEL_INFORMATION), |
| 272 | TraceLoggingString("Driver unloading", "Message")); |
| 273 | TraceLoggingUnregister(g_Provider); |
| 274 | } |
| 275 | |
| 276 | NTSTATUS CompleteIrp(PIRP Irp, NTSTATUS status = STATUS_SUCCESS, ULONG_PTR info = 0) { |
| 277 | Irp->IoStatus.Status = status; |
nothing calls this directly
no outgoing calls
no test coverage detected