Commit 54b883ef authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

oleaut32/tests: Fix tmarshal tests compilation with __WINESRC__ defined.

parent 5cf89fd5
...@@ -80,11 +80,11 @@ static DWORD CALLBACK host_object_proc(LPVOID p) ...@@ -80,11 +80,11 @@ static DWORD CALLBACK host_object_proc(LPVOID p)
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 */
PeekMessage(&msg, NULL, WM_USER, WM_USER, PM_NOREMOVE); PeekMessageA(&msg, NULL, WM_USER, WM_USER, PM_NOREMOVE);
SetEvent(data->marshal_event); SetEvent(data->marshal_event);
while (GetMessage(&msg, NULL, 0, 0)) while (GetMessageA(&msg, NULL, 0, 0))
{ {
if (msg.hwnd == NULL && msg.message == RELEASEMARSHALDATA) if (msg.hwnd == NULL && msg.message == RELEASEMARSHALDATA)
{ {
...@@ -93,7 +93,7 @@ static DWORD CALLBACK host_object_proc(LPVOID p) ...@@ -93,7 +93,7 @@ static DWORD CALLBACK host_object_proc(LPVOID p)
SetEvent((HANDLE)msg.lParam); SetEvent((HANDLE)msg.lParam);
} }
else else
DispatchMessage(&msg); DispatchMessageA(&msg);
} }
HeapFree(GetProcessHeap(), 0, data); HeapFree(GetProcessHeap(), 0, data);
...@@ -106,7 +106,7 @@ static DWORD CALLBACK host_object_proc(LPVOID p) ...@@ -106,7 +106,7 @@ static DWORD CALLBACK host_object_proc(LPVOID p)
static DWORD start_host_object2(IStream *stream, REFIID riid, IUnknown *object, MSHLFLAGS marshal_flags, IMessageFilter *filter, HANDLE *thread) static DWORD start_host_object2(IStream *stream, REFIID riid, IUnknown *object, MSHLFLAGS marshal_flags, IMessageFilter *filter, HANDLE *thread)
{ {
DWORD tid = 0; DWORD tid = 0;
HANDLE marshal_event = CreateEvent(NULL, FALSE, FALSE, NULL); HANDLE marshal_event = CreateEventA(NULL, FALSE, FALSE, NULL);
struct host_object_data *data = HeapAlloc(GetProcessHeap(), 0, sizeof(*data)); struct host_object_data *data = HeapAlloc(GetProcessHeap(), 0, sizeof(*data));
data->stream = stream; data->stream = stream;
...@@ -135,8 +135,8 @@ static DWORD start_host_object(IStream *stream, REFIID riid, IUnknown *object, M ...@@ -135,8 +135,8 @@ static DWORD start_host_object(IStream *stream, REFIID riid, IUnknown *object, M
* same thread that marshaled the interface in the first place. */ * same thread that marshaled the interface in the first place. */
static void release_host_object(DWORD tid) static void release_host_object(DWORD tid)
{ {
HANDLE event = CreateEvent(NULL, FALSE, FALSE, NULL); HANDLE event = CreateEventA(NULL, FALSE, FALSE, NULL);
PostThreadMessage(tid, RELEASEMARSHALDATA, 0, (LPARAM)event); PostThreadMessageA(tid, RELEASEMARSHALDATA, 0, (LPARAM)event);
WaitForSingleObject(event, INFINITE); WaitForSingleObject(event, INFINITE);
CloseHandle(event); CloseHandle(event);
} }
...@@ -144,7 +144,7 @@ static void release_host_object(DWORD tid) ...@@ -144,7 +144,7 @@ static void release_host_object(DWORD tid)
static void end_host_object(DWORD tid, HANDLE thread) static void end_host_object(DWORD tid, HANDLE thread)
{ {
BOOL ret = PostThreadMessage(tid, WM_QUIT, 0, 0); BOOL ret = PostThreadMessageA(tid, WM_QUIT, 0, 0);
ok(ret, "PostThreadMessage failed with error %d\n", GetLastError()); ok(ret, "PostThreadMessage failed with error %d\n", GetLastError());
/* be careful of races - don't return until hosting thread has terminated */ /* be careful of races - don't return until hosting thread has terminated */
WaitForSingleObject(thread, INFINITE); WaitForSingleObject(thread, INFINITE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment