From 606ececd8e2ed52c1fe418363f2482c4a32f62fc Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Fri, 10 Apr 2020 15:34:20 +0800 Subject: [PATCH] activeds: Implement remaining cases for IADsPathname::Set(). Signed-off-by: Dmitry Timoshkov Signed-off-by: Alexandre Julliard --- dlls/activeds/pathname.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/dlls/activeds/pathname.c b/dlls/activeds/pathname.c index 4733c5315f9..cffaf3d8e66 100644 --- a/dlls/activeds/pathname.c +++ b/dlls/activeds/pathname.c @@ -184,8 +184,32 @@ static HRESULT WINAPI path_Set(IADsPathname *iface, BSTR adspath, LONG type) if (!adspath) return E_INVALIDARG; + if (type == ADS_SETTYPE_PROVIDER) + { + SysFreeString(path->provider); + path->provider = SysAllocString(adspath); + return path->provider ? S_OK : E_OUTOFMEMORY; + } + + if (type == ADS_SETTYPE_SERVER) + { + SysFreeString(path->server); + path->server = SysAllocString(adspath); + return path->server ? S_OK : E_OUTOFMEMORY; + } + + if (type == ADS_SETTYPE_DN) + { + SysFreeString(path->dn); + path->dn = SysAllocString(adspath); + return path->dn ? S_OK : E_OUTOFMEMORY; + } + if (type != ADS_SETTYPE_FULL) + { FIXME("type %d not implemented\n", type); + return E_INVALIDARG; + } hr = parse_path(adspath, &provider, &server, &dn); if (hr == S_OK)