Directory Services |
The ldap_conn_from_msg function returns the LDAP session handle (connection pointer) for a particular message.
LDAP* ldap_conn_from_msg( LDAP* PrimaryConn, LDAPMessage* res );
The return value is the LDAP session handle (connection pointer) where the message originated from. This function returns NULL if the originating session has closed or if a NULL LDAPMessage pointer is passed to the function and the LDAP_OPT_REF_DEREF_CONN_PER_MSG session option was not previously set for the message session.
This function is used to identify the LDAP session handle associated with the specified LDAP message. It returns a valid LDAP session handle only if one of the following conditions are met:
If neither of these conditions are met, the function returns a NULL session handle.
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.
Unicode: Implemented as Unicode and ANSI versions on all
platforms.
Header: Declared in Winldap.h.
Library: Use Wldap32.lib.
LDAP, LDAPMessage, structures, Establishing an LDAP Session, Functions, ldap_init, ldap_set_option, Return Values