Directory search results processing

A directory callback typically performs the following to collect and optionally process the results of a directory search:

  1. Checks the values of status and numentries to determine whether the search was successful and whether entries were returned.

    • A status value of CS_SUCCEED indicates that the search was successful.

    • A numentries value greater than 0 indicates that entries were found.

  2. Either saves the pointer to the directory object; or copies any information that it wants to keep (using ct_ds_objinfo to extract the information), then frees the directory object’s memory with ct_ds_dropobj.

  3. Returns control to Client-Library in one of the following ways:

    • Returns CS_SUCCEED to drop all remaining unexamined entries

    • Returns CS_CONTINUE so that Client-Library calls the callback routine again to process the next object returned by the directory search