29#define USE_COM_CONTEXT_DEF
42#define DEFINE_EXPECT(func) \
43 static BOOL expect_ ## func = FALSE; static unsigned int called_ ## func = 0
45#define SET_EXPECT(func) \
46 expect_ ## func = TRUE
48#define CHECK_EXPECT2(func) \
50 ok(expect_ ##func, "unexpected call " #func "\n"); \
54#define CHECK_EXPECT(func) \
56 CHECK_EXPECT2(func); \
57 expect_ ## func = FALSE; \
60#define CHECK_CALLED(func, n) \
62 ok(called_ ## func == n, "expected " #func " called %u times, got %u\n", n, called_ ## func); \
63 expect_ ## func = FALSE; \
64 called_ ## func = 0; \
87#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error %#08lx\n", hr)
88#define ok_more_than_one_lock() ok(cLocks > 0, "Number of locks should be > 0, but actually is %ld\n", cLocks)
89#define ok_no_locks() ok(cLocks == 0, "Number of locks should be 0, but actually is %ld\n", cLocks)
91static const CLSID CLSID_non_existent = { 0x12345678, 0x1234, 0x1234, { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0 } };
92static const CLSID CLSID_StdFont = { 0x0be35203, 0x8f91, 0x11ce, { 0x9d, 0xe3, 0x00, 0xaa, 0x00, 0x4b, 0xb8, 0x51 } };
93static const GUID IID_Testiface = { 0x22222222, 0x1234, 0x1234, { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0 } };
94static const GUID IID_Testiface2 = { 0x32222222, 0x1234, 0x1234, { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0 } };
95static const GUID IID_Testiface3 = { 0x42222222, 0x1234, 0x1234, { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0 } };
96static const GUID IID_Testiface4 = { 0x52222222, 0x1234, 0x1234, { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0 } };
97static const GUID IID_Testiface5 = { 0x62222222, 0x1234, 0x1234, { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0 } };
98static const GUID IID_Testiface6 = { 0x72222222, 0x1234, 0x1234, { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0 } };
99static const GUID IID_Testiface7 = { 0x82222222, 0x1234, 0x1234, { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0 } };
100static const GUID IID_Testiface8 = { 0x92222222, 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,
228 ok(
res != 0,
"Failed to find resource.\n");
248 actctx.cbSize =
sizeof(ACTCTXW);
253 "handle == INVALID_HANDLE_VALUE, error %lu\n",
GetLastError());
256 win_skip(
"activation context generation failed, some tests will be skipped. Error %ld\n",
GetLastError());
260 ok(
actctx.cbSize ==
sizeof(ACTCTXW),
"actctx.cbSize=%ld\n",
actctx.cbSize);
263 ok(
actctx.wProcessorArchitecture == 0,
"actctx.wProcessorArchitecture=%d\n",
actctx.wProcessorArchitecture);
265 ok(
actctx.lpAssemblyDirectory ==
NULL,
"actctx.lpAssemblyDirectory=%p\n",
actctx.lpAssemblyDirectory);
266 ok(
actctx.lpResourceName ==
NULL,
"actctx.lpResourceName=%p\n",
actctx.lpResourceName);
267 ok(
actctx.lpApplicationName ==
NULL,
"actctx.lpApplicationName=%p\n",
actctx.lpApplicationName);
291"<assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\">"
292"<assemblyIdentity version=\"1.2.3.4\" name=\"Wine.Test\" type=\"win32\""
293" publicKeyToken=\"6595b6414666f1df\" />"
294"<file name=\"testlib.dll\">"
296" clsid=\"{0000033a-0000-0000-c000-000000000046}\""
297" progid=\"FTMarshal\""
300" clsid=\"{5201163f-8164-4fd0-a1a2-5d5a3654d3bd}\""
301" progid=\"WineOOPTest\""
303" <comClass description=\"Test com class\""
304" clsid=\"{12345678-1234-1234-1234-56789abcdef0}\""
305" progid=\"ProgId.ProgId\""
306" miscStatusIcon=\"recomposeonresize\""
308" <comClass description=\"CustomFont Description\" clsid=\"{0be35203-8f91-11ce-9de3-00aa004bb851}\""
309" progid=\"CustomFont\""
310" miscStatusIcon=\"recomposeonresize\""
311" miscStatusContent=\"insideout\""
313" <comClass description=\"StdFont Description\" clsid=\"{0be35203-8f91-11ce-9de3-00aa004bb852}\""
316" <comClass clsid=\"{62222222-1234-1234-1234-56789abcdef0}\" >"
317" <progid>ProgId.ProgId.1</progid>"
319" <comInterfaceProxyStub "
321" iid=\"{22222222-1234-1234-1234-56789abcdef0}\""
322" proxyStubClsid32=\"{66666666-8888-7777-6666-555555555555}\""
324" <comInterfaceProxyStub "
326" iid=\"{82222222-1234-1234-1234-56789abcdef0}\""
329" <comInterfaceExternalProxyStub "
331" iid=\"{32222222-1234-1234-1234-56789abcdef0}\""
333" <comInterfaceExternalProxyStub "
335" iid=\"{42222222-1234-1234-1234-56789abcdef0}\""
336" proxyStubClsid32=\"{66666666-8888-7777-6666-555555555555}\""
338" <comInterfaceExternalProxyStub "
340" iid=\"{52222222-1234-1234-1234-56789abcdef0}\""
341" proxyStubClsid32=\"{00000000-0000-0000-0000-000000000000}\""
344" clsid=\"{72222222-1234-1234-1234-56789abcdef0}\""
347" <progid>clrprogid.1</progid>"
352"<assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\">"
353"<assemblyIdentity version=\"1.2.3.4\" name=\"Wine.Test\" type=\"win32\""
354" publicKeyToken=\"6595b6414666f1df\" />"
355"<file name=\"testlib.dll\">"
356" <comInterfaceProxyStub "
357" name=\"Testiface7\""
358" iid=\"{52222222-1234-1234-1234-56789abcdef0}\""
359" proxyStubClsid32=\"{82222222-1234-1234-1234-56789abcdef0}\""
360" threadingModel=\"Apartment\""
363"<file name=\"testlib4.dll\">"
364" <comInterfaceProxyStub "
365" name=\"Testiface8\""
366" iid=\"{92222222-1234-1234-1234-56789abcdef0}\""
367" threadingModel=\"Apartment\""
370" <comInterfaceExternalProxyStub "
372" iid=\"{42222222-1234-1234-1234-56789abcdef0}\""
373" proxyStubClsid32=\"{66666666-8888-7777-6666-555555555555}\""
377DEFINE_GUID(CLSID_Testclass, 0x12345678, 0x1234, 0x1234, 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0);
387 ok(
hr ==
S_OK,
"ProgIDFromCLSID failed with error 0x%08lx\n",
hr);
400 ok(
hr ==
E_INVALIDARG,
"ProgIDFromCLSID should return E_INVALIDARG instead of 0x%08lx\n",
hr);
404 static const WCHAR customfontW[] = {
'C',
'u',
's',
't',
'o',
'm',
'F',
'o',
'n',
't',0};
419 progid = (
void *)0xdeadbeef;
423 progid = (
void *)0xdeadbeef;
437 ok(
hr ==
S_OK,
"CLSIDFromProgID failed with error 0x%08lx\n",
hr);
447 ok(
hr ==
E_INVALIDARG,
"CLSIDFromProgID should have returned E_INVALIDARG instead of 0x%08lx\n",
hr);
450 ok(
hr ==
E_INVALIDARG,
"CLSIDFromProgID should have returned E_INVALIDARG instead of 0x%08lx\n",
hr);
454 ok(
hr ==
CO_E_CLASSSTRING,
"CLSIDFromProgID on nonexistent ProgID should have returned CO_E_CLASSSTRING instead of 0x%08lx\n",
hr);
489 clsid1.Data4[7] = 0x52;
500 WCHAR wszCLSID_Broken[50];
520 wszCLSID_Broken[
i] =
'A';
521 wszCLSID_Broken[
i] =
'\0';
551 wszCLSID_Broken[9] =
'*';
558 wszCLSID_Broken[3] =
'*';
565 wszCLSID_Broken[3] =
'\0';
575 static const WCHAR cfW[] = {
'{',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'1',
'-',
'0',
'0',
'0',
'0',
'-',
'0',
'0',
'0',
'0',
'-',
576 'c',
'0',
'0',
'0',
'-',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'4',
'6',
'}',0};
577 static const WCHAR brokenW[] = {
'{',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'1',
'-',
'0',
'0',
'0',
'0',
'-',
'0',
'0',
'0',
'0',
'-',
578 'g',
'0',
'0',
'0',
'-',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'4',
'6',
'}',0};
579 static const WCHAR broken2W[] = {
'{',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'1',
'=',
'0',
'0',
'0',
'0',
'-',
'0',
'0',
'0',
'0',
'-',
580 'g',
'0',
'0',
'0',
'-',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'4',
'6',
'}',0};
581 static const WCHAR broken3W[] = {
'b',
'r',
'o',
'k',
'e',
'n',
'0',
'0',
'1',
'=',
'0',
'0',
'0',
'0',
'-',
'0',
'0',
'0',
'0',
'-',
582 'g',
'0',
'0',
'0',
'-',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'4',
'6',
'}',0};
590 memset(&iid, 0xab,
sizeof(iid));
600 memset(&iid, 0xab,
sizeof(iid));
606 memset(&iid, 0xab,
sizeof(iid));
611 memset(&iid, 0xab,
sizeof(iid));
617 memset(&iid, 0xab,
sizeof(iid));
623 memset(&iid, 0xab,
sizeof(iid));
629 memset(&iid, 0xab,
sizeof(iid));
643 ok(
len == 0,
"len: %d (expected 0)\n",
len);
648 ok(
len == 39,
"len: %d (expected 39)\n",
len);
653 ok(
len == 39,
"len: %d (expected 39)\n",
len);
657 ok(
len == 0,
"len: %d (expected 0)\n",
len);
660 ok(
len == 0,
"len: %d (expected 0)\n",
len);
663#define test_apt_type(t, q) _test_apt_type(t, q, __LINE__)
670 if (!pCoGetApartmentType)
675 "Unexpected hr %#lx.\n",
hr);
676 ok_(__FILE__,
line)(
type == expected_type,
"Wrong apartment type %d, expected %d\n",
type, expected_type);
685 REFCLSID rclsid = &CLSID_InternetZoneManager;
690 ok(
pUnk ==
NULL,
"CoCreateInstance should have changed the passed in pointer to NULL, instead of %p\n",
pUnk);
696 ok(
hr ==
REGDB_E_CLASSNOTREG,
"CoCreateInstance for non-registered inproc server should have returned REGDB_E_CLASSNOTREG instead of 0x%08lx\n",
hr);
698 ok(
hr ==
REGDB_E_CLASSNOTREG,
"CoCreateInstance for non-registered inproc handler should have returned REGDB_E_CLASSNOTREG instead of 0x%08lx\n",
hr);
700 ok(
hr ==
REGDB_E_CLASSNOTREG,
"CoCreateInstance for non-registered local server should have returned REGDB_E_CLASSNOTREG instead of 0x%08lx\n",
hr);
702 ok(
hr ==
REGDB_E_CLASSNOTREG,
"CoCreateInstance for non-registered remote server should have returned REGDB_E_CLASSNOTREG instead of 0x%08lx\n",
hr);
707 skip(
"IE not installed so can't test CoCreateInstance\n");
750 REFCLSID rclsid = &CLSID_InternetZoneManager;
756 ok(
pUnk ==
NULL,
"CoGetClassObject should have changed the passed in pointer to NULL, instead of %p\n",
pUnk);
761 "CoGetClassObject should have returned E_INVALIDARG instead of 0x%08lx\n",
hr);
765 if (!pRegOverridePredefKey)
767 win_skip(
"RegOverridePredefKey not available\n");
776 IUnknown_Release(
pUnk);
780 ok(!
res,
"RegCreateKeyEx returned %ld\n",
res);
783 ok(!
res,
"RegOverridePredefKey returned %ld\n",
res);
786 ok(
hr ==
S_OK,
"CoGetClassObject should have returned S_OK instead of 0x%08lx\n",
hr);
789 ok(!
res,
"RegOverridePredefKey returned %ld\n",
res);
797 IUnknown_Release(
pUnk);
804 IUnknown_Release(
pUnk);
818 ACTCTX_SECTION_KEYED_DATA
data;
831 ok(
ret,
"Section not found.\n");
838 ok(!
ret,
"Unexpected return value.\n");
841 ok(!
ret,
"Unexpected return value.\n");
844 ok(
ret,
"Unexpected return value.\n");
847 ok(!
ret,
"Unexpected return value.\n");
850 ok(
ret,
"Unexpected return value.\n");
852 comclass =
data.lpData;
867 MULTI_QI qi_res = { &IID_IMoniker };
913 hwndFrame =
CreateWindowA((
LPCSTR)
MAKEINTATOM(
register_dummy_class()),
"Test", 0,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
NULL,
NULL,
NULL,
NULL);
929 IMessageFilter_AddRef(iface);
949 HTASK threadIDCaller,
951 LPINTERFACEINFO lpInterfaceInfo)
953 trace(
"HandleInComingCall\n");
954 return SERVERCALL_ISHANDLED;
959 HTASK threadIDCallee,
963 trace(
"RetryRejectedCall\n");
969 HTASK threadIDCallee,
973 trace(
"MessagePending\n");
975 return PENDINGMSG_WAITNOPROCESS;
997 "CoRegisterMessageFilter should have failed with CO_E_NOT_SUPPORTED instead of 0x%08lx\n",
1004 "CoRegisterMessageFilter should have failed with CO_E_NOT_SUPPORTED instead of 0x%08lx\n",
1007 "prev_filter should have been set to %p\n", prev_filter);
1018 ok(prev_filter ==
NULL,
"prev_filter should have been set to NULL instead of %p\n", prev_filter);
1022 ok(prev_filter ==
NULL,
"prev_filter should have been set to NULL instead of %p\n", prev_filter);
1049 ok(0,
"unexpected call\n");
1055 ok(0,
"unexpected call\n");
1061 ok(0,
"unexpected call\n");
1067 ok(0,
"unexpected call\n");
1099 IUnknown_AddRef((
IUnknown*)*ppvObj);
1133 IPSFactoryBuffer_AddRef(
This);
1169 ok(pUnkServer == &
Test_Unknown,
"unexpected pUnkServer %p\n", pUnkServer);
1192 {0xa1, 0xa2, 0x5d, 0x5a, 0x36, 0x54, 0xd3, 0xbd}
1219 DWORD dwRegistrationKey;
1257 ok(
hr ==
E_NOTIMPL,
"CoMarshalInterface should have returned E_NOTIMPL instead of 0x%08lx\n",
hr);
1271 ok(
hr ==
S_OK,
"CoMarshalInterface should have returned S_OK instead of 0x%08lx\n",
hr);
1275 ok(
hr ==
S_OK,
"CoMarshalInterface should have returned S_OK instead of 0x%08lx\n",
hr);
1332 "CoGetPSClsid should have returned CO_E_NOTINITIALIZED instead of 0x%08lx\n",
1342 "CoGetPSClsid for random IID returned 0x%08lx instead of REGDB_E_IIDNOTREG\n",
1347 "CoGetPSClsid for null clsid returned 0x%08lx instead of E_INVALIDARG\n",
1350 if (!pRegOverridePredefKey)
1352 win_skip(
"RegOverridePredefKey not available\n");
1361 ok(!
res,
"RegCreateKeyEx returned %ld\n",
res);
1364 ok(!
res,
"RegOverridePredefKey returned %ld\n",
res);
1370 ok(!
res,
"RegOverridePredefKey returned %ld\n",
res);
1402 ok(
hr ==
S_OK,
"Failed to get PS CLSID, hr %#lx.\n",
hr);
1416 if (pRegDeleteKeyExA &&
1420 static GUID IID_DeadBeef = {0xdeadbeef,0xdead,0xbeef,{0xde,0xad,0xbe,0xef,0xde,0xad,0xbe,0xef}};
1421 static const char clsidDeadBeef[] =
"{deadbeef-dead-beef-dead-beefdeadbeef}";
1422 static const char clsidA[] =
"{66666666-8888-7777-6666-555555555555}";
1423 HKEY hkey_iface, hkey_psclsid;
1431 ok(!
res,
"RegCreateKeyEx returned %ld\n",
res);
1436 win_skip(
"Failed to create a key, skipping some of CoGetPSClsid() tests\n");
1440 ok(!
res,
"RegCreateKeyEx returned %ld\n",
res);
1443 ok(!
res,
"RegCreateKeyEx returned %ld\n",
res);
1445 ok(!
res,
"RegSetValueEx returned %ld\n",
res);
1452 res = pRegDeleteKeyExA(hkey,
"ProxyStubClsid32", opposite, 0);
1453 ok(!
res,
"RegDeleteKeyEx returned %ld\n",
res);
1455 res = pRegDeleteKeyExA(hkey_iface, clsidDeadBeef, opposite, 0);
1456 ok(!
res,
"RegDeleteKeyEx returned %ld\n",
res);
1473 ok(
hr ==
E_INVALIDARG,
"CoUnmarshalInterface should have returned E_INVALIDARG instead of 0x%08lx\n",
hr);
1480 ok(
hr ==
CO_E_NOTINITIALIZED,
"CoUnmarshalInterface should have returned CO_E_NOTINITIALIZED instead of 0x%08lx\n",
hr);
1485 ok(
hr ==
STG_E_READFAULT,
"CoUnmarshalInterface should have returned STG_E_READFAULT instead of 0x%08lx\n",
hr);
1490 ok(
hr ==
E_INVALIDARG,
"CoUnmarshalInterface should have returned E_INVALIDARG instead of 0x%08lx\n",
hr);
1492 IStream_Release(pStream);
1521 ok(
hr ==
E_INVALIDARG,
"CoMarshalInterface should have returned E_INVALIDARG instead of 0x%08lx\n",
hr);
1524 ok(
hr ==
E_INVALIDARG,
"CoMarshalInterface should have returned E_INVALIDARG instead of 0x%08lx\n",
hr);
1531 ok(
hr ==
STG_E_READFAULT,
"CoReleaseMarshalData should have returned STG_E_READFAULT instead of 0x%08lx\n",
hr);
1533 hr = IStream_Seek(pStream,
llZero, STREAM_SEEK_SET,
NULL);
1539 IStream_Release(pStream);
1555 ok(
hr ==
E_INVALIDARG,
"CoMarshalInterThreadInterfaceInStream should have returned E_INVALIDARG instead of 0x%08lx\n",
hr);
1558 ok(
hr ==
E_INVALIDARG,
"CoMarshalInterThreadInterfaceInStream should have returned E_INVALIDARG instead of 0x%08lx\n",
hr);
1570 IClassFactory_Release(pProxy);
1571 IStream_Release(pStream);
1651 ok(
hr ==
REGDB_E_CLASSNOTREG,
"object registered in an apartment shouldn't accessible after it is destroyed\n");
1664 IClassFactory_Release(pcf);
1677 IClassFactory_Release(pcf);
1694 IClassFactory_Release(pcf);
1727 hr = IClassFactory_QueryInterface(pcf, &IID_IMultiQI, (
void **)&pMQI);
1729 IMultiQI_Release(pMQI);
1730 IClassFactory_Release(pcf);
1789 "registered in different thread should return REGDB_E_CLASSNOTREG "
1790 "instead of 0x%08lx\n",
hr);
1793 ok(
hr ==
S_OK,
"CoGetClassObject on inproc object registered in same "
1794 "thread should return S_OK instead of 0x%08lx\n",
hr);
1801 ok(
hr ==
S_OK,
"CoRegisterClassObject with same CLSID but in different thread should return S_OK instead of 0x%08lx\n",
hr);
1825 ok(
hr ==
S_OK,
"CoGetClassObject on local server object "
1826 "registered in different thread should return S_OK "
1827 "instead of 0x%08lx\n",
hr);
1830 ok(
hr ==
S_OK,
"CoGetClassObject on local server object registered in same "
1831 "thread should return S_OK instead of 0x%08lx\n",
hr);
1839 "thread to where registered should return RPC_E_WRONG_THREAD instead of 0x%08lx\n",
hr);
1846 ok(
hr ==
S_OK,
"CoRegisterClassObject with same CLSID but in different "
1847 "thread should return S_OK instead of 0x%08lx\n",
hr);
1880 skip(
"IE not installed so can't run CoFreeUnusedLibraries test\n");
1890 "Expected a valid pointer\n");
1892 IUnknown_Release(
pUnk);
1920 if (!pCoGetObjectContext)
1922 win_skip(
"CoGetObjectContext not present\n");
1926 hr = pCoGetObjectContext(&IID_IComThreadingInfo, (
void **)&pComThreadingInfo);
1928 ok(pComThreadingInfo ==
NULL,
"pComThreadingInfo should have been set to NULL\n");
1934 hr = pCoGetObjectContext(&IID_IComThreadingInfo, (
void **)&pComThreadingInfo);
1937 threadinginfo2 =
NULL;
1938 hr = pCoGetObjectContext(&IID_IComThreadingInfo, (
void **)&threadinginfo2);
1939 ok(
hr ==
S_OK,
"Expected S_OK, got 0x%08lx\n",
hr);
1940 ok(pComThreadingInfo == threadinginfo2,
"got different instance\n");
1941 IComThreadingInfo_Release(threadinginfo2);
1943 hr = IComThreadingInfo_GetCurrentLogicalThreadId(pComThreadingInfo,
NULL);
1947 hr = IComThreadingInfo_GetCurrentLogicalThreadId(pComThreadingInfo, &
id);
1953 hr = IComThreadingInfo_GetCurrentApartmentType(pComThreadingInfo, &apttype);
1955 ok(apttype ==
APTTYPE_MAINSTA,
"apartment type should be APTTYPE_MAINSTA instead of %d\n", apttype);
1957 hr = IComThreadingInfo_GetCurrentThreadType(pComThreadingInfo, &thdtype);
1961 refs = IComThreadingInfo_Release(pComThreadingInfo);
1962 ok(refs == 0,
"pComThreadingInfo should have 0 refs instead of %ld refs\n", refs);
1964 hr = pCoGetObjectContext(&IID_IContextCallback, (
void **)&pContextCallback);
1967 refs = IContextCallback_Release(pContextCallback);
1968 ok(refs == 0,
"pContextCallback should have 0 refs instead of %ld refs\n", refs);
1974 hr = pCoGetObjectContext(&IID_IComThreadingInfo, (
void **)&pComThreadingInfo);
1977 hr = IComThreadingInfo_GetCurrentApartmentType(pComThreadingInfo, &apttype);
1979 ok(apttype ==
APTTYPE_MTA,
"apartment type should be APTTYPE_MTA instead of %d\n", apttype);
1981 hr = IComThreadingInfo_GetCurrentThreadType(pComThreadingInfo, &thdtype);
1985 refs = IComThreadingInfo_Release(pComThreadingInfo);
1986 ok(refs == 0,
"pComThreadingInfo should have 0 refs instead of %ld refs\n", refs);
1988 hr = pCoGetObjectContext(&IID_IContextCallback, (
void **)&pContextCallback);
1991 refs = IContextCallback_Release(pContextCallback);
1992 ok(refs == 0,
"pContextCallback should have 0 refs instead of %ld refs\n", refs);
1994 hr = pCoGetObjectContext(&IID_IObjContext, (
void **)&pObjContext);
1997 refs = IObjContext_Release(pObjContext);
1998 ok(refs == 0,
"pObjContext should have 0 refs instead of %ld refs\n", refs);
2023 IUnknown_AddRef(iface);
2060 if (!pCoSwitchCallContext)
2062 skip(
"CoSwitchCallContext not present\n");
2079 refs = IUnknown_AddRef(&
test_object->IUnknown_iface);
2080 ok(refs == 2,
"Expected refcount 2, got %ld\n", refs);
2088 refs = IUnknown_AddRef(&
test_object->IUnknown_iface);
2089 ok(refs == 3,
"Expected refcount 3, got %ld\n", refs);
2091 IUnknown_Release(
pUnk);
2098 refs = IUnknown_AddRef(&
test_object->IUnknown_iface);
2099 ok(refs == 2,
"Expected refcount 2, got %ld\n", refs);
2117 if (!pCoGetContextToken)
2119 win_skip(
"CoGetContextToken not present\n");
2124 hr = pCoGetContextToken(&
token);
2126 ok(
token == 0xdeadbeef,
"Expected 0, got 0x%Ix\n",
token);
2134 hr = pCoGetContextToken(
NULL);
2138 hr = pCoGetContextToken(&
token);
2139 ok(
hr ==
S_OK,
"Expected S_OK, got 0x%08lx\n",
hr);
2140 ok(
token,
"Expected token != 0\n");
2143 hr = pCoGetContextToken(&token2);
2144 ok(
hr ==
S_OK,
"Expected S_OK, got 0x%08lx\n",
hr);
2145 ok(token2 ==
token,
"got different token\n");
2148 ok(refs == 1,
"Expected 1, got %lu\n", refs);
2150 hr = pCoGetObjectContext(&IID_IObjContext, (
void **)&
ctx);
2151 ok(
hr ==
S_OK,
"Expected S_OK, got 0x%08lx\n",
hr);
2154 refs = IObjContext_AddRef(
ctx);
2155 ok(refs == 3,
"Expected 3, got %lu\n", refs);
2157 refs = IObjContext_Release(
ctx);
2158 ok(refs == 2,
"Expected 2, got %lu\n", refs);
2161 ok(refs == 1,
"Expected 1, got %lu\n", refs);
2165 hr = pCoGetContextToken(&
token);
2166 ok(
hr ==
S_OK,
"Expected S_OK, got 0x%08lx\n",
hr);
2167 ok(
token,
"Expected token != 0\n");
2170 refs = IObjContext_AddRef(
ctx);
2171 ok(refs == 2,
"Expected 1, got %lu\n", refs);
2173 refs = IObjContext_Release(
ctx);
2174 ok(refs == 1,
"Expected 0, got %lu\n", refs);
2176 refs = IObjContext_Release(
ctx);
2177 ok(refs == 0,
"Expected 0, got %lu\n", refs);
2186 static GUID deadbeef = {0xdeadbeef,0xdead,0xbeef,{0xde,0xad,0xbe,0xef,0xde,0xad,0xbe,0xef}};
2187 static const char deadbeefA[] =
"{DEADBEEF-DEAD-BEEF-DEAD-BEEFDEADBEEF}";
2189 HKEY clsidkey, deadbeefkey;
2204 ok(!lr,
"Couldn't open CLSID key, error %ld\n", lr);
2208 win_skip(
"CoGetTreatAsClass() tests will be skipped (failed to create a test key, error %ld)\n", lr);
2218 win_skip(
"Insufficient privileges to use CoTreatAsClass\n");
2221 ok(
hr ==
S_OK,
"CoTreatAsClass failed: %08lx\n",
hr);
2224 ok(
hr ==
S_OK,
"CoGetTreatAsClass failed: %08lx\n",
hr);
2225 ok(
IsEqualGUID(&
out, &CLSID_FileProtocol),
"expected to get substituted clsid\n");
2232 win_skip(
"IE not installed so can't test CoCreateInstance\n");
2236 ok(
hr ==
S_OK,
"CoCreateInstance failed: %08lx\n",
hr);
2238 IInternetProtocol_Release(pIP);
2242 if (pCoCreateInstanceFromApp)
2244 MULTI_QI mqi = { 0 };
2246 mqi.pIID = &IID_IInternetProtocol;
2247 hr = pCoCreateInstanceFromApp(&deadbeef,
NULL, CLSCTX_INPROC_SERVER,
NULL, 1, &mqi);
2250 hr =
CoCreateInstance(&deadbeef,
NULL, CLSCTX_INPROC_SERVER | CLSCTX_APPCONTAINER, &IID_IInternetProtocol,
2256 IUnknown_Release(pIP);
2260 ok(
hr ==
S_OK,
"CoTreatAsClass failed: %08lx\n",
hr);
2273 IInternetProtocol_Release(pIP);
2287 ok(
hr ==
S_OK,
"CoInitializeEx failed with error 0x%08lx\n",
hr);
2292 ok(
hr ==
S_OK,
"OleInitialize failed with error 0x%08lx\n",
hr);
2308 REFCLSID rclsid = &CLSID_InternetZoneManager;
2312 ok(
hr ==
S_OK,
"CoInitializeEx(COINIT_MULTITHREADED) failed with error 0x%08lx\n",
hr);
2320 ok(
hr ==
S_OK,
"CoCreateInstance should have returned 0x%08lx instead of 0x%08lx\n",
S_OK,
hr);
2327 ok(
hr ==
S_OK,
"CoInitialize() failed with error 0x%08lx\n",
hr);
2330 ok(
hr ==
S_OK,
"OleInitialize should have returned 0x%08lx instead of 0x%08lx\n",
S_OK,
hr);
2337 ok(
hr ==
S_OK,
"CoCreateInstance should have returned 0x%08lx instead of 0x%08lx\n",
S_OK,
hr);
2349 ok(
hr ==
S_OK,
"CoInitialize() failed with error 0x%08lx\n",
hr);
2352 ok(
hr ==
S_OK,
"OleInitialize should have returned 0x%08lx instead of 0x%08lx\n",
S_OK,
hr);
2364 ok(
hr ==
S_FALSE,
"OleInitialize should have returned 0x%08lx instead of 0x%08lx\n",
S_FALSE,
hr);
2416 static const WCHAR stdfont_usertypeW[] = {
'S',
't',
'a',
'n',
'd',
'a',
'r',
'd',
' ',
'F',
'o',
'n',
't',0};
2417 static const WCHAR stdfont2_usertypeW[] = {
'C',
'L',
'S',
'I',
'D',
'_',
'S',
't',
'd',
'F',
'o',
'n',
't',0};
2418 static const WCHAR clsidkeyW[] = {
'C',
'L',
'S',
'I',
'D',0};
2419 static const WCHAR defvalueW[] = {
'D',
'e',
'f',
'a',
'u',
'l',
't',
' ',
'N',
'a',
'm',
'e',0};
2420 static const WCHAR auxvalue0W[] = {
'A',
'u',
'x',
' ',
'N',
'a',
'm',
'e',
' ',
'0',0};
2421 static const WCHAR auxvalue2W[] = {
'A',
'u',
'x',
' ',
'N',
'a',
'm',
'e',
' ',
'2',0};
2422 static const WCHAR auxvalue3W[] = {
'A',
'u',
'x',
' ',
'N',
'a',
'm',
'e',
' ',
'3',0};
2423 static const WCHAR auxvalue4W[] = {
'A',
'u',
'x',
' ',
'N',
'a',
'm',
'e',
' ',
'4',0};
2425 static const char auxvalues[][16] = {
2433 HKEY clsidhkey, hkey, auxhkey, classkey;
2442 for (
form = 0;
form <= USERCLASSTYPE_APPNAME+1;
form++) {
2446 str = (
void*)0xdeadbeef;
2462 for (
form = 0;
form <= USERCLASSTYPE_APPNAME+1;
form++) {
2463 str = (
void*)0xdeadbeef;
2493 win_skip(
"Failed to create test key, skipping some of OleRegGetUserType() tests.\n");
2497 ok(!
ret,
"failed to create a key, error %ld\n",
ret);
2506 for (
i = 0;
i <= 4;
i++) {
2555 for (
i = 0;
i <= 4;
i++)
2623#define cowait_msgs_expect_empty() _cowait_msgs_expect_empty(__LINE__)
2633#define cowait_msgs_expect_notified(a) _cowait_msgs_expect_notified(__LINE__,a)
2637 ok_(__FILE__,
line)(0,
"expected message %u, received none\n", expected_msg);
2640 "expected message %u, received %u \n",
2646#define cowait_msgs_expect_queued(a,b) _cowait_msgs_expect_queued(__LINE__,a,b)
2655 ok_(__FILE__,
line)(
msg.message == expected_msg,
"unexpected message %u, expected %u\n",
2656 msg.message, expected_msg);
2689 ok(
hr ==
S_OK,
"CoUnmarshalInterface failed: %08lx\n",
hr);
2692 ok(
hr ==
S_OK,
"QueryInterface failed: %08lx\n",
hr);
2694 IEnumOLEVERB_Release(enum_verb);
2695 IUnknown_Release(unk);
2714 ok(
hr ==
S_OK,
"CoInitializeEx failed with error 0x%08lx\n",
hr);
2716 hWnd =
CreateWindowExA(0,
cls_name,
"Test (thread)",
WS_TILEDWINDOW, 0, 0, 640, 480, 0, 0, 0, 0);
2725 ok(!
success,
"CoWaitForMultipleHandles didn't pump any messages\n");
2733 ok(
success,
"CoWaitForMultipleHandles unexpectedly pumped messages\n");
2750 ok(
success,
"CoWaitForMultipleHandles unexpectedly pumped messages\n");
2756 ok(
hr ==
S_OK,
"CoInitializeEx failed with error 0x%08lx\n",
hr);
2759 ok(
hr ==
S_OK,
"CreateStreamOnHGlobal failed: %08lx\n",
hr);
2762 ok(
hr ==
S_OK,
"CoMarshalInterface should have returned S_OK instead of 0x%08lx\n",
hr);
2770 ok(
hr ==
S_OK,
"CoRegisterMessageFilter failed: %08lx\n",
hr);
2777 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08lx\n",
hr);
2782 ok(
hr ==
S_OK,
"CoRegisterMessageFilter failed: %08lx\n",
hr);
2802 ok(
hr ==
S_OK,
"CoInitializeEx failed with error 0x%08lx\n",
hr);
2804 memset(&wc, 0,
sizeof(wc));
2815 hWnd =
CreateWindowExA(0,
cls_name,
"Test",
WS_TILEDWINDOW, 0, 0, 640, 480, 0, 0, 0, 0);
2828 ok(
success,
"CoWaitForMultipleHandles unexpectedly pumped messages\n");
2836 ok(
success,
"CoWaitForMultipleHandles unexpectedly pumped messages\n");
2844 ok(
success,
"CoWaitForMultipleHandles unexpectedly pumped messages\n");
2849 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08lx\n",
hr);
2852 ok(
success,
"CoWaitForMultipleHandles unexpectedly pumped messages\n");
2857 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08lx\n",
hr);
2860 ok(
success,
"CoWaitForMultipleHandles unexpectedly pumped messages\n");
2868 ok(!
success,
"CoWaitForMultipleHandles didn't pump any messages\n");
2879 ok(!
success,
"CoWaitForMultipleHandles didn't pump any messages\n");
2891 ok(!
success,
"CoWaitForMultipleHandles didn't pump any messages\n");
2904 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08lx\n",
hr);
2907 ok(
success,
"CoWaitForMultipleHandles unexpectedly pumped messages\n");
2915 ok(!
success,
"CoWaitForMultipleHandles didn't pump any messages\n");
2925 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08lx\n",
hr);
2928 ok(
success,
"CoWaitForMultipleHandles unexpectedly pumped messages\n");
2933 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08lx\n",
hr);
2936 ok(
success,
"CoWaitForMultipleHandles unexpectedly pumped messages\n");
2944 ok(!
success,
"CoWaitForMultipleHandles didn't pump any messages\n");
2951 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08lx\n",
hr);
2954 ok(
success,
"CoWaitForMultipleHandles unexpectedly pumped messages\n");
2961 ok(
success,
"PeekMessageA returned FALSE\n");
2966 ok(!
success,
"CoWaitForMultipleHandles didn't pump any messages\n");
2971 ok(
success,
"PeekMessageA returned FALSE\n");
2976 "expected RPC_S_CALLPENDING, got 0x%08lx\n",
hr);
2981 "CoWaitForMultipleHandles didn't pump any messages\n");
3015 ok(
msg.message ==
WM_QUIT,
"expected msg.message = WM_QUIT, got %u\n",
msg.message);
3016 ok(
msg.wParam == 40,
"expected msg.wParam = 40, got %Iu\n",
msg.wParam);
3018 ok(!
success,
"PeekMessageA succeeded\n");
3055 ok(!
success,
"PeekMessageA succeeded\n");
3062 ok(
msg.message ==
WM_QUIT,
"expected msg.message = WM_QUIT, got %u\n",
msg.message);
3063 ok(
msg.wParam == 41,
"expected msg.wParam = 41, got %Iu\n",
msg.wParam);
3078 ok(!
success,
"CoWaitForMultipleHandles didn't pump all WM_DDE_FIRST messages\n");
3082 ok(
msg.message ==
WM_QUIT,
"expected msg.message = WM_QUIT, got %u\n",
msg.message);
3083 ok(
msg.wParam == 42,
"expected msg.wParam = 42, got %Iu\n",
msg.wParam);
3093 win_skip(
"PostQuitMessage didn't queue a WM_QUIT message, skipping tests\n");
3096 ok(
msg.message ==
WM_QUIT,
"expected msg.message = WM_QUIT, got %u\n",
msg.message);
3097 ok(
msg.wParam == 43,
"expected msg.wParam = 43, got %Iu\n",
msg.wParam);
3099 ok(!
success,
"PeekMessageA succeeded\n");
3112 ok(!
success,
"PeekMessageA succeeded\n");
3114 ok(!
success,
"CoWaitForMultipleHandles didn't remove WM_QUIT messages\n");
3130 ok(!
success,
"PeekMessageA succeeded\n");
3132 ok(!
success,
"CoWaitForMultipleHandles didn't remove WM_QUIT messages\n");
3187 imalloc = (
void*)0xdeadbeef;
3190 ok(imalloc ==
NULL,
"got %p\n", imalloc);
3192 imalloc = (
void*)0xdeadbeef;
3195 ok(imalloc ==
NULL,
"got %p\n", imalloc);
3197 imalloc = (
void*)0xdeadbeef;
3200 ok(imalloc ==
NULL,
"got %p\n", imalloc);
3202 imalloc = (
void*)0xdeadbeef;
3205 ok(imalloc ==
NULL,
"got %p\n", imalloc);
3207 imalloc = (
void*)0xdeadbeef;
3210 ok(imalloc ==
NULL,
"got %p\n", imalloc);
3215 ok(imalloc !=
NULL,
"got %p\n", imalloc);
3218 ptr = IMalloc_Alloc(imalloc, 16);
3219 ok(!!
ptr,
"Failed to allocate block.\n");
3221 ret = IMalloc_DidAlloc(imalloc,
ptr);
3222 ok(
ret == 1,
"Unexpected return value %d.\n",
ret);
3224 ret = IMalloc_DidAlloc(imalloc,
NULL);
3225 ok(
ret == -1,
"Unexpected return value %d.\n",
ret);
3227 ret = IMalloc_DidAlloc(imalloc, (
void *)0x1);
3228 ok(
ret == 0,
"Unexpected return value %d.\n",
ret);
3230 ret = IMalloc_DidAlloc(imalloc,
ptr + 4);
3231 ok(
ret == 0,
"Unexpected return value %d.\n",
ret);
3234 size = IMalloc_GetSize(imalloc,
NULL);
3237 size = IMalloc_GetSize(imalloc,
ptr);
3238 ok(
size == 16,
"Unexpected return value.\n");
3240 IMalloc_Free(imalloc,
ptr);
3242 IMalloc_Release(imalloc);
3251 if (!pCoGetApartmentType)
3253 win_skip(
"CoGetApartmentType not present\n");
3263 ok(
type == 0xdeadbeef,
"Expected 0xdeadbeef, got %u\n",
type);
3274 ok(
type == APTTYPE_CURRENT,
"Expected APTTYPE_CURRENT, got %u\n",
type);
3280 ok(
hr ==
S_OK,
"CoInitializeEx failed, error: 0x%08lx\n",
hr);
3282 ok(
hr ==
S_OK,
"CoGetApartmentType failed, error: 0x%08lx\n",
hr);
3290 ok(
hr ==
S_OK,
"CoInitializeEx failed, error: 0x%08lx\n",
hr);
3292 ok(
hr ==
S_OK,
"CoGetApartmentType failed, error: 0x%08lx\n",
hr);
3303 IMallocSpy_AddRef(iface);
3322 ok(0,
"unexpected call\n");
3328 ok(0,
"unexpected call\n");
3334 ok(0,
"unexpected call\n");
3340 ok(0,
"unexpected call\n");
3345 ok(0,
"unexpected call\n");
3351 ok(0,
"unexpected call\n");
3357 ok(0,
"unexpected call\n");
3363 ok(0,
"unexpected call\n");
3369 ok(0,
"unexpected call\n");
3375 ok(0,
"unexpected call\n");
3381 ok(0,
"unexpected call\n");
3386 ok(0,
"unexpected call\n");
3433 ok(imalloc !=
NULL,
"got %p\n", imalloc);
3435 IMalloc_Free(imalloc,
NULL);
3437 IMalloc_Release(imalloc);
3465 IInitializeSpy_AddRef(iface);
3545 ok(
hr ==
S_OK,
"Failed to initialize COM, hr %#lx.\n",
hr);
3561 ok(
hr ==
S_OK,
"CoInitializeEx failed: %#lx\n",
hr);
3632 ok(
hr ==
S_FALSE,
"Failed to initialize COM, hr %#lx.\n",
hr);
3660 ok(
hr ==
S_OK,
"Failed to initialize COM, hr %#lx.\n",
hr);
3676 IUnknown_AddRef(iface);
3683 IUnknown_AddRef(iface);
3707 ok(0,
"unexpected call\n");
3713 ok(0,
"unexpected call\n");
3729 ok(0,
"unexpected call\n");
3735 ok(0,
"unexpected call\n");
3757 IClassFactory_AddRef(iface);
3790 ok(0,
"unexpected call\n");
3806 static const WCHAR filenameW[] = {
'd',
'u',
'm',
'm',
'y',
'p',
'a',
't',
'h',0};
3822 ok(mqi[0].pItf ==
NULL,
"got %p\n", mqi[0].pItf);
3831 ok(mqi[0].pItf ==
NULL,
"got %p\n", mqi[0].pItf);
3839 mqi[0].pItf = (
void*)0xdeadbeef;
3844 ok(mqi[0].pItf == (
void*)0xdeadbeef,
"got %p\n", mqi[0].pItf);
3846 ok(mqi[0].
hr ==
S_OK,
"got 0x%08lx\n", mqi[0].
hr);
3849 mqi[0].pItf = (
void*)0xdeadbeef;
3854 ok(mqi[0].pItf == (
void*)0xdeadbeef,
"got %p\n", mqi[0].pItf);
3862 ok(mqi[0].pItf !=
NULL,
"got %p\n", mqi[0].pItf);
3863 ok(mqi[0].
hr ==
S_OK,
"got 0x%08lx\n", mqi[0].
hr);
3870 ok(mqi[0].pItf !=
NULL,
"got %p\n", mqi[0].pItf);
3871 ok(mqi[0].
hr ==
S_OK,
"got 0x%08lx\n", mqi[0].
hr);
3879 ok(mqi[0].pItf !=
NULL,
"got %p\n", mqi[0].pItf);
3880 ok(mqi[0].
hr ==
S_OK,
"got 0x%08lx\n", mqi[0].
hr);
3891 ok(
hr == 0x8000efef,
"got 0x%08lx\n",
hr);
3892 ok(mqi[0].pItf ==
NULL,
"got %p\n", mqi[0].pItf);
3893 ok(mqi[0].
hr == 0x8000efef,
"got 0x%08lx\n", mqi[0].
hr);
3894 ok(mqi[1].pItf ==
NULL,
"got %p\n", mqi[1].pItf);
3895 ok(mqi[1].
hr == 0x8000efef,
"got 0x%08lx\n", mqi[1].
hr);
3906 ok(
hr == 0x8000fefe,
"got 0x%08lx\n",
hr);
3907 ok(mqi[0].pItf ==
NULL,
"got %p\n", mqi[0].pItf);
3908 ok(mqi[0].
hr == 0x8000fefe,
"got 0x%08lx\n", mqi[0].
hr);
3909 ok(mqi[1].pItf ==
NULL,
"got %p\n", mqi[1].pItf);
3910 ok(mqi[1].
hr == 0x8000fefe,
"got 0x%08lx\n", mqi[1].
hr);
3932 win_skip(
"CLSID_GlobalOptions not available\n");
3964 pCoGetObjectContext = (
void*)
GetProcAddress(hOle32,
"CoGetObjectContext");
3965 pCoSwitchCallContext = (
void*)
GetProcAddress(hOle32,
"CoSwitchCallContext");
3966 pCoGetContextToken = (
void*)
GetProcAddress(hOle32,
"CoGetContextToken");
3967 pCoGetApartmentType = (
void*)
GetProcAddress(hOle32,
"CoGetApartmentType");
3968 pCoIncrementMTAUsage = (
void*)
GetProcAddress(hOle32,
"CoIncrementMTAUsage");
3969 pCoDecrementMTAUsage = (
void*)
GetProcAddress(hOle32,
"CoDecrementMTAUsage");
3970 pCoCreateInstanceFromApp = (
void*)
GetProcAddress(hOle32,
"CoCreateInstanceFromApp");
3971 pRegDeleteKeyExA = (
void*)
GetProcAddress(hAdvapi32,
"RegDeleteKeyExA");
3972 pRegOverridePredefKey = (
void*)
GetProcAddress(hAdvapi32,
"RegOverridePredefKey");
3990 IUnknown_Release(unk);
3994 IUnknown_Release(unk);
3998 IComThreadingInfo_Release(threading_info);
4064 ok(id2 && id2 !=
id,
"Unexpected id from another thread.\n");
4069 CO_MTA_USAGE_COOKIE
cookie, cookie2;
4072 if (!pCoIncrementMTAUsage)
4074 win_skip(
"CoIncrementMTAUsage() is not available.\n");
4081 hr = pCoIncrementMTAUsage(&
cookie);
4086 hr = pCoIncrementMTAUsage(&cookie2);
4088 ok(cookie2 !=
NULL && cookie2 !=
cookie,
"Unexpected cookie %p.\n", cookie2);
4097 hr = pCoDecrementMTAUsage(cookie2);
4108 hr = pCoIncrementMTAUsage(&
cookie);
4124 static const CLSID *supported_classes[] =
4130 static const CLSID *unsupported_classes[] =
4142 if (!pCoCreateInstanceFromApp)
4144 win_skip(
"CoCreateInstanceFromApp() is not available.\n");
4152 memset(&mqi, 0,
sizeof(mqi));
4154 hr = pCoCreateInstanceFromApp(supported_classes[
i],
NULL, CLSCTX_INPROC_SERVER,
NULL, 1, &mqi);
4156 IUnknown_Release(mqi.pItf);
4160 IUnknown_Release(unk);
4165 memset(&mqi, 0,
sizeof(mqi));
4167 hr = pCoCreateInstanceFromApp(unsupported_classes[
i],
NULL, CLSCTX_INPROC_SERVER,
NULL, 1, &mqi);
4176 IUnknown_Release(unk);
4199 memset(&mqi, 0,
sizeof(mqi));
4211 ok(
hr == 0x80001235,
"Unexpected hr %#lx.\n",
hr);
4215 ok(
hr == 0x80001235,
"Unexpected hr %#lx.\n",
hr);
4311 IUnknown_Release(unk);
4369 "Unexpected flags %#lx.\n",
flags);
#define CO_E_NOTINITIALIZED
#define InterlockedIncrement
#define InterlockedDecrement
const GUID IID_IClassFactory
#define RegCloseKey(hKey)
const CLSID CLSID_GlobalOptions
const CLSID CLSID_ManualResetEvent
const CLSID CLSID_InProcFreeMarshaler
const CLSID CLSID_StdGlobalInterfaceTable
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)
HRESULT WINAPI DECLSPEC_HOTPATCH CLSIDFromProgID(LPCOLESTR progid, CLSID *clsid)
HRESULT WINAPI CoGetPSClsid(REFIID riid, CLSID *pclsid)
DWORD WINAPI CoGetCurrentProcess(void)
HRESULT WINAPI CoGetTreatAsClass(REFCLSID clsidOld, CLSID *clsidNew)
HRESULT WINAPI CoRegisterMessageFilter(IMessageFilter *filter, IMessageFilter **ret_filter)
HRESULT WINAPI IIDFromString(LPCOLESTR str, IID *iid)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstanceEx(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, COSERVERINFO *server_info, ULONG count, MULTI_QI *results)
HRESULT WINAPI CoRegisterInitializeSpy(IInitializeSpy *spy, ULARGE_INTEGER *cookie)
HRESULT WINAPI CoDisableCallCancellation(void *reserved)
HRESULT WINAPI DECLSPEC_HOTPATCH CoRevokeClassObject(DWORD cookie)
HRESULT WINAPI CoGetContextToken(ULONG_PTR *token)
HRESULT WINAPI CoEnableCallCancellation(void *reserved)
HRESULT WINAPI DECLSPEC_HOTPATCH ProgIDFromCLSID(REFCLSID clsid, LPOLESTR *progid)
INT WINAPI StringFromGUID2(REFGUID guid, LPOLESTR str, INT cmax)
void WINAPI DECLSPEC_HOTPATCH CoFreeUnusedLibraries(void)
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 CoGetObjectContext(REFIID riid, void **ppv)
HRESULT WINAPI CoGetCallContext(REFIID riid, void **obj)
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(void *reserved, DWORD model)
HRESULT WINAPI CoRegisterPSClsid(REFIID riid, REFCLSID rclsid)
HRESULT WINAPI CoCreateGuid(GUID *guid)
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 CoRevokeInitializeSpy(ULARGE_INTEGER cookie)
HRESULT WINAPI CoLockObjectExternal(IUnknown *object, BOOL lock, BOOL last_unlock_releases)
HRESULT WINAPI CLSIDFromString(LPCOLESTR str, LPCLSID clsid)
HRESULT WINAPI CoGetCurrentLogicalThreadId(GUID *id)
HRESULT WINAPI CoWaitForMultipleHandles(DWORD flags, DWORD timeout, ULONG handle_count, HANDLE *handles, DWORD *index)
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 CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL delete_on_release, IStream **stream)
HRESULT WINAPI CoMarshalInterThreadInterfaceInStream(REFIID riid, IUnknown *unk, IStream **stream)
HRESULT WINAPI CoGetInterfaceAndReleaseStream(IStream *stream, REFIID riid, void **obj)
HRESULT WINAPI CoMarshalInterface(IStream *stream, REFIID riid, IUnknown *unk, DWORD dest_context, void *pvDestContext, DWORD mshlFlags)
HRESULT WINAPI CoReleaseMarshalData(IStream *stream)
HRESULT WINAPI CoUnmarshalInterface(IStream *stream, REFIID riid, void **ppv)
#define ERROR_MOD_NOT_FOUND
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define GetCurrentProcess()
#define FILE_ATTRIBUTE_NORMAL
#define MultiByteToWideChar
#define ERROR_ACCESS_DENIED
static void cleanup(void)
VOID WINAPI ReleaseActCtx(IN HANDLE hActCtx)
BOOL WINAPI DeactivateActCtx(IN DWORD dwFlags, IN ULONG_PTR ulCookie)
BOOL WINAPI ActivateActCtx(IN HANDLE hActCtx, OUT PULONG_PTR ulCookie)
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)
BOOL WINAPI SetCurrentDirectoryA(IN LPCSTR lpPathName)
DWORD WINAPI GetFullPathNameW(IN LPCWSTR lpFileName, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart)
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
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)
HANDLE WINAPI CreateActCtxW(PCACTCTXW pActCtx)
BOOL WINAPI FindActCtxSectionGuid(DWORD dwFlags, const GUID *lpExtGuid, ULONG ulId, const GUID *lpSearchGuid, PACTCTX_SECTION_KEYED_DATA pInfo)
HRSRC WINAPI FindResourceA(HMODULE hModule, LPCSTR name, LPCSTR type)
DWORD WINAPI SizeofResource(HINSTANCE hModule, HRSRC hRsrc)
LPVOID WINAPI LockResource(HGLOBAL handle)
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
_ACRTIMP size_t __cdecl strlen(const char *)
HRESULT WINAPI CoTreatAsClass(REFCLSID clsidOld, REFCLSID clsidNew)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
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 void *static void *static LPDIRECTPLAY IUnknown * pUnk
GLuint GLuint GLsizei GLenum type
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
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
static const BOOL is_win64
LPSTR WINAPI lstrcatA(LPSTR lpString1, LPCSTR lpString2)
HRESULT WINAPI CoRevokeMallocSpy(void)
HRESULT WINAPI CoRegisterMallocSpy(IMallocSpy *spy)
void WINAPI CoTaskMemFree(void *ptr)
HRESULT WINAPI CoGetMalloc(DWORD context, IMalloc **imalloc)
static const WCHAR filenameW[]
static void test_object(void)
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 const GUID IID_Testiface7
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 void deactivate_context(HANDLE handle, ULONG_PTR cookie)
static void test_CoCreateInstanceFromApp(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 char testlib[MAX_PATH]
static void test_call_cancellation(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 IUnknown DWORD clscontext
static void test_IInitializeSpy(BOOL mt)
static HRESULT WINAPI getinstance_cf_LockServer(IClassFactory *iface, BOOL lock)
static const IUnknownVtbl TestCallContext_Vtbl
@ OLETLS_APARTMENTTHREADED
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)
static const char actctx_manifest2[]
#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 void test_CoGetCurrentProcess(void)
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 DWORD WINAPI co_get_current_process_thread(void *param)
static IUnknown DWORD void DWORD count
static void test_CoGetObjectContext(void)
static void extract_resource(const char *name, const char *type, const char *path)
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 test_oletlsdata(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 IUnknown DWORD void DWORD MULTI_QI * results
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 const GUID IID_Testiface8
static void test_CoCreateInstanceEx(void)
static void flush_messages(void)
static void test_mta_usage(void)
static HRESULT WINAPI testspy_QI(IMallocSpy *iface, REFIID riid, void **obj)
static HRESULT WINAPI EnumOLEVERB_Skip(IEnumOLEVERB *iface, ULONG celt)
static DWORD CALLBACK oletlsdata_test_thread(void *arg)
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 get_oletlsflags(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
@ COMGLB_EXCEPTION_HANDLE
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 miscstatusthumbnail
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
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)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateSemaphoreA(IN LPSECURITY_ATTRIBUTES lpSemaphoreAttributes OPTIONAL, IN LONG lInitialCount, IN LONG lMaximumCount, IN LPCSTR lpName OPTIONAL)
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
DWORD WINAPI GetCurrentProcessId(void)
#define REGDB_E_CLASSNOTREG
static HRESULT HRESULT_FROM_WIN32(unsigned int x)
#define CO_E_CANCEL_DISABLED
#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 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)