[PATCH] ole32: Add support for writing VT_BLOB properties.

Nikolay Sivov nsivov at codeweavers.com
Mon Apr 5 01:06:00 CDT 2021


Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50917
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 dlls/ole32/stg_prop.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c
index 63e93c0b8c9..cd30dad8c99 100644
--- a/dlls/ole32/stg_prop.c
+++ b/dlls/ole32/stg_prop.c
@@ -2267,6 +2267,16 @@ static HRESULT PropertyStorage_WritePropertyToStream(PropertyStorage_impl *This,
         bytesWritten = count;
         break;
     }
+    case VT_BLOB:
+    {
+        StorageUtl_WriteDWord(&dwTemp, 0, var->blob.cbSize);
+        hr = IStream_Write(This->stm, &dwTemp, sizeof(dwTemp), &count);
+        if (FAILED(hr))
+            goto end;
+        hr = IStream_Write(This->stm, var->blob.pBlobData, var->blob.cbSize, &count);
+        bytesWritten = count + sizeof(DWORD);
+        break;
+    }
     default:
         FIXME("unsupported type: %d\n", var->vt);
         return STG_E_INVALIDPARAMETER;
-- 
2.30.2




More information about the wine-devel mailing list