Technical Reference > CtAPI Functions > Function Reference > ctFindPrev

ctFindPrev

Retrieves the previous object in the search initiated by ctFindFirst.

Syntax

ctFindPrev(hnd, pObjHnd)

hnd

Type: Handle
Input/output: Input
Description: Handle to the search, as returned by ctFindFirst().

pObjHnd

Type: HANDLE
Input/output: Output
Description: The pointer to the found object handle. This is used to retrieve the properties.

Return Value

If the function succeeds, the return value is TRUE (1). If the function does not succeed, the return value is FALSE (0). To get extended error information, call GetLastError(). If you reach the end of the search, GetLastError() returns CT_ERROR_NOT_FOUND. Once past the end of the search, you cannot scroll the search using ctFindNext() or ctFindPrev() commands. You need to reset the search pointer by creating a new search using ctFindFirst(), or by using the ctFindScroll() function to move the pointer to a valid position.

Related Functions

ctOpen, ctFindFirst, ctFindNext, ctFindClose, ctGetProperty

Example

See ctFindFirst