_BtGetLast() Function


<< Click to Display Table of Contents >>

Navigation:  Low Level Functions >


_BtGetLast() Function


Previous pageReturn to chapter overviewNext page





Position the Btrieve file on the last logical record for a given index







FUNCTION _BtGetLast ( hFile AS PTR, ptrData AS PTR, nRecLen REF WORD,   ptrKey AS PTR, nKeyNo AS BYTE )  AS LOGIC PASCAL







<hFile>File handle that was returned by _BtOpen
<ptrData>Pointer to the data structure.
<nRecLen>Length of the data structure. This value must be at least as long as the fixed-length portion of the record.
<ptrKey>Pointer to the Key buffer. Allocate BSIMAX_KEY_SIZE for this buffer
<nKeyNo>Key Number, first key is numbered 0.



LOGICWas the move to the last logical record succesfull.








If the Get Last operation is unsuccessful, the MicroKernel may return one of the following status codes:

03 File Not Open
04 Invalid Key Number
09 End of File (when the logical file is empty)
22 Data Buffer Length





See Also



_BtGetFirst(), _BtGetnext(), _BtGetPrevious()