Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/adsldp/adsldp.c | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-)
diff --git a/dlls/adsldp/adsldp.c b/dlls/adsldp/adsldp.c index 942c471dfb..7cc23438f1 100644 --- a/dlls/adsldp/adsldp.c +++ b/dlls/adsldp/adsldp.c @@ -551,8 +551,43 @@ static HRESULT WINAPI ldapns_SetInfo(IADs *iface)
static HRESULT WINAPI ldapns_Get(IADs *iface, BSTR name, VARIANT *prop) { - FIXME("%p,%s,%p: stub\n", iface, debugstr_w(name), prop); - return E_NOTIMPL; + LDAP_namespace *ldap = impl_from_IADs(iface); + HRESULT hr; + ULONG i; + + TRACE("%p,%s,%p\n", iface, debugstr_w(name), prop); + + if (!name || !prop) return E_ADS_BAD_PARAMETER; + + if (!ldap->attrs_count) + { + hr = IADs_GetInfo(iface); + if (hr != S_OK) return hr; + } + + for (i = 0; i < ldap->attrs_count; i++) + { + if (!wcsicmp(name, ldap->attrs[i].name)) + { + ULONG count = ldap_count_valuesW(ldap->attrs[i].values); + if (!count) + { + V_BSTR(prop) = NULL; + V_VT(prop) = VT_BSTR; + return S_OK; + } + + if (count > 1) + FIXME("attr %s has %u values\n", debugstr_w(ldap->attrs[i].name), count); + + V_BSTR(prop) = SysAllocString(ldap->attrs[i].values[0]); + if (!V_BSTR(prop)) return E_OUTOFMEMORY; + V_VT(prop) = VT_BSTR; + return S_OK; + } + } + + return E_ADS_PROPERTY_NOT_FOUND; }
static HRESULT WINAPI ldapns_Put(IADs *iface, BSTR name, VARIANT prop)
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=68064
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/wldap32/value.c:229 error: patch failed: dlls/adsldp/adsldp.c:27 error: patch failed: include/winldap.h:184 error: patch failed: dlls/adsldp/adsldp.c:1091 error: patch failed: dlls/adsldp/Makefile.in:1 error: patch failed: dlls/adsldp/adsldp.c:29 error: patch failed: dlls/adsldp/adsldp.c:40 error: patch failed: dlls/adsldp/adsldp_private.h:19 error: patch failed: dlls/adsldp/adsldp.c:551 Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/wldap32/value.c:229 error: patch failed: dlls/adsldp/adsldp.c:27 error: patch failed: include/winldap.h:184 error: patch failed: dlls/adsldp/adsldp.c:1091 error: patch failed: dlls/adsldp/Makefile.in:1 error: patch failed: dlls/adsldp/adsldp.c:29 error: patch failed: dlls/adsldp/adsldp.c:40 error: patch failed: dlls/adsldp/adsldp_private.h:19 error: patch failed: dlls/adsldp/adsldp.c:551 Task: Patch failed to apply