//------------------------------------------------------------------------------ static void deregisterDrvIntf(void) { if (plkDriverInstance_l.pDrvDeviceHandle != NULL) { NdisDeregisterDeviceEx(plkDriverInstance_l.pDrvDeviceHandle); plkDriverInstance_l.pDrvDeviceHandle = NULL; } }
NDIS_STATUS PtDeregisterDevice( VOID ) /*++ Routine Description: Deregister the ioctl interface. This is called whenever a miniport instance is halted. When the last miniport instance is halted, we request NDIS to delete the device object Arguments: NdisDeviceHandle Handle returned by NdisMRegisterDevice Return Value: NDIS_STATUS_SUCCESS if everything worked ok --*/ { NDIS_STATUS Status = NDIS_STATUS_SUCCESS; DBGPRINT(MUX_LOUD, ("==>PtDeregisterDevice\n")); MUX_ACQUIRE_MUTEX(&ControlDeviceMutex); ASSERT(MiniportCount > 0); --MiniportCount; if (0 == MiniportCount) { // // All VELAN miniport instances have been halted. // Deregister the control device. // if (NdisDeviceHandle != NULL) { NdisDeregisterDeviceEx(NdisDeviceHandle); NdisDeviceHandle = NULL; } } MUX_RELEASE_MUTEX(&ControlDeviceMutex); DBGPRINT(MUX_INFO, ("<== PtDeregisterDevice: %x\n", Status)); return Status; }
VOID FilterDeregisterDevice( VOID ) { if (NdisFilterDeviceHandle != NULL) { NdisDeregisterDeviceEx(NdisFilterDeviceHandle); } NdisFilterDeviceHandle = NULL; }
VOID FilterDeregisterDevice( VOID ) { if (g_ndis_filter_device_handle != NULL) { NdisDeregisterDeviceEx(g_ndis_filter_device_handle); } g_ndis_filter_device_handle = NULL; }
VOID FilterDeregisterDevice( VOID ) { DbgPrint("NmNDIS.sys: FilterDeregisterDevice\n"); if (NdisFilterDeviceHandle != NULL) { NdisDeregisterDeviceEx(NdisFilterDeviceHandle); } NdisFilterDeviceHandle = NULL; }
VOID OvsDeleteDeviceObject() { if (gOvsDeviceHandle) { #ifdef DBG POVS_DEVICE_EXTENSION ovsExt = (POVS_DEVICE_EXTENSION) NdisGetDeviceReservedExtension(gOvsDeviceObject); if (ovsExt) { ASSERT(ovsExt->numberOpenInstance == 0); } #endif ASSERT(gOvsDeviceObject); NdisDeregisterDeviceEx(gOvsDeviceHandle); gOvsDeviceHandle = NULL; gOvsDeviceObject = NULL; } OvsCleanup(); }
// Release the control device void NeoFreeControlDevice() { if (ctx == NULL) { return; } if (ctx->Opened != FALSE) { // Delete the event NeoSet(ctx->Event); NeoFreeEvent(ctx->Event); ctx->Event = NULL; ctx->Opened = FALSE; } // Delete the device NdisDeregisterDeviceEx(ctx->NdisControl); }