mirror of
https://github.com/reactos/reactos.git
synced 2025-04-20 20:36:35 +00:00
sync oleaur32_winetest with wine 1.1.14
svn path=/trunk/; revision=39473
This commit is contained in:
parent
f44fdba630
commit
25286fb023
9 changed files with 116 additions and 45 deletions
|
@ -5,7 +5,7 @@
|
|||
<include base="oleaut32_winetest">.</include>
|
||||
<include base="ReactOS">include/reactos/wine</include>
|
||||
<include base="oleaut32_winetest" root="intermediate">.</include>
|
||||
<define name="__ROS_LONG64__" />
|
||||
<define name="__ROS_LONG64__" />
|
||||
<library>wine</library>
|
||||
<library>oleaut32</library>
|
||||
<library>ole32</library>
|
||||
|
@ -16,6 +16,7 @@
|
|||
<library>kernel32</library>
|
||||
<library>uuid</library>
|
||||
<library>ntdll</library>
|
||||
<library>tmarshal_interface</library>
|
||||
<file>olefont.c</file>
|
||||
<file>olepicture.c</file>
|
||||
<file>safearray.c</file>
|
||||
|
@ -35,6 +36,10 @@
|
|||
<dependency>stdole2</dependency>
|
||||
<file>tmarshal.idl</file>
|
||||
</module>
|
||||
<module name="tmarshal_interface" type="idlinterface">
|
||||
<dependency>stdole2</dependency>
|
||||
<file>tmarshal.idl</file>
|
||||
</module>
|
||||
<module name="test_tlb" type="embeddedtypelib" allowwarnings="true">
|
||||
<dependency>stdole2</dependency>
|
||||
<file>test_tlb.idl</file>
|
||||
|
|
|
@ -324,6 +324,7 @@ static void test_empty_image(void) {
|
|||
ULARGE_INTEGER newpos1;
|
||||
LARGE_INTEGER seekto;
|
||||
short type;
|
||||
DWORD attr;
|
||||
|
||||
/* Empty image. Happens occasionally in VB programs. */
|
||||
hglob = GlobalAlloc (0, 8);
|
||||
|
@ -347,6 +348,11 @@ static void test_empty_image(void) {
|
|||
ok (hres == S_OK,"empty picture get type failed with hres 0x%08x\n", hres);
|
||||
ok (type == PICTYPE_NONE,"type is %d, but should be PICTYPE_NONE(0)\n", type);
|
||||
|
||||
attr = 0xdeadbeef;
|
||||
hres = IPicture_get_Attributes (pic, &attr);
|
||||
ok (hres == S_OK,"empty picture get attributes failed with hres 0x%08x\n", hres);
|
||||
ok (attr == 0,"attr is %d, but should be 0\n", attr);
|
||||
|
||||
hres = IPicture_get_Handle (pic, &handle);
|
||||
ok (hres == S_OK,"empty picture get handle failed with hres 0x%08x\n", hres);
|
||||
ok (handle == 0, "empty picture get handle did not return 0, but 0x%08x\n", handle);
|
||||
|
@ -489,7 +495,7 @@ static void test_OleCreatePictureIndirect(void)
|
|||
IPicture_Release(pict);
|
||||
}
|
||||
|
||||
static void test_apm()
|
||||
static void test_apm(void)
|
||||
{
|
||||
OLE_HANDLE handle;
|
||||
LPSTREAM stream;
|
||||
|
@ -645,6 +651,55 @@ static void test_Render(void)
|
|||
ReleaseDC(NULL, hdc);
|
||||
}
|
||||
|
||||
static void test_get_Attributes(void)
|
||||
{
|
||||
IPicture *pic;
|
||||
HRESULT hres;
|
||||
short type;
|
||||
DWORD attr;
|
||||
|
||||
OleCreatePictureIndirect(NULL, &IID_IPicture, TRUE, (VOID**)&pic);
|
||||
hres = IPicture_get_Type(pic, &type);
|
||||
ok(hres == S_OK, "IPicture_get_Type does not return S_OK, but 0x%08x\n", hres);
|
||||
ok(type == PICTYPE_UNINITIALIZED, "Expected type = PICTYPE_UNINITIALIZED, got = %d\n", type);
|
||||
|
||||
hres = IPicture_get_Attributes(pic, NULL);
|
||||
ole_expect(hres, E_POINTER);
|
||||
|
||||
attr = 0xdeadbeef;
|
||||
hres = IPicture_get_Attributes(pic, &attr);
|
||||
ole_expect(hres, S_OK);
|
||||
ok(attr == 0, "IPicture_get_Attributes does not reset attr to zero, got %d\n", attr);
|
||||
|
||||
IPicture_Release(pic);
|
||||
}
|
||||
|
||||
static void test_get_Handle(void)
|
||||
{
|
||||
IPicture *pic;
|
||||
HRESULT hres;
|
||||
|
||||
OleCreatePictureIndirect(NULL, &IID_IPicture, TRUE, (VOID**)&pic);
|
||||
|
||||
hres = IPicture_get_Handle(pic, NULL);
|
||||
ole_expect(hres, E_POINTER);
|
||||
|
||||
IPicture_Release(pic);
|
||||
}
|
||||
|
||||
static void test_get_Type(void)
|
||||
{
|
||||
IPicture *pic;
|
||||
HRESULT hres;
|
||||
|
||||
OleCreatePictureIndirect(NULL, &IID_IPicture, TRUE, (VOID**)&pic);
|
||||
|
||||
hres = IPicture_get_Type(pic, NULL);
|
||||
ole_expect(hres, E_POINTER);
|
||||
|
||||
IPicture_Release(pic);
|
||||
}
|
||||
|
||||
START_TEST(olepicture)
|
||||
{
|
||||
hOleaut32 = GetModuleHandleA("oleaut32.dll");
|
||||
|
@ -672,6 +727,9 @@ START_TEST(olepicture)
|
|||
test_Invoke();
|
||||
test_OleCreatePictureIndirect();
|
||||
test_Render();
|
||||
test_get_Attributes();
|
||||
test_get_Handle();
|
||||
test_get_Type();
|
||||
}
|
||||
|
||||
|
||||
|
@ -702,11 +760,11 @@ static HRESULT WINAPI NoStatStreamImpl_QueryInterface(
|
|||
*ppvObject = 0;
|
||||
if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0)
|
||||
{
|
||||
*ppvObject = (IStream*)This;
|
||||
*ppvObject = This;
|
||||
}
|
||||
else if (memcmp(&IID_IStream, riid, sizeof(IID_IStream)) == 0)
|
||||
{
|
||||
*ppvObject = (IStream*)This;
|
||||
*ppvObject = This;
|
||||
}
|
||||
|
||||
if ((*ppvObject)==0)
|
||||
|
|
|
@ -275,7 +275,7 @@ static struct {
|
|||
static void test_safearray(void)
|
||||
{
|
||||
SAFEARRAY *a, b, *c;
|
||||
unsigned int i;
|
||||
unsigned int i, diff;
|
||||
LONG indices[2];
|
||||
HRESULT hres;
|
||||
SAFEARRAYBOUND bound, bounds[2];
|
||||
|
@ -434,19 +434,22 @@ static void test_safearray(void)
|
|||
indices[1] = 23;
|
||||
hres = SafeArrayPtrOfIndex(a, indices, (void**)&ptr2);
|
||||
ok(S_OK == hres,"SAPOI failed [1,23], hres 0x%x\n",hres);
|
||||
ok(ptr2 - ptr1 == 8,"ptr difference is not 8, but %d (%p vs %p)\n", ptr2-ptr1, ptr2, ptr1);
|
||||
diff = ptr2 - ptr1;
|
||||
ok(diff == 8,"ptr difference is not 8, but %d (%p vs %p)\n", diff, ptr2, ptr1);
|
||||
|
||||
indices[0] = 3;
|
||||
indices[1] = 24;
|
||||
hres = SafeArrayPtrOfIndex(a, indices, (void**)&ptr2);
|
||||
ok(S_OK == hres,"SAPOI failed [5,24], hres 0x%x\n",hres);
|
||||
ok(ptr2 - ptr1 == 176,"ptr difference is not 176, but %d (%p vs %p)\n", ptr2-ptr1, ptr2, ptr1);
|
||||
diff = ptr2 - ptr1;
|
||||
ok(diff == 176,"ptr difference is not 176, but %d (%p vs %p)\n", diff, ptr2, ptr1);
|
||||
|
||||
indices[0] = 20;
|
||||
indices[1] = 23;
|
||||
hres = SafeArrayPtrOfIndex(a, indices, (void**)&ptr2);
|
||||
ok(S_OK == hres,"SAPOI failed [20,23], hres 0x%x\n",hres);
|
||||
ok(ptr2 - ptr1 == 76,"ptr difference is not 76, but %d (%p vs %p)\n", ptr2-ptr1, ptr2, ptr1);
|
||||
diff = ptr2 - ptr1;
|
||||
ok(diff == 76,"ptr difference is not 76, but %d (%p vs %p)\n", diff, ptr2, ptr1);
|
||||
|
||||
hres = SafeArrayUnaccessData(a);
|
||||
ok(S_OK == hres, "SAUAD failed with 0x%x\n", hres);
|
||||
|
@ -1271,7 +1274,7 @@ static void test_SafeArrayCopyData(void)
|
|||
/* Fill the source array with some data; it doesn't matter what */
|
||||
for (dimension = 0; dimension < size; dimension++)
|
||||
{
|
||||
int* data = (int*)sa->pvData;
|
||||
int* data = sa->pvData;
|
||||
data[dimension] = dimension;
|
||||
}
|
||||
|
||||
|
@ -1417,7 +1420,7 @@ static void test_SafeArrayCreateEx(void)
|
|||
|
||||
/* Win32 doesn't care if GetSize fails */
|
||||
fail_GetSize = TRUE;
|
||||
sa = pSafeArrayCreateEx(VT_RECORD, 1, sab, (LPVOID)iRec);
|
||||
sa = pSafeArrayCreateEx(VT_RECORD, 1, sab, iRec);
|
||||
ok(sa != NULL, "CreateEx (Fail Size) failed\n");
|
||||
ok(iRec->ref == START_REF_COUNT + 1, "Wrong iRec refcount %d\n", iRec->ref);
|
||||
ok(iRec->sizeCalled == 1, "GetSize called %d times\n", iRec->sizeCalled);
|
||||
|
@ -1434,7 +1437,7 @@ static void test_SafeArrayCreateEx(void)
|
|||
iRec->ref = START_REF_COUNT;
|
||||
iRec->sizeCalled = 0;
|
||||
iRec->clearCalled = 0;
|
||||
sa = pSafeArrayCreateEx(VT_RECORD, 1, sab, (LPVOID)iRec);
|
||||
sa = pSafeArrayCreateEx(VT_RECORD, 1, sab, iRec);
|
||||
ok(sa != NULL, "CreateEx (Rec) failed\n");
|
||||
ok(iRec->ref == START_REF_COUNT + 1, "Wrong iRec refcount %d\n", iRec->ref);
|
||||
ok(iRec->sizeCalled == 1, "GetSize called %d times\n", iRec->sizeCalled);
|
||||
|
|
|
@ -135,7 +135,7 @@ struct host_object_data
|
|||
|
||||
static DWORD CALLBACK host_object_proc(LPVOID p)
|
||||
{
|
||||
struct host_object_data *data = (struct host_object_data *)p;
|
||||
struct host_object_data *data = p;
|
||||
HRESULT hr;
|
||||
MSG msg;
|
||||
|
||||
|
@ -546,7 +546,7 @@ static HRESULT WINAPI Widget_VariantArrayPtr(
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static void WINAPI Widget_Variant(
|
||||
static HRESULT WINAPI Widget_Variant(
|
||||
IWidget __RPC_FAR * iface,
|
||||
VARIANT var)
|
||||
{
|
||||
|
@ -554,9 +554,10 @@ static void WINAPI Widget_Variant(
|
|||
ok(V_VT(&var) == VT_CY, "V_VT(&var) was %d\n", V_VT(&var));
|
||||
ok(S(V_CY(&var)).Hi == 0xdababe, "V_CY(&var).Hi was 0x%x\n", S(V_CY(&var)).Hi);
|
||||
ok(S(V_CY(&var)).Lo == 0xdeadbeef, "V_CY(&var).Lo was 0x%x\n", S(V_CY(&var)).Lo);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static void WINAPI Widget_VarArg(
|
||||
static HRESULT WINAPI Widget_VarArg(
|
||||
IWidget * iface,
|
||||
int numexpect,
|
||||
SAFEARRAY * values)
|
||||
|
@ -586,9 +587,11 @@ static void WINAPI Widget_VarArg(
|
|||
|
||||
hr = SafeArrayUnaccessData(values);
|
||||
ok(hr == S_OK, "SafeArrayUnaccessData failed with %x\n", hr);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static void WINAPI Widget_StructArgs(
|
||||
static HRESULT WINAPI Widget_StructArgs(
|
||||
IWidget * iface,
|
||||
MYSTRUCT byval,
|
||||
MYSTRUCT *byptr,
|
||||
|
@ -597,6 +600,7 @@ static void WINAPI Widget_StructArgs(
|
|||
ok(memcmp(&byval, &MYSTRUCT_BYVAL, sizeof(MYSTRUCT))==0, "Struct parameter passed by value corrupted\n");
|
||||
ok(memcmp(byptr, &MYSTRUCT_BYPTR, sizeof(MYSTRUCT))==0, "Struct parameter passed by pointer corrupted\n");
|
||||
ok(memcmp(arr, MYSTRUCT_ARRAY, sizeof(MYSTRUCT_ARRAY))==0, "Array of structs corrupted\n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1102,7 +1106,10 @@ static void test_typelibmarshal(void)
|
|||
/* call StructArgs (direct) */
|
||||
mystruct = MYSTRUCT_BYPTR;
|
||||
memcpy(mystructArray, MYSTRUCT_ARRAY, sizeof(mystructArray));
|
||||
IWidget_StructArgs(pWidget, MYSTRUCT_BYVAL, &mystruct, mystructArray);
|
||||
hr = IWidget_StructArgs(pWidget, MYSTRUCT_BYVAL, &mystruct, mystructArray);
|
||||
todo_wine {
|
||||
ok_ole_success(hr, IWidget_StructArgs);
|
||||
}
|
||||
|
||||
/* call Clone */
|
||||
dispparams.cNamedArgs = 0;
|
||||
|
|
|
@ -112,13 +112,13 @@ library TestTypelib
|
|||
HRESULT VariantArrayPtr([in] SAFEARRAY(VARIANT) *values);
|
||||
|
||||
[id(DISPID_TM_VARIANT)]
|
||||
void Variant([in] VARIANT var);
|
||||
HRESULT Variant([in] VARIANT var);
|
||||
|
||||
[vararg, id(DISPID_TM_VARARG)]
|
||||
void VarArg([in] int numexpect, [in] SAFEARRAY(VARIANT) values);
|
||||
HRESULT VarArg([in] int numexpect, [in] SAFEARRAY(VARIANT) values);
|
||||
|
||||
[id(DISPID_TM_STRUCTARGS)]
|
||||
void StructArgs([in] MYSTRUCT byval, [in] MYSTRUCT *byptr, [in] MYSTRUCT arr[5]);
|
||||
HRESULT StructArgs([in] MYSTRUCT byval, [in] MYSTRUCT *byptr, [in] MYSTRUCT arr[5]);
|
||||
|
||||
[id(DISPID_TM_ERROR)]
|
||||
HRESULT Error();
|
||||
|
|
|
@ -27,11 +27,9 @@
|
|||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
|
||||
#include "oleauto.h"
|
||||
#include "ocidl.h"
|
||||
#include "shlwapi.h"
|
||||
#include "initguid.h"
|
||||
#include "tmarshal.h"
|
||||
|
||||
#define expect_eq(expr, value, type, format) { type _ret = (expr); ok((value) == _ret, #expr " expected " format " got " format "\n", value, _ret); }
|
||||
|
@ -401,7 +399,7 @@ static void test_CreateDispTypeInfo(void)
|
|||
ok(pFuncDesc->invkind == methdata[1].wFlags, "invkind %d\n", pFuncDesc->invkind);
|
||||
ok(pFuncDesc->callconv == methdata[1].cc, "callconv %d\n", pFuncDesc->callconv);
|
||||
ok(pFuncDesc->cParams == methdata[1].cArgs, "cParams %d\n", pFuncDesc->cParams);
|
||||
ok(pFuncDesc->oVft == 4, "oVft %d\n", pFuncDesc->oVft);
|
||||
ok(pFuncDesc->oVft == sizeof(void *), "oVft %d\n", pFuncDesc->oVft);
|
||||
ok(pFuncDesc->wFuncFlags == 0, "oVft %d\n", pFuncDesc->wFuncFlags);
|
||||
ok(pFuncDesc->elemdescFunc.tdesc.vt == VT_I4, "ret vt %x\n", pFuncDesc->elemdescFunc.tdesc.vt);
|
||||
ITypeInfo_ReleaseFuncDesc(pTI2, pFuncDesc);
|
||||
|
@ -412,7 +410,7 @@ static void test_CreateDispTypeInfo(void)
|
|||
ok(pFuncDesc->invkind == methdata[2].wFlags, "invkind %d\n", pFuncDesc->invkind);
|
||||
ok(pFuncDesc->callconv == methdata[2].cc, "callconv %d\n", pFuncDesc->callconv);
|
||||
ok(pFuncDesc->cParams == methdata[2].cArgs, "cParams %d\n", pFuncDesc->cParams);
|
||||
ok(pFuncDesc->oVft == 12, "oVft %d\n", pFuncDesc->oVft);
|
||||
ok(pFuncDesc->oVft == 3 * sizeof(void *), "oVft %d\n", pFuncDesc->oVft);
|
||||
ok(pFuncDesc->wFuncFlags == 0, "oVft %d\n", pFuncDesc->wFuncFlags);
|
||||
ok(pFuncDesc->elemdescFunc.tdesc.vt == VT_HRESULT, "ret vt %x\n", pFuncDesc->elemdescFunc.tdesc.vt);
|
||||
ok(pFuncDesc->lprgelemdescParam[0].tdesc.vt == VT_I4, "parm 0 vt %x\n", pFuncDesc->lprgelemdescParam[0].tdesc.vt);
|
||||
|
@ -425,7 +423,7 @@ static void test_CreateDispTypeInfo(void)
|
|||
ok(pFuncDesc->invkind == methdata[3].wFlags, "invkind %d\n", pFuncDesc->invkind);
|
||||
ok(pFuncDesc->callconv == methdata[3].cc, "callconv %d\n", pFuncDesc->callconv);
|
||||
ok(pFuncDesc->cParams == methdata[3].cArgs, "cParams %d\n", pFuncDesc->cParams);
|
||||
ok(pFuncDesc->oVft == 16, "oVft %d\n", pFuncDesc->oVft);
|
||||
ok(pFuncDesc->oVft == 4 * sizeof(void *), "oVft %d\n", pFuncDesc->oVft);
|
||||
ok(pFuncDesc->wFuncFlags == 0, "oVft %d\n", pFuncDesc->wFuncFlags);
|
||||
ok(pFuncDesc->elemdescFunc.tdesc.vt == VT_I4, "ret vt %x\n", pFuncDesc->elemdescFunc.tdesc.vt);
|
||||
ITypeInfo_ReleaseFuncDesc(pTI2, pFuncDesc);
|
||||
|
@ -651,7 +649,7 @@ static void test_QueryPathOfRegTypeLib(void)
|
|||
BSTR path;
|
||||
|
||||
status = UuidCreate(&uid);
|
||||
ok(!status || status == RPC_S_UUID_LOCAL_ONLY, "UuidCreate error %08lx\n", status);
|
||||
ok(!status || status == RPC_S_UUID_LOCAL_ONLY, "UuidCreate error %08x\n", status);
|
||||
|
||||
StringFromGUID2(&uid, uid_str, 40);
|
||||
/*trace("GUID: %s\n", wine_dbgstr_w(uid_str));*/
|
||||
|
@ -705,7 +703,7 @@ static void test_inheritance(void)
|
|||
hr = ITypeInfo_GetTypeAttr(pTI, &pTA);
|
||||
ok(hr == S_OK, "hr %08x\n", hr);
|
||||
ok(pTA->typekind == TKIND_DISPATCH, "kind %04x\n", pTA->typekind);
|
||||
ok(pTA->cbSizeVft == 28, "sizevft %d\n", pTA->cbSizeVft);
|
||||
ok(pTA->cbSizeVft == 7 * sizeof(void *), "sizevft %d\n", pTA->cbSizeVft);
|
||||
ok(pTA->wTypeFlags == TYPEFLAG_FDISPATCHABLE, "typeflags %x\n", pTA->wTypeFlags);
|
||||
if(use_midl_tlb) {
|
||||
ok(pTA->cFuncs == 6, "cfuncs %d\n", pTA->cFuncs);
|
||||
|
@ -727,7 +725,7 @@ if(use_midl_tlb) {
|
|||
hr = ITypeInfo_GetFuncDesc(pTI, 5, &pFD);
|
||||
ok(hr == S_OK, "hr %08x\n", hr);
|
||||
ok(pFD->memid == 0x60020000, "memid %08x\n", pFD->memid);
|
||||
ok(pFD->oVft == 20, "oVft %d\n", pFD->oVft);
|
||||
ok(pFD->oVft == 5 * sizeof(void *), "oVft %d\n", pFD->oVft);
|
||||
ITypeInfo_ReleaseFuncDesc(pTI, pFD);
|
||||
}
|
||||
ITypeInfo_Release(pTI);
|
||||
|
@ -740,7 +738,7 @@ if(use_midl_tlb) {
|
|||
hr = ITypeInfo_GetTypeAttr(pTI, &pTA);
|
||||
ok(hr == S_OK, "hr %08x\n", hr);
|
||||
ok(pTA->typekind == TKIND_DISPATCH, "kind %04x\n", pTA->typekind);
|
||||
ok(pTA->cbSizeVft == 28, "sizevft %d\n", pTA->cbSizeVft);
|
||||
ok(pTA->cbSizeVft == 7 * sizeof(void *), "sizevft %d\n", pTA->cbSizeVft);
|
||||
ok(pTA->wTypeFlags == TYPEFLAG_FDISPATCHABLE, "typeflags %x\n", pTA->wTypeFlags);
|
||||
ok(pTA->cFuncs == 1, "cfuncs %d\n", pTA->cFuncs);
|
||||
ok(pTA->cImplTypes == 1, "cimpltypes %d\n", pTA->cImplTypes);
|
||||
|
@ -770,7 +768,7 @@ if(use_midl_tlb) {
|
|||
hr = ITypeInfo_GetTypeAttr(pTI, &pTA);
|
||||
ok(hr == S_OK, "hr %08x\n", hr);
|
||||
ok(pTA->typekind == TKIND_DISPATCH, "kind %04x\n", pTA->typekind);
|
||||
ok(pTA->cbSizeVft == 28, "sizevft %d\n", pTA->cbSizeVft);
|
||||
ok(pTA->cbSizeVft == 7 * sizeof(void *), "sizevft %d\n", pTA->cbSizeVft);
|
||||
if(use_midl_tlb) {
|
||||
ok(pTA->wTypeFlags == TYPEFLAG_FDUAL, "typeflags %x\n", pTA->wTypeFlags);
|
||||
}
|
||||
|
@ -801,7 +799,7 @@ if(use_midl_tlb) {
|
|||
hr = ITypeInfo_GetTypeAttr(pTI, &pTA);
|
||||
ok(hr == S_OK, "hr %08x\n", hr);
|
||||
ok(pTA->typekind == TKIND_DISPATCH, "kind %04x\n", pTA->typekind);
|
||||
ok(pTA->cbSizeVft == 28, "sizevft %d\n", pTA->cbSizeVft);
|
||||
ok(pTA->cbSizeVft == 7 * sizeof(void *), "sizevft %d\n", pTA->cbSizeVft);
|
||||
ok(pTA->wTypeFlags == (TYPEFLAG_FDISPATCHABLE|TYPEFLAG_FDUAL), "typeflags %x\n", pTA->wTypeFlags);
|
||||
ok(pTA->cFuncs == 10, "cfuncs %d\n", pTA->cFuncs);
|
||||
ok(pTA->cImplTypes == 1, "cimpltypes %d\n", pTA->cImplTypes);
|
||||
|
@ -829,7 +827,7 @@ if(use_midl_tlb) {
|
|||
hr = ITypeInfo_GetTypeAttr(pTI, &pTA);
|
||||
ok(hr == S_OK, "hr %08x\n", hr);
|
||||
ok(pTA->typekind == TKIND_DISPATCH, "kind %04x\n", pTA->typekind);
|
||||
ok(pTA->cbSizeVft == 28, "sizevft %d\n", pTA->cbSizeVft);
|
||||
ok(pTA->cbSizeVft == 7 * sizeof(void *), "sizevft %d\n", pTA->cbSizeVft);
|
||||
ok(pTA->wTypeFlags == TYPEFLAG_FDISPATCHABLE, "typeflags %x\n", pTA->wTypeFlags);
|
||||
if(use_midl_tlb) {
|
||||
ok(pTA->cFuncs == 3, "cfuncs %d\n", pTA->cFuncs);
|
||||
|
@ -853,7 +851,7 @@ if(use_midl_tlb) {
|
|||
hr = ITypeInfo_GetFuncDesc(pTI, 2, &pFD);
|
||||
ok(hr == S_OK, "hr %08x\n", hr);
|
||||
ok(pFD->memid == 0x60010000, "memid %08x\n", pFD->memid);
|
||||
ok(pFD->oVft == 8, "oVft %d\n", pFD->oVft);
|
||||
ok(pFD->oVft == 2 * sizeof(void *), "oVft %d\n", pFD->oVft);
|
||||
ITypeInfo_ReleaseFuncDesc(pTI, pFD);
|
||||
}
|
||||
ITypeInfo_Release(pTI);
|
||||
|
@ -865,7 +863,7 @@ if(use_midl_tlb) {
|
|||
hr = ITypeInfo_GetTypeAttr(pTI, &pTA);
|
||||
ok(hr == S_OK, "hr %08x\n", hr);
|
||||
ok(pTA->typekind == TKIND_DISPATCH, "kind %04x\n", pTA->typekind);
|
||||
ok(pTA->cbSizeVft == 28, "sizevft %d\n", pTA->cbSizeVft);
|
||||
ok(pTA->cbSizeVft == 7 * sizeof(void *), "sizevft %d\n", pTA->cbSizeVft);
|
||||
ok(pTA->wTypeFlags == TYPEFLAG_FDISPATCHABLE, "typeflags %x\n", pTA->wTypeFlags);
|
||||
if(use_midl_tlb) {
|
||||
ok(pTA->cFuncs == 10, "cfuncs %d\n", pTA->cFuncs);
|
||||
|
@ -887,7 +885,7 @@ if(use_midl_tlb) {
|
|||
hr = ITypeInfo_GetFuncDesc(pTI, 9, &pFD);
|
||||
ok(hr == S_OK, "hr %08x\n", hr);
|
||||
ok(pFD->memid == 0x1236, "memid %08x\n", pFD->memid);
|
||||
ok(pFD->oVft == 36, "oVft %d\n", pFD->oVft);
|
||||
ok(pFD->oVft == 9 * sizeof(void *), "oVft %d\n", pFD->oVft);
|
||||
ITypeInfo_ReleaseFuncDesc(pTI, pFD);
|
||||
}
|
||||
ITypeInfo_Release(pTI);
|
||||
|
@ -900,7 +898,7 @@ if(use_midl_tlb) {
|
|||
hr = ITypeInfo_GetTypeAttr(pTI, &pTA);
|
||||
ok(hr == S_OK, "hr %08x\n", hr);
|
||||
ok(pTA->typekind == TKIND_INTERFACE, "kind %04x\n", pTA->typekind);
|
||||
ok(pTA->cbSizeVft == 24, "sizevft %d\n", pTA->cbSizeVft);
|
||||
ok(pTA->cbSizeVft == 6 * sizeof(void *), "sizevft %d\n", pTA->cbSizeVft);
|
||||
ok(pTA->wTypeFlags == 0, "typeflags %x\n", pTA->wTypeFlags);
|
||||
if(use_midl_tlb) {
|
||||
ok(pTA->cFuncs == 1, "cfuncs %d\n", pTA->cFuncs);
|
||||
|
@ -913,7 +911,7 @@ if(use_midl_tlb) {
|
|||
hr = ITypeInfo_GetFuncDesc(pTI, 0, &pFD);
|
||||
ok(hr == S_OK, "hr %08x\n", hr);
|
||||
ok(pFD->memid == 0x60020000, "memid %08x\n", pFD->memid);
|
||||
ok(pFD->oVft == 20, "oVft %d\n", pFD->oVft);
|
||||
ok(pFD->oVft == 5 * sizeof(void *), "oVft %d\n", pFD->oVft);
|
||||
ITypeInfo_ReleaseFuncDesc(pTI, pFD);
|
||||
}
|
||||
ITypeInfo_Release(pTI);
|
||||
|
|
|
@ -154,7 +154,7 @@ static void check_safearray(void *buffer, LPSAFEARRAY lpsa)
|
|||
{
|
||||
GUID guid;
|
||||
SafeArrayGetIID(lpsa, &guid);
|
||||
ok(IsEqualGUID(&guid, (GUID*)wiresa), "guid mismatch\n");
|
||||
ok(IsEqualGUID(&guid, wiresa), "guid mismatch\n");
|
||||
wiresa += sizeof(GUID);
|
||||
}
|
||||
ok(!memcmp(wiresa, lpsa->rgsabound, sizeof(lpsa->rgsabound[0]) * lpsa->cDims), "bounds mismatch\n");
|
||||
|
@ -444,7 +444,7 @@ static HRESULT WINAPI HeapUnknown_QueryInterface(IUnknown *iface, REFIID riid, v
|
|||
if (IsEqualIID(riid, &IID_IUnknown))
|
||||
{
|
||||
IUnknown_AddRef(iface);
|
||||
*ppv = (LPVOID)iface;
|
||||
*ppv = iface;
|
||||
return S_OK;
|
||||
}
|
||||
*ppv = NULL;
|
||||
|
|
|
@ -2838,7 +2838,7 @@ static void test_VarFix(void)
|
|||
S1(U1(*pdec)).Mid32 = 0;
|
||||
S1(U1(*pdec)).Lo32 = 1;
|
||||
hres = pVarFix(&v,&vDst);
|
||||
ok(hres == S_OK && V_VT(&vDst) == VT_DECIMAL && !memcmp(&v, &vDst, sizeof(v)),
|
||||
ok(hres == S_OK && V_VT(&vDst) == VT_DECIMAL && !memcmp(&V_DECIMAL(&v), &V_DECIMAL(&vDst), sizeof(DECIMAL)),
|
||||
"VarFix: expected 0x0,%d,identical, got 0x%X,%d\n", VT_DECIMAL,
|
||||
hres, V_VT(&vDst));
|
||||
|
||||
|
@ -2953,7 +2953,7 @@ static void test_VarInt(void)
|
|||
S1(U1(*pdec)).Mid32 = 0;
|
||||
S1(U1(*pdec)).Lo32 = 1;
|
||||
hres = pVarInt(&v,&vDst);
|
||||
ok(hres == S_OK && V_VT(&vDst) == VT_DECIMAL && !memcmp(&v, &vDst, sizeof(v)),
|
||||
ok(hres == S_OK && V_VT(&vDst) == VT_DECIMAL && !memcmp(&V_DECIMAL(&v), &V_DECIMAL(&vDst), sizeof(DECIMAL)),
|
||||
"VarInt: expected 0x0,%d,identical, got 0x%X,%d\n", VT_DECIMAL,
|
||||
hres, V_VT(&vDst));
|
||||
|
||||
|
|
|
@ -554,7 +554,7 @@ static HRESULT WINAPI DummyDispatch_QueryInterface(LPDISPATCH iface,
|
|||
}
|
||||
if (*ppvObject)
|
||||
{
|
||||
DummyDispatch_AddRef((IDispatch*)*ppvObject);
|
||||
DummyDispatch_AddRef(*ppvObject);
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
|
@ -5060,7 +5060,7 @@ static void test_SysStringByteLen(void)
|
|||
BSTR str = GetBSTR(&bstr);
|
||||
|
||||
bstr.dwLen = 0;
|
||||
ok (SysStringByteLen(str) == 0, "Expected dwLen 0, got %d\n", SysStringLen(str));
|
||||
ok (SysStringByteLen(str) == 0, "Expected dwLen 0, got %d\n", SysStringByteLen(str));
|
||||
bstr.dwLen = 2;
|
||||
ok (SysStringByteLen(str) == 2, "Expected dwLen 2, got %d\n", SysStringByteLen(str));
|
||||
}
|
||||
|
@ -5452,12 +5452,12 @@ static void test_IUnknownChangeTypeEx(void)
|
|||
/* =>IDispatch */
|
||||
u.ref = 1;
|
||||
V_VT(&vSrc) = VT_UNKNOWN;
|
||||
V_UNKNOWN(&vSrc) = (IUnknown*)pu;
|
||||
V_UNKNOWN(&vSrc) = pu;
|
||||
VariantInit(&vDst);
|
||||
hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, 0, VT_UNKNOWN);
|
||||
/* Note vSrc is not cleared, as final refcount is 2 */
|
||||
ok(hres == S_OK && u.ref == 2 &&
|
||||
V_VT(&vDst) == VT_UNKNOWN && V_UNKNOWN(&vDst) == (IUnknown*)pu,
|
||||
V_VT(&vDst) == VT_UNKNOWN && V_UNKNOWN(&vDst) == pu,
|
||||
"change unk(src,dst): expected 0x%08x,%d,%d,%p, got 0x%08x,%d,%d,%p\n",
|
||||
S_OK, 2, VT_UNKNOWN, pu, hres, u.ref, V_VT(&vDst), V_UNKNOWN(&vDst));
|
||||
|
||||
|
@ -5467,7 +5467,7 @@ static void test_IUnknownChangeTypeEx(void)
|
|||
HRESULT hExpected = DISP_E_BADVARTYPE;
|
||||
|
||||
V_VT(&vSrc) = VT_UNKNOWN;
|
||||
V_UNKNOWN(&vSrc) = (IUnknown*)pu;
|
||||
V_UNKNOWN(&vSrc) = pu;
|
||||
VariantInit(&vDst);
|
||||
|
||||
if (vt == VT_UNKNOWN || vt == VT_DISPATCH || vt == VT_EMPTY || vt == VT_NULL)
|
||||
|
|
Loading…
Reference in a new issue