/*++ ClassBuildRequest() Routine Description: This routine allocates an SRB for the specified request then calls ClasspBuildRequestEx to create a SCSI operation to read or write the device. If no SRB is available then the request will be queued to be issued later when requests are available. Drivers which do not want the queueing behavior should allocate the SRB themselves and call ClasspBuildRequestEx to issue it. Arguments: Fdo - Supplies the functional device object associated with this request. Irp - Supplies the request to be retried. Note: If the IRP is for a disk transfer, the byteoffset field will already have been adjusted to make it relative to the beginning of the disk. Return Value: NT Status --*/ NTSTATUS NTAPI ClassBuildRequest( PDEVICE_OBJECT Fdo, PIRP Irp ) { PFUNCTIONAL_DEVICE_EXTENSION fdoExtension = Fdo->DeviceExtension; PSCSI_REQUEST_BLOCK srb; // This function is obsolete, but still called by CDROM.SYS . // DBGWARN(("ClassBuildRequest is OBSOLETE !")); // // Allocate an Srb. // srb = ClasspAllocateSrb(fdoExtension); if(srb == NULL) { return STATUS_INSUFFICIENT_RESOURCES; } ClasspBuildRequestEx(fdoExtension, Irp, srb); return STATUS_SUCCESS; } // end ClassBuildRequest()
/*++ ClassBuildRequest() Routine Description: This routine allocates an SRB for the specified request then calls ClasspBuildRequestEx to create a SCSI operation to read or write the device. If no SRB is available then the request will be queued to be issued later when requests are available. Drivers which do not want the queueing behavior should allocate the SRB themselves and call ClasspBuildRequestEx to issue it. Arguments: Fdo - Supplies the functional device object associated with this request. Irp - Supplies the request to be retried. Note: If the IRP is for a disk transfer, the byteoffset field will already have been adjusted to make it relative to the beginning of the disk. Return Value: NT Status --*/ NTSTATUS ClassBuildRequest( __in PDEVICE_OBJECT Fdo, __in PIRP Irp ) { PFUNCTIONAL_DEVICE_EXTENSION fdoExtension = Fdo->DeviceExtension; PSCSI_REQUEST_BLOCK srb; // This function is obsolete, but still called by CDROM.SYS . // TracePrint((TRACE_LEVEL_WARNING, TRACE_FLAG_GENERAL, "ClassBuildRequest is OBSOLETE !")); // // Allocate an Srb. // srb = ClasspAllocateSrb(fdoExtension); if(srb == NULL) { return STATUS_INSUFFICIENT_RESOURCES; } ClasspBuildRequestEx(fdoExtension, Irp, srb); return STATUS_SUCCESS; } // end ClassBuildRequest()