Directory Services |
The ldap_result function obtains the result of an asynchronous operation.
ULONG ldap_result( LDAP* ld, ULONG msgid, ULONG all, struct l_timeval* timeout, LDAPMessage** res );
If the function succeeds, it returns one of the following values to indicate the type of the first result in the res parameter.
LDAP_RES_ADD
LDAP_RES_BIND
LDAP_RES_COMPARE
LDAP_RES_DELETE
LDAP_RES_EXTENDED
LDAP_RES_MODDN
LDAP_RES_MODIFY
LDAP_RES_SEARCH_ENTRY
LDAP_RES_SEARCH_REFERENCE
LDAP_RES_SEARCH_RESULT
If the time-out expires, the function returns 0.
If the function fails, it returns –1and sets the session error parameters in the LDAP data structure.
The ldap_result function retrieves the result of a previous, asynchronously initiated operation. Be aware that, depending on the way it is called, ldap_result may actually return a list or "chain" of messages.
For connectionless LDAP, you must pass both an LDAP connection handle and a message ID to ensure that you get the correct results. The LDAP run time continues to send the request until it receives a response.
Multithreading: Calls to ldap_result are thread safe.
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.
Library: Use Wldap32.lib.