阅读:1131回复:4
请辨一辨
Walter Oney在《Programming the Microsoft WDM》中写道:"If your DriverEntry routine returns a failure status, the system doesn’t call your DriverUnload routine. Therefore, if DriverEntry generates any side effects that need cleaning up prior to returning an error status, DriverEntry has to perform the cleanup"。
而DDK中说明:"The I/O Manager also calls the Unload routine when the driver returns a failure status from its DriverEntry routine." |
|
沙发#
发布于:2004-06-25 14:39
而DDK中说明:"The I/O Manager also calls the Unload routine when the driver returns a failure status from its DriverEntry routine." 没有在Win2k DDK中看到上面这句话,倒是看到了另一种说法: “Note that a driver's Unload routine is not called if a driver's DriverEntry routine returns a failure status.” |
|
|
板凳#
发布于:2004-06-25 15:39
Kernel-Mode Drivers: Windows 2000 DDK
15.2 Unload Routine Environment 这一节里提到 :"The I/O Manager also calls the Unload routine when the driver returns a failure status from its DriverEntry routine." |
|
地板#
发布于:2004-06-25 17:12
嗯,看到了。
但是,MSDN(october 2001)中同一章(Unload Routine Environment)却是另一种说法: Note that the Unload routine is not called if a driver's DriverEntry routine returns a failure status. In this case, the I/O manager simply frees the memory space taken up by the driver. 看来,可能是2kDDK中错了,所以后来版本修正了。 |
|
|
地下室#
发布于:2004-06-25 18:01
看来要去更新一下2003的DDK
|
|