All public I/O control codes for drivers of tape devices use buffered I/O. Consequently, the input or output data for these requests is at Irp->AssociatedIrp.SystemBuffer.
Class drivers for SCSI tape devices handle additional public I/O control codes, along with those described in this section. See also Chapter 9 for more information about requirements for SCSI class drivers of mass-storage devices.
Erases the current tape partition, either as a TAPE_ERASE_LONG (a.k.a. “secure”) operation that overwrites data with a pattern or as a TAPE_ERASE_SHORT (a.k.a. “quick”) operation that writes an end-of-recorded-data mark at the current position.
Parameters.DeviceIoControl.InputBufferLength in the I/O stack location indicates the size in bytes of the parameter buffer, which must be >= sizeof(TAPE_ERASE). If the Immediate member is TRUE, the operation should be asynchronous.
None
The Information field is set to the number of bytes transferred. The Status field is set to STATUS_SUCCESS or possibly to STATUS_INFO_LENGTH_MISMATCH, STATUS_DEVICE_DATA_ERROR, STATUS_NO_SUCH_DEVICE, STATUS_IO_TIMEOUT, STATUS_IO_DEVICE_ERROR, STATUS_MEDIA_WRITE_PROTECTED, STATUS_INSUFFICIENT_RESOURCES, STATUS_NOT_IMPLEMENTED, STATUS_NO_MEDIA_IN_DEVICE, or STATUS_VERIFY_REQUIRED.
Loads or unloads tape, resets the tape’s tension, locks or unlocks the ejection mechanism, or formats the tape.
Parameters.DeviceIoControl.InputBufferLength in the I/O stack location indicates the size in bytes of the parameter buffer, which must be >= sizeof(TAPE_PREPARE). If the Immediate member is TRUE, the operation should be asynchronous.
None
The Information field is set to the number of bytes transferred. The Status field is set to STATUS_SUCCESS or possibly to STATUS_NO_SUCH_DEVICE, STATUS_IO_TIMEOUT, STATUS_IO_DEVICE_ERROR, STATUS_INSUFFICIENT_RESOURCES, STATUS_DEVICE_NOT_CONNECTED, STATUS_MEDIA_WRITE_PROTECTED, STATUS_NO_MEDIA_IN_DEVICE, or STATUS_VERIFY_REQUIRED.
Writes one of setmarks, filemarks, short filemarks, or long filemarks to tape.
Parameters.DeviceIoControl.InputBufferLength in the I/O stack location indicates the size in bytes of the parameter buffer, which must be >= sizeof(TAPE_WRITE_MARKS). If the Immediate member is TRUE, the operation should be asynchronous.
None
The Information field is set to the number of bytes written. The Status field is set to STATUS_SUCCESS or possibly to STATUS_INFO_LENGTH_MISMATCH, STATUS_IO_DEVICE_ERROR, STATUS_DEVICE_DATA_ERROR, STATUS_NO_SUCH_DEVICE, STATUS_IO_TIMEOUT, STATUS_DEVICE_NOT_READY, STATUS_MEDIA_WRITE_PROTECTED, STATUS_NO_MEDIA_IN_DEVICE, or STATUS_VERIFY_REQUIRED.
This IOCTL is replaced by IOCTL_STORAGE_CHECK_VERIFY. The only difference between the two IOCTLs is the base code.
Determines whether the media has changed on a tape drive.
None
None
The Information field is set to zero. The Status field must be set to either of STATUS_SUCCESS or STATUS_VERIFY_REQUIRED.
Returns the current absolute, logical, or pseudological partition and offset position on the tape.
Parameters.DeviceIoControl.OutputBufferLength in the I/O stack location indicates the size in bytes of the parameter buffer, which must be >= sizeof(TAPE_GET_POSITION).
The driver returns the TAPE_GET_POSITION data in the buffer at Irp->AssociatedIrp.SystemBuffer.
The Information field is set to the number of bytes returned. The Status field is set to STATUS_SUCCESS or possibly to STATUS_INFO_LENGTH_MISMATCH, STATUS_IO_DEVICE_ERROR, STATUS_DEVICE_DATA_ERROR, STATUS_NO_SUCH_DEVICE, STATUS_IO_TIMEOUT, STATUS_DEVICE_NOT_READY, STATUS_NO_MEDIA_IN_DEVICE, or STATUS_VERIFY_REQUIRED.
Moves the current position on the tape to the specified partition and offset, according to the given method.
Parameters.DeviceIoControl.InputBufferLength in the I/O stack location indicates the size in bytes of the parameter buffer, which must be >= sizeof(TAPE_SET_POSITION). If the Immediate member is TRUE, the operation should be asynchronous.
None
The Information field is set to zero. The Status field is set to STATUS_SUCCESS or possibly to STATUS_INFO_LENGTH_MISMATCH, STATUS_IO_DEVICE_ERROR, STATUS_DEVICE_DATA_ERROR, STATUS_NO_SUCH_DEVICE, STATUS_IO_TIMEOUT, STATUS_DEVICE_NOT_READY, STATUS_NO_MEDIA_IN_DEVICE, or STATUS_VERIFY_REQUIRED.
Returns information about the tape drive’s capabilities, such as its default block size, maximum and minimum block sizes, maximum partition count, whether the drive has EEC, compression, data padding, and report-setmark capabilities, that is, which configurable features the drive supports, including the EOT warning zone size.
Parameters.DeviceIoControl.OutputBufferLength in the I/O stack location indicates the size in bytes of the parameter buffer, which must be >= sizeof(TAPE_GET_DRIVE_PARAMETERS).
The driver returns the TAPE_GET_DRIVE_PARAMETERS data in the buffer at Irp->AssociatedIrp.SystemBuffer.
The Information field is set to the number of bytes returned. The Status field is set to STATUS_SUCCESS or possibly to STATUS_INFO_LENGTH_MISMATCH, STATUS_IO_DEVICE_ERROR, STATUS_DEVICE_DATA_ERROR, STATUS_NO_SUCH_DEVICE, STATUS_IO_TIMEOUT, or STATUS_DEVICE_NOT_READY.
Adjusts a tape drive’s configurable parameters.
Parameters.DeviceIoControl.InputBufferLength in the I/O stack location indicates the size in bytes of the parameter buffer, which must be >= sizeof(TAPE_SET_DRIVE_PARAMETERS). The buffer at Irp->AssociatedIrp.SystemBuffer contains the values to be set.
None
The Information field is set to zero. The Status field is set to STATUS_SUCCESS or possibly to STATUS_IO_DEVICE_ERROR, STATUS_INVALID_DEVICE_REQUEST, STATUS_DEVICE_DATA_ERROR, STATUS_NO_SUCH_DEVICE, STATUS_IO_TIMEOUT, STATUS_INFO_LENGTH_MISMATCH, or STATUS_DEVICE_NOT_READY.
Returns information about the media’s total and remaining capacity, its block size, the number of partitions, and whether it is write-protected.
Parameters.DeviceIoControl.OutputBufferLength in the I/O stack location indicates the size in bytes of the parameter buffer, which must be >= sizeof(TAPE_GET_MEDIA_PARAMETERS).
The driver returns the TAPE_GET_MEDIA_PARAMETERS data in the buffer at Irp->AssociatedIrp.SystemBuffer.
The Information field is set to the number of bytes returned. The Status field is set to STATUS_SUCCESS or possibly to STATUS_IO_DEVICE_ERROR, STATUS_DEVICE_DATA_ERROR, STATUS_DATA_OVERRUN, STATUS_NO_SUCH_DEVICE, STATUS_IO_TIMEOUT, STATUS_DEVICE_NOT_READY, STATUS_INFO_LENGTH_MISMATCH, STATUS_NO_MEDIA_IN_DEVICE, or STATUS_VERIFY_REQUIRED.
Resets the block size of the media in the drive.
Parameters.DeviceIoControl.InputBufferLength in the I/O stack location indicates the size in bytes of the parameter buffer, which must be >= sizeof(TAPE_SET_MEDIA_PARAMETERS). The buffer at Irp->AssociatedIrp.SystemBuffer contains the block size to be set.
None
The Information field is set to zero. The Status field is set to STATUS_SUCCESS or possibly to STATUS_IO_DEVICE_ERROR, STATUS_MEDIA_WRITE_PROTECTED, STATUS_DEVICE_DATA_ERROR, STATUS_NO_SUCH_DEVICE, STATUS_IO_TIMEOUT, STATUS_DEVICE_NOT_READY, STATUS_INFO_LENGTH_MISMATCH, STATUS_NO_MEDIA_IN_DEVICE, or STATUS_VERIFY_REQUIRED.
Returns the current status of the drive.
None
None
The Information field is set to zero. The Status field is set to STATUS_SUCCESS or possibly to STATUS_DEVICE_DATA_ERROR, STATUS_NO_SUCH_DEVICE, STATUS_IO_TIMEOUT, STATUS_DEVICE_NOT_READY, STATUS_NO_MEDIA_IN_DEVICE, or STATUS_VERIFY_REQUIRED.
Creates the specified number of fixed, select, or initiator partition(s) of the given size on the media.
Parameters.DeviceIoControl.InputBufferLength in the I/O stack location indicates the size in bytes of the parameter buffer, which must be >= sizeof(TAPE_CREATE_PARTITION). The buffer at Irp->AssociatedIrp.SystemBuffer specifies the partition(s) to be created.
None
The Information field is set to zero. The Status field is set to STATUS_SUCCESS or possibly to STATUS_IO_DEVICE_ERROR, STATUS_MEDIA_WRITE_PROTECTED, STATUS_DEVICE_DATA_ERROR, STATUS_NO_SUCH_DEVICE, STATUS_IO_TIMEOUT, STATUS_DEVICE_NOT_READY, STATUS_INFO_LENGTH_MISMATCH, STATUS_NO_MEDIA_IN_DEVICE, or STATUS_VERIFY_REQUIRED.
This IOCTL is replaced by IOCTL_STORAGE_FIND_NEW_DEVICES. The only difference between the two IOCTLs is the base code.
Determines whether another device that the driver supports has just been connected to the I/O bus. If such a device is found, the driver sets up any necessary system objects and resources to handle I/O requests for its new device. It also initializes the device on receipt of this request dynamically: that is, without requiring the machine to be rebooted. Such a driver is assumed to support devices connected on a dynamically configurable I/O bus.
None
None
The Information field is set to zero. The Status field can be set to STATUS_SUCCESS or to any other value returned by the driver’s (re)initialization code.