Checking whether a property is supported

Properties are not always supported. A property may be unsupported in the following instances.

Applications check to determine whether a property is supported by calling ct_config or ct_con_props with the action parameter as CS_SUPPORTED and the buffer parameter as the address of a CS_BOOL variable.

For example, the following code checks to see if the CS_DS_SEARCH property is supported. You can use this sample code to check support for other properties by replacing the CS_DS_SEARCH parameter with the parameter you are interested in.

/* Is CS_DS_SEARCH supported? */
 ret = ct_con_props(conn, CS_SUPPORTED, 
                   CS_DS_SEARCH, &boolval,
                   CS_UNUSED,NULL);
 if (ret != CS_SUCCEED)
   ... handle the error ...
 printf("CS_DS_SEARCH %s supported",
        boolval == CS_TRUE ? "is" : "is not");

NoteThe CS_SUPPORTED action is allowed only for properties associated with a directory or security driver.