[PATCH] ole32: Handle VT_BLOB in PropertyStorage_ReadProperty

Marcus Meissner marcus at jet.franken.de
Sun Dec 4 16:52:44 CST 2011


Hi,

Makes USBLyzer.exe work much better. Removed comment
from VT_BSTR copy/paste.

Ciao, Marcus
---
 dlls/ole32/stg_prop.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c
index 53c2a99..53f57c1 100644
--- a/dlls/ole32/stg_prop.c
+++ b/dlls/ole32/stg_prop.c
@@ -1111,6 +1111,22 @@ static HRESULT PropertyStorage_ReadProperty(PropertyStorage_impl *This,
         }
         break;
     }
+    case VT_BLOB:
+    {
+        DWORD count;
+
+        StorageUtl_ReadDWord(data, 0, &count);
+        prop->u.blob.cbSize = count;
+        prop->u.blob.pBlobData = CoTaskMemAlloc(count);
+        if (prop->u.blob.pBlobData)
+        {
+            memcpy(prop->u.blob.pBlobData, data + sizeof(DWORD), count);
+            TRACE("Read blob value of size %d\n", count);
+        }
+        else
+            hr = STG_E_INSUFFICIENTMEMORY;
+        break;
+    }
     case VT_LPWSTR:
     {
         DWORD count;
-- 
1.7.3.4




More information about the wine-patches mailing list