Directory Services


The LDAP structure represents an LDAP session. Typically, a session corresponds to a connection to a single server. However, in the case of referrals, an LDAP session may encompass several server connections. The ability to track referrals became possible with LDAP 3.

typedef struct ldap {
} LDAP, 


An LDAP structure is an opaque data type allocated and initialized by a call to ldap_init, cldap_open, or ldap_open. Subsequent LDAP calls pass a handle to this structure, which maintains the state of an LDAP session for the duration of the connection. When the session ends, call ldap_unbind to destroy the connection handle.

Although this is an opaque data type, it is documented in Winldap.h. This is primarily of value in porting applications written using other LDAP client implementations. Call ldap_get_option or ldap_set_option to access or change the values associated with the LDAP connection handle (this structure). Using these two functions also expose settings not directly accessible from the LDAP structure. For more information about session options, see Session Options.


Client: Included in Windows XP and Windows 2000 Professional.
Server: Included in Windows Server 2003 and Windows 2000 Server.
Redistributable: Requires Active Directory Client Extension on Windows NT 4.0 SP6a and Windows 95/98/Me.
Header: Declared in Winldap.h.

See Also

cldap_open, Data Structures, ldap_get_option, ldap_init, ldap_open, ldap_set_option, ldap_unbind