ole32/tests: Link to CoInitializeEx() directly.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c1192daa0a
commit
d65c9fc94f
|
@ -70,7 +70,6 @@ DEFINE_EXPECT(PreUninitialize);
|
|||
DEFINE_EXPECT(PostUninitialize);
|
||||
|
||||
/* functions that are not present on all versions of Windows */
|
||||
static HRESULT (WINAPI * pCoInitializeEx)(LPVOID lpReserved, DWORD dwCoInit);
|
||||
static HRESULT (WINAPI * pCoGetObjectContext)(REFIID riid, LPVOID *ppv);
|
||||
static HRESULT (WINAPI * pCoSwitchCallContext)(IUnknown *pObject, IUnknown **ppOldObject);
|
||||
static HRESULT (WINAPI * pCoGetTreatAsClass)(REFCLSID clsidOld, LPCLSID pClsidNew);
|
||||
|
@ -721,7 +720,7 @@ static void test_CoGetClassObject(void)
|
|||
return;
|
||||
}
|
||||
|
||||
pCoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
|
||||
hr = CoGetClassObject(rclsid, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void **)&pUnk);
|
||||
if (hr == S_OK)
|
||||
|
@ -903,7 +902,7 @@ static void test_CoRegisterMessageFilter(void)
|
|||
"CoRegisterMessageFilter should have failed with CO_E_NOT_SUPPORTED instead of 0x%08x\n",
|
||||
hr);
|
||||
|
||||
pCoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
prev_filter = (IMessageFilter *)0xdeadbeef;
|
||||
hr = CoRegisterMessageFilter(&MessageFilter, &prev_filter);
|
||||
ok(hr == CO_E_NOT_SUPPORTED,
|
||||
|
@ -913,7 +912,7 @@ static void test_CoRegisterMessageFilter(void)
|
|||
"prev_filter should have been set to %p\n", prev_filter);
|
||||
CoUninitialize();
|
||||
|
||||
pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
|
||||
hr = CoRegisterMessageFilter(NULL, NULL);
|
||||
ok_ole_success(hr, "CoRegisterMessageFilter");
|
||||
|
@ -1103,7 +1102,7 @@ static DWORD CALLBACK register_ps_clsid_thread(void *context)
|
|||
HRESULT hr;
|
||||
CLSID clsid = {0};
|
||||
|
||||
pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
|
||||
hr = CoGetPSClsid(&IID_IWineTest, &clsid);
|
||||
ok_ole_success(hr, "CoGetPSClsid");
|
||||
|
@ -1131,7 +1130,7 @@ static void test_CoRegisterPSClsid(void)
|
|||
hr = CoRegisterPSClsid(&IID_IWineTest, &CLSID_WineTestPSFactoryBuffer);
|
||||
ok(hr == CO_E_NOTINITIALIZED, "CoRegisterPSClsid should have returned CO_E_NOTINITIALIZED instead of 0x%08x\n", hr);
|
||||
|
||||
pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
|
||||
hr = CoRegisterClassObject(&CLSID_WineTestPSFactoryBuffer, (IUnknown *)&PSFactoryBuffer,
|
||||
CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, &dwRegistrationKey);
|
||||
|
@ -1189,7 +1188,7 @@ static void test_CoRegisterPSClsid(void)
|
|||
|
||||
CoUninitialize();
|
||||
|
||||
pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
|
||||
hr = CoGetPSClsid(&IID_IWineTest, &clsid);
|
||||
ok(hr == REGDB_E_IIDNOTREG, "CoGetPSClsid should have returned REGDB_E_IIDNOTREG instead of 0x%08x\n", hr);
|
||||
|
@ -1199,7 +1198,7 @@ static void test_CoRegisterPSClsid(void)
|
|||
|
||||
CoUninitialize();
|
||||
|
||||
pCoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
|
||||
hr = CoRegisterPSClsid(&IID_IWineTest, &CLSID_WineTestPSFactoryBuffer);
|
||||
ok_ole_success(hr, "CoRegisterPSClsid");
|
||||
|
@ -1238,7 +1237,7 @@ static void test_CoGetPSClsid(void)
|
|||
"CoGetPSClsid should have returned CO_E_NOTINITIALIZED instead of 0x%08x\n",
|
||||
hr);
|
||||
|
||||
pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
|
||||
hr = CoGetPSClsid(&IID_IClassFactory, &clsid);
|
||||
ok_ole_success(hr, "CoGetPSClsid");
|
||||
|
@ -1385,7 +1384,7 @@ static void test_CoUnmarshalInterface(void)
|
|||
todo_wine
|
||||
ok(hr == CO_E_NOTINITIALIZED, "CoUnmarshalInterface should have returned CO_E_NOTINITIALIZED instead of 0x%08x\n", hr);
|
||||
|
||||
pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
|
||||
hr = CoUnmarshalInterface(pStream, &IID_IUnknown, (void **)&pProxy);
|
||||
ok(hr == STG_E_READFAULT, "CoUnmarshalInterface should have returned STG_E_READFAULT instead of 0x%08x\n", hr);
|
||||
|
@ -1403,7 +1402,7 @@ static void test_CoGetInterfaceAndReleaseStream(void)
|
|||
HRESULT hr;
|
||||
IUnknown *pUnk;
|
||||
|
||||
pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
|
||||
hr = CoGetInterfaceAndReleaseStream(NULL, &IID_IUnknown, (void**)&pUnk);
|
||||
ok(hr == E_INVALIDARG, "hr %08x\n", hr);
|
||||
|
@ -1418,7 +1417,7 @@ static void test_CoMarshalInterface(void)
|
|||
HRESULT hr;
|
||||
static const LARGE_INTEGER llZero;
|
||||
|
||||
pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
|
||||
hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream);
|
||||
ok_ole_success(hr, "CreateStreamOnHGlobal");
|
||||
|
@ -1453,7 +1452,7 @@ static void test_CoMarshalInterThreadInterfaceInStream(void)
|
|||
HRESULT hr;
|
||||
IClassFactory *pProxy;
|
||||
|
||||
pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
|
||||
cLocks = 0;
|
||||
|
||||
|
@ -1489,7 +1488,7 @@ static void test_CoRegisterClassObject(void)
|
|||
HRESULT hr;
|
||||
IClassFactory *pcf;
|
||||
|
||||
pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
|
||||
/* CLSCTX_INPROC_SERVER */
|
||||
hr = CoRegisterClassObject(&CLSID_WineOOPTest, (IUnknown *)&Test_ClassFactory,
|
||||
|
@ -1550,7 +1549,7 @@ static void test_CoRegisterClassObject(void)
|
|||
ok_ole_success(hr, "CoRegisterClassObject");
|
||||
|
||||
CoUninitialize();
|
||||
pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
|
||||
hr = CoGetClassObject(&CLSID_WineOOPTest, CLSCTX_INPROC_SERVER, NULL,
|
||||
&IID_IClassFactory, (void **)&pcf);
|
||||
|
@ -1607,7 +1606,7 @@ static DWORD CALLBACK get_class_object_thread(LPVOID pv)
|
|||
CLSCTX clsctx = (CLSCTX)(DWORD_PTR)pv;
|
||||
HRESULT hr;
|
||||
|
||||
pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
|
||||
hr = get_class_object(clsctx);
|
||||
|
||||
|
@ -1623,7 +1622,7 @@ static DWORD CALLBACK get_class_object_proxy_thread(LPVOID pv)
|
|||
IClassFactory *pcf;
|
||||
IMultiQI *pMQI;
|
||||
|
||||
pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
|
||||
hr = CoGetClassObject(&CLSID_WineOOPTest, clsctx, NULL, &IID_IClassFactory,
|
||||
(void **)&pcf);
|
||||
|
@ -1646,7 +1645,7 @@ static DWORD CALLBACK register_class_object_thread(LPVOID pv)
|
|||
HRESULT hr;
|
||||
DWORD cookie;
|
||||
|
||||
pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
|
||||
hr = CoRegisterClassObject(&CLSID_WineOOPTest, (IUnknown *)&Test_ClassFactory,
|
||||
CLSCTX_INPROC_SERVER, REGCLS_SINGLEUSE, &cookie);
|
||||
|
@ -1661,7 +1660,7 @@ static DWORD CALLBACK revoke_class_object_thread(LPVOID pv)
|
|||
DWORD cookie = (DWORD_PTR)pv;
|
||||
HRESULT hr;
|
||||
|
||||
pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
|
||||
hr = CoRevokeClassObject(cookie);
|
||||
|
||||
|
@ -1678,7 +1677,7 @@ static void test_registered_object_thread_affinity(void)
|
|||
DWORD tid;
|
||||
DWORD exitcode;
|
||||
|
||||
pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
|
||||
/* CLSCTX_INPROC_SERVER */
|
||||
|
||||
|
@ -1776,7 +1775,7 @@ static void test_CoFreeUnusedLibraries(void)
|
|||
DWORD tid;
|
||||
HANDLE thread;
|
||||
|
||||
pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
|
||||
ok(!is_module_loaded("urlmon.dll"), "urlmon.dll shouldn't be loaded\n");
|
||||
|
||||
|
@ -1833,7 +1832,7 @@ static void test_CoGetObjectContext(void)
|
|||
ok(hr == CO_E_NOTINITIALIZED, "CoGetObjectContext should have returned CO_E_NOTINITIALIZED instead of 0x%08x\n", hr);
|
||||
ok(pComThreadingInfo == NULL, "pComThreadingInfo should have been set to NULL\n");
|
||||
|
||||
pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
|
||||
test_apt_type(APTTYPE_MAINSTA, APTTYPEQUALIFIER_NONE);
|
||||
|
||||
|
@ -1875,7 +1874,7 @@ static void test_CoGetObjectContext(void)
|
|||
|
||||
CoUninitialize();
|
||||
|
||||
pCoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
|
||||
hr = pCoGetObjectContext(&IID_IComThreadingInfo, (void **)&pComThreadingInfo);
|
||||
ok_ole_success(hr, "CoGetObjectContext");
|
||||
|
@ -2178,7 +2177,7 @@ static void test_CoInitializeEx(void)
|
|||
{
|
||||
HRESULT hr;
|
||||
|
||||
hr = pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
ok(hr == S_OK, "CoInitializeEx failed with error 0x%08x\n", hr);
|
||||
|
||||
/* Calling OleInitialize for the first time should yield S_OK even with
|
||||
|
@ -2203,7 +2202,7 @@ static void test_OleInitialize_InitCounting(void)
|
|||
REFCLSID rclsid = &CLSID_InternetZoneManager;
|
||||
|
||||
/* 1. OleInitialize fails but OleUninitialize is still called: apartment stays initialized */
|
||||
hr = pCoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
ok(hr == S_OK, "CoInitializeEx(COINIT_MULTITHREADED) failed with error 0x%08x\n", hr);
|
||||
|
||||
hr = OleInitialize(NULL);
|
||||
|
@ -2605,7 +2604,7 @@ static DWORD CALLBACK test_CoWaitForMultipleHandles_thread(LPVOID arg)
|
|||
MSG msg;
|
||||
int ret;
|
||||
|
||||
hr = pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
ok(hr == S_OK, "CoInitializeEx failed with error 0x%08x\n", hr);
|
||||
|
||||
hWnd = CreateWindowExA(0, cls_name, "Test (thread)", WS_TILEDWINDOW, 0, 0, 640, 480, 0, 0, 0, 0);
|
||||
|
@ -2647,7 +2646,7 @@ static DWORD CALLBACK test_CoWaitForMultipleHandles_thread(LPVOID arg)
|
|||
DestroyWindow(hWnd);
|
||||
CoUninitialize();
|
||||
|
||||
hr = pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
ok(hr == S_OK, "CoInitializeEx failed with error 0x%08x\n", hr);
|
||||
|
||||
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream);
|
||||
|
@ -2692,7 +2691,7 @@ static void test_CoWaitForMultipleHandles(void)
|
|||
HWND hWnd;
|
||||
MSG msg;
|
||||
|
||||
hr = pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
ok(hr == S_OK, "CoInitializeEx failed with error 0x%08x\n", hr);
|
||||
|
||||
memset(&wc, 0, sizeof(wc));
|
||||
|
@ -3141,7 +3140,7 @@ static void test_CoGetApartmentType(void)
|
|||
|
||||
type = 0xdeadbeef;
|
||||
qualifier = 0xdeadbeef;
|
||||
hr = pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
ok(hr == S_OK, "CoInitializeEx failed, error: 0x%08x\n", hr);
|
||||
hr = pCoGetApartmentType(&type, &qualifier);
|
||||
ok(hr == S_OK, "CoGetApartmentType failed, error: 0x%08x\n", hr);
|
||||
|
@ -3151,7 +3150,7 @@ static void test_CoGetApartmentType(void)
|
|||
|
||||
type = 0xdeadbeef;
|
||||
qualifier = 0xdeadbeef;
|
||||
hr = pCoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
ok(hr == S_OK, "CoInitializeEx failed, error: 0x%08x\n", hr);
|
||||
hr = pCoGetApartmentType(&type, &qualifier);
|
||||
ok(hr == S_OK, "CoGetApartmentType failed, error: 0x%08x\n", hr);
|
||||
|
@ -3422,7 +3421,7 @@ static void test_IInitializeSpy(BOOL mt)
|
|||
|
||||
if (mt)
|
||||
{
|
||||
hr = pCoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
ok(hr == S_OK, "CoInitializeEx failed: %#x\n", hr);
|
||||
}
|
||||
|
||||
|
@ -3674,7 +3673,7 @@ static void test_CoGetInstanceFromFile(void)
|
|||
DWORD cookie;
|
||||
HRESULT hr;
|
||||
|
||||
hr = pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
|
||||
/* CLSID is not specified, file does not exist */
|
||||
|
@ -3821,7 +3820,6 @@ static void init_funcs(void)
|
|||
pCoGetApartmentType = (void*)GetProcAddress(hOle32, "CoGetApartmentType");
|
||||
pRegDeleteKeyExA = (void*)GetProcAddress(hAdvapi32, "RegDeleteKeyExA");
|
||||
pRegOverridePredefKey = (void*)GetProcAddress(hAdvapi32, "RegOverridePredefKey");
|
||||
pCoInitializeEx = (void*)GetProcAddress(hOle32, "CoInitializeEx");
|
||||
|
||||
pActivateActCtx = (void*)GetProcAddress(hkernel32, "ActivateActCtx");
|
||||
pCreateActCtxW = (void*)GetProcAddress(hkernel32, "CreateActCtxW");
|
||||
|
@ -3922,12 +3920,6 @@ START_TEST(compobj)
|
|||
{
|
||||
init_funcs();
|
||||
|
||||
if (!pCoInitializeEx)
|
||||
{
|
||||
trace("You need DCOM95 installed to run this test\n");
|
||||
return;
|
||||
}
|
||||
|
||||
GetTempPathA(ARRAY_SIZE(testlib), testlib);
|
||||
SetCurrentDirectoryA(testlib);
|
||||
lstrcatA(testlib, "\\testlib.dll");
|
||||
|
|
|
@ -64,7 +64,6 @@ static const GUID CLSID_DfMarshal = { 0x0000030b, 0x0000, 0x0000, { 0xc0, 0x00,
|
|||
static const GUID CLSID_ft_unmarshaler_1809 = {0x00000359, 0x0000, 0x0000, {0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}};
|
||||
|
||||
/* functions that are not present on all versions of Windows */
|
||||
static HRESULT (WINAPI * pCoInitializeEx)(LPVOID lpReserved, DWORD dwCoInit);
|
||||
static HRESULT (WINAPI *pDllGetClassObject)(REFCLSID,REFIID,LPVOID);
|
||||
|
||||
/* helper macros to make tests a bit leaner */
|
||||
|
@ -153,7 +152,7 @@ static void test_cocreateinstance_proxy(void)
|
|||
IMultiQI *pMQI;
|
||||
HRESULT hr;
|
||||
|
||||
pCoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
|
||||
hr = CoCreateInstance(&CLSID_ShellDesktop, NULL, CLSCTX_INPROC, &IID_IUnknown, (void **)&pProxy);
|
||||
ok_ole_success(hr, CoCreateInstance);
|
||||
|
@ -621,7 +620,7 @@ static DWORD CALLBACK host_object_proc(LPVOID p)
|
|||
HRESULT hr;
|
||||
MSG msg;
|
||||
|
||||
pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
|
||||
if(data->register_object) {
|
||||
hr = CoRegisterClassObject(data->register_clsid, data->register_object,
|
||||
|
@ -1237,7 +1236,7 @@ static void test_marshal_proxy_apartment_shutdown(void)
|
|||
|
||||
end_host_object(tid, thread);
|
||||
|
||||
pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
}
|
||||
|
||||
/* tests that proxies are released when the containing mta apartment is destroyed */
|
||||
|
@ -1250,7 +1249,7 @@ static void test_marshal_proxy_mta_apartment_shutdown(void)
|
|||
HANDLE thread;
|
||||
|
||||
CoUninitialize();
|
||||
pCoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
|
||||
cLocks = 0;
|
||||
external_connections = 0;
|
||||
|
@ -1282,7 +1281,7 @@ static void test_marshal_proxy_mta_apartment_shutdown(void)
|
|||
|
||||
end_host_object(tid, thread);
|
||||
|
||||
pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
}
|
||||
|
||||
static void test_marshal_channel_buffer(void)
|
||||
|
@ -1654,7 +1653,7 @@ static DWORD CALLBACK no_couninitialize_server_proc(LPVOID p)
|
|||
struct ncu_params *ncu_params = p;
|
||||
HRESULT hr;
|
||||
|
||||
pCoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
|
||||
hr = CoMarshalInterface(ncu_params->stream, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL);
|
||||
ok_ole_success(hr, CoMarshalInterface);
|
||||
|
@ -1728,7 +1727,7 @@ static DWORD CALLBACK no_couninitialize_client_proc(LPVOID p)
|
|||
HRESULT hr;
|
||||
IUnknown *pProxy = NULL;
|
||||
|
||||
pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
|
||||
hr = CoUnmarshalInterface(ncu_params->stream, &IID_IClassFactory, (void **)&pProxy);
|
||||
ok_ole_success(hr, CoUnmarshalInterface);
|
||||
|
@ -2005,7 +2004,7 @@ static DWORD CALLBACK duo_marshal_thread_proc(void *p)
|
|||
HANDLE hQuitEvent = data->hQuitEvent;
|
||||
MSG msg;
|
||||
|
||||
pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
|
||||
hr = CoMarshalInterface(data->pStream1, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory, MSHCTX_INPROC, NULL, data->marshal_flags1);
|
||||
ok_ole_success(hr, "CoMarshalInterface");
|
||||
|
@ -2485,7 +2484,7 @@ static DWORD CALLBACK bad_thread_proc(LPVOID p)
|
|||
if (SUCCEEDED(hr))
|
||||
IUnknown_Release(proxy);
|
||||
|
||||
pCoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
|
||||
hr = IClassFactory_CreateInstance(cf, NULL, &IID_IUnknown, (LPVOID*)&proxy);
|
||||
if (proxy) IUnknown_Release(proxy);
|
||||
|
@ -3642,7 +3641,7 @@ static HRESULT WINAPI local_server_GetClassID(IPersist *iface, CLSID *clsid)
|
|||
|
||||
/* Initialize and uninitialize the apartment to show that we
|
||||
* remain in the autojoined mta */
|
||||
hr = pCoInitializeEx( NULL, COINIT_MULTITHREADED );
|
||||
hr = CoInitializeEx( NULL, COINIT_MULTITHREADED );
|
||||
ok( hr == S_FALSE, "got %08x\n", hr );
|
||||
CoUninitialize();
|
||||
|
||||
|
@ -4473,13 +4472,12 @@ START_TEST(marshal)
|
|||
int argc;
|
||||
char **argv;
|
||||
|
||||
pCoInitializeEx = (void*)GetProcAddress(hOle32, "CoInitializeEx");
|
||||
pDllGetClassObject = (void*)GetProcAddress(hOle32, "DllGetClassObject");
|
||||
|
||||
argc = winetest_get_mainargs( &argv );
|
||||
if (argc > 2 && (!strcmp(argv[2], "-Embedding")))
|
||||
{
|
||||
pCoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
test_register_local_server();
|
||||
CoUninitialize();
|
||||
|
||||
|
@ -4491,7 +4489,7 @@ START_TEST(marshal)
|
|||
test_cocreateinstance_proxy();
|
||||
test_implicit_mta();
|
||||
|
||||
pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
|
||||
/* FIXME: test CoCreateInstanceEx */
|
||||
|
||||
|
|
Loading…
Reference in New Issue