ADC Home > Reference Library > Technical Notes > 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:

Don't Look at ioPosOffset for Devices


[Jun 01 1998]


The Device Manager chapter of Inside Macintosh: Devices (and, for that matter, Inside Macintosh Volume II page 185) says that ioPosOffset is passed to and returned by _Read and _Write calls for devices. It also says that "After the transfer is completed, the ioPosOffset field indicates the current position of the block device." Actually, ioPosOffset is not changed by _Read and _Write calls to device drivers.

On the other hand, if the _Read or _Write call is made to a file (ioRefNum is a file reference number), ioPosOffset is updated to the reflect the mark for that file reference number after the call. This is correctly documented in Inside Macintosh: Files (and Inside Macintosh Volume II page 110, and Inside Macintosh Volume IV page 140).

Note also that device drivers should only look at the dCtlPosition field of the DCE, and should not look directly at the ioPosOffset field of the parameter block. The Device Manager sets up dCtlPosition for the driver, taking into account both the ioPosMode and the ioPosOffset.

Back to top


Acrobat gif

Acrobat version of this Note (48K)


Back to top

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.