Commit 5eb648c8 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

user32/tests: Fix clipboard tests compilation with __WINESRC__ defined.

parent 74f20546
...@@ -282,7 +282,7 @@ static LRESULT CALLBACK clipboard_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPARA ...@@ -282,7 +282,7 @@ static LRESULT CALLBACK clipboard_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPARA
break; break;
} }
return DefWindowProc(hwnd, msg, wp, lp); return DefWindowProcA(hwnd, msg, wp, lp);
} }
static DWORD WINAPI clipboard_thread(void *param) static DWORD WINAPI clipboard_thread(void *param)
...@@ -307,14 +307,14 @@ static DWORD WINAPI clipboard_thread(void *param) ...@@ -307,14 +307,14 @@ static DWORD WINAPI clipboard_thread(void *param)
ok(r, "CloseClipboard failed: %d\n", GetLastError()); ok(r, "CloseClipboard failed: %d\n", GetLastError());
LeaveCriticalSection(&clipboard_cs); LeaveCriticalSection(&clipboard_cs);
r = PostMessage(win, WM_USER, 0, 0); r = PostMessageA(win, WM_USER, 0, 0);
ok(r, "PostMessage failed: %d\n", GetLastError()); ok(r, "PostMessage failed: %d\n", GetLastError());
return 0; return 0;
} }
static void test_messages(void) static void test_messages(void)
{ {
WNDCLASS cls; WNDCLASSA cls;
HWND win; HWND win;
MSG msg; MSG msg;
HANDLE thread; HANDLE thread;
...@@ -324,25 +324,25 @@ static void test_messages(void) ...@@ -324,25 +324,25 @@ static void test_messages(void)
memset(&cls, 0, sizeof(cls)); memset(&cls, 0, sizeof(cls));
cls.lpfnWndProc = clipboard_wnd_proc; cls.lpfnWndProc = clipboard_wnd_proc;
cls.hInstance = GetModuleHandle(0); cls.hInstance = GetModuleHandleA(NULL);
cls.lpszClassName = "clipboard_test"; cls.lpszClassName = "clipboard_test";
RegisterClass(&cls); RegisterClassA(&cls);
win = CreateWindow("clipboard_test", NULL, 0, 0, 0, 0, 0, NULL, 0, NULL, 0); win = CreateWindowA("clipboard_test", NULL, 0, 0, 0, 0, 0, NULL, 0, NULL, 0);
ok(win != NULL, "CreateWindow failed: %d\n", GetLastError()); ok(win != NULL, "CreateWindow failed: %d\n", GetLastError());
thread = CreateThread(NULL, 0, clipboard_thread, (void*)win, 0, &tid); thread = CreateThread(NULL, 0, clipboard_thread, (void*)win, 0, &tid);
ok(thread != NULL, "CreateThread failed: %d\n", GetLastError()); ok(thread != NULL, "CreateThread failed: %d\n", GetLastError());
while(GetMessage(&msg, NULL, 0, 0)) { while(GetMessageA(&msg, NULL, 0, 0)) {
TranslateMessage(&msg); TranslateMessage(&msg);
DispatchMessage(&msg); DispatchMessageA(&msg);
} }
ok(WaitForSingleObject(thread, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n"); ok(WaitForSingleObject(thread, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
CloseHandle(thread); CloseHandle(thread);
UnregisterClass("clipboard_test", GetModuleHandle(0)); UnregisterClassA("clipboard_test", GetModuleHandleA(NULL));
DeleteCriticalSection(&clipboard_cs); DeleteCriticalSection(&clipboard_cs);
} }
......
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