38#define DEFINE_EXPECT(func) \
39 static BOOL expect_ ## func = FALSE, called_ ## func = FALSE
41#define SET_EXPECT(func) \
42 expect_ ## func = TRUE
44#define CHECK_EXPECT2(func) \
46 ok(expect_ ##func, "unexpected call " #func "\n"); \
47 called_ ## func = TRUE; \
50#define CHECK_EXPECT(func) \
52 CHECK_EXPECT2(func); \
53 expect_ ## func = FALSE; \
56#define CHECK_CALLED(func) \
58 ok(called_ ## func, "expected " #func "\n"); \
59 expect_ ## func = called_ ## func = FALSE; \
62static const GUID CLSID_WineTestPSFactoryBuffer = { 0x22222222, 0x1234, 0x1234, { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0 } };
63static const GUID CLSID_DfMarshal = { 0x0000030b, 0x0000, 0x0000, { 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 } };
70#define ok_more_than_one_lock() ok(cLocks > 0, "Number of locks should be > 0, but actually is %d\n", cLocks)
71#define ok_no_locks() ok(cLocks == 0, "Number of locks should be 0, but actually is %d\n", cLocks)
72#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error 0x%08x\n", hr)
73#define ok_non_zero_external_conn() do {if (with_external_conn) ok(external_connections, "got no external connections\n");} while(0);
74#define ok_zero_external_conn() do {if (with_external_conn) ok(!external_connections, "got %d external connections\n", external_connections);} while(0);
75#define ok_last_release_closes(b) do {if (with_external_conn) ok(last_release_closes == b, "got %d expected %d\n", last_release_closes, b);} while(0);
77#define OBJREF_SIGNATURE (0x574f454d)
78#define OBJREF_STANDARD (0x1)
79#define OBJREF_CUSTOM (0x4)
127 {0xa1, 0xa2, 0x5d, 0x5a, 0x36, 0x54, 0xd3, 0xbd}
135 {0xc0,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}
138#define EXTENTID_WineTest IID_IWineTest
139#define CLSID_WineTest IID_IWineTest
146 {0xa1, 0xa2, 0x5d, 0x5a, 0x36, 0x54, 0xd3, 0xbd}
159 hr = IUnknown_QueryInterface(pProxy, &IID_IMultiQI, (
void **)&pMQI);
160 ok(
hr ==
S_OK,
"created object is not a proxy, so was created in the wrong apartment\n");
162 IMultiQI_Release(pMQI);
163 IUnknown_Release(pProxy);
187 ok(0,
"unexpected call\n");
204 trace(
"add connection\n");
212 trace(
"release connection %d\n", fLastReleaseCloses);
238 IUnknown_AddRef(iface);
271 trace(
"crashing...\n");
287 LPCLASSFACTORY iface,
299 IClassFactory_AddRef(iface);
326 LPCLASSFACTORY iface,
336 LPCLASSFACTORY iface,
444 *
ppv = &
This->IRpcStubBuffer_iface;
465 IRpcStubBuffer_Release(
This->buffer);
473 ok(0,
"unexpected call\n");
486 void *dest_context_data;
492 hr = IRpcChannelBuffer_GetDestCtx(_pRpcChannelBuffer, &dest_context, &dest_context_data);
493 ok(
hr ==
S_OK,
"GetDestCtx failed: %08x\n",
hr);
494 ok(dest_context == MSHCTX_INPROC,
"desc_context = %x\n", dest_context);
495 ok(!dest_context_data,
"desc_context_data = %p\n", dest_context_data);
497 return IRpcStubBuffer_Invoke(
This->buffer, _prpcmsg, _pRpcChannelBuffer);
502 ok(0,
"unexpected call\n");
508 ok(0,
"unexpected call\n");
514 ok(0,
"unexpected call\n");
520 ok(0,
"unexpected call\n");
583 ok(
hr ==
S_OK,
"CreateStub failed: %08x\n",
hr);
585 *ppStub = &
stub->IRpcStubBuffer_iface;
600#define RELEASEMARSHALDATA WM_USER
621 DWORD registration_key;
627 if(
data->register_object) {
630 ok(
hr ==
S_OK,
"CoRegisterClassObject failed: %08x\n",
hr);
637 if (prev_filter) IMessageFilter_Release(prev_filter);
673 *
data = *object_data;
719 ok(
hr ==
E_NOINTERFACE,
"CoMarshalInterface should have returned E_NOINTERFACE instead of 0x%08x\n",
hr);
721 IStream_Release(pStream);
741 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
744 IStream_Release(pStream);
769 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
772 IStream_Release(pStream);
778 IUnknown_Release(pProxy);
803 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
811 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
822 IClassFactory_Release(pProxy);
825 IStream_Release(pStream);
849 hr = IStream_Seek(pStream,
llZero, STREAM_SEEK_SET,
NULL);
853 ok(
hr ==
E_NOINTERFACE,
"CoUnmarshalInterface should have returned E_NOINTERFACE instead of 0x%08x\n",
hr);
859 IStream_Release(pStream);
881 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
884 IStream_Release(pStream);
889 IUnknown_Release(pProxy);
900#define NORMALEXTREFS 5
923 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
929 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
947 IUnknown_Release(pProxy);
949 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
956 IUnknown_Release(pProxy2);
964 IUnknown_Release(pProxy2);
971 IStream_Release(pStream);
997 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1003 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1010 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1014 IStream_Release(pStream);
1027 IUnknown_Release(pProxy);
1032 IUnknown_Release(pProxy2);
1061 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1068 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1078 IUnknown_Release(pProxy);
1080 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1083 ok(
hr ==
CO_E_OBJNOTREG,
"CoUnmarshalInterface should return CO_E_OBJNOTREG instead of 0x%08x\n",
hr);
1089 IStream_Release(pStream);
1114 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1121 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1125 "CoMarshalInterface should have return S_OK or E_INVALIDARG instead of 0x%08x\n",
hr);
1128 IUnknown_Release(pProxy);
1137 IUnknown_Release(pProxy);
1139 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1146 IUnknown_Release(pProxy2);
1152 IStream_Release(pStream);
1182 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1185 IStream_Release(pStream);
1198 IUnknown_Release(pProxy);
1224 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1227 IStream_Release(pStream);
1241 ref = IClassFactory_Release(
proxy);
1273 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1276 IStream_Release(pStream);
1287 IUnknown_Release(pProxy);
1298 DWORD registration_key;
1328 IStream_Release(object_data.
stream);
1332 ok(
hr ==
S_OK,
"CoRegisterClassObject failed: %08x\n",
hr);
1335 ok(
hr ==
S_OK,
"CoRegisterPSClsid failed: %08x\n",
hr);
1340 ok(
hr ==
S_OK,
"Could not get IOleWindow iface: %08x\n",
hr);
1346 hr = IOleWindow_GetWindow(ole_window, &
hwnd);
1347 ok(
hr ==
S_OK,
"GetWindow failed: %08x\n",
hr);
1352 IOleWindow_Release(ole_window);
1355 IUnknown_Release(
proxy);
1360 ok(
hr ==
S_OK,
"CoRevokeClassObject failed: %08x\n",
hr);
1426 ok(
U(
stat.cbSize).LowPart == 0,
"stream is not empty (%d)\n",
U(
stat.cbSize).LowPart);
1427 ok(
U(
stat.cbSize).HighPart == 0,
"stream is not empty (%d)\n",
U(
stat.cbSize).HighPart);
1430 dwDestContext,
NULL, mshlflags, &std_marshal);
1432 hr = IMarshal_MarshalInterface(std_marshal,
stream,
riid, pv,
1433 dwDestContext, pvDestContext, mshlflags);
1435 IMarshal_Release(std_marshal);
1443 ok(0,
"unexpected call\n");
1449 ok(0,
"unexpected call\n");
1455 ok(0,
"unexpected call\n");
1488 MSHCTX_INPROC,
NULL, MSHLFLAGS_NORMAL);
1498 IUnknown_Release(unk);
1507 MSHCTX_INPROC,
NULL, MSHLFLAGS_NORMAL);
1520 MSHCTX_INPROC,
NULL, MSHLFLAGS_NORMAL);
1541 MSHCTX_INPROC,
NULL, MSHLFLAGS_NORMAL);
1569 MSHCTX_INPROC,
NULL, MSHLFLAGS_NORMAL);
1591 MSHCTX_INPROC,
NULL, MSHLFLAGS_NORMAL, &marshal);
1595 MSHCTX_INPROC,
NULL, MSHLFLAGS_NORMAL, &
clsid);
1600 MSHCTX_INPROC,
NULL, MSHLFLAGS_NORMAL, &
size);
1603 MSHCTX_INPROC,
NULL, MSHLFLAGS_NORMAL);
1623 ok(stdobjref->
flags == 0,
"stdobjref.flags = %d\n", stdobjref->
flags);
1624 ok(stdobjref->
cPublicRefs == 5,
"stdobjref.cPublicRefs = %d\n",
1627 ok(dualstringarr->
wNumEntries == 0,
"dualstringarr.wNumEntries = %d\n",
1636 IUnknown_Release(unk);
1646 hr = IMarshal_ReleaseMarshalData(marshal,
stream);
1650 IMarshal_Release(marshal);
1706 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1709 IStream_Release(pStream);
1727 IUnknown_Release(pProxy);
1773 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1819 trace(
"CoUninitialize >>>\n");
1821 trace(
"CoUninitialize <<<\n");
1836 win_skip(
"Skipping crash tests on win2k.\n");
1867 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1874 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1880 IUnknown_Release(pProxy1);
1882 IUnknown_Release(pProxy2);
1891 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1899 IStream_Release(pStream);
1923 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1932 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1938 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1941 IStream_Release(pStream);
1946 IUnknown_Release(pProxy1);
1951 IUnknown_Release(pProxy2);
1985 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1990 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1995 "CoUnmarshalInterface should have failed with CO_E_OBJNOTREG, but returned 0x%08x instead\n",
1998 IStream_Release(pStream);
2069 data.marshal_flags1 = MSHLFLAGS_TABLEWEAK;
2070 data.marshal_flags2 = MSHLFLAGS_NORMAL;
2097 IUnknown_Release(pProxyNormal);
2102 IUnknown_Release(pProxyWeak);
2117 IStream_Release(
data.pStream1);
2118 IStream_Release(
data.pStream2);
2137 data.marshal_flags1 = MSHLFLAGS_TABLEWEAK;
2138 data.marshal_flags2 = MSHLFLAGS_NORMAL;
2167 IStream_Release(
data.pStream1);
2168 IStream_Release(
data.pStream2);
2187 data.marshal_flags1 = MSHLFLAGS_TABLEWEAK;
2188 data.marshal_flags2 = MSHLFLAGS_TABLEWEAK;
2212 IStream_Release(
data.pStream1);
2213 IStream_Release(
data.pStream2);
2240 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2246 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2252 if (pProxy1) IUnknown_Release(pProxy1);
2253 if (pProxy2) IUnknown_Release(pProxy2);
2262 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2264 IStream_Release(pStream);
2309 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2312 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2368 IStream_Release(pStream);
2392 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2395 IStream_Release(pStream);
2428 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2436 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2439 "CoUnmarshalInterface should have failed with error CO_E_OBJNOTCONNECTED for double unmarshal, instead of 0x%08x\n",
hr);
2441 IStream_Release(pStream);
2445 IUnknown_Release(pProxy1);
2456 static const HRESULT E_DEADBEEF = 0xdeadbeef;
2464 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2465 hr = IStream_Read(pStream, &hr_marshaled,
sizeof(
HRESULT),
NULL);
2468 ok(hr_marshaled == E_DEADBEEF,
"Didn't marshal HRESULT as expected: got value 0x%08x instead\n", hr_marshaled);
2471 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2475 ok(hr_marshaled == E_DEADBEEF,
"Didn't marshal HRESULT as expected: got value 0x%08x instead\n", hr_marshaled);
2477 IStream_Release(pStream);
2491 "COM should have failed with CO_E_NOTINITIALIZED on using proxy without apartment, but instead returned 0x%08x\n",
2494 hr = IClassFactory_QueryInterface(
cf, &IID_IMultiQI, (
LPVOID *)&
proxy);
2496 trace(
"call to proxy's QueryInterface for local interface without apartment returned 0x%08x\n",
hr);
2498 IUnknown_Release(
proxy);
2500 hr = IClassFactory_QueryInterface(
cf, &IID_IStream, (
LPVOID *)&
proxy);
2502 trace(
"call to proxy's QueryInterface without apartment returned 0x%08x\n",
hr);
2504 IUnknown_Release(
proxy);
2511 "COM should have failed with RPC_E_WRONG_THREAD on using proxy from wrong apartment, but instead returned 0x%08x\n",
2514 hr = IClassFactory_QueryInterface(
cf, &IID_IStream, (
LPVOID *)&
proxy);
2516 trace(
"call to proxy's QueryInterface from wrong apartment returned 0x%08x\n",
hr);
2519 IClassFactory_Release(
cf);
2544 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2547 IStream_Release(pStream);
2552 IUnknown_QueryInterface(pProxy, &IID_IStream, (
LPVOID *)&pStream);
2562 IUnknown_Release(pProxy);
2577 IMessageFilter_AddRef(iface);
2597 HTASK threadIDCaller,
2599 LPINTERFACEINFO lpInterfaceInfo)
2601 static int callcount = 0;
2603 trace(
"HandleInComingCall\n");
2607 ret = SERVERCALL_REJECTED;
2610 ret = SERVERCALL_RETRYLATER;
2613 ret = SERVERCALL_ISHANDLED;
2622 HTASK threadIDCallee,
2626 trace(
"RetryRejectedCall\n");
2632 HTASK threadIDCallee,
2634 DWORD dwPendingType)
2636 trace(
"MessagePending\n");
2637 return PENDINGMSG_WAITNOPROCESS;
2675 IStream_Release(object_data.
stream);
2690 IUnknown_Release(
proxy);
2692 IClassFactory_Release(
cf);
2717 ok(
hr ==
STG_E_READFAULT,
"Should have failed with STG_E_READFAULT, but returned 0x%08x instead\n",
hr);
2720 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2724 IStream_Release(pStream);
2745 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2748 IStream_Release(pStream);
2754 if (
hr ==
S_OK) IUnknown_Release(pOtherUnknown);
2756 hr = IUnknown_QueryInterface(pProxy, &IID_IClientSecurity, (
LPVOID*)&pOtherUnknown);
2758 if (
hr ==
S_OK) IUnknown_Release(pOtherUnknown);
2760 hr = IUnknown_QueryInterface(pProxy, &IID_IMultiQI, (
LPVOID*)&pOtherUnknown);
2762 if (
hr ==
S_OK) IUnknown_Release(pOtherUnknown);
2764 hr = IUnknown_QueryInterface(pProxy, &IID_IMarshal, (
LPVOID*)&pOtherUnknown);
2766 if (
hr ==
S_OK) IUnknown_Release(pOtherUnknown);
2771 IUnknown_Release(pProxy);
2793 IUnknown_AddRef(iface);
2833 pUnkOuter->
refs = 1;
2843 ok(lpvtbl !=
NULL,
"IPSFactoryBuffer_CreateProxy succeeded, but returned a NULL vtable!\n");
2848 ok(refs == 1,
"Ref count of outer unknown should have been 1 instead of %d\n", refs);
2851 IPSFactoryBuffer_Release(psfb);
2853 refs = IUnknown_Release((
IUnknown *)lpvtbl);
2854 ok(refs == 0,
"Ref-count leak of %d on IRpcProxyBuffer\n", refs);
2856 refs = IRpcProxyBuffer_Release(
proxy);
2857 ok(refs == 0,
"Ref-count leak of %d on IRpcProxyBuffer\n", refs);
2880 IPSFactoryBuffer_Release(psfb);
2884 IRpcStubBuffer_Disconnect(
stub);
2888 refs = IRpcStubBuffer_Release(
stub);
2889 ok(refs == 0,
"Ref-count leak of %d on IRpcProxyBuffer\n", refs);
2895 LPCLASSFACTORY iface,
2904 ok(
ret,
"Timed out sending a message to originating window during RPC call\n");
2942 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2945 IStream_Release(pStream);
2954 IClassFactory_Release(
proxy);
2981 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2984 IStream_Release(pStream);
2992 ok(
hr ==
S_FALSE,
"IClassFactory_CreateInstance returned 0x%08x, expected S_FALSE\n",
hr);
2994 IClassFactory_Release(
proxy);
3015 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
3018 IStream_Release(pStream);
3024 "COM call during processing of sent message should return RPC_E_CANTCALLOUT_ININPUTSYNCCALL instead of 0x%08x\n",
hr);
3026 IClassFactory_Release(
proxy);
3043 memset(&wndclass, 0,
sizeof(wndclass));
3053 hwnd_app =
CreateWindowA(
"WineCOMTest",
NULL, 0,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
NULL,
NULL,
NULL, 0);
3068 LPCLASSFACTORY iface,
3099 hwnd_app =
CreateWindowA(
"WineCOMTest",
NULL, 0,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
NULL,
NULL,
NULL, 0);
3108 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
3111 IStream_Release(pStream);
3119 IClassFactory_Release(
proxy);
3137 hwnd_app =
CreateWindowA(
"WineCOMTest",
NULL, 0,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
NULL,
NULL,
NULL, 0);
3152 static SIZE_T global_size_alignment = -1;
3153 if (global_size_alignment == -1)
3160 return ((
size + global_size_alignment - 1) & ~(global_size_alignment - 1));
3177 if (mshctx == MSHCTX_INPROC)
3180 ok(
size == expected_size ||
3182 "size should have been %d instead of %d\n", expected_size,
size);
3184 ok(*(
DWORD *)marshal_data == mshlflags,
"expected 0x%x, but got 0x%x for mshctx\n", mshlflags, *(
DWORD *)marshal_data);
3185 marshal_data +=
sizeof(
DWORD);
3186 ok(*(
void **)marshal_data ==
ptr,
"expected %p, but got %p for mshctx\n",
ptr, *(
void **)marshal_data);
3187 marshal_data +=
sizeof(
void *);
3188 if (
sizeof(
void*) == 4 &&
size >= 3*
sizeof(
DWORD))
3190 ok(*(
DWORD *)marshal_data == 0,
"expected 0x0, but got 0x%x\n", *(
DWORD *)marshal_data);
3191 marshal_data +=
sizeof(
DWORD);
3200 ok(
size >
sizeof(
DWORD),
"size should have been > sizeof(DWORD), not %d\n",
size);
3201 ok(*(
DWORD *)marshal_data == 0x574f454d ,
3202 "marshal data should be filled by standard marshal and start with MEOW signature\n");
3221 hr = IUnknown_QueryInterface(pFTUnknown, &IID_IMarshal, (
void **)&pFTMarshal);
3223 IUnknown_Release(pFTUnknown);
3244 IStream_Seek(pStream,
llZero, STREAM_SEEK_SET,
NULL);
3245 hr = IMarshal_UnmarshalInterface(pFTMarshal, pStream, &
IID_IUnknown, (
void **)&pProxy);
3248 IUnknown_Release(pProxy);
3254 IStream_Seek(pStream,
llZero, STREAM_SEEK_SET,
NULL);
3257 MSHLFLAGS_TABLESTRONG);
3264 IStream_Seek(pStream,
llZero, STREAM_SEEK_SET,
NULL);
3265 hr = IMarshal_UnmarshalInterface(pFTMarshal, pStream, &
IID_IUnknown, (
void **)&pProxy);
3268 IUnknown_Release(pProxy);
3272 IStream_Seek(pStream,
llZero, STREAM_SEEK_SET,
NULL);
3273 hr = IMarshal_ReleaseMarshalData(pFTMarshal, pStream);
3280 IStream_Seek(pStream,
llZero, STREAM_SEEK_SET,
NULL);
3283 MSHLFLAGS_TABLEWEAK);
3290 IStream_Seek(pStream,
llZero, STREAM_SEEK_SET,
NULL);
3291 hr = IMarshal_UnmarshalInterface(pFTMarshal, pStream, &
IID_IUnknown, (
void **)&pProxy);
3296 IUnknown_Release(pProxy);
3302 IStream_Seek(pStream,
llZero, STREAM_SEEK_SET,
NULL);
3310 hr = IMarshal_DisconnectObject(pFTMarshal, 0);
3315 IStream_Seek(pStream,
llZero, STREAM_SEEK_SET,
NULL);
3316 hr = IMarshal_ReleaseMarshalData(pFTMarshal, pStream);
3323 IStream_Seek(pStream,
llZero, STREAM_SEEK_SET,
NULL);
3324 hr = IMarshal_UnmarshalInterface(pFTMarshal, pStream, &
IID_IUnknown, (
void **)&pProxy);
3337 IStream_Seek(pStream,
llZero, STREAM_SEEK_SET,
NULL);
3345 IStream_Seek(pStream,
llZero, STREAM_SEEK_SET,
NULL);
3351 IStream_Release(pStream);
3352 IMarshal_Release(pFTMarshal);
3361 DWORD dwDisposition;
3375 skip(
"Not authorized to modify the Classes key\n");
3409 ok(
hr ==
E_NOINTERFACE,
"IUnknown_QueryInterface on handler for invalid interface returned 0x%08x instead of E_NOINTERFACE\n",
hr);
3414 IUnknown_Release(pObject2);
3433 IStdMarshalInfo_AddRef(iface);
3454 DWORD dwDestContext,
3455 void *pvDestContext,
3492 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
3495 IStream_Release(pStream);
3502 ok(
hr ==
E_NOINTERFACE,
"IUnknown_QueryInterface with unknown IID should have returned E_NOINTERFACE instead of 0x%08x\n",
hr);
3510 IUnknown_Release(pProxy);
3541 DWORD dwCapabilities;
3550 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
3553 IStream_Release(pStream);
3564 ok(pUnknown1 == pUnknown2,
"both proxy's IUnknowns should be the same - %p, %p\n", pUnknown1, pUnknown2);
3566 hr = IClassFactory_QueryInterface(pProxy, &IID_IMarshal, (
LPVOID*)&pMarshal);
3569 hr = IClassFactory_QueryInterface(pProxy, &IID_IClientSecurity, (
LPVOID*)&pCliSec);
3576 todo_wine ok(
hr ==
E_NOINTERFACE,
"IClientSecurity_QueryBlanket with local interface should have returned E_NOINTERFACE instead of 0x%08x\n",
hr);
3578 hr = IClientSecurity_QueryBlanket(pCliSec, (
IUnknown *)pProxy, &dwAuthnSvc, &dwAuthzSvc, &pServerPrincName, &dwAuthnLevel, &dwImpLevel, &pAuthInfo, &dwCapabilities);
3585 ok(
hr ==
E_NOINTERFACE,
"COM call should have succeeded instead of returning 0x%08x\n",
hr);
3587 hr = IClientSecurity_SetBlanket(pCliSec, (
IUnknown *)pMarshal, dwAuthnSvc, dwAuthzSvc, pServerPrincName, dwAuthnLevel, dwImpLevel, pAuthInfo, dwCapabilities);
3588 todo_wine ok(
hr ==
E_NOINTERFACE,
"IClientSecurity_SetBlanket with local interface should have returned E_NOINTERFACE instead of 0x%08x\n",
hr);
3590 hr = IClientSecurity_SetBlanket(pCliSec, (
IUnknown *)pProxy, 0xdeadbeef, dwAuthzSvc, pServerPrincName, dwAuthnLevel, dwImpLevel, pAuthInfo, dwCapabilities);
3591 todo_wine ok(
hr ==
E_INVALIDARG,
"IClientSecurity_SetBlanke with invalid dwAuthnSvc should have returned E_INVALIDARG instead of 0x%08x\n",
hr);
3595 hr = IClientSecurity_QueryBlanket(pCliSec, pUnknown1, &dwAuthnSvc, &dwAuthzSvc, &pServerPrincName, &dwAuthnLevel, &dwImpLevel, &pAuthInfo, &dwCapabilities);
3600 IClassFactory_Release(pProxy);
3601 IUnknown_Release(pProxy2);
3602 IUnknown_Release(pUnknown1);
3603 IUnknown_Release(pUnknown2);
3604 IMarshal_Release(pMarshal);
3605 IClientSecurity_Release(pCliSec);