Commit 6f14d858 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

adsldp: Implement IDirectorySearch::GetFirstRow().

parent 17be7f3d
...@@ -398,7 +398,8 @@ typedef struct ...@@ -398,7 +398,8 @@ typedef struct
struct ldap_search_context struct ldap_search_context
{ {
LDAPMessage *res; LDAPMessage *res, *entry;
ULONG count, pos;
}; };
static inline LDAP_namespace *impl_from_IADs(IADs *iface) static inline LDAP_namespace *impl_from_IADs(IADs *iface)
...@@ -1197,8 +1198,20 @@ static HRESULT WINAPI search_AbandonSearch(IDirectorySearch *iface, ADS_SEARCH_H ...@@ -1197,8 +1198,20 @@ static HRESULT WINAPI search_AbandonSearch(IDirectorySearch *iface, ADS_SEARCH_H
static HRESULT WINAPI search_GetFirstRow(IDirectorySearch *iface, ADS_SEARCH_HANDLE res) static HRESULT WINAPI search_GetFirstRow(IDirectorySearch *iface, ADS_SEARCH_HANDLE res)
{ {
FIXME("%p,%p: stub\n", iface, res); LDAP_namespace *ldap = impl_from_IDirectorySearch(iface);
return E_NOTIMPL; struct ldap_search_context *ldap_ctx = res;
TRACE("%p,%p\n", iface, res);
if (!ldap->ld) return E_NOTIMPL;
if (!res) return E_ADS_BAD_PARAMETER;
ldap_ctx->count = ldap_count_entries(ldap->ld, ldap_ctx->res);
ldap_ctx->pos = 0;
ldap_ctx->entry = ldap_first_entry(ldap->ld, ldap_ctx->res);
return ldap_ctx->entry ? S_OK : S_ADS_NOMORE_ROWS;
} }
static HRESULT WINAPI search_GetNextRow(IDirectorySearch *iface, ADS_SEARCH_HANDLE res) static HRESULT WINAPI search_GetNextRow(IDirectorySearch *iface, ADS_SEARCH_HANDLE res)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment