I/O Control Codes (IOCTLs)

·New Serial IOCTLs

IOCTL_SERIAL_GET_STATS returns communication statistics for a serial device, including the number of characters transmitted/received and various errors. IOCTL_SERIAL_CLEAR_STATS resets the statistics values to zero. Serial drivers should implement these IOCTLs to support higher-level applications that require these statistics.

If a driver does not implement these IOCTLs, it should return an error and not modify the output buffer. If the modem driver is involved in processing the I/O, it adjusts the return value from error to success but only return zeros for the counter values.

·New Self-Monitoring Analysis and Reporting (SMART) IOCTLs

Three new IOCTLs have been added to support SMART reporting: SMART_GET_VERSION, SMART_RCV_DRIVE_DATA, and SMART_SEND_DRIVE_COMMAND. Any IDE drivers that support SMART must implement these IOTCLs.

·New Media Change Count in IOCTL_XXX_CHECK_VERIFY

CD-ROM and disk drivers that handle IOCTL_XXX_CHECK_VERIFY should handle the new optional parameter for media change count. This parameter provides a more accurate way to check for media changes, increasing system reliability.

·New Common IOCTL_STORAGE_XXX Control Codes

New IOCTL_STORAGE_XXX control codes replace the previous IOCTL_DeviceType_XXX control codes, where DeviceType was DISK, TAPE, or CDROM. For example, IOCTL_STORAGE_RESERVE replaces IOCTL_DISK_RESERVE, IOCTL_TAPE_RESERVE, and IOCTL_CDROM_RESERVE. The new storage control codes have identical values for function code, transfer method, and required access as the previous disk, tape, and CD-ROM codes.

Drivers that pass unrecognized IOCTLs to the SCSI class driver do not need to make any changes for these new IOCTLs.


Send feedback to MSDN.Look here for MSDN Online resources.