Module: wine Branch: master Commit: 7fe67b159d755f52a2db5bd4076291e9ffcf878a URL: http://source.winehq.org/git/wine.git/?a=commit;h=7fe67b159d755f52a2db5bd407...
Author: Rob Shearman robertshearman@gmail.com Date: Thu Feb 5 16:23:54 2009 +0000
rpcrt4: Change the test of CStdStubBuffer->pPSFactory to only test for the field not being NULL.
The address varies on older versions of Windows and isn't really important.
---
dlls/rpcrt4/tests/cstub.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/dlls/rpcrt4/tests/cstub.c b/dlls/rpcrt4/tests/cstub.c index 88bf0e5..be775cc 100644 --- a/dlls/rpcrt4/tests/cstub.c +++ b/dlls/rpcrt4/tests/cstub.c @@ -619,15 +619,13 @@ static void test_CreateStub(IPSFactoryBuffer *ppsf) IUnknown *obj = (IUnknown*)&vtbl; IRpcStubBuffer *pstub = create_stub(ppsf, &IID_if1, obj, S_OK); CStdStubBuffer *cstd_stub = (CStdStubBuffer*)pstub; - const CInterfaceStubHeader *header = ((const CInterfaceStubHeader *)cstd_stub->lpVtbl) - 1; + const CInterfaceStubHeader *header = &CONTAINING_RECORD(cstd_stub->lpVtbl, const CInterfaceStubVtbl, Vtbl)->header;
ok(IsEqualIID(header->piid, &IID_if1), "header iid differs\n"); ok(cstd_stub->RefCount == 1, "ref count %d\n", cstd_stub->RefCount); /* 0xdeadbeef returned from create_stub_test_QI */ ok(cstd_stub->pvServerObject == (void*)0xdeadbeef, "pvServerObject %p\n", cstd_stub->pvServerObject); - ok(cstd_stub->pPSFactory == ppsf || - broken(cstd_stub->pPSFactory == (void *)0x00001000) /* Win9x & NT4 */, - "pPSFactory was %p instead of %p\n", cstd_stub->pPSFactory, ppsf); + ok(cstd_stub->pPSFactory != NULL, "pPSFactory was NULL\n");
vtbl = &create_stub_test_fail_vtbl; pstub = create_stub(ppsf, &IID_if1, obj, E_NOINTERFACE);