IoDeleteDevice源码
来源:互联网 发布:网络创世纪音乐 编辑:程序博客网 时间:2024/05/23 19:18
WRK的IoDeleteDevice源码 原本想解读一下 IoDeleteDevice 但发现实际上会调用 IovDeleteDevice 但没有找到IovDeleteDevice 相关的代码 那就暂时搁置 回头具体分析
VOIDIoDeleteDevice( IN PDEVICE_OBJECT DeviceObject )/*++Routine Description: This routine deletes the specified device object from the system so that it may no longer be referenced. It is invoked when either the device driver is being unloaded from the system, or the driver's initialization routine failed to properly initialize the device or a fatal driver initialization error was encountered, or when the device is being removed from the system.Arguments: DeviceObject - Pointer to the device object that is to be deleted.Return Value: None.--*/{ KIRQL irql; IOV_DELETE_DEVICE(DeviceObject); // // Check to see whether or not the device has registered a shutdown // handler if necessary, and if so, unregister it. // if (DeviceObject->Flags & DO_SHUTDOWN_REGISTERED) { IoUnregisterShutdownNotification( DeviceObject ); } // // Release the pool that was allocated to contain the timer dispatch // routine and its associated context if there was one. // if (DeviceObject->Timer) { PIO_TIMER timer; timer = DeviceObject->Timer; IopRemoveTimerFromTimerList(timer); ExFreePool( timer ); } // // If this device has a name, then mark the // object as temporary so that when it is dereferenced it will be // deleted. // if (DeviceObject->Flags & DO_DEVICE_HAS_NAME) { ObMakeTemporaryObject( DeviceObject ); } // // PoRunDownDeviceObject will clean up any power management // structures attached to the device object. // PoRunDownDeviceObject(DeviceObject); // // Mark the device object as deleted. // irql = KeAcquireQueuedSpinLock( LockQueueIoDatabaseLock ); DeviceObject->DeviceObjectExtension->ExtensionFlags |= DOE_DELETE_PENDING; if (!DeviceObject->ReferenceCount) { IopCompleteUnloadOrDelete( DeviceObject, FALSE, irql ); } else { KeReleaseQueuedSpinLock( LockQueueIoDatabaseLock, irql ); }}
0 0
- IoDeleteDevice源码
- 转:驱动开发函数IoCreateDevice /IoCreateSymbolicLink / IoDeleteDevice
- RtlInitUnicodeString、IoCreateDevice、IoCreateSymbolicLink、IoDeleteDevice 四个 API 驱动函数的使用
- 源码
- 源码
- 源码
- 源码
- 源码
- 源码
- 源码
- 源码
- 源码
- 源码
- 源码
- 源码
- 源码
- 【源码】ArrayList源码剖析
- 【源码】LinkedList源码剖析
- [UVA12293] Box Game && 博弈
- CloudStack的学习笔记------1.简介
- UiAutomator系列——Appium Android Bootstrap源码分析之控件AndroidElement(007)
- 新A+B传奇
- limit.h 头文件
- IoDeleteDevice源码
- 签名工具的使用
- 获取系统时间格式strftime
- UiAutomator系列——Appium Android Bootstrap源码分析之命令解析执行(008)
- An internal error occurred during: "Check Android SDK"
- centos rz
- Linux相关知识
- 双线性插值
- 解决JS向后台传中文参数乱码的问题