Reads data blocks from file.
int32 AsynchReadBlockFile (BlockFilePtr bf, Item ioreqItem, void* buffer, long count, long offset)
Reads a number of data blocks from the specified block file. AsynchReadBlockFile()
calls SendIO()
to make an asynchronous Portfolio I/O request for the data.
Because AsynchReadBlockFile()
reads only whole blocks from the specified file, it reads the first whole block containing the location specified by offset
(that is, it begins to read data blocks at the block margin prior to the specified byte location).
The file must be opened by OpenBlockFile()
before AsynchReadBlockFile()
can read data blocks from it.
bf
Pointer to the block file.ioreqItem
Item of the I/O request.buffer
Pointer to buffer into which the data blocks are read.count
Number of bytes that are read.offset
Location at which the first block is read, measured in bytes from the start of the file.SendIO()
failed
AsynchReadBlockFile()
does not return the value of the io_Error
field to which returns the status of the I/O request.
See “Error Messages” in the 3DO Portfolio Reference Manual for a listing of error messages returned by CreateItem()
.
This function only works when called with a count that's the multiple of the cel's blocksize.
BlockFile.h