VOID NdisprotUnload( IN PDRIVER_OBJECT DriverObject ) { UNICODE_STRING win32DeviceName; PAGED_CODE(); UNREFERENCED_PARAMETER(DriverObject); DEBUGP(DL_LOUD, ("Unload Enter\n")); // // First delete the Control deviceobject and the corresponding // symbolicLink // RtlInitUnicodeString(&win32DeviceName, DOS_DEVICE_NAME); IoDeleteSymbolicLink(&win32DeviceName); if (Globals.ControlDeviceObject) { IoDeleteDevice(Globals.ControlDeviceObject); Globals.ControlDeviceObject = NULL; } ndisprotDoProtocolUnload(); #if DBG ndisprotAuditShutdown(); #endif DEBUGP(DL_LOUD, ("Unload Exit\n")); }
VOID NdisProtUnload( IN PDRIVER_OBJECT DriverObject ) /*++ Routine Description: Free all the allocated resources, etc. Arguments: DriverObject - pointer to a driver object. Return Value: VOID. --*/ { UNICODE_STRING win32DeviceName; PAGED_CODE(); UNREFERENCED_PARAMETER(DriverObject); DEBUGP(DL_LOUD, ("Unload Enter\n")); ndisprotUnregisterExCallBack(); // // First delete the Control deviceobject and the corresponding // symbolicLink // RtlInitUnicodeString(&win32DeviceName, DOS_DEVICE_NAME); IoDeleteSymbolicLink(&win32DeviceName); if (Globals.ControlDeviceObject) { IoDeleteDevice(Globals.ControlDeviceObject); Globals.ControlDeviceObject = NULL; } ndisprotDoProtocolUnload(); #if DBG ndisprotAuditShutdown(); #endif NPROT_FREE_LOCK(&Globals.GlobalLock); NPROT_FREE_DBG_LOCK(); DEBUGP(DL_LOUD, ("Unload Exit\n")); }
VOID NdisProtEvtDriverUnload( IN WDFDRIVER Driver ) /*++ Routine Description: Free all the allocated resources, etc. Arguments: Driver - pointer to a framework driver object. Return Value: VOID. --*/ { UNREFERENCED_PARAMETER(Driver); DEBUGP(DL_LOUD, ("Unload Enter\n")); ndisprotUnregisterExCallBack(); ndisprotDoProtocolUnload(); #if DBG ndisprotAuditShutdown(); #endif // // All the other resources such as control-device, symbolic link, // queue associated with the device will be automatically // deleted by the framework. // Globals.ControlDevice = NULL; DEBUGP(DL_LOUD, ("Unload Exit\n")); }