Before an application can search a directory, it must have set up the Client-Library programming environment and allocated a CS_CONNECTION structure. See Chapter 1, “Getting Started with Client-Library” if you do not already know how to initialize Client-Library and allocate a connection structure.