Dmitry Timoshkov : activeds: Implement IADsPathname::Retrieve(ADS_FORMAT_LEAF).
Alexandre Julliard
julliard at winehq.org
Fri Apr 10 13:56:08 CDT 2020
Module: wine
Branch: master
Commit: d0eaaea8556481628955fd675046cbecc2ebbee5
URL: https://source.winehq.org/git/wine.git/?a=commit;h=d0eaaea8556481628955fd675046cbecc2ebbee5
Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date: Fri Apr 10 15:34:33 2020 +0800
activeds: Implement IADsPathname::Retrieve(ADS_FORMAT_LEAF).
Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/activeds/pathname.c | 10 ++++++++++
dlls/activeds/tests/activeds.c | 1 -
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/dlls/activeds/pathname.c b/dlls/activeds/pathname.c
index d89c4cb847..d68f1cb8e9 100644
--- a/dlls/activeds/pathname.c
+++ b/dlls/activeds/pathname.c
@@ -275,6 +275,16 @@ static HRESULT WINAPI path_Retrieve(IADsPathname *iface, LONG type, BSTR *adspat
case ADS_FORMAT_X500_DN:
*adspath = path->dn ? SysAllocString(path->dn) : SysAllocStringLen(NULL, 0);
break;
+
+ case ADS_FORMAT_LEAF:
+ if (!path->dn)
+ *adspath = SysAllocStringLen(NULL, 0);
+ else
+ {
+ WCHAR *p = wcschr(path->dn, ',');
+ *adspath = p ? SysAllocStringLen(path->dn, p - path->dn) : SysAllocString(path->dn);
+ }
+ break;
}
TRACE("=> %s\n", debugstr_w(*adspath));
diff --git a/dlls/activeds/tests/activeds.c b/dlls/activeds/tests/activeds.c
index 9ecab56034..118c87634b 100644
--- a/dlls/activeds/tests/activeds.c
+++ b/dlls/activeds/tests/activeds.c
@@ -161,7 +161,6 @@ todo_wine
hr = IADsPathname_Retrieve(path, ADS_FORMAT_LEAF, &bstr);
ok(hr == S_OK, "got %#x\n", hr);
-todo_wine
ok(!wcscmp(bstr, L"a=b"), "got %s\n", wine_dbgstr_w(bstr));
SysFreeString(bstr);
More information about the wine-cvs
mailing list