29#define USE_COM_CONTEXT_DEF
41#define DEFINE_EXPECT(func) \
42 static BOOL expect_ ## func = FALSE; static unsigned int called_ ## func = 0
44#define SET_EXPECT(func) \
45 expect_ ## func = TRUE
47#define CHECK_EXPECT2(func) \
49 ok(expect_ ##func, "unexpected call " #func "\n"); \
53#define CHECK_EXPECT(func) \
55 CHECK_EXPECT2(func); \
56 expect_ ## func = FALSE; \
59#define CHECK_CALLED(func, n) \
61 ok(called_ ## func == n, "expected " #func " called %u times, got %u\n", n, called_ ## func); \
62 expect_ ## func = FALSE; \
63 called_ ## func = 0; \
89#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr)
90#define ok_more_than_one_lock() ok(cLocks > 0, "Number of locks should be > 0, but actually is %d\n", cLocks)
91#define ok_no_locks() ok(cLocks == 0, "Number of locks should be 0, but actually is %d\n", cLocks)
93static const CLSID CLSID_non_existent = { 0x12345678, 0x1234, 0x1234, { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0 } };
94static const CLSID CLSID_StdFont = { 0x0be35203, 0x8f91, 0x11ce, { 0x9d, 0xe3, 0x00, 0xaa, 0x00, 0x4b, 0xb8, 0x51 } };
95static const GUID IID_Testiface = { 0x22222222, 0x1234, 0x1234, { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0 } };
96static const GUID IID_Testiface2 = { 0x32222222, 0x1234, 0x1234, { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0 } };
97static const GUID IID_Testiface3 = { 0x42222222, 0x1234, 0x1234, { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0 } };
98static const GUID IID_Testiface4 = { 0x52222222, 0x1234, 0x1234, { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0 } };
99static const GUID IID_Testiface5 = { 0x62222222, 0x1234, 0x1234, { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0 } };
100static const GUID IID_Testiface6 = { 0x72222222, 0x1234, 0x1234, { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0 } };
101static const GUID IID_TestPS = { 0x66666666, 0x8888, 0x7777, { 0x66, 0x66, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 } };
103DEFINE_GUID(CLSID_testclsid, 0xacd014c7,0x9535,0x4fac,0x8b,0x53,0xa4,0x8c,0xa7,0xf4,0xd7,0x26);
106static const WCHAR wszNonExistent[] = {
'N',
'o',
'n',
'E',
'x',
'i',
's',
't',
'e',
'n',
't',0};
109 '{',
'0',
'b',
'e',
'3',
'5',
'2',
'0',
'3',
'-',
'8',
'f',
'9',
'1',
'-',
'1',
'1',
'c',
'e',
'-',
110 '9',
'd',
'e',
'3',
'-',
'0',
'0',
'a',
'a',
'0',
'0',
'4',
'b',
'b',
'8',
'5',
'1',
'}',0
112static const WCHAR progidW[] = {
'P',
'r',
'o',
'g',
'I',
'd',
'.',
'P',
'r',
'o',
'g',
'I',
'd',0};
113static const WCHAR cf_brokenW[] = {
'{',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'1',
'-',
'0',
'0',
'0',
'0',
'-',
'0',
'0',
'0',
'0',
'-',
114 'c',
'0',
'0',
'0',
'-',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'4',
'6',
'}',
'a',0};
116DEFINE_GUID(
IID_IWineTest, 0x5201163f, 0x8164, 0x4fd0, 0xa1, 0xa2, 0x5d, 0x5a, 0x36, 0x54, 0xd3, 0xbd);
117DEFINE_GUID(
CLSID_WineOOPTest, 0x5201163f, 0x8164, 0x4fd0, 0xa1, 0xa2, 0x5d, 0x5a, 0x36, 0x54, 0xd3, 0xbd);
132 LPCLASSFACTORY iface,
142 IClassFactory_AddRef(iface);
164 LPCLASSFACTORY iface,
176 LPCLASSFACTORY iface,
224 if (!pCreateActCtxW)
return NULL;
230 actctx.cbSize =
sizeof(ACTCTXW);
235 "handle == INVALID_HANDLE_VALUE, error %u\n",
GetLastError());
238 win_skip(
"activation context generation failed, some tests will be skipped\n");
242 ok(
actctx.cbSize ==
sizeof(ACTCTXW),
"actctx.cbSize=%d\n",
actctx.cbSize);
245 ok(
actctx.wProcessorArchitecture == 0,
"actctx.wProcessorArchitecture=%d\n",
actctx.wProcessorArchitecture);
247 ok(
actctx.lpAssemblyDirectory ==
NULL,
"actctx.lpAssemblyDirectory=%p\n",
actctx.lpAssemblyDirectory);
248 ok(
actctx.lpResourceName ==
NULL,
"actctx.lpResourceName=%p\n",
actctx.lpResourceName);
249 ok(
actctx.lpApplicationName ==
NULL,
"actctx.lpApplicationName=%p\n",
actctx.lpApplicationName);
264"<assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\">"
265"<assemblyIdentity version=\"1.2.3.4\" name=\"Wine.Test\" type=\"win32\""
266" publicKeyToken=\"6595b6414666f1df\" />"
267"<file name=\"testlib.dll\">"
269" clsid=\"{0000033a-0000-0000-c000-000000000046}\""
270" progid=\"FTMarshal\""
273" clsid=\"{5201163f-8164-4fd0-a1a2-5d5a3654d3bd}\""
274" progid=\"WineOOPTest\""
276" <comClass description=\"Test com class\""
277" clsid=\"{12345678-1234-1234-1234-56789abcdef0}\""
278" progid=\"ProgId.ProgId\""
279" miscStatusIcon=\"recomposeonresize\""
281" <comClass description=\"CustomFont Description\" clsid=\"{0be35203-8f91-11ce-9de3-00aa004bb851}\""
282" progid=\"CustomFont\""
283" miscStatusIcon=\"recomposeonresize\""
284" miscStatusContent=\"insideout\""
286" <comClass description=\"StdFont Description\" clsid=\"{0be35203-8f91-11ce-9de3-00aa004bb852}\""
289" <comClass clsid=\"{62222222-1234-1234-1234-56789abcdef0}\" >"
290" <progid>ProgId.ProgId.1</progid>"
292" <comInterfaceProxyStub "
294" iid=\"{22222222-1234-1234-1234-56789abcdef0}\""
295" proxyStubClsid32=\"{66666666-8888-7777-6666-555555555555}\""
298" <comInterfaceExternalProxyStub "
300" iid=\"{32222222-1234-1234-1234-56789abcdef0}\""
302" <comInterfaceExternalProxyStub "
304" iid=\"{42222222-1234-1234-1234-56789abcdef0}\""
305" proxyStubClsid32=\"{66666666-8888-7777-6666-555555555555}\""
307" <comInterfaceExternalProxyStub "
309" iid=\"{52222222-1234-1234-1234-56789abcdef0}\""
310" proxyStubClsid32=\"{00000000-0000-0000-0000-000000000000}\""
313" clsid=\"{72222222-1234-1234-1234-56789abcdef0}\""
316" <progid>clrprogid.1</progid>"
320DEFINE_GUID(CLSID_Testclass, 0x12345678, 0x1234, 0x1234, 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0);
330 ok(
hr ==
S_OK,
"ProgIDFromCLSID failed with error 0x%08x\n",
hr);
343 ok(
hr ==
E_INVALIDARG,
"ProgIDFromCLSID should return E_INVALIDARG instead of 0x%08x\n",
hr);
347 static const WCHAR customfontW[] = {
'C',
'u',
's',
't',
'o',
'm',
'F',
'o',
'n',
't',0};
362 progid = (
void *)0xdeadbeef;
366 progid = (
void *)0xdeadbeef;
370 pDeactivateActCtx(0,
cookie);
381 ok(
hr ==
S_OK,
"CLSIDFromProgID failed with error 0x%08x\n",
hr);
391 ok(
hr ==
E_INVALIDARG,
"CLSIDFromProgID should have returned E_INVALIDARG instead of 0x%08x\n",
hr);
394 ok(
hr ==
E_INVALIDARG,
"CLSIDFromProgID should have returned E_INVALIDARG instead of 0x%08x\n",
hr);
398 ok(
hr ==
CO_E_CLASSSTRING,
"CLSIDFromProgID on nonexistent ProgID should have returned CO_E_CLASSSTRING instead of 0x%08x\n",
hr);
433 clsid1.Data4[7] = 0x52;
437 pDeactivateActCtx(0,
cookie);
445 WCHAR wszCLSID_Broken[50];
465 wszCLSID_Broken[
i] =
'A';
466 wszCLSID_Broken[
i] =
'\0';
496 wszCLSID_Broken[9] =
'*';
503 wszCLSID_Broken[3] =
'*';
510 wszCLSID_Broken[3] =
'\0';
520 static const WCHAR cfW[] = {
'{',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'1',
'-',
'0',
'0',
'0',
'0',
'-',
'0',
'0',
'0',
'0',
'-',
521 'c',
'0',
'0',
'0',
'-',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'4',
'6',
'}',0};
522 static const WCHAR brokenW[] = {
'{',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'1',
'-',
'0',
'0',
'0',
'0',
'-',
'0',
'0',
'0',
'0',
'-',
523 'g',
'0',
'0',
'0',
'-',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'4',
'6',
'}',0};
524 static const WCHAR broken2W[] = {
'{',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'1',
'=',
'0',
'0',
'0',
'0',
'-',
'0',
'0',
'0',
'0',
'-',
525 'g',
'0',
'0',
'0',
'-',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'4',
'6',
'}',0};
526 static const WCHAR broken3W[] = {
'b',
'r',
'o',
'k',
'e',
'n',
'0',
'0',
'1',
'=',
'0',
'0',
'0',
'0',
'-',
'0',
'0',
'0',
'0',
'-',
527 'g',
'0',
'0',
'0',
'-',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'4',
'6',
'}',0};
535 memset(&iid, 0xab,
sizeof(iid));
545 memset(&iid, 0xab,
sizeof(iid));
548 ok(iid.Data1 == 0xabababab,
"Got %08x\n", iid.Data1);
551 memset(&iid, 0xab,
sizeof(iid));
554 ok(iid.Data1 == 0x00000001,
"Got %08x\n", iid.Data1);
556 memset(&iid, 0xab,
sizeof(iid));
559 ok(iid.Data1 == 0x00000001,
"Got %08x\n", iid.Data1);
562 memset(&iid, 0xab,
sizeof(iid));
565 ok(iid.Data1 == 0xabababab,
"Got %08x\n", iid.Data1);
568 memset(&iid, 0xab,
sizeof(iid));
571 ok(iid.Data1 == 0xabababab,
"Got %08x\n", iid.Data1);
574 memset(&iid, 0xab,
sizeof(iid));
577 ok(iid.Data1 == 0xabababab,
"Got %08x\n", iid.Data1);
588 ok(
len == 0,
"len: %d (expected 0)\n",
len);
593 ok(
len == 39,
"len: %d (expected 39)\n",
len);
598 ok(
len == 39,
"len: %d (expected 39)\n",
len);
602 ok(
len == 0,
"len: %d (expected 0)\n",
len);
605 ok(
len == 0,
"len: %d (expected 0)\n",
len);
608#define test_apt_type(t, q) _test_apt_type(t, q, __LINE__)
615 if (!pCoGetApartmentType)
620 ok_(__FILE__,
line)(
type == expected_type,
"Wrong apartment type %d, expected %d\n",
type, expected_type);
629 REFCLSID rclsid = &CLSID_InternetZoneManager;
634 ok(
pUnk ==
NULL,
"CoCreateInstance should have changed the passed in pointer to NULL, instead of %p\n",
pUnk);
640 ok(
hr ==
REGDB_E_CLASSNOTREG,
"CoCreateInstance for non-registered inproc server should have returned REGDB_E_CLASSNOTREG instead of 0x%08x\n",
hr);
642 ok(
hr ==
REGDB_E_CLASSNOTREG,
"CoCreateInstance for non-registered inproc handler should have returned REGDB_E_CLASSNOTREG instead of 0x%08x\n",
hr);
644 ok(
hr ==
REGDB_E_CLASSNOTREG,
"CoCreateInstance for non-registered local server should have returned REGDB_E_CLASSNOTREG instead of 0x%08x\n",
hr);
646 ok(
hr ==
REGDB_E_CLASSNOTREG,
"CoCreateInstance for non-registered remote server should have returned REGDB_E_CLASSNOTREG instead of 0x%08x\n",
hr);
651 skip(
"IE not installed so can't test CoCreateInstance\n");
672 REFCLSID rclsid = &CLSID_InternetZoneManager;
678 ok(
pUnk ==
NULL,
"CoGetClassObject should have changed the passed in pointer to NULL, instead of %p\n",
pUnk);
683 "CoGetClassObject should have returned E_INVALIDARG instead of 0x%08x\n",
hr);
687 if (!pRegOverridePredefKey)
689 win_skip(
"RegOverridePredefKey not available\n");
698 IUnknown_Release(
pUnk);
702 ok(!
res,
"RegCreateKeyEx returned %d\n",
res);
705 ok(!
res,
"RegOverridePredefKey returned %d\n",
res);
708 ok(
hr ==
S_OK,
"CoGetClassObject should have returned S_OK instead of 0x%08x\n",
hr);
711 ok(!
res,
"RegOverridePredefKey returned %d\n",
res);
719 IUnknown_Release(
pUnk);
726 IUnknown_Release(
pUnk);
728 pDeactivateActCtx(0,
cookie);
737 MULTI_QI qi_res = { &IID_IMoniker };
783 hwndFrame =
CreateWindowA((
LPCSTR)
MAKEINTATOM(
register_dummy_class()),
"Test", 0,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
NULL,
NULL,
NULL,
NULL);
799 IMessageFilter_AddRef(iface);
819 HTASK threadIDCaller,
821 LPINTERFACEINFO lpInterfaceInfo)
823 trace(
"HandleInComingCall\n");
824 return SERVERCALL_ISHANDLED;
829 HTASK threadIDCallee,
833 trace(
"RetryRejectedCall\n");
839 HTASK threadIDCallee,
843 trace(
"MessagePending\n");
846 return PENDINGMSG_WAITNOPROCESS;
868 "CoRegisterMessageFilter should have failed with CO_E_NOT_SUPPORTED instead of 0x%08x\n",
875 "CoRegisterMessageFilter should have failed with CO_E_NOT_SUPPORTED instead of 0x%08x\n",
878 "prev_filter should have been set to %p\n", prev_filter);
889 ok(prev_filter ==
NULL,
"prev_filter should have been set to NULL instead of %p\n", prev_filter);
893 ok(prev_filter ==
NULL,
"prev_filter should have been set to NULL instead of %p\n", prev_filter);
920 ok(0,
"unexpected call\n");
926 ok(0,
"unexpected call\n");
932 ok(0,
"unexpected call\n");
938 ok(0,
"unexpected call\n");
970 IUnknown_AddRef((
IUnknown*)*ppvObj);
1004 IPSFactoryBuffer_AddRef(
This);
1040 ok(pUnkServer == &
Test_Unknown,
"unexpected pUnkServer %p\n", pUnkServer);
1063 {0xa1, 0xa2, 0x5d, 0x5a, 0x36, 0x54, 0xd3, 0xbd}
1090 DWORD dwRegistrationKey;
1128 ok(
hr ==
E_NOTIMPL,
"CoMarshalInterface should have returned E_NOTIMPL instead of 0x%08x\n",
hr);
1142 ok(
hr ==
S_OK,
"CoMarshalInterface should have returned S_OK instead of 0x%08x\n",
hr);
1146 ok(
hr ==
S_OK,
"CoMarshalInterface should have returned S_OK instead of 0x%08x\n",
hr);
1203 "CoGetPSClsid should have returned CO_E_NOTINITIALIZED instead of 0x%08x\n",
1213 "CoGetPSClsid for random IID returned 0x%08x instead of REGDB_E_IIDNOTREG\n",
1218 "CoGetPSClsid for null clsid returned 0x%08x instead of E_INVALIDARG\n",
1221 if (!pRegOverridePredefKey)
1223 win_skip(
"RegOverridePredefKey not available\n");
1232 ok(!
res,
"RegCreateKeyEx returned %d\n",
res);
1235 ok(!
res,
"RegOverridePredefKey returned %d\n",
res);
1241 ok(!
res,
"RegOverridePredefKey returned %d\n",
res);
1279 pDeactivateActCtx(0,
cookie);
1283 if (pRegDeleteKeyExA &&
1287 static GUID IID_DeadBeef = {0xdeadbeef,0xdead,0xbeef,{0xde,0xad,0xbe,0xef,0xde,0xad,0xbe,0xef}};
1288 static const char clsidDeadBeef[] =
"{deadbeef-dead-beef-dead-beefdeadbeef}";
1289 static const char clsidA[] =
"{66666666-8888-7777-6666-555555555555}";
1290 HKEY hkey_iface, hkey_psclsid;
1298 ok(!
res,
"RegCreateKeyEx returned %d\n",
res);
1303 win_skip(
"Failed to create a key, skipping some of CoGetPSClsid() tests\n");
1307 ok(!
res,
"RegCreateKeyEx returned %d\n",
res);
1310 ok(!
res,
"RegCreateKeyEx returned %d\n",
res);
1312 ok(!
res,
"RegSetValueEx returned %d\n",
res);
1319 res = pRegDeleteKeyExA(hkey,
"ProxyStubClsid32", opposite, 0);
1320 ok(!
res,
"RegDeleteKeyEx returned %d\n",
res);
1322 res = pRegDeleteKeyExA(hkey_iface, clsidDeadBeef, opposite, 0);
1323 ok(!
res,
"RegDeleteKeyEx returned %d\n",
res);
1340 ok(
hr ==
E_INVALIDARG,
"CoUnmarshalInterface should have returned E_INVALIDARG instead of 0x%08x\n",
hr);
1352 ok(
hr ==
STG_E_READFAULT,
"CoUnmarshalInterface should have returned STG_E_READFAULT instead of 0x%08x\n",
hr);
1357 ok(
hr ==
E_INVALIDARG,
"CoUnmarshalInterface should have returned E_INVALIDARG instead of 0x%08x\n",
hr);
1359 IStream_Release(pStream);
1388 ok(
hr ==
E_INVALIDARG,
"CoMarshalInterface should have returned E_INVALIDARG instead of 0x%08x\n",
hr);
1391 ok(
hr ==
E_INVALIDARG,
"CoMarshalInterface should have returned E_INVALIDARG instead of 0x%08x\n",
hr);
1398 ok(
hr ==
STG_E_READFAULT,
"CoReleaseMarshalData should have returned STG_E_READFAULT instead of 0x%08x\n",
hr);
1400 hr = IStream_Seek(pStream,
llZero, STREAM_SEEK_SET,
NULL);
1406 IStream_Release(pStream);
1422 ok(
hr ==
E_INVALIDARG,
"CoMarshalInterThreadInterfaceInStream should have returned E_INVALIDARG instead of 0x%08x\n",
hr);
1425 ok(
hr ==
E_INVALIDARG,
"CoMarshalInterThreadInterfaceInStream should have returned E_INVALIDARG instead of 0x%08x\n",
hr);
1437 IClassFactory_Release(pProxy);
1438 IStream_Release(pStream);
1518 ok(
hr ==
REGDB_E_CLASSNOTREG,
"object registered in an apartment shouldn't accessible after it is destroyed\n");
1531 IClassFactory_Release(pcf);
1540 pDeactivateActCtx(0, ctxcookie);
1546 IClassFactory_Release(pcf);
1563 IClassFactory_Release(pcf);
1596 hr = IClassFactory_QueryInterface(pcf, &IID_IMultiQI, (
void **)&pMQI);
1598 IMultiQI_Release(pMQI);
1599 IClassFactory_Release(pcf);
1658 "registered in different thread should return REGDB_E_CLASSNOTREG "
1659 "instead of 0x%08x\n",
hr);
1662 ok(
hr ==
S_OK,
"CoGetClassObject on inproc object registered in same "
1663 "thread should return S_OK instead of 0x%08x\n",
hr);
1670 ok(
hr ==
S_OK,
"CoRegisterClassObject with same CLSID but in different thread should return S_OK instead of 0x%08x\n",
hr);
1694 ok(
hr ==
S_OK,
"CoGetClassObject on local server object "
1695 "registered in different thread should return S_OK "
1696 "instead of 0x%08x\n",
hr);
1699 ok(
hr ==
S_OK,
"CoGetClassObject on local server object registered in same "
1700 "thread should return S_OK instead of 0x%08x\n",
hr);
1708 "thread to where registered should return RPC_E_WRONG_THREAD instead of 0x%08x\n",
hr);
1715 ok(
hr ==
S_OK,
"CoRegisterClassObject with same CLSID but in different "
1716 "thread should return S_OK instead of 0x%08x\n",
hr);
1749 skip(
"IE not installed so can't run CoFreeUnusedLibraries test\n");
1759 "Expected a valid pointer\n");
1761 IUnknown_Release(
pUnk);
1789 if (!pCoGetObjectContext)
1791 win_skip(
"CoGetObjectContext not present\n");
1795 hr = pCoGetObjectContext(&IID_IComThreadingInfo, (
void **)&pComThreadingInfo);
1797 ok(pComThreadingInfo ==
NULL,
"pComThreadingInfo should have been set to NULL\n");
1803 hr = pCoGetObjectContext(&IID_IComThreadingInfo, (
void **)&pComThreadingInfo);
1806 threadinginfo2 =
NULL;
1807 hr = pCoGetObjectContext(&IID_IComThreadingInfo, (
void **)&threadinginfo2);
1808 ok(
hr ==
S_OK,
"Expected S_OK, got 0x%08x\n",
hr);
1809 ok(pComThreadingInfo == threadinginfo2,
"got different instance\n");
1810 IComThreadingInfo_Release(threadinginfo2);
1812 hr = IComThreadingInfo_GetCurrentLogicalThreadId(pComThreadingInfo,
NULL);
1816 hr = IComThreadingInfo_GetCurrentLogicalThreadId(pComThreadingInfo, &
id);
1822 hr = IComThreadingInfo_GetCurrentApartmentType(pComThreadingInfo, &apttype);
1824 ok(apttype ==
APTTYPE_MAINSTA,
"apartment type should be APTTYPE_MAINSTA instead of %d\n", apttype);
1826 hr = IComThreadingInfo_GetCurrentThreadType(pComThreadingInfo, &thdtype);
1830 refs = IComThreadingInfo_Release(pComThreadingInfo);
1831 ok(refs == 0,
"pComThreadingInfo should have 0 refs instead of %d refs\n", refs);
1833 hr = pCoGetObjectContext(&IID_IContextCallback, (
void **)&pContextCallback);
1836 refs = IContextCallback_Release(pContextCallback);
1837 ok(refs == 0,
"pContextCallback should have 0 refs instead of %d refs\n", refs);
1843 hr = pCoGetObjectContext(&IID_IComThreadingInfo, (
void **)&pComThreadingInfo);
1846 hr = IComThreadingInfo_GetCurrentApartmentType(pComThreadingInfo, &apttype);
1848 ok(apttype ==
APTTYPE_MTA,
"apartment type should be APTTYPE_MTA instead of %d\n", apttype);
1850 hr = IComThreadingInfo_GetCurrentThreadType(pComThreadingInfo, &thdtype);
1854 refs = IComThreadingInfo_Release(pComThreadingInfo);
1855 ok(refs == 0,
"pComThreadingInfo should have 0 refs instead of %d refs\n", refs);
1857 hr = pCoGetObjectContext(&IID_IContextCallback, (
void **)&pContextCallback);
1860 refs = IContextCallback_Release(pContextCallback);
1861 ok(refs == 0,
"pContextCallback should have 0 refs instead of %d refs\n", refs);
1863 hr = pCoGetObjectContext(&IID_IObjContext, (
void **)&pObjContext);
1866 refs = IObjContext_Release(pObjContext);
1867 ok(refs == 0,
"pObjContext should have 0 refs instead of %d refs\n", refs);
1892 IUnknown_AddRef(iface);
1929 if (!pCoSwitchCallContext)
1931 skip(
"CoSwitchCallContext not present\n");
1948 refs = IUnknown_AddRef(&
test_object->IUnknown_iface);
1949 ok(refs == 2,
"Expected refcount 2, got %d\n", refs);
1957 refs = IUnknown_AddRef(&
test_object->IUnknown_iface);
1958 ok(refs == 3,
"Expected refcount 3, got %d\n", refs);
1960 IUnknown_Release(
pUnk);
1967 refs = IUnknown_AddRef(&
test_object->IUnknown_iface);
1968 ok(refs == 2,
"Expected refcount 2, got %d\n", refs);
1986 if (!pCoGetContextToken)
1988 win_skip(
"CoGetContextToken not present\n");
1993 hr = pCoGetContextToken(&
token);
1995 ok(
token == 0xdeadbeef,
"Expected 0, got 0x%lx\n",
token);
2003 hr = pCoGetContextToken(
NULL);
2007 hr = pCoGetContextToken(&
token);
2008 ok(
hr ==
S_OK,
"Expected S_OK, got 0x%08x\n",
hr);
2009 ok(
token,
"Expected token != 0\n");
2012 hr = pCoGetContextToken(&token2);
2013 ok(
hr ==
S_OK,
"Expected S_OK, got 0x%08x\n",
hr);
2014 ok(token2 ==
token,
"got different token\n");
2017 ok(refs == 1,
"Expected 1, got %u\n", refs);
2019 hr = pCoGetObjectContext(&IID_IObjContext, (
void **)&
ctx);
2020 ok(
hr ==
S_OK,
"Expected S_OK, got 0x%08x\n",
hr);
2023 refs = IObjContext_AddRef(
ctx);
2024 ok(refs == 3,
"Expected 3, got %u\n", refs);
2026 refs = IObjContext_Release(
ctx);
2027 ok(refs == 2,
"Expected 2, got %u\n", refs);
2030 ok(refs == 1,
"Expected 1, got %u\n", refs);
2034 hr = pCoGetContextToken(&
token);
2035 ok(
hr ==
S_OK,
"Expected S_OK, got 0x%08x\n",
hr);
2036 ok(
token,
"Expected token != 0\n");
2039 refs = IObjContext_AddRef(
ctx);
2040 ok(refs == 2,
"Expected 1, got %u\n", refs);
2042 refs = IObjContext_Release(
ctx);
2043 ok(refs == 1,
"Expected 0, got %u\n", refs);
2045 refs = IObjContext_Release(
ctx);
2046 ok(refs == 0,
"Expected 0, got %u\n", refs);
2055 static GUID deadbeef = {0xdeadbeef,0xdead,0xbeef,{0xde,0xad,0xbe,0xef,0xde,0xad,0xbe,0xef}};
2056 static const char deadbeefA[] =
"{DEADBEEF-DEAD-BEEF-DEAD-BEEFDEADBEEF}";
2058 HKEY clsidkey, deadbeefkey;
2061 if (!pCoGetTreatAsClass)
2063 win_skip(
"CoGetTreatAsClass not present\n");
2067 hr = pCoGetTreatAsClass(&deadbeef,&
out);
2075 hr = pCoGetTreatAsClass(&deadbeef,
NULL);
2079 ok(!lr,
"Couldn't open CLSID key, error %d\n", lr);
2083 win_skip(
"CoGetTreatAsClass() tests will be skipped (failed to create a test key, error %d)\n", lr);
2088 hr = pCoTreatAsClass(&deadbeef, &deadbeef);
2091 hr = pCoTreatAsClass(&deadbeef, &CLSID_FileProtocol);
2093 win_skip(
"Insufficient privileges to use CoTreatAsClass\n");
2096 ok(
hr ==
S_OK,
"CoTreatAsClass failed: %08x\n",
hr);
2098 hr = pCoGetTreatAsClass(&deadbeef, &
out);
2099 ok(
hr ==
S_OK,
"CoGetTreatAsClass failed: %08x\n",
hr);
2100 ok(
IsEqualGUID(&
out, &CLSID_FileProtocol),
"expected to get substituted clsid\n");
2107 win_skip(
"IE not installed so can't test CoCreateInstance\n");
2111 ok(
hr ==
S_OK,
"CoCreateInstance failed: %08x\n",
hr);
2113 IInternetProtocol_Release(pIP);
2118 ok(
hr ==
S_OK,
"CoTreatAsClass failed: %08x\n",
hr);
2120 hr = pCoGetTreatAsClass(&deadbeef, &
out);
2131 IInternetProtocol_Release(pIP);
2145 ok(
hr ==
S_OK,
"CoInitializeEx failed with error 0x%08x\n",
hr);
2150 ok(
hr ==
S_OK,
"OleInitialize failed with error 0x%08x\n",
hr);
2166 REFCLSID rclsid = &CLSID_InternetZoneManager;
2170 ok(
hr ==
S_OK,
"CoInitializeEx(COINIT_MULTITHREADED) failed with error 0x%08x\n",
hr);
2178 ok(
hr ==
S_OK,
"CoCreateInstance should have returned 0x%08x instead of 0x%08x\n",
S_OK,
hr);
2185 ok(
hr ==
S_OK,
"CoInitialize() failed with error 0x%08x\n",
hr);
2188 ok(
hr ==
S_OK,
"OleInitialize should have returned 0x%08x instead of 0x%08x\n",
S_OK,
hr);
2195 ok(
hr ==
S_OK,
"CoCreateInstance should have returned 0x%08x instead of 0x%08x\n",
S_OK,
hr);
2207 ok(
hr ==
S_OK,
"CoInitialize() failed with error 0x%08x\n",
hr);
2210 ok(
hr ==
S_OK,
"OleInitialize should have returned 0x%08x instead of 0x%08x\n",
S_OK,
hr);
2222 ok(
hr ==
S_FALSE,
"OleInitialize should have returned 0x%08x instead of 0x%08x\n",
S_FALSE,
hr);
2268 pDeactivateActCtx(0,
cookie);
2275 static const WCHAR stdfont_usertypeW[] = {
'S',
't',
'a',
'n',
'd',
'a',
'r',
'd',
' ',
'F',
'o',
'n',
't',0};
2276 static const WCHAR stdfont2_usertypeW[] = {
'C',
'L',
'S',
'I',
'D',
'_',
'S',
't',
'd',
'F',
'o',
'n',
't',0};
2277 static const WCHAR clsidkeyW[] = {
'C',
'L',
'S',
'I',
'D',0};
2278 static const WCHAR defvalueW[] = {
'D',
'e',
'f',
'a',
'u',
'l',
't',
' ',
'N',
'a',
'm',
'e',0};
2279 static const WCHAR auxvalue0W[] = {
'A',
'u',
'x',
' ',
'N',
'a',
'm',
'e',
' ',
'0',0};
2280 static const WCHAR auxvalue2W[] = {
'A',
'u',
'x',
' ',
'N',
'a',
'm',
'e',
' ',
'2',0};
2281 static const WCHAR auxvalue3W[] = {
'A',
'u',
'x',
' ',
'N',
'a',
'm',
'e',
' ',
'3',0};
2282 static const WCHAR auxvalue4W[] = {
'A',
'u',
'x',
' ',
'N',
'a',
'm',
'e',
' ',
'4',0};
2284 static const char auxvalues[][16] = {
2292 HKEY clsidhkey, hkey, auxhkey, classkey;
2301 for (
form = 0;
form <= USERCLASSTYPE_APPNAME+1;
form++) {
2305 str = (
void*)0xdeadbeef;
2321 for (
form = 0;
form <= USERCLASSTYPE_APPNAME+1;
form++) {
2322 str = (
void*)0xdeadbeef;
2336 pDeactivateActCtx(0,
cookie);
2353 win_skip(
"Failed to create test key, skipping some of OleRegGetUserType() tests.\n");
2357 ok(!
ret,
"failed to create a key, error %d\n",
ret);
2366 for (
i = 0;
i <= 4;
i++) {
2415 for (
i = 0;
i <= 4;
i++)
2485#define cowait_msgs_expect_empty() _cowait_msgs_expect_empty(__LINE__)
2495#define cowait_msgs_expect_notified(a) _cowait_msgs_expect_notified(__LINE__,a)
2499 ok_(__FILE__,
line)(0,
"expected message %u, received none\n", expected_msg);
2502 "expected message %u, received %u \n",
2508#define cowait_msgs_expect_queued(a,b) _cowait_msgs_expect_queued(__LINE__,a,b)
2517 ok_(__FILE__,
line)(
msg.message == expected_msg,
"unexpected message %u, expected %u\n",
2518 msg.message, expected_msg);
2551 ok(
hr ==
S_OK,
"CoUnmarshalInterface failed: %08x\n",
hr);
2554 ok(
hr ==
S_OK,
"QueryInterface failed: %08x\n",
hr);
2556 IEnumOLEVERB_Release(enum_verb);
2557 IUnknown_Release(unk);
2576 ok(
hr ==
S_OK,
"CoInitializeEx failed with error 0x%08x\n",
hr);
2578 hWnd =
CreateWindowExA(0,
cls_name,
"Test (thread)",
WS_TILEDWINDOW, 0, 0, 640, 480, 0, 0, 0, 0);
2587 ok(!
success,
"CoWaitForMultipleHandles didn't pump any messages\n");
2595 ok(
success,
"CoWaitForMultipleHandles unexpectedly pumped messages\n");
2612 ok(
success,
"CoWaitForMultipleHandles unexpectedly pumped messages\n");
2618 ok(
hr ==
S_OK,
"CoInitializeEx failed with error 0x%08x\n",
hr);
2621 ok(
hr ==
S_OK,
"CreateStreamOnHGlobal failed: %08x\n",
hr);
2624 ok(
hr ==
S_OK,
"CoMarshalInterface should have returned S_OK instead of 0x%08x\n",
hr);
2632 ok(
hr ==
S_OK,
"CoRegisterMessageFilter failed: %08x\n",
hr);
2643 ok(
hr ==
S_OK,
"CoRegisterMessageFilter failed: %08x\n",
hr);
2663 ok(
hr ==
S_OK,
"CoInitializeEx failed with error 0x%08x\n",
hr);
2665 memset(&wc, 0,
sizeof(wc));
2676 hWnd =
CreateWindowExA(0,
cls_name,
"Test",
WS_TILEDWINDOW, 0, 0, 640, 480, 0, 0, 0, 0);
2689 ok(
success,
"CoWaitForMultipleHandles unexpectedly pumped messages\n");
2697 ok(
success,
"CoWaitForMultipleHandles unexpectedly pumped messages\n");
2705 ok(
success,
"CoWaitForMultipleHandles unexpectedly pumped messages\n");
2710 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
2713 ok(
success,
"CoWaitForMultipleHandles unexpectedly pumped messages\n");
2718 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
2721 ok(
success,
"CoWaitForMultipleHandles unexpectedly pumped messages\n");
2729 ok(!
success,
"CoWaitForMultipleHandles didn't pump any messages\n");
2740 ok(!
success,
"CoWaitForMultipleHandles didn't pump any messages\n");
2752 ok(!
success,
"CoWaitForMultipleHandles didn't pump any messages\n");
2765 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
2768 ok(
success,
"CoWaitForMultipleHandles unexpectedly pumped messages\n");
2776 ok(!
success,
"CoWaitForMultipleHandles didn't pump any messages\n");
2786 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
2789 ok(
success,
"CoWaitForMultipleHandles unexpectedly pumped messages\n");
2794 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
2797 ok(
success,
"CoWaitForMultipleHandles unexpectedly pumped messages\n");
2805 ok(!
success,
"CoWaitForMultipleHandles didn't pump any messages\n");
2812 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
2815 ok(
success,
"CoWaitForMultipleHandles unexpectedly pumped messages\n");
2822 ok(
success,
"PeekMessageA returned FALSE\n");
2827 ok(!
success,
"CoWaitForMultipleHandles didn't pump any messages\n");
2832 ok(
success,
"PeekMessageA returned FALSE\n");
2837 "expected RPC_S_CALLPENDING, got 0x%08x\n",
hr);
2842 "CoWaitForMultipleHandles didn't pump any messages\n");
2876 ok(
msg.message ==
WM_QUIT,
"expected msg.message = WM_QUIT, got %u\n",
msg.message);
2877 ok(
msg.wParam == 40,
"expected msg.wParam = 40, got %lu\n",
msg.wParam);
2879 ok(!
success,
"PeekMessageA succeeded\n");
2916 ok(!
success,
"PeekMessageA succeeded\n");
2923 ok(
msg.message ==
WM_QUIT,
"expected msg.message = WM_QUIT, got %u\n",
msg.message);
2924 ok(
msg.wParam == 41,
"expected msg.wParam = 41, got %lu\n",
msg.wParam);
2939 ok(!
success,
"CoWaitForMultipleHandles didn't pump all WM_DDE_FIRST messages\n");
2943 ok(
msg.message ==
WM_QUIT,
"expected msg.message = WM_QUIT, got %u\n",
msg.message);
2944 ok(
msg.wParam == 42,
"expected msg.wParam = 42, got %lu\n",
msg.wParam);
2954 win_skip(
"PostQuitMessage didn't queue a WM_QUIT message, skipping tests\n");
2957 ok(
msg.message ==
WM_QUIT,
"expected msg.message = WM_QUIT, got %u\n",
msg.message);
2958 ok(
msg.wParam == 43,
"expected msg.wParam = 43, got %lu\n",
msg.wParam);
2960 ok(!
success,
"PeekMessageA succeeded\n");
2973 ok(!
success,
"PeekMessageA succeeded\n");
2975 ok(!
success,
"CoWaitForMultipleHandles didn't remove WM_QUIT messages\n");
2991 ok(!
success,
"PeekMessageA succeeded\n");
2993 ok(!
success,
"CoWaitForMultipleHandles didn't remove WM_QUIT messages\n");
3045 imalloc = (
void*)0xdeadbeef;
3048 ok(imalloc ==
NULL,
"got %p\n", imalloc);
3050 imalloc = (
void*)0xdeadbeef;
3053 ok(imalloc ==
NULL,
"got %p\n", imalloc);
3055 imalloc = (
void*)0xdeadbeef;
3058 ok(imalloc ==
NULL,
"got %p\n", imalloc);
3060 imalloc = (
void*)0xdeadbeef;
3063 ok(imalloc ==
NULL,
"got %p\n", imalloc);
3065 imalloc = (
void*)0xdeadbeef;
3068 ok(imalloc ==
NULL,
"got %p\n", imalloc);
3073 ok(imalloc !=
NULL,
"got %p\n", imalloc);
3074 IMalloc_Release(imalloc);
3083 if (!pCoGetApartmentType)
3085 win_skip(
"CoGetApartmentType not present\n");
3095 ok(
type == 0xdeadbeef,
"Expected 0xdeadbeef, got %u\n",
type);
3106 ok(
type == APTTYPE_CURRENT,
"Expected APTTYPE_CURRENT, got %u\n",
type);
3112 ok(
hr ==
S_OK,
"CoInitializeEx failed, error: 0x%08x\n",
hr);
3114 ok(
hr ==
S_OK,
"CoGetApartmentType failed, error: 0x%08x\n",
hr);
3122 ok(
hr ==
S_OK,
"CoInitializeEx failed, error: 0x%08x\n",
hr);
3124 ok(
hr ==
S_OK,
"CoGetApartmentType failed, error: 0x%08x\n",
hr);
3135 IMallocSpy_AddRef(iface);
3154 ok(0,
"unexpected call\n");
3160 ok(0,
"unexpected call\n");
3166 ok(0,
"unexpected call\n");
3172 ok(0,
"unexpected call\n");
3177 ok(0,
"unexpected call\n");
3183 ok(0,
"unexpected call\n");
3189 ok(0,
"unexpected call\n");
3195 ok(0,
"unexpected call\n");
3201 ok(0,
"unexpected call\n");
3207 ok(0,
"unexpected call\n");
3213 ok(0,
"unexpected call\n");
3218 ok(0,
"unexpected call\n");
3265 ok(imalloc !=
NULL,
"got %p\n", imalloc);
3267 IMalloc_Free(imalloc,
NULL);
3269 IMalloc_Release(imalloc);
3297 IInitializeSpy_AddRef(iface);
3377 ok(
hr ==
S_OK,
"Failed to initialize COM, hr %#x.\n",
hr);
3393 ok(
hr ==
S_OK,
"CoInitializeEx failed: %#x\n",
hr);
3464 ok(
hr ==
S_FALSE,
"Failed to initialize COM, hr %#x.\n",
hr);
3492 ok(
hr ==
S_OK,
"Failed to initialize COM, hr %#x.\n",
hr);
3508 IUnknown_AddRef(iface);
3515 IUnknown_AddRef(iface);
3539 ok(0,
"unexpected call\n");
3545 ok(0,
"unexpected call\n");
3561 ok(0,
"unexpected call\n");
3567 ok(0,
"unexpected call\n");
3589 IClassFactory_AddRef(iface);
3622 ok(0,
"unexpected call\n");
3638 static const WCHAR filenameW[] = {
'd',
'u',
'm',
'm',
'y',
'p',
'a',
't',
'h',0};
3654 ok(mqi[0].pItf ==
NULL,
"got %p\n", mqi[0].pItf);
3663 ok(mqi[0].pItf ==
NULL,
"got %p\n", mqi[0].pItf);
3671 mqi[0].pItf = (
void*)0xdeadbeef;
3676 ok(mqi[0].pItf == (
void*)0xdeadbeef,
"got %p\n", mqi[0].pItf);
3678 ok(mqi[0].
hr ==
S_OK,
"got 0x%08x\n", mqi[0].
hr);
3681 mqi[0].pItf = (
void*)0xdeadbeef;
3686 ok(mqi[0].pItf == (
void*)0xdeadbeef,
"got %p\n", mqi[0].pItf);
3694 ok(mqi[0].pItf !=
NULL,
"got %p\n", mqi[0].pItf);
3695 ok(mqi[0].
hr ==
S_OK,
"got 0x%08x\n", mqi[0].
hr);
3702 ok(mqi[0].pItf !=
NULL,
"got %p\n", mqi[0].pItf);
3703 ok(mqi[0].
hr ==
S_OK,
"got 0x%08x\n", mqi[0].
hr);
3711 ok(mqi[0].pItf !=
NULL,
"got %p\n", mqi[0].pItf);
3712 ok(mqi[0].
hr ==
S_OK,
"got 0x%08x\n", mqi[0].
hr);
3723 ok(
hr == 0x8000efef,
"got 0x%08x\n",
hr);
3724 ok(mqi[0].pItf ==
NULL,
"got %p\n", mqi[0].pItf);
3725 ok(mqi[0].
hr == 0x8000efef,
"got 0x%08x\n", mqi[0].
hr);
3726 ok(mqi[1].pItf ==
NULL,
"got %p\n", mqi[1].pItf);
3727 ok(mqi[1].
hr == 0x8000efef,
"got 0x%08x\n", mqi[1].
hr);
3738 ok(
hr == 0x8000fefe,
"got 0x%08x\n",
hr);
3739 ok(mqi[0].pItf ==
NULL,
"got %p\n", mqi[0].pItf);
3740 ok(mqi[0].
hr == 0x8000fefe,
"got 0x%08x\n", mqi[0].
hr);
3741 ok(mqi[1].pItf ==
NULL,
"got %p\n", mqi[1].pItf);
3742 ok(mqi[1].
hr == 0x8000fefe,
"got 0x%08x\n", mqi[1].
hr);
3763 win_skip(
"CLSID_GlobalOptions not available\n");
3783 pCoGetObjectContext = (
void*)
GetProcAddress(hOle32,
"CoGetObjectContext");
3784 pCoSwitchCallContext = (
void*)
GetProcAddress(hOle32,
"CoSwitchCallContext");
3785 pCoGetTreatAsClass = (
void*)
GetProcAddress(hOle32,
"CoGetTreatAsClass");
3786 pCoTreatAsClass = (
void*)
GetProcAddress(hOle32,
"CoTreatAsClass");
3787 pCoGetContextToken = (
void*)
GetProcAddress(hOle32,
"CoGetContextToken");
3788 pCoGetApartmentType = (
void*)
GetProcAddress(hOle32,
"CoGetApartmentType");
3789 pRegDeleteKeyExA = (
void*)
GetProcAddress(hAdvapi32,
"RegDeleteKeyExA");
3790 pRegOverridePredefKey = (
void*)
GetProcAddress(hAdvapi32,
"RegOverridePredefKey");
3791 pCoInitializeEx = (
void*)
GetProcAddress(hOle32,
"CoInitializeEx");
3813 IUnknown_Release(unk);
3817 IUnknown_Release(unk);
3821 IComThreadingInfo_Release(threading_info);
3869 if (!pCoInitializeEx)
3871 trace(
"You need DCOM95 installed to run this test\n");
3875 if (!pCreateActCtxW)
3876 win_skip(
"Activation contexts are not supported, some tests will be skipped.\n");
#define CO_E_NOTINITIALIZED
ACPI_SIZE strlen(const char *String)
static const struct optioninfo global_options[]
static DWORD const LPVOID const lpReserved
#define InterlockedIncrement
#define InterlockedDecrement
const GUID IID_IClassFactory
#define RegCloseKey(hKey)
const CLSID CLSID_GlobalOptions
const CLSID CLSID_InProcFreeMarshaler
static const WCHAR clsidW[]
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
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)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegDeleteKeyW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey)
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 ERROR_MOD_NOT_FOUND
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
#define GetCurrentProcess()
#define HeapFree(x, y, z)
#define FILE_ATTRIBUTE_NORMAL
#define MultiByteToWideChar
#define ERROR_ACCESS_DENIED
static void cleanup(void)
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
DWORD WINAPI GetFullPathNameW(IN LPCWSTR lpFileName, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart)
DWORD WINAPI QueueUserAPC(IN PAPCFUNC pfnAPC, IN HANDLE hThread, IN ULONG_PTR dwData)
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 GetExitCodeThread(IN HANDLE hThread, OUT LPDWORD lpExitCode)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
HRESULT WINAPI CoGetPSClsid(REFIID riid, CLSID *pclsid)
HRESULT WINAPI CoRegisterClassObject(REFCLSID rclsid, LPUNKNOWN pUnk, DWORD dwClsContext, DWORD flags, LPDWORD lpdwRegister)
HRESULT WINAPI CoRegisterMessageFilter(LPMESSAGEFILTER lpMessageFilter, LPMESSAGEFILTER *lplpMessageFilter)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI IIDFromString(LPCOLESTR s, IID *iid)
HRESULT WINAPI CoRegisterInitializeSpy(IInitializeSpy *spy, ULARGE_INTEGER *cookie)
HRESULT WINAPI CoDisconnectObject(LPUNKNOWN lpUnk, DWORD reserved)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstanceEx(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, COSERVERINFO *pServerInfo, ULONG cmq, MULTI_QI *pResults)
HRESULT WINAPI CoGetContextToken(ULONG_PTR *token)
HRESULT WINAPI CoWaitForMultipleHandles(DWORD dwFlags, DWORD dwTimeout, ULONG cHandles, LPHANDLE pHandles, LPDWORD lpdwindex)
HRESULT WINAPI DECLSPEC_HOTPATCH CoRevokeClassObject(DWORD dwRegister)
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
HRESULT WINAPI CoCreateGuid(GUID *pguid)
void WINAPI DECLSPEC_HOTPATCH CoFreeUnusedLibraries(void)
HRESULT WINAPI DECLSPEC_HOTPATCH CLSIDFromProgID(LPCOLESTR progid, LPCLSID clsid)
HRESULT WINAPI CoGetCallContext(REFIID riid, void **ppv)
HRESULT WINAPI CoGetObjectContext(REFIID riid, void **ppv)
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 CLSIDFromString(LPCOLESTR idstr, LPCLSID id)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HRESULT WINAPI DECLSPEC_HOTPATCH CoGetInstanceFromFile(COSERVERINFO *server_info, CLSID *rclsid, IUnknown *outer, DWORD cls_context, DWORD grfmode, OLECHAR *filename, DWORD count, MULTI_QI *results)
HRESULT WINAPI CoLockObjectExternal(LPUNKNOWN pUnk, BOOL fLock, BOOL fLastUnlockReleases)
HRESULT WINAPI CoRevokeInitializeSpy(ULARGE_INTEGER cookie)
HRESULT WINAPI DECLSPEC_HOTPATCH ProgIDFromCLSID(REFCLSID clsid, LPOLESTR *ppszProgID)
HRESULT WINAPI CoGetCurrentLogicalThreadId(GUID *id)
INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax)
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
HRESULT WINAPI CoMarshalInterThreadInterfaceInStream(REFIID riid, LPUNKNOWN pUnk, LPSTREAM *ppStm)
HRESULT WINAPI CoGetInterfaceAndReleaseStream(LPSTREAM pStm, REFIID riid, LPVOID *ppv)
HRESULT WINAPI CoReleaseMarshalData(IStream *pStream)
HRESULT WINAPI CoUnmarshalInterface(IStream *pStream, REFIID riid, LPVOID *ppv)
HRESULT WINAPI CoMarshalInterface(IStream *pStream, REFIID riid, IUnknown *pUnk, DWORD dwDestContext, void *pvDestContext, DWORD mshlFlags)
HRESULT WINAPI OleRegGetUserType(REFCLSID clsid, DWORD form, LPOLESTR *usertype)
HRESULT WINAPI DECLSPEC_HOTPATCH OleInitialize(LPVOID reserved)
void WINAPI DECLSPEC_HOTPATCH OleUninitialize(void)
HRESULT WINAPI OleRegGetMiscStatus(REFCLSID clsid, DWORD dwAspect, DWORD *pdwStatus)
HRESULT WINAPI OleSetMenuDescriptor(HOLEMENU hOleMenu, HWND hwndFrame, HWND hwndActiveObject, LPOLEINPLACEFRAME lpFrame, LPOLEINPLACEACTIVEOBJECT lpActiveObject)
static const BOOL is_win64
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
GLuint GLuint GLsizei GLenum type
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
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 * u
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 token
HRESULT WINAPI CoRevokeMallocSpy(void)
VOID WINAPI CoTaskMemFree(LPVOID ptr)
HRESULT WINAPI CoRegisterMallocSpy(LPMALLOCSPY pMallocSpy)
HRESULT WINAPI CoGetMalloc(DWORD context, IMalloc **imalloc)
#define sprintf(buf, format,...)
static const WCHAR filenameW[]
static void test_object(void)
static HMODULE MODULEINFO DWORD cb
static HINSTANCE hkernel32
#define ok_more_than_one_lock()
static const GUID IID_Testiface
static IUnknown ** ppOldObject
static IID create_instance_iid
static int WINAPI testspy_PostDidAlloc(IMallocSpy *iface, void *ptr, BOOL spyed, int actual)
static ULONG WINAPI Test_CallContext_AddRef(IUnknown *iface)
static void test_CoInitializeEx(void)
static void test_CoMarshalInterThreadInterfaceInStream(void)
static HRESULT WINAPI getinstance_cf_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **obj)
static ATOM register_dummy_class(void)
static LRESULT CALLBACK cowait_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static void test_CoRegisterMessageFilter(void)
static void test_CoGetInstanceFromFile(void)
static void *WINAPI testspy_PreGetSize(IMallocSpy *iface, void *ptr, BOOL spyed)
static DWORD CALLBACK send_message_thread(LPVOID arg)
static ULONG WINAPI testspy_AddRef(IMallocSpy *iface)
static HRESULT WINAPI testinitialize_QI(IInitializeSpy *iface, REFIID riid, void **obj)
static HRESULT WINAPI EnumOLEVERB_Next(IEnumOLEVERB *iface, ULONG celt, OLEVERB *rgelt, ULONG *fetched)
static IPersistFile testpersistfile
static ULONG WINAPI PSFactoryBuffer_AddRef(IPSFactoryBuffer *This)
static void test_CoGetClassObject(void)
#define test_apt_type(t, q)
static HRESULT WINAPI testinitialize_PreUninitialize(IInitializeSpy *iface, DWORD aptrefs)
static HRESULT WINAPI PSFactoryBuffer_QueryInterface(IPSFactoryBuffer *This, REFIID riid, void **ppvObject)
static void test_ole_menu(void)
static void WINAPI testspy_PreHeapMinimize(IMallocSpy *iface)
static DWORD CALLBACK get_class_object_proxy_thread(LPVOID pv)
static ULONG WINAPI MessageFilter_AddRef(IMessageFilter *iface)
static DWORD CALLBACK register_ps_clsid_thread(void *context)
static void test_registered_object_thread_affinity(void)
static HRESULT WINAPI EnumOLEVERB_QueryInterface(IEnumOLEVERB *iface, REFIID riid, void **ppv)
static HRESULT WINAPI testinstance_QI(IPersistFile *iface, REFIID riid, void **obj)
static const char actctx_manifest[]
static const CLSID CLSID_WineTestPSFactoryBuffer
static ULONG WINAPI EnumOLEVERB_AddRef(IEnumOLEVERB *iface)
static APTTYPEQUALIFIER * qualifier
static void test_CoGetApartmentType(void)
static void cowait_msgs_reset(void)
static void test_implicit_mta(void)
static HRESULT WINAPI Test_IClassFactory_QueryInterface(LPCLASSFACTORY iface, REFIID riid, LPVOID *ppvObj)
static const IMallocSpyVtbl testspyvtbl
static DWORD expected_coinit_flags
static DWORD CALLBACK free_libraries_thread(LPVOID p)
#define CHECK_CALLED(func, n)
static UINT cowait_msgs[100]
#define ok_ole_success(hr, func)
static HRESULT WINAPI PSFactoryBuffer_CreateProxy(IPSFactoryBuffer *This, IUnknown *pUnkOuter, REFIID riid, IRpcProxyBuffer **ppProxy, void **ppv)
static Test_CallContext * impl_from_IUnknown(IUnknown *iface)
static DWORD CALLBACK send_and_post_user_message_thread(void *arg)
static HRESULT WINAPI testinstance_Save(IPersistFile *iface, LPCOLESTR filename, BOOL remember)
static IUnknown Test_Unknown
static HRESULT WINAPI getinstance_cf_QI(IClassFactory *iface, REFIID riid, void **obj)
static void CALLBACK apc_test_proc(ULONG_PTR param)
static HRESULT WINAPI testinitialize_PostInitialize(IInitializeSpy *iface, HRESULT hr, DWORD coinit, DWORD aptrefs)
static const IInitializeSpyVtbl testinitializevtbl
static IClassFactory Test_ClassFactory
static const WCHAR stdfont[]
static HRESULT WINAPI Test_IUnknown_QueryInterface(IUnknown *iface, REFIID riid, LPVOID *ppvObj)
static void test_OleRegGetUserType(void)
static const char cls_name[]
static void test_TreatAsClass(void)
static DWORD CALLBACK register_class_object_thread(LPVOID pv)
static void test_CoCreateInstance(void)
#define CHECK_EXPECT(func)
static void test_GlobalOptions(void)
static ULONG WINAPI testinstance_Release(IPersistFile *iface)
static const GUID IID_Testiface4
static HRESULT WINAPI Test_IClassFactory_LockServer(LPCLASSFACTORY iface, BOOL fLock)
static ULONG WINAPI Test_CallContext_Release(IUnknown *iface)
static ULONG WINAPI testinitialize_Release(IInitializeSpy *iface)
#define DEFINE_EXPECT(func)
static ULONG WINAPI getinstance_cf_Release(IClassFactory *iface)
static HANDLE activate_context(const char *manifest, ULONG_PTR *cookie)
static SIZE_T WINAPI testspy_PostGetSize(IMallocSpy *iface, SIZE_T actual, BOOL spyed)
static DWORD CALLBACK revoke_class_object_thread(LPVOID pv)
static const WCHAR progidW[]
static ULONG WINAPI MessageFilter_Release(IMessageFilter *iface)
static HRESULT g_persistfile_qi_ret
static IMallocSpy testspy
static DWORD CALLBACK get_class_object_thread(LPVOID pv)
static void test_CoGetInterfaceAndReleaseStream(void)
static HRESULT WINAPI testinstance_GetCurFile(IPersistFile *iface, LPOLESTR *filename)
static const CLSID CLSID_non_existent
static void test_IInitializeSpy(BOOL mt)
static HRESULT WINAPI getinstance_cf_LockServer(IClassFactory *iface, BOOL lock)
static const IUnknownVtbl TestCallContext_Vtbl
static HRESULT WINAPI testinstance_SaveCompleted(IPersistFile *iface, LPCOLESTR filename)
static ULONG WINAPI EnumOLEVERB_Release(IEnumOLEVERB *iface)
static HRESULT WINAPI Test_IClassFactory_CreateInstance(LPCLASSFACTORY iface, IUnknown *pUnkOuter, REFIID riid, LPVOID *ppvObj)
static DWORD WINAPI MessageFilter_RetryRejectedCall(IMessageFilter *iface, HTASK threadIDCallee, DWORD dwTickCount, DWORD dwRejectType)
static void test_CoRegisterClassObject(void)
static HRESULT WINAPI EnumOLEVERB_Reset(IEnumOLEVERB *iface)
static SIZE_T WINAPI testspy_PreAlloc(IMallocSpy *iface, SIZE_T cb)
static ULONG WINAPI Test_IUnknown_Release(IUnknown *iface)
static IEnumOLEVERB EnumOLEVERB
static void test_CoFreeUnusedLibraries(void)
#define cowait_msgs_expect_queued(a, b)
static void WINAPI testspy_PostFree(IMallocSpy *iface, BOOL spyed)
static const GUID IID_Testiface6
static ULONG WINAPI Test_IUnknown_AddRef(IUnknown *iface)
static void test_CoRegisterPSClsid(void)
static DWORD WINAPI MessageFilter_HandleInComingCall(IMessageFilter *iface, DWORD dwCallType, HTASK threadIDCaller, DWORD dwTickCount, LPINTERFACEINFO lpInterfaceInfo)
static void test_CoMarshalInterface(void)
#define CHECK_EXPECT2(func)
static void UnlockModule(void)
static DWORD WINAPI test_init_spies_proc(void *arg)
static BOOL revoke_spies_on_uninit
static HRESULT WINAPI MessageFilter_QueryInterface(IMessageFilter *iface, REFIID riid, void **ppvObj)
static ULONG WINAPI Test_IClassFactory_AddRef(LPCLASSFACTORY iface)
static HRESULT WINAPI EnumOLEVERB_Clone(IEnumOLEVERB *iface, IEnumOLEVERB **ppenum)
static void test_StringFromGUID2(void)
static const IPersistFileVtbl testpersistfilevtbl
static DWORD CALLBACK cowait_unmarshal_thread(void *arg)
static void WINAPI testspy_PostHeapMinimize(IMallocSpy *iface)
static IClassFactory getinstance_cf
static void test_ProgIDFromCLSID(void)
static void test_IMallocSpy(void)
static void test_CoGetCurrentLogicalThreadId(void)
static void _cowait_msgs_expect_queued(unsigned line, HWND hwnd, UINT expected_msg)
static void test_CoGetObjectContext(void)
static void test_CoGetMalloc(void)
static void test_CoGetContextToken(void)
static const CLSID CLSID_StdFont
static ULONG WINAPI PSFactoryBuffer_Release(IPSFactoryBuffer *This)
static void *WINAPI testspy_PreDidAlloc(IMallocSpy *iface, void *ptr, BOOL spyed)
static const IClassFactoryVtbl getinstance_cf_vtbl
static ULONG WINAPI getinstance_cf_AddRef(IClassFactory *iface)
static void _cowait_msgs_expect_empty(unsigned line)
static ULONG WINAPI testinstance_AddRef(IPersistFile *iface)
static const IMessageFilterVtbl MessageFilter_Vtbl
static SIZE_T WINAPI testspy_PreRealloc(IMallocSpy *iface, void *ptr, SIZE_T cb, void **newptr, BOOL spyed)
static IPSFactoryBuffer * ps_factory_buffer
static UINT cowait_msgs_first
static void test_OleInitialize_InitCounting(void)
static const GUID IID_Testiface3
static void test_OleRegGetMiscStatus(void)
static void test_CoCreateGuid(void)
static void _cowait_msgs_expect_notified(unsigned line, UINT expected_msg)
static const GUID IID_Testiface2
static const IEnumOLEVERBVtbl EnumOLEVERBVtbl
static BOOL is_module_loaded(const char *module)
static void test_CLSIDFromProgID(void)
static const WCHAR wszCLSID_StdFont[]
static ULARGE_INTEGER init_cookies[3]
static void *WINAPI testspy_PreFree(IMallocSpy *iface, void *ptr, BOOL spyed)
static BOOL create_manifest_file(const char *filename, const char *manifest)
static HRESULT WINAPI testinstance_Load(IPersistFile *iface, LPCOLESTR filename, DWORD mode)
#define cowait_msgs_expect_notified(a)
static void _test_apt_type(APTTYPE expected_type, APTTYPEQUALIFIER expected_qualifier, int line)
static HRESULT WINAPI testinitialize_PreInitialize(IInitializeSpy *iface, DWORD coinit, DWORD aptrefs)
static UINT cowait_msgs_last
static DWORD CALLBACK implicit_mta_proc(void *param)
static HRESULT g_persistfile_load_ret
static IPSFactoryBufferVtbl PSFactoryBufferVtbl
static const GUID IID_TestPS
static HRESULT WINAPI testinstance_GetClassID(IPersistFile *iface, CLSID *clsid)
static ULONG WINAPI testinitialize_AddRef(IInitializeSpy *iface)
static void init_funcs(void)
static void test_CoGetCallContext(void)
static const WCHAR wszNonExistent[]
static DWORD WINAPI MessageFilter_MessagePending(IMessageFilter *iface, HTASK threadIDCallee, DWORD dwTickCount, DWORD dwPendingType)
static const GUID IID_Testiface5
static void test_CoCreateInstanceEx(void)
static void flush_messages(void)
static HRESULT WINAPI testspy_QI(IMallocSpy *iface, REFIID riid, void **obj)
static HRESULT WINAPI EnumOLEVERB_Skip(IEnumOLEVERB *iface, ULONG celt)
static HRESULT WINAPI testinitialize_PostUninitialize(IInitializeSpy *iface, DWORD aptrefs)
static HRESULT WINAPI PSFactoryBuffer_CreateStub(IPSFactoryBuffer *This, REFIID riid, IUnknown *pUnkServer, IRpcStubBuffer **ppStub)
static const IClassFactoryVtbl TestClassFactory_Vtbl
static DWORD CALLBACK post_message_thread(LPVOID arg)
static void *WINAPI testspy_PostAlloc(IMallocSpy *iface, void *ptr)
static HRESULT WINAPI testinstance_IsDirty(IPersistFile *iface)
static void test_CoWaitForMultipleHandles(void)
static HRESULT WINAPI Test_CallContext_QueryInterface(IUnknown *iface, REFIID riid, LPVOID *ppvObj)
static IMessageFilter MessageFilter
static void LockModule(void)
static DWORD CALLBACK release_semaphore_thread(LPVOID arg)
static void test_CoGetPSClsid(void)
static DWORD CALLBACK test_CoWaitForMultipleHandles_thread(LPVOID arg)
static IInitializeSpy testinitialize
static void test_CLSIDFromString(void)
static WCHAR manifest_path[MAX_PATH]
static ULONG WINAPI testspy_Release(IMallocSpy *iface)
static const WCHAR cf_brokenW[]
static void test_CoUnmarshalInterface(void)
static void *WINAPI testspy_PostRealloc(IMallocSpy *iface, void *ptr, BOOL spyed)
static void test_IIDFromString(void)
#define cowait_msgs_expect_empty()
static const IUnknownVtbl TestUnknown_Vtbl
static ULONG WINAPI Test_IClassFactory_Release(LPCLASSFACTORY iface)
static HRESULT get_class_object(CLSCTX clsctx)
static const IID IID_IWineTest
static const CLSID CLSID_WineOOPTest
static const LARGE_INTEGER llZero
#define REG_CREATED_NEW_KEY
@ COINIT_APARTMENTTHREADED
@ APTTYPEQUALIFIER_IMPLICIT_MTA
enum _APTTYPEQUALIFIER APTTYPEQUALIFIER
@ THDTYPE_PROCESSMESSAGES
const GUID IID_IEnumOLEVERB
const GUID IID_IPersistFile
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
#define IsEqualGUID(rguid1, rguid2)
#define IsEqualIID(riid1, riid2)
#define IsEqualCLSID(rclsid1, rclsid2)
static __inline const char * wine_dbgstr_guid(const GUID *id)
@ OLEMISC_RECOMPOSEONRESIZE
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateSemaphoreA(IN LPSECURITY_ATTRIBUTES lpSemaphoreAttributes OPTIONAL, IN LONG lInitialCount, IN LONG lMaximumCount, IN LPCSTR lpName OPTIONAL)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH ReleaseSemaphore(IN HANDLE hSemaphore, IN LONG lReleaseCount, IN LPLONG lpPreviousCount)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
#define CONTAINING_RECORD(address, type, field)
static EFI_HANDLE * handles
static const CHAR manifest[]
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
#define success(from, fromstr, to, tostr)
DWORD WINAPI GetLastError(void)
HANDLE WINAPI GetCurrentThread(void)
DWORD WINAPI GetCurrentThreadId(void)
#define WAIT_IO_COMPLETION
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
#define REGDB_E_CLASSNOTREG
#define RPC_E_WRONG_THREAD
#define REGDB_E_IIDNOTREG
#define REGDB_E_WRITEREGDB
#define RPC_S_CALLPENDING
#define CLASS_E_NOAGGREGATION
#define RPC_E_CALL_COMPLETE
#define MK_E_CANTOPENFILE
#define HRESULT_FROM_WIN32(x)
#define CO_E_NOT_SUPPORTED
#define RPC_E_CHANGED_MODE
#define HKEY_CURRENT_USER
#define HKEY_CLASSES_ROOT
LRESULT WINAPI DispatchMessageA(_In_ const MSG *)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
HWND WINAPI CreateWindowExA(_In_ DWORD dwExStyle, _In_opt_ LPCSTR lpClassName, _In_opt_ LPCSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
BOOL WINAPI UnregisterClassA(_In_ LPCSTR, HINSTANCE)
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)
#define QS_ALLPOSTMESSAGE
DWORD WINAPI MsgWaitForMultipleObjects(_In_ DWORD nCount, _In_reads_opt_(nCount) CONST HANDLE *pHandles, _In_ BOOL fWaitAll, _In_ DWORD dwMilliseconds, _In_ DWORD dwWakeMask)
DWORD WINAPI MsgWaitForMultipleObjectsEx(_In_ DWORD nCount, _In_reads_opt_(nCount) CONST HANDLE *pHandles, _In_ DWORD dwMilliseconds, _In_ DWORD dwWakeMask, _In_ DWORD dwFlags)
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
ATOM WINAPI RegisterClassExA(_In_ CONST WNDCLASSEXA *)
BOOL WINAPI PostThreadMessageW(_In_ DWORD, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI PeekMessageA(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI PostMessageA(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)