阅读:1531回复:2
新手求助:sfilter中SfDebug变量问题
想在源码中,IRP_MJ_CREATE中显示文件的全路径,但是执行到:
if (!FlagOn( SfDebug, SFDEBUG_DO_CREATE_COMPLETION | SFDEBUG_GET_CREATE_NAMES| SFDEBUG_DISPLAY_CREATE_NAMES )) { // // Don't put us on the stack then call the next driver // IoSkipCurrentIrpStackLocation( Irp ); return IoCallDriver( ((PSFILTER_DEVICE_EXTENSION) DeviceObject->DeviceExtension)->AttachedToDeviceObject, Irp ); } else { KEVENT waitEvent; // // Initialize an event to wait for the completion routine to occur // KeInitializeEvent( &waitEvent, NotificationEvent, FALSE ); // // Copy the stack and set our Completion routine // IoCopyCurrentIrpStackLocationToNext( Irp ); IoSetCompletionRoutine( Irp, SfCreateCompletion, &waitEvent, TRUE, TRUE, TRUE ); // // Call the next driver in the stack. // status = IoCallDriver( ((PSFILTER_DEVICE_EXTENSION) DeviceObject->DeviceExtension)->AttachedToDeviceObject, Irp ); 遇到第一个IF就进去了,然后就结束了。打印发现,SfDebug的值一直是0.。。。。 是不是要显示路径,要重定义SfDebug的值啊? |
|
沙发#
发布于:2008-04-10 15:14
改为:0xffff_ffef后,可以打印了。
|
|
板凳#
发布于:2008-04-12 12:56
可以在注册表中修改它的值嘛~~
|
|
|