- Missing from patch 11. This should fix it.
[reactos.git] / rostests / apitests / user32 / SendMessageTimeout.c
1 /*
2 * PROJECT: ReactOS API tests
3 * LICENSE: LGPLv2.1+ - See COPYING.LIB in the top level directory
4 * PURPOSE: Test for SendMessageTimeout
5 * PROGRAMMERS: Thomas Faber <thomas.faber@reactos.org>
6 */
7
8 #include <apitest.h>
9 #include <winuser.h>
10
11 static
12 void
13 TestSendMessageTimeout(HWND hWnd, UINT Msg)
14 {
15 LRESULT ret;
16 DWORD_PTR result;
17
18 ret = SendMessageTimeoutW(hWnd, Msg, 0, 0, SMTO_NORMAL, 0, NULL);
19 ok(ret == 0, "ret = %Id\n", ret);
20
21 result = 0x55555555;
22 ret = SendMessageTimeoutW(hWnd, Msg, 0, 0, SMTO_NORMAL, 0, &result);
23 ok(ret == 0, "ret = %Id\n", ret);
24 ok(result == 0, "result = %Iu\n", result);
25
26 ret = SendMessageTimeoutA(hWnd, Msg, 0, 0, SMTO_NORMAL, 0, NULL);
27 ok(ret == 0, "ret = %Id\n", ret);
28
29 result = 0x55555555;
30 ret = SendMessageTimeoutA(hWnd, Msg, 0, 0, SMTO_NORMAL, 0, &result);
31 ok(ret == 0, "ret = %Id\n", ret);
32 ok(result == 0, "result = %Iu\n", result);
33 }
34
35 START_TEST(SendMessageTimeout)
36 {
37 TestSendMessageTimeout(NULL, WM_USER);
38 TestSendMessageTimeout(NULL, WM_PAINT);
39 TestSendMessageTimeout(NULL, WM_GETICON);
40 }