/* Notifications */
LIST_ENTRY NotifyList;
PNOTIFY_SYNC NotifySync;
+
+ /* Incremented on IRP_MJ_CREATE, decremented on IRP_MJ_CLEANUP */
+ ULONG OpenHandleCount;
} DEVICE_EXTENSION, *PDEVICE_EXTENSION, VCB, *PVCB;
return STATUS_SUCCESS;
}
+ DeviceExt->OpenHandleCount--;
+
/* Notify about the cleanup */
FsRtlNotifyCleanup(DeviceExt->NotifySync,
&(DeviceExt->NotifyList),
CdfsCloseFile (DeviceExt, FileObject);
return STATUS_NOT_A_DIRECTORY;
}
+
+ DeviceExt->OpenHandleCount++;
}
/*
/* DeviceObject represents FileSystem instead of logical volume */
DPRINT("Opening file system\n");
IrpContext->Irp->IoStatus.Information = FILE_OPENED;
+ DeviceExt->OpenHandleCount++;
return STATUS_SUCCESS;
}