BltIx4EqualKey


< Prev  TOC  Next >

TBLT_RETC TBLT_ENTRY BltIx4EqualKey(TBLT_KH *khPtr,
                                    VOID *keyBufferPtr,
                                    ULONG *recNoPtr);


 khPtr          I:index file control structure
 keyBufferPtr   I:key to find (exactly this key)
 recNoPtr       IO:recNo to match (or 0)/recNo of key found

This routine finds the exact match for the key in keyBufferPtr and the recNo in recNoPtr. If recNo is passed as zero, the first key matched is returned (that is, the key with the lowest recNo).

This routine only finds exact key matches, so its use is probably limited to checking if a given key/recNo (or a key with any recNo) already exists, or for positioning the index file.

Note: The key to find must match exactly with a key in the index file, for all keyLength bytes. The compare does not stop at a \0, even if the key is a character type.

Return: Non-zero indicates an error, otherwise the key is unchanged and the recNo is returned (if recNo was 0 on entry, otherwise recNo is unchanged).


All content Copyright © 1999 Cornel Huth. All rights reserved.