37#define DEFINE_EXPECT(func) \
38 static BOOL expect_ ## func = FALSE, called_ ## func = FALSE
40#define SET_EXPECT(func) \
41 expect_ ## func = TRUE
43#define CHECK_EXPECT2(func) \
45 ok(expect_ ##func, "unexpected call " #func "\n"); \
46 called_ ## func = TRUE; \
49#define CHECK_EXPECT(func) \
51 CHECK_EXPECT2(func); \
52 expect_ ## func = FALSE; \
55#define CHECK_CALLED(func) \
57 ok(called_ ## func, "expected " #func "\n"); \
58 expect_ ## func = called_ ## func = FALSE; \
61static const GUID CLSID_WineTestPSFactoryBuffer = { 0x22222222, 0x1234, 0x1234, { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0 } };
62static const GUID CLSID_DfMarshal = { 0x0000030b, 0x0000, 0x0000, { 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 } };
63static const GUID CLSID_ft_unmarshaler_1809 = {0x00000359, 0x0000, 0x0000, {0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}};
69#define ok_more_than_one_lock() ok(cLocks > 0, "Number of locks should be > 0, but actually is %ld\n", cLocks)
70#define ok_no_locks() ok(cLocks == 0, "Number of locks should be 0, but actually is %ld\n", cLocks)
71#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error %#08lx\n", hr)
72#define ok_non_zero_external_conn() do {if (with_external_conn) ok(external_connections, "got no external connections\n");} while(0);
73#define ok_zero_external_conn() do {if (with_external_conn) ok(!external_connections, "got %ld external connections\n", external_connections);} while(0);
74#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);
76#define OBJREF_SIGNATURE (0x574f454d)
77#define OBJREF_STANDARD (0x1)
78#define OBJREF_CUSTOM (0x4)
126 {0xa1, 0xa2, 0x5d, 0x5a, 0x36, 0x54, 0xd3, 0xbd}
134 {0xc0,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}
137#define EXTENTID_WineTest IID_IWineTest
138#define CLSID_WineTest IID_IWineTest
145 {0xa1, 0xa2, 0x5d, 0x5a, 0x36, 0x54, 0xd3, 0xbd}
158 hr = IUnknown_QueryInterface(pProxy, &IID_IMultiQI, (
void **)&pMQI);
159 ok(
hr ==
S_OK,
"created object is not a proxy, so was created in the wrong apartment\n");
161 IMultiQI_Release(pMQI);
162 IUnknown_Release(pProxy);
186 ok(0,
"unexpected call\n");
237 IUnknown_AddRef(iface);
270 trace(
"crashing...\n");
286 LPCLASSFACTORY iface,
298 IClassFactory_AddRef(iface);
325 LPCLASSFACTORY iface,
335 LPCLASSFACTORY iface,
445 *
ppv = &
This->IRpcStubBuffer_iface;
466 IRpcStubBuffer_Release(
This->buffer);
474 ok(0,
"unexpected call\n");
487 void *dest_context_data;
493 hr = IRpcChannelBuffer_GetDestCtx(_pRpcChannelBuffer, &dest_context, &dest_context_data);
494 ok(
hr ==
S_OK,
"GetDestCtx failed: %08lx\n",
hr);
495 ok(dest_context == MSHCTX_INPROC,
"desc_context = %lx\n", dest_context);
496 ok(!dest_context_data,
"desc_context_data = %p\n", dest_context_data);
498 return IRpcStubBuffer_Invoke(
This->buffer, _prpcmsg, _pRpcChannelBuffer);
503 ok(0,
"unexpected call\n");
509 ok(0,
"unexpected call\n");
515 ok(0,
"unexpected call\n");
521 ok(0,
"unexpected call\n");
553 *
ppv = &
This->IRpcProxyBuffer_iface;
574 IRpcProxyBuffer_Release(
This->buffer);
583 void *dest_context_data;
589 hr = IRpcChannelBuffer_GetDestCtx(pRpcChannelBuffer, &dest_context, &dest_context_data);
590 ok(
hr ==
S_OK,
"GetDestCtx failed: %08lx\n",
hr);
591 ok(dest_context == MSHCTX_INPROC,
"desc_context = %lx\n", dest_context);
592 ok(!dest_context_data,
"desc_context_data = %p\n", dest_context_data);
594 return IRpcProxyBuffer_Connect(
This->buffer, pRpcChannelBuffer);
647 ok(
hr ==
S_OK,
"CreateProxy failed: %08lx\n",
hr);
649 *ppProxy = &
proxy->IRpcProxyBuffer_iface;
669 ok(
hr ==
S_OK,
"CreateStub failed: %08lx\n",
hr);
671 *ppStub = &
stub->IRpcStubBuffer_iface;
686#define RELEASEMARSHALDATA WM_USER
705 DWORD registration_key;
711 if(
data->register_object) {
714 ok(
hr ==
S_OK,
"CoRegisterClassObject failed: %08lx\n",
hr);
721 if (prev_filter) IMessageFilter_Release(prev_filter);
757 *
data = *object_data;
803 ok(
hr ==
E_NOINTERFACE,
"CoMarshalInterface should have returned E_NOINTERFACE instead of 0x%08lx\n",
hr);
805 IStream_Release(pStream);
825 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
828 IStream_Release(pStream);
853 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
856 IStream_Release(pStream);
862 IUnknown_Release(pProxy);
887 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
895 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
906 IClassFactory_Release(pProxy);
909 IStream_Release(pStream);
933 hr = IStream_Seek(pStream,
llZero, STREAM_SEEK_SET,
NULL);
937 ok(
hr ==
E_NOINTERFACE,
"CoUnmarshalInterface should have returned E_NOINTERFACE instead of 0x%08lx\n",
hr);
943 IStream_Release(pStream);
965 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
968 IStream_Release(pStream);
973 IUnknown_Release(pProxy);
984#define NORMALEXTREFS 5
1007 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1013 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1031 IUnknown_Release(pProxy);
1033 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1040 IUnknown_Release(pProxy2);
1048 IUnknown_Release(pProxy2);
1055 IStream_Release(pStream);
1081 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1087 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1094 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1098 IStream_Release(pStream);
1111 IUnknown_Release(pProxy);
1116 IUnknown_Release(pProxy2);
1145 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1152 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1162 IUnknown_Release(pProxy);
1164 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1167 ok(
hr ==
CO_E_OBJNOTREG,
"CoUnmarshalInterface should return CO_E_OBJNOTREG instead of 0x%08lx\n",
hr);
1173 IStream_Release(pStream);
1198 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1205 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1215 IUnknown_Release(pProxy);
1217 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1224 IUnknown_Release(pProxy2);
1229 IStream_Release(pStream);
1259 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1262 IStream_Release(pStream);
1275 IUnknown_Release(pProxy);
1301 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1304 IStream_Release(pStream);
1318 ref = IClassFactory_Release(
proxy);
1350 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1353 IStream_Release(pStream);
1364 IUnknown_Release(pProxy);
1375 DWORD registration_key;
1405 IStream_Release(object_data.
stream);
1409 ok(
hr ==
S_OK,
"CoRegisterClassObject failed: %08lx\n",
hr);
1412 ok(
hr ==
S_OK,
"CoRegisterPSClsid failed: %08lx\n",
hr);
1418 ok(
hr ==
S_OK,
"Could not get IOleWindow iface: %08lx\n",
hr);
1425 hr = IOleWindow_GetWindow(ole_window, &
hwnd);
1426 ok(
hr ==
S_OK,
"GetWindow failed: %08lx\n",
hr);
1431 IOleWindow_Release(ole_window);
1435 IUnknown_Release(
proxy);
1442 ok(
hr ==
S_OK,
"CoRevokeClassObject failed: %08lx\n",
hr);
1508 ok(
stat.cbSize.LowPart == 0,
"stream is not empty (%ld)\n",
stat.cbSize.LowPart);
1509 ok(
stat.cbSize.HighPart == 0,
"stream is not empty (%ld)\n",
stat.cbSize.HighPart);
1512 dwDestContext,
NULL, mshlflags, &std_marshal);
1514 hr = IMarshal_MarshalInterface(std_marshal,
stream,
riid, pv,
1515 dwDestContext, pvDestContext, mshlflags);
1517 IMarshal_Release(std_marshal);
1525 ok(0,
"unexpected call\n");
1531 ok(0,
"unexpected call\n");
1537 ok(0,
"unexpected call\n");
1570 MSHCTX_INPROC,
NULL, MSHLFLAGS_NORMAL);
1580 IUnknown_Release(unk);
1589 MSHCTX_INPROC,
NULL, MSHLFLAGS_NORMAL);
1602 MSHCTX_INPROC,
NULL, MSHLFLAGS_NORMAL);
1623 MSHCTX_INPROC,
NULL, MSHLFLAGS_NORMAL);
1651 MSHCTX_INPROC,
NULL, MSHLFLAGS_NORMAL);
1673 MSHCTX_INPROC,
NULL, MSHLFLAGS_NORMAL, &marshal);
1677 MSHCTX_INPROC,
NULL, MSHLFLAGS_NORMAL, &
clsid);
1682 MSHCTX_INPROC,
NULL, MSHLFLAGS_NORMAL, &
size);
1685 MSHCTX_INPROC,
NULL, MSHLFLAGS_NORMAL);
1687 ok(
size ==
read,
"IMarshal_GetMarshalSizeMax size = %ld, expected %ld\n",
size,
read);
1705 ok(stdobjref->
flags == 0,
"stdobjref.flags = %ld\n", stdobjref->
flags);
1706 ok(stdobjref->
cPublicRefs == 5,
"stdobjref.cPublicRefs = %ld\n",
1709 ok(dualstringarr->
wNumEntries == 0,
"dualstringarr.wNumEntries = %d\n",
1718 IUnknown_Release(unk);
1728 hr = IMarshal_ReleaseMarshalData(marshal,
stream);
1732 IMarshal_Release(marshal);
1788 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1791 IStream_Release(pStream);
1809 IUnknown_Release(pProxy);
1855 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1901 trace(
"CoUninitialize >>>\n");
1903 trace(
"CoUninitialize <<<\n");
1944 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1951 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1957 IUnknown_Release(pProxy1);
1959 IUnknown_Release(pProxy2);
1968 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
1976 IStream_Release(pStream);
2000 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2009 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2015 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2018 IStream_Release(pStream);
2023 IUnknown_Release(pProxy1);
2028 IUnknown_Release(pProxy2);
2062 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2067 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2072 "CoUnmarshalInterface should have failed with CO_E_OBJNOTREG, but returned 0x%08lx instead\n",
2075 IStream_Release(pStream);
2146 data.marshal_flags1 = MSHLFLAGS_TABLEWEAK;
2147 data.marshal_flags2 = MSHLFLAGS_NORMAL;
2174 IUnknown_Release(pProxyNormal);
2179 IUnknown_Release(pProxyWeak);
2194 IStream_Release(
data.pStream1);
2195 IStream_Release(
data.pStream2);
2214 data.marshal_flags1 = MSHLFLAGS_TABLEWEAK;
2215 data.marshal_flags2 = MSHLFLAGS_NORMAL;
2244 IStream_Release(
data.pStream1);
2245 IStream_Release(
data.pStream2);
2264 data.marshal_flags1 = MSHLFLAGS_TABLEWEAK;
2265 data.marshal_flags2 = MSHLFLAGS_TABLEWEAK;
2289 IStream_Release(
data.pStream1);
2290 IStream_Release(
data.pStream2);
2317 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2323 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2329 if (pProxy1) IUnknown_Release(pProxy1);
2330 if (pProxy2) IUnknown_Release(pProxy2);
2339 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2341 IStream_Release(pStream);
2386 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2389 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2445 IStream_Release(pStream);
2469 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2472 IStream_Release(pStream);
2505 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2513 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2516 "CoUnmarshalInterface should have failed with error CO_E_OBJNOTCONNECTED for double unmarshal, instead of 0x%08lx\n",
hr);
2518 IStream_Release(pStream);
2522 IUnknown_Release(pProxy1);
2533 static const HRESULT E_DEADBEEF = 0xdeadbeef;
2541 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2542 hr = IStream_Read(pStream, &hr_marshaled,
sizeof(
HRESULT),
NULL);
2545 ok(hr_marshaled == E_DEADBEEF,
"Didn't marshal HRESULT as expected: got value 0x%08lx instead\n", hr_marshaled);
2548 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2552 ok(hr_marshaled == E_DEADBEEF,
"Didn't marshal HRESULT as expected: got value 0x%08lx instead\n", hr_marshaled);
2554 IStream_Release(pStream);
2568 hr = IClassFactory_QueryInterface(
cf, &IID_IMultiQI, (
LPVOID *)&
proxy);
2571 IUnknown_Release(
proxy);
2573 hr = IClassFactory_QueryInterface(
cf, &IID_IStream, (
LPVOID *)&
proxy);
2576 IUnknown_Release(
proxy);
2583 "COM should have failed with RPC_E_WRONG_THREAD on using proxy from wrong apartment, but instead returned 0x%08lx\n",
2586 hr = IClassFactory_QueryInterface(
cf, &IID_IStream, (
LPVOID *)&
proxy);
2590 IClassFactory_Release(
cf);
2615 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2618 IStream_Release(pStream);
2623 IUnknown_QueryInterface(pProxy, &IID_IStream, (
LPVOID *)&pStream);
2644 IMessageFilter_AddRef(iface);
2664 HTASK threadIDCaller,
2666 LPINTERFACEINFO lpInterfaceInfo)
2668 static int callcount = 0;
2674 ret = SERVERCALL_REJECTED;
2677 ret = SERVERCALL_RETRYLATER;
2680 ret = SERVERCALL_ISHANDLED;
2689 HTASK threadIDCallee,
2699 HTASK threadIDCallee,
2701 DWORD dwPendingType)
2704 return PENDINGMSG_WAITNOPROCESS;
2742 IStream_Release(object_data.
stream);
2757 IUnknown_Release(
proxy);
2759 IClassFactory_Release(
cf);
2784 ok(
hr ==
STG_E_READFAULT,
"Should have failed with STG_E_READFAULT, but returned 0x%08lx instead\n",
hr);
2787 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2791 IStream_Release(pStream);
2812 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
2815 IStream_Release(pStream);
2821 if (
hr ==
S_OK) IUnknown_Release(pOtherUnknown);
2823 hr = IUnknown_QueryInterface(pProxy, &IID_IClientSecurity, (
LPVOID*)&pOtherUnknown);
2825 if (
hr ==
S_OK) IUnknown_Release(pOtherUnknown);
2827 hr = IUnknown_QueryInterface(pProxy, &IID_IMultiQI, (
LPVOID*)&pOtherUnknown);
2829 if (
hr ==
S_OK) IUnknown_Release(pOtherUnknown);
2831 hr = IUnknown_QueryInterface(pProxy, &IID_IMarshal, (
LPVOID*)&pOtherUnknown);
2833 if (
hr ==
S_OK) IUnknown_Release(pOtherUnknown);
2838 IUnknown_Release(pProxy);
2860 IUnknown_AddRef(iface);
2900 pUnkOuter->
refs = 1;
2910 ok(lpvtbl !=
NULL,
"IPSFactoryBuffer_CreateProxy succeeded, but returned a NULL vtable!\n");
2915 ok(refs == 1,
"Ref count of outer unknown should have been 1 instead of %ld\n", refs);
2918 IPSFactoryBuffer_Release(psfb);
2920 refs = IUnknown_Release((
IUnknown *)lpvtbl);
2921 ok(refs == 0,
"Ref-count leak of %ld on IRpcProxyBuffer\n", refs);
2923 refs = IRpcProxyBuffer_Release(
proxy);
2924 ok(refs == 0,
"Ref-count leak of %ld on IRpcProxyBuffer\n", refs);
2947 IPSFactoryBuffer_Release(psfb);
2951 IRpcStubBuffer_Disconnect(
stub);
2955 refs = IRpcStubBuffer_Release(
stub);
2956 ok(refs == 0,
"Ref-count leak of %ld on IRpcProxyBuffer\n", refs);
2962 LPCLASSFACTORY iface,
2971 ok(
ret,
"Timed out sending a message to originating window during RPC call\n");
3009 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
3012 IStream_Release(pStream);
3021 IClassFactory_Release(
proxy);
3048 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
3051 IStream_Release(pStream);
3059 ok(
hr ==
S_FALSE,
"IClassFactory_CreateInstance returned 0x%08lx, expected S_FALSE\n",
hr);
3061 IClassFactory_Release(
proxy);
3082 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
3085 IStream_Release(pStream);
3091 "COM call during processing of sent message should return RPC_E_CANTCALLOUT_ININPUTSYNCCALL instead of 0x%08lx\n",
hr);
3093 IClassFactory_Release(
proxy);
3110 memset(&wndclass, 0,
sizeof(wndclass));
3120 hwnd_app =
CreateWindowA(
"WineCOMTest",
NULL, 0,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
NULL,
NULL,
NULL, 0);
3135 LPCLASSFACTORY iface,
3166 hwnd_app =
CreateWindowA(
"WineCOMTest",
NULL, 0,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
NULL,
NULL,
NULL, 0);
3175 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
3178 IStream_Release(pStream);
3186 IClassFactory_Release(
proxy);
3204 hwnd_app =
CreateWindowA(
"WineCOMTest",
NULL, 0,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
NULL,
NULL,
NULL, 0);
3219 static SIZE_T global_size_alignment = -1;
3220 if (global_size_alignment == -1)
3227 return ((
size + global_size_alignment - 1) & ~(global_size_alignment - 1));
3244 if (mshctx == MSHCTX_INPROC)
3247 ok(
size == expected_size,
"expected size %lu, got %lu\n", expected_size,
size);
3249 ok(*(
DWORD *)marshal_data == mshlflags,
"expected 0x%lx, but got 0x%lx for mshctx\n", mshlflags, *(
DWORD *)marshal_data);
3250 marshal_data +=
sizeof(
DWORD);
3251 ok(*(
void **)marshal_data ==
ptr,
"expected %p, but got %p for mshctx\n",
ptr, *(
void **)marshal_data);
3252 marshal_data +=
sizeof(
void *);
3253 if (
sizeof(
void*) == 4 &&
size >= 3*
sizeof(
DWORD))
3255 ok(*(
DWORD *)marshal_data == 0,
"expected 0x0, but got 0x%lx\n", *(
DWORD *)marshal_data);
3256 marshal_data +=
sizeof(
DWORD);
3265 ok(
size >
sizeof(
DWORD),
"size should have been > sizeof(DWORD), not %ld\n",
size);
3266 ok(*(
DWORD *)marshal_data == 0x574f454d ,
3267 "marshal data should be filled by standard marshal and start with MEOW signature\n");
3287 hr = IUnknown_QueryInterface(pFTUnknown, &IID_IMarshal, (
void **)&pFTMarshal);
3289 IUnknown_Release(pFTUnknown);
3301 ok(
size == expected_size,
"Unexpected marshal size %lu, expected %lu.\n",
size, expected_size);
3317 IStream_Seek(pStream,
llZero, STREAM_SEEK_SET,
NULL);
3318 hr = IMarshal_UnmarshalInterface(pFTMarshal, pStream, &
IID_IUnknown, (
void **)&pProxy);
3321 IUnknown_Release(pProxy);
3327 IStream_Seek(pStream,
llZero, STREAM_SEEK_SET,
NULL);
3330 MSHLFLAGS_TABLESTRONG);
3337 IStream_Seek(pStream,
llZero, STREAM_SEEK_SET,
NULL);
3338 hr = IMarshal_UnmarshalInterface(pFTMarshal, pStream, &
IID_IUnknown, (
void **)&pProxy);
3341 IUnknown_Release(pProxy);
3345 IStream_Seek(pStream,
llZero, STREAM_SEEK_SET,
NULL);
3346 hr = IMarshal_ReleaseMarshalData(pFTMarshal, pStream);
3353 IStream_Seek(pStream,
llZero, STREAM_SEEK_SET,
NULL);
3356 MSHLFLAGS_TABLEWEAK);
3363 IStream_Seek(pStream,
llZero, STREAM_SEEK_SET,
NULL);
3364 hr = IMarshal_UnmarshalInterface(pFTMarshal, pStream, &
IID_IUnknown, (
void **)&pProxy);
3369 IUnknown_Release(pProxy);
3375 IStream_Seek(pStream,
llZero, STREAM_SEEK_SET,
NULL);
3383 hr = IMarshal_DisconnectObject(pFTMarshal, 0);
3388 IStream_Seek(pStream,
llZero, STREAM_SEEK_SET,
NULL);
3389 hr = IMarshal_ReleaseMarshalData(pFTMarshal, pStream);
3396 IStream_Seek(pStream,
llZero, STREAM_SEEK_SET,
NULL);
3397 hr = IMarshal_UnmarshalInterface(pFTMarshal, pStream, &
IID_IUnknown, (
void **)&pProxy);
3410 IStream_Seek(pStream,
llZero, STREAM_SEEK_SET,
NULL);
3418 IStream_Seek(pStream,
llZero, STREAM_SEEK_SET,
NULL);
3424 IStream_Release(pStream);
3425 IMarshal_Release(pFTMarshal);
3434 DWORD dwDisposition;
3448 skip(
"Not authorized to modify the Classes key\n");
3482 ok(
hr ==
E_NOINTERFACE,
"IUnknown_QueryInterface on handler for invalid interface returned 0x%08lx instead of E_NOINTERFACE\n",
hr);
3487 IUnknown_Release(pObject2);
3506 IStdMarshalInfo_AddRef(iface);
3527 DWORD dwDestContext,
3528 void *pvDestContext,
3565 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
3568 IStream_Release(pStream);
3575 ok(
hr ==
E_NOINTERFACE,
"IUnknown_QueryInterface with unknown IID should have returned E_NOINTERFACE instead of 0x%08lx\n",
hr);
3583 IUnknown_Release(pProxy);
3614 DWORD dwCapabilities;
3623 IStream_Seek(pStream,
ullZero, STREAM_SEEK_SET,
NULL);
3626 IStream_Release(pStream);
3634 hr = IUnknown_QueryInterface(pProxy2, &
IID_IUnknown, (
void **)&pUnknown2);
3637 ok(pUnknown1 == pUnknown2,
"both proxy's IUnknowns should be the same - %p, %p\n", pUnknown1, pUnknown2);
3638 IUnknown_Release(pUnknown2);
3640 IUnknown_Release(pProxy2);
3643 hr = IClassFactory_QueryInterface(pProxy, &IID_IMarshal, (
LPVOID*)&pMarshal);
3646 hr = IClassFactory_QueryInterface(pProxy, &IID_IClientSecurity, (
LPVOID*)&pCliSec);
3653 todo_wine ok(
hr ==
E_NOINTERFACE,
"IClientSecurity_QueryBlanket with local interface should have returned E_NOINTERFACE instead of 0x%08lx\n",
hr);
3655 hr = IClientSecurity_QueryBlanket(pCliSec, (
IUnknown *)pProxy, &dwAuthnSvc, &dwAuthzSvc, &pServerPrincName, &dwAuthnLevel, &dwImpLevel, &pAuthInfo, &dwCapabilities);
3662 ok(
hr ==
E_NOINTERFACE,
"COM call should have succeeded instead of returning 0x%08lx\n",
hr);
3664 hr = IClientSecurity_SetBlanket(pCliSec, (
IUnknown *)pMarshal, dwAuthnSvc, dwAuthzSvc, pServerPrincName, dwAuthnLevel, dwImpLevel, pAuthInfo, dwCapabilities);
3665 todo_wine ok(
hr ==
E_NOINTERFACE,
"IClientSecurity_SetBlanket with local interface should have returned E_NOINTERFACE instead of 0x%08lx\n",
hr);
3667 hr = IClientSecurity_SetBlanket(pCliSec, (
IUnknown *)pProxy, 0xdeadbeef, dwAuthzSvc, pServerPrincName, dwAuthnLevel, dwImpLevel, pAuthInfo, dwCapabilities);
3668 todo_wine ok(
hr ==
E_INVALIDARG,
"IClientSecurity_SetBlanke with invalid dwAuthnSvc should have returned E_INVALIDARG instead of 0x%08lx\n",
hr);
3672 hr = IClientSecurity_QueryBlanket(pCliSec, pUnknown1, &dwAuthnSvc, &dwAuthzSvc, &pServerPrincName, &dwAuthnLevel, &dwImpLevel, &pAuthInfo, &dwCapabilities);
3677 IClassFactory_Release(pProxy);
3678 IUnknown_Release(pUnknown1);
3679 IMarshal_Release(pMarshal);
3680 IClientSecurity_Release(pCliSec);
3717 IPersist_AddRef(iface);
3766 LPCLASSFACTORY iface,
3776 IClassFactory_AddRef(iface);
3794 LPCLASSFACTORY iface,
3801 IPersist_AddRef( persist );
3802 hr = IPersist_QueryInterface( persist,
riid, ppvObj );
3803 IPersist_Release( persist );
3808 LPCLASSFACTORY iface,
3940 hr = IClassFactory_LockServer(
cf,
TRUE);
3945 IClassFactory_LockServer(
cf,
FALSE);
3950 IClassFactory_Release(
cf);
3975 IPersist_Release(persist);
3992 IPersist_GetClassID(persist, &
clsid);
3993 IPersist_Release(persist);
4023 IClassFactory_Release(
cf);
4048 hr = IClassFactory_QueryInterface(
cf, &IID_IGlobalInterfaceTable, (
void**)&
object);
4051 IClassFactory_Release(
cf);
4056 ref = IGlobalInterfaceTable_AddRef(
git);
4058 ref = IGlobalInterfaceTable_AddRef(
git);
4061 ref = IGlobalInterfaceTable_Release(
git);
4063 ref = IGlobalInterfaceTable_Release(
git);
4091 IUnknown_Release(
object);
4096 IUnknown_Release(
object);
4098 hr = IGlobalInterfaceTable_RevokeInterfaceFromGlobal(
git,
cookie);
4103 IGlobalInterfaceTable_Release(
git);
4107 IClassFactory_Release(
cf);
4122 IClassFactory_Release(
factory);
4126 IClassFactory_Release(
factory);
4130 ok(!!
punk,
"Got NULL.\n");
4131 IUnknown_Release(
punk);
4135 ok(!!psync1,
"Got NULL.\n");
4137 hr = ISynchronize_Wait(psync1, 0, 5);
4140 hr = ISynchronize_Reset(psync1);
4142 hr = ISynchronize_Signal(psync1);
4144 hr = ISynchronize_Wait(psync1, 0, 5);
4146 hr = ISynchronize_Wait(psync1, 0, 5);
4148 hr = ISynchronize_Reset(psync1);
4150 hr = ISynchronize_Wait(psync1, 0, 5);
4155 ok(!!psync2,
"Got NULL.\n");
4156 ok(psync1 != psync2,
"psync1 == psync2.\n");
4158 hr = ISynchronize_QueryInterface(psync2, &IID_ISynchronizeHandle, (
void**)&sync_handle);
4159 ok(
hr ==
S_OK,
"QueryInterface(IID_ISynchronizeHandle) failed: %08lx\n",
hr);
4162 hr = ISynchronizeHandle_GetHandle(sync_handle, &
handle);
4163 ok(
hr ==
S_OK,
"GetHandle failed: %08lx\n",
hr);
4166 ISynchronizeHandle_Release(sync_handle);
4168 hr = ISynchronize_Wait(psync2, 0, 5);
4171 hr = ISynchronize_Reset(psync1);
4173 hr = ISynchronize_Reset(psync2);
4175 hr = ISynchronize_Signal(psync1);
4177 hr = ISynchronize_Wait(psync2, 0, 5);
4180 ref = ISynchronize_AddRef(psync1);
4181 ok(
ref == 2,
"Got ref: %ld\n",
ref);
4182 ref = ISynchronize_AddRef(psync1);
4183 ok(
ref == 3,
"Got ref: %ld\n",
ref);
4184 ref = ISynchronize_Release(psync1);
4185 ok(
ref == 2,
"Got nonzero ref: %ld\n",
ref);
4186 ref = ISynchronize_Release(psync2);
4187 ok(!
ref,
"Got nonzero ref: %ld\n",
ref);
4188 ref = ISynchronize_Release(psync1);
4189 ok(
ref == 1,
"Got nonzero ref: %ld\n",
ref);
4190 ref = ISynchronize_Release(psync1);
4191 ok(!
ref,
"Got nonzero ref: %ld\n",
ref);
4208 IUnknown_Release(
proxy);
4221 IClassFactory_Release(
cf);
4238 IUnknown_Release(
proxy);
4319 IClassFactory_Release(
cf);
4346 IUnknown_Release(
proxy);
4352 IStream_Release(
data.stream);
4362 IChannelHook_AddRef(iface);
4389 SChannelHookCallInfo *
info = (SChannelHookCallInfo *)
riid;
4397 ok(!
info->pObject,
"pObject should be NULL\n");
4416 SChannelHookCallInfo *
info = (SChannelHookCallInfo *)
riid;
4424 ok(!
info->pObject,
"pObject should be NULL\n");
4430 *(
unsigned char *)pDataBuffer = 0xcc;
4443 SChannelHookCallInfo *
info = (SChannelHookCallInfo *)
riid;
4452 ok(
info->pObject !=
NULL,
"pObject shouldn't be NULL\n");
4468 SChannelHookCallInfo *
info = (SChannelHookCallInfo *)
riid;
4476 ok(
info->pObject !=
NULL,
"pObject shouldn't be NULL\n");
4480 ok(cbDataSize == 1,
"cbDataSize should have been 1 instead of %ld\n", cbDataSize);
4481 ok(*(
unsigned char *)pDataBuffer == 0xcc,
"pDataBuffer should have contained 0xcc instead of 0x%x\n", *(
unsigned char *)pDataBuffer);
4492 SChannelHookCallInfo *
info = (SChannelHookCallInfo *)
riid;
4500 ok(
info->pObject !=
NULL,
"pObject shouldn't be NULL\n");
4516 ok(0,
"TestChannelHook_ServerFillBuffer shouldn't be called\n");
4562 IStream_Release(object_data.
stream);
4571 IUnknown_Release(
proxy);
4573 IClassFactory_Release(
cf);
4630 IUnknown_Release(
proxy);
4631 IStream_Release(
data.stream);
4646 pDllGetClassObject = (
void*)
GetProcAddress(hOle32,
"DllGetClassObject");
#define CO_E_NOTINITIALIZED
COMPILER_DEPENDENT_UINT64 UINT64
#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 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)
HRESULT WINAPI CoGetPSClsid(REFIID riid, CLSID *pclsid)
ULONG WINAPI CoAddRefServerProcess(void)
HRESULT WINAPI CoRegisterMessageFilter(IMessageFilter *filter, IMessageFilter **ret_filter)
HRESULT WINAPI StringFromCLSID(REFCLSID clsid, LPOLESTR *str)
HRESULT WINAPI DECLSPEC_HOTPATCH CoRevokeClassObject(DWORD cookie)
HRESULT WINAPI DECLSPEC_HOTPATCH CoGetClassObject(REFCLSID rclsid, DWORD clscontext, COSERVERINFO *server_info, REFIID riid, void **obj)
HRESULT WINAPI CoDisconnectObject(IUnknown *object, DWORD reserved)
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(void *reserved, DWORD model)
HRESULT WINAPI CoRegisterPSClsid(REFIID riid, REFCLSID rclsid)
HRESULT WINAPI CoResumeClassObjects(void)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HRESULT WINAPI CoRegisterChannelHook(REFGUID guidExtension, IChannelHook *channel_hook)
ULONG WINAPI CoReleaseServerProcess(void)
HRESULT WINAPI CoLockObjectExternal(IUnknown *object, BOOL lock, BOOL last_unlock_releases)
HRESULT WINAPI CoRegisterClassObject(REFCLSID rclsid, IUnknown *object, DWORD clscontext, DWORD flags, DWORD *cookie)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
HRESULT WINAPI GetHGlobalFromStream(IStream *stream, HGLOBAL *phglobal)
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL delete_on_release, IStream **stream)
HRESULT WINAPI CoCreateFreeThreadedMarshaler(IUnknown *outer, IUnknown **marshaler)
HRESULT WINAPI CoMarshalHresult(IStream *stream, HRESULT hresult)
HRESULT WINAPI CoMarshalInterface(IStream *stream, REFIID riid, IUnknown *unk, DWORD dest_context, void *pvDestContext, DWORD mshlFlags)
HRESULT WINAPI CoUnmarshalHresult(IStream *stream, HRESULT *phresult)
HRESULT WINAPI CoGetStandardMarshal(REFIID riid, IUnknown *pUnk, DWORD dwDestContext, void *dest_context, DWORD flags, IMarshal **marshal)
HRESULT WINAPI CoReleaseMarshalData(IStream *stream)
HRESULT WINAPI CoUnmarshalInterface(IStream *stream, REFIID riid, void **ppv)
HRESULT WINAPI CoGetMarshalSizeMax(ULONG *size, REFIID riid, IUnknown *unk, DWORD dest_context, void *pvDestContext, DWORD mshlFlags)
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
#define HeapFree(x, y, z)
#define WideCharToMultiByte
#define ERROR_ACCESS_DENIED
VOID WINAPI RaiseException(_In_ DWORD dwExceptionCode, _In_ DWORD dwExceptionFlags, _In_ DWORD nNumberOfArguments, _In_opt_ const ULONG_PTR *lpArguments)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
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)
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA(const char *app_name, char *cmd_line, SECURITY_ATTRIBUTES *process_attr, SECURITY_ATTRIBUTES *thread_attr, BOOL inherit, DWORD flags, void *env, const char *cur_dir, STARTUPINFOA *startup_info, PROCESS_INFORMATION *info)
_ACRTIMP size_t __cdecl strlen(const char *)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
_ACRTIMP char *__cdecl strrchr(const char *, int)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
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
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
SIZE_T NTAPI GlobalSize(HGLOBAL hMem)
static ERESOURCE GlobalLock
_In_ PKSPIN_CONNECT Connect
void WINAPI CoTaskMemFree(void *ptr)
#define EXCEPTION_ACCESS_VIOLATION
static PROCESS_INFORMATION pi
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 test_mta_creation_thread_change_apartment(void)
static void WINAPI RpcStubBuffer_Disconnect(IRpcStubBuffer *iface)
static void release_host_object(DWORD tid, WPARAM wp)
static void WINAPI RpcProxyBuffer_Disconnect(IRpcProxyBuffer *iface)
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 HRESULT WINAPI RpcProxyBuffer_QueryInterface(IRpcProxyBuffer *iface, REFIID riid, void **ppv)
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 HRESULT WINAPI RpcProxyBuffer_Connect(IRpcProxyBuffer *iface, IRpcChannelBuffer *pRpcChannelBuffer)
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 ULONG WINAPI Test_IUnknown_Release(LPUNKNOWN iface)
static ProxyBufferWrapper * impl_from_IRpcProxyBuffer(IRpcProxyBuffer *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 ULONG WINAPI RpcProxyBuffer_Release(IRpcProxyBuffer *iface)
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 const GUID CLSID_ft_unmarshaler_1809
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 const IRpcProxyBufferVtbl RpcProxyBufferVtbl
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)
#define CHECK_EXPECT2(func)
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 DWORD CALLBACK second_mta_thread_proc(void *param)
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 ULONG WINAPI RpcProxyBuffer_AddRef(IRpcProxyBuffer *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 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
static __inline const char * wine_dbgstr_guid(const GUID *id)
int winetest_get_mainargs(char ***pargv)
#define wait_child_process
IRpcProxyBuffer IRpcProxyBuffer_iface
IRpcStubBuffer IRpcStubBuffer_iface
IGlobalInterfaceTable * git
IUnknown * register_object
const CLSID * register_clsid
unsigned short aStringArray[1]
unsigned short wSecurityOffset
unsigned short wNumEntries
struct tagOBJREF::@1807::OR_CUSTOM u_custom
DUALSTRINGARRAY saResAddr
struct tagOBJREF::@1807::OR_HANDLER u_handler
union tagOBJREF::@1807 u_objref
struct tagOBJREF::@1807::OR_STANDARD u_standard
#define EXCEPTION_NONCONTINUABLE
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)