ldap_schema_get_count

Returns the count of schema elements of the type specified.

Library:*ldapsdk.*
NDS Version:7.xx or higher
Platform:NLM, Windows (NT, 95, 98, 2000, XP, Vista 32-bit and 64-bit ), Linux (32-bit and 64-bit), Solaris, AIX, and HP-UX

Syntax

  #include <ldap.h>
  
  int ldap_schema_get_count (
     LDAPSchema    *schema,
     int           elementType);
  

Parameters

schema

(IN) A handle to the schema of an LDAP directory.

elementType

(IN) Type of element requested. Use the definitions listed in Section 6.11, Schema Element Types.

Return Values

Return value is -1 if the LDAPSchema structure is invalid or the elementType is invalid. Otherwise the return value is the count of schema elements.

Remarks

Ldap_schema_get_count is used to get valid values for the index parameter of ldap_schema_get_by_index.

See Also

ldap_schema_get_by_index