4 * Copyright 2004 Robert Shearman
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 #include "wine/test.h"
25 /* invalid in all versions */
27 /* valid in v0 and above (NT4+) */
29 /* valid in v1 and above (Win2k+) */
31 /* valid in v1a and above (WinXP+) */
33 #define PROP_TODO 0x80
35 static const struct valid_mapping
43 { PROP_V0
, PROP_INV
, PROP_INV
, PROP_INV
}, /* VT_EMPTY */
44 { PROP_V0
, PROP_INV
, PROP_INV
, PROP_INV
}, /* VT_NULL */
45 { PROP_V0
, PROP_V1
| PROP_TODO
, PROP_V0
, PROP_V1
| PROP_TODO
}, /* VT_I2 */
46 { PROP_V0
, PROP_V1
| PROP_TODO
, PROP_V0
, PROP_V1
| PROP_TODO
}, /* VT_I4 */
47 { PROP_V0
, PROP_V1
| PROP_TODO
, PROP_V0
, PROP_V1
| PROP_TODO
}, /* VT_R4 */
48 { PROP_V0
, PROP_V1
| PROP_TODO
, PROP_V0
, PROP_V1
| PROP_TODO
}, /* VT_R8 */
49 { PROP_V0
, PROP_V1
| PROP_TODO
, PROP_V0
, PROP_V1
| PROP_TODO
}, /* VT_CY */
50 { PROP_V0
, PROP_V1
| PROP_TODO
, PROP_V0
, PROP_V1
| PROP_TODO
}, /* VT_DATE */
51 { PROP_V0
, PROP_V1
| PROP_TODO
, PROP_V0
, PROP_V1
| PROP_TODO
}, /* VT_BSTR */
52 { PROP_V1
| PROP_TODO
, PROP_V1
| PROP_TODO
, PROP_INV
, PROP_V1
| PROP_TODO
}, /* VT_DISPATCH */
53 { PROP_V0
, PROP_V1
| PROP_TODO
, PROP_V0
, PROP_V1
| PROP_TODO
}, /* VT_ERROR */
54 { PROP_V0
, PROP_V1
| PROP_TODO
, PROP_V0
, PROP_V1
| PROP_TODO
}, /* VT_BOOL */
55 { PROP_V1
| PROP_TODO
, PROP_V1
| PROP_TODO
, PROP_V0
, PROP_V1
| PROP_TODO
}, /* VT_VARIANT */
56 { PROP_V1
| PROP_TODO
, PROP_V1
| PROP_TODO
, PROP_INV
, PROP_V1
| PROP_TODO
}, /* VT_UNKNOWN */
57 { PROP_V1
, PROP_V1
| PROP_TODO
, PROP_INV
, PROP_V1
| PROP_TODO
}, /* VT_DECIMAL */
58 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* 15 */
59 { PROP_V1
, PROP_V1
| PROP_TODO
, PROP_V1
, PROP_V1
| PROP_TODO
}, /* VT_I1 */
60 { PROP_V0
, PROP_V1
| PROP_TODO
, PROP_V0
, PROP_V1
| PROP_TODO
}, /* VT_UI1 */
61 { PROP_V0
, PROP_V1
| PROP_TODO
, PROP_V0
, PROP_V1
| PROP_TODO
}, /* VT_UI2 */
62 { PROP_V0
, PROP_V1
| PROP_TODO
, PROP_V0
, PROP_V1
| PROP_TODO
}, /* VT_UI4 */
63 { PROP_V0
, PROP_V1A
| PROP_TODO
, PROP_V0
, PROP_V1A
| PROP_TODO
}, /* VT_I8 */
64 { PROP_V0
, PROP_V1A
| PROP_TODO
, PROP_V0
, PROP_V1A
| PROP_TODO
}, /* VT_UI8 */
65 { PROP_V1
| PROP_TODO
, PROP_V1
| PROP_TODO
, PROP_INV
, PROP_V1
| PROP_TODO
}, /* VT_INT */
66 { PROP_V1
| PROP_TODO
, PROP_V1
| PROP_TODO
, PROP_INV
, PROP_V1
| PROP_TODO
}, /* VT_UINT */
67 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* VT_VOID */
68 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* VT_HRESULT */
69 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* VT_PTR */
70 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* VT_SAFEARRAY */
71 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* VT_CARRAY */
72 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* VT_USERDEFINED */
73 { PROP_V0
, PROP_INV
, PROP_V0
, PROP_INV
}, /* VT_LPSTR */
74 { PROP_V0
, PROP_INV
, PROP_V0
, PROP_INV
}, /* VT_LPWSTR */
75 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* 32 */
76 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* 33 */
77 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* 34 */
78 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* 35 */
79 { PROP_V1
| PROP_TODO
, PROP_V1
| PROP_TODO
, PROP_INV
, PROP_V1
| PROP_TODO
}, /* VT_RECORD */
80 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* VT_INT_PTR */
81 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* VT_UINT_PTR */
82 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* 39 */
83 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* 40 */
84 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* 41 */
85 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* 42 */
86 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* 43 */
87 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* 44 */
88 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* 45 */
89 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* 46 */
90 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* 47 */
91 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* 48 */
92 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* 49 */
93 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* 50 */
94 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* 51 */
95 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* 52 */
96 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* 53 */
97 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* 54 */
98 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* 55 */
99 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* 56 */
100 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* 57 */
101 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* 58 */
102 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* 59 */
103 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* 60 */
104 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* 61 */
105 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* 62 */
106 { PROP_INV
, PROP_INV
, PROP_INV
, PROP_INV
}, /* 63 */
107 { PROP_V0
, PROP_INV
, PROP_V0
, PROP_INV
}, /* VT_FILETIME */
108 { PROP_V0
, PROP_INV
, PROP_INV
, PROP_INV
}, /* VT_BLOB */
109 { PROP_V0
, PROP_INV
, PROP_INV
, PROP_INV
}, /* VT_STREAM */
110 { PROP_V0
, PROP_INV
, PROP_INV
, PROP_INV
}, /* VT_STORAGE */
111 { PROP_V0
, PROP_INV
, PROP_INV
, PROP_INV
}, /* VT_STREAMED_OBJECT */
112 { PROP_V0
, PROP_INV
, PROP_INV
, PROP_INV
}, /* VT_STORED_OBJECT */
113 { PROP_V0
, PROP_INV
, PROP_INV
, PROP_INV
}, /* VT_BLOB_OBJECT */
114 { PROP_V0
, PROP_INV
, PROP_V0
, PROP_INV
} /* VT_CF */
117 static const char* wine_vtypes
[VT_CLSID
+1] =
119 "VT_EMPTY","VT_NULL","VT_I2","VT_I4","VT_R4","VT_R8","VT_CY","VT_DATE",
120 "VT_BSTR","VT_DISPATCH","VT_ERROR","VT_BOOL","VT_VARIANT","VT_UNKNOWN",
121 "VT_DECIMAL","15","VT_I1","VT_UI1","VT_UI2","VT_UI4","VT_I8","VT_UI8",
122 "VT_INT","VT_UINT","VT_VOID","VT_HRESULT","VT_PTR","VT_SAFEARRAY",
123 "VT_CARRAY","VT_USERDEFINED","VT_LPSTR","VT_LPWSTR","32","33","34","35",
124 "VT_RECORD","VT_INT_PTR","VT_UINT_PTR","39","40","41","42","43","44","45",
125 "46","47","48","49","50","51","52","53","54","55","56","57","58","59","60",
126 "61","62","63","VT_FILETIME","VT_BLOB","VT_STREAM","VT_STORAGE",
127 "VT_STREAMED_OBJECT","VT_STORED_OBJECT","VT_BLOB_OBJECT","VT_CF","VT_CLSID"
131 static void expect(HRESULT hr
, VARTYPE vt
)
133 int idx
= vt
& VT_TYPEMASK
;
135 const char *modifier
;
139 flags
= valid_types
[idx
].byref
;
142 else if(vt
& VT_ARRAY
)
144 flags
= valid_types
[idx
].with_array
;
147 else if(vt
& VT_VECTOR
)
149 flags
= valid_types
[idx
].with_vector
;
154 flags
= valid_types
[idx
].simple
;
158 if(flags
== PROP_INV
)
159 ok(hr
== STG_E_INVALIDPARAMETER
, "%s (%s): got %08x\n", wine_vtypes
[idx
], modifier
, hr
);
160 else if(flags
== PROP_V0
)
161 ok(hr
== S_OK
, "%s (%s): got %08x\n", wine_vtypes
[idx
], modifier
, hr
);
162 else if(flags
& PROP_TODO
)
167 win_skip("%s (%s): unsupported\n", wine_vtypes
[idx
], modifier
);
168 else ok(hr
== S_OK
, "%s (%s): got %08x\n", wine_vtypes
[idx
], modifier
, hr
);
174 win_skip("%s (%s): unsupported\n", wine_vtypes
[idx
], modifier
);
175 else ok(hr
== S_OK
, "%s (%s): got %08x\n", wine_vtypes
[idx
], modifier
, hr
);
179 static void test_validtypes(void)
185 memset(&propvar
, 0, sizeof(propvar
));
187 for (i
= 0; i
< sizeof(valid_types
)/sizeof(valid_types
[0]); i
++)
192 hr
= PropVariantClear(&propvar
);
195 vt
= propvar
.vt
= i
| VT_ARRAY
;
196 hr
= PropVariantClear(&propvar
);
199 vt
= propvar
.vt
= i
| VT_VECTOR
;
200 hr
= PropVariantClear(&propvar
);
203 vt
= propvar
.vt
= i
| VT_BYREF
;
204 hr
= PropVariantClear(&propvar
);
210 static void test_copy(void)
212 static char szTestString
[] = "Test String";
213 static WCHAR wszTestString
[] = {'T','e','s','t',' ','S','t','r','i','n','g',0};
214 PROPVARIANT propvarSrc
;
215 PROPVARIANT propvarDst
;
218 propvarSrc
.vt
= VT_BSTR
;
219 U(propvarSrc
).bstrVal
= SysAllocString(wszTestString
);
221 hr
= PropVariantCopy(&propvarDst
, &propvarSrc
);
222 ok(hr
== S_OK
, "PropVariantCopy(...VT_BSTR...) failed\n");
223 ok(!lstrcmpW(U(propvarSrc
).bstrVal
, U(propvarDst
).bstrVal
), "BSTR not copied properly\n");
224 hr
= PropVariantClear(&propvarSrc
);
225 ok(hr
== S_OK
, "PropVariantClear(...VT_BSTR...) failed\n");
226 hr
= PropVariantClear(&propvarDst
);
227 ok(hr
== S_OK
, "PropVariantClear(...VT_BSTR...) failed\n");
229 propvarSrc
.vt
= VT_LPWSTR
;
230 U(propvarSrc
).pwszVal
= wszTestString
;
231 hr
= PropVariantCopy(&propvarDst
, &propvarSrc
);
232 ok(hr
== S_OK
, "PropVariantCopy(...VT_LPWSTR...) failed\n");
233 ok(!lstrcmpW(U(propvarSrc
).pwszVal
, U(propvarDst
).pwszVal
), "Wide string not copied properly\n");
234 hr
= PropVariantClear(&propvarDst
);
235 ok(hr
== S_OK
, "PropVariantClear(...VT_LPWSTR...) failed\n");
236 memset(&propvarSrc
, 0, sizeof(propvarSrc
));
238 propvarSrc
.vt
= VT_LPSTR
;
239 U(propvarSrc
).pszVal
= szTestString
;
240 hr
= PropVariantCopy(&propvarDst
, &propvarSrc
);
241 ok(hr
== S_OK
, "PropVariantCopy(...VT_LPSTR...) failed\n");
242 ok(!strcmp(U(propvarSrc
).pszVal
, U(propvarDst
).pszVal
), "String not copied properly\n");
243 hr
= PropVariantClear(&propvarDst
);
244 ok(hr
== S_OK
, "PropVariantClear(...VT_LPSTR...) failed\n");
245 memset(&propvarSrc
, 0, sizeof(propvarSrc
));
248 struct _PMemoryAllocator_vtable
{
249 void *Allocate
; /* virtual void* Allocate(ULONG cbSize); */
250 void *Free
; /* virtual void Free(void *pv); */
253 typedef struct _PMemoryAllocator
{
254 struct _PMemoryAllocator_vtable
*vt
;
258 #define __thiscall __stdcall
260 #define __thiscall __cdecl
263 static void * __thiscall
PMemoryAllocator_Allocate(PMemoryAllocator
*_this
, ULONG cbSize
)
265 return CoTaskMemAlloc(cbSize
);
268 static void __thiscall
PMemoryAllocator_Free(PMemoryAllocator
*_this
, void *pv
)
275 #include "pshpack1.h"
278 BYTE pop_eax
; /* popl %eax */
279 BYTE push_ecx
; /* pushl %ecx */
280 BYTE push_eax
; /* pushl %eax */
281 BYTE jmp_func
; /* jmp $func */
283 } THISCALL_TO_STDCALL_THUNK
;
286 static THISCALL_TO_STDCALL_THUNK
*wrapperCodeMem
= NULL
;
288 static void fill_thunk(THISCALL_TO_STDCALL_THUNK
*thunk
, void *fn
)
290 thunk
->pop_eax
= 0x58;
291 thunk
->push_ecx
= 0x51;
292 thunk
->push_eax
= 0x50;
293 thunk
->jmp_func
= 0xe9;
294 thunk
->func
= (char*)fn
- (char*)(&thunk
->func
+ 1);
297 static void setup_vtable(struct _PMemoryAllocator_vtable
*vtable
)
299 wrapperCodeMem
= VirtualAlloc(NULL
, 2 * sizeof(*wrapperCodeMem
),
300 MEM_COMMIT
, PAGE_EXECUTE_READWRITE
);
302 fill_thunk(&wrapperCodeMem
[0], PMemoryAllocator_Allocate
);
303 fill_thunk(&wrapperCodeMem
[1], PMemoryAllocator_Free
);
305 vtable
->Allocate
= &wrapperCodeMem
[0];
306 vtable
->Free
= &wrapperCodeMem
[1];
311 static void setup_vtable(struct _PMemoryAllocator_vtable
*vtable
)
313 vtable
->Allocate
= PMemoryAllocator_Allocate
;
314 vtable
->Free
= PMemoryAllocator_Free
;
319 static const char serialized_empty
[] = {
324 static const char serialized_null
[] = {
329 static const char serialized_i4
[] = {
335 static const char serialized_bstr_wc
[] = {
344 static const char serialized_bstr_mb
[] = {
352 static void test_propertytovariant(void)
355 BOOLEAN (__stdcall
*pStgConvertPropertyToVariant
)(const SERIALIZEDPROPERTYVALUE
*,USHORT
,PROPVARIANT
*,PMemoryAllocator
*);
357 PMemoryAllocator allocator
;
358 struct _PMemoryAllocator_vtable vtable
;
360 static const WCHAR test_string
[] = {'t','e','s','t',0};
362 hole32
= GetModuleHandleA("ole32");
364 pStgConvertPropertyToVariant
= (void*)GetProcAddress(hole32
, "StgConvertPropertyToVariant");
366 if (!pStgConvertPropertyToVariant
)
368 win_skip("StgConvertPropertyToVariant not available\n");
372 setup_vtable(&vtable
);
373 allocator
.vt
= &vtable
;
375 ret
= pStgConvertPropertyToVariant((SERIALIZEDPROPERTYVALUE
*)serialized_empty
,
376 CP_WINUNICODE
, &propvar
, &allocator
);
378 ok(ret
== 0, "StgConvertPropertyToVariant returned %i\n", ret
);
379 ok(propvar
.vt
== VT_EMPTY
, "unexpected vt %x\n", propvar
.vt
);
381 ret
= pStgConvertPropertyToVariant((SERIALIZEDPROPERTYVALUE
*)serialized_null
,
382 CP_WINUNICODE
, &propvar
, &allocator
);
384 ok(ret
== 0, "StgConvertPropertyToVariant returned %i\n", ret
);
385 ok(propvar
.vt
== VT_NULL
, "unexpected vt %x\n", propvar
.vt
);
387 ret
= pStgConvertPropertyToVariant((SERIALIZEDPROPERTYVALUE
*)serialized_i4
,
388 CP_WINUNICODE
, &propvar
, &allocator
);
390 ok(ret
== 0, "StgConvertPropertyToVariant returned %i\n", ret
);
391 ok(propvar
.vt
== VT_I4
, "unexpected vt %x\n", propvar
.vt
);
392 ok(U(propvar
).lVal
== 0xfeabcdef, "unexpected lVal %x\n", U(propvar
).lVal
);
394 ret
= pStgConvertPropertyToVariant((SERIALIZEDPROPERTYVALUE
*)serialized_bstr_wc
,
395 CP_WINUNICODE
, &propvar
, &allocator
);
397 ok(ret
== 0, "StgConvertPropertyToVariant returned %i\n", ret
);
398 ok(propvar
.vt
== VT_BSTR
, "unexpected vt %x\n", propvar
.vt
);
399 ok(!lstrcmpW(U(propvar
).bstrVal
, test_string
), "unexpected string value\n");
400 PropVariantClear(&propvar
);
402 ret
= pStgConvertPropertyToVariant((SERIALIZEDPROPERTYVALUE
*)serialized_bstr_mb
,
403 CP_UTF8
, &propvar
, &allocator
);
405 ok(ret
== 0, "StgConvertPropertyToVariant returned %i\n", ret
);
406 ok(propvar
.vt
== VT_BSTR
, "unexpected vt %x\n", propvar
.vt
);
407 ok(!lstrcmpW(U(propvar
).bstrVal
, test_string
), "unexpected string value\n");
408 PropVariantClear(&propvar
);
411 static void test_varianttoproperty(void)
415 SERIALIZEDPROPERTYVALUE
*propvalue
, *own_propvalue
;
416 SERIALIZEDPROPERTYVALUE
* (__stdcall
*pStgConvertVariantToProperty
)(
417 const PROPVARIANT
*,USHORT
,SERIALIZEDPROPERTYVALUE
*,ULONG
*,PROPID
,BOOLEAN
,ULONG
*);
419 static const WCHAR test_string
[] = {'t','e','s','t',0};
420 BSTR test_string_bstr
;
422 hole32
= GetModuleHandleA("ole32");
424 pStgConvertVariantToProperty
= (void*)GetProcAddress(hole32
, "StgConvertVariantToProperty");
426 if (!pStgConvertVariantToProperty
)
428 win_skip("StgConvertVariantToProperty not available\n");
432 own_propvalue
= HeapAlloc(GetProcessHeap(), 0, sizeof(SERIALIZEDPROPERTYVALUE
) + 20);
434 PropVariantInit(&propvar
);
437 U(propvar
).lVal
= 0xfeabcdef;
440 propvalue
= pStgConvertVariantToProperty(&propvar
, CP_WINUNICODE
, NULL
, &len
,
443 ok(propvalue
== NULL
, "got nonnull propvalue\n");
444 todo_wine
ok(len
== 8, "unexpected length %d\n", len
);
446 if (len
== 0xdeadbeef)
448 HeapFree(GetProcessHeap(), 0, own_propvalue
);
453 propvalue
= pStgConvertVariantToProperty(&propvar
, CP_WINUNICODE
, own_propvalue
, &len
,
456 ok(propvalue
== own_propvalue
, "unexpected propvalue %p\n", propvalue
);
457 ok(len
== 8, "unexpected length %d\n", len
);
458 ok(!memcmp(propvalue
, serialized_i4
, 8), "got wrong data\n");
460 propvar
.vt
= VT_EMPTY
;
462 own_propvalue
->dwType
= 0xdeadbeef;
463 propvalue
= pStgConvertVariantToProperty(&propvar
, CP_WINUNICODE
, own_propvalue
, &len
,
466 ok(propvalue
== own_propvalue
, "unexpected propvalue %p\n", propvalue
);
467 ok(len
== 4 || broken(len
== 0) /* before Vista */, "unexpected length %d\n", len
);
468 if (len
) ok(!memcmp(propvalue
, serialized_empty
, 4), "got wrong data\n");
469 else ok(propvalue
->dwType
== 0xdeadbeef, "unexpected type %d\n", propvalue
->dwType
);
471 propvar
.vt
= VT_NULL
;
473 propvalue
= pStgConvertVariantToProperty(&propvar
, CP_WINUNICODE
, own_propvalue
, &len
,
476 ok(propvalue
== own_propvalue
, "unexpected propvalue %p\n", propvalue
);
477 ok(len
== 4, "unexpected length %d\n", len
);
478 ok(!memcmp(propvalue
, serialized_null
, 4), "got wrong data\n");
480 test_string_bstr
= SysAllocString(test_string
);
482 propvar
.vt
= VT_BSTR
;
483 U(propvar
).bstrVal
= test_string_bstr
;
485 propvalue
= pStgConvertVariantToProperty(&propvar
, CP_WINUNICODE
, own_propvalue
, &len
,
488 ok(propvalue
== own_propvalue
, "unexpected propvalue %p\n", propvalue
);
489 ok(len
== 20, "unexpected length %d\n", len
);
490 ok(!memcmp(propvalue
, serialized_bstr_wc
, 20), "got wrong data\n");
493 propvalue
= pStgConvertVariantToProperty(&propvar
, CP_UTF8
, own_propvalue
, &len
,
496 ok(propvalue
== own_propvalue
, "unexpected propvalue %p\n", propvalue
);
497 ok(len
== 16, "unexpected length %d\n", len
);
498 ok(!memcmp(propvalue
, serialized_bstr_mb
, 16), "got wrong data\n");
500 SysFreeString(test_string_bstr
);
502 HeapFree(GetProcessHeap(), 0, own_propvalue
);
505 START_TEST(propvariant
)
509 test_propertytovariant();
510 test_varianttoproperty();