Mike McCormack : ole32: Implement reading of VT_CF storage properties.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Jun 19 16:18:11 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: 98d4c2b0495df9c8c8224789c69f2e63aa9d85d1
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=98d4c2b0495df9c8c8224789c69f2e63aa9d85d1
Author: Mike McCormack <mike at codeweavers.com>
Date: Tue Jun 20 03:31:01 2006 +0900
ole32: Implement reading of VT_CF storage properties.
---
dlls/ole32/stg_prop.c | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c
index ac4a6b6..c59eba1 100644
--- a/dlls/ole32/stg_prop.c
+++ b/dlls/ole32/stg_prop.c
@@ -82,6 +82,11 @@ #define CP_UNICODE 1200
#define MAX_VERSION_0_PROP_NAME_LENGTH 256
+#define CFTAG_WINDOWS (-1L)
+#define CFTAG_MACINTOSH (-2L)
+#define CFTAG_FMTID (-3L)
+#define CFTAG_NODATA 0L
+
/* The format version (and what it implies) is described here:
* http://msdn.microsoft.com/library/en-us/stg/stg/format_version.asp
*/
@@ -1138,6 +1143,26 @@ static HRESULT PropertyStorage_ReadPrope
StorageUtl_ReadULargeInteger(data, 0,
(ULARGE_INTEGER *)&prop->u.filetime);
break;
+ case VT_CF:
+ {
+ DWORD len = 0, type = 0, tag = 0;
+
+ StorageUtl_ReadDWord(data, 0, &len);
+ StorageUtl_ReadDWord(data, 4, &tag);
+ StorageUtl_ReadDWord(data, 8, &type);
+ if (tag == CFTAG_WINDOWS && len > 12)
+ {
+ prop->u.pclipdata = CoTaskMemAlloc(sizeof (CLIPDATA));
+ prop->u.pclipdata->cbSize = len;
+ prop->u.pclipdata->ulClipFmt = type;
+ prop->u.pclipdata->pClipData = CoTaskMemAlloc(len);
+ memcpy(prop->u.pclipdata->pClipData, data+12, len - 12);
+ TRACE("returning %p, len %ld\n", prop->u.pclipdata->pClipData, len - 12);
+ }
+ else
+ hr = STG_E_INVALIDPARAMETER;
+ }
+ break;
default:
FIXME("unsupported type %d\n", prop->vt);
hr = STG_E_INVALIDPARAMETER;
More information about the wine-cvs
mailing list