![]() |
LGetCellDataLocation |
||||
Header: | Lists.h | Carbon status: | Supported | |
Finds the memory location of cell data.
void LGetCellDataLocation ( SInt16 *offset, SInt16 *len, Cell theCell, ListHandle lHandle );
On return, a pointer to the offset of the cells data, specified from the beginning of the data handle referenced by the cells field of the list record.
On return, a pointer to the length of the cells data in bytes.
The cell whose datas location is sought.
The list containing the cell specified by the parameter theCell.
Your application can use this function to read cell data. The cells field of the list record contains a handle to a relocatable block used to store all cell data. When this function returns, the offset parameter contains the offset of the specified cells data in this relocatable block, and the len parameter specifies the length in bytes of the cells data. In other words, the first byte of cell data is located at Ptr(ORD4(lHandle^^.cells^) + offset), and the last byte of cell data is located at Ptr(ORD4(lHandle^^.cells^) + offset + len). Your application should not modify the contents of the cells field directly. To change a cells data, use the LSetCell function or the LAddToCell function.
If the cell coordinates specified by the parameter theCell are invalid, then the function sets the offset and len parameters to 1.
This function is also available as the LFind function.
This function is contained in a resource of resource type 'PACK'. Calling it could result in the loading of the package resource and the allocation of memory. Thus, your application should not call this function from within an interrupt, such as in a completion function or VBL task.
Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)