ole32/tests: Store GUIDs by reference.
Fixes MSVC build. Signed-off-by: Thomas Faber <thomas.faber@reactos.org> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b5627d742c
commit
64041e69e3
|
@ -560,12 +560,12 @@ static IPSFactoryBuffer PSFactoryBuffer = { &PSFactoryBufferVtbl };
|
||||||
struct host_object_data
|
struct host_object_data
|
||||||
{
|
{
|
||||||
IStream *stream;
|
IStream *stream;
|
||||||
IID iid;
|
const IID *iid;
|
||||||
IUnknown *object;
|
IUnknown *object;
|
||||||
MSHLFLAGS marshal_flags;
|
MSHLFLAGS marshal_flags;
|
||||||
IMessageFilter *filter;
|
IMessageFilter *filter;
|
||||||
IUnknown *register_object;
|
IUnknown *register_object;
|
||||||
CLSID register_clsid;
|
const CLSID *register_clsid;
|
||||||
HANDLE marshal_event;
|
HANDLE marshal_event;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -581,7 +581,7 @@ static DWORD CALLBACK host_object_proc(LPVOID p)
|
||||||
pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||||
|
|
||||||
if(data->register_object) {
|
if(data->register_object) {
|
||||||
hr = CoRegisterClassObject(&data->register_clsid, data->register_object,
|
hr = CoRegisterClassObject(data->register_clsid, data->register_object,
|
||||||
CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, ®istration_key);
|
CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, ®istration_key);
|
||||||
ok(hr == S_OK, "CoRegisterClassObject failed: %08x\n", hr);
|
ok(hr == S_OK, "CoRegisterClassObject failed: %08x\n", hr);
|
||||||
}
|
}
|
||||||
|
@ -594,7 +594,7 @@ static DWORD CALLBACK host_object_proc(LPVOID p)
|
||||||
ok_ole_success(hr, CoRegisterMessageFilter);
|
ok_ole_success(hr, CoRegisterMessageFilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = CoMarshalInterface(data->stream, &data->iid, data->object, MSHCTX_INPROC, NULL, data->marshal_flags);
|
hr = CoMarshalInterface(data->stream, data->iid, data->object, MSHCTX_INPROC, NULL, data->marshal_flags);
|
||||||
ok_ole_success(hr, CoMarshalInterface);
|
ok_ole_success(hr, CoMarshalInterface);
|
||||||
|
|
||||||
/* force the message queue to be created before signaling parent thread */
|
/* force the message queue to be created before signaling parent thread */
|
||||||
|
@ -639,7 +639,7 @@ static DWORD start_host_object2(struct host_object_data *object_data, HANDLE *th
|
||||||
|
|
||||||
static DWORD start_host_object(IStream *stream, REFIID riid, IUnknown *object, MSHLFLAGS marshal_flags, HANDLE *thread)
|
static DWORD start_host_object(IStream *stream, REFIID riid, IUnknown *object, MSHLFLAGS marshal_flags, HANDLE *thread)
|
||||||
{
|
{
|
||||||
struct host_object_data object_data = { stream, *riid, object, marshal_flags };
|
struct host_object_data object_data = { stream, riid, object, marshal_flags };
|
||||||
return start_host_object2(&object_data, thread);
|
return start_host_object2(&object_data, thread);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1254,9 +1254,9 @@ static void test_marshal_channel_buffer(void)
|
||||||
HANDLE thread;
|
HANDLE thread;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
struct host_object_data object_data = { NULL, IID_IOleClientSite, (IUnknown*)&Test_OleClientSite,
|
struct host_object_data object_data = { NULL, &IID_IOleClientSite, (IUnknown*)&Test_OleClientSite,
|
||||||
MSHLFLAGS_NORMAL, NULL, (IUnknown*)&PSFactoryBuffer,
|
MSHLFLAGS_NORMAL, NULL, (IUnknown*)&PSFactoryBuffer,
|
||||||
CLSID_WineTestPSFactoryBuffer };
|
&CLSID_WineTestPSFactoryBuffer };
|
||||||
|
|
||||||
cLocks = 0;
|
cLocks = 0;
|
||||||
external_connections = 0;
|
external_connections = 0;
|
||||||
|
@ -2321,7 +2321,7 @@ static void test_message_filter(void)
|
||||||
IMessageFilter *prev_filter = NULL;
|
IMessageFilter *prev_filter = NULL;
|
||||||
HANDLE thread;
|
HANDLE thread;
|
||||||
|
|
||||||
struct host_object_data object_data = { NULL, IID_IClassFactory, (IUnknown*)&Test_ClassFactory,
|
struct host_object_data object_data = { NULL, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory,
|
||||||
MSHLFLAGS_NORMAL, &MessageFilter };
|
MSHLFLAGS_NORMAL, &MessageFilter };
|
||||||
|
|
||||||
cLocks = 0;
|
cLocks = 0;
|
||||||
|
@ -4213,7 +4213,7 @@ static void test_channel_hook(void)
|
||||||
HANDLE thread;
|
HANDLE thread;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
struct host_object_data object_data = { NULL, IID_IClassFactory, (IUnknown*)&Test_ClassFactory,
|
struct host_object_data object_data = { NULL, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory,
|
||||||
MSHLFLAGS_NORMAL, &MessageFilter };
|
MSHLFLAGS_NORMAL, &MessageFilter };
|
||||||
|
|
||||||
hr = CoRegisterChannelHook(&EXTENTID_WineTest, &TestChannelHook);
|
hr = CoRegisterChannelHook(&EXTENTID_WineTest, &TestChannelHook);
|
||||||
|
|
Loading…
Reference in New Issue