Alistair Leslie-Hughes : msdasql: Implement IDBProperties SetProperties.

Alexandre Julliard julliard at winehq.org
Mon Nov 8 15:45:06 CST 2021


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

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Mon Nov  8 21:29:06 2021 +1100

msdasql: Implement IDBProperties SetProperties.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msdasql/msdasql_main.c | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/dlls/msdasql/msdasql_main.c b/dlls/msdasql/msdasql_main.c
index d14f7957978..e58facc47fc 100644
--- a/dlls/msdasql/msdasql_main.c
+++ b/dlls/msdasql/msdasql_main.c
@@ -424,10 +424,27 @@ static HRESULT WINAPI dbprops_SetProperties(IDBProperties *iface, ULONG cPropert
             DBPROPSET rgPropertySets[])
 {
     struct msdasql *provider = impl_from_IDBProperties(iface);
+    int i, j, k;
 
-    FIXME("(%p)->(%d %p)\n", provider, cPropertySets, rgPropertySets);
+    TRACE("(%p)->(%d %p)\n", provider, cPropertySets, rgPropertySets);
 
-    return E_NOTIMPL;
+    for (i=0; i < cPropertySets; i++)
+    {
+        for (j=0; j < rgPropertySets[i].cProperties; j++)
+        {
+            for(k=0; k < ARRAY_SIZE(provider->properties); k++)
+            {
+                if (provider->properties[k].id == rgPropertySets[i].rgProperties[j].dwPropertyID)
+                {
+                    TRACE("Found property %d\n", provider->properties[k].id);
+                    VariantCopy(&provider->properties[k].value, &rgPropertySets[i].rgProperties[j].vValue);
+                    break;
+                }
+            }
+        }
+    }
+
+    return S_OK;
 }
 
 static const struct IDBPropertiesVtbl dbprops_vtbl =




More information about the wine-cvs mailing list