Author: akhaldi
Date: Mon Jul 20 22:44:40 2015
New Revision: 68487
URL:
http://svn.reactos.org/svn/reactos?rev=68487&view=rev
Log:
[OLEAUT32_WINETEST] Sync with Wine Staging 1.7.47. CORE-9924
Modified:
trunk/rostests/winetests/oleaut32/safearray.c
trunk/rostests/winetests/oleaut32/test_reg.idl
trunk/rostests/winetests/oleaut32/test_tlb.idl
trunk/rostests/winetests/oleaut32/typelib.c
trunk/rostests/winetests/oleaut32/usrmarshal.c
trunk/rostests/winetests/oleaut32/vartest.c
trunk/rostests/winetests/oleaut32/vartype.c
Modified: trunk/rostests/winetests/oleaut32/safearray.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/oleaut32/safear…
==============================================================================
--- trunk/rostests/winetests/oleaut32/safearray.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/oleaut32/safearray.c [iso-8859-1] Mon Jul 20 22:44:40 2015
@@ -460,11 +460,15 @@
bound.lLbound = 0;
SafeArrayRedim(a, &bound);
SafeArrayPtrOfIndex(a, indices, (void **)&ptr1);
- ok(*(WORD *)ptr1 == 0, "Expanded area not zero-initialized\n");
+ ok(*(WORD *)ptr1 == 0 ||
+ broken(*(WORD *)ptr1 != 0), /* Win 2003 */
+ "Expanded area not zero-initialized\n");
indices[1] = 1;
SafeArrayPtrOfIndex(a, indices, (void **)&ptr1);
- ok(*(WORD *)ptr1 == 0x55aa, "Data not preserved when resizing
array\n");
+ ok(*(WORD *)ptr1 == 0x55aa ||
+ broken(*(WORD *)ptr1 != 0x55aa), /* Win 2003 */
+ "Data not preserved when resizing array\n");
hres = SafeArrayDestroy(a);
ok(hres == S_OK,"SAD failed with hres %x\n", hres);
@@ -709,7 +713,7 @@
return;
for (i=0;i<sizeof(vttypes)/sizeof(vttypes[0]);i++) {
- a = NULL;
+ a = NULL;
hres = pSafeArrayAllocDescriptorEx(vttypes[i].vt,1,&a);
ok(hres == S_OK, "SafeArrayAllocDescriptorEx gave hres 0x%x\n", hres);
ok(a->fFeatures == vttypes[i].expflags,"SAADE(%d) resulted with flags %x,
expected %x\n", vttypes[i].vt, a->fFeatures, vttypes[i].expflags);
Modified: trunk/rostests/winetests/oleaut32/test_reg.idl
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/oleaut32/test_r…
==============================================================================
--- trunk/rostests/winetests/oleaut32/test_reg.idl [iso-8859-1] (original)
+++ trunk/rostests/winetests/oleaut32/test_reg.idl [iso-8859-1] Mon Jul 20 22:44:40 2015
@@ -142,4 +142,12 @@
[propputref, id(2)]
LONG testprop2([in] IUnknown *i);
}
+
+ /* uuid is same as for test_struct2 in test_tlb.idl, fields are different */
+ [uuid(4029f190-ca4a-4611-aeb9-673983cb96de)]
+ struct test_struct3
+ {
+ UINT32 field;
+ HRESULT hr;
+ };
}
Modified: trunk/rostests/winetests/oleaut32/test_tlb.idl
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/oleaut32/test_t…
==============================================================================
--- trunk/rostests/winetests/oleaut32/test_tlb.idl [iso-8859-1] (original)
+++ trunk/rostests/winetests/oleaut32/test_tlb.idl [iso-8859-1] Mon Jul 20 22:44:40 2015
@@ -48,4 +48,14 @@
IDispatch *disp;
BSTR bstr;
};
+
+ /* identical to 'test_struct', only guid is different */
+ [uuid(4029f190-ca4a-4611-aeb9-673983cb96de)]
+ struct test_struct2
+ {
+ HRESULT hr;
+ VARIANT_BOOL b;
+ IDispatch *disp;
+ BSTR bstr;
+ };
}
Modified: trunk/rostests/winetests/oleaut32/typelib.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/oleaut32/typeli…
==============================================================================
--- trunk/rostests/winetests/oleaut32/typelib.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/oleaut32/typelib.c [iso-8859-1] Mon Jul 20 22:44:40 2015
@@ -4008,6 +4008,11 @@
"test_struct",
"{4029f190-ca4a-4611-aeb9-673983cb96dd}",
/* kind */ TKIND_RECORD, /*flags*/ 0, /*align*/ 4, /*size*/ sizeof(struct test_struct)
+},
+{
+ "test_struct2",
+ "{4029f190-ca4a-4611-aeb9-673983cb96de}",
+ /* kind */ TKIND_RECORD, /*flags*/ 0, /*align*/ 4, /*size*/ sizeof(struct test_struct)
}
};
@@ -4216,7 +4221,7 @@
{
TYPEKIND kind;
WORD flags;
- } attrs[12] =
+ } attrs[13] =
{
{ TKIND_INTERFACE, 0 },
{ TKIND_INTERFACE, TYPEFLAG_FDISPATCHABLE },
@@ -4229,7 +4234,8 @@
{ TKIND_DISPATCH, TYPEFLAG_FDISPATCHABLE },
{ TKIND_DISPATCH, TYPEFLAG_FDISPATCHABLE },
{ TKIND_DISPATCH, TYPEFLAG_FDISPATCHABLE },
- { TKIND_INTERFACE, TYPEFLAG_FDISPATCHABLE }
+ { TKIND_INTERFACE, TYPEFLAG_FDISPATCHABLE },
+ { TKIND_RECORD, 0 }
};
trace("Starting %s typelib registration tests\n",
@@ -4264,7 +4270,7 @@
ok(hr == S_OK, "got %08x\n", hr);
count = ITypeLib_GetTypeInfoCount(typelib);
- ok(count == 12, "got %d\n", count);
+ ok(count == 13, "got %d\n", count);
for(i = 0; i < count; i++)
{
@@ -5500,6 +5506,7 @@
hr = IPSFactoryBuffer_CreateStub(factory, &interfaceguid, &uk,
&base_stub);
ok(hr == S_OK, "got: %x, side: %04x\n", hr, side);
+ IRpcStubBuffer_Release(base_stub);
IPSFactoryBuffer_Release(factory);
next:
Modified: trunk/rostests/winetests/oleaut32/usrmarshal.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/oleaut32/usrmar…
==============================================================================
--- trunk/rostests/winetests/oleaut32/usrmarshal.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/oleaut32/usrmarshal.c [iso-8859-1] Mon Jul 20 22:44:40 2015
@@ -195,11 +195,13 @@
static void * WINAPI user_allocate(SIZE_T size)
{
+ ok(0, "unexpected user_allocate call\n");
return CoTaskMemAlloc(size);
}
static void WINAPI user_free(void *p)
{
+ ok(0, "unexpected user_free call\n");
CoTaskMemFree(p);
}
@@ -716,29 +718,35 @@
HeapUnknown_Release
};
-static void check_variant_header(DWORD *wirev, VARIANT *v, ULONG size)
-{
- WORD *wp;
+typedef struct
+{
+ DWORD clSize;
+ DWORD rpcReserved;
+ USHORT vt;
+ USHORT wReserved1;
+ USHORT wReserved2;
+ USHORT wReserved3;
DWORD switch_is;
-
- ok(*wirev == (size + 7) >> 3, "wv[0] %08x, expected %08x\n", *wirev,
(size + 7) >> 3);
- wirev++;
- ok(*wirev == 0, "wv[1] %08x\n", *wirev);
- wirev++;
- wp = (WORD*)wirev;
- ok(*wp == V_VT(v), "vt %04x expected %04x\n", *wp, V_VT(v));
- wp++;
- ok(*wp == V_U2(v).wReserved1, "res1 %04x expected %04x\n", *wp,
V_U2(v).wReserved1);
- wp++;
- ok(*wp == V_U2(v).wReserved2, "res2 %04x expected %04x\n", *wp,
V_U2(v).wReserved2);
- wp++;
- ok(*wp == V_U2(v).wReserved3, "res3 %04x expected %04x\n", *wp,
V_U2(v).wReserved3);
- wp++;
- wirev = (DWORD*)wp;
+} variant_wire_t;
+
+static DWORD *check_variant_header(DWORD *wirev, VARIANT *v, ULONG size)
+{
+ const variant_wire_t *header = (const variant_wire_t*)wirev;
+ DWORD switch_is;
+
+ ok(header->clSize == (size + 7) >> 3, "wv[0] %08x, expected
%08x\n", header->clSize, (size + 7) >> 3);
+ ok(header->rpcReserved == 0, "wv[1] %08x\n", header->rpcReserved);
+ ok(header->vt == V_VT(v), "vt %04x expected %04x\n", header->vt,
V_VT(v));
+ ok(header->wReserved1 == V_U2(v).wReserved1, "res1 %04x expected
%04x\n", header->wReserved1, V_U2(v).wReserved1);
+ ok(header->wReserved2 == V_U2(v).wReserved2, "res2 %04x expected
%04x\n", header->wReserved2, V_U2(v).wReserved2);
+ ok(header->wReserved3 == V_U2(v).wReserved3, "res3 %04x expected
%04x\n", header->wReserved3, V_U2(v).wReserved3);
+
switch_is = V_VT(v);
if(switch_is & VT_ARRAY)
switch_is &= ~VT_TYPEMASK;
- ok(*wirev == switch_is, "switch_is %08x expected %08x\n", *wirev,
switch_is);
+ ok(header->switch_is == switch_is, "switch_is %08x expected %08x\n",
header->switch_is, switch_is);
+
+ return (DWORD*)((unsigned char*)wirev + sizeof(variant_wire_t));
}
/* Win9x and WinME don't always align as needed. Variants have
@@ -807,8 +815,7 @@
ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next,
buffer + stubMsg.BufferLength);
wirev = (DWORD*)buffer;
- check_variant_header(wirev, &v, stubMsg.BufferLength);
- wirev += 5;
+ wirev = check_variant_header(wirev, &v, stubMsg.BufferLength);
ok(*(char*)wirev == V_I1(&v), "wv[5] %08x\n", *wirev);
VariantInit(&v2);
stubMsg.Buffer = buffer;
@@ -834,8 +841,7 @@
ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next,
buffer + stubMsg.BufferLength);
wirev = (DWORD*)buffer;
- check_variant_header(wirev, &v, stubMsg.BufferLength);
- wirev += 5;
+ wirev = check_variant_header(wirev, &v, stubMsg.BufferLength);
ok(*(short*)wirev == V_I2(&v), "wv[5] %08x\n", *wirev);
VariantInit(&v2);
stubMsg.Buffer = buffer;
@@ -862,8 +868,7 @@
ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next,
buffer + stubMsg.BufferLength);
wirev = (DWORD*)buffer;
- check_variant_header(wirev, &v, stubMsg.BufferLength);
- wirev += 5;
+ wirev = check_variant_header(wirev, &v, stubMsg.BufferLength);
ok(*wirev == 0x4, "wv[5] %08x\n", *wirev);
wirev++;
ok(*(short*)wirev == s, "wv[6] %08x\n", *wirev);
@@ -894,8 +899,7 @@
ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next,
buffer + stubMsg.BufferLength);
wirev = (DWORD*)buffer;
- check_variant_header(wirev, &v, stubMsg.BufferLength);
- wirev += 5;
+ wirev = check_variant_header(wirev, &v, stubMsg.BufferLength);
ok(*wirev == V_I4(&v), "wv[5] %08x\n", *wirev);
VariantInit(&v2);
@@ -922,8 +926,7 @@
ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next,
buffer + stubMsg.BufferLength);
wirev = (DWORD*)buffer;
- check_variant_header(wirev, &v, stubMsg.BufferLength);
- wirev += 5;
+ wirev = check_variant_header(wirev, &v, stubMsg.BufferLength);
ok(*wirev == 0x1234, "wv[5] %08x\n", *wirev);
VariantInit(&v2);
stubMsg.Buffer = buffer;
@@ -950,8 +953,7 @@
ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next,
buffer + stubMsg.BufferLength);
wirev = (DWORD*)buffer;
- check_variant_header(wirev, &v, stubMsg.BufferLength);
- wirev += 5;
+ wirev = check_variant_header(wirev, &v, stubMsg.BufferLength);
ok(*wirev == 0x4, "wv[5] %08x\n", *wirev);
wirev++;
ok(*wirev == ul, "wv[6] %08x\n", *wirev);
@@ -980,8 +982,7 @@
ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next,
buffer + stubMsg.BufferLength);
wirev = (DWORD*)buffer;
- check_variant_header(wirev, &v, stubMsg.BufferLength);
- wirev += 5;
+ wirev = check_variant_header(wirev, &v, stubMsg.BufferLength);
ok(*(float*)wirev == V_R4(&v), "wv[5] %08x\n", *wirev);
VariantInit(&v2);
stubMsg.Buffer = buffer;
@@ -1008,8 +1009,7 @@
ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next,
buffer + stubMsg.BufferLength);
wirev = (DWORD*)buffer;
- check_variant_header(wirev, &v, stubMsg.BufferLength);
- wirev += 5;
+ wirev = check_variant_header(wirev, &v, stubMsg.BufferLength);
ok(*wirev == 0xcccccccc, "wv[5] %08x\n", *wirev); /* pad */
wirev++;
ok(*(double*)wirev == V_R8(&v), "wv[6] %08x, wv[7] %08x\n", *wirev,
*(wirev+1));
@@ -1038,8 +1038,7 @@
ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next,
buffer + stubMsg.BufferLength);
wirev = (DWORD*)buffer;
- check_variant_header(wirev, &v, stubMsg.BufferLength);
- wirev += 5;
+ wirev = check_variant_header(wirev, &v, stubMsg.BufferLength);
ok(*wirev == 8, "wv[5] %08x\n", *wirev);
wirev++;
ok(*(double*)wirev == d, "wv[6] %08x wv[7] %08x\n", *wirev, *(wirev+1));
@@ -1067,8 +1066,7 @@
ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next,
buffer + stubMsg.BufferLength);
wirev = (DWORD*)buffer;
- check_variant_header(wirev, &v, stubMsg.BufferLength);
- wirev += 5;
+ wirev = check_variant_header(wirev, &v, stubMsg.BufferLength);
ok(*(short*)wirev == V_BOOL(&v), "wv[5] %04x\n", *(WORD*)wirev);
VariantInit(&v2);
stubMsg.Buffer = buffer;
@@ -1097,8 +1095,7 @@
ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next,
buffer + stubMsg.BufferLength);
wirev = (DWORD*)buffer;
- check_variant_header(wirev, &v, stubMsg.BufferLength);
- wirev += 5;
+ wirev = check_variant_header(wirev, &v, stubMsg.BufferLength);
ok(*wirev == 0xcccccccc, "wirev[5] %08x\n", *wirev); /* pad */
wirev++;
dec2 = dec;
@@ -1129,8 +1126,7 @@
ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next,
buffer + stubMsg.BufferLength);
wirev = (DWORD*)buffer;
- check_variant_header(wirev, &v, stubMsg.BufferLength);
- wirev += 5;
+ wirev = check_variant_header(wirev, &v, stubMsg.BufferLength);
ok(*wirev == 16, "wv[5] %08x\n", *wirev);
wirev++;
ok(!memcmp(wirev, &dec, sizeof(dec)), "wirev[6] %08x wirev[7] %08x wirev[8]
%08x wirev[9] %08x\n", *wirev, *(wirev + 1), *(wirev + 2), *(wirev + 3));
@@ -1211,8 +1207,7 @@
ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next,
buffer + stubMsg.BufferLength);
wirev = (DWORD*)buffer;
- check_variant_header(wirev, &v, stubMsg.BufferLength);
- wirev += 5;
+ wirev = check_variant_header(wirev, &v, stubMsg.BufferLength);
ok(*wirev, "wv[5] %08x\n", *wirev); /* win2k: this is b. winxp: this is
(char*)b + 1 */
wirev++;
check_bstr(wirev, V_BSTR(&v));
@@ -1240,8 +1235,7 @@
ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next,
buffer + stubMsg.BufferLength);
wirev = (DWORD*)buffer;
- check_variant_header(wirev, &v, stubMsg.BufferLength);
- wirev += 5;
+ wirev = check_variant_header(wirev, &v, stubMsg.BufferLength);
ok(*wirev == 0x4, "wv[5] %08x\n", *wirev);
wirev++;
ok(*wirev, "wv[6] %08x\n", *wirev); /* win2k: this is b. winxp: this is
(char*)b + 1 */
@@ -1281,8 +1275,7 @@
ok(next == buffer + expected, "got %p expect %p\n", next, buffer +
expected);
wirev = (DWORD*)buffer;
- check_variant_header(wirev, &v, expected);
- wirev += 5;
+ wirev = check_variant_header(wirev, &v, expected);
ok(*wirev, "wv[5] %08x\n", *wirev); /* win2k: this is lpsa. winxp: this is
(char*)lpsa + 1 */
wirev++;
check_safearray(wirev, lpsa);
@@ -1322,8 +1315,7 @@
ok(next == buffer + expected, "got %p expect %p\n", next, buffer +
expected);
wirev = (DWORD*)buffer;
- check_variant_header(wirev, &v, expected);
- wirev += 5;
+ wirev = check_variant_header(wirev, &v, expected);
ok(*wirev == 4, "wv[5] %08x\n", *wirev);
wirev++;
ok(*wirev, "wv[6] %08x\n", *wirev); /* win2k: this is lpsa. winxp: this is
(char*)lpsa + 1 */
@@ -1368,8 +1360,7 @@
next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v);
ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next,
buffer + stubMsg.BufferLength);
wirev = (DWORD*)buffer;
- check_variant_header(wirev, &v, stubMsg.BufferLength);
- wirev += 5;
+ wirev = check_variant_header(wirev, &v, stubMsg.BufferLength);
ok(*wirev == sizeof(VARIANT), "wv[5] %08x\n", *wirev);
wirev++;
@@ -1377,8 +1368,7 @@
wirev++;
ok(*wirev == 0xcccccccc, "wv[7] %08x\n", *wirev); /* pad */
wirev++;
- check_variant_header(wirev, &v2, stubMsg.BufferLength - 32);
- wirev += 5;
+ wirev = check_variant_header(wirev, &v2, stubMsg.BufferLength - 32);
ok(*wirev == 0xcccccccc, "wv[13] %08x\n", *wirev); /* pad for VT_R8 */
wirev++;
ok(*(double*)wirev == V_R8(&v2), "wv[6] %08x wv[7] %08x\n", *wirev,
*(wirev+1));
@@ -1403,32 +1393,31 @@
V_UNKNOWN(&v) = &heap_unknown->IUnknown_iface;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0,
&v);
- ok(stubMsg.BufferLength > 32, "size %d\n", stubMsg.BufferLength);
+ ok(stubMsg.BufferLength > 40, "size %d\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart =
alloc_aligned(stubMsg.BufferLength, &oldbuffer);
stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength;
memset(buffer, 0xcc, stubMsg.BufferLength);
next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v);
- wirev = (DWORD*)buffer;
- check_variant_header(wirev, &v, next - buffer);
- wirev += 5;
-
- todo_wine
+todo_wine
+ ok(heap_unknown->refs == 2, "got refcount %d\n",
heap_unknown->refs);
+ wirev = (DWORD*)buffer;
+ wirev = check_variant_header(wirev, &v, next - buffer);
+
ok(*wirev == (DWORD_PTR)V_UNKNOWN(&v) /* Win9x */ ||
*wirev == (DWORD_PTR)V_UNKNOWN(&v) + 1 /* NT */, "wv[5] %08x\n",
*wirev);
wirev++;
- todo_wine
ok(*wirev == next - buffer - 0x20, "wv[6] %08x\n", *wirev);
wirev++;
- todo_wine
ok(*wirev == next - buffer - 0x20, "wv[7] %08x\n", *wirev);
wirev++;
- todo_wine
ok(*wirev == 0x574f454d, "wv[8] %08x\n", *wirev);
VariantInit(&v3);
V_VT(&v3) = VT_UNKNOWN;
V_UNKNOWN(&v3) = &heap_unknown->IUnknown_iface;
IUnknown_AddRef(V_UNKNOWN(&v3));
stubMsg.Buffer = buffer;
+todo_wine
+ ok(heap_unknown->refs == 3, "got refcount %d\n",
heap_unknown->refs);
next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v3);
ok(V_VT(&v) == V_VT(&v3), "got vt %d expect %d\n", V_VT(&v),
V_VT(&v3));
ok(V_UNKNOWN(&v) == V_UNKNOWN(&v3), "got %p expect %p\n",
V_UNKNOWN(&v), V_UNKNOWN(&v3));
@@ -1449,8 +1438,7 @@
memset(buffer, 0xcc, stubMsg.BufferLength);
next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v);
wirev = (DWORD*)buffer;
- check_variant_header(wirev, &v, next - buffer);
- wirev += 5;
+ wirev = check_variant_header(wirev, &v, next - buffer);
ok(*wirev == 0, "wv[5] %08x\n", *wirev);
VariantInit(&v2);
@@ -1471,28 +1459,26 @@
V_UNKNOWNREF(&v) = (IUnknown **)&heap_unknown;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0,
&v);
- ok(stubMsg.BufferLength > 36, "size %d\n", stubMsg.BufferLength);
+ ok(stubMsg.BufferLength >= 44, "size %d\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart =
alloc_aligned(stubMsg.BufferLength, &oldbuffer);
stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength;
memset(buffer, 0xcc, stubMsg.BufferLength);
- next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v);
- wirev = (DWORD*)buffer;
- check_variant_header(wirev, &v, next - buffer);
- wirev += 5;
+ ok(heap_unknown->refs == 1, "got refcount %d\n",
heap_unknown->refs);
+ next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v);
+todo_wine
+ ok(heap_unknown->refs == 2, "got refcount %d\n",
heap_unknown->refs);
+ wirev = (DWORD*)buffer;
+ wirev = check_variant_header(wirev, &v, next - buffer);
ok(*wirev == 4, "wv[5] %08x\n", *wirev);
wirev++;
- todo_wine
ok(*wirev == (DWORD_PTR)heap_unknown /* Win9x, Win2000 */ ||
*wirev == (DWORD_PTR)heap_unknown + 1 /* XP */, "wv[6] %08x\n",
*wirev);
wirev++;
- todo_wine
ok(*wirev == next - buffer - 0x24, "wv[7] %08x\n", *wirev);
wirev++;
- todo_wine
ok(*wirev == next - buffer - 0x24, "wv[8] %08x\n", *wirev);
wirev++;
- todo_wine
ok(*wirev == 0x574f454d, "wv[9] %08x\n", *wirev);
VariantInit(&v3);
@@ -1501,6 +1487,7 @@
IUnknown_AddRef(V_UNKNOWN(&v3));
stubMsg.Buffer = buffer;
next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v3);
+ ok(heap_unknown->refs == 2, "got refcount %d\n",
heap_unknown->refs);
ok(V_VT(&v) == V_VT(&v3), "got vt %d expect %d\n", V_VT(&v),
V_VT(&v3));
ok(*V_UNKNOWNREF(&v) == *V_UNKNOWNREF(&v3), "got %p expect %p\n",
*V_UNKNOWNREF(&v), *V_UNKNOWNREF(&v3));
VARIANT_UserFree(&umcb.Flags, &v3);
Modified: trunk/rostests/winetests/oleaut32/vartest.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/oleaut32/vartes…
==============================================================================
--- trunk/rostests/winetests/oleaut32/vartest.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/oleaut32/vartest.c [iso-8859-1] Mon Jul 20 22:44:40 2015
@@ -7552,7 +7552,7 @@
}
/* Determine return type */
- if (!(rightvt == VT_EMPTY))
+ if (rightvt != VT_EMPTY)
{
if (leftvt == VT_NULL || rightvt == VT_NULL)
resvt = VT_NULL;
@@ -7581,7 +7581,7 @@
else if (leftvt == VT_R4 || rightvt == VT_R4)
resvt = VT_R4;
}
- else if (leftvt == VT_NULL && rightvt == VT_EMPTY)
+ else if (leftvt == VT_NULL)
resvt = VT_NULL;
else
bFail = TRUE;
Modified: trunk/rostests/winetests/oleaut32/vartype.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/oleaut32/vartyp…
==============================================================================
--- trunk/rostests/winetests/oleaut32/vartype.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/oleaut32/vartype.c [iso-8859-1] Mon Jul 20 22:44:40 2015
@@ -6323,6 +6323,11 @@
static const WCHAR testW[] = {'t','e','s','t',0};
+ if (GetEnvironmentVariableA("OANOCACHE", NULL, 0)) {
+ skip("BSTR cache is disabled, some tests will be skipped.\n");
+ return;
+ }
+
str = SysAllocString(testW);
/* This should put the string into cache */
SysFreeString(str);
@@ -6387,22 +6392,30 @@
{
static const WCHAR testW[] = {'t','e','s','t',0};
static WCHAR teststructW[] =
{'t','e','s','t','_','s','t','r','u','c','t',0};
+ static WCHAR teststruct2W[] =
{'t','e','s','t','_','s','t','r','u','c','t','2',0};
+ static WCHAR teststruct3W[] =
{'t','e','s','t','_','s','t','r','u','c','t','3',0};
+ WCHAR filenameW[MAX_PATH], filename2W[MAX_PATH];
+ ITypeInfo *typeinfo, *typeinfo2, *typeinfo3;
+ IRecordInfo *recinfo, *recinfo2, *recinfo3;
struct test_struct teststruct, testcopy;
- WCHAR filenameW[MAX_PATH];
+ ITypeLib *typelib, *typelib2;
const char *filename;
- IRecordInfo *recinfo;
- ITypeInfo *typeinfo;
DummyDispatch dispatch;
- ITypeLib *typelib;
TYPEATTR *attr;
MEMBERID memid;
UINT16 found;
HRESULT hr;
ULONG size;
+ BOOL ret;
filename = create_test_typelib(2);
MultiByteToWideChar(CP_ACP, 0, filename, -1, filenameW, MAX_PATH);
hr = LoadTypeLibEx(filenameW, REGKIND_NONE, &typelib);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ filename = create_test_typelib(3);
+ MultiByteToWideChar(CP_ACP, 0, filename, -1, filename2W, MAX_PATH);
+ hr = LoadTypeLibEx(filename2W, REGKIND_NONE, &typelib2);
ok(hr == S_OK, "got 0x%08x\n", hr);
typeinfo = NULL;
@@ -6415,8 +6428,39 @@
ok(IsEqualGUID(&attr->guid, &UUID_test_struct), "got %s\n",
wine_dbgstr_guid(&attr->guid));
ok(attr->typekind == TKIND_RECORD, "got %d\n", attr->typekind);
+ typeinfo2 = NULL;
+ found = 1;
+ hr = ITypeLib_FindName(typelib, teststruct2W, 0, &typeinfo2, &memid,
&found);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(typeinfo2 != NULL, "got %p\n", typeinfo2);
+
+ typeinfo3 = NULL;
+ found = 1;
+ hr = ITypeLib_FindName(typelib2, teststruct3W, 0, &typeinfo3, &memid,
&found);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(typeinfo3 != NULL, "got %p\n", typeinfo3);
+
hr = GetRecordInfoFromTypeInfo(typeinfo, &recinfo);
ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ hr = GetRecordInfoFromTypeInfo(typeinfo2, &recinfo2);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ hr = GetRecordInfoFromTypeInfo(typeinfo3, &recinfo3);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ /* IsMatchingType, these two records only differ in GUIDs */
+ ret = IRecordInfo_IsMatchingType(recinfo, recinfo2);
+ ok(!ret, "got %d\n", ret);
+
+ /* these two have same GUIDs, but different set of fields */
+ ret = IRecordInfo_IsMatchingType(recinfo2, recinfo3);
+ ok(ret, "got %d\n", ret);
+
+ IRecordInfo_Release(recinfo3);
+ ITypeInfo_Release(typeinfo3);
+ IRecordInfo_Release(recinfo2);
+ ITypeInfo_Release(typeinfo2);
size = 0;
hr = IRecordInfo_GetSize(recinfo, &size);
@@ -6476,7 +6520,8 @@
ITypeInfo_Release(typeinfo);
ITypeLib_Release(typelib);
- DeleteFileA(filename);
+ DeleteFileW(filenameW);
+ DeleteFileW(filename2W);
}
START_TEST(vartype)