activeds: Implement IADsPathname::Retrieve(ADS_FORMAT_LEAF).

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
feature/deterministic
Dmitry Timoshkov 2020-04-10 15:34:33 +08:00 committed by Alexandre Julliard
parent 03e3800d89
commit d0eaaea855
2 changed files with 10 additions and 1 deletions

View File

@ -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));

View File

@ -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);