[PATCH 6/9] activeds: Implement IADsPathname::Retrieve(ADS_FORMAT_LEAF).

Dmitry Timoshkov dmitry at baikal.ru
Fri Apr 10 02:34:33 CDT 2020


Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
---
 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);
 
-- 
2.25.2




More information about the wine-devel mailing list