GetValue
TheGetValuemethod reads data from the currently focused value, starting at the offset (inclusive).
ODULong GetValue (in ODULong length, out ODByteArray value);
length- The length (number of bytes) of data to read, expressed as an unsigned 32-bit value.
value- A byte array structure to contain the retrieved data.
- return value
- The number of bytes read, expressed as an unsigned 32-bit value.
DISCUSSION
You call this method to read data from the currently focused value. If that value is a promise value, the promise is fulfilled before the data is read. This method starts reading data at the current offset and stops after reading the number of bytes specified by thelengthparameter or after reaching the end of the data in the currently focused value, whichever comes first.When you call this method, the
_bufferfield of thevalueoutput parameter should bekODNULL; if it isn't, the buffer to which that field points will not be deallocated.This method sets the
_bufferfield of thevalueoutput parameter to point to a memory block containing the data that is read from the storage unit; it sets the_maximumfield to the specified length and the_lengthfield to the number of bytes actually read.When you no longer need the structure you pass as the
valueparameter, you should deallocate that structure and its buffer.EXCEPTIONS
kODErrUnfocusedStorageUnit- This storage unit is not focused on a value.
kODErrZeroRefCount- This storage unit has a reference count of 0.
SEE ALSO
TheODByteArraytype (page 877).
TheODStorageUnit::GetSizemethod (page 695).
TheODStorageUnit::SetValuemethod (page 714).
"Manipulating the Data in a Value" on page 276 in OpenDoc Programmer's Guide.
"Creating Additional Storage Units" on page 301 in OpenDoc Programmer's Guide.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help