Dmitry Timoshkov : activeds: Make IADsPathname::Set() and IADsPathname::Retrieve() return success.

Alexandre Julliard julliard at winehq.org
Wed Apr 1 15:50:59 CDT 2020


Module: wine
Branch: master
Commit: ba82c34b1b01a592ea01cd8399c4346f1e8f42b3
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=ba82c34b1b01a592ea01cd8399c4346f1e8f42b3

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Wed Apr  1 18:18:37 2020 +0800

activeds: Make IADsPathname::Set() and IADsPathname::Retrieve() return success.

Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/activeds/pathname.c | 26 ++++++++++++++++++++------
 1 file changed, 20 insertions(+), 6 deletions(-)

diff --git a/dlls/activeds/pathname.c b/dlls/activeds/pathname.c
index 63b86ab778..52a94cbb18 100644
--- a/dlls/activeds/pathname.c
+++ b/dlls/activeds/pathname.c
@@ -39,6 +39,7 @@ typedef struct
 {
     IADsPathname IADsPathname_iface;
     LONG ref;
+    BSTR adspath;
 } Pathname;
 
 static inline Pathname *impl_from_IADsPathname(IADsPathname *iface)
@@ -112,10 +113,16 @@ static HRESULT WINAPI path_Invoke(IADsPathname *iface, DISPID dispid, REFIID rii
     return E_NOTIMPL;
 }
 
-static HRESULT WINAPI path_Set(IADsPathname *iface, BSTR path, LONG type)
+static HRESULT WINAPI path_Set(IADsPathname *iface, BSTR adspath, LONG type)
 {
-    FIXME("%p,%s,%d: stub\n", iface, debugstr_w(path), type);
-    return E_NOTIMPL;
+    Pathname *path = impl_from_IADsPathname(iface);
+
+    FIXME("%p,%s,%d: stub\n", iface, debugstr_w(adspath), type);
+
+    if (!adspath) return E_INVALIDARG;
+
+    path->adspath = SysAllocString(adspath);
+    return path->adspath ? S_OK : E_OUTOFMEMORY;
 }
 
 static HRESULT WINAPI path_SetDisplayType(IADsPathname *iface, LONG type)
@@ -124,10 +131,16 @@ static HRESULT WINAPI path_SetDisplayType(IADsPathname *iface, LONG type)
     return E_NOTIMPL;
 }
 
-static HRESULT WINAPI path_Retrieve(IADsPathname *iface, LONG type, BSTR *path)
+static HRESULT WINAPI path_Retrieve(IADsPathname *iface, LONG type, BSTR *adspath)
 {
-    FIXME("%p,%d,%p: stub\n", iface, type, path);
-    return E_NOTIMPL;
+    Pathname *path = impl_from_IADsPathname(iface);
+
+    FIXME("%p,%d,%p: stub\n", iface, type, adspath);
+
+    if (!adspath) return E_INVALIDARG;
+
+    *adspath = SysAllocString(path->adspath);
+    return *adspath ? S_OK : E_OUTOFMEMORY;
 }
 
 static HRESULT WINAPI path_GetNumElements(IADsPathname *iface, LONG *count)
@@ -210,6 +223,7 @@ static HRESULT Pathname_create(REFIID riid, void **obj)
 
     path->IADsPathname_iface.lpVtbl = &IADsPathname_vtbl;
     path->ref = 1;
+    path->adspath = NULL;
 
     hr = IADsPathname_QueryInterface(&path->IADsPathname_iface, riid, obj);
     IADsPathname_Release(&path->IADsPathname_iface);




More information about the wine-cvs mailing list