[PATCH v2 2/3] msdasql: Implement ICommandProperties SetProperties.
Alistair Leslie-Hughes
leslie_alistair at hotmail.com
Mon Nov 22 23:29:56 CST 2021
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
dlls/msdasql/session.c | 36 +++++++++++++++++++++++++++++++++++-
1 file changed, 35 insertions(+), 1 deletion(-)
diff --git a/dlls/msdasql/session.c b/dlls/msdasql/session.c
index 9ef29d6b29e..533cb6ae28a 100644
--- a/dlls/msdasql/session.c
+++ b/dlls/msdasql/session.c
@@ -1152,7 +1152,41 @@ static HRESULT WINAPI command_prop_SetProperties(ICommandProperties *iface, ULON
DBPROPSET propertyset[])
{
struct command *command = impl_from_ICommandProperties( iface );
- FIXME("%p %p\n", command, propertyset);
+ int i, j, k;
+
+ TRACE("%p %d, %p\n", command, count, propertyset);
+
+ for(i=0; i < count; i++)
+ {
+ TRACE("set %s, count %d\n", debugstr_guid(&propertyset[i].guidPropertySet), propertyset[i].cProperties);
+ for(j=0; j < propertyset[i].cProperties; j++)
+ {
+ for(k=0; k < ARRAY_SIZE(command->properties); k++)
+ {
+ if (command->properties[k].property_id == propertyset[i].rgProperties[j].dwPropertyID)
+ {
+ TRACE("Found property 0x%08x\n", command->properties[k].property_id);
+ if (command->properties[k].flags & DBPROPFLAGS_WRITE)
+ {
+ if (command->properties[k].vartype == VT_BOOL)
+ {
+ command->properties[k].bool_val = V_BOOL(&propertyset[i].rgProperties[j].vValue);
+ }
+ else if (command->properties[k].vartype == VT_I4)
+ {
+ command->properties[k].long_val = V_I4(&propertyset[i].rgProperties[j].vValue);
+ }
+ else
+ ERR("Unknown variant type %d\n", command->properties[j].vartype);
+ }
+ else
+ WARN("Attempting to set Readonly property\n");
+
+ break;
+ }
+ }
+ }
+ }
return S_OK;
}
--
2.33.0
More information about the wine-devel
mailing list