ldap_count_entries函数 (winldap.h)

ldap_count_entries函数计算服务器返回的搜索条目数。

语法

WINLDAPAPI ULONG LDAPAPI ldap_count_entries(
  [in] LDAP        *ld,
  [in] LDAPMessage *res
);

参数

[in] ld

会话句柄。

[in] res

通过调用同步搜索例程之一或 ldap_result获取的搜索结果。

返回值

如果函数成功,则返回条目数。

如果函数失败,则返回值为 –1,并且该函数在 LDAP 数据结构中设置会话错误参数。

注解

ldap_count_entries函数返回条目链中包含的或剩余的条目数。 使用来自 ldap_first_entryldap_next_entry、ldap_first_referenceldap_next_referenceldap_result 的返回值调用函数。

要求

要求
最低受支持的客户端 Windows Vista
最低受支持的服务器 Windows Server 2008
目标平台 Windows
标头 winldap.h
Library Wldap32.lib
DLL Wldap32.dll

请参阅

函数

ldap_count_references

ldap_count_values

ldap_first_entry

ldap_first_reference

ldap_next_entry

ldap_next_reference

ldap_result