Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 81 of file null.c.
Referenced by DriverEntry().
{ PIO_STACK_LOCATION IoStack = IoGetCurrentIrpStackLocation(Irp); NTSTATUS Status; PFILE_OBJECT FileObject; ULONG Length; PAGED_CODE(); /* Get the file object and check what kind of request this is */ FileObject = IoStack->FileObject; switch (IoStack->MajorFunction) { case IRP_MJ_CREATE: case IRP_MJ_CLOSE: /* Check if this is synch I/O */ if (FileObject->Flags & FO_SYNCHRONOUS_IO) { /* Set distinguished value for Cc */ FileObject->PrivateCacheMap = (PVOID)1; } /* Complete successfully */ Irp->IoStatus.Status = STATUS_SUCCESS; Irp->IoStatus.Information = 0; break; case IRP_MJ_READ: /* Return as if we read the entire file */ Irp->IoStatus.Status = STATUS_END_OF_FILE; Irp->IoStatus.Information = 0; break; case IRP_MJ_WRITE: /* Return as if we wrote the entire request */ Irp->IoStatus.Status = STATUS_SUCCESS; Irp->IoStatus.Information = IoStack->Parameters.Write.Length; break; case IRP_MJ_LOCK_CONTROL: /* Dummy */ Irp->IoStatus.Status = STATUS_SUCCESS; Irp->IoStatus.Information = 0; break; case IRP_MJ_QUERY_INFORMATION: /* Get the length inputted and do the request */ Length = IoStack->Parameters.QueryFile.Length; Irp->IoStatus.Status = NullQueryFileInformation(Irp->AssociatedIrp. SystemBuffer, &Length, IoStack-> Parameters. QueryFile. FileInformationClass); /* Return the actual length */ Irp->IoStatus.Information = Length; break; } /* Complete the request */ Status = Irp->IoStatus.Status; IoCompleteRequest(Irp, IO_NO_INCREMENT); return Status; }