阅读:880回复:0
XP SFILTER的二个问题请大家帮忙讲一下,谢谢!
在SFILTER中的绑定一个CDO下的多个VDO时用了一个循环,调用了:
status = IoCreateDevice( SFilterDriverObject, sizeof( SFILTER_DEVICE_EXTENSION ), NULL,devList->DeviceType, 0, FALSE, &newDeviceObject );是不是每调用一次这个函数newDeviceObject的引用记数增加一次? 因为在绑定失败时(调用SfCleanupMountedDevice( newDeviceObject ))有注释: The attachment failed, cleanup. Note that we continue processing so we will cleanup the reference counts and try to attach to the rest of the volumes. 所以我有上面的理解。 不过SfCleanupMountedDevice( newDeviceObject )是这样定义: VOID SfCleanupMountedDevice ( IN PDEVICE_OBJECT DeviceObject ) { UNREFERENCED_PARAMETER( DeviceObject );//参数未使用不警告 ASSERT(IS_MY_DEVICE_OBJECT( DeviceObject )); }; 没有清除引用的语句,不知道是不是我理解错了,请帮忙看看! |
|