Technical Reference > CtAPI Functions > Function Reference > ctFindNext


Retrieves the next object in the search initiated by ctFindFirst.


ctFindNext(hnd, pObjHnd)


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


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, ctFindPrev, ctFindClose, ctGetProperty


See ctFindFirst.