ADC Home > Reference Library > Technical Q&As > Legacy Documents > Hardware & Drivers >

Legacy Documentclose button

Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.

Current information on this Reference Library topic can be found here:

SCSIAction and IOSCSIUserClient on Mac OS X 10.2


Q: My application communicates with SCSI Parallel devices like scanners or printers using the SCSIAction or IOSCSIUserClient APIs. This worked on all versions of Mac OS X prior to 10.2. On Mac OS X 10.2, when I call SCSIAction I get an opWrErr (-49). Or, if I call IOSCSIDeviceInterface->open I get a kIOReturnExclusiveAccess error (0xE00002C5 or -536870203). Why does this no longer work?

A: IOSCSIUserClient and SCSIAction are deprecated APIs in Mac OS X 10.2. The intention was for these APIs to continue functioning as on earlier releases until users installed SCSI HBA drivers written to the new IOSCSIParallelFamily that shipped in Mac OS X 10.2. These APIs were inadvertently disabled and have been restored in Mac OS X 10.2.1 (rr. 3006423, 3026125). Until then, calling open on an IOSCSIDeviceInterface will return kIOReturnExclusiveAccess. SCSIAction internally calls that same function and maps the I/O Kit error kIOReturnExclusiveAccess to the OSErr opWrErr.

SCSITaskUserClient is the API that replaces IOSCSIUserClient and SCSIAction. Apple recommends that developers wishing the greatest backward compatibility use both SCSITaskUserClient and SCSIAction/IOSCSIUserClient to discover their device, then use the API which found the device to communicate with it.


[Sep 13 2002]


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.