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);
3642 IPersist_AddRef(iface);
3691 LPCLASSFACTORY iface,
3701 IClassFactory_AddRef(iface);
3719 LPCLASSFACTORY iface,
3726 IPersist_AddRef( persist );
3727 hr = IPersist_QueryInterface( persist,
riid, ppvObj );
3728 IPersist_Release( persist );
3733 LPCLASSFACTORY iface,
3783 trace(
"Message 0x%x\n",
msg.message);
3852 "CoGetClassObject should have returned REGDB_E_CLASSNOTREG instead of 0x%08x\n",
hr);
3868 hr = IClassFactory_LockServer(
cf,
TRUE);
3873 IClassFactory_LockServer(
cf,
FALSE);
3878 IClassFactory_Release(
cf);
3890 "CoGetClassObject should have returned CO_E_SERVER_STOPPING or REGDB_E_CLASSNOTREG instead of 0x%08x\n",
hr);
3906 IPersist_Release(persist);
3923 IPersist_GetClassID(persist, &
clsid);
3924 IPersist_Release(persist);
3950 "IGlobalInterfaceTable_GetInterfaceFromGlobal should have failed with error CO_E_NOTINITIALIZED or E_UNEXPECTED instead of 0x%08x\n",
3953 IClassFactory_Release(
cf);
3960 IClassFactory_Release(
cf);
3980 trace(
"test_globalinterfacetable\n");
3986 hr = IClassFactory_QueryInterface(
cf, &IID_IGlobalInterfaceTable, (
void**)&
object);
3989 IClassFactory_Release(
cf);
3994 ref = IGlobalInterfaceTable_AddRef(
git);
3996 ref = IGlobalInterfaceTable_AddRef(
git);
3999 ref = IGlobalInterfaceTable_Release(
git);
4001 ref = IGlobalInterfaceTable_Release(
git);
4029 IUnknown_Release(
object);
4034 IUnknown_Release(
object);
4036 hr = IGlobalInterfaceTable_RevokeInterfaceFromGlobal(
git,
cookie);
4041 IGlobalInterfaceTable_Release(
git);
4055 ok(!!punk,
"Got NULL.\n");
4056 IUnknown_Release(punk);
4060 ok(!!psync1,
"Got NULL.\n");
4062 hr = ISynchronize_Wait(psync1, 0, 5);
4065 hr = ISynchronize_Reset(psync1);
4067 hr = ISynchronize_Signal(psync1);
4069 hr = ISynchronize_Wait(psync1, 0, 5);
4071 hr = ISynchronize_Wait(psync1, 0, 5);
4073 hr = ISynchronize_Reset(psync1);
4075 hr = ISynchronize_Wait(psync1, 0, 5);
4080 ok(!!psync2,
"Got NULL.\n");
4081 ok(psync1 != psync2,
"psync1 == psync2.\n");
4083 hr = ISynchronize_QueryInterface(psync2, &IID_ISynchronizeHandle, (
void**)&sync_handle);
4084 ok(
hr ==
S_OK,
"QueryInterface(IID_ISynchronizeHandle) failed: %08x\n",
hr);
4087 hr = ISynchronizeHandle_GetHandle(sync_handle, &
handle);
4088 ok(
hr ==
S_OK,
"GetHandle failed: %08x\n",
hr);
4091 ISynchronizeHandle_Release(sync_handle);
4093 hr = ISynchronize_Wait(psync2, 0, 5);
4096 hr = ISynchronize_Reset(psync1);
4098 hr = ISynchronize_Reset(psync2);
4100 hr = ISynchronize_Signal(psync1);
4102 hr = ISynchronize_Wait(psync2, 0, 5);
4105 ref = ISynchronize_AddRef(psync1);
4106 ok(
ref == 2,
"Got ref: %d\n",
ref);
4107 ref = ISynchronize_AddRef(psync1);
4108 ok(
ref == 3,
"Got ref: %d\n",
ref);
4109 ref = ISynchronize_Release(psync1);
4110 ok(
ref == 2,
"Got nonzero ref: %d\n",
ref);
4111 ref = ISynchronize_Release(psync2);
4112 ok(!
ref,
"Got nonzero ref: %d\n",
ref);
4113 ref = ISynchronize_Release(psync1);
4114 ok(
ref == 1,
"Got nonzero ref: %d\n",
ref);
4115 ref = ISynchronize_Release(psync1);
4116 ok(!
ref,
"Got nonzero ref: %d\n",
ref);
4133 IUnknown_Release(
proxy);
4146 IClassFactory_Release(
cf);
4163 IUnknown_Release(
proxy);
4244 IClassFactory_Release(
cf);
4271 IUnknown_Release(
proxy);
4277 IStream_Release(
data.stream);
4284 static char name[256];
4311 IChannelHook_AddRef(iface);
4348 SChannelHookCallInfo *
info = (SChannelHookCallInfo *)
riid;
4349 trace(
"TestChannelHook_ClientGetSize\n");
4356 ok(
info->cbSize ==
sizeof(*
info),
"cbSize was %d instead of %d\n",
info->cbSize, (
int)
sizeof(*
info));
4359 ok(!
info->pObject,
"pObject should be NULL\n");
4391 SChannelHookCallInfo *
info = (SChannelHookCallInfo *)
riid;
4392 trace(
"TestChannelHook_ClientFillBuffer\n");
4396 ok(
info->cbSize ==
sizeof(*
info),
"cbSize was %d instead of %d\n",
info->cbSize, (
int)
sizeof(*
info));
4399 ok(!
info->pObject,
"pObject should be NULL\n");
4415 *(
unsigned char *)pDataBuffer = 0xcc;
4428 SChannelHookCallInfo *
info = (SChannelHookCallInfo *)
riid;
4429 trace(
"TestChannelHook_ClientNotify hrFault = 0x%08x\n", hrFault);
4433 ok(
info->cbSize ==
sizeof(*
info),
"cbSize was %d instead of %d\n",
info->cbSize, (
int)
sizeof(*
info));
4437 ok(
info->pObject !=
NULL,
"pObject shouldn't be NULL\n");
4463 SChannelHookCallInfo *
info = (SChannelHookCallInfo *)
riid;
4464 trace(
"TestChannelHook_ServerNotify\n");
4468 ok(
info->cbSize ==
sizeof(*
info),
"cbSize was %d instead of %d\n",
info->cbSize, (
int)
sizeof(*
info));
4471 ok(
info->pObject !=
NULL,
"pObject shouldn't be NULL\n");
4485 ok(cbDataSize == 1,
"cbDataSize should have been 1 instead of %d\n", cbDataSize);
4486 ok(*(
unsigned char *)pDataBuffer == 0xcc,
"pDataBuffer should have contained 0xcc instead of 0x%x\n", *(
unsigned char *)pDataBuffer);
4497 SChannelHookCallInfo *
info = (SChannelHookCallInfo *)
riid;
4498 trace(
"TestChannelHook_ServerGetSize\n");
4502 ok(
info->cbSize ==
sizeof(*
info),
"cbSize was %d instead of %d\n",
info->cbSize, (
int)
sizeof(*
info));
4505 ok(
info->pObject !=
NULL,
"pObject shouldn't be NULL\n");
4520 if (hrFault !=
S_OK)
4521 trace(
"\thrFault = 0x%08x\n", hrFault);
4534 trace(
"TestChannelHook_ServerFillBuffer\n");
4535 ok(0,
"TestChannelHook_ServerFillBuffer shouldn't be called\n");
4582 IStream_Release(object_data.
stream);
4591 IUnknown_Release(
proxy);
4593 IClassFactory_Release(
cf);
4610 win_skip(
"skipping test on win9x\n");
4614 pCoInitializeEx = (
void*)
GetProcAddress(hOle32,
"CoInitializeEx");
4615 pDllGetClassObject = (
void*)
GetProcAddress(hOle32,
"DllGetClassObject");
#define CO_E_NOTINITIALIZED
unsigned long long UINT64
char * strcat(char *DstString, const char *SrcString)
int strcmp(const char *String1, const char *String2)
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define InterlockedIncrement
#define InterlockedDecrement
const GUID IID_IClassFactory
#define RegCloseKey(hKey)
const CLSID CLSID_ManualResetEvent
const CLSID CLSID_StdMarshal
const CLSID CLSID_InProcFreeMarshaler
const CLSID CLSID_StdGlobalInterfaceTable
LONG WINAPI RegSetValueExA(HKEY hKey, LPCSTR lpValueName, DWORD Reserved, DWORD dwType, CONST BYTE *lpData, DWORD cbData)
LONG WINAPI RegOpenKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD ulOptions, _In_ REGSAM samDesired, _Out_ PHKEY phkResult)
LSTATUS WINAPI RegQueryValueA(HKEY hkey, LPCSTR name, LPSTR data, LPLONG count)
LONG WINAPI RegCreateKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD Reserved, _In_ LPSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_ LPDWORD lpdwDisposition)
LONG WINAPI RegDeleteKeyA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey)
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
#define HeapFree(x, y, z)
#define WideCharToMultiByte
#define ERROR_ACCESS_DENIED
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA(LPCSTR lpApplicationName, LPSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCSTR lpCurrentDirectory, LPSTARTUPINFOA lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
HRESULT WINAPI CoGetPSClsid(REFIID riid, CLSID *pclsid)
HRESULT WINAPI CoRegisterClassObject(REFCLSID rclsid, LPUNKNOWN pUnk, DWORD dwClsContext, DWORD flags, LPDWORD lpdwRegister)
ULONG WINAPI CoAddRefServerProcess(void)
HRESULT WINAPI CoRegisterMessageFilter(LPMESSAGEFILTER lpMessageFilter, LPMESSAGEFILTER *lplpMessageFilter)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI CoDisconnectObject(LPUNKNOWN lpUnk, DWORD reserved)
HRESULT WINAPI DECLSPEC_HOTPATCH CoRevokeClassObject(DWORD dwRegister)
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
HRESULT WINAPI DECLSPEC_HOTPATCH CoGetClassObject(REFCLSID rclsid, DWORD dwClsContext, COSERVERINFO *pServerInfo, REFIID iid, LPVOID *ppv)
HRESULT WINAPI CoRegisterPSClsid(REFIID riid, REFCLSID rclsid)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
HRESULT WINAPI CoResumeClassObjects(void)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HRESULT WINAPI CoRegisterChannelHook(REFGUID guidExtension, IChannelHook *pChannelHook)
ULONG WINAPI CoReleaseServerProcess(void)
HRESULT WINAPI CoLockObjectExternal(LPUNKNOWN pUnk, BOOL fLock, BOOL fLastUnlockReleases)
HRESULT WINAPI StringFromCLSID(REFCLSID id, LPOLESTR *idstr)
INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax)
HRESULT WINAPI GetHGlobalFromStream(IStream *pstm, HGLOBAL *phglobal)
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
HRESULT WINAPI CoMarshalHresult(LPSTREAM pStm, HRESULT hresult)
HRESULT WINAPI CoGetStandardMarshal(REFIID riid, IUnknown *pUnk, DWORD dwDestContext, LPVOID pvDestContext, DWORD mshlflags, LPMARSHAL *ppMarshal)
HRESULT WINAPI CoReleaseMarshalData(IStream *pStream)
HRESULT WINAPI CoUnmarshalInterface(IStream *pStream, REFIID riid, LPVOID *ppv)
HRESULT WINAPI CoGetMarshalSizeMax(ULONG *pulSize, REFIID riid, IUnknown *pUnk, DWORD dwDestContext, void *pvDestContext, DWORD mshlFlags)
HRESULT WINAPI CoUnmarshalHresult(LPSTREAM pStm, HRESULT *phresult)
HRESULT WINAPI CoMarshalInterface(IStream *pStream, REFIID riid, IUnknown *pUnk, DWORD dwDestContext, void *pvDestContext, DWORD mshlFlags)
HRESULT WINAPI CoCreateFreeThreadedMarshaler(LPUNKNOWN punkOuter, LPUNKNOWN *ppunkMarshal)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLenum const GLfloat * params
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
SIZE_T NTAPI GlobalSize(HGLOBAL hMem)
VOID WINAPI CoTaskMemFree(LPVOID ptr)
#define memcpy(s1, s2, n)
#define sprintf(buf, format,...)
static HRESULT WINAPI CustomMarshal_QueryInterface(IMarshal *iface, REFIID riid, void **ppv)
#define ok_more_than_one_lock()
static HRESULT WINAPI Test_SMI_GetClassForHandler(IStdMarshalInfo *iface, DWORD dwDestContext, void *pvDestContext, CLSID *pClsid)
static DWORD CALLBACK duo_marshal_thread_proc(void *p)
static void test_client_security(void)
static void UnlockModuleOOP(void)
static HeapUnknown * impl_from_IUnknown(IUnknown *iface)
static HRESULT WINAPI CustomMarshal_DisconnectObject(IMarshal *iface, DWORD res)
static DWORD external_connections
static IPSFactoryBuffer PSFactoryBuffer
static const IOleClientSiteVtbl OleClientSiteVtbl
static void test_tableweak_and_normal_marshal_and_releasedata(void)
static void test_proxy_marshal_and_unmarshal_strong(void)
static void test_normal_marshal_and_unmarshal(void)
static void test_interthread_marshal_and_unmarshal(void)
static HRESULT WINAPI OleClientSite_QueryInterface(IOleClientSite *iface, REFIID riid, void **ppv)
static void WINAPI TestChannelHook_ClientGetSize(IChannelHook *iface, REFGUID uExtent, REFIID riid, ULONG *pDataSize)
static ULONG WINAPI TestChannelHook_AddRef(IChannelHook *iface)
static void WINAPI RpcStubBuffer_Disconnect(IRpcStubBuffer *iface)
static void release_host_object(DWORD tid, WPARAM wp)
static void test_proxy_interfaces(void)
static void test_proxy_marshal_and_unmarshal(void)
static IMarshal CustomMarshal
static void WINAPI TestChannelHook_ClientFillBuffer(IChannelHook *iface, REFGUID uExtent, REFIID riid, ULONG *pDataSize, void *pDataBuffer)
static void test_tableweak_marshal_and_unmarshal_twice(void)
static IOleWindow Test_OleWindow
static BOOL last_release_closes
static void test_call_from_message(void)
static void test_proxy_marshal_and_unmarshal_weak(void)
static ULONG WINAPI MessageFilter_AddRef(IMessageFilter *iface)
static HRESULT WINAPI CustomMarshal_GetMarshalSizeMax(IMarshal *iface, REFIID riid, void *pv, DWORD dwDestContext, void *pvDestContext, DWORD mshlflags, DWORD *size)
static IClassFactory TestMsg_ClassFactory
static void test_no_marshaler(void)
static IStdMarshalInfo Test_SMI
static HRESULT WINAPI Test_IUnknown_QueryInterface(LPUNKNOWN iface, REFIID riid, LPVOID *ppvObj)
static void test_crash_couninitialize(void)
static void test_message_filter(void)
static ULONG WINAPI OleClientSite_Release(IOleClientSite *iface)
static void test_proxy_used_in_wrong_thread(void)
static const LARGE_INTEGER ullZero
static ULONG WINAPI TestOOP_IClassFactory_Release(LPCLASSFACTORY iface)
static IChannelHook TestChannelHook
static void test_implicit_mta(void)
static void test_freethreadedmarshaldata(IStream *pStream, MSHCTX mshctx, void *ptr, DWORD mshlflags)
static HRESULT WINAPI CustomMarshal_GetUnmarshalClass(IMarshal *iface, REFIID riid, void *pv, DWORD dwDestContext, void *pvDestContext, DWORD mshlflags, CLSID *clsid)
static DWORD CALLBACK bad_thread_proc(LPVOID p)
static ULONG WINAPI CustomMarshal_Release(IMarshal *iface)
static HRESULT WINAPI Test_IClassFactory_QueryInterface(LPCLASSFACTORY iface, REFIID riid, LPVOID *ppvObj)
static ULONG WINAPI ExternalConnection_Release(IExternalConnection *iface)
static void test_inproc_handler(void)
static void test_marshal_and_unmarshal_invalid(void)
static void LockModuleOOP(void)
#define ok_ole_success(hr, func)
static HRESULT WINAPI CustomMarshal_UnmarshalInterface(IMarshal *iface, IStream *stream, REFIID riid, void **ppv)
struct local_server local_server_class
static ULONG WINAPI RpcStubBuffer_AddRef(IRpcStubBuffer *iface)
static IClassFactory Test_ClassFactory
static IMarshalVtbl CustomMarshalVtbl
static ULONG WINAPI Test_SMI_AddRef(IStdMarshalInfo *iface)
static void test_register_local_server(void)
static void test_tableweak_marshal_releasedata1(void)
#define ok_non_zero_external_conn()
static IUnknown Test_Unknown
static const IStdMarshalInfoVtbl Test_SMI_Vtbl
static void test_freethreadedmarshaler(void)
static void test_tableweak_and_normal_marshal_and_unmarshal(void)
#define EXTENTID_WineTest
#define CHECK_EXPECT(func)
static IRpcStubBuffer *WINAPI RpcStubBuffer_IsIIDSupported(IRpcStubBuffer *iface, REFIID riid)
static HRESULT WINAPI RpcStubBuffer_Connect(IRpcStubBuffer *iface, IUnknown *pUnkServer)
static HRESULT reg_unreg_wine_test_class(BOOL Register)
static const char * debugstr_iid(REFIID riid)
static ULONG WINAPI Test_IUnknown_Release(LPUNKNOWN iface)
static const IClassFactoryVtbl TestClassFactoryOOP_Vtbl
static const IUnknownVtbl TestCrashUnknown_Vtbl
static const IClassFactoryVtbl TestREClassFactory_Vtbl
static HRESULT WINAPI Test_IClassFactory_LockServer(LPCLASSFACTORY iface, BOOL fLock)
static HANDLE heventShutdown
static void test_tablestrong_marshal_and_unmarshal_twice(void)
#define DEFINE_EXPECT(func)
static void test_manualresetevent(void)
static HRESULT WINAPI Test_IClassFactory_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID *ppvObj)
static DWORD CALLBACK get_global_interface_proc(LPVOID pv)
static DWORD start_host_object(IStream *stream, REFIID riid, IUnknown *object, MSHLFLAGS marshal_flags, HANDLE *thread)
static void test_normal_marshal_and_unmarshal_twice(void)
static void end_host_object(DWORD tid, HANDLE thread)
static HRESULT WINAPI TestRE_IClassFactory_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID *ppvObj)
static void test_cocreateinstance_proxy(void)
static ULONG WINAPI HeapUnknown_AddRef(IUnknown *iface)
static ULONG WINAPI RpcStubBuffer_Release(IRpcStubBuffer *iface)
static const IID IID_IWineTest
static ULONG WINAPI OleClientSite_AddRef(IOleClientSite *iface)
static DWORD start_host_object2(struct host_object_data *object_data, HANDLE *thread)
static void test_message_reentrancy(void)
static void test_no_couninitialize_server(void)
static ULONG WINAPI MessageFilter_Release(IMessageFilter *iface)
static ULONG WINAPI HeapUnknown_Release(IUnknown *iface)
static void test_local_server(void)
static const CLSID * unmarshal_class
static HRESULT WINAPI local_server_GetClassID(IPersist *iface, CLSID *clsid)
static ULONG WINAPI OleWindow_AddRef(IOleWindow *iface)
static ULONG WINAPI PSFactoryBuffer_AddRef(IPSFactoryBuffer *iface)
static LRESULT CALLBACK window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static HANDLE create_target_process(const char *arg)
static HRESULT WINAPI OleWindow_GetWindow(IOleWindow *iface, HWND *hwnd)
static IOleClientSite Test_OleClientSite
#define RELEASEMARSHALDATA
static const GUID CLSID_WineTestPSFactoryBuffer
static DWORD CALLBACK no_couninitialize_client_proc(LPVOID p)
static SIZE_T round_global_size(SIZE_T size)
static IClassFactoryVtbl TestMsgClassFactory_Vtbl
static DWORD WINAPI MessageFilter_RetryRejectedCall(IMessageFilter *iface, HTASK threadIDCallee, DWORD dwTickCount, DWORD dwRejectType)
static void test_two_tableweak_marshal_and_releasedata(void)
static StubBufferWrapper * impl_from_IRpcStubBuffer(IRpcStubBuffer *iface)
static HRESULT WINAPI local_server_QueryInterface(IPersist *iface, REFIID iid, void **obj)
static const IRpcStubBufferVtbl RpcStubBufferVtbl
static ULONG WINAPI Test_SMI_Release(IStdMarshalInfo *iface)
static HRESULT WINAPI PSFactoryBuffer_CreateStub(IPSFactoryBuffer *iface, REFIID riid, IUnknown *server, IRpcStubBuffer **ppStub)
static HRESULT WINAPI TestOOP_IClassFactory_LockServer(LPCLASSFACTORY iface, BOOL fLock)
static void test_hresult_marshaling(void)
static ULONG WINAPI PSFactoryBuffer_Release(IPSFactoryBuffer *iface)
static HRESULT WINAPI PSFactoryBuffer_CreateProxy(IPSFactoryBuffer *iface, IUnknown *outer, REFIID riid, IRpcProxyBuffer **ppProxy, void **ppv)
static void WINAPI RpcStubBuffer_DebugServerRelease(IRpcStubBuffer *iface, void *pv)
static DWORD CALLBACK no_couninitialize_server_proc(LPVOID p)
static void test_marshal_stub_apartment_shutdown(void)
struct tagDUALSTRINGARRAY DUALSTRINGARRAY
static IExternalConnection ExternalConnection
static DWORD WINAPI MessageFilter_HandleInComingCall(IMessageFilter *iface, DWORD dwCallType, HTASK threadIDCaller, DWORD dwTickCount, LPINTERFACEINFO lpInterfaceInfo)
static void test_proxybuffer(REFIID riid)
static DWORD WINAPI ExternalConnection_ReleaseConnection(IExternalConnection *iface, DWORD extconn, DWORD reserved, BOOL fLastReleaseCloses)
static ULONG WINAPI ExternalConnection_AddRef(IExternalConnection *iface)
static HRESULT WINAPI RpcStubBuffer_QueryInterface(IRpcStubBuffer *iface, REFIID riid, void **ppv)
static void test_globalinterfacetable(void)
static BOOL crash_thread_success
static void UnlockModule(void)
static HRESULT WINAPI HeapUnknown_QueryInterface(IUnknown *iface, REFIID riid, void **ppv)
static HRESULT WINAPI OleWindow_QueryInterface(IOleWindow *iface, REFIID riid, void **ppv)
static HRESULT WINAPI RpcStubBuffer_DebugServerQueryInterface(IRpcStubBuffer *iface, void **ppv)
static HRESULT WINAPI MessageFilter_QueryInterface(IMessageFilter *iface, REFIID riid, void **ppvObj)
static ULONG WINAPI Test_IClassFactory_AddRef(LPCLASSFACTORY iface)
static ULONG WINAPI Test_IUnknown_AddRef(LPUNKNOWN iface)
static void WINAPI TestChannelHook_ServerFillBuffer(IChannelHook *iface, REFGUID uExtent, REFIID riid, ULONG *pDataSize, void *pDataBuffer, HRESULT hrFault)
static void register_test_window(void)
static HRESULT WINAPI CustomMarshal_ReleaseMarshalData(IMarshal *iface, IStream *stream)
#define ok_zero_external_conn()
static HRESULT WINAPI RpcStubBuffer_Invoke(IRpcStubBuffer *iface, RPCOLEMESSAGE *_prpcmsg, IRpcChannelBuffer *_pRpcChannelBuffer)
static void test_same_apartment_unmarshal_failure(void)
static void test_WM_QUIT_handling(void)
static HRESULT WINAPI TestChannelHook_QueryInterface(IChannelHook *iface, REFIID riid, void **ppv)
static void WINAPI TestChannelHook_ServerGetSize(IChannelHook *iface, REFGUID uExtent, REFIID riid, HRESULT hrFault, ULONG *pDataSize)
static const IMessageFilterVtbl MessageFilter_Vtbl
static IPSFactoryBuffer * ps_factory_buffer
static void test_CoGetStandardMarshal(void)
static const IChannelHookVtbl TestChannelHookVtbl
#define CHECK_CALLED(func)
#define ok_last_release_closes(b)
static HRESULT WINAPI TestOOP_IClassFactory_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID *ppvObj)
static HRESULT WINAPI ExternalConnection_QueryInterface(IExternalConnection *iface, REFIID riid, void **ppv)
static DWORD CALLBACK implicit_mta_use_proc(void *param)
static void test_DfMarshal_custom_marshaling(void)
static const CLSID CLSID_WineOOPTest
static ULONG WINAPI OleWindow_Release(IOleWindow *iface)
static void test_stubbuffer(REFIID riid)
static ULONG WINAPI CustomMarshal_AddRef(IMarshal *iface)
static IUnknown TestCrash_Unknown
static DWORD CALLBACK implicit_mta_unmarshal_proc(void *param)
static void test_tableweak_marshal_releasedata2(void)
static IPSFactoryBufferVtbl PSFactoryBufferVtbl
static DWORD CALLBACK host_object_proc(LPVOID p)
static const IID IID_IRemUnknown
static void test_proxy_marshal_and_unmarshal2(void)
static void test_channel_hook(void)
static DWORD CALLBACK implicit_mta_marshal_proc(void *param)
static void test_StdMarshal_custom_marshaling(void)
static void test_marshal_channel_buffer(void)
static DWORD WINAPI MessageFilter_MessagePending(IMessageFilter *iface, HTASK threadIDCallee, DWORD dwTickCount, DWORD dwPendingType)
static void test_disconnect_stub(void)
static HRESULT WINAPI CustomMarshal_MarshalInterface(IMarshal *iface, IStream *stream, REFIID riid, void *pv, DWORD dwDestContext, void *pvDestContext, DWORD mshlflags)
static void test_no_couninitialize_client(void)
static DWORD CALLBACK crash_couninitialize_proc(void *p)
static const IClassFactoryVtbl TestClassFactory_Vtbl
static HRESULT WINAPI TestOOP_IClassFactory_QueryInterface(LPCLASSFACTORY iface, REFIID riid, LPVOID *ppvObj)
static ULONG WINAPI local_server_Release(IPersist *iface)
static void test_marshal_proxy_mta_apartment_shutdown(void)
static ULONG WINAPI local_server_AddRef(IPersist *iface)
static void test_handler_marshaling(void)
static const GUID CLSID_DfMarshal
static IMessageFilter MessageFilter
static void LockModule(void)
static ULONG WINAPI TestOOP_IClassFactory_AddRef(LPCLASSFACTORY iface)
static void WINAPI TestChannelHook_ServerNotify(IChannelHook *iface, REFGUID uExtent, REFIID riid, ULONG cbDataSize, void *pDataBuffer, DWORD lDataRep)
static void test_normal_marshal_and_release(void)
static HRESULT WINAPI Test_SMI_QueryInterface(IStdMarshalInfo *iface, REFIID riid, LPVOID *ppvObj)
static const IOleWindowVtbl OleWindowVtbl
static BOOL new_hook_struct
static DWORD WINAPI ExternalConnection_AddConnection(IExternalConnection *iface, DWORD extconn, DWORD reserved)
static ULONG WINAPI TestChannelHook_Release(IChannelHook *iface)
static IClassFactory TestOOP_ClassFactory
static BOOL with_external_conn
static void test_marshal_proxy_apartment_shutdown(void)
static const IExternalConnectionVtbl ExternalConnectionVtbl
static ULONG WINAPI RpcStubBuffer_CountRefs(IRpcStubBuffer *iface)
static const IUnknownVtbl HeapUnknown_Vtbl
static void test_lock_object_external(void)
static void test_bad_marshal_stream(void)
static IClassFactory TestRE_ClassFactory
static const IPersistVtbl local_server_persist_vtbl
static void WINAPI TestChannelHook_ClientNotify(IChannelHook *iface, REFGUID uExtent, REFIID riid, ULONG cbDataSize, void *pDataBuffer, DWORD lDataRep, HRESULT hrFault)
static const IUnknownVtbl TestUnknown_Vtbl
static ULONG WINAPI Test_IClassFactory_Release(LPCLASSFACTORY iface)
static HRESULT WINAPI PSFactoryBuffer_QueryInterface(IPSFactoryBuffer *iface, REFIID riid, void **ppv)
struct tagSTDOBJREF STDOBJREF
static HRESULT WINAPI TestMsg_IClassFactory_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID *ppvObj)
static ULONG WINAPI TestCrash_IUnknown_Release(LPUNKNOWN iface)
static const LARGE_INTEGER llZero
@ COINIT_APARTMENTTHREADED
interface IStream * LPSTREAM
const GUID IID_IParseDisplayName
const GUID IID_IOleWindow
const GUID IID_IOleClientSite
const GUID IID_IOleObject
#define IsEqualGUID(rguid1, rguid2)
#define IsEqualIID(riid1, riid2)
#define RPC_C_IMP_LEVEL_IMPERSONATE
_Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
static __inline const char * wine_dbgstr_guid(const GUID *id)
int winetest_get_mainargs(char ***pargv)
void winetest_wait_child_process(HANDLE process)
IRpcStubBuffer IRpcStubBuffer_iface
IGlobalInterfaceTable * git
IUnknown * register_object
const CLSID * register_clsid
unsigned short aStringArray[1]
unsigned short wSecurityOffset
unsigned short wNumEntries
union tagOBJREF::@1683 u_objref
DUALSTRINGARRAY saResAddr
struct tagOBJREF::@1683::OR_CUSTOM u_custom
struct tagOBJREF::@1683::OR_HANDLER u_handler
struct tagOBJREF::@1683::OR_STANDARD u_standard
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventA(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
#define FIELD_OFFSET(t, f)
#define CONTAINING_RECORD(address, type, field)
static EFI_HANDLE * handles
static rfbScreenInfoPtr server
DWORD WINAPI GetLastError(void)
DWORD WINAPI GetCurrentProcessId(void)
#define REGDB_E_CLASSNOTREG
#define RPC_E_WRONG_THREAD
#define CO_E_OBJNOTCONNECTED
#define RPC_E_CANTCALLOUT_ININPUTSYNCCALL
#define RPC_S_CALLPENDING
#define CLASS_E_NOAGGREGATION
#define CO_E_SERVER_STOPPING
#define RPC_E_DISCONNECTED
#define RPC_E_CALL_REJECTED
#define HKEY_CLASSES_ROOT
LRESULT WINAPI DispatchMessageA(_In_ const MSG *)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
DWORD WINAPI MsgWaitForMultipleObjects(_In_ DWORD nCount, _In_reads_opt_(nCount) CONST HANDLE *pHandles, _In_ BOOL fWaitAll, _In_ DWORD dwMilliseconds, _In_ DWORD dwWakeMask)
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
LRESULT WINAPI SendMessageTimeoutA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM, _In_ UINT, _In_ UINT, _Out_opt_ PDWORD_PTR)
HWND WINAPI GetWindow(_In_ HWND, _In_ UINT)
BOOL WINAPI PeekMessageA(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
BOOL WINAPI PostThreadMessageA(_In_ DWORD, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI GetMessageA(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI PostMessageA(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)