ldap_first_entry function (winldap.h)
The ldap_first_entry function returns the first entry of a message.
Syntax
WINLDAPAPI LDAPMessage *LDAPAPI ldap_first_entry(
[in] LDAP *ld,
[in] LDAPMessage *res
);
Parameters
[in] ld
The session handle.
[in] res
The search result, as obtained by a call to one of the synchronous search routines or ldap_result.
Return value
If the search returned valid results, this function returns a pointer to the first result entry. If no entry or reference exists in the result set, it returns NULL. This is the only error return; the session error parameter in the LDAP data structure is cleared to 0 in either case.
Remarks
Use ldap_first_entry in conjunction with ldap_next_entry to step through and retrieve the list of entries from a search result chain.
You do not have to explicitly free the returned entry as it is freed when the message itself is freed.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Minimum supported server | Windows Server 2008 |
Target Platform | Windows |
Header | winldap.h |
Library | Wldap32.lib |
DLL | Wldap32.dll |