阅读:1154回复:2
wdk驱动程序在2003下上层用FilterUnload() 进入不了驱动的unload()?
FLT_REGISTRATION filterRegistration = {
sizeof( FLT_REGISTRATION ), // Size FLT_REGISTRATION_VERSION, // Version 0, // Flags contextRegistration, // Context callbacks, // Operation callbacks DriverUnload, // Filters unload routine SefsInstanceSetup, // InstanceSetup routine SefsInstanceQueryTeardown, // InstanceQueryTeardown routine NULL, // InstanceTeardownStart routine NULL, // InstanceTeardownComplete routine NULL, NULL, NULL // Unused naming support callbacks }; FltRegisterFilter( DriverObject, &filterRegistration, &Globals.Filter ); NTSTATUS DriverUnload ( __in FLT_FILTER_UNLOAD_FLAGS Flags ) { NTSTATUS status = STATUS_SUCCESS; UNREFERENCED_PARAMETER(Flags); PAGED_CODE(); DbgPrint("in UnLoad....\n"); } 在xp下正常,在2003下没有进入DriverUnload(), 用dbgview工具看不到DbgPrint("in UnLoad....\n"); why? |
|
沙发#
发布于:2008-09-19 09:36
2003需要开一个调试信息开关。
|
|
|
板凳#
发布于:2008-09-19 09:39
或者直接设置HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Debug Print Filter为3;或者ed Kd_IHVVIDEO_Mask 0x3
具体的请搜索《Reading and Filtering Debugging Messages》 |
|
|