Program structure

To perform directory search, code your application to follow the steps below:

  1. Begin the search.

    Execute application code to initialize a list or array that will collect directory objects

    Note that instead of calling ct_callback here, the application could have installed the callback in the connection’s parent context structure before allocating the connection. Then it would become the default directory callback for all connections allocated from the context.

  2. Collect search results in the directory callback.

    Execute application code to collect directory objects with an application defined list or array.

    During the directory search, ct_ds_lookup invokes the directory callback once for each entry that is found in the search.

  3. Inspect the directory objects. For each directory object:

  4. Clean up.

    For each object, ct_ds_dropobj to deallocate the directory object