Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

CurrentLowLevelKey

Get a key from the current Low-Level key buffer.

Short Name

GETCURKL()

Type

Low-Level function

Declaration

pVOID CurrentLowLevelKey(FILNO keyno, pVOID idxval);

Description

In V12 the file number typedef was formally changed from COUNT, a two-byte value to FILNO, a four-byte value. Refer to this link for compatibility details. Four Byte File Numbering

CurrentLowLevelKey() copies the current Low-Level key buffer for index file keyno into the buffer pointed to by idxval.

Return

CurrentLowLevelKey() returns idxval. A NULL signifies an error - check uerr_cod. See FairCom DB Error Codes for a complete listing of valid FairCom DB error values.

Example

FILNO keyfil;

TEXT keybuf[50];


if (CurrentLowLevelKey(keyfil,&keybuf) == NULL)

printf("\nError %d retrieving key.", uerr_cod);

Limitations

No check is made to determine if idxval points to a region sufficiently large to accept the key. If the area is too small, either code or data will be clobbered. Use GetCtFileInfo() to obtain the key length.

See also

CurrentISAMKey, GetCtFileInfo

TOCIndex