Wine-Devel
Threads by month
- ----- 2026 -----
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- 4 participants
- 84517 discussions
[PATCH] dlls/user32/tests: enable compilation with long types (scroll.c)
by Eric Pouech March 12, 2022
by Eric Pouech March 12, 2022
March 12, 2022
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/user32/tests/scroll.c | 93 ++++++++++++++++++++++----------------------
1 file changed, 47 insertions(+), 46 deletions(-)
diff --git a/dlls/user32/tests/scroll.c b/dlls/user32/tests/scroll.c
index 40eb13943fc..3602b89af7f 100644
--- a/dlls/user32/tests/scroll.c
+++ b/dlls/user32/tests/scroll.c
@@ -17,6 +17,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#undef WINE_NO_LONG_TYPES /* temporary for migration */
#include <assert.h>
#include <stdarg.h>
@@ -120,7 +121,7 @@ static void test_EnableScrollBar(void)
todo_wine
ok( GetLastError() == ERROR_INVALID_PARAMETER
|| broken(GetLastError() == 0xdeadbeef), /* winxp */
- "GetLastError() = %u\n", GetLastError() );
+ "GetLastError() = %lu\n", GetLastError() );
/* disable window, try to re-enable */
ret = EnableWindow( hScroll, FALSE );
@@ -181,12 +182,12 @@ static void test_SetScrollPos(void)
SetLastError( 0xdeadbeef );
ret = SetScrollPos( mainwnd, SB_CTL, 30, TRUE );
ok( !ret, "The position should not be set.\n" );
- ok( GetLastError() == 0xdeadbeef, "GetLastError() = %u\n", GetLastError() );
+ ok( GetLastError() == 0xdeadbeef, "GetLastError() = %lu\n", GetLastError() );
SetLastError( 0xdeadbeef );
ret = GetScrollPos( mainwnd, SB_CTL );
ok( !ret, "The position should be equal to zero\n");
- ok( GetLastError() == 0xdeadbeef, "GetLastError() = %u\n", GetLastError() );
+ ok( GetLastError() == 0xdeadbeef, "GetLastError() = %lu\n", GetLastError() );
DestroyWindow(hScroll);
DestroyWindow(mainwnd);
@@ -242,7 +243,7 @@ static void test_GetScrollBarInfo(void)
GetWindowRect( hScroll, &rect );
ok( ret, "The GetWindowRect() call should not fail.\n" );
ok( !(sbi.rgstate[0] & (STATE_SYSTEM_INVISIBLE|STATE_SYSTEM_OFFSCREEN)),
- "unexpected rgstate(0x%x)\n", sbi.rgstate[0]);
+ "unexpected rgstate(0x%lx)\n", sbi.rgstate[0]);
ok(EqualRect(&rect, &sbi.rcScrollBar), "WindowRect %s != rcScrollBar %s\n",
wine_dbgstr_rect(&rect), wine_dbgstr_rect(&sbi.rcScrollBar));
@@ -301,40 +302,40 @@ static void scrollbar_test_default( DWORD style)
/* range is 0,0 if there are no H or V scroll bars. 0,100 otherwise */
if( !( style & ( WS_VSCROLL | WS_HSCROLL)))
ok( min == 0 && max == 0,
- "Scroll bar range is %d,%d. Expected 0,0. Style %08x\n", min, max, style);
+ "Scroll bar range is %d,%d. Expected 0,0. Style %08lx\n", min, max, style);
else
ok(( min == 0 && max == 100) ||
broken( min == 0 && max == 0), /* Win 9x/ME */
- "Scroll bar range is %d,%d. Expected 0,100. Style %08x\n", min, max, style);
+ "Scroll bar range is %d,%d. Expected 0,100. Style %08lx\n", min, max, style);
ret = GetScrollRange( hwnd, SB_HORZ, &min, &max);
ok( ret ||
broken( !ret) /* Win 9x/ME */ , "GetScrollRange failed.\n");
/* range is 0,0 if there are no H or V scroll bars. 0,100 otherwise */
if( !( style & ( WS_VSCROLL | WS_HSCROLL)))
ok( min == 0 && max == 0,
- "Scroll bar range is %d,%d. Expected 0,0. Style %08x\n", min, max, style);
+ "Scroll bar range is %d,%d. Expected 0,0. Style %08lx\n", min, max, style);
else
ok(( min == 0 && max == 100) ||
broken( min == 0 && max == 0), /* Win 9x/ME */
- "Scroll bar range is %d,%d. Expected 0,100. Style %08x\n", min, max, style);
+ "Scroll bar range is %d,%d. Expected 0,100. Style %08lx\n", min, max, style);
/* test GetScrollInfo, vist for vertical SB */
ret = GetScrollInfo( hwnd, SB_VERT, &si);
/* should fail if no H or V scroll bar styles are present. Succeed otherwise */
if( !( style & ( WS_VSCROLL | WS_HSCROLL)))
- ok( !ret, "GetScrollInfo succeeded unexpectedly. Style is %08x\n", style);
+ ok( !ret, "GetScrollInfo succeeded unexpectedly. Style is %08lx\n", style);
else
ok( ret ||
broken( !ret), /* Win 9x/ME */
- "GetScrollInfo failed unexpectedly. Style is %08x\n", style);
+ "GetScrollInfo failed unexpectedly. Style is %08lx\n", style);
/* Same for Horizontal SB */
ret = GetScrollInfo( hwnd, SB_HORZ, &si);
/* should fail if no H or V scroll bar styles are present. Succeed otherwise */
if( !( style & ( WS_VSCROLL | WS_HSCROLL)))
- ok( !ret, "GetScrollInfo succeeded unexpectedly. Style is %08x\n", style);
+ ok( !ret, "GetScrollInfo succeeded unexpectedly. Style is %08lx\n", style);
else
ok( ret ||
broken( !ret), /* Win 9x/ME */
- "GetScrollInfo failed unexpectedly. Style is %08x\n", style);
+ "GetScrollInfo failed unexpectedly. Style is %08lx\n", style);
/* now set the Vertical Scroll range to something that could be the default value it
* already has */;
ret = SetScrollRange( hwnd, SB_VERT, 0, 100, FALSE);
@@ -344,14 +345,14 @@ static void scrollbar_test_default( DWORD style)
ok( ret, "GetScrollRange failed.\n");
/* now the range should be 0,100 in ALL cases */
ok( min == 0 && max == 100,
- "Scroll bar range is %d,%d. Expected 0,100. Style %08x\n", min, max, style);
+ "Scroll bar range is %d,%d. Expected 0,100. Style %08lx\n", min, max, style);
/* See what is different now for GetScrollRange */
ret = GetScrollInfo( hwnd, SB_HORZ, &si);
/* should succeed in ALL cases */
- ok( ret, "GetScrollInfo failed unexpectedly. Style is %08x\n", style);
+ ok( ret, "GetScrollInfo failed unexpectedly. Style is %08lx\n", style);
ret = GetScrollInfo( hwnd, SB_VERT, &si);
/* should succeed in ALL cases */
- ok( ret, "GetScrollInfo failed unexpectedly. Style is %08x\n", style);
+ ok( ret, "GetScrollInfo failed unexpectedly. Style is %08lx\n", style);
/* report the windows style */
winstyle = GetWindowLongA( hwnd, GWL_STYLE );
/* WS_VSCROLL added to the window style */
@@ -360,10 +361,10 @@ static void scrollbar_test_default( DWORD style)
if (bThemeActive || style != WS_HSCROLL)
todo_wine
ok( (winstyle & (WS_HSCROLL|WS_VSCROLL)) == ( style | WS_VSCROLL),
- "unexpected style change %08x/%08x\n", winstyle, style);
+ "unexpected style change %08lx/%08lx\n", winstyle, style);
else
ok( (winstyle & (WS_HSCROLL|WS_VSCROLL)) == style,
- "unexpected style change %08x/%08x\n", winstyle, style);
+ "unexpected style change %08lx/%08lx\n", winstyle, style);
}
/* do the test again with H and V reversed.
* Start with a clean window */
@@ -380,14 +381,14 @@ static void scrollbar_test_default( DWORD style)
ok( ret, "GetScrollRange failed.\n");
/* now the range should be 0,100 in ALL cases */
ok( min == 0 && max == 100,
- "Scroll bar range is %d,%d. Expected 0,100. Style %08x\n", min, max, style);
+ "Scroll bar range is %d,%d. Expected 0,100. Style %08lx\n", min, max, style);
/* See what is different now for GetScrollRange */
ret = GetScrollInfo( hwnd, SB_HORZ, &si);
/* should succeed in ALL cases */
- ok( ret, "GetScrollInfo failed unexpectedly. Style is %08x\n", style);
+ ok( ret, "GetScrollInfo failed unexpectedly. Style is %08lx\n", style);
ret = GetScrollInfo( hwnd, SB_VERT, &si);
/* should succeed in ALL cases */
- ok( ret, "GetScrollInfo failed unexpectedly. Style is %08x\n", style);
+ ok( ret, "GetScrollInfo failed unexpectedly. Style is %08lx\n", style);
/* report the windows style */
winstyle = GetWindowLongA( hwnd, GWL_STYLE );
/* WS_HSCROLL added to the window style */
@@ -396,10 +397,10 @@ static void scrollbar_test_default( DWORD style)
if (bThemeActive || style != WS_VSCROLL)
todo_wine
ok( (winstyle & (WS_HSCROLL|WS_VSCROLL)) == ( style | WS_HSCROLL),
- "unexpected style change %08x/%08x\n", winstyle, style);
+ "unexpected style change %08lx/%08lx\n", winstyle, style);
else
ok( (winstyle & (WS_HSCROLL|WS_VSCROLL)) == style,
- "unexpected style change %08x/%08x\n", winstyle, style);
+ "unexpected style change %08lx/%08lx\n", winstyle, style);
}
/* Slightly change the test to use SetScrollInfo
* Start with a clean window */
@@ -413,20 +414,20 @@ static void scrollbar_test_default( DWORD style)
si.nMax = 22;
si.fMask |= SIF_RANGE;
ret = SetScrollInfo( hwnd, SB_HORZ, &si, FALSE);
- ok( ret, "SetScrollInfo failed. Style is %08x\n", style);
+ ok( ret, "SetScrollInfo failed. Style is %08lx\n", style);
/* and request the Vertical range */
ret = GetScrollRange( hwnd, SB_VERT, &min, &max);
ok( ret, "GetScrollRange failed.\n");
/* now the range should be 0,100 in ALL cases */
ok( min == 0 && max == 100,
- "Scroll bar range is %d,%d. Expected 0,100. Style %08x\n", min, max, style);
+ "Scroll bar range is %d,%d. Expected 0,100. Style %08lx\n", min, max, style);
/* See what is different now for GetScrollRange */
ret = GetScrollInfo( hwnd, SB_HORZ, &si);
/* should succeed in ALL cases */
- ok( ret, "GetScrollInfo failed unexpectedly. Style is %08x\n", style);
+ ok( ret, "GetScrollInfo failed unexpectedly. Style is %08lx\n", style);
ret = GetScrollInfo( hwnd, SB_VERT, &si);
/* should succeed in ALL cases */
- ok( ret, "GetScrollInfo failed unexpectedly. Style is %08x\n", style);
+ ok( ret, "GetScrollInfo failed unexpectedly. Style is %08lx\n", style);
/* also test if the window scroll bars are enabled */
ret = EnableScrollBar( hwnd, SB_VERT, ESB_ENABLE_BOTH);
ok( !ret, "Vertical window scroll bar was not enabled\n");
@@ -443,13 +444,13 @@ static void scrollbar_test_default( DWORD style)
assert( hwnd != 0);
ret = GetScrollInfo( hwnd, SB_VERT, &si);
/* should fail */
- ok( !ret, "GetScrollInfo succeeded unexpectedly. Style is %08x\n", style);
+ ok( !ret, "GetScrollInfo succeeded unexpectedly. Style is %08lx\n", style);
/* add scroll styles */
winstyle = GetWindowLongA( hwnd, GWL_STYLE );
SetWindowLongW( hwnd, GWL_STYLE, winstyle | WS_VSCROLL | WS_HSCROLL);
ret = GetScrollInfo( hwnd, SB_VERT, &si);
/* should still fail */
- ok( !ret, "GetScrollInfo succeeded unexpectedly. Style is %08x\n", style);
+ ok( !ret, "GetScrollInfo succeeded unexpectedly. Style is %08lx\n", style);
/* clean up */
DestroyWindow( hwnd);
}
@@ -700,7 +701,7 @@ static void test_subclass(void)
BOOL r;
r = GetClassInfoExA(GetModuleHandleA(NULL), "SCROLLBAR", &class_info);
- ok(r, "GetClassInfoEx failed: %u\n", GetLastError());
+ ok(r, "GetClassInfoEx failed: %lu\n", GetLastError());
scrollbar_wndproc = class_info.lpfnWndProc;
memset(&wc, 0, sizeof(wc));
@@ -709,21 +710,21 @@ static void test_subclass(void)
wc.lpszClassName = "MyTestSubclass";
wc.lpfnWndProc = subclass_proc;
r = RegisterClassA(&wc);
- ok(r, "RegisterClass failed: %u\n", GetLastError());
+ ok(r, "RegisterClass failed: %lu\n", GetLastError());
hwnd = CreateWindowExA( 0, "MyTestSubclass", "Scroll", WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, CW_USEDEFAULT, 100, 100, NULL, NULL, GetModuleHandleA(NULL), 0 );
- ok(hwnd != NULL, "Failed to create window: %u\n", GetLastError());
+ ok(hwnd != NULL, "Failed to create window: %lu\n", GetLastError());
r = SetScrollRange(hwnd, SB_CTL, 0, 100, TRUE);
- ok(r, "SetScrollRange failed: %u\n", GetLastError());
+ ok(r, "SetScrollRange failed: %lu\n", GetLastError());
res = SetScrollPos(hwnd, SB_CTL, 2, FALSE);
- ok(!res, "SetScrollPos returned %lu\n", res);
+ ok(!res, "SetScrollPos returned %Iu\n", res);
memset(&set_scrollinfo, 0xcc, sizeof(set_scrollinfo));
res = SetScrollPos(hwnd, SB_CTL, 1, FALSE);
- ok(res == 2, "SetScrollPos returned %lu\n", res);
+ ok(res == 2, "SetScrollPos returned %Iu\n", res);
ok(set_scrollinfo.cbSize == sizeof(SCROLLINFO), "cbSize = %u\n", set_scrollinfo.cbSize);
todo_wine
ok(set_scrollinfo.fMask == (0x1000 | SIF_POS), "fMask = %x\n", set_scrollinfo.fMask);
@@ -732,19 +733,19 @@ static void test_subclass(void)
memset(&scroll_info, 0xcc, sizeof(scroll_info));
scroll_info.cbSize = sizeof(scroll_info);
res = SendMessageA(hwnd, SBM_GETSCROLLBARINFO, 0, (LPARAM)&scroll_info);
- ok(res == 1, "SBM_GETSCROLLBARINFO returned %lu\n", res);
+ ok(res == 1, "SBM_GETSCROLLBARINFO returned %Iu\n", res);
DestroyWindow(hwnd);
/* if we skip calling wndproc for WM_CREATE, window is not considered a scrollbar */
hwnd = CreateWindowExA( 0, "MyTestSubclass", "Scroll", WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, CW_USEDEFAULT, 100, 100, NULL, NULL, GetModuleHandleA(NULL), (void *)1 );
- ok(hwnd != NULL, "Failed to create window: %u\n", GetLastError());
+ ok(hwnd != NULL, "Failed to create window: %lu\n", GetLastError());
memset(&scroll_info, 0xcc, sizeof(scroll_info));
scroll_info.cbSize = sizeof(scroll_info);
res = SendMessageA(hwnd, SBM_GETSCROLLBARINFO, 0, (LPARAM)&scroll_info);
- ok(!res, "SBM_GETSCROLLBARINFO returned %lu\n", res);
+ ok(!res, "SBM_GETSCROLLBARINFO returned %Iu\n", res);
DestroyWindow(hwnd);
@@ -752,20 +753,20 @@ static void test_subclass(void)
wc.cbWndExtra = class_info.cbWndExtra - 1;
wc.lpszClassName = "MyTestSubclass2";
r = RegisterClassA(&wc);
- ok(r, "RegisterClass failed: %u\n", GetLastError());
+ ok(r, "RegisterClass failed: %lu\n", GetLastError());
hwnd = CreateWindowExA( 0, "MyTestSubclass2", "Scroll", WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, CW_USEDEFAULT, 100, 100, NULL, NULL, GetModuleHandleA(NULL), 0 );
- ok(hwnd != NULL, "Failed to create window: %u\n", GetLastError());
+ ok(hwnd != NULL, "Failed to create window: %lu\n", GetLastError());
memset(&scroll_info, 0xcc, sizeof(scroll_info));
scroll_info.cbSize = sizeof(scroll_info);
res = SendMessageA(hwnd, SBM_GETSCROLLBARINFO, 0, (LPARAM)&scroll_info);
- ok(!res, "SBM_GETSCROLLBARINFO returned %lu\n", res);
+ ok(!res, "SBM_GETSCROLLBARINFO returned %Iu\n", res);
memset(&set_scrollinfo, 0xcc, sizeof(set_scrollinfo));
res = SetScrollPos(hwnd, SB_CTL, 1, FALSE);
- ok(res == 0, "SetScrollPos returned %lu\n", res);
+ ok(res == 0, "SetScrollPos returned %Iu\n", res);
ok(set_scrollinfo.cbSize == sizeof(SCROLLINFO), "cbSize = %u\n", set_scrollinfo.cbSize);
todo_wine
ok(set_scrollinfo.fMask == (0x1000 | SIF_POS), "fMask = %x\n", set_scrollinfo.fMask);
@@ -789,20 +790,20 @@ static void test_visual(void)
colors[0] = RGB(0x11, 0x22, 0x33);
colors[1] = RGB(0xaa, 0xbb, 0xcc);
ret = SetSysColors(ARRAY_SIZE(color_indices), color_indices, colors);
- ok(ret, "SetSysColors failed, error %u.\n", GetLastError());
+ ok(ret, "SetSysColors failed, error %lu.\n", GetLastError());
for (i = 0; i < ARRAY_SIZE(styles); ++i)
{
- winetest_push_context("style %#x", styles[i]);
+ winetest_push_context("style %#lx", styles[i]);
hwnd = CreateWindowA("ScrollBar", "", WS_POPUP | WS_VISIBLE | styles[i], 0, 0, 20, 20, 0, 0,
0, 0);
- ok(hwnd != NULL, "CreateWindowA failed, error %u.\n", GetLastError());
+ ok(hwnd != NULL, "CreateWindowA failed, error %lu.\n", GetLastError());
RedrawWindow(hwnd, NULL, NULL, RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW | RDW_ERASENOW | RDW_FRAME);
hdc = GetDC(hwnd);
color = GetPixel(hdc, 5, 5);
- ok(color == colors[1], "Expected color %#x, got %#x.\n", colors[1], color);
+ ok(color == colors[1], "Expected color %#lx, got %#lx.\n", colors[1], color);
ReleaseDC(hwnd, hdc);
DestroyWindow(hwnd);
@@ -810,7 +811,7 @@ static void test_visual(void)
}
ret = SetSysColors(ARRAY_SIZE(color_indices), color_indices, old_colors);
- ok(ret, "SetSysColors failed, error %u.\n", GetLastError());
+ ok(ret, "SetSysColors failed, error %lu.\n", GetLastError());
}
START_TEST ( scroll )
1
0
March 12, 2022
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/user32/tests/msg.c | 973 ++++++++++++++++++++++++-----------------------
1 file changed, 487 insertions(+), 486 deletions(-)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index f0e0d0fba76..4519da6962d 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -19,6 +19,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#undef WINE_NO_LONG_TYPES /* temporary for migration */
#include <assert.h>
#include <limits.h>
@@ -2449,12 +2450,12 @@ static void add_message_(int line, const struct recvd_message *msg)
};
const char *code_name = (msg->message <= HCBT_SETFOCUS) ? CBT_code_name[msg->message] : "Unknown";
- sprintf( seq->output, "%s: hook %d (%s) wp %08lx lp %08lx",
+ sprintf( seq->output, "%s: hook %d (%s) wp %08Ix lp %08Ix",
msg->descr, msg->message, code_name, msg->wParam, msg->lParam );
}
else if (msg->flags & winevent_hook)
{
- sprintf( seq->output, "%s: winevent %p %08x %08lx %08lx",
+ sprintf( seq->output, "%s: winevent %p %08x %08Ix %08Ix",
msg->descr, msg->hwnd, msg->message, msg->wParam, msg->lParam );
}
else
@@ -2466,7 +2467,7 @@ static void add_message_(int line, const struct recvd_message *msg)
{
WINDOWPOS *winpos = (WINDOWPOS *)msg->lParam;
- sprintf( seq->output, "%s: %p WM_WINDOWPOS%s wp %08lx lp %08lx after %p x %d y %d cx %d cy %d flags %s",
+ sprintf( seq->output, "%s: %p WM_WINDOWPOS%s wp %08Ix lp %08Ix after %p x %d y %d cx %d cy %d flags %s",
msg->descr, msg->hwnd,
(msg->message == WM_WINDOWPOSCHANGING) ? "CHANGING" : "CHANGED",
msg->wParam, msg->lParam, winpos->hwndInsertAfter,
@@ -2529,7 +2530,7 @@ static void add_message_(int line, const struct recvd_message *msg)
MEASUREITEMSTRUCT *mis = (MEASUREITEMSTRUCT *)msg->lParam;
BOOL is_unicode_data = TRUE;
- sprintf( seq->output, "%s: %p WM_MEASUREITEM: CtlType %#x, CtlID %#x, itemID %#x, itemData %#lx",
+ sprintf( seq->output, "%s: %p WM_MEASUREITEM: CtlType %#x, CtlID %#x, itemID %#x, itemData %#Ix",
msg->descr, msg->hwnd, mis->CtlType, mis->CtlID,
mis->itemID, mis->itemData);
@@ -2558,12 +2559,12 @@ static void add_message_(int line, const struct recvd_message *msg)
HWND ctrl = GetDlgItem(msg->hwnd, cis->CtlID);
BOOL is_unicode_data = TRUE;
- ok(msg->wParam == cis->CtlID, "expected %#x, got %#lx\n", cis->CtlID, msg->wParam);
+ ok(msg->wParam == cis->CtlID, "expected %#x, got %#Ix\n", cis->CtlID, msg->wParam);
ok(cis->hwndItem == ctrl, "expected %p, got %p\n", ctrl, cis->hwndItem);
ok((int)cis->itemID1 >= 0, "expected >= 0, got %d\n", cis->itemID1);
ok((int)cis->itemID2 == -1, "expected -1, got %d\n", cis->itemID2);
- sprintf( seq->output, "%s: %p WM_COMPAREITEM: CtlType %#x, CtlID %#x, itemID1 %#x, itemData1 %#lx, itemID2 %#x, itemData2 %#lx",
+ sprintf( seq->output, "%s: %p WM_COMPAREITEM: CtlType %#x, CtlID %#x, itemID1 %#x, itemData1 %#Ix, itemID2 %#x, itemData2 %#Ix",
msg->descr, msg->hwnd, cis->CtlType, cis->CtlID,
cis->itemID1, cis->itemData1, cis->itemID2, cis->itemData2);
@@ -2585,7 +2586,7 @@ static void add_message_(int line, const struct recvd_message *msg)
default:
if (msg->message >= 0xc000) return; /* ignore registered messages */
- sprintf( seq->output, "%s: %p %04x wp %08lx lp %08lx",
+ sprintf( seq->output, "%s: %p %04x wp %08Ix lp %08Ix",
msg->descr, msg->hwnd, msg->message, msg->wParam, msg->lParam );
}
if (msg->flags & (sent|posted|parent|defwinproc|beginpaint))
@@ -2730,14 +2731,14 @@ static void ok_sequence_(const struct message *expected_list, const char *contex
failcount ++;
if (strcmp(winetest_platform, "wine")) dump++;
ok_( file, line) (FALSE,
- "%s: %u: in msg 0x%04x expecting wParam 0x%lx got 0x%lx\n",
+ "%s: %u: in msg 0x%04x expecting wParam 0x%Ix got 0x%Ix\n",
context, count, expected->message, expected->wParam, actual->wParam);
}
}
else
{
ok_( file, line)( ((expected->wParam ^ actual->wParam) & ~expected->wp_mask) == 0,
- "%s: %u: in msg 0x%04x expecting wParam 0x%lx got 0x%lx\n",
+ "%s: %u: in msg 0x%04x expecting wParam 0x%Ix got 0x%Ix\n",
context, count, expected->message, expected->wParam, actual->wParam);
if ((expected->wParam ^ actual->wParam) & ~expected->wp_mask) dump++;
}
@@ -2751,14 +2752,14 @@ static void ok_sequence_(const struct message *expected_list, const char *contex
failcount ++;
if (strcmp(winetest_platform, "wine")) dump++;
ok_( file, line) (FALSE,
- "%s: %u: in msg 0x%04x expecting lParam 0x%lx got 0x%lx\n",
+ "%s: %u: in msg 0x%04x expecting lParam 0x%Ix got 0x%Ix\n",
context, count, expected->message, expected->lParam, actual->lParam);
}
}
else
{
ok_( file, line)(((expected->lParam ^ actual->lParam) & ~expected->lp_mask) == 0,
- "%s: %u: in msg 0x%04x expecting lParam 0x%lx got 0x%lx\n",
+ "%s: %u: in msg 0x%04x expecting lParam 0x%Ix got 0x%Ix\n",
context, count, expected->message, expected->lParam, actual->lParam);
if ((expected->lParam ^ actual->lParam) & ~expected->lp_mask) dump++;
}
@@ -2910,7 +2911,7 @@ done:
flush_sequence();
}
-#define expect(EXPECTED,GOT) ok((GOT)==(EXPECTED), "Expected %d, got %d\n", (EXPECTED), (GOT))
+#define expect(EXPECTED,GOT) ok((GOT)==(EXPECTED), "Expected %d, got %ld\n", (EXPECTED), (GOT))
/******************************** MDI test **********************************/
@@ -4662,7 +4663,7 @@ static void test_mdi_messages(void)
flush_sequence();
val = GetWindowLongA(mdi_client, 0);
- ok(val == 0xdeadbeef || broken(val == 0) /* >= Win Vista */, "Expected 0xdeadbeef, got 0x%x\n", val);
+ ok(val == 0xdeadbeef || broken(val == 0) /* >= Win Vista */, "Expected 0xdeadbeef, got 0x%lx\n", val);
DestroyWindow(mdi_client);
ok_sequence(WmDestroyMDIclientSeq, "Destroy MDI client window", FALSE);
@@ -4804,29 +4805,29 @@ static void test_hv_scroll_1(HWND hwnd, INT ctl, DWORD clear, DWORD set, INT min
/* do not be confused by WS_DLGFRAME set */
if ((style & WS_CAPTION) == WS_CAPTION) style &= ~WS_CAPTION;
- if (clear) ok(style & clear, "style %08x should be set\n", clear);
- if (set) ok(!(style & set), "style %08x should not be set\n", set);
+ if (clear) ok(style & clear, "style %08lx should be set\n", clear);
+ if (set) ok(!(style & set), "style %08lx should not be set\n", set);
ret = SetScrollRange(hwnd, ctl, min, max, FALSE);
- ok( ret, "SetScrollRange(%d) error %d\n", ctl, GetLastError());
+ ok( ret, "SetScrollRange(%d) error %ld\n", ctl, GetLastError());
if ((style & (WS_DLGFRAME | WS_BORDER | WS_THICKFRAME)) || (exstyle & WS_EX_DLGMODALFRAME))
ok_sequence(WmSetScrollRangeHV_NC_Seq, "SetScrollRange(SB_HORZ/SB_VERT) NC", FALSE);
else
ok_sequence(WmSetScrollRangeHVSeq, "SetScrollRange(SB_HORZ/SB_VERT)", FALSE);
style = GetWindowLongA(hwnd, GWL_STYLE);
- if (set) ok(style & set, "style %08x should be set\n", set);
- if (clear) ok(!(style & clear), "style %08x should not be set\n", clear);
+ if (set) ok(style & set, "style %08lx should be set\n", set);
+ if (clear) ok(!(style & clear), "style %08lx should not be set\n", clear);
/* a subsequent call should do nothing */
ret = SetScrollRange(hwnd, ctl, min, max, FALSE);
- ok( ret, "SetScrollRange(%d) error %d\n", ctl, GetLastError());
+ ok( ret, "SetScrollRange(%d) error %ld\n", ctl, GetLastError());
ok_sequence(WmEmptySeq, "SetScrollRange(SB_HORZ/SB_VERT) empty sequence", FALSE);
xmin = 0xdeadbeef;
xmax = 0xdeadbeef;
ret = GetScrollRange(hwnd, ctl, &xmin, &xmax);
- ok( ret, "GetScrollRange(%d) error %d\n", ctl, GetLastError());
+ ok( ret, "GetScrollRange(%d) error %ld\n", ctl, GetLastError());
ok_sequence(WmEmptySeq, "GetScrollRange(SB_HORZ/SB_VERT) empty sequence", FALSE);
ok(xmin == min, "unexpected min scroll value %d\n", xmin);
ok(xmax == max, "unexpected max scroll value %d\n", xmax);
@@ -4843,8 +4844,8 @@ static void test_hv_scroll_2(HWND hwnd, INT ctl, DWORD clear, DWORD set, INT min
/* do not be confused by WS_DLGFRAME set */
if ((style & WS_CAPTION) == WS_CAPTION) style &= ~WS_CAPTION;
- if (clear) ok(style & clear, "style %08x should be set\n", clear);
- if (set) ok(!(style & set), "style %08x should not be set\n", set);
+ if (clear) ok(style & clear, "style %08lx should be set\n", clear);
+ if (set) ok(!(style & set), "style %08lx should not be set\n", set);
si.cbSize = sizeof(si);
si.fMask = SIF_RANGE;
@@ -4857,8 +4858,8 @@ static void test_hv_scroll_2(HWND hwnd, INT ctl, DWORD clear, DWORD set, INT min
ok_sequence(WmSetScrollRangeHVSeq, "SetScrollInfo(SB_HORZ/SB_VERT)", FALSE);
style = GetWindowLongA(hwnd, GWL_STYLE);
- if (set) ok(style & set, "style %08x should be set\n", set);
- if (clear) ok(!(style & clear), "style %08x should not be set\n", clear);
+ if (set) ok(style & set, "style %08lx should be set\n", set);
+ if (clear) ok(!(style & clear), "style %08lx should not be set\n", clear);
/* a subsequent call should do nothing */
SetScrollInfo(hwnd, ctl, &si, TRUE);
@@ -4883,7 +4884,7 @@ static void test_hv_scroll_2(HWND hwnd, INT ctl, DWORD clear, DWORD set, INT min
si.nMin = 0xdeadbeef;
si.nMax = 0xdeadbeef;
ret = GetScrollInfo(hwnd, ctl, &si);
- ok( ret, "GetScrollInfo error %d\n", GetLastError());
+ ok( ret, "GetScrollInfo error %ld\n", GetLastError());
ok_sequence(WmEmptySeq, "GetScrollRange(SB_HORZ/SB_VERT) empty sequence", FALSE);
ok(si.nMin == min, "unexpected min scroll value %d\n", si.nMin);
ok(si.nMax == max, "unexpected max scroll value %d\n", si.nMax);
@@ -4902,14 +4903,14 @@ static void test_scroll_messages(HWND hwnd)
min = 0xdeadbeef;
max = 0xdeadbeef;
ret = GetScrollRange(hwnd, SB_CTL, &min, &max);
- ok( ret, "GetScrollRange error %d\n", GetLastError());
+ ok( ret, "GetScrollRange error %ld\n", GetLastError());
if (sequence->message != WmGetScrollRangeSeq[0].message)
trace("GetScrollRange(SB_CTL) generated unknown message %04x\n", sequence->message);
/* values of min and max are undefined */
flush_sequence();
ret = SetScrollRange(hwnd, SB_CTL, 10, 150, FALSE);
- ok( ret, "SetScrollRange error %d\n", GetLastError());
+ ok( ret, "SetScrollRange error %ld\n", GetLastError());
if (sequence->message != WmSetScrollRangeSeq[0].message)
trace("SetScrollRange(SB_CTL) generated unknown message %04x\n", sequence->message);
flush_sequence();
@@ -4917,7 +4918,7 @@ static void test_scroll_messages(HWND hwnd)
min = 0xdeadbeef;
max = 0xdeadbeef;
ret = GetScrollRange(hwnd, SB_CTL, &min, &max);
- ok( ret, "GetScrollRange error %d\n", GetLastError());
+ ok( ret, "GetScrollRange error %ld\n", GetLastError());
if (sequence->message != WmGetScrollRangeSeq[0].message)
trace("GetScrollRange(SB_CTL) generated unknown message %04x\n", sequence->message);
/* values of min and max are undefined */
@@ -4950,7 +4951,7 @@ static void test_scroll_messages(HWND hwnd)
si.nMin = 0xdeadbeef;
si.nMax = 0xdeadbeef;
ret = GetScrollInfo(hwnd, SB_CTL, &si);
- ok( ret, "GetScrollInfo error %d\n", GetLastError());
+ ok( ret, "GetScrollInfo error %ld\n", GetLastError());
if (sequence->message != WmGetScrollInfoSeq[0].message)
trace("GetScrollInfo(SB_CTL) generated unknown message %04x\n", sequence->message);
/* values of min and max are undefined */
@@ -5194,7 +5195,7 @@ static void test_sys_menu(void)
/* test existing window without CS_NOCLOSE style */
hmenu = GetSystemMenu(hwnd, FALSE);
- ok(hmenu != 0, "GetSystemMenu error %d\n", GetLastError());
+ ok(hmenu != 0, "GetSystemMenu error %ld\n", GetLastError());
state = GetMenuState(hmenu, SC_CLOSE, MF_BYCOMMAND);
ok(state != 0xffffffff, "wrong SC_CLOSE state %x\n", state);
@@ -5219,7 +5220,7 @@ static void test_sys_menu(void)
SetWindowPos(hwnd, 0, 0, 0, 0, 0, SWP_NOZORDER|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_FRAMECHANGED);
flush_sequence();
hmenu = GetSystemMenu(hwnd, FALSE);
- ok(hmenu != 0, "GetSystemMenu error %d\n", GetLastError());
+ ok(hmenu != 0, "GetSystemMenu error %ld\n", GetLastError());
DestroyWindow(hwnd);
@@ -5229,7 +5230,7 @@ static void test_sys_menu(void)
ok (hwnd != 0, "Failed to create overlapped window\n");
hmenu = GetSystemMenu(hwnd, FALSE);
- ok(hmenu != 0, "GetSystemMenu error %d\n", GetLastError());
+ ok(hmenu != 0, "GetSystemMenu error %ld\n", GetLastError());
state = GetMenuState(hmenu, SC_CLOSE, MF_BYCOMMAND);
ok(state == 0xffffffff, "wrong SC_CLOSE state %x\n", state);
@@ -5242,7 +5243,7 @@ static void test_sys_menu(void)
ok(hwnd != 0, "Failed to create overlapped window\n");
hmenu = GetSystemMenu(hwnd, FALSE);
- ok(!hmenu, "GetSystemMenu error %d\n", GetLastError());
+ ok(!hmenu, "GetSystemMenu error %ld\n", GetLastError());
DestroyWindow(hwnd);
}
@@ -5343,36 +5344,36 @@ static void test_MsgWaitForMultipleObjects(HWND hwnd)
MSG msg;
ret = MsgWaitForMultipleObjects(0, NULL, FALSE, 0, QS_POSTMESSAGE);
- ok(ret == WAIT_TIMEOUT, "MsgWaitForMultipleObjects returned %x\n", ret);
+ ok(ret == WAIT_TIMEOUT, "MsgWaitForMultipleObjects returned %lx\n", ret);
PostMessageA(hwnd, WM_USER, 0, 0);
ret = MsgWaitForMultipleObjects(0, NULL, FALSE, 0, QS_POSTMESSAGE);
- ok(ret == WAIT_OBJECT_0, "MsgWaitForMultipleObjects returned %x\n", ret);
+ ok(ret == WAIT_OBJECT_0, "MsgWaitForMultipleObjects returned %lx\n", ret);
ok(PeekMessageA( &msg, 0, 0, 0, PM_REMOVE ), "PeekMessage should succeed\n");
ok(msg.message == WM_USER, "got %04x instead of WM_USER\n", msg.message);
ret = MsgWaitForMultipleObjects(0, NULL, FALSE, 0, QS_POSTMESSAGE);
- ok(ret == WAIT_TIMEOUT, "MsgWaitForMultipleObjects returned %x\n", ret);
+ ok(ret == WAIT_TIMEOUT, "MsgWaitForMultipleObjects returned %lx\n", ret);
PostMessageA(hwnd, WM_USER, 0, 0);
ret = MsgWaitForMultipleObjects(0, NULL, FALSE, 0, QS_POSTMESSAGE);
- ok(ret == WAIT_OBJECT_0, "MsgWaitForMultipleObjects returned %x\n", ret);
+ ok(ret == WAIT_OBJECT_0, "MsgWaitForMultipleObjects returned %lx\n", ret);
ok(PeekMessageA( &msg, 0, 0, 0, PM_NOREMOVE ), "PeekMessage should succeed\n");
ok(msg.message == WM_USER, "got %04x instead of WM_USER\n", msg.message);
/* shows QS_POSTMESSAGE flag is cleared in the PeekMessage call */
ret = MsgWaitForMultipleObjects(0, NULL, FALSE, 0, QS_POSTMESSAGE);
- ok(ret == WAIT_TIMEOUT, "MsgWaitForMultipleObjects returned %x\n", ret);
+ ok(ret == WAIT_TIMEOUT, "MsgWaitForMultipleObjects returned %lx\n", ret);
PostMessageA(hwnd, WM_USER, 0, 0);
/* new incoming message causes it to become signaled again */
ret = MsgWaitForMultipleObjects(0, NULL, FALSE, 0, QS_POSTMESSAGE);
- ok(ret == WAIT_OBJECT_0, "MsgWaitForMultipleObjects returned %x\n", ret);
+ ok(ret == WAIT_OBJECT_0, "MsgWaitForMultipleObjects returned %lx\n", ret);
ok(PeekMessageA( &msg, 0, 0, 0, PM_REMOVE ), "PeekMessage should succeed\n");
ok(msg.message == WM_USER, "got %04x instead of WM_USER\n", msg.message);
@@ -5385,30 +5386,30 @@ static void test_MsgWaitForMultipleObjects(HWND hwnd)
ok(msg.message == WM_USER, "got %04x instead of WM_USER\n", msg.message);
ret = MsgWaitForMultipleObjectsEx( 0, NULL, 0, QS_POSTMESSAGE, MWMO_INPUTAVAILABLE );
- ok(ret == WAIT_OBJECT_0, "MsgWaitForMultipleObjectsEx returned %x\n", ret);
+ ok(ret == WAIT_OBJECT_0, "MsgWaitForMultipleObjectsEx returned %lx\n", ret);
ok(PeekMessageA( &msg, 0, 0, 0, PM_REMOVE ), "PeekMessage should succeed\n");
ok(msg.message == WM_USER, "got %04x instead of WM_USER\n", msg.message);
/* without MWMO_ALERTABLE the result is never WAIT_IO_COMPLETION */
ret = QueueUserAPC( apc_test_proc, GetCurrentThread(), 0 );
- ok(ret, "QueueUserAPC failed %u\n", GetLastError());
+ ok(ret, "QueueUserAPC failed %lu\n", GetLastError());
ret = MsgWaitForMultipleObjectsEx( 0, NULL, 0, QS_POSTMESSAGE, 0 );
- ok(ret == WAIT_TIMEOUT, "MsgWaitForMultipleObjectsEx returned %x\n", ret);
+ ok(ret == WAIT_TIMEOUT, "MsgWaitForMultipleObjectsEx returned %lx\n", ret);
/* but even with MWMO_ALERTABLE window events are preferred */
PostMessageA( hwnd, WM_USER, 0, 0 );
ret = MsgWaitForMultipleObjectsEx( 0, NULL, 0, QS_POSTMESSAGE, MWMO_ALERTABLE );
- ok(ret == WAIT_OBJECT_0, "MsgWaitForMultipleObjectsEx returned %x\n", ret);
+ ok(ret == WAIT_OBJECT_0, "MsgWaitForMultipleObjectsEx returned %lx\n", ret);
ok(PeekMessageA( &msg, 0, 0, 0, PM_REMOVE ), "PeekMessage should succeed\n");
ok(msg.message == WM_USER, "got %04x instead of WM_USER\n", msg.message);
/* the APC call is still queued */
ret = MsgWaitForMultipleObjectsEx( 0, NULL, 0, QS_POSTMESSAGE, MWMO_ALERTABLE );
- ok(ret == WAIT_IO_COMPLETION, "MsgWaitForMultipleObjectsEx returned %x\n", ret);
+ ok(ret == WAIT_IO_COMPLETION, "MsgWaitForMultipleObjectsEx returned %lx\n", ret);
}
static void test_WM_DEVICECHANGE(HWND hwnd)
@@ -5438,13 +5439,13 @@ static void test_WM_DEVICECHANGE(HWND hwnd)
ret = PostMessageA(hwnd, WM_DEVICECHANGE, wparams[i], 0);
if (wparams[i] & 0x8000)
{
- ok(ret == FALSE, "PostMessage returned %d\n", ret);
- ok(GetLastError() == ERROR_MESSAGE_SYNC_ONLY, "PostMessage error %08x\n", GetLastError());
+ ok(ret == FALSE, "PostMessage returned %ld\n", ret);
+ ok(GetLastError() == ERROR_MESSAGE_SYNC_ONLY, "PostMessage error %08lx\n", GetLastError());
}
else
{
ret = MsgWaitForMultipleObjects(0, NULL, FALSE, 0, QS_POSTMESSAGE);
- ok(ret == WAIT_OBJECT_0, "MsgWaitForMultipleObjects returned %x\n", ret);
+ ok(ret == WAIT_OBJECT_0, "MsgWaitForMultipleObjects returned %lx\n", ret);
memset(&msg, 0, sizeof(msg));
ok(PeekMessageA(&msg, 0, 0, 0, PM_REMOVE), "PeekMessage should succeed\n");
ok(msg.message == WM_DEVICECHANGE, "got %04x instead of WM_DEVICECHANGE\n", msg.message);
@@ -5534,7 +5535,7 @@ static void test_messages(void)
/* test ShowWindow(SW_HIDE) on a hidden window - multi-threaded */
hthread = CreateThread( NULL, 0, hide_window_thread, hwnd, 0, &tid );
- ok(hthread != NULL, "CreateThread failed, error %d\n", GetLastError());
+ ok(hthread != NULL, "CreateThread failed, error %ld\n", GetLastError());
ok(WaitForSingleObject(hthread, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
CloseHandle(hthread);
flush_events();
@@ -5546,7 +5547,7 @@ static void test_messages(void)
/* test ShowWindow(SW_SHOW) on a visible window - multi-threaded */
hthread = CreateThread( NULL, 0, show_window_thread, hwnd, 0, &tid );
- ok( hthread != NULL, "CreateThread failed, error %d\n", GetLastError() );
+ ok( hthread != NULL, "CreateThread failed, error %ld\n", GetLastError() );
ok( WaitForSingleObject( hthread, INFINITE ) == WAIT_OBJECT_0, "WaitForSingleObject failed\n" );
CloseHandle( hthread );
flush_events();
@@ -5906,7 +5907,7 @@ static void test_messages(void)
flush_events();
flush_sequence();
ret = DrawMenuBar(hwnd);
- ok(ret, "DrawMenuBar failed: %d\n", GetLastError());
+ ok(ret, "DrawMenuBar failed: %ld\n", GetLastError());
flush_events();
ok_sequence(WmDrawMenuBarSeq, "DrawMenuBar", FALSE);
ok(SetCursorPos(pos.x, pos.y), "SetCursorPos failed\n");
@@ -5919,7 +5920,7 @@ static void test_messages(void)
flush_events();
flush_sequence();
ret = DrawMenuBar(hwnd);
- ok(ret, "DrawMenuBar failed: %d\n", GetLastError());
+ ok(ret, "DrawMenuBar failed: %ld\n", GetLastError());
flush_events();
ok_sequence(WmEmptySeq, "DrawMenuBar for a child window", FALSE);
@@ -5934,7 +5935,7 @@ static void test_messages(void)
/* Message sequence for SetMenu */
ok(!DrawMenuBar(hwnd), "DrawMenuBar should return FALSE for a destroyed window\n");
- ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "last error is %d\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "last error is %ld\n", GetLastError());
ok_sequence(WmEmptySeq, "DrawMenuBar for a window without a menu", FALSE);
hmenu = CreateMenu();
@@ -6009,7 +6010,7 @@ static void test_messages(void)
ok( !PeekMessageW( NULL, 0, 0, 0, PM_REMOVE ), "PeekMessage(NULL) should fail\n" );
ok( GetLastError() == ERROR_NOACCESS || /* Win2k */
GetLastError() == 0xdeadbeef, /* NT4 */
- "last error is %d\n", GetLastError() );
+ "last error is %ld\n", GetLastError() );
ok( PeekMessageW( &msg, 0, 0, 0, PM_REMOVE ), "PeekMessage should succeed\n" );
ok( msg.message == WM_USER+1, "got %x instead of WM_USER+1\n", msg.message );
@@ -6061,29 +6062,29 @@ static void test_messages(void)
goto done;
}
ok_sequence(WmInitEndSession, "Handling of undocumented 0x3B message by DefWindowProc wparam=0x8000000b", TRUE);
- ok(res == 1, "SendMessage(hwnd, 0x3B, 0x8000000b, 0) should have returned 1 instead of %ld\n", res);
+ ok(res == 1, "SendMessage(hwnd, 0x3B, 0x8000000b, 0) should have returned 1 instead of %Id\n", res);
res = SendMessageA(hwnd, 0x3B, 0x0000000b, 0);
ok_sequence(WmInitEndSession_2, "Handling of undocumented 0x3B message by DefWindowProc wparam=0x0000000b", TRUE);
- ok(res == 1, "SendMessage(hwnd, 0x3B, 0x0000000b, 0) should have returned 1 instead of %ld\n", res);
+ ok(res == 1, "SendMessage(hwnd, 0x3B, 0x0000000b, 0) should have returned 1 instead of %Id\n", res);
res = SendMessageA(hwnd, 0x3B, 0x0000000f, 0);
ok_sequence(WmInitEndSession_2, "Handling of undocumented 0x3B message by DefWindowProc wparam=0x0000000f", TRUE);
- ok(res == 1, "SendMessage(hwnd, 0x3B, 0x0000000f, 0) should have returned 1 instead of %ld\n", res);
+ ok(res == 1, "SendMessage(hwnd, 0x3B, 0x0000000f, 0) should have returned 1 instead of %Id\n", res);
flush_sequence();
res = SendMessageA(hwnd, 0x3B, 0x80000008, 0);
ok_sequence(WmInitEndSession_3, "Handling of undocumented 0x3B message by DefWindowProc wparam=0x80000008", TRUE);
- ok(res == 2, "SendMessage(hwnd, 0x3B, 0x80000008, 0) should have returned 2 instead of %ld\n", res);
+ ok(res == 2, "SendMessage(hwnd, 0x3B, 0x80000008, 0) should have returned 2 instead of %Id\n", res);
res = SendMessageA(hwnd, 0x3B, 0x00000008, 0);
ok_sequence(WmInitEndSession_4, "Handling of undocumented 0x3B message by DefWindowProc wparam=0x00000008", TRUE);
- ok(res == 2, "SendMessage(hwnd, 0x3B, 0x00000008, 0) should have returned 2 instead of %ld\n", res);
+ ok(res == 2, "SendMessage(hwnd, 0x3B, 0x00000008, 0) should have returned 2 instead of %Id\n", res);
res = SendMessageA(hwnd, 0x3B, 0x80000004, 0);
ok_sequence(WmInitEndSession_3, "Handling of undocumented 0x3B message by DefWindowProc wparam=0x80000004", TRUE);
- ok(res == 2, "SendMessage(hwnd, 0x3B, 0x80000004, 0) should have returned 2 instead of %ld\n", res);
+ ok(res == 2, "SendMessage(hwnd, 0x3B, 0x80000004, 0) should have returned 2 instead of %Id\n", res);
res = SendMessageA(hwnd, 0x3B, 0x80000001, 0);
ok_sequence(WmInitEndSession_5, "Handling of undocumented 0x3B message by DefWindowProc wparam=0x80000001", TRUE);
- ok(res == 2, "SendMessage(hwnd, 0x3B, 0x80000001, 0) should have returned 2 instead of %ld\n", res);
+ ok(res == 2, "SendMessage(hwnd, 0x3B, 0x80000001, 0) should have returned 2 instead of %Id\n", res);
done:
DestroyWindow(hwnd);
@@ -6136,7 +6137,7 @@ static void test_setwindowpos(void)
flush_sequence();
res = SetWindowPos(hwnd, HWND_TOPMOST, 50, 50, winX, winY, 0);
ok_sequence(WmZOrder, "Z-Order", TRUE);
- ok(res == TRUE, "SetWindowPos expected TRUE, got %ld\n", res);
+ ok(res == TRUE, "SetWindowPos expected TRUE, got %Id\n", res);
GetWindowRect(hwnd, &rc);
expect(sysX + X, rc.right);
@@ -6145,7 +6146,7 @@ static void test_setwindowpos(void)
res = SetWindowPos( hwnd, 0, 0, 0, 0, 0,
SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED);
ok_sequence(WmFrameChanged, "FrameChanged", FALSE);
- ok(res == TRUE, "SetWindowPos expected TRUE, got %ld.\n", res);
+ ok(res == TRUE, "SetWindowPos expected TRUE, got %Id.\n", res);
GetWindowRect(hwnd, &rc);
expect(sysX + X, rc.right);
@@ -6154,7 +6155,7 @@ static void test_setwindowpos(void)
res = SetWindowPos( hwnd, 0, 0, 0, 0, 0,
SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED);
ok_sequence(WmFrameChanged_move, "FrameChanged", FALSE);
- ok(res == TRUE, "SetWindowPos expected TRUE, got %ld.\n", res);
+ ok(res == TRUE, "SetWindowPos expected TRUE, got %Id.\n", res);
GetWindowRect(hwnd, &rc);
expect(sysX, rc.right);
@@ -6848,7 +6849,7 @@ static void test_button_messages(void)
char desc[64];
HDC hdc;
- trace("button style %08x\n", button[i].style);
+ trace("button style %08lx\n", button[i].style);
hwnd = CreateWindowExA(0, "my_button_class", "test", button[i].style | WS_CHILD | BS_NOTIFY,
0, 0, 50, 14, parent, (HMENU)ID_BUTTON, 0, NULL);
@@ -6858,12 +6859,12 @@ static void test_button_messages(void)
style &= ~(WS_CHILD | BS_NOTIFY);
/* XP turns a BS_USERBUTTON into BS_PUSHBUTTON */
if (button[i].style == BS_USERBUTTON)
- ok(style == BS_PUSHBUTTON, "expected style BS_PUSHBUTTON got %x\n", style);
+ ok(style == BS_PUSHBUTTON, "expected style BS_PUSHBUTTON got %lx\n", style);
else
- ok(style == button[i].style, "expected style %x got %x\n", button[i].style, style);
+ ok(style == button[i].style, "expected style %lx got %lx\n", button[i].style, style);
dlg_code = SendMessageA(hwnd, WM_GETDLGCODE, 0, 0);
- ok(dlg_code == button[i].dlg_code, "%u: wrong dlg_code %08x\n", i, dlg_code);
+ ok(dlg_code == button[i].dlg_code, "%u: wrong dlg_code %08lx\n", i, dlg_code);
ShowWindow(hwnd, SW_SHOW);
UpdateWindow(hwnd);
@@ -6895,10 +6896,10 @@ static void test_button_messages(void)
style = GetWindowLongA(hwnd, GWL_STYLE);
style &= ~(WS_VISIBLE | WS_CHILD | BS_NOTIFY);
/* XP doesn't turn a BS_USERBUTTON into BS_PUSHBUTTON here! */
- ok(style == button[i].style, "expected style %04x got %04x\n", button[i].style, style);
+ ok(style == button[i].style, "expected style %04lx got %04lx\n", button[i].style, style);
state = SendMessageA(hwnd, BM_GETSTATE, 0, 0);
- ok(state == 0, "expected state 0, got %04x\n", state);
+ ok(state == 0, "expected state 0, got %04lx\n", state);
flush_sequence();
@@ -6908,11 +6909,11 @@ static void test_button_messages(void)
ok_sequence(button[i].setstate, "BM_SETSTATE/TRUE on a button", FALSE);
state = SendMessageA(hwnd, BM_GETSTATE, 0, 0);
- ok(state == 0x0004, "expected state 0x0004, got %04x\n", state);
+ ok(state == 0x0004, "expected state 0x0004, got %04lx\n", state);
style = GetWindowLongA(hwnd, GWL_STYLE);
style &= ~(WS_CHILD | BS_NOTIFY | WS_VISIBLE);
- ok(style == button[i].style, "expected style %04x got %04x\n", button[i].style, style);
+ ok(style == button[i].style, "expected style %04lx got %04lx\n", button[i].style, style);
flush_sequence();
@@ -6922,14 +6923,14 @@ static void test_button_messages(void)
ok_sequence(button[i].clearstate, "BM_SETSTATE/FALSE on a button", FALSE);
state = SendMessageA(hwnd, BM_GETSTATE, 0, 0);
- ok(state == 0, "expected state 0, got %04x\n", state);
+ ok(state == 0, "expected state 0, got %04lx\n", state);
style = GetWindowLongA(hwnd, GWL_STYLE);
style &= ~(WS_CHILD | BS_NOTIFY | WS_VISIBLE);
- ok(style == button[i].style, "expected style %04x got %04x\n", button[i].style, style);
+ ok(style == button[i].style, "expected style %04lx got %04lx\n", button[i].style, style);
state = SendMessageA(hwnd, BM_GETCHECK, 0, 0);
- ok(state == BST_UNCHECKED, "expected BST_UNCHECKED, got %04x\n", state);
+ ok(state == BST_UNCHECKED, "expected BST_UNCHECKED, got %04lx\n", state);
flush_sequence();
@@ -6939,11 +6940,11 @@ static void test_button_messages(void)
ok_sequence(WmSetCheckIgnoredSeq, "BM_SETCHECK on a button", FALSE);
state = SendMessageA(hwnd, BM_GETCHECK, 0, 0);
- ok(state == BST_UNCHECKED, "expected BST_UNCHECKED, got %04x\n", state);
+ ok(state == BST_UNCHECKED, "expected BST_UNCHECKED, got %04lx\n", state);
style = GetWindowLongA(hwnd, GWL_STYLE);
style &= ~(WS_CHILD | BS_NOTIFY | WS_VISIBLE);
- ok(style == button[i].style, "expected style %04x got %04x\n", button[i].style, style);
+ ok(style == button[i].style, "expected style %04lx got %04lx\n", button[i].style, style);
flush_sequence();
@@ -6982,17 +6983,17 @@ static void test_button_messages(void)
button[i].style == BS_GROUPBOX ||
button[i].style == BS_USERBUTTON ||
button[i].style == BS_OWNERDRAW)
- ok(state == BST_UNCHECKED, "expected check 0, got %04x\n", state);
+ ok(state == BST_UNCHECKED, "expected check 0, got %04lx\n", state);
else
- ok(state == BST_CHECKED, "expected check 1, got %04x\n", state);
+ ok(state == BST_CHECKED, "expected check 1, got %04lx\n", state);
style = GetWindowLongA(hwnd, GWL_STYLE);
style &= ~(WS_CHILD | BS_NOTIFY | WS_VISIBLE);
if (button[i].style == BS_RADIOBUTTON ||
button[i].style == BS_AUTORADIOBUTTON)
- ok(style == (button[i].style | WS_TABSTOP), "expected style %04x | WS_TABSTOP got %04x\n", button[i].style, style);
+ ok(style == (button[i].style | WS_TABSTOP), "expected style %04lx | WS_TABSTOP got %04lx\n", button[i].style, style);
else
- ok(style == button[i].style, "expected style %04x got %04x\n", button[i].style, style);
+ ok(style == button[i].style, "expected style %04lx got %04lx\n", button[i].style, style);
log_all_parent_messages--;
@@ -7376,38 +7377,38 @@ static void test_autoradio_BM_CLICK(void)
flush_sequence();
ret = SendMessageA(radio1, BM_GETCHECK, 0, 0);
- ok(ret == BST_UNCHECKED, "got %08x\n", ret);
+ ok(ret == BST_UNCHECKED, "got %08lx\n", ret);
ret = SendMessageA(radio2, BM_GETCHECK, 0, 0);
- ok(ret == BST_UNCHECKED, "got %08x\n", ret);
+ ok(ret == BST_UNCHECKED, "got %08lx\n", ret);
ret = SendMessageA(radio3, BM_GETCHECK, 0, 0);
- ok(ret == BST_UNCHECKED, "got %08x\n", ret);
+ ok(ret == BST_UNCHECKED, "got %08lx\n", ret);
SendMessageA(radio1, BM_SETCHECK, BST_CHECKED, 0);
ret = SendMessageA(radio1, BM_GETCHECK, 0, 0);
- ok(ret == BST_CHECKED, "got %08x\n", ret);
+ ok(ret == BST_CHECKED, "got %08lx\n", ret);
ret = SendMessageA(radio2, BM_GETCHECK, 0, 0);
- ok(ret == BST_UNCHECKED, "got %08x\n", ret);
+ ok(ret == BST_UNCHECKED, "got %08lx\n", ret);
ret = SendMessageA(radio3, BM_GETCHECK, 0, 0);
- ok(ret == BST_UNCHECKED, "got %08x\n", ret);
+ ok(ret == BST_UNCHECKED, "got %08lx\n", ret);
SendMessageA(radio2, BM_SETCHECK, BST_CHECKED, 0);
ret = SendMessageA(radio1, BM_GETCHECK, 0, 0);
- ok(ret == BST_CHECKED, "got %08x\n", ret);
+ ok(ret == BST_CHECKED, "got %08lx\n", ret);
ret = SendMessageA(radio2, BM_GETCHECK, 0, 0);
- ok(ret == BST_CHECKED, "got %08x\n", ret);
+ ok(ret == BST_CHECKED, "got %08lx\n", ret);
ret = SendMessageA(radio3, BM_GETCHECK, 0, 0);
- ok(ret == BST_UNCHECKED, "got %08x\n", ret);
+ ok(ret == BST_UNCHECKED, "got %08lx\n", ret);
SendMessageA(radio3, BM_SETCHECK, BST_CHECKED, 0);
ret = SendMessageA(radio1, BM_GETCHECK, 0, 0);
- ok(ret == BST_CHECKED, "got %08x\n", ret);
+ ok(ret == BST_CHECKED, "got %08lx\n", ret);
ret = SendMessageA(radio2, BM_GETCHECK, 0, 0);
- ok(ret == BST_CHECKED, "got %08x\n", ret);
+ ok(ret == BST_CHECKED, "got %08lx\n", ret);
ret = SendMessageA(radio3, BM_GETCHECK, 0, 0);
- ok(ret == BST_CHECKED, "got %08x\n", ret);
+ ok(ret == BST_CHECKED, "got %08lx\n", ret);
GetWindowRect(radio2, &rc);
SetCursorPos(rc.left+1, rc.top+1);
@@ -7424,11 +7425,11 @@ static void test_autoradio_BM_CLICK(void)
log_all_parent_messages--;
ret = SendMessageA(radio1, BM_GETCHECK, 0, 0);
- ok(ret == BST_UNCHECKED, "got %08x\n", ret);
+ ok(ret == BST_UNCHECKED, "got %08lx\n", ret);
ret = SendMessageA(radio2, BM_GETCHECK, 0, 0);
- ok(ret == BST_CHECKED, "got %08x\n", ret);
+ ok(ret == BST_CHECKED, "got %08lx\n", ret);
ret = SendMessageA(radio3, BM_GETCHECK, 0, 0);
- ok(ret == BST_UNCHECKED, "got %08x\n", ret);
+ ok(ret == BST_UNCHECKED, "got %08lx\n", ret);
DestroyWindow(parent);
}
@@ -7439,11 +7440,11 @@ static void test_radio_dbg(HWND radio1, int state1, HWND radio2, int state2, HWN
DWORD ret;
ret = SendMessageA(radio1, BM_GETCHECK, 0, 0);
- ok_(__FILE__,line)(ret == state1 ? BST_CHECKED : BST_UNCHECKED, "got %08x\n", ret);
+ ok_(__FILE__,line)(ret == state1 ? BST_CHECKED : BST_UNCHECKED, "got %08lx\n", ret);
ret = SendMessageA(radio2, BM_GETCHECK, 0, 0);
- ok_(__FILE__,line)(ret == state2 ? BST_CHECKED : BST_UNCHECKED, "got %08x\n", ret);
+ ok_(__FILE__,line)(ret == state2 ? BST_CHECKED : BST_UNCHECKED, "got %08lx\n", ret);
ret = SendMessageA(radio3, BM_GETCHECK, 0, 0);
- ok_(__FILE__,line)(ret == state3 ? BST_CHECKED : BST_UNCHECKED, "got %08x\n", ret);
+ ok_(__FILE__,line)(ret == state3 ? BST_CHECKED : BST_UNCHECKED, "got %08lx\n", ret);
}
static void set_radio(HWND radio1, int state1, HWND radio2, int state2, HWND radio3, int state3)
@@ -7691,14 +7692,14 @@ static void test_static_messages(void)
ok(hwnd != 0, "Failed to create static window\n");
dlg_code = SendMessageA(hwnd, WM_GETDLGCODE, 0, 0);
- ok(dlg_code == static_ctrl[i].dlg_code, "%u: wrong dlg_code %08x\n", i, dlg_code);
+ ok(dlg_code == static_ctrl[i].dlg_code, "%u: wrong dlg_code %08lx\n", i, dlg_code);
ShowWindow(hwnd, SW_SHOW);
UpdateWindow(hwnd);
SetFocus(0);
flush_sequence();
- trace("static style %08x\n", static_ctrl[i].style);
+ trace("static style %08lx\n", static_ctrl[i].style);
SendMessageA(hwnd, WM_SETFONT, (WPARAM)GetStockObject(DEFAULT_GUI_FONT), TRUE);
ok_sequence(static_ctrl[i].setfont, "WM_SETFONT on a static", FALSE);
@@ -7962,14 +7963,14 @@ static void test_combobox_messages(void)
UpdateWindow(combo);
ret = SendMessageA(combo, WM_GETDLGCODE, 0, 0);
- ok(ret == (DLGC_WANTCHARS | DLGC_WANTARROWS), "wrong dlg_code %08lx\n", ret);
+ ok(ret == (DLGC_WANTCHARS | DLGC_WANTARROWS), "wrong dlg_code %08Ix\n", ret);
ret = SendMessageA(combo, CB_ADDSTRING, 0, (LPARAM)"item 0");
- ok(ret == 0, "expected 0, got %ld\n", ret);
+ ok(ret == 0, "expected 0, got %Id\n", ret);
ret = SendMessageA(combo, CB_ADDSTRING, 0, (LPARAM)"item 1");
- ok(ret == 1, "expected 1, got %ld\n", ret);
+ ok(ret == 1, "expected 1, got %Id\n", ret);
ret = SendMessageA(combo, CB_ADDSTRING, 0, (LPARAM)"item 2");
- ok(ret == 2, "expected 2, got %ld\n", ret);
+ ok(ret == 2, "expected 2, got %Id\n", ret);
SendMessageA(combo, CB_SETCURSEL, 0, 0);
SetFocus(combo);
@@ -8000,7 +8001,7 @@ static void test_combobox_messages(void)
cbInfo.cbSize = sizeof(COMBOBOXINFO);
SetLastError(0xdeadbeef);
res = GetComboBoxInfo(combo, &cbInfo);
- ok(res, "Failed to get COMBOBOXINFO structure; LastError: %u\n", GetLastError());
+ ok(res, "Failed to get COMBOBOXINFO structure; LastError: %lu\n", GetLastError());
edit = cbInfo.hwndItem;
edit_window_proc = (WNDPROC)SetWindowLongPtrA(edit, GWLP_WNDPROC,
@@ -8054,12 +8055,12 @@ static void test_combobox_messages(void)
ok(combo != 0, "Failed to create combobox window\n");
ret = SendMessageA(combo, CB_ADDSTRING, 0, (LPARAM)"item 0");
- ok(ret == 0, "expected 0, got %ld\n", ret);
+ ok(ret == 0, "expected 0, got %Id\n", ret);
cbInfo.cbSize = sizeof(COMBOBOXINFO);
SetLastError(0xdeadbeef);
res = GetComboBoxInfo(combo, &cbInfo);
- ok(res, "Failed to get COMBOBOXINFO structure; LastError: %u\n", GetLastError());
+ ok(res, "Failed to get COMBOBOXINFO structure; LastError: %lu\n", GetLastError());
lbox = cbInfo.hwndList;
lbox_window_proc = (WNDPROC)SetWindowLongPtrA(lbox, GWLP_WNDPROC,
(ULONG_PTR)combobox_lbox_subclass_proc);
@@ -8167,7 +8168,7 @@ void dump_region(HRGN hrgn)
if (!(size = GetRegionData( hrgn, 0, NULL ))) return;
if (!(data = HeapAlloc( GetProcessHeap(), 0, size ))) return;
GetRegionData( hrgn, size, data );
- printf("%d rects:", data->rdh.nCount );
+ printf("%ld rects:", data->rdh.nCount );
for (i = 0, rect = (RECT *)data->Buffer; i < data->rdh.nCount; i++, rect++)
printf( " %s", wine_dbgstr_rect( rect ));
printf("\n");
@@ -8497,7 +8498,7 @@ static void test_paint_messages(void)
SetLastError(0xdeadbeef);
ok(!InvalidateRgn(0, NULL, FALSE), "InvalidateRgn(0, NULL, FALSE) should fail\n");
ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE || GetLastError() == 0xdeadbeef,
- "wrong error code %d\n", GetLastError());
+ "wrong error code %ld\n", GetLastError());
check_update_rgn( hwnd, 0 );
flush_events();
ok_sequence( WmEmptySeq, "WmEmptySeq", FALSE );
@@ -8506,7 +8507,7 @@ static void test_paint_messages(void)
ok(!ValidateRgn(0, NULL), "ValidateRgn(0, NULL) should fail\n");
ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE ||
broken( GetLastError() == 0xdeadbeef ) /* win9x */,
- "wrong error code %d\n", GetLastError());
+ "wrong error code %ld\n", GetLastError());
check_update_rgn( hwnd, 0 );
flush_events();
ok_sequence( WmEmptySeq, "WmEmptySeq", FALSE );
@@ -8515,7 +8516,7 @@ static void test_paint_messages(void)
ok(!UpdateWindow(NULL), "UpdateWindow(NULL) should fail\n");
ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE ||
broken( GetLastError() == 0xdeadbeef ) /* win9x */,
- "wrong error code %d\n", GetLastError());
+ "wrong error code %ld\n", GetLastError());
check_update_rgn( hwnd, 0 );
flush_events();
ok_sequence( WmEmptySeq, "WmEmptySeq", FALSE );
@@ -9054,7 +9055,7 @@ static DWORD CALLBACK create_child_thread( void *param )
while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg);
}
ret = WaitForSingleObject( wnd_event->stop_event, 5000 );
- ok( !ret, "WaitForSingleObject failed %x\n", ret );
+ ok( !ret, "WaitForSingleObject failed %lx\n", ret );
return 0;
}
@@ -9082,7 +9083,7 @@ static void create_manifest_file(const char *filename, const char *manifest)
MultiByteToWideChar( CP_ACP, 0, filename, -1, path, MAX_PATH );
file = CreateFileW(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
- ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %u\n", GetLastError());
+ ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %lu\n", GetLastError());
WriteFile(file, manifest, strlen(manifest), &size, NULL);
CloseHandle(file);
}
@@ -9099,10 +9100,10 @@ static HANDLE test_create(const char *file)
actctx.lpSource = path;
handle = CreateActCtxW(&actctx);
- ok(handle != INVALID_HANDLE_VALUE, "failed to create context, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "failed to create context, error %lu\n", GetLastError());
- ok(actctx.cbSize == sizeof(actctx), "cbSize=%d\n", actctx.cbSize);
- ok(actctx.dwFlags == 0, "dwFlags=%d\n", actctx.dwFlags);
+ ok(actctx.cbSize == sizeof(actctx), "cbSize=%ld\n", actctx.cbSize);
+ ok(actctx.dwFlags == 0, "dwFlags=%ld\n", actctx.dwFlags);
ok(actctx.lpSource == path, "lpSource=%p\n", actctx.lpSource);
ok(actctx.wProcessorArchitecture == 0, "wProcessorArchitecture=%d\n", actctx.wProcessorArchitecture);
ok(actctx.wLangId == 0, "wLangId=%d\n", actctx.wLangId);
@@ -9134,7 +9135,7 @@ static void test_interthread_messages(void)
}
hThread = CreateThread(NULL, 0, thread_proc, &wnd_event, 0, &tid);
- ok(hThread != NULL, "CreateThread failed, error %d\n", GetLastError());
+ ok(hThread != NULL, "CreateThread failed, error %ld\n", GetLastError());
ok(WaitForSingleObject(wnd_event.start_event, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
@@ -9143,16 +9144,16 @@ static void test_interthread_messages(void)
SetLastError(0xdeadbeef);
ok(!DestroyWindow(wnd_event.hwnd), "DestroyWindow succeeded\n");
ok(GetLastError() == ERROR_ACCESS_DENIED || GetLastError() == 0xdeadbeef,
- "wrong error code %d\n", GetLastError());
+ "wrong error code %ld\n", GetLastError());
proc = (WNDPROC)GetWindowLongPtrA(wnd_event.hwnd, GWLP_WNDPROC);
- ok(proc != NULL, "GetWindowLongPtrA(GWLP_WNDPROC) error %d\n", GetLastError());
+ ok(proc != NULL, "GetWindowLongPtrA(GWLP_WNDPROC) error %ld\n", GetLastError());
expected_len = lstrlenA("window caption text");
memset(buf, 0, sizeof(buf));
SetLastError(0xdeadbeef);
len = CallWindowProcA(proc, wnd_event.hwnd, WM_GETTEXT, sizeof(buf), (LPARAM)buf);
- ok(len == expected_len, "CallWindowProcA(WM_GETTEXT) error %d, len %d, expected len %d\n", GetLastError(), len, expected_len);
+ ok(len == expected_len, "CallWindowProcA(WM_GETTEXT) error %ld, len %d, expected len %d\n", GetLastError(), len, expected_len);
ok(!lstrcmpA(buf, "window caption text"), "window text mismatch\n");
msg.hwnd = wnd_event.hwnd;
@@ -9163,7 +9164,7 @@ static void test_interthread_messages(void)
SetLastError(0xdeadbeef);
len = DispatchMessageA(&msg);
ok((!len && GetLastError() == ERROR_MESSAGE_SYNC_ONLY) || broken(len), /* nt4 */
- "DispatchMessageA(WM_GETTEXT) succeeded on another thread window: ret %d, error %d\n", len, GetLastError());
+ "DispatchMessageA(WM_GETTEXT) succeeded on another thread window: ret %d, error %ld\n", len, GetLastError());
/* the following test causes an exception in user.exe under win9x */
msg.hwnd = wnd_event.hwnd;
@@ -9173,10 +9174,10 @@ static void test_interthread_messages(void)
SetLastError(0xdeadbeef);
len = DispatchMessageA(&msg);
ok(!len && GetLastError() == 0xdeadbeef,
- "DispatchMessageA(WM_TIMER) failed on another thread window: ret %d, error %d\n", len, GetLastError());
+ "DispatchMessageA(WM_TIMER) failed on another thread window: ret %d, error %ld\n", len, GetLastError());
ret = PostMessageA(wnd_event.hwnd, WM_QUIT, 0, 0);
- ok( ret, "PostMessageA(WM_QUIT) error %d\n", GetLastError());
+ ok( ret, "PostMessageA(WM_QUIT) error %ld\n", GetLastError());
ok(WaitForSingleObject(hThread, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
CloseHandle(hThread);
@@ -9226,22 +9227,22 @@ static void test_interthread_messages(void)
handle = (void*)0xdeadbeef;
ret = GetCurrentActCtx(&handle);
- ok(ret, "GetCurrentActCtx failed: %u\n", GetLastError());
+ ok(ret, "GetCurrentActCtx failed: %lu\n", GetLastError());
ok(handle == 0, "active context %p\n", handle);
wnd_event.start_event = CreateEventW(NULL, 0, 0, NULL);
hThread = CreateThread(NULL, 0, thread_proc, &wnd_event, 0, &tid);
- ok(hThread != NULL, "CreateThread failed, error %d\n", GetLastError());
+ ok(hThread != NULL, "CreateThread failed, error %ld\n", GetLastError());
ok(WaitForSingleObject(wnd_event.start_event, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
CloseHandle(wnd_event.start_event);
/* context is activated after thread creation, so it doesn't inherit it by default */
ret = ActivateActCtx(context, &cookie);
- ok(ret, "activation failed: %u\n", GetLastError());
+ ok(ret, "activation failed: %lu\n", GetLastError());
handle = 0;
ret = GetCurrentActCtx(&handle);
- ok(ret, "GetCurrentActCtx failed: %u\n", GetLastError());
+ ok(ret, "GetCurrentActCtx failed: %lu\n", GetLastError());
ok(handle != 0, "active context %p\n", handle);
ReleaseActCtx(handle);
@@ -9256,13 +9257,13 @@ static void test_interthread_messages(void)
CloseHandle(event);
ret = PostMessageA(wnd_event.hwnd, WM_QUIT, 0, 0);
- ok(ret, "PostMessageA(WM_QUIT) error %d\n", GetLastError());
+ ok(ret, "PostMessageA(WM_QUIT) error %ld\n", GetLastError());
ok(WaitForSingleObject(hThread, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
CloseHandle(hThread);
ret = DeactivateActCtx(0, cookie);
- ok(ret, "DeactivateActCtx failed: %u\n", GetLastError());
+ ok(ret, "DeactivateActCtx failed: %lu\n", GetLastError());
ReleaseActCtx(context);
}
@@ -9696,7 +9697,7 @@ static void test_accelerators(void)
ok_sequence(WmCtrlAltVkN, "Ctrl+Alt+VK_N press/release 1", FALSE);
ret = DestroyAcceleratorTable(hAccel);
- ok( ret, "DestroyAcceleratorTable error %d\n", GetLastError());
+ ok( ret, "DestroyAcceleratorTable error %ld\n", GetLastError());
hAccel = LoadAcceleratorsA(GetModuleHandleA(NULL), MAKEINTRESOURCEA(2));
assert(hAccel != 0);
@@ -9771,7 +9772,7 @@ static void test_accelerators(void)
ok_sequence(WmCtrlAltShiftVkN, "Ctrl+Alt+Shift+VK_N press/release", FALSE);
ret = DestroyAcceleratorTable(hAccel);
- ok( ret, "DestroyAcceleratorTable error %d\n", GetLastError());
+ ok( ret, "DestroyAcceleratorTable error %ld\n", GetLastError());
hAccel = 0;
trace("testing Alt press/release\n");
@@ -9864,7 +9865,7 @@ static LRESULT MsgCheckProc (BOOL unicode, HWND hwnd, UINT message,
{
LONG style = GetWindowLongA(hwnd, GWL_STYLE);
ok((BOOL)wParam == !(style & WS_DISABLED),
- "wrong WS_DISABLED state: %ld != %d\n", wParam, !(style & WS_DISABLED));
+ "wrong WS_DISABLED state: %Id != %d\n", wParam, !(style & WS_DISABLED));
break;
}
@@ -9921,15 +9922,15 @@ static LRESULT MsgCheckProc (BOOL unicode, HWND hwnd, UINT message,
handle = (void*)0xdeadbeef;
ret = GetCurrentActCtx(&handle);
- ok(ret, "failed to get current context, %u\n", GetLastError());
+ ok(ret, "failed to get current context, %lu\n", GetLastError());
ok(handle == 0, "got active context %p\n", handle);
memset(&basicinfo, 0xff, sizeof(basicinfo));
ret = QueryActCtxW(QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX, handle, 0, ActivationContextBasicInformation,
&basicinfo, sizeof(basicinfo), NULL);
- ok(ret, "got %d, error %d\n", ret, GetLastError());
+ ok(ret, "got %d, error %ld\n", ret, GetLastError());
ok(basicinfo.hActCtx == NULL, "got %p\n", basicinfo.hActCtx);
- ok(basicinfo.dwFlags == 0, "got %x\n", basicinfo.dwFlags);
+ ok(basicinfo.dwFlags == 0, "got %lx\n", basicinfo.dwFlags);
if (event) SetEvent(event);
return 1;
@@ -9961,17 +9962,17 @@ static LRESULT MsgCheckProc (BOOL unicode, HWND hwnd, UINT message,
MINMAXINFO *minmax = (MINMAXINFO *)lParam;
GetClientRect(parent, &rc);
- trace("parent %p client size = (%d x %d)\n", parent, rc.right, rc.bottom);
- trace("Reserved=%d,%d MaxSize=%d,%d MaxPos=%d,%d MinTrack=%d,%d MaxTrack=%d,%d\n",
+ trace("parent %p client size = (%ld x %ld)\n", parent, rc.right, rc.bottom);
+ trace("Reserved=%ld,%ld MaxSize=%ld,%ld MaxPos=%ld,%ld MinTrack=%ld,%ld MaxTrack=%ld,%ld\n",
minmax->ptReserved.x, minmax->ptReserved.y,
minmax->ptMaxSize.x, minmax->ptMaxSize.y,
minmax->ptMaxPosition.x, minmax->ptMaxPosition.y,
minmax->ptMinTrackSize.x, minmax->ptMinTrackSize.y,
minmax->ptMaxTrackSize.x, minmax->ptMaxTrackSize.y);
- ok(minmax->ptMaxSize.x == rc.right, "default width of maximized child %d != %d\n",
+ ok(minmax->ptMaxSize.x == rc.right, "default width of maximized child %ld != %ld\n",
minmax->ptMaxSize.x, rc.right);
- ok(minmax->ptMaxSize.y == rc.bottom, "default height of maximized child %d != %d\n",
+ ok(minmax->ptMaxSize.y == rc.bottom, "default height of maximized child %ld != %ld\n",
minmax->ptMaxSize.y, rc.bottom);
}
@@ -10139,9 +10140,9 @@ static LRESULT WINAPI TestDlgProcA(HWND hwnd, UINT message, WPARAM wParam, LPARA
DefDlgProcA(hwnd, DM_SETDEFID, 1, 0);
ret = DefDlgProcA(hwnd, DM_GETDEFID, 0, 0);
if (after_end_dialog)
- ok( ret == 0, "DM_GETDEFID should return 0 after EndDialog, got %lx\n", ret );
+ ok( ret == 0, "DM_GETDEFID should return 0 after EndDialog, got %Ix\n", ret );
else
- ok(HIWORD(ret) == DC_HASDEFID, "DM_GETDEFID should return DC_HASDEFID, got %lx\n", ret);
+ ok(HIWORD(ret) == DC_HASDEFID, "DM_GETDEFID should return DC_HASDEFID, got %Ix\n", ret);
}
msg.hwnd = hwnd;
@@ -10261,15 +10262,15 @@ static LRESULT WINAPI HotkeyMsgCheckProcA(HWND hwnd, UINT message, WPARAM wParam
if (message == WM_APP)
{
queue_status = GetQueueStatus(QS_HOTKEY);
- ok((queue_status & (QS_HOTKEY << 16)) == QS_HOTKEY << 16, "expected QS_HOTKEY << 16 set, got %x\n", queue_status);
+ ok((queue_status & (QS_HOTKEY << 16)) == QS_HOTKEY << 16, "expected QS_HOTKEY << 16 set, got %lx\n", queue_status);
queue_status = GetQueueStatus(QS_POSTMESSAGE);
- ok((queue_status & (QS_POSTMESSAGE << 16)) == QS_POSTMESSAGE << 16, "expected QS_POSTMESSAGE << 16 set, got %x\n", queue_status);
+ ok((queue_status & (QS_POSTMESSAGE << 16)) == QS_POSTMESSAGE << 16, "expected QS_POSTMESSAGE << 16 set, got %lx\n", queue_status);
PostMessageA(hwnd, WM_APP+1, 0, 0);
}
else if (message == WM_APP+1)
{
queue_status = GetQueueStatus(QS_HOTKEY);
- ok((queue_status & (QS_HOTKEY << 16)) == 0, "expected QS_HOTKEY << 16 cleared, got %x\n", queue_status);
+ ok((queue_status & (QS_HOTKEY << 16)) == 0, "expected QS_HOTKEY << 16 cleared, got %lx\n", queue_status);
}
return ret;
@@ -10558,35 +10559,35 @@ static void test_message_conversion(void)
SetLastError(0);
lRes = PostMessageA(hwnd, CB_FINDSTRINGEXACT, 0, (LPARAM)wszUnicode);
ok(lRes == 0 && (GetLastError() == ERROR_MESSAGE_SYNC_ONLY || GetLastError() == ERROR_INVALID_PARAMETER),
- "PostMessage on sync only message returned %ld, last error %d\n", lRes, GetLastError());
+ "PostMessage on sync only message returned %Id, last error %ld\n", lRes, GetLastError());
SetLastError(0);
lRes = PostMessageW(hwnd, CB_FINDSTRINGEXACT, 0, (LPARAM)wszUnicode);
ok(lRes == 0 && (GetLastError() == ERROR_MESSAGE_SYNC_ONLY || GetLastError() == ERROR_INVALID_PARAMETER),
- "PostMessage on sync only message returned %ld, last error %d\n", lRes, GetLastError());
+ "PostMessage on sync only message returned %Id, last error %ld\n", lRes, GetLastError());
SetLastError(0);
lRes = PostThreadMessageA(GetCurrentThreadId(), CB_FINDSTRINGEXACT, 0, (LPARAM)wszUnicode);
ok(lRes == 0 && (GetLastError() == ERROR_MESSAGE_SYNC_ONLY || GetLastError() == ERROR_INVALID_PARAMETER),
- "PosThreadtMessage on sync only message returned %ld, last error %d\n", lRes, GetLastError());
+ "PosThreadtMessage on sync only message returned %Id, last error %ld\n", lRes, GetLastError());
SetLastError(0);
lRes = PostThreadMessageW(GetCurrentThreadId(), CB_FINDSTRINGEXACT, 0, (LPARAM)wszUnicode);
ok(lRes == 0 && (GetLastError() == ERROR_MESSAGE_SYNC_ONLY || GetLastError() == ERROR_INVALID_PARAMETER),
- "PosThreadtMessage on sync only message returned %ld, last error %d\n", lRes, GetLastError());
+ "PosThreadtMessage on sync only message returned %Id, last error %ld\n", lRes, GetLastError());
SetLastError(0);
lRes = SendNotifyMessageA(hwnd, CB_FINDSTRINGEXACT, 0, (LPARAM)wszUnicode);
ok(lRes == 0 && (GetLastError() == ERROR_MESSAGE_SYNC_ONLY || GetLastError() == ERROR_INVALID_PARAMETER),
- "SendNotifyMessage on sync only message returned %ld, last error %d\n", lRes, GetLastError());
+ "SendNotifyMessage on sync only message returned %Id, last error %ld\n", lRes, GetLastError());
SetLastError(0);
lRes = SendNotifyMessageW(hwnd, CB_FINDSTRINGEXACT, 0, (LPARAM)wszUnicode);
ok(lRes == 0 && (GetLastError() == ERROR_MESSAGE_SYNC_ONLY || GetLastError() == ERROR_INVALID_PARAMETER),
- "SendNotifyMessage on sync only message returned %ld, last error %d\n", lRes, GetLastError());
+ "SendNotifyMessage on sync only message returned %Id, last error %ld\n", lRes, GetLastError());
SetLastError(0);
lRes = SendMessageCallbackA(hwnd, CB_FINDSTRINGEXACT, 0, (LPARAM)wszUnicode, NULL, 0);
ok(lRes == 0 && (GetLastError() == ERROR_MESSAGE_SYNC_ONLY || GetLastError() == ERROR_INVALID_PARAMETER),
- "SendMessageCallback on sync only message returned %ld, last error %d\n", lRes, GetLastError());
+ "SendMessageCallback on sync only message returned %Id, last error %ld\n", lRes, GetLastError());
SetLastError(0);
lRes = SendMessageCallbackW(hwnd, CB_FINDSTRINGEXACT, 0, (LPARAM)wszUnicode, NULL, 0);
ok(lRes == 0 && (GetLastError() == ERROR_MESSAGE_SYNC_ONLY || GetLastError() == ERROR_INVALID_PARAMETER),
- "SendMessageCallback on sync only message returned %ld, last error %d\n", lRes, GetLastError());
+ "SendMessageCallback on sync only message returned %Id, last error %ld\n", lRes, GetLastError());
/* Check WM_GETTEXTLENGTH A->W behaviour, whether WM_GETTEXT is also sent or not */
@@ -10598,14 +10599,14 @@ static void test_message_conversion(void)
lRes = SendMessageA (hwnd, WM_GETTEXTLENGTH, 0, 0);
ok_sequence(WmGetTextLengthAfromW, "ANSI WM_GETTEXTLENGTH to Unicode window", FALSE);
ok( lRes == WideCharToMultiByte( CP_ACP, 0, wszUnicode, lstrlenW(wszUnicode), NULL, 0, NULL, NULL ),
- "got bad length %ld\n", lRes );
+ "got bad length %Id\n", lRes );
flush_sequence();
lRes = CallWindowProcA( (WNDPROC)GetWindowLongPtrA( hwnd, GWLP_WNDPROC ),
hwnd, WM_GETTEXTLENGTH, 0, 0);
ok_sequence(WmGetTextLengthAfromW, "ANSI WM_GETTEXTLENGTH to Unicode window", FALSE);
ok( lRes == WideCharToMultiByte( CP_ACP, 0, wszUnicode, lstrlenW(wszUnicode), NULL, 0, NULL, NULL ),
- "got bad length %ld\n", lRes );
+ "got bad length %Id\n", lRes );
wndproc = (WNDPROC)SetWindowLongPtrW( hwnd, GWLP_WNDPROC, (LONG_PTR)get_text_len_proc );
newproc = (WNDPROC)GetWindowLongPtrA( hwnd, GWLP_WNDPROC );
@@ -10613,17 +10614,17 @@ static void test_message_conversion(void)
ok( lRes == WideCharToMultiByte( CP_ACP, 0, dummy_window_text, lstrlenW(dummy_window_text),
NULL, 0, NULL, NULL ) ||
broken(lRes == lstrlenW(dummy_window_text) + 37),
- "got bad length %ld\n", lRes );
+ "got bad length %Id\n", lRes );
SetWindowLongPtrW( hwnd, GWLP_WNDPROC, (LONG_PTR)wndproc ); /* restore old wnd proc */
lRes = CallWindowProcA( newproc, hwnd, WM_GETTEXTLENGTH, 0, 0 );
ok( lRes == WideCharToMultiByte( CP_ACP, 0, dummy_window_text, lstrlenW(dummy_window_text),
NULL, 0, NULL, NULL ) ||
broken(lRes == lstrlenW(dummy_window_text) + 37),
- "got bad length %ld\n", lRes );
+ "got bad length %Id\n", lRes );
ret = DestroyWindow(hwnd);
- ok( ret, "DestroyWindow() error %d\n", GetLastError());
+ ok( ret, "DestroyWindow() error %ld\n", GetLastError());
}
struct timer_info
@@ -10755,7 +10756,7 @@ static void test_timers_no_wnd(void)
id = SetTimer(NULL, 0, 100, callback_count);
ok(id != 0, "did not get id from SetTimer.\n");
id2 = SetTimer(NULL, id, 200, callback_count);
- ok(id2 == id, "did not get same id from SetTimer when replacing (%li expected %li).\n", id2, id);
+ ok(id2 == id, "did not get same id from SetTimer when replacing (%Ii expected %Ii).\n", id2, id);
Sleep(150);
while (PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) DispatchMessageA(&msg);
ok(count == 0, "did not get zero count as expected (%i).\n", count);
@@ -10790,7 +10791,7 @@ static void test_timers_no_wnd(void)
{
count = 0;
id = pSetCoalescableTimer(NULL, 0, 0, callback_count, 0);
- ok(id != 0, "SetCoalescableTimer failed with %u.\n", GetLastError());
+ ok(id != 0, "SetCoalescableTimer failed with %lu.\n", GetLastError());
start = GetTickCount();
while (GetTickCount()-start < 100 && GetMessageA(&msg, NULL, 0, 0))
DispatchMessageA(&msg);
@@ -10809,7 +10810,7 @@ static void test_timers_no_wnd(void)
}
ok(i != ARRAY_SIZE(ids), "all timers were created successfully\n");
ok(GetLastError()==ERROR_NO_MORE_USER_HANDLES || broken(GetLastError()==0xdeadbeef),
- "GetLastError() = %d\n", GetLastError());
+ "GetLastError() = %ld\n", GetLastError());
while (i > 0) KillTimer(NULL, ids[--i]);
}
@@ -11141,7 +11142,7 @@ static void test_winevents(void)
hwnd2 = hevent;
hthread = CreateThread(NULL, 0, cbt_global_hook_thread_proc, &hwnd2, 0, &tid);
- ok(hthread != NULL, "CreateThread failed, error %d\n", GetLastError());
+ ok(hthread != NULL, "CreateThread failed, error %ld\n", GetLastError());
ok(WaitForSingleObject(hevent, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
@@ -11156,7 +11157,7 @@ static void test_winevents(void)
ok_sequence(WmGlobalHookSeq_2, "global hook 2", FALSE);
ret = UnhookWindowsHookEx(hCBT_global_hook);
- ok( ret, "UnhookWindowsHookEx error %d\n", GetLastError());
+ ok( ret, "UnhookWindowsHookEx error %ld\n", GetLastError());
PostThreadMessageA(tid, WM_QUIT, 0, 0);
ok(WaitForSingleObject(hthread, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
@@ -11181,7 +11182,7 @@ static void test_winevents(void)
pNotifyWinEvent(events[0].message, 0, events[0].wParam, events[0].lParam);
ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE || /* Win2k */
GetLastError() == 0xdeadbeef, /* Win9x */
- "unexpected error %d\n", GetLastError());
+ "unexpected error %ld\n", GetLastError());
ok_sequence(WmEmptySeq, "empty notify winevents", FALSE);
}
@@ -11197,14 +11198,14 @@ static void test_winevents(void)
GetModuleHandleA(0), win_event_global_hook_proc,
GetCurrentProcessId(), 0,
WINEVENT_INCONTEXT);
- ok(hhook != 0, "SetWinEventHook error %d\n", GetLastError());
+ ok(hhook != 0, "SetWinEventHook error %ld\n", GetLastError());
hevent = CreateEventA(NULL, 0, 0, NULL);
assert(hevent);
hwnd2 = hevent;
hthread = CreateThread(NULL, 0, win_event_global_thread_proc, &hwnd2, 0, &tid);
- ok(hthread != NULL, "CreateThread failed, error %d\n", GetLastError());
+ ok(hthread != NULL, "CreateThread failed, error %ld\n", GetLastError());
ok(WaitForSingleObject(hevent, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
@@ -11220,7 +11221,7 @@ static void test_winevents(void)
ok_sequence(WmWinEventCaretSeq, "caret winevent", FALSE);
ret = pUnhookWinEvent(hhook);
- ok( ret, "UnhookWinEvent error %d\n", GetLastError());
+ ok( ret, "UnhookWinEvent error %ld\n", GetLastError());
PostThreadMessageA(tid, WM_QUIT, 0, 0);
ok(WaitForSingleObject(hthread, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
@@ -11233,7 +11234,7 @@ static void test_winevents(void)
hhook = pSetWinEventHook(EVENT_MIN, EVENT_MAX, 0,
win_event_global_hook_proc, GetCurrentProcessId(), 0,
WINEVENT_OUTOFCONTEXT);
- ok(hhook != 0, "SetWinEventHook error %d\n", GetLastError());
+ ok(hhook != 0, "SetWinEventHook error %ld\n", GetLastError());
hevent = CreateEventA(NULL, 0, 0, NULL);
assert(hevent);
@@ -11242,7 +11243,7 @@ static void test_winevents(void)
flush_sequence();
hthread = CreateThread(NULL, 0, win_event_global_thread_proc, &hwnd2, 0, &tid);
- ok(hthread != NULL, "CreateThread failed, error %d\n", GetLastError());
+ ok(hthread != NULL, "CreateThread failed, error %ld\n", GetLastError());
ok(WaitForSingleObject(hevent, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
@@ -11264,7 +11265,7 @@ static void test_winevents(void)
ok_sequence(WmWinEventCaretSeq_2, "caret winevent for out of context proc", FALSE);
ret = pUnhookWinEvent(hhook);
- ok( ret, "UnhookWinEvent error %d\n", GetLastError());
+ ok( ret, "UnhookWinEvent error %ld\n", GetLastError());
PostThreadMessageA(tid, WM_QUIT, 0, 0);
ok(WaitForSingleObject(hthread, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
@@ -11287,7 +11288,7 @@ static void test_winevents(void)
hwnd2 = hevent;
hthread = CreateThread(NULL, 0, mouse_ll_global_thread_proc, &hwnd2, 0, &tid);
- ok(hthread != NULL, "CreateThread failed, error %d\n", GetLastError());
+ ok(hthread != NULL, "CreateThread failed, error %ld\n", GetLastError());
while (WaitForSingleObject(hevent, 100) == WAIT_TIMEOUT)
while (PeekMessageA( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessageA( &msg );
@@ -11302,7 +11303,7 @@ static void test_winevents(void)
ok_sequence(WmMouseLLHookSeq, "MOUSE_LL hook same thread", FALSE);
ret = UnhookWindowsHookEx(hCBT_global_hook);
- ok( ret, "UnhookWindowsHookEx error %d\n", GetLastError());
+ ok( ret, "UnhookWindowsHookEx error %ld\n", GetLastError());
PostThreadMessageA(tid, WM_QUIT, 0, 0);
ok(WaitForSingleObject(hthread, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
@@ -11331,7 +11332,7 @@ static void test_set_hook(void)
SetLastError(0xdeadbeef);
hhook = SetWindowsHookExA(WH_CBT, cbt_hook_proc, 0, 0);
ok(!hhook, "global hook requires hModule != 0\n");
- ok(GetLastError() == ERROR_HOOK_NEEDS_HMOD, "unexpected error %d\n", GetLastError());
+ ok(GetLastError() == ERROR_HOOK_NEEDS_HMOD, "unexpected error %ld\n", GetLastError());
}
SetLastError(0xdeadbeef);
@@ -11339,13 +11340,13 @@ static void test_set_hook(void)
ok(!hhook, "SetWinEventHook with invalid proc should fail\n");
ok(GetLastError() == ERROR_INVALID_FILTER_PROC || /* Win2k */
GetLastError() == 0xdeadbeef, /* Win9x */
- "unexpected error %d\n", GetLastError());
+ "unexpected error %ld\n", GetLastError());
SetLastError(0xdeadbeef);
ok(!UnhookWindowsHookEx((HHOOK)0xdeadbeef), "UnhookWindowsHookEx succeeded\n");
ok(GetLastError() == ERROR_INVALID_HOOK_HANDLE || /* Win2k */
GetLastError() == 0xdeadbeef, /* Win9x */
- "unexpected error %d\n", GetLastError());
+ "unexpected error %ld\n", GetLastError());
if (!pSetWinEventHook || !pUnhookWinEvent) return;
@@ -11356,7 +11357,7 @@ static void test_set_hook(void)
ok(!hwinevent_hook, "WINEVENT_INCONTEXT requires hModule != 0\n");
ok(GetLastError() == ERROR_HOOK_NEEDS_HMOD || /* Win2k */
GetLastError() == 0xdeadbeef, /* Win9x */
- "unexpected error %d\n", GetLastError());
+ "unexpected error %ld\n", GetLastError());
/* even thread local incontext hooks require hmodule */
SetLastError(0xdeadbeef);
@@ -11365,7 +11366,7 @@ static void test_set_hook(void)
ok(!hwinevent_hook, "WINEVENT_INCONTEXT requires hModule != 0\n");
ok(GetLastError() == ERROR_HOOK_NEEDS_HMOD || /* Win2k */
GetLastError() == 0xdeadbeef, /* Win9x */
- "unexpected error %d\n", GetLastError());
+ "unexpected error %ld\n", GetLastError());
if (0)
{
@@ -11374,28 +11375,28 @@ static void test_set_hook(void)
hwinevent_hook = pSetWinEventHook(1, 0, 0, win_event_proc,
GetCurrentProcessId(), 0, WINEVENT_OUTOFCONTEXT);
ok(!hwinevent_hook, "SetWinEventHook with invalid event range should fail\n");
- ok(GetLastError() == ERROR_INVALID_HOOK_FILTER, "unexpected error %d\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_HOOK_FILTER, "unexpected error %ld\n", GetLastError());
SetLastError(0xdeadbeef);
hwinevent_hook = pSetWinEventHook(-1, 1, 0, win_event_proc,
GetCurrentProcessId(), 0, WINEVENT_OUTOFCONTEXT);
ok(!hwinevent_hook, "SetWinEventHook with invalid event range should fail\n");
- ok(GetLastError() == ERROR_INVALID_HOOK_FILTER, "unexpected error %d\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_HOOK_FILTER, "unexpected error %ld\n", GetLastError());
SetLastError(0xdeadbeef);
hwinevent_hook = pSetWinEventHook(EVENT_MIN, EVENT_MAX, 0, win_event_proc,
0, 0xdeadbeef, WINEVENT_OUTOFCONTEXT);
ok(!hwinevent_hook, "SetWinEventHook with invalid tid should fail\n");
- ok(GetLastError() == ERROR_INVALID_THREAD_ID, "unexpected error %d\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_THREAD_ID, "unexpected error %ld\n", GetLastError());
}
SetLastError(0xdeadbeef);
hwinevent_hook = pSetWinEventHook(0, 0, 0, win_event_proc,
GetCurrentProcessId(), 0, WINEVENT_OUTOFCONTEXT);
- ok(hwinevent_hook != 0, "SetWinEventHook error %d\n", GetLastError());
- ok(GetLastError() == 0xdeadbeef, "unexpected error %d\n", GetLastError());
+ ok(hwinevent_hook != 0, "SetWinEventHook error %ld\n", GetLastError());
+ ok(GetLastError() == 0xdeadbeef, "unexpected error %ld\n", GetLastError());
ret = pUnhookWinEvent(hwinevent_hook);
- ok( ret, "UnhookWinEvent error %d\n", GetLastError());
+ ok( ret, "UnhookWinEvent error %ld\n", GetLastError());
todo_wine {
/* This call succeeds under win2k SP4, but fails under Wine.
@@ -11403,17 +11404,17 @@ todo_wine {
SetLastError(0xdeadbeef);
hwinevent_hook = pSetWinEventHook(EVENT_MIN, EVENT_MAX, 0, win_event_proc,
0xdeadbeef, 0, WINEVENT_OUTOFCONTEXT);
- ok(hwinevent_hook != 0, "SetWinEventHook error %d\n", GetLastError());
- ok(GetLastError() == 0xdeadbeef, "unexpected error %d\n", GetLastError());
+ ok(hwinevent_hook != 0, "SetWinEventHook error %ld\n", GetLastError());
+ ok(GetLastError() == 0xdeadbeef, "unexpected error %ld\n", GetLastError());
ret = pUnhookWinEvent(hwinevent_hook);
- ok( ret, "UnhookWinEvent error %d\n", GetLastError());
+ ok( ret, "UnhookWinEvent error %ld\n", GetLastError());
}
SetLastError(0xdeadbeef);
ok(!pUnhookWinEvent((HWINEVENTHOOK)0xdeadbeef), "UnhookWinEvent succeeded\n");
ok(GetLastError() == ERROR_INVALID_HANDLE || /* Win2k */
GetLastError() == 0xdeadbeef, /* Win9x */
- "unexpected error %d\n", GetLastError());
+ "unexpected error %ld\n", GetLastError());
}
static HWND hook_hwnd;
@@ -11662,7 +11663,7 @@ static void test_DestroyWindow(void)
test_DestroyWindow_flag = TRUE;
ret = DestroyWindow(parent);
- ok( ret, "DestroyWindow() error %d\n", GetLastError());
+ ok( ret, "DestroyWindow() error %ld\n", GetLastError());
test_DestroyWindow_flag = FALSE;
ok_sequence(destroy_window_with_children, "destroy window with children", FALSE);
@@ -11788,7 +11789,7 @@ static DWORD CALLBACK send_msg_thread( LPVOID arg )
info->ret = SendMessageTimeoutA( info->hwnd, WM_USER, 0, 0, 0, info->timeout, NULL );
if (!info->ret) ok( GetLastError() == ERROR_TIMEOUT ||
broken(GetLastError() == 0), /* win9x */
- "unexpected error %d\n", GetLastError());
+ "unexpected error %ld\n", GetLastError());
return 0;
}
@@ -12083,7 +12084,7 @@ static void test_edit_messages(void)
ok(hwnd != 0, "Failed to create edit window\n");
dlg_code = SendMessageA(hwnd, WM_GETDLGCODE, 0, 0);
- ok(dlg_code == (DLGC_WANTCHARS|DLGC_HASSETSEL|DLGC_WANTARROWS), "wrong dlg_code %08x\n", dlg_code);
+ ok(dlg_code == (DLGC_WANTCHARS|DLGC_HASSETSEL|DLGC_WANTARROWS), "wrong dlg_code %08lx\n", dlg_code);
flush_sequence();
SetFocus(hwnd);
@@ -12126,7 +12127,7 @@ static void test_edit_messages(void)
dlg_code = SendMessageA(hwnd, WM_GETDLGCODE, 0, 0);
ok(dlg_code == (DLGC_WANTCHARS|DLGC_HASSETSEL|DLGC_WANTARROWS|DLGC_WANTALLKEYS),
- "wrong dlg_code %08x\n", dlg_code);
+ "wrong dlg_code %08lx\n", dlg_code);
ShowWindow(hwnd, SW_SHOW);
UpdateWindow(hwnd);
@@ -12217,12 +12218,12 @@ static DWORD CALLBACK send_msg_thread_2(void *param)
case WAIT_OBJECT_0 + EV_SENDMSG:
trace("thread: sending message\n");
ret = SendNotifyMessageA(info->hwnd, WM_USER, 0, 0);
- ok(ret, "SendNotifyMessageA failed error %u\n", GetLastError());
+ ok(ret, "SendNotifyMessageA failed error %lu\n", GetLastError());
SetEvent(info->hevent[EV_ACK]);
break;
default:
- trace("unexpected return: %04x\n", ret);
+ trace("unexpected return: %04lx\n", ret);
assert(0);
break;
}
@@ -12270,7 +12271,7 @@ static void test_PeekMessage(void)
while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) /* nothing */ ;
qstatus = GetQueueStatus(qs_all_input);
}
- ok(qstatus == 0, "wrong qstatus %08x\n", qstatus);
+ ok(qstatus == 0, "wrong qstatus %08lx\n", qstatus);
trace("signalling to send message\n");
SetEvent(info.hevent[EV_SENDMSG]);
@@ -12279,15 +12280,15 @@ static void test_PeekMessage(void)
/* pass invalid QS_xxxx flags */
SetLastError(0xdeadbeef);
qstatus = GetQueueStatus(0xffffffff);
- ok(qstatus == 0 || broken(qstatus) /* win9x */, "GetQueueStatus should fail: %08x\n", qstatus);
+ ok(qstatus == 0 || broken(qstatus) /* win9x */, "GetQueueStatus should fail: %08lx\n", qstatus);
if (!qstatus)
{
- ok(GetLastError() == ERROR_INVALID_FLAGS, "wrong error %d\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_FLAGS, "wrong error %ld\n", GetLastError());
qstatus = GetQueueStatus(qs_all_input);
}
qstatus &= ~MAKELONG( 0x4000, 0x4000 ); /* sometimes set on Win95 */
ok(qstatus == MAKELONG(QS_SENDMESSAGE, QS_SENDMESSAGE),
- "wrong qstatus %08x\n", qstatus);
+ "wrong qstatus %08lx\n", qstatus);
msg.message = 0;
ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE);
@@ -12297,7 +12298,7 @@ static void test_PeekMessage(void)
ok_sequence(WmUser, "WmUser", FALSE);
qstatus = GetQueueStatus(qs_all_input);
- ok(qstatus == 0, "wrong qstatus %08x\n", qstatus);
+ ok(qstatus == 0, "wrong qstatus %08lx\n", qstatus);
keybd_event('N', 0, 0, 0);
keybd_event('N', 0, KEYEVENTF_KEYUP, 0);
@@ -12310,19 +12311,19 @@ static void test_PeekMessage(void)
ok(qstatus == MAKELONG(QS_KEY, QS_KEY) ||
/* keybd_event seems to trigger a sent message on NT4 */
qstatus == MAKELONG(QS_KEY|QS_SENDMESSAGE, QS_KEY|QS_SENDMESSAGE),
- "wrong qstatus %08x\n", qstatus);
+ "wrong qstatus %08lx\n", qstatus);
PostMessageA(info.hwnd, WM_CHAR, 'z', 0);
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(QS_POSTMESSAGE, QS_POSTMESSAGE|QS_KEY) ||
qstatus == MAKELONG(QS_POSTMESSAGE, QS_POSTMESSAGE|QS_KEY|QS_SENDMESSAGE),
- "wrong qstatus %08x\n", qstatus);
+ "wrong qstatus %08lx\n", qstatus);
InvalidateRect(info.hwnd, NULL, FALSE);
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(QS_PAINT, QS_PAINT|QS_POSTMESSAGE|QS_KEY) ||
qstatus == MAKELONG(QS_PAINT, QS_PAINT|QS_POSTMESSAGE|QS_KEY|QS_SENDMESSAGE),
- "wrong qstatus %08x\n", qstatus);
+ "wrong qstatus %08lx\n", qstatus);
trace("signalling to send message\n");
SetEvent(info.hevent[EV_SENDMSG]);
@@ -12330,7 +12331,7 @@ static void test_PeekMessage(void)
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(QS_SENDMESSAGE, QS_SENDMESSAGE|QS_PAINT|QS_POSTMESSAGE|QS_KEY),
- "wrong qstatus %08x\n", qstatus);
+ "wrong qstatus %08lx\n", qstatus);
msg.message = 0;
ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE | (qs_input << 16));
@@ -12351,7 +12352,7 @@ static void test_PeekMessage(void)
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(0, QS_PAINT|QS_POSTMESSAGE|QS_KEY),
- "wrong qstatus %08x\n", qstatus);
+ "wrong qstatus %08lx\n", qstatus);
trace("signalling to send message\n");
SetEvent(info.hevent[EV_SENDMSG]);
@@ -12359,7 +12360,7 @@ static void test_PeekMessage(void)
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(QS_SENDMESSAGE, QS_SENDMESSAGE|QS_PAINT|QS_POSTMESSAGE|QS_KEY),
- "wrong qstatus %08x\n", qstatus);
+ "wrong qstatus %08lx\n", qstatus);
msg.message = 0;
ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE | PM_QS_POSTMESSAGE );
@@ -12370,18 +12371,18 @@ static void test_PeekMessage(void)
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(0, QS_PAINT|QS_POSTMESSAGE|QS_KEY),
- "wrong qstatus %08x\n", qstatus);
+ "wrong qstatus %08lx\n", qstatus);
msg.message = 0;
ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE | PM_QS_POSTMESSAGE);
ok(ret && msg.message == WM_CHAR && msg.wParam == 'z',
- "got %d and %04x wParam %08lx instead of TRUE and WM_CHAR wParam 'z'\n",
+ "got %d and %04x wParam %08Ix instead of TRUE and WM_CHAR wParam 'z'\n",
ret, msg.message, msg.wParam);
ok_sequence(WmEmptySeq, "WmEmptySeq", FALSE);
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(0, QS_PAINT|QS_KEY),
- "wrong qstatus %08x\n", qstatus);
+ "wrong qstatus %08lx\n", qstatus);
msg.message = 0;
ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE | PM_QS_POSTMESSAGE);
@@ -12392,7 +12393,7 @@ static void test_PeekMessage(void)
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(0, QS_PAINT|QS_KEY),
- "wrong qstatus %08x\n", qstatus);
+ "wrong qstatus %08lx\n", qstatus);
msg.message = 0;
ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE | PM_QS_PAINT);
@@ -12403,7 +12404,7 @@ static void test_PeekMessage(void)
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(0, QS_KEY),
- "wrong qstatus %08x\n", qstatus);
+ "wrong qstatus %08lx\n", qstatus);
msg.message = 0;
ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE | PM_QS_PAINT);
@@ -12414,7 +12415,7 @@ static void test_PeekMessage(void)
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(0, QS_KEY),
- "wrong qstatus %08x\n", qstatus);
+ "wrong qstatus %08lx\n", qstatus);
trace("signalling to send message\n");
SetEvent(info.hevent[EV_SENDMSG]);
@@ -12422,24 +12423,24 @@ static void test_PeekMessage(void)
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(QS_SENDMESSAGE, QS_SENDMESSAGE|QS_KEY),
- "wrong qstatus %08x\n", qstatus);
+ "wrong qstatus %08lx\n", qstatus);
PostMessageA(info.hwnd, WM_CHAR, 'z', 0);
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(QS_POSTMESSAGE, QS_SENDMESSAGE|QS_POSTMESSAGE|QS_KEY),
- "wrong qstatus %08x\n", qstatus);
+ "wrong qstatus %08lx\n", qstatus);
msg.message = 0;
ret = PeekMessageA(&msg, 0, WM_CHAR, WM_CHAR, PM_REMOVE);
ok(ret && msg.message == WM_CHAR && msg.wParam == 'z',
- "got %d and %04x wParam %08lx instead of TRUE and WM_CHAR wParam 'z'\n",
+ "got %d and %04x wParam %08Ix instead of TRUE and WM_CHAR wParam 'z'\n",
ret, msg.message, msg.wParam);
ok_sequence(WmUser, "WmUser", FALSE);
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(0, QS_KEY),
- "wrong qstatus %08x\n", qstatus);
+ "wrong qstatus %08lx\n", qstatus);
msg.message = 0;
ret = PeekMessageA(&msg, 0, WM_CHAR, WM_CHAR, PM_REMOVE);
@@ -12450,13 +12451,13 @@ static void test_PeekMessage(void)
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(0, QS_KEY),
- "wrong qstatus %08x\n", qstatus);
+ "wrong qstatus %08lx\n", qstatus);
PostMessageA(info.hwnd, WM_CHAR, 'z', 0);
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(QS_POSTMESSAGE, QS_POSTMESSAGE|QS_KEY),
- "wrong qstatus %08x\n", qstatus);
+ "wrong qstatus %08lx\n", qstatus);
trace("signalling to send message\n");
SetEvent(info.hevent[EV_SENDMSG]);
@@ -12464,7 +12465,7 @@ static void test_PeekMessage(void)
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(QS_SENDMESSAGE, QS_SENDMESSAGE|QS_POSTMESSAGE|QS_KEY),
- "wrong qstatus %08x\n", qstatus);
+ "wrong qstatus %08lx\n", qstatus);
msg.message = 0;
ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE | (QS_KEY << 16));
@@ -12475,7 +12476,7 @@ static void test_PeekMessage(void)
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(0, QS_POSTMESSAGE|QS_KEY),
- "wrong qstatus %08x\n", qstatus);
+ "wrong qstatus %08lx\n", qstatus);
msg.message = 0;
if (qs_all_input & QS_RAWINPUT) /* use QS_RAWINPUT only if supported */
@@ -12483,13 +12484,13 @@ static void test_PeekMessage(void)
else /* workaround for a missing QS_RAWINPUT support */
ret = PeekMessageA(&msg, 0, WM_KEYDOWN, WM_KEYDOWN, PM_REMOVE);
ok(ret && msg.message == WM_KEYDOWN && msg.wParam == 'N',
- "got %d and %04x wParam %08lx instead of TRUE and WM_KEYDOWN wParam 'N'\n",
+ "got %d and %04x wParam %08Ix instead of TRUE and WM_KEYDOWN wParam 'N'\n",
ret, msg.message, msg.wParam);
ok_sequence(WmKeyDownSkippedSeq, "WmKeyDownSkippedSeq", FALSE);
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(0, QS_POSTMESSAGE|QS_KEY),
- "wrong qstatus %08x\n", qstatus);
+ "wrong qstatus %08lx\n", qstatus);
msg.message = 0;
if (qs_all_input & QS_RAWINPUT) /* use QS_RAWINPUT only if supported */
@@ -12497,13 +12498,13 @@ static void test_PeekMessage(void)
else /* workaround for a missing QS_RAWINPUT support */
ret = PeekMessageA(&msg, 0, WM_KEYUP, WM_KEYUP, PM_REMOVE);
ok(ret && msg.message == WM_KEYUP && msg.wParam == 'N',
- "got %d and %04x wParam %08lx instead of TRUE and WM_KEYUP wParam 'N'\n",
+ "got %d and %04x wParam %08Ix instead of TRUE and WM_KEYUP wParam 'N'\n",
ret, msg.message, msg.wParam);
ok_sequence(WmKeyUpSkippedSeq, "WmKeyUpSkippedSeq", FALSE);
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(0, QS_POSTMESSAGE),
- "wrong qstatus %08x\n", qstatus);
+ "wrong qstatus %08lx\n", qstatus);
msg.message = 0;
ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE | PM_QS_SENDMESSAGE);
@@ -12514,18 +12515,18 @@ static void test_PeekMessage(void)
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(0, QS_POSTMESSAGE),
- "wrong qstatus %08x\n", qstatus);
+ "wrong qstatus %08lx\n", qstatus);
msg.message = 0;
ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE);
ok(ret && msg.message == WM_CHAR && msg.wParam == 'z',
- "got %d and %04x wParam %08lx instead of TRUE and WM_CHAR wParam 'z'\n",
+ "got %d and %04x wParam %08Ix instead of TRUE and WM_CHAR wParam 'z'\n",
ret, msg.message, msg.wParam);
ok_sequence(WmEmptySeq, "WmEmptySeq", FALSE);
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == 0,
- "wrong qstatus %08x\n", qstatus);
+ "wrong qstatus %08lx\n", qstatus);
msg.message = 0;
ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE);
@@ -12536,7 +12537,7 @@ static void test_PeekMessage(void)
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == 0,
- "wrong qstatus %08x\n", qstatus);
+ "wrong qstatus %08lx\n", qstatus);
/* test whether presence of the quit flag in the queue affects
* the queue state
@@ -12545,13 +12546,13 @@ static void test_PeekMessage(void)
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(QS_POSTMESSAGE, QS_POSTMESSAGE),
- "wrong qstatus %08x\n", qstatus);
+ "wrong qstatus %08lx\n", qstatus);
PostMessageA(info.hwnd, WM_USER, 0, 0);
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(QS_POSTMESSAGE, QS_POSTMESSAGE),
- "wrong qstatus %08x\n", qstatus);
+ "wrong qstatus %08lx\n", qstatus);
msg.message = 0;
ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE);
@@ -12561,20 +12562,20 @@ static void test_PeekMessage(void)
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(0, QS_POSTMESSAGE),
- "wrong qstatus %08x\n", qstatus);
+ "wrong qstatus %08lx\n", qstatus);
msg.message = 0;
ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE);
ok(ret && msg.message == WM_QUIT,
"got %d and %04x instead of TRUE and WM_QUIT\n", ret, msg.message);
- ok(msg.wParam == 0x1234abcd, "got wParam %08lx instead of 0x1234abcd\n", msg.wParam);
- ok(msg.lParam == 0, "got lParam %08lx instead of 0\n", msg.lParam);
+ ok(msg.wParam == 0x1234abcd, "got wParam %08Ix instead of 0x1234abcd\n", msg.wParam);
+ ok(msg.lParam == 0, "got lParam %08Ix instead of 0\n", msg.lParam);
ok_sequence(WmEmptySeq, "WmEmptySeq", FALSE);
qstatus = GetQueueStatus(qs_all_input);
todo_wine {
ok(qstatus == MAKELONG(0, QS_POSTMESSAGE),
- "wrong qstatus %08x\n", qstatus);
+ "wrong qstatus %08lx\n", qstatus);
}
msg.message = 0;
@@ -12586,102 +12587,102 @@ todo_wine {
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == 0,
- "wrong qstatus %08x\n", qstatus);
+ "wrong qstatus %08lx\n", qstatus);
/* some GetMessage tests */
keybd_event('N', 0, 0, 0);
qstatus = GetQueueStatus(qs_all_input);
- ok(qstatus == MAKELONG(QS_KEY, QS_KEY), "wrong qstatus %08x\n", qstatus);
+ ok(qstatus == MAKELONG(QS_KEY, QS_KEY), "wrong qstatus %08lx\n", qstatus);
PostMessageA(info.hwnd, WM_CHAR, 'z', 0);
qstatus = GetQueueStatus(qs_all_input);
- ok(qstatus == MAKELONG(QS_POSTMESSAGE, QS_POSTMESSAGE|QS_KEY), "wrong qstatus %08x\n", qstatus);
+ ok(qstatus == MAKELONG(QS_POSTMESSAGE, QS_POSTMESSAGE|QS_KEY), "wrong qstatus %08lx\n", qstatus);
if (qstatus)
{
ret = GetMessageA( &msg, 0, 0, 0 );
ok(ret && msg.message == WM_CHAR && msg.wParam == 'z',
- "got %d and %04x wParam %08lx instead of TRUE and WM_CHAR wParam 'z'\n",
+ "got %d and %04x wParam %08Ix instead of TRUE and WM_CHAR wParam 'z'\n",
ret, msg.message, msg.wParam);
qstatus = GetQueueStatus(qs_all_input);
- ok(qstatus == MAKELONG(0, QS_KEY), "wrong qstatus %08x\n", qstatus);
+ ok(qstatus == MAKELONG(0, QS_KEY), "wrong qstatus %08lx\n", qstatus);
}
if (qstatus)
{
ret = GetMessageA( &msg, 0, 0, 0 );
ok(ret && msg.message == WM_KEYDOWN && msg.wParam == 'N',
- "got %d and %04x wParam %08lx instead of TRUE and WM_KEYDOWN wParam 'N'\n",
+ "got %d and %04x wParam %08Ix instead of TRUE and WM_KEYDOWN wParam 'N'\n",
ret, msg.message, msg.wParam);
ok_sequence(WmKeyDownSkippedSeq, "WmKeyDownSkippedSeq", FALSE);
qstatus = GetQueueStatus(qs_all_input);
- ok(qstatus == 0, "wrong qstatus %08x\n", qstatus);
+ ok(qstatus == 0, "wrong qstatus %08lx\n", qstatus);
}
keybd_event('N', 0, 0, 0);
qstatus = GetQueueStatus(qs_all_input);
- ok(qstatus == MAKELONG(QS_KEY, QS_KEY), "wrong qstatus %08x\n", qstatus);
+ ok(qstatus == MAKELONG(QS_KEY, QS_KEY), "wrong qstatus %08lx\n", qstatus);
PostMessageA(info.hwnd, WM_CHAR, 'z', 0);
qstatus = GetQueueStatus(qs_all_input);
- ok(qstatus == MAKELONG(QS_POSTMESSAGE, QS_POSTMESSAGE|QS_KEY), "wrong qstatus %08x\n", qstatus);
+ ok(qstatus == MAKELONG(QS_POSTMESSAGE, QS_POSTMESSAGE|QS_KEY), "wrong qstatus %08lx\n", qstatus);
if (qstatus & (QS_KEY << 16))
{
ret = GetMessageA( &msg, 0, WM_KEYDOWN, WM_KEYUP );
ok(ret && msg.message == WM_KEYDOWN && msg.wParam == 'N',
- "got %d and %04x wParam %08lx instead of TRUE and WM_KEYDOWN wParam 'N'\n",
+ "got %d and %04x wParam %08Ix instead of TRUE and WM_KEYDOWN wParam 'N'\n",
ret, msg.message, msg.wParam);
ok_sequence(WmKeyDownWasDownSkippedSeq, "WmKeyDownWasDownSkippedSeq", FALSE);
qstatus = GetQueueStatus(qs_all_input);
- ok(qstatus == MAKELONG(0, QS_POSTMESSAGE), "wrong qstatus %08x\n", qstatus);
+ ok(qstatus == MAKELONG(0, QS_POSTMESSAGE), "wrong qstatus %08lx\n", qstatus);
}
if (qstatus)
{
ret = GetMessageA( &msg, 0, WM_CHAR, WM_CHAR );
ok(ret && msg.message == WM_CHAR && msg.wParam == 'z',
- "got %d and %04x wParam %08lx instead of TRUE and WM_CHAR wParam 'z'\n",
+ "got %d and %04x wParam %08Ix instead of TRUE and WM_CHAR wParam 'z'\n",
ret, msg.message, msg.wParam);
qstatus = GetQueueStatus(qs_all_input);
- ok(qstatus == 0, "wrong qstatus %08x\n", qstatus);
+ ok(qstatus == 0, "wrong qstatus %08lx\n", qstatus);
}
keybd_event('N', 0, KEYEVENTF_KEYUP, 0);
qstatus = GetQueueStatus(qs_all_input);
- ok(qstatus == MAKELONG(QS_KEY, QS_KEY), "wrong qstatus %08x\n", qstatus);
+ ok(qstatus == MAKELONG(QS_KEY, QS_KEY), "wrong qstatus %08lx\n", qstatus);
PostMessageA(info.hwnd, WM_CHAR, 'z', 0);
qstatus = GetQueueStatus(qs_all_input);
- ok(qstatus == MAKELONG(QS_POSTMESSAGE, QS_POSTMESSAGE|QS_KEY), "wrong qstatus %08x\n", qstatus);
+ ok(qstatus == MAKELONG(QS_POSTMESSAGE, QS_POSTMESSAGE|QS_KEY), "wrong qstatus %08lx\n", qstatus);
trace("signalling to send message\n");
SetEvent(info.hevent[EV_SENDMSG]);
WaitForSingleObject(info.hevent[EV_ACK], INFINITE);
qstatus = GetQueueStatus(qs_all_input);
ok(qstatus == MAKELONG(QS_SENDMESSAGE, QS_SENDMESSAGE|QS_POSTMESSAGE|QS_KEY),
- "wrong qstatus %08x\n", qstatus);
+ "wrong qstatus %08lx\n", qstatus);
if (qstatus & (QS_KEY << 16))
{
ret = GetMessageA( &msg, 0, WM_KEYDOWN, WM_KEYUP );
ok(ret && msg.message == WM_KEYUP && msg.wParam == 'N',
- "got %d and %04x wParam %08lx instead of TRUE and WM_KEYDOWN wParam 'N'\n",
+ "got %d and %04x wParam %08Ix instead of TRUE and WM_KEYDOWN wParam 'N'\n",
ret, msg.message, msg.wParam);
ok_sequence(WmUserKeyUpSkippedSeq, "WmUserKeyUpSkippedSeq", FALSE);
qstatus = GetQueueStatus(qs_all_input);
- ok(qstatus == MAKELONG(0, QS_POSTMESSAGE), "wrong qstatus %08x\n", qstatus);
+ ok(qstatus == MAKELONG(0, QS_POSTMESSAGE), "wrong qstatus %08lx\n", qstatus);
}
if (qstatus)
{
ret = GetMessageA( &msg, 0, WM_CHAR, WM_CHAR );
ok(ret && msg.message == WM_CHAR && msg.wParam == 'z',
- "got %d and %04x wParam %08lx instead of TRUE and WM_CHAR wParam 'z'\n",
+ "got %d and %04x wParam %08Ix instead of TRUE and WM_CHAR wParam 'z'\n",
ret, msg.message, msg.wParam);
qstatus = GetQueueStatus(qs_all_input);
- ok(qstatus == 0, "wrong qstatus %08x\n", qstatus);
+ ok(qstatus == 0, "wrong qstatus %08lx\n", qstatus);
}
PostThreadMessageA(GetCurrentThreadId(), WM_USER, 0, 0);
@@ -12778,7 +12779,7 @@ static void test_PeekMessage2(void)
}
else
{
- trace("1st move event: %04x %x %d %d\n", msg.message, msg.time, msg.pt.x, msg.pt.y);
+ trace("1st move event: %04x %lx %ld %ld\n", msg.message, msg.time, msg.pt.x, msg.pt.y);
message = msg.message;
time1 = msg.time;
x1 = msg.pt.x;
@@ -12798,13 +12799,13 @@ static void test_PeekMessage2(void)
ret = PeekMessageA(&msg, hwnd, WM_MOUSEMOVE, WM_MOUSEMOVE, PM_NOREMOVE);
ok(ret, "no message available\n");
if (ret) {
- trace("2nd move event: %04x %x %d %d\n", msg.message, msg.time, msg.pt.x, msg.pt.y);
+ trace("2nd move event: %04x %lx %ld %ld\n", msg.message, msg.time, msg.pt.x, msg.pt.y);
message = msg.message;
time2 = msg.time;
x2 = msg.pt.x;
y2 = msg.pt.y;
ok(message == WM_MOUSEMOVE, "message not WM_MOUSEMOVE, %04x instead\n", message);
- ok(time2 > time1, "message time not advanced: %x %x\n", time1, time2);
+ ok(time2 > time1, "message time not advanced: %lx %lx\n", time1, time2);
ok(x2 != x1 && y2 != y1, "coords not changed: (%d %d) (%d %d)\n", x1, y1, x2, y2);
}
@@ -12816,13 +12817,13 @@ static void test_PeekMessage2(void)
ret = PeekMessageA(&msg, hwnd, WM_MOUSEMOVE, WM_MOUSEMOVE, PM_NOREMOVE);
ok(ret, "no message available\n");
if (ret) {
- trace("3rd move event: %04x %x %d %d\n", msg.message, msg.time, msg.pt.x, msg.pt.y);
+ trace("3rd move event: %04x %lx %ld %ld\n", msg.message, msg.time, msg.pt.x, msg.pt.y);
message = msg.message;
time3 = msg.time;
x3 = msg.pt.x;
y3 = msg.pt.y;
ok(message == WM_MOUSEMOVE, "message not WM_MOUSEMOVE, %04x instead\n", message);
- ok(time3 > time2, "message time not advanced: %x %x\n", time2, time3);
+ ok(time3 > time2, "message time not advanced: %lx %lx\n", time2, time3);
ok(x3 != x2 && y3 != y2, "coords not changed: (%d %d) (%d %d)\n", x2, y2, x3, y3);
}
@@ -13018,22 +13019,22 @@ static void test_quit_message(void)
ok(!ret, "got %x message\n", msg.message);
ret = PeekMessageA(&msg, NULL, 0, 0, PM_NOREMOVE);
- ok(ret, "PeekMessage failed with error %d\n", GetLastError());
+ ok(ret, "PeekMessage failed with error %ld\n", GetLastError());
ok(msg.message == WM_QUIT, "Received message 0x%04x instead of WM_QUIT\n", msg.message);
- ok(msg.wParam == 0xbeef, "wParam was 0x%lx instead of 0xbeef\n", msg.wParam);
+ ok(msg.wParam == 0xbeef, "wParam was 0x%Ix instead of 0xbeef\n", msg.wParam);
ret = PostThreadMessageA(GetCurrentThreadId(), WM_USER, 0, 0);
- ok(ret, "PostMessage failed with error %d\n", GetLastError());
+ ok(ret, "PostMessage failed with error %ld\n", GetLastError());
ret = GetMessageA(&msg, NULL, 0, 0);
- ok(ret > 0, "GetMessage failed with error %d\n", GetLastError());
+ ok(ret > 0, "GetMessage failed with error %ld\n", GetLastError());
ok(msg.message == WM_USER, "Received message 0x%04x instead of WM_USER\n", msg.message);
/* note: WM_QUIT message received after WM_USER message */
ret = GetMessageA(&msg, NULL, 0, 0);
- ok(!ret, "GetMessage return %d with error %d instead of FALSE\n", ret, GetLastError());
+ ok(!ret, "GetMessage return %d with error %ld instead of FALSE\n", ret, GetLastError());
ok(msg.message == WM_QUIT, "Received message 0x%04x instead of WM_QUIT\n", msg.message);
- ok(msg.wParam == 0xbeef, "wParam was 0x%lx instead of 0xbeef\n", msg.wParam);
+ ok(msg.wParam == 0xbeef, "wParam was 0x%Ix instead of 0xbeef\n", msg.wParam);
ret = PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE);
ok( !ret || msg.message != WM_QUIT, "Received WM_QUIT again\n" );
@@ -13042,21 +13043,21 @@ static void test_quit_message(void)
PostThreadMessageA(GetCurrentThreadId(), WM_QUIT, 0xdead, 0);
ret = PeekMessageA(&msg, NULL, 0, 0, PM_NOREMOVE);
- ok(ret, "PeekMessage failed with error %d\n", GetLastError());
+ ok(ret, "PeekMessage failed with error %ld\n", GetLastError());
ok(msg.message == WM_QUIT, "Received message 0x%04x instead of WM_QUIT\n", msg.message);
- ok(msg.wParam == 0xdead, "wParam was 0x%lx instead of 0xdead\n", msg.wParam);
+ ok(msg.wParam == 0xdead, "wParam was 0x%Ix instead of 0xdead\n", msg.wParam);
ret = PostThreadMessageA(GetCurrentThreadId(), WM_USER, 0, 0);
- ok(ret, "PostMessage failed with error %d\n", GetLastError());
+ ok(ret, "PostMessage failed with error %ld\n", GetLastError());
/* note: we receive the WM_QUIT message first this time */
ret = GetMessageA(&msg, NULL, 0, 0);
- ok(!ret, "GetMessage return %d with error %d instead of FALSE\n", ret, GetLastError());
+ ok(!ret, "GetMessage return %d with error %ld instead of FALSE\n", ret, GetLastError());
ok(msg.message == WM_QUIT, "Received message 0x%04x instead of WM_QUIT\n", msg.message);
- ok(msg.wParam == 0xdead, "wParam was 0x%lx instead of 0xdead\n", msg.wParam);
+ ok(msg.wParam == 0xdead, "wParam was 0x%Ix instead of 0xdead\n", msg.wParam);
ret = GetMessageA(&msg, NULL, 0, 0);
- ok(ret > 0, "GetMessage failed with error %d\n", GetLastError());
+ ok(ret > 0, "GetMessage failed with error %ld\n", GetLastError());
ok(msg.message == WM_USER, "Received message 0x%04x instead of WM_USER\n", msg.message);
flush_events();
@@ -13068,8 +13069,8 @@ static void test_quit_message(void)
ret = PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE);
ok(ret, "PeekMessage failed\n");
ok(msg.message == WM_QUIT, "Received message 0x%04x instead of WM_QUIT\n", msg.message);
- ok(msg.wParam == 0x1234, "wParam was 0x%lx instead of 0x1234\n", msg.wParam);
- ok(msg.lParam == 0, "lParam was 0x%lx instead of 0\n", msg.lParam);
+ ok(msg.wParam == 0x1234, "wParam was 0x%Ix instead of 0x1234\n", msg.wParam);
+ ok(msg.lParam == 0, "lParam was 0x%Ix instead of 0\n", msg.lParam);
/* Check what happens to a WM_QUIT message posted to a window that gets
* destroyed.
@@ -13113,33 +13114,33 @@ static void test_notify_message(void)
flush_sequence();
ret = SendNotifyMessageA(hwnd, WM_NOTIFY, 0x1234, 0xdeadbeef);
- ok(ret == TRUE, "SendNotifyMessageA failed with error %u\n", GetLastError());
+ ok(ret == TRUE, "SendNotifyMessageA failed with error %lu\n", GetLastError());
ok_sequence(WmNotifySeq, "WmNotifySeq", FALSE);
ret = SendNotifyMessageW(hwnd, WM_NOTIFY, 0x1234, 0xdeadbeef);
- ok(ret == TRUE, "SendNotifyMessageW failed with error %u\n", GetLastError());
+ ok(ret == TRUE, "SendNotifyMessageW failed with error %lu\n", GetLastError());
ok_sequence(WmNotifySeq, "WmNotifySeq", FALSE);
ret = SendMessageCallbackA(hwnd, WM_NOTIFY, 0x1234, 0xdeadbeef, NULL, 0);
- ok(ret == TRUE, "SendMessageCallbackA failed with error %u\n", GetLastError());
+ ok(ret == TRUE, "SendMessageCallbackA failed with error %lu\n", GetLastError());
ok_sequence(WmNotifySeq, "WmNotifySeq", FALSE);
ret = SendMessageCallbackW(hwnd, WM_NOTIFY, 0x1234, 0xdeadbeef, NULL, 0);
- ok(ret == TRUE, "SendMessageCallbackW failed with error %u\n", GetLastError());
+ ok(ret == TRUE, "SendMessageCallbackW failed with error %lu\n", GetLastError());
ok_sequence(WmNotifySeq, "WmNotifySeq", FALSE);
ret = PostMessageA(hwnd, WM_NOTIFY, 0x1234, 0xdeadbeef);
- ok(ret == TRUE, "PostMessageA failed with error %u\n", GetLastError());
+ ok(ret == TRUE, "PostMessageA failed with error %lu\n", GetLastError());
flush_events();
ok_sequence(WmNotifySeq, "WmNotifySeq", FALSE);
ret = PostMessageW(hwnd, WM_NOTIFY, 0x1234, 0xdeadbeef);
- ok(ret == TRUE, "PostMessageW failed with error %u\n", GetLastError());
+ ok(ret == TRUE, "PostMessageW failed with error %lu\n", GetLastError());
flush_events();
ok_sequence(WmNotifySeq, "WmNotifySeq", FALSE);
ret = PostThreadMessageA(GetCurrentThreadId(), WM_NOTIFY, 0x1234, 0xdeadbeef);
- ok(ret == TRUE, "PostThreadMessageA failed with error %u\n", GetLastError());
+ ok(ret == TRUE, "PostThreadMessageA failed with error %lu\n", GetLastError());
while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE))
{
msg.hwnd = hwnd;
@@ -13148,7 +13149,7 @@ static void test_notify_message(void)
ok_sequence(WmNotifySeq, "WmNotifySeq", FALSE);
ret = PostThreadMessageW(GetCurrentThreadId(), WM_NOTIFY, 0x1234, 0xdeadbeef);
- ok(ret == TRUE, "PostThreadMessageW failed with error %u\n", GetLastError());
+ ok(ret == TRUE, "PostThreadMessageW failed with error %lu\n", GetLastError());
while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE))
{
msg.hwnd = hwnd;
@@ -13228,7 +13229,7 @@ static void test_TrackMouseEvent(void)
tme.dwHoverTime = track_hover_time; \
SetLastError(0xdeadbeef); \
ret = pTrackMouseEvent(&tme); \
- ok(ret, "TrackMouseEvent(TME_HOVER) error %d\n", GetLastError())
+ ok(ret, "TrackMouseEvent(TME_HOVER) error %ld\n", GetLastError())
#define track_query(expected_track_flags, expected_track_hwnd, expected_hover_time) \
tme.cbSize = sizeof(tme); \
@@ -13237,14 +13238,14 @@ static void test_TrackMouseEvent(void)
tme.dwHoverTime = 0xdeadbeef; \
SetLastError(0xdeadbeef); \
ret = pTrackMouseEvent(&tme); \
- ok(ret, "TrackMouseEvent(TME_QUERY) error %d\n", GetLastError());\
- ok(tme.cbSize == sizeof(tme), "wrong tme.cbSize %u\n", tme.cbSize); \
+ ok(ret, "TrackMouseEvent(TME_QUERY) error %ld\n", GetLastError());\
+ ok(tme.cbSize == sizeof(tme), "wrong tme.cbSize %lu\n", tme.cbSize); \
ok(tme.dwFlags == (expected_track_flags), \
- "wrong tme.dwFlags %08x, expected %08x\n", tme.dwFlags, (expected_track_flags)); \
+ "wrong tme.dwFlags %08lx, expected %08x\n", tme.dwFlags, (expected_track_flags)); \
ok(tme.hwndTrack == (expected_track_hwnd), \
"wrong tme.hwndTrack %p, expected %p\n", tme.hwndTrack, (expected_track_hwnd)); \
ok(tme.dwHoverTime == (expected_hover_time), \
- "wrong tme.dwHoverTime %u, expected %u\n", tme.dwHoverTime, (expected_hover_time))
+ "wrong tme.dwHoverTime %lu, expected %u\n", tme.dwHoverTime, (expected_hover_time))
#define track_hover_cancel(track_hwnd) \
tme.cbSize = sizeof(tme); \
@@ -13253,25 +13254,25 @@ static void test_TrackMouseEvent(void)
tme.dwHoverTime = 0xdeadbeef; \
SetLastError(0xdeadbeef); \
ret = pTrackMouseEvent(&tme); \
- ok(ret, "TrackMouseEvent(TME_HOVER | TME_CANCEL) error %d\n", GetLastError())
+ ok(ret, "TrackMouseEvent(TME_HOVER | TME_CANCEL) error %ld\n", GetLastError())
default_hover_time = 0xdeadbeef;
SetLastError(0xdeadbeef);
ret = SystemParametersInfoA(SPI_GETMOUSEHOVERTIME, 0, &default_hover_time, 0);
ok(ret || broken(GetLastError() == 0xdeadbeef), /* win9x */
- "SystemParametersInfo(SPI_GETMOUSEHOVERTIME) error %u\n", GetLastError());
+ "SystemParametersInfo(SPI_GETMOUSEHOVERTIME) error %lu\n", GetLastError());
if (!ret) default_hover_time = 400;
trace("SPI_GETMOUSEHOVERTIME returned %u ms\n", default_hover_time);
SetLastError(0xdeadbeef);
ret = SystemParametersInfoA(SPI_GETMOUSEHOVERWIDTH, 0, &hover_width, 0);
ok(ret || broken(GetLastError() == 0xdeadbeef), /* win9x */
- "SystemParametersInfo(SPI_GETMOUSEHOVERWIDTH) error %u\n", GetLastError());
+ "SystemParametersInfo(SPI_GETMOUSEHOVERWIDTH) error %lu\n", GetLastError());
if (!ret) hover_width = 4;
SetLastError(0xdeadbeef);
ret = SystemParametersInfoA(SPI_GETMOUSEHOVERHEIGHT, 0, &hover_height, 0);
ok(ret || broken(GetLastError() == 0xdeadbeef), /* win9x */
- "SystemParametersInfo(SPI_GETMOUSEHOVERHEIGHT) error %u\n", GetLastError());
+ "SystemParametersInfo(SPI_GETMOUSEHOVERHEIGHT) error %lu\n", GetLastError());
if (!ret) hover_height = 4;
trace("hover rect is %u x %d\n", hover_width, hover_height);
@@ -13299,7 +13300,7 @@ static void test_TrackMouseEvent(void)
ret = pTrackMouseEvent(&tme);
ok(!ret, "TrackMouseEvent should fail\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER || broken(GetLastError() == 0xdeadbeef),
- "not expected error %u\n", GetLastError());
+ "not expected error %lu\n", GetLastError());
tme.cbSize = sizeof(tme);
tme.dwFlags = TME_HOVER;
@@ -13309,7 +13310,7 @@ static void test_TrackMouseEvent(void)
ret = pTrackMouseEvent(&tme);
ok(!ret, "TrackMouseEvent should fail\n");
ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE || broken(GetLastError() == 0xdeadbeef),
- "not expected error %u\n", GetLastError());
+ "not expected error %lu\n", GetLastError());
tme.cbSize = sizeof(tme);
tme.dwFlags = TME_HOVER | TME_CANCEL;
@@ -13319,7 +13320,7 @@ static void test_TrackMouseEvent(void)
ret = pTrackMouseEvent(&tme);
ok(!ret, "TrackMouseEvent should fail\n");
ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE || broken(GetLastError() == 0xdeadbeef),
- "not expected error %u\n", GetLastError());
+ "not expected error %lu\n", GetLastError());
GetWindowRect(hwnd, &rc_parent);
GetWindowRect(hchild, &rc_child);
@@ -13346,17 +13347,17 @@ static void test_TrackMouseEvent(void)
tme.dwHoverTime = 0xdeadbeef;
SetLastError(0xdeadbeef);
ret = pTrackMouseEvent(&tme);
- ok(ret, "TrackMouseEvent(TME_QUERY) error %d\n", GetLastError());
- ok(tme.cbSize == sizeof(tme), "wrong tme.cbSize %u\n", tme.cbSize);
+ ok(ret, "TrackMouseEvent(TME_QUERY) error %ld\n", GetLastError());
+ ok(tme.cbSize == sizeof(tme), "wrong tme.cbSize %lu\n", tme.cbSize);
if (!tme.dwFlags)
{
skip( "Cursor not inside window, skipping TrackMouseEvent tests\n" );
DestroyWindow( hwnd );
return;
}
- ok(tme.dwFlags == TME_HOVER, "wrong tme.dwFlags %08x, expected TME_HOVER\n", tme.dwFlags);
+ ok(tme.dwFlags == TME_HOVER, "wrong tme.dwFlags %08lx, expected TME_HOVER\n", tme.dwFlags);
ok(tme.hwndTrack == hwnd, "wrong tme.hwndTrack %p, expected %p\n", tme.hwndTrack, hwnd);
- ok(tme.dwHoverTime == default_hover_time, "wrong tme.dwHoverTime %u, expected %u\n",
+ ok(tme.dwHoverTime == default_hover_time, "wrong tme.dwHoverTime %lu, expected %u\n",
tme.dwHoverTime, default_hover_time);
pump_msg_loop_timeout(default_hover_time, FALSE);
@@ -13952,19 +13953,19 @@ static void test_ShowWindow(void)
assert(hwnd);
style = GetWindowLongA(hwnd, GWL_STYLE) & ~WS_BASE;
- ok(style == 0, "expected style 0, got %08x\n", style);
+ ok(style == 0, "expected style 0, got %08lx\n", style);
flush_events();
flush_sequence();
SetLastError(0xdeadbeef);
hmon = MonitorFromPoint(pt, MONITOR_DEFAULTTOPRIMARY);
- ok(hmon != 0, "MonitorFromPoint error %u\n", GetLastError());
+ ok(hmon != 0, "MonitorFromPoint error %lu\n", GetLastError());
mi.cbSize = sizeof(mi);
SetLastError(0xdeadbeef);
ret = GetMonitorInfoA(hmon, &mi);
- ok(ret, "GetMonitorInfo error %u\n", GetLastError());
+ ok(ret, "GetMonitorInfo error %lu\n", GetLastError());
trace("monitor %s, work %s\n", wine_dbgstr_rect(&mi.rcMonitor),
wine_dbgstr_rect(&mi.rcWork));
work_rc = mi.rcWork;
@@ -13975,13 +13976,13 @@ static void test_ShowWindow(void)
wp.length = sizeof(wp);
SetLastError(0xdeadbeaf);
ret = GetWindowPlacement(hwnd, &wp);
- ok(ret, "GetWindowPlacement error %u\n", GetLastError());
+ ok(ret, "GetWindowPlacement error %lu\n", GetLastError());
ok(wp.flags == 0, "expected 0, got %#x\n", wp.flags);
ok(wp.showCmd == SW_SHOWNORMAL, "expected SW_SHOWNORMAL, got %d\n", wp.showCmd);
ok(wp.ptMinPosition.x == -1 && wp.ptMinPosition.y == -1,
- "expected -1,-1 got %d,%d\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
+ "expected -1,-1 got %ld,%ld\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1,
- "expected -1,-1 got %d,%d\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
+ "expected -1,-1 got %ld,%ld\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
todo_wine_if (work_rc.left || work_rc.top) /* FIXME: remove once Wine is fixed */
ok(EqualRect(&win_rc, &wp.rcNormalPosition), "expected %s got %s\n", wine_dbgstr_rect(&win_rc),
wine_dbgstr_rect(&wp.rcNormalPosition));
@@ -14001,11 +14002,11 @@ static void test_ShowWindow(void)
idx = (sw[i].cmd == SW_NORMALNA) ? 12 : sw[i].cmd;
style = GetWindowLongA(hwnd, GWL_STYLE);
- trace("%d: sending %s, current window style %08x\n", i+1, sw_cmd_name[idx], style);
+ trace("%d: sending %s, current window style %08lx\n", i+1, sw_cmd_name[idx], style);
ret = ShowWindow(hwnd, sw[i].cmd);
- ok(!ret == !sw[i].ret, "%d: cmd %s: expected ret %lu, got %lu\n", i+1, sw_cmd_name[idx], sw[i].ret, ret);
+ ok(!ret == !sw[i].ret, "%d: cmd %s: expected ret %Iu, got %Iu\n", i+1, sw_cmd_name[idx], sw[i].ret, ret);
style = GetWindowLongA(hwnd, GWL_STYLE) & ~WS_BASE;
- ok(style == sw[i].style, "%d: expected style %08x, got %08x\n", i+1, sw[i].style, style);
+ ok(style == sw[i].style, "%d: expected style %08lx, got %08lx\n", i+1, sw[i].style, style);
sprintf(comment, "%d: ShowWindow(%s)", i+1, sw_cmd_name[idx]);
ok_sequence(sw[i].msg, comment, sw[i].todo_msg);
@@ -14013,7 +14014,7 @@ static void test_ShowWindow(void)
wp.length = sizeof(wp);
SetLastError(0xdeadbeaf);
ret = GetWindowPlacement(hwnd, &wp);
- ok(ret, "GetWindowPlacement error %u\n", GetLastError());
+ ok(ret, "GetWindowPlacement error %lu\n", GetLastError());
ok(wp.flags == sw[i].wp_flags, "expected %#x, got %#x\n", sw[i].wp_flags, wp.flags);
ok(wp.showCmd == sw[i].wp_cmd, "expected %d, got %d\n", sw[i].wp_cmd, wp.showCmd);
@@ -14023,17 +14024,17 @@ static void test_ShowWindow(void)
{
ok((wp.ptMinPosition.x + work_rc.left == sw[i].wp_min.x && wp.ptMinPosition.y + work_rc.top == sw[i].wp_min.y) ||
(wp.ptMinPosition.x + work_rc.left == 3000 && wp.ptMinPosition.y + work_rc.top == 3000),
- "expected %d,%d got %d,%d\n", sw[i].wp_min.x, sw[i].wp_min.y, wp.ptMinPosition.x, wp.ptMinPosition.y);
+ "expected %ld,%ld got %ld,%ld\n", sw[i].wp_min.x, sw[i].wp_min.y, wp.ptMinPosition.x, wp.ptMinPosition.y);
}
else
{
ok(wp.ptMinPosition.x == sw[i].wp_min.x && wp.ptMinPosition.y == sw[i].wp_min.y,
- "expected %d,%d got %d,%d\n", sw[i].wp_min.x, sw[i].wp_min.y, wp.ptMinPosition.x, wp.ptMinPosition.y);
+ "expected %ld,%ld got %ld,%ld\n", sw[i].wp_min.x, sw[i].wp_min.y, wp.ptMinPosition.x, wp.ptMinPosition.y);
}
todo_wine_if(wp.ptMaxPosition.x != sw[i].wp_max.x || wp.ptMaxPosition.y != sw[i].wp_max.y)
ok(wp.ptMaxPosition.x == sw[i].wp_max.x && wp.ptMaxPosition.y == sw[i].wp_max.y,
- "expected %d,%d got %d,%d\n", sw[i].wp_max.x, sw[i].wp_max.y, wp.ptMaxPosition.x, wp.ptMaxPosition.y);
+ "expected %ld,%ld got %ld,%ld\n", sw[i].wp_max.x, sw[i].wp_max.y, wp.ptMaxPosition.x, wp.ptMaxPosition.y);
if (0) /* FIXME: Wine behaves completely different here */
ok(EqualRect(&win_rc, &wp.rcNormalPosition), "expected %s got %s\n",
@@ -14305,7 +14306,7 @@ static void test_dialog_messages(void)
#define set_selection(hctl, start, end) \
ret = SendMessageA(hctl, EM_SETSEL, start, end); \
- ok(ret == 1, "EM_SETSEL returned %ld\n", ret);
+ ok(ret == 1, "EM_SETSEL returned %Id\n", ret);
#define check_selection(hctl, start, end) \
ret = SendMessageA(hctl, EM_GETSEL, 0, 0); \
@@ -14349,7 +14350,7 @@ static void test_dialog_messages(void)
flush_sequence();
ret = DefDlgProcA(hdlg, WM_SETFOCUS, 0, 0);
- ok(ret == 0, "WM_SETFOCUS returned %ld\n", ret);
+ ok(ret == 0, "WM_SETFOCUS returned %Id\n", ret);
ok_sequence(WmDefDlgSetFocus_1, "DefDlgProc(WM_SETFOCUS) 1", FALSE);
hfocus = GetFocus();
@@ -14360,7 +14361,7 @@ static void test_dialog_messages(void)
flush_sequence();
ret = DefDlgProcA(hdlg, WM_SETFOCUS, 0, 0);
- ok(ret == 0, "WM_SETFOCUS returned %ld\n", ret);
+ ok(ret == 0, "WM_SETFOCUS returned %Id\n", ret);
ok_sequence(WmDefDlgSetFocus_2, "DefDlgProc(WM_SETFOCUS) 2", FALSE);
hfocus = GetFocus();
@@ -14942,7 +14943,7 @@ static void test_dbcs_wm_char(void)
ret = PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE );
ok( ret, "no message\n" );
ok( msg.message == WM_CHAR, "unexpected message %x\n", msg.message );
- ok( msg.wParam == wch, "bad wparam %lx/%x\n", msg.wParam, wch );
+ ok( msg.wParam == wch, "bad wparam %Ix/%x\n", msg.wParam, wch );
ret = PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE );
ok( !ret, "got message %x\n", msg.message );
@@ -14954,7 +14955,7 @@ static void test_dbcs_wm_char(void)
ret = PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE );
ok( ret, "no message\n" );
ok( msg.message == WM_CHAR, "unexpected message %x\n", msg.message );
- ok( msg.wParam == wch, "bad wparam %lx/%x\n", msg.wParam, wch );
+ ok( msg.wParam == wch, "bad wparam %Ix/%x\n", msg.wParam, wch );
ret = PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE );
ok( !ret, "got message %x\n", msg.message );
@@ -15033,7 +15034,7 @@ static void test_dbcs_wm_char(void)
ret = PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE );
ok( ret, "no message\n" );
ok( msg.message == WM_CHAR, "unexpected message %x\n", msg.message );
- ok( msg.wParam == wch, "bad wparam %lx/%x\n", msg.wParam, wch );
+ ok( msg.wParam == wch, "bad wparam %Ix/%x\n", msg.wParam, wch );
ret = PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE );
ok( !ret, "got message %x\n", msg.message );
SendMessageA( hwnd, WM_CHAR, dbch[1], 0 );
@@ -15087,14 +15088,14 @@ static void test_dbcs_wm_char(void)
ret = PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE );
ok( ret, "no message\n" );
ok( msg.message == WM_SYSCHAR, "unexpected message %x\n", msg.message );
- ok( msg.wParam == bad_wch, "bad wparam %lx/%x\n", msg.wParam, bad_wch );
+ ok( msg.wParam == bad_wch, "bad wparam %Ix/%x\n", msg.wParam, bad_wch );
ret = PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE );
ok( !ret, "got message %x\n", msg.message );
PostMessageA( hwnd, WM_DEADCHAR, dbch[0], 0 );
ret = PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE );
ok( ret, "no message\n" );
ok( msg.message == WM_DEADCHAR, "unexpected message %x\n", msg.message );
- ok( msg.wParam == bad_wch, "bad wparam %lx/%x\n", msg.wParam, bad_wch );
+ ok( msg.wParam == bad_wch, "bad wparam %Ix/%x\n", msg.wParam, bad_wch );
ret = PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE );
ok( !ret, "got message %x\n", msg.message );
@@ -15105,12 +15106,12 @@ static void test_dbcs_wm_char(void)
ok( ret, "no message\n" );
ok( msg.hwnd == hwnd, "unexpected hwnd %p\n", msg.hwnd );
ok( msg.message == WM_CHAR, "unexpected message %x\n", msg.message );
- ok( msg.wParam == dbch[0], "bad wparam %lx/%x\n", msg.wParam, dbch[0] );
+ ok( msg.wParam == dbch[0], "bad wparam %Ix/%x\n", msg.wParam, dbch[0] );
ret = PeekMessageA( &msg, hwnd, 0, 0, PM_REMOVE );
ok( ret, "no message\n" );
ok( msg.hwnd == hwnd, "unexpected hwnd %p\n", msg.hwnd );
ok( msg.message == WM_CHAR, "unexpected message %x\n", msg.message );
- ok( msg.wParam == dbch[1], "bad wparam %lx/%x\n", msg.wParam, dbch[0] );
+ ok( msg.wParam == dbch[1], "bad wparam %Ix/%x\n", msg.wParam, dbch[0] );
ret = PeekMessageA( &msg, hwnd, 0, 0, PM_REMOVE );
ok( !ret, "got message %x\n", msg.message );
@@ -15120,7 +15121,7 @@ static void test_dbcs_wm_char(void)
ok( ret, "no message\n" );
ok( msg.hwnd == hwnd, "unexpected hwnd %p\n", msg.hwnd );
ok( msg.message == WM_CHAR, "unexpected message %x\n", msg.message );
- ok( msg.wParam == dbch[0], "bad wparam %lx/%x\n", msg.wParam, dbch[0] );
+ ok( msg.wParam == dbch[0], "bad wparam %Ix/%x\n", msg.wParam, dbch[0] );
/* message id is filtered, hwnd is not */
ret = PeekMessageA( &msg, hwnd, WM_MOUSEFIRST, WM_MOUSELAST, PM_REMOVE );
ok( !ret, "no message\n" );
@@ -15128,7 +15129,7 @@ static void test_dbcs_wm_char(void)
ok( ret, "no message\n" );
ok( msg.hwnd == hwnd, "unexpected hwnd %p\n", msg.hwnd );
ok( msg.message == WM_CHAR, "unexpected message %x\n", msg.message );
- ok( msg.wParam == dbch[1], "bad wparam %lx/%x\n", msg.wParam, dbch[0] );
+ ok( msg.wParam == dbch[1], "bad wparam %Ix/%x\n", msg.wParam, dbch[0] );
ret = PeekMessageA( &msg, hwnd, 0, 0, PM_REMOVE );
ok( !ret, "got message %x\n", msg.message );
@@ -15137,19 +15138,19 @@ static void test_dbcs_wm_char(void)
ok( GetMessageA( &msg, hwnd, 0, 0 ), "no message\n" );
ok( msg.hwnd == hwnd, "unexpected hwnd %p\n", msg.hwnd );
ok( msg.message == WM_CHAR, "unexpected message %x\n", msg.message );
- ok( msg.wParam == dbch[0], "bad wparam %lx/%x\n", msg.wParam, dbch[0] );
- ok( msg.lParam == 0xbeef, "bad lparam %lx\n", msg.lParam );
+ ok( msg.wParam == dbch[0], "bad wparam %Ix/%x\n", msg.wParam, dbch[0] );
+ ok( msg.lParam == 0xbeef, "bad lparam %Ix\n", msg.lParam );
time = msg.time;
pt = msg.pt;
- ok( time - GetTickCount() <= 100, "bad time %x\n", msg.time );
+ ok( time - GetTickCount() <= 100, "bad time %lx\n", msg.time );
ret = PeekMessageA( &msg, 0, 0, 0, PM_REMOVE );
ok( ret, "no message\n" );
ok( msg.hwnd == hwnd, "unexpected hwnd %p\n", msg.hwnd );
ok( msg.message == WM_CHAR, "unexpected message %x\n", msg.message );
- ok( msg.wParam == dbch[1], "bad wparam %lx/%x\n", msg.wParam, dbch[0] );
- ok( msg.lParam == 0xbeef, "bad lparam %lx\n", msg.lParam );
- ok( msg.time == time, "bad time %x/%x\n", msg.time, time );
- ok( msg.pt.x == pt.x && msg.pt.y == pt.y, "bad point %u,%u/%u,%u\n", msg.pt.x, msg.pt.y, pt.x, pt.y );
+ ok( msg.wParam == dbch[1], "bad wparam %Ix/%x\n", msg.wParam, dbch[0] );
+ ok( msg.lParam == 0xbeef, "bad lparam %Ix\n", msg.lParam );
+ ok( msg.time == time, "bad time %lx/%lx\n", msg.time, time );
+ ok( msg.pt.x == pt.x && msg.pt.y == pt.y, "bad point %lu,%lu/%lu,%lu\n", msg.pt.x, msg.pt.y, pt.x, pt.y );
ret = PeekMessageA( &msg, hwnd, 0, 0, PM_REMOVE );
ok( !ret, "got message %x\n", msg.message );
@@ -15159,22 +15160,22 @@ static void test_dbcs_wm_char(void)
ok( ret, "no message\n" );
ok( msg.hwnd == hwnd, "unexpected hwnd %p\n", msg.hwnd );
ok( msg.message == WM_CHAR, "unexpected message %x\n", msg.message );
- ok( msg.wParam == dbch[0], "bad wparam %lx/%x\n", msg.wParam, dbch[0] );
+ ok( msg.wParam == dbch[0], "bad wparam %Ix/%x\n", msg.wParam, dbch[0] );
ret = PeekMessageA( &msg, 0, 0, 0, PM_REMOVE );
ok( ret, "no message\n" );
ok( msg.hwnd == hwnd, "unexpected hwnd %p\n", msg.hwnd );
ok( msg.message == WM_CHAR, "unexpected message %x\n", msg.message );
- ok( msg.wParam == dbch[0], "bad wparam %lx/%x\n", msg.wParam, dbch[0] );
+ ok( msg.wParam == dbch[0], "bad wparam %Ix/%x\n", msg.wParam, dbch[0] );
ret = PeekMessageA( &msg, 0, 0, 0, PM_NOREMOVE );
ok( ret, "no message\n" );
ok( msg.hwnd == hwnd, "unexpected hwnd %p\n", msg.hwnd );
ok( msg.message == WM_CHAR, "unexpected message %x\n", msg.message );
- ok( msg.wParam == dbch[1], "bad wparam %lx/%x\n", msg.wParam, dbch[0] );
+ ok( msg.wParam == dbch[1], "bad wparam %Ix/%x\n", msg.wParam, dbch[0] );
ret = PeekMessageA( &msg, 0, 0, 0, PM_REMOVE );
ok( ret, "no message\n" );
ok( msg.hwnd == hwnd, "unexpected hwnd %p\n", msg.hwnd );
ok( msg.message == WM_CHAR, "unexpected message %x\n", msg.message );
- ok( msg.wParam == dbch[1], "bad wparam %lx/%x\n", msg.wParam, dbch[0] );
+ ok( msg.wParam == dbch[1], "bad wparam %Ix/%x\n", msg.wParam, dbch[0] );
ret = PeekMessageA( &msg, hwnd, 0, 0, PM_REMOVE );
ok( !ret, "got message %x\n", msg.message );
@@ -15195,7 +15196,7 @@ static void test_unicode_wm_char(void)
GetLocaleInfoW( LOWORD( hkl_orig ), LOCALE_IDEFAULTANSICODEPAGE | LOCALE_RETURN_NUMBER, (WCHAR*)&cp, sizeof(cp) / sizeof(WCHAR) );
if (cp != 1252)
{
- skip( "Default codepage %d\n", cp );
+ skip( "Default codepage %ld\n", cp );
return;
}
@@ -15219,8 +15220,8 @@ static void test_unicode_wm_char(void)
ok( msg.hwnd == hwnd, "unexpected hwnd %p\n", msg.hwnd );
ok( msg.message == WM_CHAR, "unexpected message %x\n", msg.message );
- ok( msg.wParam == 0x3b1, "bad wparam %lx\n", msg.wParam );
- ok( msg.lParam == 0, "bad lparam %lx\n", msg.lParam );
+ ok( msg.wParam == 0x3b1, "bad wparam %Ix\n", msg.wParam );
+ ok( msg.lParam == 0, "bad lparam %Ix\n", msg.lParam );
DispatchMessageW( &msg );
@@ -15239,8 +15240,8 @@ static void test_unicode_wm_char(void)
ok( GetMessageA( &msg, hwnd, 0, 0 ), "no message\n" );
ok( msg.hwnd == hwnd, "unexpected hwnd %p\n", msg.hwnd );
ok( msg.message == WM_CHAR, "unexpected message %x\n", msg.message );
- ok( msg.wParam == 0x61, "bad wparam %lx\n", msg.wParam );
- ok( msg.lParam == 0, "bad lparam %lx\n", msg.lParam );
+ ok( msg.wParam == 0x61, "bad wparam %Ix\n", msg.wParam );
+ ok( msg.lParam == 0, "bad lparam %Ix\n", msg.lParam );
DispatchMessageA( &msg );
@@ -15249,7 +15250,7 @@ static void test_unicode_wm_char(void)
thread_locale = GetThreadLocale();
ActivateKeyboardLayout( hkl_greek, 0 );
- ok( GetThreadLocale() == thread_locale, "locale changed from %08x to %08x\n",
+ ok( GetThreadLocale() == thread_locale, "locale changed from %08lx to %08lx\n",
thread_locale, GetThreadLocale() );
flush_sequence();
@@ -15260,8 +15261,8 @@ static void test_unicode_wm_char(void)
ok( GetMessageA( &msg, hwnd, 0, 0 ), "no message\n" );
ok( msg.hwnd == hwnd, "unexpected hwnd %p\n", msg.hwnd );
ok( msg.message == WM_CHAR, "unexpected message %x\n", msg.message );
- ok( msg.wParam == 0xe1, "bad wparam %lx\n", msg.wParam );
- ok( msg.lParam == 0, "bad lparam %lx\n", msg.lParam );
+ ok( msg.wParam == 0xe1, "bad wparam %Ix\n", msg.wParam );
+ ok( msg.lParam == 0, "bad lparam %Ix\n", msg.lParam );
DispatchMessageA( &msg );
@@ -15444,15 +15445,15 @@ static void check_lb_state_dbg(HWND listbox, int count, int cur_sel,
/* calling an orig proc helps to avoid unnecessary message logging */
ret = CallWindowProcA(listbox_orig_proc, listbox, LB_GETCOUNT, 0, 0);
- ok_(__FILE__, line)(ret == count, "expected count %d, got %ld\n", count, ret);
+ ok_(__FILE__, line)(ret == count, "expected count %d, got %Id\n", count, ret);
ret = CallWindowProcA(listbox_orig_proc, listbox, LB_GETCURSEL, 0, 0);
- ok_(__FILE__, line)(ret == cur_sel, "expected cur sel %d, got %ld\n", cur_sel, ret);
+ ok_(__FILE__, line)(ret == cur_sel, "expected cur sel %d, got %Id\n", cur_sel, ret);
ret = CallWindowProcA(listbox_orig_proc, listbox, LB_GETCARETINDEX, 0, 0);
ok_(__FILE__, line)(ret == caret_index ||
broken(cur_sel == -1 && caret_index == 0 && ret == -1), /* nt4 */
- "expected caret index %d, got %ld\n", caret_index, ret);
+ "expected caret index %d, got %Id\n", caret_index, ret);
ret = CallWindowProcA(listbox_orig_proc, listbox, LB_GETTOPINDEX, 0, 0);
- ok_(__FILE__, line)(ret == top_index, "expected top index %d, got %ld\n", top_index, ret);
+ ok_(__FILE__, line)(ret == top_index, "expected top index %d, got %Id\n", top_index, ret);
}
static void test_listbox_messages(void)
@@ -15475,11 +15476,11 @@ static void test_listbox_messages(void)
log_all_parent_messages++;
ret = SendMessageA(listbox, LB_ADDSTRING, 0, (LPARAM)"item 0");
- ok(ret == 0, "expected 0, got %ld\n", ret);
+ ok(ret == 0, "expected 0, got %Id\n", ret);
ret = SendMessageA(listbox, LB_ADDSTRING, 0, (LPARAM)"item 1");
- ok(ret == 1, "expected 1, got %ld\n", ret);
+ ok(ret == 1, "expected 1, got %Id\n", ret);
ret = SendMessageA(listbox, LB_ADDSTRING, 0, (LPARAM)"item 2");
- ok(ret == 2, "expected 2, got %ld\n", ret);
+ ok(ret == 2, "expected 2, got %Id\n", ret);
ok_sequence(wm_lb_addstring_ownerdraw, "LB_ADDSTRING", FALSE);
check_lb_state(listbox, 3, LB_ERR, 0, 0);
@@ -15488,56 +15489,56 @@ static void test_listbox_messages(void)
trace("selecting item 0\n");
ret = SendMessageA(listbox, LB_SETCURSEL, 0, 0);
- ok(ret == 0, "expected 0, got %ld\n", ret);
+ ok(ret == 0, "expected 0, got %Id\n", ret);
ok_sequence(wm_lb_setcursel_0, "LB_SETCURSEL 0", FALSE );
check_lb_state(listbox, 3, 0, 0, 0);
flush_sequence();
trace("selecting item 1\n");
ret = SendMessageA(listbox, LB_SETCURSEL, 1, 0);
- ok(ret == 1, "expected 1, got %ld\n", ret);
+ ok(ret == 1, "expected 1, got %Id\n", ret);
ok_sequence(wm_lb_setcursel_1, "LB_SETCURSEL 1", FALSE );
check_lb_state(listbox, 3, 1, 1, 0);
trace("selecting item 2\n");
ret = SendMessageA(listbox, LB_SETCURSEL, 2, 0);
- ok(ret == 2, "expected 2, got %ld\n", ret);
+ ok(ret == 2, "expected 2, got %Id\n", ret);
ok_sequence(wm_lb_setcursel_2, "LB_SETCURSEL 2", FALSE );
check_lb_state(listbox, 3, 2, 2, 0);
trace("clicking on item 0\n");
ret = SendMessageA(listbox, WM_LBUTTONDOWN, 0, MAKELPARAM(1, 1));
- ok(ret == LB_OKAY, "expected LB_OKAY, got %ld\n", ret);
+ ok(ret == LB_OKAY, "expected LB_OKAY, got %Id\n", ret);
ret = SendMessageA(listbox, WM_LBUTTONUP, 0, 0);
- ok(ret == LB_OKAY, "expected LB_OKAY, got %ld\n", ret);
+ ok(ret == LB_OKAY, "expected LB_OKAY, got %Id\n", ret);
ok_sequence(wm_lb_click_0, "WM_LBUTTONDOWN 0", FALSE );
check_lb_state(listbox, 3, 0, 0, 0);
flush_sequence();
trace("deleting item 0\n");
ret = SendMessageA(listbox, LB_DELETESTRING, 0, 0);
- ok(ret == 2, "expected 2, got %ld\n", ret);
+ ok(ret == 2, "expected 2, got %Id\n", ret);
ok_sequence(wm_lb_deletestring, "LB_DELETESTRING 0", FALSE );
check_lb_state(listbox, 2, -1, 0, 0);
flush_sequence();
trace("deleting item 0\n");
ret = SendMessageA(listbox, LB_DELETESTRING, 0, 0);
- ok(ret == 1, "expected 1, got %ld\n", ret);
+ ok(ret == 1, "expected 1, got %Id\n", ret);
ok_sequence(wm_lb_deletestring, "LB_DELETESTRING 0", FALSE );
check_lb_state(listbox, 1, -1, 0, 0);
flush_sequence();
trace("deleting item 0\n");
ret = SendMessageA(listbox, LB_DELETESTRING, 0, 0);
- ok(ret == 0, "expected 0, got %ld\n", ret);
+ ok(ret == 0, "expected 0, got %Id\n", ret);
ok_sequence(wm_lb_deletestring_reset, "LB_DELETESTRING 0", FALSE );
check_lb_state(listbox, 0, -1, 0, 0);
flush_sequence();
trace("deleting item 0\n");
ret = SendMessageA(listbox, LB_DELETESTRING, 0, 0);
- ok(ret == LB_ERR, "expected LB_ERR, got %ld\n", ret);
+ ok(ret == LB_ERR, "expected LB_ERR, got %Id\n", ret);
check_lb_state(listbox, 0, -1, 0, 0);
flush_sequence();
@@ -15558,11 +15559,11 @@ static void test_listbox_messages(void)
log_all_parent_messages++;
ret = SendMessageA(listbox, LB_ADDSTRING, 0, (LPARAM)"item 0");
- ok(ret == 0, "expected 0, got %ld\n", ret);
+ ok(ret == 0, "expected 0, got %Id\n", ret);
ret = SendMessageA(listbox, LB_ADDSTRING, 0, (LPARAM)"item 1");
- ok(ret == 1, "expected 1, got %ld\n", ret);
+ ok(ret == 1, "expected 1, got %Id\n", ret);
ret = SendMessageA(listbox, LB_ADDSTRING, 0, (LPARAM)"item 2");
- ok(ret == 2, "expected 2, got %ld\n", ret);
+ ok(ret == 2, "expected 2, got %Id\n", ret);
ok_sequence(wm_lb_addstring_sort_ownerdraw, "LB_ADDSTRING", FALSE);
check_lb_state(listbox, 3, LB_ERR, 0, 0);
@@ -15584,11 +15585,11 @@ static void test_listbox_messages(void)
log_all_parent_messages++;
ret = SendMessageA(listbox, LB_ADDSTRING, 0, (LPARAM)"item 2");
- ok(ret == 0, "expected 0, got %ld\n", ret);
+ ok(ret == 0, "expected 0, got %Id\n", ret);
ret = SendMessageA(listbox, LB_ADDSTRING, 0, (LPARAM)"item 0");
- ok(ret == 1, "expected 1, got %ld\n", ret);
+ ok(ret == 1, "expected 1, got %Id\n", ret);
ret = SendMessageA(listbox, LB_ADDSTRING, 0, (LPARAM)"item 1");
- ok(ret == 2, "expected 2, got %ld\n", ret);
+ ok(ret == 2, "expected 2, got %Id\n", ret);
ok_sequence(wm_lb_addstring, "LB_ADDSTRING", FALSE);
check_lb_state(listbox, 3, LB_ERR, 0, 0);
@@ -15610,11 +15611,11 @@ static void test_listbox_messages(void)
log_all_parent_messages++;
ret = SendMessageA(listbox, LB_ADDSTRING, 0, (LPARAM)"item 2");
- ok(ret == 0, "expected 0, got %ld\n", ret);
+ ok(ret == 0, "expected 0, got %Id\n", ret);
ret = SendMessageA(listbox, LB_ADDSTRING, 0, (LPARAM)"item 0");
- ok(ret == 0, "expected 0, got %ld\n", ret);
+ ok(ret == 0, "expected 0, got %Id\n", ret);
ret = SendMessageA(listbox, LB_ADDSTRING, 0, (LPARAM)"item 1");
- ok(ret == 1, "expected 1, got %ld\n", ret);
+ ok(ret == 1, "expected 1, got %Id\n", ret);
ok_sequence(wm_lb_addstring, "LB_ADDSTRING", FALSE);
check_lb_state(listbox, 3, LB_ERR, 0, 0);
@@ -15843,7 +15844,7 @@ static void set_menu_style(HMENU hmenu, DWORD style)
mi.dwStyle = style;
SetLastError(0xdeadbeef);
ret = SetMenuInfo(hmenu, &mi);
- ok(ret, "SetMenuInfo error %u\n", GetLastError());
+ ok(ret, "SetMenuInfo error %lu\n", GetLastError());
}
static DWORD get_menu_style(HMENU hmenu)
@@ -15856,7 +15857,7 @@ static DWORD get_menu_style(HMENU hmenu)
mi.dwStyle = 0;
SetLastError(0xdeadbeef);
ret = GetMenuInfo(hmenu, &mi);
- ok(ret, "GetMenuInfo error %u\n", GetLastError());
+ ok(ret, "GetMenuInfo error %lu\n", GetLastError());
return mi.dwStyle;
}
@@ -15886,11 +15887,11 @@ static void test_menu_messages(void)
SetLastError(0xdeadbeef);
hwnd = CreateWindowExA(0, "TestMenuClass", NULL, WS_OVERLAPPEDWINDOW | WS_VISIBLE,
100, 100, 200, 200, 0, 0, 0, NULL);
- ok(hwnd != 0, "LoadMenuA error %u\n", GetLastError());
+ ok(hwnd != 0, "LoadMenuA error %lu\n", GetLastError());
SetLastError(0xdeadbeef);
hmenu = LoadMenuA(GetModuleHandleA(NULL), MAKEINTRESOURCEA(1));
- ok(hmenu != 0, "LoadMenuA error %u\n", GetLastError());
+ ok(hmenu != 0, "LoadMenuA error %lu\n", GetLastError());
SetMenu(hwnd, hmenu);
SetForegroundWindow( hwnd );
@@ -15898,17 +15899,17 @@ static void test_menu_messages(void)
set_menu_style(hmenu, MNS_NOTIFYBYPOS);
style = get_menu_style(hmenu);
- ok(style == MNS_NOTIFYBYPOS, "expected MNS_NOTIFYBYPOS, got %u\n", style);
+ ok(style == MNS_NOTIFYBYPOS, "expected MNS_NOTIFYBYPOS, got %lu\n", style);
hmenu_popup = GetSubMenu(hmenu, 0);
ok(hmenu_popup != 0, "GetSubMenu returned 0 for submenu 0\n");
style = get_menu_style(hmenu_popup);
- ok(style == 0, "expected 0, got %u\n", style);
+ ok(style == 0, "expected 0, got %lu\n", style);
hmenu_popup = GetSubMenu(hmenu_popup, 0);
ok(hmenu_popup != 0, "GetSubMenu returned 0 for submenu 0\n");
style = get_menu_style(hmenu_popup);
- ok(style == 0, "expected 0, got %u\n", style);
+ ok(style == 0, "expected 0, got %lu\n", style);
if (!us_kbd)
{
@@ -15978,18 +15979,18 @@ static void test_menu_messages(void)
set_menu_style(hmenu, 0);
style = get_menu_style(hmenu);
- ok(style == 0, "expected 0, got %u\n", style);
+ ok(style == 0, "expected 0, got %lu\n", style);
hmenu_popup = GetSubMenu(hmenu, 0);
ok(hmenu_popup != 0, "GetSubMenu returned 0 for submenu 0\n");
set_menu_style(hmenu_popup, MNS_NOTIFYBYPOS);
style = get_menu_style(hmenu_popup);
- ok(style == MNS_NOTIFYBYPOS, "expected MNS_NOTIFYBYPOS, got %u\n", style);
+ ok(style == MNS_NOTIFYBYPOS, "expected MNS_NOTIFYBYPOS, got %lu\n", style);
hmenu_popup = GetSubMenu(hmenu_popup, 0);
ok(hmenu_popup != 0, "GetSubMenu returned 0 for submenu 0\n");
style = get_menu_style(hmenu_popup);
- ok(style == 0, "expected 0, got %u\n", style);
+ ok(style == 0, "expected 0, got %lu\n", style);
/* Alt+F, Right, Enter */
trace("testing submenu of a popup menu command\n");
@@ -16023,7 +16024,7 @@ static void test_paintingloop(void)
hwnd = CreateWindowExA(0x0,"PaintLoopWindowClass",
"PaintLoopWindowClass",WS_OVERLAPPEDWINDOW,
100, 100, 100, 100, 0, 0, 0, NULL );
- ok(hwnd != 0, "PaintLoop window error %u\n", GetLastError());
+ ok(hwnd != 0, "PaintLoop window error %lu\n", GetLastError());
ShowWindow(hwnd,SW_NORMAL);
SetFocus(hwnd);
@@ -16168,7 +16169,7 @@ static DWORD CALLBACK post_rbuttonup_msg( void *arg )
DWORD ret;
ret = WaitForSingleObject( data->wndproc_finished, 500 );
- todo_wine ok( ret == WAIT_OBJECT_0, "WaitForSingleObject returned %x\n", ret );
+ todo_wine ok( ret == WAIT_OBJECT_0, "WaitForSingleObject returned %lx\n", ret );
if( ret == WAIT_OBJECT_0 ) return 0;
PostMessageA( data->hwnd, WM_RBUTTONUP, 0, 0 );
@@ -16199,13 +16200,13 @@ static void test_defwinproc(void)
/* Zero high word of the lParam */
res = DefWindowProcA(hwnd, WM_SETTEXT, 0, 0x1234);
- ok(res == 0, "WM_SETTEXT was expected to fail, %ld\n", res);
+ ok(res == 0, "WM_SETTEXT was expected to fail, %Id\n", res);
GetWindowTextA(hwnd, buffA, ARRAY_SIZE(buffA));
ok(!strcmp(buffA, "test_defwndproc"), "unexpected window text, %s\n", buffA);
res = DefWindowProcW(hwnd, WM_SETTEXT, 0, 0x1234);
- ok(res == 0, "WM_SETTEXT was expected to fail, %ld\n", res);
+ ok(res == 0, "WM_SETTEXT was expected to fail, %Id\n", res);
GetWindowTextA(hwnd, buffA, ARRAY_SIZE(buffA));
ok(!strcmp(buffA, "test_defwndproc"), "unexpected window text, %s\n", buffA);
@@ -16251,7 +16252,7 @@ static void test_defwinproc(void)
SetCursorPos(x, y);
flush_events();
res = DefWindowProcA( hwnd, WM_NCHITTEST, 0, MAKELPARAM(x, y));
- ok(res == HTCAPTION, "WM_NCHITTEST returned %ld\n", res);
+ ok(res == HTCAPTION, "WM_NCHITTEST returned %Id\n", res);
mouse_event( MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0 );
mouse_event( MOUSEEVENTF_LEFTUP, 0, 0, 0, 0 );
@@ -16268,27 +16269,27 @@ static void test_defwinproc(void)
ok_sequence(NCRBUTTONDOWNSeq, "WM_NCRBUTTONDOWN on caption", FALSE);
res = DefWindowProcA(hwnd, WM_NCXBUTTONUP, 0, MAKELPARAM(x, y));
- ok(!res, "WM_NCXBUTTONUP returned %ld\n", res);
+ ok(!res, "WM_NCXBUTTONUP returned %Id\n", res);
ok_sequence(WmEmptySeq, "WM_NCXBUTTONUP without button", FALSE);
res = DefWindowProcA(hwnd, WM_NCXBUTTONUP, MAKEWPARAM(0, XBUTTON1), MAKELPARAM(x, y));
- ok(!res, "WM_NCXBUTTONUP returned %ld\n", res);
+ ok(!res, "WM_NCXBUTTONUP returned %Id\n", res);
ok_sequence(NCXBUTTONUPSeq1, "WM_NCXBUTTONUP with XBUTTON1", FALSE);
res = DefWindowProcA(hwnd, WM_NCXBUTTONUP, MAKEWPARAM(0, XBUTTON2), MAKELPARAM(x, y));
- ok(!res, "WM_NCXBUTTONUP returned %ld\n", res);
+ ok(!res, "WM_NCXBUTTONUP returned %Id\n", res);
ok_sequence(NCXBUTTONUPSeq2, "WM_NCXBUTTONUP with XBUTTON2", FALSE);
res = DefWindowProcA(hwnd, WM_NCXBUTTONUP, MAKEWPARAM(0, 3), MAKELPARAM(x, y));
- ok(!res, "WM_NCXBUTTONUP returned %ld\n", res);
+ ok(!res, "WM_NCXBUTTONUP returned %Id\n", res);
ok_sequence(WmEmptySeq, "WM_NCXBUTTONUP with invalid button", FALSE);
/* Test WM_MOUSEACTIVATE */
#define TEST_MOUSEACTIVATE(A,B,C) \
res = DefWindowProcA(hwnd, WM_MOUSEACTIVATE, (WPARAM)hwnd, (LPARAM)MAKELRESULT(A,0)); \
- ok(res == B, "WM_MOUSEACTIVATE for %s returned %ld\n", #A, res); \
+ ok(res == B, "WM_MOUSEACTIVATE for %s returned %Id\n", #A, res); \
res = DefWindowProcA(hwnd, WM_MOUSEACTIVATE, (WPARAM)hwnd, (LPARAM)MAKELRESULT(A,WM_LBUTTONDOWN)); \
- ok(res == C, "WM_MOUSEACTIVATE for %s returned %ld\n", #A, res);
+ ok(res == C, "WM_MOUSEACTIVATE for %s returned %Id\n", #A, res);
TEST_MOUSEACTIVATE(HTERROR, MA_ACTIVATE, MA_ACTIVATE);
TEST_MOUSEACTIVATE(HTTRANSPARENT, MA_ACTIVATE, MA_ACTIVATE);
@@ -16372,17 +16373,17 @@ static void test_desktop_winproc(void)
todo_wine ok(!strcmp(buffer, "test_desktop_wndproc"), "Got unexpected window text: %s.\n", buffer);
res = CallWindowProcA(desktop_proc, hwnd, WM_SETTEXT, 0, (LPARAM)"test");
- ok(res == TRUE, "Failed to set text, %ld.\n", res);
+ ok(res == TRUE, "Failed to set text, %Id.\n", res);
GetWindowTextA(hwnd, buffer, ARRAY_SIZE(buffer));
ok(!strcmp(buffer, "test"), "Got unexpected window text: %s.\n", buffer);
SetRect(&default_rect, 0, 0, 100, 100);
res = DefWindowProcW(hwnd, WM_NCCALCSIZE, FALSE, (LPARAM)&default_rect);
- ok(!res, "Got unexpected result %ld.\n", res);
+ ok(!res, "Got unexpected result %Id.\n", res);
SetRect(&rect, 0, 0, 100, 100);
res = CallWindowProcA(desktop_proc, hwnd, WM_NCCALCSIZE, FALSE, (LPARAM)&rect);
- ok(!res, "Got unexpected result %ld.\n", res);
+ ok(!res, "Got unexpected result %Id.\n", res);
todo_wine ok(EqualRect(&rect, &default_rect), "rect Got %s, expected %s.\n",
wine_dbgstr_rect(&rect), wine_dbgstr_rect(&default_rect));
@@ -16397,11 +16398,11 @@ static void clear_clipboard_(int line, HWND hWnd)
{
BOOL succ;
succ = OpenClipboard(hWnd);
- ok_(__FILE__, line)(succ, "OpenClipboard failed, err=%u\n", GetLastError());
+ ok_(__FILE__, line)(succ, "OpenClipboard failed, err=%lu\n", GetLastError());
succ = EmptyClipboard();
- ok_(__FILE__, line)(succ, "EmptyClipboard failed, err=%u\n", GetLastError());
+ ok_(__FILE__, line)(succ, "EmptyClipboard failed, err=%lu\n", GetLastError());
succ = CloseClipboard();
- ok_(__FILE__, line)(succ, "CloseClipboard failed, err=%u\n", GetLastError());
+ ok_(__FILE__, line)(succ, "CloseClipboard failed, err=%lu\n", GetLastError());
}
#define expect_HWND(expected, got) expect_HWND_(__LINE__, (expected), (got))
@@ -16604,12 +16605,12 @@ static void test_PostMessage(void)
if (data[i].hwnd)
ok(ret && msg.hwnd == 0 && msg.message == WM_USER+2 &&
msg.wParam == 0x5678 && msg.lParam == 0x1234,
- "%d: got ret %d hwnd %p msg %04x wParam %08lx lParam %08lx instead of TRUE/0/WM_USER+2/0x5678/0x1234\n",
+ "%d: got ret %d hwnd %p msg %04x wParam %08Ix lParam %08Ix instead of TRUE/0/WM_USER+2/0x5678/0x1234\n",
i, ret, msg.hwnd, msg.message, msg.wParam, msg.lParam);
else
ok(ret && msg.hwnd == hwnd && msg.message == WM_USER+1 &&
msg.wParam == 0x1234 && msg.lParam == 0x5678,
- "%d: got ret %d hwnd %p msg %04x wParam %08lx lParam %08lx instead of TRUE/%p/WM_USER+1/0x1234/0x5678\n",
+ "%d: got ret %d hwnd %p msg %04x wParam %08Ix lParam %08Ix instead of TRUE/%p/WM_USER+1/0x1234/0x5678\n",
i, ret, msg.hwnd, msg.message, msg.wParam, msg.lParam, msg.hwnd);
}
}
@@ -16699,21 +16700,21 @@ static void test_broadcast(void)
/* post, broadcast */
ret = PostMessageA(HWND_BROADCAST, messages[i], 0, 0);
- ok(ret, "%d: got %d, error %d\n", i, ret, GetLastError());
+ ok(ret, "%d: got %d, error %ld\n", i, ret, GetLastError());
memset(&msg, 0xab, sizeof(msg));
ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE);
- ok(ret == msg_expected, "%d: message %04x, got %d, error %d\n", i, messages[i], ret, GetLastError());
+ ok(ret == msg_expected, "%d: message %04x, got %d, error %ld\n", i, messages[i], ret, GetLastError());
if (msg_expected)
ok(msg.hwnd == hwnd, "%d: got %p\n", i, msg.hwnd);
/* post, topmost */
ret = PostMessageA(HWND_TOPMOST, messages[i], 0, 0);
- ok(ret, "%d: got %d, error %d\n", i, ret, GetLastError());
+ ok(ret, "%d: got %d, error %ld\n", i, ret, GetLastError());
memset(&msg, 0xab, sizeof(msg));
ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE);
- ok(ret == msg_expected, "%d: message %04x, got %d, error %d\n", i, messages[i], ret, GetLastError());
+ ok(ret == msg_expected, "%d: message %04x, got %d, error %ld\n", i, messages[i], ret, GetLastError());
if (msg_expected)
ok(msg.hwnd == hwnd, "%d: got %p\n", i, msg.hwnd);
}
@@ -16744,13 +16745,13 @@ static void test_broadcast(void)
else
{
WPARAM wparam_expected = msg_expected ? 0xbaadbeef : 0xdead;
- ok(g_broadcast_wparam == wparam_expected, "%d: message %04x, got %#lx, error %d\n",
+ ok(g_broadcast_wparam == wparam_expected, "%d: message %04x, got %#Ix, error %ld\n",
i, messages[i], g_broadcast_wparam, GetLastError());
for (j = 0; j < ARRAY_SIZE(bcast_expect); j++)
{
wparam_expected = (msg_expected && bcast_expect[j].receive) ? 0xbaadbeef : 0xdead;
ok(g_broadcast_sub_wparam[j] == wparam_expected,
- "%d,%d: message %04x, got %#lx, error %d\n", i, j, messages[i],
+ "%d,%d: message %04x, got %#Ix, error %ld\n", i, j, messages[i],
g_broadcast_sub_wparam[j], GetLastError());
}
}
@@ -16765,13 +16766,13 @@ static void test_broadcast(void)
else
{
WPARAM wparam_expected = msg_expected ? 0xbaadbeef : 0xdead;
- ok(g_broadcast_wparam == wparam_expected, "%d: message %04x, got %#lx, error %d\n",
+ ok(g_broadcast_wparam == wparam_expected, "%d: message %04x, got %#Ix, error %ld\n",
i, messages[i], g_broadcast_wparam, GetLastError());
for (j = 0; j < ARRAY_SIZE(bcast_expect); j++)
{
wparam_expected = (msg_expected && bcast_expect[j].receive) ? 0xbaadbeef : 0xdead;
ok(g_broadcast_sub_wparam[j] == wparam_expected,
- "%d,%d: message %04x, got %#lx, error %d\n", i, j, messages[i],
+ "%d,%d: message %04x, got %#Ix, error %ld\n", i, j, messages[i],
g_broadcast_sub_wparam[j], GetLastError());
}
}
@@ -16845,8 +16846,8 @@ static void do_wait_idle_child( int arg )
PeekMessageA( &msg, 0, 0, 0, PM_NOREMOVE ); /* create the msg queue */
- ok( start_event != 0, "failed to create start event, error %u\n", GetLastError() );
- ok( end_event != 0, "failed to create end event, error %u\n", GetLastError() );
+ ok( start_event != 0, "failed to create start event, error %lu\n", GetLastError() );
+ ok( end_event != 0, "failed to create end event, error %lu\n", GetLastError() );
switch (arg)
{
@@ -17024,8 +17025,8 @@ static void test_WaitForInputIdle( char *argv0 )
start_event = CreateEventA(NULL, 0, 0, "test_WaitForInputIdle_start");
end_event = CreateEventA(NULL, 0, 0, "test_WaitForInputIdle_end");
- ok(start_event != 0, "failed to create start event, error %u\n", GetLastError());
- ok(end_event != 0, "failed to create end event, error %u\n", GetLastError());
+ ok(start_event != 0, "failed to create start event, error %lu\n", GetLastError());
+ ok(end_event != 0, "failed to create end event, error %lu\n", GetLastError());
memset( &startup, 0, sizeof(startup) );
startup.cb = sizeof(startup);
@@ -17040,7 +17041,7 @@ static void test_WaitForInputIdle( char *argv0 )
ResetEvent( end_event );
sprintf( path, "%s msg %u", argv0, i );
ret = CreateProcessA( NULL, path, NULL, NULL, TRUE, 0, NULL, NULL, &startup, &pi );
- ok( ret, "CreateProcess '%s' failed err %u.\n", path, GetLastError() );
+ ok( ret, "CreateProcess '%s' failed err %lu.\n", path, GetLastError() );
if (ret)
{
ret = WaitForSingleObject( start_event, 5000 );
@@ -17052,11 +17053,11 @@ static void test_WaitForInputIdle( char *argv0 )
ok( console_app ||
ret == wait_idle_expect[i].exp ||
broken(ret == wait_idle_expect[i].broken),
- "%u: WaitForInputIdle error %08x expected %08x\n",
+ "%u: WaitForInputIdle error %08x expected %08lx\n",
i, ret, wait_idle_expect[i].exp );
else todo_wine_if (wait_idle_expect[i].todo)
ok( ret == wait_idle_expect[i].exp || broken(ret == wait_idle_expect[i].broken),
- "%u: WaitForInputIdle error %08x expected %08x\n",
+ "%u: WaitForInputIdle error %08x expected %08lx\n",
i, ret, wait_idle_expect[i].exp );
SetEvent( end_event );
WaitForSingleObject( pi.hProcess, 1000 ); /* give it a chance to exit on its own */
@@ -17432,7 +17433,7 @@ static LRESULT CALLBACK KeyboardHookProc(int nCode, WPARAM wParam, LPARAM lParam
ok(kdbhookstruct->vkCode == VK_LWIN ||
kdbhookstruct->vkCode == VK_LMENU ||
kdbhookstruct->vkCode == hotkey_letter,
- "unexpected keycode %x\n", kdbhookstruct->vkCode);
+ "unexpected keycode %lx\n", kdbhookstruct->vkCode);
}
}
@@ -17457,7 +17458,7 @@ static void test_hotkey(void)
ok(ret == FALSE, "expected FALSE, got %i\n", ret);
ok(GetLastError() == ERROR_HOTKEY_NOT_REGISTERED || broken(GetLastError() == 0xdeadbeef),
- "unexpected error %d\n", GetLastError());
+ "unexpected error %ld\n", GetLastError());
test_window = CreateWindowExA(0, "HotkeyWindowClass", NULL, WS_OVERLAPPEDWINDOW | WS_VISIBLE,
100, 100, 200, 200, 0, 0, 0, NULL);
@@ -17468,7 +17469,7 @@ static void test_hotkey(void)
ret = UnregisterHotKey(test_window, 0);
ok(ret == FALSE, "expected FALSE, got %i\n", ret);
ok(GetLastError() == ERROR_HOTKEY_NOT_REGISTERED || broken(GetLastError() == 0xdeadbeef),
- "unexpected error %d\n", GetLastError());
+ "unexpected error %ld\n", GetLastError());
/* Search for a Windows Key + letter combination that hasn't been registered */
for (hotkey_letter = 0x41; hotkey_letter <= 0x51; hotkey_letter ++)
@@ -17483,7 +17484,7 @@ static void test_hotkey(void)
else
{
ok(GetLastError() == ERROR_HOTKEY_ALREADY_REGISTERED || broken(GetLastError() == 0xdeadbeef),
- "unexpected error %d\n", GetLastError());
+ "unexpected error %ld\n", GetLastError());
}
}
@@ -17501,21 +17502,21 @@ static void test_hotkey(void)
ret = RegisterHotKey(test_window, 4, MOD_WIN, hotkey_letter);
ok(ret == FALSE, "expected FALSE, got %i\n", ret);
ok(GetLastError() == ERROR_HOTKEY_ALREADY_REGISTERED || broken(GetLastError() == 0xdeadbeef),
- "unexpected error %d\n", GetLastError());
+ "unexpected error %ld\n", GetLastError());
/* Same key combination, different window */
SetLastError(0xdeadbeef);
ret = RegisterHotKey(NULL, 5, MOD_WIN, hotkey_letter);
ok(ret == FALSE, "expected FALSE, got %i\n", ret);
ok(GetLastError() == ERROR_HOTKEY_ALREADY_REGISTERED || broken(GetLastError() == 0xdeadbeef),
- "unexpected error %d\n", GetLastError());
+ "unexpected error %ld\n", GetLastError());
/* Register the same hotkey twice */
SetLastError(0xdeadbeef);
ret = RegisterHotKey(test_window, 5, MOD_WIN, hotkey_letter);
ok(ret == FALSE, "expected FALSE, got %i\n", ret);
ok(GetLastError() == ERROR_HOTKEY_ALREADY_REGISTERED || broken(GetLastError() == 0xdeadbeef),
- "unexpected error %d\n", GetLastError());
+ "unexpected error %ld\n", GetLastError());
/* Window on another thread */
taskbar_window = FindWindowA("Shell_TrayWnd", NULL);
@@ -17529,7 +17530,7 @@ static void test_hotkey(void)
ret = RegisterHotKey(taskbar_window, 5, 0, hotkey_letter);
ok(ret == FALSE, "expected FALSE, got %i\n", ret);
ok(GetLastError() == ERROR_WINDOW_OF_OTHER_THREAD || broken(GetLastError() == 0xdeadbeef),
- "unexpected error %d\n", GetLastError());
+ "unexpected error %ld\n", GetLastError());
}
/* Inject the appropriate key sequence */
@@ -17540,20 +17541,20 @@ static void test_hotkey(void)
keybd_event(hotkey_letter, 0, 0, 0);
queue_status = GetQueueStatus(QS_HOTKEY);
- ok((queue_status & (QS_HOTKEY << 16)) == QS_HOTKEY << 16, "expected QS_HOTKEY << 16 set, got %x\n", queue_status);
+ ok((queue_status & (QS_HOTKEY << 16)) == QS_HOTKEY << 16, "expected QS_HOTKEY << 16 set, got %lx\n", queue_status);
while (PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE))
{
if (msg.message == WM_HOTKEY)
{
ok(msg.hwnd == test_window, "unexpected hwnd %p\n", msg.hwnd);
- ok(msg.lParam == MAKELPARAM(MOD_WIN, hotkey_letter), "unexpected WM_HOTKEY lparam %lx\n", msg.lParam);
+ ok(msg.lParam == MAKELPARAM(MOD_WIN, hotkey_letter), "unexpected WM_HOTKEY lparam %Ix\n", msg.lParam);
}
DispatchMessageA(&msg);
}
ok_sequence(WmHotkeyPress, "window hotkey press", FALSE);
queue_status = GetQueueStatus(QS_HOTKEY);
- ok((queue_status & (QS_HOTKEY << 16)) == 0, "expected QS_HOTKEY << 16 cleared, got %x\n", queue_status);
+ ok((queue_status & (QS_HOTKEY << 16)) == 0, "expected QS_HOTKEY << 16 cleared, got %lx\n", queue_status);
key_state = GetAsyncKeyState(hotkey_letter);
ok((key_state & 0x8000) == 0x8000, "unexpected key state %x\n", key_state);
@@ -17571,9 +17572,9 @@ static void test_hotkey(void)
/* normal posted WM_HOTKEY messages set QS_HOTKEY */
PostMessageA(test_window, WM_HOTKEY, 0, 0);
queue_status = GetQueueStatus(QS_HOTKEY);
- ok((queue_status & (QS_HOTKEY << 16)) == QS_HOTKEY << 16, "expected QS_HOTKEY << 16 set, got %x\n", queue_status);
+ ok((queue_status & (QS_HOTKEY << 16)) == QS_HOTKEY << 16, "expected QS_HOTKEY << 16 set, got %lx\n", queue_status);
queue_status = GetQueueStatus(QS_POSTMESSAGE);
- ok((queue_status & (QS_POSTMESSAGE << 16)) == QS_POSTMESSAGE << 16, "expected QS_POSTMESSAGE << 16 set, got %x\n", queue_status);
+ ok((queue_status & (QS_POSTMESSAGE << 16)) == QS_POSTMESSAGE << 16, "expected QS_POSTMESSAGE << 16 set, got %lx\n", queue_status);
while (PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE))
DispatchMessageA(&msg);
flush_sequence();
@@ -17590,7 +17591,7 @@ static void test_hotkey(void)
if (msg.message == WM_HOTKEY)
{
ok(msg.hwnd == test_window, "unexpected hwnd %p\n", msg.hwnd);
- ok(msg.lParam == MAKELPARAM(MOD_WIN, hotkey_letter), "unexpected WM_HOTKEY lparam %lx\n", msg.lParam);
+ ok(msg.lParam == MAKELPARAM(MOD_WIN, hotkey_letter), "unexpected WM_HOTKEY lparam %Ix\n", msg.lParam);
}
DispatchMessageA(&msg);
}
@@ -17598,7 +17599,7 @@ static void test_hotkey(void)
/* Register same hwnd/id with different key combination */
ret = RegisterHotKey(test_window, 5, 0, hotkey_letter);
- ok(ret == TRUE, "expected TRUE, got %i, err=%d\n", ret, GetLastError());
+ ok(ret == TRUE, "expected TRUE, got %i, err=%ld\n", ret, GetLastError());
/* Previous key combination does not work */
keybd_event(VK_LWIN, 0, 0, 0);
@@ -17619,7 +17620,7 @@ static void test_hotkey(void)
if (msg.message == WM_HOTKEY)
{
ok(msg.hwnd == test_window, "unexpected hwnd %p\n", msg.hwnd);
- ok(msg.lParam == MAKELPARAM(0, hotkey_letter), "unexpected WM_HOTKEY lparam %lx\n", msg.lParam);
+ ok(msg.lParam == MAKELPARAM(0, hotkey_letter), "unexpected WM_HOTKEY lparam %Ix\n", msg.lParam);
}
DispatchMessageA(&msg);
}
@@ -17627,18 +17628,18 @@ static void test_hotkey(void)
/* Unregister hotkey properly */
ret = UnregisterHotKey(test_window, 5);
- ok(ret == TRUE, "expected TRUE, got %i, err=%d\n", ret, GetLastError());
+ ok(ret == TRUE, "expected TRUE, got %i, err=%ld\n", ret, GetLastError());
/* Unregister hotkey again */
SetLastError(0xdeadbeef);
ret = UnregisterHotKey(test_window, 5);
ok(ret == FALSE, "expected FALSE, got %i\n", ret);
ok(GetLastError() == ERROR_HOTKEY_NOT_REGISTERED || broken(GetLastError() == 0xdeadbeef),
- "unexpected error %d\n", GetLastError());
+ "unexpected error %ld\n", GetLastError());
/* Register thread hotkey */
ret = RegisterHotKey(NULL, 5, MOD_WIN, hotkey_letter);
- ok(ret == TRUE, "expected TRUE, got %i, err=%d\n", ret, GetLastError());
+ ok(ret == TRUE, "expected TRUE, got %i, err=%ld\n", ret, GetLastError());
/* Inject the appropriate key sequence */
keybd_event(VK_LWIN, 0, 0, 0);
@@ -17656,7 +17657,7 @@ static void test_hotkey(void)
{
struct recvd_message message;
ok(msg.hwnd == NULL, "unexpected hwnd %p\n", msg.hwnd);
- ok(msg.lParam == MAKELPARAM(MOD_WIN, hotkey_letter), "unexpected WM_HOTKEY lparam %lx\n", msg.lParam);
+ ok(msg.lParam == MAKELPARAM(MOD_WIN, hotkey_letter), "unexpected WM_HOTKEY lparam %Ix\n", msg.lParam);
message.message = msg.message;
message.flags = sent|wparam|lparam;
message.wParam = msg.wParam;
@@ -17699,7 +17700,7 @@ static void test_hotkey(void)
else
{
ok(GetLastError() == ERROR_HOTKEY_ALREADY_REGISTERED || broken(GetLastError() == 0xdeadbeef),
- "unexpected error %d\n", GetLastError());
+ "unexpected error %ld\n", GetLastError());
}
}
@@ -17720,7 +17721,7 @@ static void test_hotkey(void)
if (msg.message == WM_HOTKEY)
{
ok(msg.hwnd == test_window, "unexpected hwnd %p\n", msg.hwnd);
- ok(msg.lParam == MAKELPARAM(MOD_ALT, hotkey_letter), "unexpected WM_HOTKEY lparam %lx\n", msg.lParam);
+ ok(msg.lParam == MAKELPARAM(MOD_ALT, hotkey_letter), "unexpected WM_HOTKEY lparam %Ix\n", msg.lParam);
}
DispatchMessageA(&msg);
}
@@ -17738,7 +17739,7 @@ static void test_hotkey(void)
/* Unregister thread hotkey */
ret = UnregisterHotKey(NULL, 5);
- ok(ret == TRUE, "expected TRUE, got %i, err=%d\n", ret, GetLastError());
+ ok(ret == TRUE, "expected TRUE, got %i, err=%ld\n", ret, GetLastError());
if (hKBD_hook) UnhookWindowsHookEx(hKBD_hook);
hKBD_hook = NULL;
@@ -17792,9 +17793,9 @@ static void test_SetFocus(void)
DWORD ret, tid;
wnd_event.start_event = CreateEventW(NULL, 0, 0, NULL);
- ok(wnd_event.start_event != 0, "CreateEvent error %d\n", GetLastError());
+ ok(wnd_event.start_event != 0, "CreateEvent error %ld\n", GetLastError());
hthread = CreateThread(NULL, 0, thread_proc, &wnd_event, 0, &tid);
- ok(hthread != 0, "CreateThread error %d\n", GetLastError());
+ ok(hthread != 0, "CreateThread error %ld\n", GetLastError());
ret = WaitForSingleObject(wnd_event.start_event, INFINITE);
ok(ret == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
CloseHandle(wnd_event.start_event);
@@ -17836,7 +17837,7 @@ static void test_SetFocus(void)
SetLastError(0xdeadbeef);
old_focus = SetFocus((HWND)0xdeadbeef);
ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE || broken(GetLastError() == 0xdeadbeef),
- "expected ERROR_INVALID_WINDOW_HANDLE, got %d\n", GetLastError());
+ "expected ERROR_INVALID_WINDOW_HANDLE, got %ld\n", GetLastError());
while (PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) DispatchMessageA(&msg);
ok_sequence(WmEmptySeq, "SetFocus on an invalid window", FALSE);
ok(old_focus == 0, "expected old focus 0, got %p\n", old_focus);
@@ -17846,7 +17847,7 @@ static void test_SetFocus(void)
SetLastError(0xdeadbeef);
old_focus = SetFocus(GetDesktopWindow());
ok(GetLastError() == ERROR_ACCESS_DENIED /* Vista+ */ ||
- broken(GetLastError() == 0xdeadbeef), "expected ERROR_ACCESS_DENIED, got %d\n", GetLastError());
+ broken(GetLastError() == 0xdeadbeef), "expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError());
while (PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) DispatchMessageA(&msg);
ok_sequence(WmEmptySeq, "SetFocus on a desktop window", TRUE);
ok(old_focus == 0, "expected old focus 0, got %p\n", old_focus);
@@ -17856,7 +17857,7 @@ static void test_SetFocus(void)
SetLastError(0xdeadbeef);
old_focus = SetFocus(wnd_event.hwnd);
ok(GetLastError() == ERROR_ACCESS_DENIED /* Vista+ */ ||
- broken(GetLastError() == 0xdeadbeef), "expected ERROR_ACCESS_DENIED, got %d\n", GetLastError());
+ broken(GetLastError() == 0xdeadbeef), "expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError());
while (PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) DispatchMessageA(&msg);
ok_sequence(WmEmptySeq, "SetFocus on another thread window", TRUE);
ok(old_focus == 0, "expected old focus 0, got %p\n", old_focus);
@@ -17866,7 +17867,7 @@ static void test_SetFocus(void)
SetLastError(0xdeadbeef);
old_active = SetActiveWindow((HWND)0xdeadbeef);
ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE || broken(GetLastError() == 0xdeadbeef),
- "expected ERROR_INVALID_WINDOW_HANDLE, got %d\n", GetLastError());
+ "expected ERROR_INVALID_WINDOW_HANDLE, got %ld\n", GetLastError());
while (PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) DispatchMessageA(&msg);
ok_sequence(WmEmptySeq, "SetActiveWindow on an invalid window", FALSE);
ok(old_active == 0, "expected old focus 0, got %p\n", old_active);
@@ -17876,7 +17877,7 @@ static void test_SetFocus(void)
SetLastError(0xdeadbeef);
old_active = SetActiveWindow(GetDesktopWindow());
todo_wine
- ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError());
+ ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %ld\n", GetLastError());
while (PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) DispatchMessageA(&msg);
ok_sequence(WmEmptySeq, "SetActiveWindow on a desktop window", TRUE);
ok(old_active == 0, "expected old focus 0, got %p\n", old_focus);
@@ -17886,7 +17887,7 @@ static void test_SetFocus(void)
SetLastError(0xdeadbeef);
old_active = SetActiveWindow(wnd_event.hwnd);
todo_wine
- ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError());
+ ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %ld\n", GetLastError());
while (PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) DispatchMessageA(&msg);
ok_sequence(WmEmptySeq, "SetActiveWindow on another thread window", TRUE);
ok(old_active == 0, "expected old focus 0, got %p\n", old_active);
@@ -17895,7 +17896,7 @@ static void test_SetFocus(void)
SetLastError(0xdeadbeef);
ret = AttachThreadInput(GetCurrentThreadId(), tid, TRUE);
- ok(ret, "AttachThreadInput error %d\n", GetLastError());
+ ok(ret, "AttachThreadInput error %ld\n", GetLastError());
ok(GetActiveWindow() == parent, "expected active %p, got %p\n", parent, GetActiveWindow());
ok(GetFocus() == parent, "expected focus %p, got %p\n", parent, GetFocus());
@@ -17926,7 +17927,7 @@ static void test_SetFocus(void)
SetLastError(0xdeadbeef);
ret = AttachThreadInput(GetCurrentThreadId(), tid, FALSE);
- ok(ret, "AttachThreadInput error %d\n", GetLastError());
+ ok(ret, "AttachThreadInput error %ld\n", GetLastError());
ok(GetActiveWindow() == 0, "expected active 0, got %p\n", GetActiveWindow());
ok(GetFocus() == 0, "expected focus 0, got %p\n", GetFocus());
@@ -17951,7 +17952,7 @@ static void test_SetFocus(void)
todo_wine
ok(GetLastError() == ERROR_INVALID_PARAMETER /* Vista+ */ ||
broken(GetLastError() == 0) /* XP */ ||
- broken(GetLastError() == 0xdeadbeef), "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ broken(GetLastError() == 0xdeadbeef), "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
while (PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) DispatchMessageA(&msg);
ok_sequence(WmSetFocus_3, "SetFocus on a child window", TRUE);
ok(old_focus == 0, "expected old focus 0, got %p\n", old_focus);
@@ -17960,7 +17961,7 @@ static void test_SetFocus(void)
SetLastError(0xdeadbeef);
old_active = SetActiveWindow(child);
- ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError());
+ ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %ld\n", GetLastError());
while (PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) DispatchMessageA(&msg);
ok_sequence(WmEmptySeq, "SetActiveWindow on a child window", FALSE);
ok(old_active == parent, "expected old active %p, got %p\n", parent, old_active);
@@ -17973,7 +17974,7 @@ static void test_SetFocus(void)
DestroyWindow(parent);
ret = PostMessageA(wnd_event.hwnd, WM_QUIT, 0, 0);
- ok(ret, "PostMessage(WM_QUIT) error %d\n", GetLastError());
+ ok(ret, "PostMessage(WM_QUIT) error %ld\n", GetLastError());
ret = WaitForSingleObject(hthread, INFINITE);
ok(ret == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
CloseHandle(hthread);
@@ -18067,12 +18068,12 @@ static void test_layered_window(void)
size.cx = size.cy = 250;
ret = pUpdateLayeredWindow( hwnd, 0, &pos, &size, hdc, &src, 0, NULL, ULW_OPAQUE );
ok( !ret, "UpdateLayeredWindow should fail on non-layered window\n" );
- ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
SetWindowLongA( hwnd, GWL_EXSTYLE, GetWindowLongA(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED );
ok_sequence( WmSetLayeredStyle, "WmSetLayeredStyle", FALSE );
ret = pUpdateLayeredWindow( hwnd, 0, &pos, &size, hdc, &src, 0, NULL, ULW_OPAQUE );
- ok( ret, "UpdateLayeredWindow failed err %u\n", GetLastError() );
+ ok( ret, "UpdateLayeredWindow failed err %lu\n", GetLastError() );
ok_sequence( WmLayeredWinEmptySeq, "UpdateLayeredWindow", FALSE );
GetWindowRect( hwnd, &rect );
ok( rect.left == 300 && rect.top == 300 && rect.right == 550 && rect.bottom == 550,
@@ -18084,7 +18085,7 @@ static void test_layered_window(void)
size.cx = 150;
pos.y = 200;
ret = pUpdateLayeredWindow( hwnd, 0, &pos, &size, hdc, &src, 0, NULL, ULW_OPAQUE );
- ok( ret, "UpdateLayeredWindow failed err %u\n", GetLastError() );
+ ok( ret, "UpdateLayeredWindow failed err %lu\n", GetLastError() );
ok_sequence( WmLayeredWinEmptySeq, "UpdateLayeredWindow", FALSE );
GetWindowRect( hwnd, &rect );
ok( rect.left == 300 && rect.top == 200 && rect.right == 450 && rect.bottom == 450,
@@ -18100,7 +18101,7 @@ static void test_layered_window(void)
size.cx = 200;
pos.x = 200;
ret = pUpdateLayeredWindow( hwnd, 0, &pos, &size, hdc, &src, 0, NULL, ULW_OPAQUE );
- ok( ret, "UpdateLayeredWindow failed err %u\n", GetLastError() );
+ ok( ret, "UpdateLayeredWindow failed err %lu\n", GetLastError() );
ok_sequence( WmLayeredWinEmptySeq, "UpdateLayeredWindow", FALSE );
GetWindowRect( hwnd, &rect );
ok( rect.left == 200 && rect.top == 200 && rect.right == 400 && rect.bottom == 450,
@@ -18114,12 +18115,12 @@ static void test_layered_window(void)
ret = pUpdateLayeredWindow( hwnd, 0, &pos, &size, hdc, &src, 0, NULL, ULW_OPAQUE );
ok( !ret, "UpdateLayeredWindow should fail on non-layered window\n" );
ok( GetLastError() == ERROR_INVALID_PARAMETER || broken(GetLastError() == ERROR_MR_MID_NOT_FOUND) ||
- broken(GetLastError() == ERROR_GEN_FAILURE) /* win7 */, "wrong error %u\n", GetLastError() );
+ broken(GetLastError() == ERROR_GEN_FAILURE) /* win7 */, "wrong error %lu\n", GetLastError() );
size.cx = 1;
size.cy = -1;
ret = pUpdateLayeredWindow( hwnd, 0, &pos, &size, hdc, &src, 0, NULL, ULW_OPAQUE );
ok( !ret, "UpdateLayeredWindow should fail on non-layered window\n" );
- ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
SetWindowLongA( hwnd, GWL_EXSTYLE, GetWindowLongA(hwnd, GWL_EXSTYLE) & ~WS_EX_LAYERED );
ok_sequence( WmSetLayeredStyle, "WmSetLayeredStyle", FALSE );
@@ -18189,10 +18190,10 @@ static LRESULT WINAPI cancel_popup_proc(HWND hwnd, UINT message, WPARAM wParam,
case WM_INITMENU:
case WM_INITMENUPOPUP:
case WM_UNINITMENUPOPUP:
- ok((HMENU)wParam == hpopupmenu, "expected %p, got %lx\n", hpopupmenu, wParam);
+ ok((HMENU)wParam == hpopupmenu, "expected %p, got %Ix\n", hpopupmenu, wParam);
break;
case WM_CAPTURECHANGED:
- todo_wine ok(!lParam || (HWND)lParam == hwnd, "lost capture to %lx\n", lParam);
+ todo_wine ok(!lParam || (HWND)lParam == hwnd, "lost capture to %Ix\n", lParam);
break;
}
@@ -18221,12 +18222,12 @@ static void test_TrackPopupMenu(void)
hwnd = CreateWindowExA(0, "TestWindowClass", NULL, 0,
0, 0, 1, 1, 0,
NULL, NULL, 0);
- ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError());
+ ok(hwnd != NULL, "CreateWindowEx failed with error %ld\n", GetLastError());
SetWindowLongPtrA( hwnd, GWLP_WNDPROC, (LONG_PTR)cancel_popup_proc);
hpopupmenu = CreatePopupMenu();
- ok(hpopupmenu != NULL, "CreateMenu failed with error %d\n", GetLastError());
+ ok(hpopupmenu != NULL, "CreateMenu failed with error %ld\n", GetLastError());
AppendMenuA(hpopupmenu, MF_STRING, 100, "item 1");
AppendMenuA(hpopupmenu, MF_STRING, 100, "item 2");
@@ -18235,13 +18236,13 @@ static void test_TrackPopupMenu(void)
flush_sequence();
ret = TrackPopupMenu(hpopupmenu, 0, 100,100, 0, hwnd, NULL);
ok_sequence(WmTrackPopupMenu, "TrackPopupMenu", TRUE);
- ok(ret == 1, "TrackPopupMenu failed with error %i\n", GetLastError());
+ ok(ret == 1, "TrackPopupMenu failed with error %li\n", GetLastError());
/* Test popup closing with an ESC-press */
flush_events();
PostMessageW(hwnd, WM_KEYDOWN, VK_ESCAPE, 0);
ret = TrackPopupMenu(hpopupmenu, 0, 100,100, 0, hwnd, NULL);
- ok(ret == 1, "TrackPopupMenu failed with error %i\n", GetLastError());
+ ok(ret == 1, "TrackPopupMenu failed with error %li\n", GetLastError());
PostQuitMessage(0);
flush_sequence();
while ( PeekMessageA(&msg, 0, 0, 0, PM_REMOVE) )
@@ -18270,7 +18271,7 @@ static void test_TrackPopupMenu(void)
SetTimer( hwnd, TIMER_ID, 500, NULL );
ret = TrackPopupMenu( hpopupmenu, 0, 100,100, 0, hwnd, NULL );
ok_sequence( WmTrackPopupMenuMinimizeWindow, "TrackPopupMenuMinimizeWindow", TRUE );
- ok( ret == 1, "TrackPopupMenu failed with error %i\n", GetLastError() );
+ ok( ret == 1, "TrackPopupMenu failed with error %li\n", GetLastError() );
KillTimer( hwnd, TIMER_ID );
ShowWindow( hwnd, SW_RESTORE );
@@ -18282,7 +18283,7 @@ static void test_TrackPopupMenu(void)
flush_sequence();
ret = TrackPopupMenu(hpopupmenu, 0, 100,100, 0, hwnd, NULL);
ok_sequence(WmTrackPopupMenuCapture, "TrackPopupMenuCapture", TRUE);
- ok(ret == 1, "TrackPopupMenuCapture failed with error %i\n", GetLastError());
+ ok(ret == 1, "TrackPopupMenuCapture failed with error %li\n", GetLastError());
DestroyMenu(hpopupmenu);
DestroyWindow(hwnd);
@@ -18296,12 +18297,12 @@ static void test_TrackPopupMenuEmpty(void)
hwnd = CreateWindowExA(0, "TestWindowClass", NULL, 0,
0, 0, 1, 1, 0,
NULL, NULL, 0);
- ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError());
+ ok(hwnd != NULL, "CreateWindowEx failed with error %ld\n", GetLastError());
SetWindowLongPtrA( hwnd, GWLP_WNDPROC, (LONG_PTR)cancel_popup_proc);
hpopupmenu = CreatePopupMenu();
- ok(hpopupmenu != NULL, "CreateMenu failed with error %d\n", GetLastError());
+ ok(hpopupmenu != NULL, "CreateMenu failed with error %ld\n", GetLastError());
flush_events();
flush_sequence();
@@ -18394,14 +18395,14 @@ static void test_SendMessage_other_thread(int thread_n)
ok(wnd_event.hwnd != 0, "CreateWindowEx failed\n");
hthread = CreateThread(NULL, 0, thread_n == 1 ? SendMessage_thread_1 : SendMessage_thread_2, &wnd_event, 0, &tid);
- ok(hthread != NULL, "CreateThread failed, error %d\n", GetLastError());
+ ok(hthread != NULL, "CreateThread failed, error %ld\n", GetLastError());
CloseHandle(hthread);
flush_events();
flush_sequence();
ret = GetQueueStatus(QS_SENDMESSAGE);
- ok(ret == 0, "wrong status %08x\n", ret);
+ ok(ret == 0, "wrong status %08lx\n", ret);
SetEvent(wnd_event.start_event);
@@ -18414,7 +18415,7 @@ static void test_SendMessage_other_thread(int thread_n)
}
ret = GetQueueStatus(QS_SENDMESSAGE|QS_POSTMESSAGE);
- ok(ret == MAKELONG(QS_POSTMESSAGE, QS_SENDMESSAGE|QS_POSTMESSAGE), "wrong status %08x\n", ret);
+ ok(ret == MAKELONG(QS_POSTMESSAGE, QS_SENDMESSAGE|QS_POSTMESSAGE), "wrong status %08lx\n", ret);
trace("main: call GetMessage\n");
GetMessageA(&msg, 0, 0, 0);
@@ -18424,7 +18425,7 @@ static void test_SendMessage_other_thread(int thread_n)
ret = WaitForSingleObject(wnd_event.stop_event, 100);
todo_wine_if (thread_n == 2)
- ok(ret == WAIT_OBJECT_0, "WaitForSingleObject failed, ret:%x\n", ret);
+ ok(ret == WAIT_OBJECT_0, "WaitForSingleObject failed, ret:%lx\n", ret);
/* intentionally yield */
MsgWaitForMultipleObjects(0, NULL, FALSE, 100, qs_all_input);
@@ -18434,7 +18435,7 @@ static void test_SendMessage_other_thread(int thread_n)
ok_sequence(send_message_2, "SendMessage from other thread 2", FALSE);
ret = GetQueueStatus(QS_SENDMESSAGE|QS_POSTMESSAGE);
- ok(ret == MAKELONG(QS_SENDMESSAGE, QS_SENDMESSAGE|QS_POSTMESSAGE), "wrong status %08x\n", ret);
+ ok(ret == MAKELONG(QS_SENDMESSAGE, QS_SENDMESSAGE|QS_POSTMESSAGE), "wrong status %08lx\n", ret);
trace("main: call PeekMessage\n");
ok(PeekMessageA(&msg, 0, 0, 0, PM_REMOVE), "PeekMessage should not fail\n");
@@ -18448,14 +18449,14 @@ static void test_SendMessage_other_thread(int thread_n)
ret = GetQueueStatus(QS_SENDMESSAGE|QS_POSTMESSAGE);
/* FIXME: remove once Wine is fixed */
todo_wine_if (thread_n == 2)
- ok(ret == 0, "wrong status %08x\n", ret);
+ ok(ret == 0, "wrong status %08lx\n", ret);
trace("main: call PeekMessage\n");
ok(!PeekMessageA(&msg, 0, 0, 0, PM_REMOVE), "PeekMessage should fail\n");
ok_sequence(WmEmptySeq, "SendMessage from other thread 5", thread_n == 2);
ret = GetQueueStatus(QS_SENDMESSAGE|QS_POSTMESSAGE);
- ok(ret == 0, "wrong status %08x\n", ret);
+ ok(ret == 0, "wrong status %08lx\n", ret);
trace("main: call DestroyWindow\n");
DestroyWindow(msg.hwnd);
@@ -18475,34 +18476,34 @@ static LRESULT CALLBACK insendmessage_wnd_proc( HWND hwnd, UINT msg, WPARAM wp,
switch (msg)
{
case WM_USER:
- ok( flags == ISMEX_SEND, "wrong flags %x\n", flags );
+ ok( flags == ISMEX_SEND, "wrong flags %lx\n", flags );
ok( InSendMessage(), "InSendMessage returned false\n" );
ret = ReplyMessage( msg );
- ok( ret, "ReplyMessage failed err %u\n", GetLastError() );
+ ok( ret, "ReplyMessage failed err %lu\n", GetLastError() );
flags = InSendMessageEx( NULL );
- ok( flags == (ISMEX_SEND | ISMEX_REPLIED), "wrong flags %x\n", flags );
+ ok( flags == (ISMEX_SEND | ISMEX_REPLIED), "wrong flags %lx\n", flags );
ok( InSendMessage(), "InSendMessage returned false\n" );
break;
case WM_USER + 1:
- ok( flags == ISMEX_NOTIFY, "wrong flags %x\n", flags );
+ ok( flags == ISMEX_NOTIFY, "wrong flags %lx\n", flags );
ok( InSendMessage(), "InSendMessage returned false\n" );
ret = ReplyMessage( msg );
- ok( ret, "ReplyMessage failed err %u\n", GetLastError() );
+ ok( ret, "ReplyMessage failed err %lu\n", GetLastError() );
flags = InSendMessageEx( NULL );
- ok( flags == ISMEX_NOTIFY, "wrong flags %x\n", flags );
+ ok( flags == ISMEX_NOTIFY, "wrong flags %lx\n", flags );
ok( InSendMessage(), "InSendMessage returned false\n" );
break;
case WM_USER + 2:
- ok( flags == ISMEX_CALLBACK, "wrong flags %x\n", flags );
+ ok( flags == ISMEX_CALLBACK, "wrong flags %lx\n", flags );
ok( InSendMessage(), "InSendMessage returned false\n" );
ret = ReplyMessage( msg );
- ok( ret, "ReplyMessage failed err %u\n", GetLastError() );
+ ok( ret, "ReplyMessage failed err %lu\n", GetLastError() );
flags = InSendMessageEx( NULL );
- ok( flags == (ISMEX_CALLBACK | ISMEX_REPLIED) || flags == ISMEX_SEND, "wrong flags %x\n", flags );
+ ok( flags == (ISMEX_CALLBACK | ISMEX_REPLIED) || flags == ISMEX_SEND, "wrong flags %lx\n", flags );
ok( InSendMessage(), "InSendMessage returned false\n" );
break;
case WM_USER + 3:
- ok( flags == ISMEX_NOSEND, "wrong flags %x\n", flags );
+ ok( flags == ISMEX_NOSEND, "wrong flags %lx\n", flags );
ok( !InSendMessage(), "InSendMessage returned true\n" );
ret = ReplyMessage( msg );
ok( !ret, "ReplyMessage succeeded\n" );
@@ -18515,7 +18516,7 @@ static LRESULT CALLBACK insendmessage_wnd_proc( HWND hwnd, UINT msg, WPARAM wp,
static void CALLBACK msg_callback( HWND hwnd, UINT msg, ULONG_PTR arg, LRESULT result )
{
ok( msg == WM_USER + 2, "wrong msg %x\n", msg );
- ok( result == WM_USER + 2, "wrong result %lx\n", result );
+ ok( result == WM_USER + 2, "wrong result %Ix\n", result );
}
static DWORD WINAPI send_message_thread( void *arg )
@@ -18545,10 +18546,10 @@ static void test_InSendMessage(void)
RegisterClassA(&cls);
win = CreateWindowA( "InSendMessage_test", NULL, 0, 0, 0, 0, 0, NULL, 0, NULL, 0 );
- ok( win != NULL, "CreateWindow failed: %d\n", GetLastError() );
+ ok( win != NULL, "CreateWindow failed: %ld\n", GetLastError() );
thread = CreateThread( NULL, 0, send_message_thread, win, 0, &tid );
- ok( thread != NULL, "CreateThread failed: %d\n", GetLastError() );
+ ok( thread != NULL, "CreateThread failed: %ld\n", GetLastError() );
while (GetMessageA(&msg, NULL, 0, 0)) DispatchMessageA( &msg );
@@ -18696,12 +18697,12 @@ static void test_invalid_window(void)
SetLastError(0xdeadbeef);
ret = GetMessageA(&msg, (HWND)0xdeadbeef, 0, 0);
ok(ret == -1, "wrong ret %d\n", ret);
- ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error %u\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = PeekMessageA(&msg, (HWND)0xdeadbeef, 0, 0, PM_REMOVE);
ok(!ret, "wrong ret %d\n", ret);
- ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error %u\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error %lu\n", GetLastError());
}
static void test_button_style(void)
@@ -18718,17 +18719,17 @@ static void test_button_style(void)
type = GetWindowLongW(button, GWL_STYLE) & BS_TYPEMASK;
expected_type = (i == BS_USERBUTTON ? BS_PUSHBUTTON : i);
- ok(type == expected_type, "Expected type %#x, got %#x.\n", expected_type, type);
+ ok(type == expected_type, "Expected type %#lx, got %#lx.\n", expected_type, type);
for (j = BS_PUSHBUTTON; j <= BS_DEFCOMMANDLINK; ++j)
{
ret = SendMessageA(button, BM_SETSTYLE, j, FALSE);
- ok(ret == 0, "Expected %#x, got %#lx.\n", 0, ret);
+ ok(ret == 0, "Expected %#x, got %#Ix.\n", 0, ret);
type = GetWindowLongW(button, GWL_STYLE) & BS_TYPEMASK;
expected_type = j;
- ok(type == expected_type, "Original type %#x, expected new type %#x, got %#x.\n", i,
+ ok(type == expected_type, "Original type %#lx, expected new type %#lx, got %#lx.\n", i,
expected_type, type);
}
DestroyWindow(button);
@@ -18869,12 +18870,12 @@ START_TEST(msg)
if (pUnhookWinEvent && hEvent_hook)
{
ret = pUnhookWinEvent(hEvent_hook);
- ok( ret, "UnhookWinEvent error %d\n", GetLastError());
+ ok( ret, "UnhookWinEvent error %ld\n", GetLastError());
SetLastError(0xdeadbeef);
ok(!pUnhookWinEvent(hEvent_hook), "UnhookWinEvent succeeded\n");
ok(GetLastError() == ERROR_INVALID_HANDLE || /* Win2k */
GetLastError() == 0xdeadbeef, /* Win9x */
- "unexpected error %d\n", GetLastError());
+ "unexpected error %ld\n", GetLastError());
}
DeleteCriticalSection( &sequence_cs );
}
1
0
[PATCH] dlls/user32/tests: enable compilation with long types (monitor.c)
by Eric Pouech March 12, 2022
by Eric Pouech March 12, 2022
March 12, 2022
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/user32/tests/monitor.c | 435 ++++++++++++++++++++++---------------------
1 file changed, 218 insertions(+), 217 deletions(-)
diff --git a/dlls/user32/tests/monitor.c b/dlls/user32/tests/monitor.c
index 5e14c536a76..b7e2cb2e59f 100644
--- a/dlls/user32/tests/monitor.c
+++ b/dlls/user32/tests/monitor.c
@@ -18,6 +18,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#undef WINE_NO_LONG_TYPES /* temporary for migration */
#include "ntstatus.h"
#define WIN32_NO_STATUS
@@ -139,7 +140,7 @@ static void test_enumdisplaydevices_adapter(int index, const DISPLAY_DEVICEA *de
{
/* Test creating DC */
hdc = CreateDCA(device->DeviceName, NULL, NULL, NULL);
- ok(hdc != NULL, "#%d: failed to CreateDC(\"%s\") err=%d\n", index, device->DeviceName, GetLastError());
+ ok(hdc != NULL, "#%d: failed to CreateDC(\"%s\") err=%ld\n", index, device->DeviceName, GetLastError());
DeleteDC(hdc);
}
@@ -181,7 +182,7 @@ static void test_enumdisplaydevices_monitor(int monitor_index, const char *adapt
/* StateFlags */
ok(device->StateFlags <= (DISPLAY_DEVICE_ATTACHED | DISPLAY_DEVICE_ACTIVE),
- "#%d wrong state %#x\n", monitor_index, device->StateFlags);
+ "#%d wrong state %#lx\n", monitor_index, device->StateFlags);
/* DeviceID */
CharLowerA(device->DeviceID);
@@ -294,27 +295,27 @@ static void _expect_dm(INT line, const DEVMODEA *expected, const CHAR *device, D
dm.dmSize = sizeof(dm);
SetLastError(0xdeadbeef);
ret = EnumDisplaySettingsA(device, ENUM_CURRENT_SETTINGS, &dm);
- ok_(__FILE__, line)(ret, "Device %s test %d EnumDisplaySettingsA failed, error %#x\n", device, test, GetLastError());
+ ok_(__FILE__, line)(ret, "Device %s test %ld EnumDisplaySettingsA failed, error %#lx\n", device, test, GetLastError());
ok_(__FILE__, line)((dm.dmFields & expected->dmFields) == expected->dmFields,
- "Device %s test %d expect dmFields to contain %#x, got %#x\n", device, test, expected->dmFields, dm.dmFields);
+ "Device %s test %ld expect dmFields to contain %#lx, got %#lx\n", device, test, expected->dmFields, dm.dmFields);
ok_(__FILE__, line)(!(expected->dmFields & DM_BITSPERPEL) || dm.dmBitsPerPel == expected->dmBitsPerPel,
- "Device %s test %d expect dmBitsPerPel %u, got %u\n", device, test, expected->dmBitsPerPel, dm.dmBitsPerPel);
+ "Device %s test %ld expect dmBitsPerPel %lu, got %lu\n", device, test, expected->dmBitsPerPel, dm.dmBitsPerPel);
ok_(__FILE__, line)(!(expected->dmFields & DM_PELSWIDTH) || dm.dmPelsWidth == expected->dmPelsWidth,
- "Device %s test %d expect dmPelsWidth %u, got %u\n", device, test, expected->dmPelsWidth, dm.dmPelsWidth);
+ "Device %s test %ld expect dmPelsWidth %lu, got %lu\n", device, test, expected->dmPelsWidth, dm.dmPelsWidth);
ok_(__FILE__, line)(!(expected->dmFields & DM_PELSHEIGHT) || dm.dmPelsHeight == expected->dmPelsHeight,
- "Device %s test %d expect dmPelsHeight %u, got %u\n", device, test, expected->dmPelsHeight, dm.dmPelsHeight);
+ "Device %s test %ld expect dmPelsHeight %lu, got %lu\n", device, test, expected->dmPelsHeight, dm.dmPelsHeight);
ok_(__FILE__, line)(!(expected->dmFields & DM_POSITION) || dm.dmPosition.x == expected->dmPosition.x,
- "Device %s test %d expect dmPosition.x %d, got %d\n", device, test, expected->dmPosition.x, dm.dmPosition.x);
+ "Device %s test %ld expect dmPosition.x %ld, got %ld\n", device, test, expected->dmPosition.x, dm.dmPosition.x);
ok_(__FILE__, line)(!(expected->dmFields & DM_POSITION) || dm.dmPosition.y == expected->dmPosition.y,
- "Device %s test %d expect dmPosition.y %d, got %d\n", device, test, expected->dmPosition.y, dm.dmPosition.y);
+ "Device %s test %ld expect dmPosition.y %ld, got %ld\n", device, test, expected->dmPosition.y, dm.dmPosition.y);
ok_(__FILE__, line)(!(expected->dmFields & DM_DISPLAYFREQUENCY) ||
dm.dmDisplayFrequency == expected->dmDisplayFrequency,
- "Device %s test %d expect dmDisplayFrequency %u, got %u\n", device, test, expected->dmDisplayFrequency,
+ "Device %s test %ld expect dmDisplayFrequency %lu, got %lu\n", device, test, expected->dmDisplayFrequency,
dm.dmDisplayFrequency);
ok_(__FILE__, line)(!(expected->dmFields & DM_DISPLAYORIENTATION) ||
dm.dmDisplayOrientation == expected->dmDisplayOrientation,
- "Device %s test %d expect dmDisplayOrientation %d, got %d\n", device, test, expected->dmDisplayOrientation,
+ "Device %s test %ld expect dmDisplayOrientation %ld, got %ld\n", device, test, expected->dmDisplayOrientation,
dm.dmDisplayOrientation);
}
@@ -340,48 +341,48 @@ static void test_ChangeDisplaySettingsEx(void)
memset(&dm, 0, sizeof(dm));
dm.dmSize = sizeof(dm);
res = EnumDisplaySettingsA(NULL, ENUM_CURRENT_SETTINGS, &dm);
- ok(res, "EnumDisplaySettingsA failed, error %#x\n", GetLastError());
+ ok(res, "EnumDisplaySettingsA failed, error %#lx\n", GetLastError());
res = ChangeDisplaySettingsExA("invalid", &dm, NULL, CDS_TEST, NULL);
- ok(res == DISP_CHANGE_BADPARAM, "ChangeDisplaySettingsA returned unexpected %d\n", res);
+ ok(res == DISP_CHANGE_BADPARAM, "ChangeDisplaySettingsA returned unexpected %ld\n", res);
res = ChangeDisplaySettingsExA("\\\\.\\DISPLAY0", &dm, NULL, CDS_TEST, NULL);
- ok(res == DISP_CHANGE_BADPARAM, "ChangeDisplaySettingsA returned unexpected %d\n", res);
+ ok(res == DISP_CHANGE_BADPARAM, "ChangeDisplaySettingsA returned unexpected %ld\n", res);
res = ChangeDisplaySettingsExA("\\\\.\\DISPLAY1\\Monitor0", &dm, NULL, CDS_TEST, NULL);
- ok(res == DISP_CHANGE_BADPARAM, "ChangeDisplaySettingsA returned unexpected %d\n", res);
+ ok(res == DISP_CHANGE_BADPARAM, "ChangeDisplaySettingsA returned unexpected %ld\n", res);
/* Test dmDriverExtra */
memset(&dm, 0, sizeof(dm));
dm.dmSize = sizeof(dm);
res = EnumDisplaySettingsA(NULL, ENUM_CURRENT_SETTINGS, &dm);
- ok(res, "EnumDisplaySettingsA failed, error %#x\n", GetLastError());
+ ok(res, "EnumDisplaySettingsA failed, error %#lx\n", GetLastError());
memset(&dmW, 0, sizeof(dmW));
dmW.dmSize = sizeof(dmW);
res = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &dmW);
- ok(res, "EnumDisplaySettingsW failed, error %#x\n", GetLastError());
+ ok(res, "EnumDisplaySettingsW failed, error %#lx\n", GetLastError());
/* ChangeDisplaySettingsA/W reset dmDriverExtra to 0 */
dm.dmDriverExtra = 1;
res = ChangeDisplaySettingsA(&dm, CDS_TEST);
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsA returned unexpected %d\n", res);
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsA returned unexpected %ld\n", res);
ok(dm.dmDriverExtra == 0, "ChangeDisplaySettingsA didn't reset dmDriverExtra to 0\n");
dmW.dmDriverExtra = 1;
res = ChangeDisplaySettingsW(&dmW, CDS_TEST);
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW returned unexpected %d\n", res);
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW returned unexpected %ld\n", res);
ok(dmW.dmDriverExtra == 0, "ChangeDisplaySettingsW didn't reset dmDriverExtra to 0\n");
/* ChangeDisplaySettingsExA/W do not modify dmDriverExtra */
dm.dmDriverExtra = 1;
res = ChangeDisplaySettingsExA(NULL, &dm, NULL, CDS_TEST, NULL);
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA returned unexpected %d\n", res);
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA returned unexpected %ld\n", res);
ok(dm.dmDriverExtra == 1, "ChangeDisplaySettingsExA shouldn't change dmDriverExtra\n");
dmW.dmDriverExtra = 1;
res = ChangeDisplaySettingsExW(NULL, &dmW, NULL, CDS_TEST, NULL);
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW returned unexpected %d\n", res);
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW returned unexpected %ld\n", res);
ok(dmW.dmDriverExtra == 1, "ChangeDisplaySettingsExW shouldn't change dmDriverExtra\n");
/* Test dmSize */
@@ -389,37 +390,37 @@ static void test_ChangeDisplaySettingsEx(void)
memset(&dm, 0, sizeof(dm));
dm.dmSize = sizeof(dm);
res = EnumDisplaySettingsA(NULL, ENUM_CURRENT_SETTINGS, &dm);
- ok(res, "EnumDisplaySettingsA failed, error %#x\n", GetLastError());
+ ok(res, "EnumDisplaySettingsA failed, error %#lx\n", GetLastError());
dm.dmSize = 0;
res = ChangeDisplaySettingsA(&dm, CDS_TEST);
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsA returned unexpected %d\n", res);
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsA returned unexpected %ld\n", res);
dm.dmSize = 0;
res = ChangeDisplaySettingsExA(NULL, &dm, NULL, CDS_TEST, NULL);
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA returned unexpected %d\n", res);
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA returned unexpected %ld\n", res);
/* dmSize for ChangeDisplaySettingsW/ExW needs to be at least FIELD_OFFSET(DEVMODEW, dmICMMethod) */
memset(&dmW, 0, sizeof(dmW));
dmW.dmSize = sizeof(dmW);
res = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &dmW);
- ok(res, "EnumDisplaySettingsW failed, error %#x\n", GetLastError());
+ ok(res, "EnumDisplaySettingsW failed, error %#lx\n", GetLastError());
dmW.dmSize = FIELD_OFFSET(DEVMODEW, dmICMMethod) - 1;
res = ChangeDisplaySettingsW(&dmW, CDS_TEST);
- ok(res == DISP_CHANGE_BADMODE, "ChangeDisplaySettingsW returned %d, expect DISP_CHANGE_BADMODE\n", res);
+ ok(res == DISP_CHANGE_BADMODE, "ChangeDisplaySettingsW returned %ld, expect DISP_CHANGE_BADMODE\n", res);
dmW.dmSize = FIELD_OFFSET(DEVMODEW, dmICMMethod) - 1;
res = ChangeDisplaySettingsExW(NULL, &dmW, NULL, CDS_TEST, NULL);
- ok(res == DISP_CHANGE_BADMODE, "ChangeDisplaySettingsExW returned %d, expect DISP_CHANGE_BADMODE\n", res);
+ ok(res == DISP_CHANGE_BADMODE, "ChangeDisplaySettingsExW returned %ld, expect DISP_CHANGE_BADMODE\n", res);
dmW.dmSize = FIELD_OFFSET(DEVMODEW, dmICMMethod);
res = ChangeDisplaySettingsW(&dmW, CDS_TEST);
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW returned unexpected %d\n", res);
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW returned unexpected %ld\n", res);
dmW.dmSize = FIELD_OFFSET(DEVMODEW, dmICMMethod);
res = ChangeDisplaySettingsExW(NULL, &dmW, NULL, CDS_TEST, NULL);
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW returned unexpected %d\n", res);
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW returned unexpected %ld\n", res);
/* Test clip rectangle after resolution changes */
/* GetClipCursor always returns result in physical pixels but GetSystemMetrics(SM_CX/CYVIRTUALSCREEN) are not.
@@ -441,7 +442,7 @@ static void test_ChangeDisplaySettingsEx(void)
(res == DISP_CHANGE_SUCCESSFUL || res == DISP_CHANGE_RESTART) :
(res == DISP_CHANGE_SUCCESSFUL || res == DISP_CHANGE_RESTART ||
res == DISP_CHANGE_BADMODE || res == DISP_CHANGE_BADPARAM),
- "Unexpected ChangeDisplaySettingsExA() return code for vid_modes_test[%d]: %d\n", i, res);
+ "Unexpected ChangeDisplaySettingsExA() return code for vid_modes_test[%d]: %ld\n", i, res);
if (res == DISP_CHANGE_SUCCESSFUL)
{
@@ -485,7 +486,7 @@ static void test_ChangeDisplaySettingsEx(void)
if (pSetThreadDpiAwarenessContext && context)
pSetThreadDpiAwarenessContext(context);
res = ChangeDisplaySettingsExA(NULL, NULL, NULL, CDS_RESET, NULL);
- ok(res == DISP_CHANGE_SUCCESSFUL, "Failed to reset default resolution: %d\n", res);
+ ok(res == DISP_CHANGE_SUCCESSFUL, "Failed to reset default resolution: %ld\n", res);
/* Save the original mode for all devices so that they can be restored at the end of tests */
device_count = 0;
@@ -522,7 +523,7 @@ static void test_ChangeDisplaySettingsEx(void)
memset(&devices[device_count].original_mode, 0, sizeof(devices[device_count].original_mode));
devices[device_count].original_mode.dmSize = sizeof(devices[device_count].original_mode);
res = EnumDisplaySettingsA(dd.DeviceName, ENUM_CURRENT_SETTINGS, &devices[device_count].original_mode);
- ok(res, "EnumDisplaySettingsA %s failed, error %#x\n", dd.DeviceName, GetLastError());
+ ok(res, "EnumDisplaySettingsA %s failed, error %#lx\n", dd.DeviceName, GetLastError());
++device_count;
}
@@ -546,16 +547,16 @@ static void test_ChangeDisplaySettingsEx(void)
dm.dmFields = DM_POSITION | DM_PELSWIDTH | DM_PELSHEIGHT;
dm.dmPosition = devices[0].original_mode.dmPosition;
res = ChangeDisplaySettingsExA(devices[0].name, &dm, NULL, CDS_UPDATEREGISTRY | CDS_NORESET, NULL);
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %d\n", devices[0].name, res);
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %ld\n", devices[0].name, res);
res = ChangeDisplaySettingsExA(NULL, NULL, NULL, 0, NULL);
ok(res == DISP_CHANGE_SUCCESSFUL ||
broken(res == DISP_CHANGE_FAILED), /* win8 TestBot */
- "ChangeDisplaySettingsExA %s returned unexpected %d\n", devices[0].name, res);
+ "ChangeDisplaySettingsExA %s returned unexpected %ld\n", devices[0].name, res);
/* Check that the adapter is still attached */
dd.cb = sizeof(dd);
res = EnumDisplayDevicesA(NULL, devices[0].index, &dd, 0);
- ok(res, "EnumDisplayDevicesA %s failed, error %#x\n", devices[0].name, GetLastError());
+ ok(res, "EnumDisplayDevicesA %s failed, error %#lx\n", devices[0].name, GetLastError());
ok(dd.StateFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP, "Expect device %s still attached.\n", devices[0].name);
count = GetSystemMetrics(SM_CMONITORS);
@@ -567,11 +568,11 @@ static void test_ChangeDisplaySettingsEx(void)
ok(res == DISP_CHANGE_SUCCESSFUL ||
broken(res == DISP_CHANGE_BADPARAM) || /* win10 */
broken(res == DISP_CHANGE_FAILED), /* win8 TestBot */
- "ChangeDisplaySettingsExA %s returned unexpected %d\n", devices[0].name, res);
+ "ChangeDisplaySettingsExA %s returned unexpected %ld\n", devices[0].name, res);
res = ChangeDisplaySettingsExA(NULL, NULL, NULL, 0, NULL);
ok(res == DISP_CHANGE_SUCCESSFUL ||
broken(res == DISP_CHANGE_FAILED), /* win8 TestBot */
- "ChangeDisplaySettingsExA %s returned unexpected %d\n", devices[0].name, res);
+ "ChangeDisplaySettingsExA %s returned unexpected %ld\n", devices[0].name, res);
}
/* Test that only specifying DM_POSITION in dmFields is not enough to detach an adapter */
@@ -588,13 +589,13 @@ static void test_ChangeDisplaySettingsEx(void)
dm.dmFields = DM_POSITION;
dm.dmPosition = devices[1].original_mode.dmPosition;
res = ChangeDisplaySettingsExA(devices[1].name, &dm, NULL, CDS_UPDATEREGISTRY | CDS_NORESET, NULL);
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %d\n", devices[1].name, res);
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %ld\n", devices[1].name, res);
res = ChangeDisplaySettingsExA(devices[1].name, NULL, NULL, 0, NULL);
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %d\n", devices[1].name, res);
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %ld\n", devices[1].name, res);
dd.cb = sizeof(dd);
res = EnumDisplayDevicesA(NULL, devices[1].index, &dd, 0);
- ok(res, "EnumDisplayDevicesA %s failed, error %#x\n", devices[1].name, GetLastError());
+ ok(res, "EnumDisplayDevicesA %s failed, error %#lx\n", devices[1].name, GetLastError());
ok(dd.StateFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP, "Expect device %s still attached.\n", devices[1].name);
count = GetSystemMetrics(SM_CMONITORS);
@@ -618,7 +619,7 @@ static void test_ChangeDisplaySettingsEx(void)
}
if (dm.dmBitsPerPel != depths[test])
{
- skip("Depth %u is unsupported for %s.\n", depths[test], devices[device].name);
+ skip("Depth %lu is unsupported for %s.\n", depths[test], devices[device].name);
continue;
}
@@ -660,7 +661,7 @@ static void test_ChangeDisplaySettingsEx(void)
res = ChangeDisplaySettingsExA(devices[device].name, &dm3, NULL, CDS_RESET, NULL);
ok(res == DISP_CHANGE_SUCCESSFUL
|| broken(res == DISP_CHANGE_FAILED), /* Win8 TestBots */
- "ChangeDisplaySettingsExA %s returned unexpected %d.\n", devices[device].name, res);
+ "ChangeDisplaySettingsExA %s returned unexpected %ld.\n", devices[device].name, res);
if (res != DISP_CHANGE_SUCCESSFUL)
{
win_skip("Failed to change display mode for %s.\n", devices[device].name);
@@ -673,7 +674,7 @@ static void test_ChangeDisplaySettingsEx(void)
res = ChangeDisplaySettingsExA(devices[device].name, &dm2, NULL, CDS_UPDATEREGISTRY | CDS_NORESET, NULL);
ok(res == DISP_CHANGE_SUCCESSFUL
|| broken(res == DISP_CHANGE_BADFLAGS), /* Win10 32bit */
- "ChangeDisplaySettingsExA %s returned unexpected %d.\n", devices[device].name, res);
+ "ChangeDisplaySettingsExA %s returned unexpected %ld.\n", devices[device].name, res);
/* Change to a mode with depth set but with zero width and height */
memset(&dm, 0, sizeof(dm));
@@ -681,29 +682,29 @@ static void test_ChangeDisplaySettingsEx(void)
dm.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT;
dm.dmBitsPerPel = depths[test];
res = ChangeDisplaySettingsExA(devices[device].name, &dm, NULL, CDS_RESET, NULL);
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %d.\n",
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %ld.\n",
devices[device].name, res);
flush_events();
dd.cb = sizeof(dd);
res = EnumDisplayDevicesA(NULL, devices[device].index, &dd, 0);
- ok(res, "EnumDisplayDevicesA %s failed, error %#x.\n", devices[device].name, GetLastError());
+ ok(res, "EnumDisplayDevicesA %s failed, error %#lx.\n", devices[device].name, GetLastError());
ok(dd.StateFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP, "Expect %s attached.\n",
devices[device].name);
memset(&dm, 0, sizeof(dm));
dm.dmSize = sizeof(dm);
res = EnumDisplaySettingsA(devices[device].name, ENUM_CURRENT_SETTINGS, &dm);
- ok(res, "Device %s EnumDisplaySettingsA failed, error %#x.\n", devices[device].name, GetLastError());
- ok(dm.dmBitsPerPel == depths[test], "Device %s expect dmBitsPerPel %u, got %u.\n",
+ ok(res, "Device %s EnumDisplaySettingsA failed, error %#lx.\n", devices[device].name, GetLastError());
+ ok(dm.dmBitsPerPel == depths[test], "Device %s expect dmBitsPerPel %lu, got %lu.\n",
devices[device].name, depths[test], dm.dmBitsPerPel);
/* 2008 resets to the resolution in the registry. Newer versions of Windows doesn't
* change the current resolution */
ok(dm.dmPelsWidth == dm3.dmPelsWidth || broken(dm.dmPelsWidth == dm2.dmPelsWidth),
- "Device %s expect dmPelsWidth %u, got %u.\n",
+ "Device %s expect dmPelsWidth %lu, got %lu.\n",
devices[device].name, dm3.dmPelsWidth, dm.dmPelsWidth);
ok(dm.dmPelsHeight == dm3.dmPelsHeight || broken(dm.dmPelsHeight == dm2.dmPelsHeight),
- "Device %s expect dmPelsHeight %u, got %u.\n",
+ "Device %s expect dmPelsHeight %lu, got %lu.\n",
devices[device].name, dm3.dmPelsHeight, dm.dmPelsHeight);
}
}
@@ -718,13 +719,13 @@ static void test_ChangeDisplaySettingsEx(void)
dm.dmFields = DM_POSITION | DM_PELSWIDTH | DM_PELSHEIGHT;
dm.dmPosition = devices[device].original_mode.dmPosition;
res = ChangeDisplaySettingsExA(devices[device].name, &dm, NULL, CDS_UPDATEREGISTRY | CDS_NORESET, NULL);
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %d\n", devices[device].name, res);
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %ld\n", devices[device].name, res);
res = ChangeDisplaySettingsExA(devices[device].name, NULL, NULL, 0, NULL);
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %d\n", devices[device].name, res);
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %ld\n", devices[device].name, res);
dd.cb = sizeof(dd);
res = EnumDisplayDevicesA(NULL, devices[device].index, &dd, 0);
- ok(res, "EnumDisplayDevicesA %s failed, error %#x\n", devices[device].name, GetLastError());
+ ok(res, "EnumDisplayDevicesA %s failed, error %#lx\n", devices[device].name, GetLastError());
ok(!(dd.StateFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP), "Expect device %s detached.\n", devices[device].name);
count = GetSystemMetrics(SM_CMONITORS);
@@ -782,7 +783,7 @@ static void test_ChangeDisplaySettingsEx(void)
if (mode == 0 && device)
{
res = ChangeDisplaySettingsExA(devices[device].name, &dm, NULL, CDS_UPDATEREGISTRY | CDS_NORESET, NULL);
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s mode %d returned unexpected %d\n",
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s mode %d returned unexpected %ld\n",
devices[device].name, mode, res);
res = ChangeDisplaySettingsExA(NULL, NULL, NULL, 0, NULL);
}
@@ -793,7 +794,7 @@ static void test_ChangeDisplaySettingsEx(void)
ok(res == DISP_CHANGE_SUCCESSFUL ||
broken(res == DISP_CHANGE_FAILED), /* TestBots using VGA driver can't change to some modes */
- "ChangeDisplaySettingsExA %s mode %d returned unexpected %d\n", devices[device].name, mode, res);
+ "ChangeDisplaySettingsExA %s mode %d returned unexpected %ld\n", devices[device].name, mode, res);
if (res != DISP_CHANGE_SUCCESSFUL)
{
win_skip("Failed to change %s to mode %d.\n", devices[device].name, mode);
@@ -808,13 +809,13 @@ static void test_ChangeDisplaySettingsEx(void)
res = ChangeDisplaySettingsExA(devices[device].name, NULL, NULL, 0, NULL);
ok(res == DISP_CHANGE_SUCCESSFUL ||
broken(res == DISP_CHANGE_FAILED), /* win8 TestBot */
- "ChangeDisplaySettingsExA %s returned unexpected %d\n", devices[device].name, res);
+ "ChangeDisplaySettingsExA %s returned unexpected %ld\n", devices[device].name, res);
/* Place the next adapter to the right so that there is no position conflict */
memset(&dm, 0, sizeof(dm));
dm.dmSize = sizeof(dm);
res = EnumDisplaySettingsA(devices[device].name, ENUM_CURRENT_SETTINGS, &dm);
- ok(res, "EnumDisplaySettingsA %s failed, error %#x\n", devices[device].name, GetLastError());
+ ok(res, "EnumDisplaySettingsA %s failed, error %#lx\n", devices[device].name, GetLastError());
position.x = dm.dmPosition.x + dm.dmPelsWidth;
}
@@ -832,14 +833,14 @@ static void test_ChangeDisplaySettingsEx(void)
memset(&dm, 0, sizeof(dm));
dm.dmSize = sizeof(dm);
res = EnumDisplaySettingsA(devices[device - 1].name, ENUM_CURRENT_SETTINGS, &dm);
- ok(res, "EnumDisplaySettingsA %s failed, error %#x.\n", devices[device - 1].name, GetLastError());
+ ok(res, "EnumDisplaySettingsA %s failed, error %#lx.\n", devices[device - 1].name, GetLastError());
position.x = dm.dmPosition.x + dm.dmPelsWidth;
}
memset(&dm, 0, sizeof(dm));
dm.dmSize = sizeof(dm);
res = EnumDisplaySettingsA(devices[device].name, ENUM_CURRENT_SETTINGS, &dm);
- ok(res, "EnumDisplaySettingsA %s failed, error %#x\n", devices[device].name, GetLastError());
+ ok(res, "EnumDisplaySettingsA %s failed, error %#lx\n", devices[device].name, GetLastError());
dm3 = dm;
/* Find a mode that's different from the current mode */
@@ -862,11 +863,11 @@ static void test_ChangeDisplaySettingsEx(void)
res = ChangeDisplaySettingsExA(devices[device].name, &dm, NULL, CDS_UPDATEREGISTRY | CDS_NORESET, NULL);
ok(res == DISP_CHANGE_SUCCESSFUL ||
broken(res == DISP_CHANGE_FAILED), /* win8 TestBot */
- "ChangeDisplaySettingsExA %s returned unexpected %d\n", devices[device].name, res);
+ "ChangeDisplaySettingsExA %s returned unexpected %ld\n", devices[device].name, res);
res = ChangeDisplaySettingsExA(devices[device].name, NULL, NULL, 0, NULL);
ok(res == DISP_CHANGE_SUCCESSFUL ||
broken(res == DISP_CHANGE_FAILED), /* win8 TestBot */
- "ChangeDisplaySettingsExA %s returned unexpected %d\n", devices[device].name, res);
+ "ChangeDisplaySettingsExA %s returned unexpected %ld\n", devices[device].name, res);
if (res != DISP_CHANGE_SUCCESSFUL)
{
win_skip("Failed to change mode for %s.\n", devices[device].name);
@@ -884,37 +885,37 @@ static void test_ChangeDisplaySettingsEx(void)
dm.dmPelsWidth = dm3.dmPelsWidth;
dm.dmPelsHeight = dm3.dmPelsHeight;
res = ChangeDisplaySettingsExA(devices[device].name, &dm, NULL, CDS_UPDATEREGISTRY | CDS_NORESET, NULL);
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned %d.\n", devices[device].name, res);
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned %ld.\n", devices[device].name, res);
res = EnumDisplaySettingsA(devices[device].name, ENUM_REGISTRY_SETTINGS, &dm);
/* Win10 either returns failure here or retrieves outdated display settings until they're applied */
if (res)
{
- ok((dm.dmFields & registry_fields) == registry_fields, "Got unexpected dmFields %#x.\n", dm.dmFields);
- ok(dm.dmPosition.x == position.x, "Expected dmPosition.x %d, got %d.\n", position.x, dm.dmPosition.x);
- ok(dm.dmPosition.y == position.y, "Expected dmPosition.y %d, got %d.\n", position.y, dm.dmPosition.y);
+ ok((dm.dmFields & registry_fields) == registry_fields, "Got unexpected dmFields %#lx.\n", dm.dmFields);
+ ok(dm.dmPosition.x == position.x, "Expected dmPosition.x %ld, got %ld.\n", position.x, dm.dmPosition.x);
+ ok(dm.dmPosition.y == position.y, "Expected dmPosition.y %ld, got %ld.\n", position.y, dm.dmPosition.y);
ok(dm.dmPelsWidth == dm3.dmPelsWidth || broken(dm.dmPelsWidth == dm2.dmPelsWidth), /* Win10 */
- "Expected dmPelsWidth %u, got %u.\n", dm3.dmPelsWidth, dm.dmPelsWidth);
+ "Expected dmPelsWidth %lu, got %lu.\n", dm3.dmPelsWidth, dm.dmPelsWidth);
ok(dm.dmPelsHeight == dm3.dmPelsHeight || broken(dm.dmPelsHeight == dm2.dmPelsHeight), /* Win10 */
- "Expected dmPelsHeight %u, got %u.\n", dm3.dmPelsHeight, dm.dmPelsHeight);
+ "Expected dmPelsHeight %lu, got %lu.\n", dm3.dmPelsHeight, dm.dmPelsHeight);
ok(dm.dmBitsPerPel, "Expected dmBitsPerPel not zero.\n");
ok(dm.dmDisplayFrequency, "Expected dmDisplayFrequency not zero.\n");
}
else
{
- win_skip("EnumDisplaySettingsA %s failed, error %#x.\n", devices[device].name, GetLastError());
+ win_skip("EnumDisplaySettingsA %s failed, error %#lx.\n", devices[device].name, GetLastError());
}
res = ChangeDisplaySettingsExA(devices[device].name, NULL, NULL, 0, NULL);
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned %d.\n", devices[device].name, res);
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned %ld.\n", devices[device].name, res);
flush_events();
res = EnumDisplaySettingsA(devices[device].name, ENUM_REGISTRY_SETTINGS, &dm);
- ok(res, "EnumDisplaySettingsA %s failed, error %#x.\n", devices[device].name, GetLastError());
- ok((dm.dmFields & registry_fields) == registry_fields, "Got unexpected dmFields %#x.\n", dm.dmFields);
- ok(dm.dmPosition.x == position.x, "Expected dmPosition.x %d, got %d.\n", position.x, dm.dmPosition.x);
- ok(dm.dmPosition.y == position.y, "Expected dmPosition.y %d, got %d.\n", position.y, dm.dmPosition.y);
- ok(dm.dmPelsWidth == dm3.dmPelsWidth, "Expected dmPelsWidth %u, got %u.\n", dm3.dmPelsWidth, dm.dmPelsWidth);
- ok(dm.dmPelsHeight == dm3.dmPelsHeight, "Expected dmPelsHeight %u, got %u.\n", dm3.dmPelsHeight,
+ ok(res, "EnumDisplaySettingsA %s failed, error %#lx.\n", devices[device].name, GetLastError());
+ ok((dm.dmFields & registry_fields) == registry_fields, "Got unexpected dmFields %#lx.\n", dm.dmFields);
+ ok(dm.dmPosition.x == position.x, "Expected dmPosition.x %ld, got %ld.\n", position.x, dm.dmPosition.x);
+ ok(dm.dmPosition.y == position.y, "Expected dmPosition.y %ld, got %ld.\n", position.y, dm.dmPosition.y);
+ ok(dm.dmPelsWidth == dm3.dmPelsWidth, "Expected dmPelsWidth %lu, got %lu.\n", dm3.dmPelsWidth, dm.dmPelsWidth);
+ ok(dm.dmPelsHeight == dm3.dmPelsHeight, "Expected dmPelsHeight %lu, got %lu.\n", dm3.dmPelsHeight,
dm.dmPelsHeight);
ok(dm.dmBitsPerPel, "Expected dmBitsPerPel not zero.\n");
ok(dm.dmDisplayFrequency, "Expected dmDisplayFrequency not zero.\n");
@@ -931,16 +932,16 @@ static void test_ChangeDisplaySettingsEx(void)
memset(&dm, 0, sizeof(dm));
dm.dmSize = sizeof(dm);
res = EnumDisplaySettingsA(devices[device].name, ENUM_CURRENT_SETTINGS, &dm);
- ok(res, "EnumDisplaySettingsA %s failed, error %#x\n", devices[device].name, GetLastError());
+ ok(res, "EnumDisplaySettingsA %s failed, error %#lx\n", devices[device].name, GetLastError());
dm.dmPelsWidth = 0;
dm.dmPelsHeight = 0;
dm.dmFields = DM_POSITION | DM_PELSWIDTH | DM_PELSHEIGHT;
res = ChangeDisplaySettingsExA(devices[device].name, &dm, NULL, CDS_UPDATEREGISTRY | CDS_NORESET, NULL);
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %d\n", devices[device].name, res);
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %ld\n", devices[device].name, res);
}
res = ChangeDisplaySettingsExA(NULL, NULL, NULL, 0, NULL);
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA returned unexpected %d\n", res);
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA returned unexpected %ld\n", res);
}
if (device_count >= 2)
@@ -949,7 +950,7 @@ static void test_ChangeDisplaySettingsEx(void)
memset(&dm, 0, sizeof(dm));
dm.dmSize = sizeof(dm);
res = EnumDisplaySettingsA(devices[0].name, ENUM_CURRENT_SETTINGS, &dm);
- ok(res, "EnumDisplaySettingsA %s failed, error %#x\n", devices[0].name, GetLastError());
+ ok(res, "EnumDisplaySettingsA %s failed, error %#lx\n", devices[0].name, GetLastError());
if (res)
{
@@ -957,38 +958,38 @@ static void test_ChangeDisplaySettingsEx(void)
memset(&dm2, 0, sizeof(dm2));
dm2.dmSize = sizeof(dm2);
res = EnumDisplaySettingsA(devices[1].name, ENUM_CURRENT_SETTINGS, &dm2);
- ok(res, "EnumDisplaySettingsA %s failed, error %#x\n", devices[1].name, GetLastError());
+ ok(res, "EnumDisplaySettingsA %s failed, error %#lx\n", devices[1].name, GetLastError());
}
if (res)
{
/* The secondary adapter should be to the right of the primary adapter */
ok(dm2.dmPosition.x == dm.dmPosition.x + dm.dmPelsWidth,
- "Expected dm2.dmPosition.x %d, got %d.\n", dm.dmPosition.x + dm.dmPelsWidth,
+ "Expected dm2.dmPosition.x %ld, got %ld.\n", dm.dmPosition.x + dm.dmPelsWidth,
dm2.dmPosition.x);
- ok(dm2.dmPosition.y == dm.dmPosition.y, "Expected dm2.dmPosition.y %d, got %d.\n",
+ ok(dm2.dmPosition.y == dm.dmPosition.y, "Expected dm2.dmPosition.y %ld, got %ld.\n",
dm.dmPosition.y, dm2.dmPosition.y);
/* Test position conflict */
dm2.dmPosition.x = dm.dmPosition.x - dm2.dmPelsWidth + 1;
dm2.dmPosition.y = dm.dmPosition.y;
res = ChangeDisplaySettingsExA(devices[1].name, &dm2, NULL, CDS_RESET, NULL);
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %d\n", devices[1].name, res);
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %ld\n", devices[1].name, res);
/* Position is changed and automatically moved */
memset(&dm2, 0, sizeof(dm2));
dm2.dmSize = sizeof(dm2);
res = EnumDisplaySettingsA(devices[1].name, ENUM_CURRENT_SETTINGS, &dm2);
- ok(res, "EnumDisplaySettingsA %s failed, error %#x\n", devices[1].name, GetLastError());
+ ok(res, "EnumDisplaySettingsA %s failed, error %#lx\n", devices[1].name, GetLastError());
ok(dm2.dmPosition.x == dm.dmPosition.x - dm2.dmPelsWidth,
- "Expected dmPosition.x %d, got %d.\n", dm.dmPosition.x - dm2.dmPelsWidth,
+ "Expected dmPosition.x %ld, got %ld.\n", dm.dmPosition.x - dm2.dmPelsWidth,
dm2.dmPosition.x);
/* Test position with extra space. The extra space will be removed */
dm2.dmPosition.x = dm.dmPosition.x + dm.dmPelsWidth + 1;
dm2.dmPosition.y = dm.dmPosition.y;
res = ChangeDisplaySettingsExA(devices[1].name, &dm2, NULL, CDS_RESET, NULL);
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %d\n", devices[1].name, res);
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %ld\n", devices[1].name, res);
dm2.dmPosition.x = dm.dmPosition.x + dm.dmPelsWidth;
expect_dm(&dm2, devices[1].name, 0);
@@ -1041,11 +1042,11 @@ static void test_ChangeDisplaySettingsEx(void)
}
res = ChangeDisplaySettingsExA(devices[1].name, &dm2, NULL, CDS_RESET, NULL);
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s test %d returned unexpected %d\n",
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s test %d returned unexpected %ld\n",
devices[1].name, test, res);
if (res != DISP_CHANGE_SUCCESSFUL)
{
- win_skip("ChangeDisplaySettingsExA %s test %d returned unexpected %d.\n", devices[1].name, test, res);
+ win_skip("ChangeDisplaySettingsExA %s test %d returned unexpected %ld.\n", devices[1].name, test, res);
continue;
}
@@ -1067,14 +1068,14 @@ static void test_ChangeDisplaySettingsEx(void)
/* Change the primary adapter to a different mode */
dm = dm2;
res = ChangeDisplaySettingsExA(devices[0].name, &dm, NULL, CDS_RESET, NULL);
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %d\n", devices[0].name, res);
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %ld\n", devices[0].name, res);
/* Now the position of the second adapter should be changed */
memset(&dm2, 0, sizeof(dm2));
dm2.dmSize = sizeof(dm2);
res = EnumDisplaySettingsA(devices[1].name, ENUM_CURRENT_SETTINGS, &dm2);
- ok(res, "EnumDisplaySettingsA %s failed, error %#x\n", devices[1].name, GetLastError());
- ok(dm2.dmPosition.x == dm.dmPelsWidth, "Expect dmPosition.x %d, got %d\n",
+ ok(res, "EnumDisplaySettingsA %s failed, error %#lx\n", devices[1].name, GetLastError());
+ ok(dm2.dmPosition.x == dm.dmPelsWidth, "Expect dmPosition.x %ld, got %ld\n",
dm.dmPelsWidth, dm2.dmPosition.x);
}
else
@@ -1089,7 +1090,7 @@ static void test_ChangeDisplaySettingsEx(void)
memset(&dm, 0, sizeof(dm));
dm.dmSize = sizeof(dm);
res = EnumDisplaySettingsA(devices[device].name, ENUM_CURRENT_SETTINGS, &dm);
- ok(res, "EnumDisplaySettingsA %s failed, error %#x.\n", devices[device].name, GetLastError());
+ ok(res, "EnumDisplaySettingsA %s failed, error %#lx.\n", devices[device].name, GetLastError());
memset(&dm2, 0, sizeof(dm2));
dm2.dmSize = sizeof(dm2);
@@ -1112,7 +1113,7 @@ static void test_ChangeDisplaySettingsEx(void)
win_skip("Failed to change %s to mode %d.\n", devices[device].name, mode);
continue;
}
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s mode %d returned unexpected %d.\n",
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s mode %d returned unexpected %ld.\n",
devices[device].name, mode, res);
flush_events();
expect_dm(&dm2, devices[device].name, mode);
@@ -1123,24 +1124,24 @@ static void test_ChangeDisplaySettingsEx(void)
for (i = 0; EnumDisplaySettingsExA(devices[device].name, i, &dm3, 0); ++i)
{
ok(dm3.dmDisplayOrientation == dm2.dmDisplayOrientation,
- "Expected %s display mode %d orientation %d, got %d.\n",
+ "Expected %s display mode %d orientation %ld, got %ld.\n",
devices[device].name, i, dm2.dmDisplayOrientation, dm3.dmDisplayOrientation);
}
ok(i > 0, "Expected at least one display mode found.\n");
if (device == 0)
{
- ok(GetSystemMetrics(SM_CXSCREEN) == dm2.dmPelsWidth, "Expected %d, got %d.\n",
+ ok(GetSystemMetrics(SM_CXSCREEN) == dm2.dmPelsWidth, "Expected %ld, got %d.\n",
dm2.dmPelsWidth, GetSystemMetrics(SM_CXSCREEN));
- ok(GetSystemMetrics(SM_CYSCREEN) == dm2.dmPelsHeight, "Expected %d, got %d.\n",
+ ok(GetSystemMetrics(SM_CYSCREEN) == dm2.dmPelsHeight, "Expected %ld, got %d.\n",
dm2.dmPelsHeight, GetSystemMetrics(SM_CYSCREEN));
}
if (device_count == 1)
{
- ok(GetSystemMetrics(SM_CXVIRTUALSCREEN) == dm2.dmPelsWidth, "Expected %d, got %d.\n",
+ ok(GetSystemMetrics(SM_CXVIRTUALSCREEN) == dm2.dmPelsWidth, "Expected %ld, got %d.\n",
dm2.dmPelsWidth, GetSystemMetrics(SM_CXVIRTUALSCREEN));
- ok(GetSystemMetrics(SM_CYVIRTUALSCREEN) == dm2.dmPelsHeight, "Expected %d, got %d.\n",
+ ok(GetSystemMetrics(SM_CYVIRTUALSCREEN) == dm2.dmPelsHeight, "Expected %ld, got %d.\n",
dm2.dmPelsHeight, GetSystemMetrics(SM_CYVIRTUALSCREEN));
}
}
@@ -1154,12 +1155,12 @@ static void test_ChangeDisplaySettingsEx(void)
CDS_UPDATEREGISTRY | CDS_NORESET, NULL);
ok(res == DISP_CHANGE_SUCCESSFUL ||
broken(res == DISP_CHANGE_FAILED), /* win8 TestBot */
- "ChangeDisplaySettingsExA %s returned unexpected %d\n", devices[device].name, res);
+ "ChangeDisplaySettingsExA %s returned unexpected %ld\n", devices[device].name, res);
}
res = ChangeDisplaySettingsExA(NULL, NULL, NULL, 0, NULL);
ok(res == DISP_CHANGE_SUCCESSFUL ||
broken(res == DISP_CHANGE_FAILED), /* win8 TestBot */
- "ChangeDisplaySettingsExA returned unexpected %d\n", res);
+ "ChangeDisplaySettingsExA returned unexpected %ld\n", res);
for (device = 0; device < device_count; ++device)
expect_dm(&devices[device].original_mode, devices[device].name, 0);
@@ -1350,13 +1351,13 @@ static void test_work_area(void)
mi.cbSize = sizeof(mi);
SetLastError(0xdeadbeef);
ret = GetMonitorInfoA(hmon, &mi);
- ok(ret, "GetMonitorInfo error %u\n", GetLastError());
+ ok(ret, "GetMonitorInfo error %lu\n", GetLastError());
ok(mi.dwFlags & MONITORINFOF_PRIMARY, "not a primary monitor\n");
trace("primary monitor %s\n", wine_dbgstr_rect(&mi.rcMonitor));
SetLastError(0xdeadbeef);
ret = SystemParametersInfoA(SPI_GETWORKAREA, 0, &rc_work, 0);
- ok(ret, "SystemParametersInfo error %u\n", GetLastError());
+ ok(ret, "SystemParametersInfo error %lu\n", GetLastError());
trace("work area %s\n", wine_dbgstr_rect(&rc_work));
ok(EqualRect(&rc_work, &mi.rcWork), "work area is different\n");
@@ -1370,7 +1371,7 @@ static void test_work_area(void)
wp.length = sizeof(wp);
ret = GetWindowPlacement(hwnd, &wp);
ok(ret, "GetWindowPlacement failed\n");
- trace("min: %d,%d max %d,%d normal %s\n", wp.ptMinPosition.x, wp.ptMinPosition.y,
+ trace("min: %ld,%ld max %ld,%ld normal %s\n", wp.ptMinPosition.x, wp.ptMinPosition.y,
wp.ptMaxPosition.x, wp.ptMaxPosition.y, wine_dbgstr_rect(&wp.rcNormalPosition));
OffsetRect(&wp.rcNormalPosition, rc_work.left, rc_work.top);
todo_wine_if (mi.rcMonitor.left != mi.rcWork.left ||
@@ -1384,7 +1385,7 @@ static void test_work_area(void)
wp.length = sizeof(wp);
ret = GetWindowPlacement(hwnd, &wp);
ok(ret, "GetWindowPlacement failed\n");
- trace("min: %d,%d max %d,%d normal %s\n", wp.ptMinPosition.x, wp.ptMinPosition.y,
+ trace("min: %ld,%ld max %ld,%ld normal %s\n", wp.ptMinPosition.x, wp.ptMinPosition.y,
wp.ptMaxPosition.x, wp.ptMaxPosition.y, wine_dbgstr_rect(&wp.rcNormalPosition));
ok(EqualRect(&rc_normal, &wp.rcNormalPosition), "normal pos is different\n");
@@ -1397,40 +1398,40 @@ static void test_GetDisplayConfigBufferSizes(void)
LONG ret;
ret = pGetDisplayConfigBufferSizes(QDC_ALL_PATHS, NULL, NULL);
- ok(ret == ERROR_INVALID_PARAMETER, "got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %ld\n", ret);
paths = 100;
ret = pGetDisplayConfigBufferSizes(QDC_ALL_PATHS, &paths, NULL);
- ok(ret == ERROR_INVALID_PARAMETER, "got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %ld\n", ret);
ok(paths == 100, "got %u\n", paths);
modes = 100;
ret = pGetDisplayConfigBufferSizes(QDC_ALL_PATHS, NULL, &modes);
- ok(ret == ERROR_INVALID_PARAMETER, "got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %ld\n", ret);
ok(modes == 100, "got %u\n", modes);
ret = pGetDisplayConfigBufferSizes(0, NULL, NULL);
- ok(ret == ERROR_INVALID_PARAMETER, "got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %ld\n", ret);
paths = 100;
ret = pGetDisplayConfigBufferSizes(0, &paths, NULL);
- ok(ret == ERROR_INVALID_PARAMETER, "got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %ld\n", ret);
ok(paths == 100, "got %u\n", paths);
modes = 100;
ret = pGetDisplayConfigBufferSizes(0, NULL, &modes);
- ok(ret == ERROR_INVALID_PARAMETER, "got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %ld\n", ret);
ok(modes == 100, "got %u\n", modes);
/* Flag validation on Windows is driver-dependent */
paths = modes = 100;
ret = pGetDisplayConfigBufferSizes(0, &paths, &modes);
- ok(ret == ERROR_INVALID_PARAMETER || ret == ERROR_NOT_SUPPORTED, "got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER || ret == ERROR_NOT_SUPPORTED, "got %ld\n", ret);
ok((modes == 0 || modes == 100) && paths == 0, "got %u, %u\n", modes, paths);
paths = modes = 100;
ret = pGetDisplayConfigBufferSizes(0xFF, &paths, &modes);
- ok(ret == ERROR_INVALID_PARAMETER || ret == ERROR_NOT_SUPPORTED, "got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER || ret == ERROR_NOT_SUPPORTED, "got %ld\n", ret);
ok((modes == 0 || modes == 100) && paths == 0, "got %u, %u\n", modes, paths);
/* Test success */
@@ -1439,21 +1440,21 @@ static void test_GetDisplayConfigBufferSizes(void)
if (!ret)
ok(paths > 0 && modes > 0, "got %u, %u\n", paths, modes);
else
- ok(ret == ERROR_NOT_SUPPORTED, "got %d\n", ret);
+ ok(ret == ERROR_NOT_SUPPORTED, "got %ld\n", ret);
paths = modes = 0;
ret = pGetDisplayConfigBufferSizes(QDC_ONLY_ACTIVE_PATHS, &paths, &modes);
if (!ret)
ok(paths > 0 && modes > 0, "got %u, %u\n", paths, modes);
else
- ok(ret == ERROR_NOT_SUPPORTED, "got %d\n", ret);
+ ok(ret == ERROR_NOT_SUPPORTED, "got %ld\n", ret);
paths = modes = 0;
ret = pGetDisplayConfigBufferSizes(QDC_DATABASE_CURRENT, &paths, &modes);
if (!ret)
ok(paths > 0 && modes > 0, "got %u, %u\n", paths, modes);
else
- ok(ret == ERROR_NOT_SUPPORTED, "got %d\n", ret);
+ ok(ret == ERROR_NOT_SUPPORTED, "got %ld\n", ret);
}
static BOOL CALLBACK test_EnumDisplayMonitors_normal_cb(HMONITOR monitor, HDC hdc, LPRECT rect,
@@ -1464,7 +1465,7 @@ static BOOL CALLBACK test_EnumDisplayMonitors_normal_cb(HMONITOR monitor, HDC hd
mi.cbSize = sizeof(mi);
ret = GetMonitorInfoA(monitor, &mi);
- ok(ret, "GetMonitorInfoA failed, error %#x.\n", GetLastError());
+ ok(ret, "GetMonitorInfoA failed, error %#lx.\n", GetLastError());
ok(EqualRect(rect, &mi.rcMonitor), "Expected rect %s, got %s.\n",
wine_dbgstr_rect(&mi.rcMonitor), wine_dbgstr_rect(rect));
@@ -1488,7 +1489,7 @@ static BOOL CALLBACK test_EnumDisplayMonitors_invalid_handle_cb(HMONITOR monitor
mi.cbSize = sizeof(mi);
ret = GetMonitorInfoA(monitor, (MONITORINFO *)&mi);
- ok(ret, "GetMonitorInfoA failed, error %#x.\n", GetLastError());
+ ok(ret, "GetMonitorInfoA failed, error %#lx.\n", GetLastError());
/* Test that monitor handle is invalid after the monitor is detached */
if (!(mi.dwFlags & MONITORINFOF_PRIMARY))
@@ -1499,7 +1500,7 @@ static BOOL CALLBACK test_EnumDisplayMonitors_invalid_handle_cb(HMONITOR monitor
memset(&old_dm, 0, sizeof(old_dm));
old_dm.dmSize = sizeof(old_dm);
ret = EnumDisplaySettingsA(mi.szDevice, ENUM_CURRENT_SETTINGS, &old_dm);
- ok(ret, "EnumDisplaySettingsA %s failed, error %#x.\n", mi.szDevice, GetLastError());
+ ok(ret, "EnumDisplaySettingsA %s failed, error %#lx.\n", mi.szDevice, GetLastError());
/* Detach monitor */
memset(&dm, 0, sizeof(dm));
@@ -1509,10 +1510,10 @@ static BOOL CALLBACK test_EnumDisplayMonitors_invalid_handle_cb(HMONITOR monitor
dm.dmPosition.y = mi.rcMonitor.top;
ret = ChangeDisplaySettingsExA(mi.szDevice, &dm, NULL, CDS_UPDATEREGISTRY | CDS_NORESET,
NULL);
- ok(ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %d.\n",
+ ok(ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %ld.\n",
mi.szDevice, ret);
ret = ChangeDisplaySettingsExA(mi.szDevice, NULL, NULL, 0, NULL);
- ok(ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %d.\n",
+ ok(ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %ld.\n",
mi.szDevice, ret);
/* Check if it's really detached */
@@ -1530,15 +1531,15 @@ static BOOL CALLBACK test_EnumDisplayMonitors_invalid_handle_cb(HMONITOR monitor
ok(!ret, "GetMonitorInfoA succeeded.\n");
error = GetLastError();
ok(error == ERROR_INVALID_MONITOR_HANDLE || error == ERROR_INVALID_HANDLE,
- "Expected error %#x, got %#x.\n", ERROR_INVALID_MONITOR_HANDLE, error);
+ "Expected error %#x, got %#lx.\n", ERROR_INVALID_MONITOR_HANDLE, error);
/* Restore the original display settings */
ret = ChangeDisplaySettingsExA(mi.szDevice, &old_dm, NULL, CDS_UPDATEREGISTRY | CDS_NORESET,
NULL);
- ok(ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %d.\n",
+ ok(ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %ld.\n",
mi.szDevice, ret);
ret = ChangeDisplaySettingsExA(mi.szDevice, NULL, NULL, 0, NULL);
- ok(ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %d.\n",
+ ok(ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %ld.\n",
mi.szDevice, ret);
}
@@ -1565,13 +1566,13 @@ static void test_EnumDisplayMonitors(void)
BOOL ret;
ret = EnumDisplayMonitors(NULL, NULL, test_EnumDisplayMonitors_normal_cb, 0);
- ok(ret, "EnumDisplayMonitors failed, error %#x.\n", GetLastError());
+ ok(ret, "EnumDisplayMonitors failed, error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef);
ret = EnumDisplayMonitors(NULL, NULL, test_EnumDisplayMonitors_return_false_cb, 0);
error = GetLastError();
ok(!ret, "EnumDisplayMonitors succeeded.\n");
- ok(error == 0xdeadbeef, "Expected error %#x, got %#x.\n", 0xdeadbeef, error);
+ ok(error == 0xdeadbeef, "Expected error %#x, got %#lx.\n", 0xdeadbeef, error);
count = GetSystemMetrics(SM_CMONITORS);
SetLastError(0xdeadbeef);
@@ -1581,7 +1582,7 @@ static void test_EnumDisplayMonitors(void)
todo_wine ok(!ret, "EnumDisplayMonitors succeeded.\n");
else
ok(ret, "EnumDisplayMonitors failed.\n");
- ok(error == 0xdeadbeef, "Expected error %#x, got %#x.\n", 0xdeadbeef, error);
+ ok(error == 0xdeadbeef, "Expected error %#x, got %#lx.\n", 0xdeadbeef, error);
/* Test that monitor enumeration is not affected by window stations and desktops */
old_winstation = GetProcessWindowStation();
@@ -1590,25 +1591,25 @@ static void test_EnumDisplayMonitors(void)
count = 0;
ret = EnumDisplayMonitors(NULL, NULL, test_EnumDisplayMonitors_count, (LPARAM)&count);
- ok(ret, "EnumDisplayMonitors failed, error %#x.\n", GetLastError());
+ ok(ret, "EnumDisplayMonitors failed, error %#lx.\n", GetLastError());
ok(count == old_count, "Expected %d, got %d.\n", old_count, count);
winstation = CreateWindowStationW(NULL, 0, WINSTA_ALL_ACCESS, NULL);
- ok(!!winstation && winstation != old_winstation, "CreateWindowStationW failed, error %#x.\n", GetLastError());
+ ok(!!winstation && winstation != old_winstation, "CreateWindowStationW failed, error %#lx.\n", GetLastError());
ret = SetProcessWindowStation(winstation);
- ok(ret, "SetProcessWindowStation failed, error %#x.\n", GetLastError());
+ ok(ret, "SetProcessWindowStation failed, error %#lx.\n", GetLastError());
ok(winstation == GetProcessWindowStation(), "Expected %p, got %p.\n", GetProcessWindowStation(), winstation);
flags.fInherit = FALSE;
flags.fReserved = FALSE;
flags.dwFlags = WSF_VISIBLE;
ret = SetUserObjectInformationW(winstation, UOI_FLAGS, &flags, sizeof(flags));
- ok(ret, "SetUserObjectInformationW failed, error %#x.\n", GetLastError());
+ ok(ret, "SetUserObjectInformationW failed, error %#lx.\n", GetLastError());
desktop = CreateDesktopW(L"test_desktop", NULL, NULL, 0, DESKTOP_ALL_ACCESS, NULL);
- ok(!!desktop && desktop != old_desktop, "CreateDesktopW failed, error %#x.\n", GetLastError());
+ ok(!!desktop && desktop != old_desktop, "CreateDesktopW failed, error %#lx.\n", GetLastError());
ret = SetThreadDesktop(desktop);
- ok(ret, "SetThreadDesktop failed, error %#x.\n", GetLastError());
+ ok(ret, "SetThreadDesktop failed, error %#lx.\n", GetLastError());
ok(desktop == GetThreadDesktop(GetCurrentThreadId()), "Expected %p, got %p.\n",
GetThreadDesktop(GetCurrentThreadId()), desktop);
@@ -1616,17 +1617,17 @@ static void test_EnumDisplayMonitors(void)
ok(count == old_count, "Expected %d, got %d.\n", old_count, count);
count = 0;
ret = EnumDisplayMonitors(NULL, NULL, test_EnumDisplayMonitors_count, (LPARAM)&count);
- ok(ret, "EnumDisplayMonitors failed, error %#x.\n", GetLastError());
+ ok(ret, "EnumDisplayMonitors failed, error %#lx.\n", GetLastError());
ok(count == old_count, "Expected %d, got %d.\n", old_count, count);
ret = SetProcessWindowStation(old_winstation);
- ok(ret, "SetProcessWindowStation failed, error %#x.\n", GetLastError());
+ ok(ret, "SetProcessWindowStation failed, error %#lx.\n", GetLastError());
ret = SetThreadDesktop(old_desktop);
- ok(ret, "SetThreadDesktop failed, error %#x.\n", GetLastError());
+ ok(ret, "SetThreadDesktop failed, error %#lx.\n", GetLastError());
ret = CloseDesktop(desktop);
- ok(ret, "CloseDesktop failed, error %#x.\n", GetLastError());
+ ok(ret, "CloseDesktop failed, error %#lx.\n", GetLastError());
ret = CloseWindowStation(winstation);
- ok(ret, "CloseWindowStation failed, error %#x.\n", GetLastError());
+ ok(ret, "CloseWindowStation failed, error %#lx.\n", GetLastError());
}
static void test_QueryDisplayConfig_result(UINT32 flags,
@@ -1647,7 +1648,7 @@ static void test_QueryDisplayConfig_result(UINT32 flags,
source_name.header.id = pi[i].sourceInfo.id;
source_name.viewGdiDeviceName[0] = '\0';
ret = pDisplayConfigGetDeviceInfo(&source_name.header);
- ok(!ret, "Expected 0, got %d\n", ret);
+ ok(!ret, "Expected 0, got %ld\n", ret);
ok(source_name.viewGdiDeviceName[0] != '\0', "Expected GDI device name, got empty string\n");
/* Test with an invalid adapter LUID */
@@ -1657,7 +1658,7 @@ static void test_QueryDisplayConfig_result(UINT32 flags,
source_name.header.adapterId.HighPart = 0xFFFF;
source_name.header.id = pi[i].sourceInfo.id;
ret = pDisplayConfigGetDeviceInfo(&source_name.header);
- ok(ret == ERROR_GEN_FAILURE, "Expected GEN_FAILURE, got %d\n", ret);
+ ok(ret == ERROR_GEN_FAILURE, "Expected GEN_FAILURE, got %ld\n", ret);
todo_wine {
target_name.header.type = DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_NAME;
@@ -1666,7 +1667,7 @@ static void test_QueryDisplayConfig_result(UINT32 flags,
target_name.header.id = pi[i].targetInfo.id;
target_name.monitorDevicePath[0] = '\0';
ret = pDisplayConfigGetDeviceInfo(&target_name.header);
- ok(!ret, "Expected 0, got %d\n", ret);
+ ok(!ret, "Expected 0, got %ld\n", ret);
ok(target_name.monitorDevicePath[0] != '\0', "Expected monitor device path, got empty string\n");
}
@@ -1677,7 +1678,7 @@ static void test_QueryDisplayConfig_result(UINT32 flags,
preferred_mode.header.id = pi[i].targetInfo.id;
preferred_mode.width = preferred_mode.height = 0;
ret = pDisplayConfigGetDeviceInfo(&preferred_mode.header);
- ok(!ret, "Expected 0, got %d\n", ret);
+ ok(!ret, "Expected 0, got %ld\n", ret);
ok(preferred_mode.width > 0 && preferred_mode.height > 0, "Expected non-zero height/width, got %ux%u\n",
preferred_mode.width, preferred_mode.height);
}
@@ -1688,7 +1689,7 @@ static void test_QueryDisplayConfig_result(UINT32 flags,
adapter_name.header.adapterId = pi[i].sourceInfo.adapterId;
adapter_name.adapterDevicePath[0] = '\0';
ret = pDisplayConfigGetDeviceInfo(&adapter_name.header);
- ok(!ret, "Expected 0, got %d\n", ret);
+ ok(!ret, "Expected 0, got %ld\n", ret);
ok(adapter_name.adapterDevicePath[0] != '\0', "Expected adapter device path, got empty string\n");
}
@@ -1708,7 +1709,7 @@ static void test_QueryDisplayConfig_result(UINT32 flags,
pi[i].sourceInfo.id, mi[pi[i].sourceInfo.modeInfoIdx].id);
ok(pi[i].sourceInfo.adapterId.HighPart == mi[pi[i].sourceInfo.modeInfoIdx].adapterId.HighPart &&
pi[i].sourceInfo.adapterId.LowPart == mi[pi[i].sourceInfo.modeInfoIdx].adapterId.LowPart,
- "Expected LUID %08x:%08x, got %08x:%08x\n",
+ "Expected LUID %08lx:%08lx, got %08lx:%08lx\n",
pi[i].sourceInfo.adapterId.HighPart, pi[i].sourceInfo.adapterId.LowPart,
mi[pi[i].sourceInfo.modeInfoIdx].adapterId.HighPart, mi[pi[i].sourceInfo.modeInfoIdx].adapterId.LowPart);
ok(mi[pi[i].sourceInfo.modeInfoIdx].sourceMode.width > 0 && mi[pi[i].sourceInfo.modeInfoIdx].sourceMode.height > 0,
@@ -1731,7 +1732,7 @@ static void test_QueryDisplayConfig_result(UINT32 flags,
pi[i].targetInfo.id, mi[pi[i].targetInfo.modeInfoIdx].id);
ok(pi[i].targetInfo.adapterId.HighPart == mi[pi[i].targetInfo.modeInfoIdx].adapterId.HighPart &&
pi[i].targetInfo.adapterId.LowPart == mi[pi[i].targetInfo.modeInfoIdx].adapterId.LowPart,
- "Expected LUID %08x:%08x, got %08x:%08x\n",
+ "Expected LUID %08lx:%08lx, got %08lx:%08lx\n",
pi[i].targetInfo.adapterId.HighPart, pi[i].targetInfo.adapterId.LowPart,
mi[pi[i].targetInfo.modeInfoIdx].adapterId.HighPart, mi[pi[i].targetInfo.modeInfoIdx].adapterId.LowPart);
ok(mi[pi[i].targetInfo.modeInfoIdx].targetMode.targetVideoSignalInfo.activeSize.cx > 0 &&
@@ -1764,28 +1765,28 @@ static void test_QueryDisplayConfig(void)
LONG ret;
ret = pQueryDisplayConfig(QDC_ALL_PATHS, NULL, NULL, NULL, NULL, NULL);
- ok(ret == ERROR_INVALID_PARAMETER, "got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %ld\n", ret);
paths = modes = 0;
ret = pQueryDisplayConfig(QDC_ALL_PATHS, &paths, NULL, &modes, NULL, NULL);
- ok(ret == ERROR_INVALID_PARAMETER, "got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %ld\n", ret);
paths = modes = 0;
ret = pQueryDisplayConfig(QDC_ALL_PATHS, &paths, pi, &modes, NULL, NULL);
- ok(ret == ERROR_INVALID_PARAMETER, "got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %ld\n", ret);
paths = modes = 0;
ret = pQueryDisplayConfig(QDC_ALL_PATHS, &paths, NULL, &modes, mi, NULL);
- ok(ret == ERROR_INVALID_PARAMETER, "got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %ld\n", ret);
paths = modes = 0;
ret = pQueryDisplayConfig(QDC_ALL_PATHS, &paths, pi, &modes, mi, NULL);
- ok(ret == ERROR_INVALID_PARAMETER, "got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %ld\n", ret);
paths = 0;
modes = 1;
ret = pQueryDisplayConfig(QDC_ALL_PATHS, &paths, pi, &modes, mi, NULL);
- ok(ret == ERROR_INVALID_PARAMETER, "got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %ld\n", ret);
ok (paths == 0, "got %u\n", paths);
ok (modes == 1, "got %u\n", modes);
@@ -1793,27 +1794,27 @@ static void test_QueryDisplayConfig(void)
if (0)
{
ret = pQueryDisplayConfig(QDC_ALL_PATHS, NULL, pi, NULL, mi, NULL);
- ok(ret == ERROR_INVALID_PARAMETER, "got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %ld\n", ret);
ret = pQueryDisplayConfig(QDC_ALL_PATHS, NULL, pi, &modes, mi, NULL);
- ok(ret == ERROR_INVALID_PARAMETER, "got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %ld\n", ret);
}
paths = modes = 1;
ret = pQueryDisplayConfig(0, &paths, pi, &modes, mi, NULL);
- ok(ret == ERROR_INVALID_PARAMETER, "got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %ld\n", ret);
paths = modes = 1;
ret = pQueryDisplayConfig(0xFF, &paths, pi, &modes, mi, NULL);
- ok(ret == ERROR_INVALID_PARAMETER, "got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %ld\n", ret);
paths = modes = 1;
ret = pQueryDisplayConfig(QDC_DATABASE_CURRENT, &paths, pi, &modes, mi, NULL);
- ok(ret == ERROR_INVALID_PARAMETER, "got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %ld\n", ret);
paths = modes = 1;
ret = pQueryDisplayConfig(QDC_ALL_PATHS, &paths, pi, &modes, mi, &topologyid);
- ok(ret == ERROR_INVALID_PARAMETER, "got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %ld\n", ret);
/* Below this point, test functionality that requires a WDDM driver on Windows */
paths = modes = 1;
@@ -1826,7 +1827,7 @@ static void test_QueryDisplayConfig(void)
win_skip("QueryDisplayConfig() functionality is unsupported\n");
return;
}
- ok(ret == ERROR_INSUFFICIENT_BUFFER, "got %d\n", ret);
+ ok(ret == ERROR_INSUFFICIENT_BUFFER, "got %ld\n", ret);
ok (paths == 1, "got %u\n", paths);
ok (modes == 1, "got %u\n", modes);
@@ -1835,7 +1836,7 @@ static void test_QueryDisplayConfig(void)
memset(pi, 0xFF, sizeof(pi));
memset(mi, 0xFF, sizeof(mi));
ret = pQueryDisplayConfig(QDC_ONLY_ACTIVE_PATHS, &paths, pi, &modes, mi, NULL);
- ok(!ret, "got %d\n", ret);
+ ok(!ret, "got %ld\n", ret);
ok(paths > 0 && modes > 0, "got %u, %u\n", paths, modes);
if (!ret && paths > 0 && modes > 0)
test_QueryDisplayConfig_result(QDC_ONLY_ACTIVE_PATHS, paths, pi, modes, mi);
@@ -1846,7 +1847,7 @@ static void test_QueryDisplayConfig(void)
memset(mi, 0xFF, sizeof(mi));
topologyid = 0xFF;
ret = pQueryDisplayConfig(QDC_DATABASE_CURRENT, &paths, pi, &modes, mi, &topologyid);
- ok(!ret, "got %d\n", ret);
+ ok(!ret, "got %ld\n", ret);
ok(topologyid != 0xFF, "expected topologyid to be set, got %d\n", topologyid);
if (!ret && paths > 0 && modes > 0)
test_QueryDisplayConfig_result(QDC_DATABASE_CURRENT, paths, pi, modes, mi);
@@ -1861,37 +1862,37 @@ static void test_DisplayConfigGetDeviceInfo(void)
DISPLAYCONFIG_ADAPTER_NAME adapter_name;
ret = pDisplayConfigGetDeviceInfo(NULL);
- ok(ret == ERROR_GEN_FAILURE, "got %d\n", ret);
+ ok(ret == ERROR_GEN_FAILURE, "got %ld\n", ret);
source_name.header.type = 0xFFFF;
source_name.header.size = 0;
ret = pDisplayConfigGetDeviceInfo(&source_name.header);
- ok(ret == ERROR_GEN_FAILURE, "got %d\n", ret);
+ ok(ret == ERROR_GEN_FAILURE, "got %ld\n", ret);
source_name.header.type = DISPLAYCONFIG_DEVICE_INFO_GET_SOURCE_NAME;
source_name.header.size = 0;
ret = pDisplayConfigGetDeviceInfo(&source_name.header);
- ok(ret == ERROR_GEN_FAILURE, "got %d\n", ret);
+ ok(ret == ERROR_GEN_FAILURE, "got %ld\n", ret);
source_name.header.type = 0xFFFF;
source_name.header.size = sizeof(source_name.header);
ret = pDisplayConfigGetDeviceInfo(&source_name.header);
- ok(ret == ERROR_INVALID_PARAMETER, "got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %ld\n", ret);
source_name.header.type = DISPLAYCONFIG_DEVICE_INFO_GET_SOURCE_NAME;
source_name.header.size = sizeof(source_name.header);
ret = pDisplayConfigGetDeviceInfo(&source_name.header);
- ok(ret == ERROR_INVALID_PARAMETER, "got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %ld\n", ret);
source_name.header.type = 0xFFFF;
source_name.header.size = sizeof(source_name);
ret = pDisplayConfigGetDeviceInfo(&source_name.header);
- ok(ret == ERROR_INVALID_PARAMETER, "got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %ld\n", ret);
source_name.header.type = DISPLAYCONFIG_DEVICE_INFO_GET_SOURCE_NAME;
source_name.header.size = sizeof(source_name) - 1;
ret = pDisplayConfigGetDeviceInfo(&source_name.header);
- ok(ret == ERROR_INVALID_PARAMETER, "got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %ld\n", ret);
source_name.header.type = DISPLAYCONFIG_DEVICE_INFO_GET_SOURCE_NAME;
source_name.header.size = sizeof(source_name);
@@ -1899,12 +1900,12 @@ static void test_DisplayConfigGetDeviceInfo(void)
source_name.header.adapterId.HighPart = 0xFFFF;
source_name.header.id = 0;
ret = pDisplayConfigGetDeviceInfo(&source_name.header);
- ok(ret == ERROR_GEN_FAILURE || ret == ERROR_NOT_SUPPORTED, "got %d\n", ret);
+ ok(ret == ERROR_GEN_FAILURE || ret == ERROR_NOT_SUPPORTED, "got %ld\n", ret);
target_name.header.type = DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_NAME;
target_name.header.size = sizeof(target_name) - 1;
ret = pDisplayConfigGetDeviceInfo(&target_name.header);
- ok(ret == ERROR_INVALID_PARAMETER, "got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %ld\n", ret);
target_name.header.type = DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_NAME;
target_name.header.size = sizeof(target_name);
@@ -1912,12 +1913,12 @@ static void test_DisplayConfigGetDeviceInfo(void)
target_name.header.adapterId.HighPart = 0xFFFF;
target_name.header.id = 0;
ret = pDisplayConfigGetDeviceInfo(&target_name.header);
- ok(ret == ERROR_GEN_FAILURE || ret == ERROR_NOT_SUPPORTED, "got %d\n", ret);
+ ok(ret == ERROR_GEN_FAILURE || ret == ERROR_NOT_SUPPORTED, "got %ld\n", ret);
preferred_mode.header.type = DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_PREFERRED_MODE;
preferred_mode.header.size = sizeof(preferred_mode) - 1;
ret = pDisplayConfigGetDeviceInfo(&preferred_mode.header);
- ok(ret == ERROR_INVALID_PARAMETER, "got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %ld\n", ret);
preferred_mode.header.type = DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_PREFERRED_MODE;
preferred_mode.header.size = sizeof(preferred_mode);
@@ -1925,19 +1926,19 @@ static void test_DisplayConfigGetDeviceInfo(void)
preferred_mode.header.adapterId.HighPart = 0xFFFF;
preferred_mode.header.id = 0;
ret = pDisplayConfigGetDeviceInfo(&preferred_mode.header);
- ok(ret == ERROR_GEN_FAILURE || ret == ERROR_INVALID_PARAMETER || ret == ERROR_NOT_SUPPORTED, "got %d\n", ret);
+ ok(ret == ERROR_GEN_FAILURE || ret == ERROR_INVALID_PARAMETER || ret == ERROR_NOT_SUPPORTED, "got %ld\n", ret);
adapter_name.header.type = DISPLAYCONFIG_DEVICE_INFO_GET_ADAPTER_NAME;
adapter_name.header.size = sizeof(adapter_name) - 1;
ret = pDisplayConfigGetDeviceInfo(&adapter_name.header);
- ok(ret == ERROR_INVALID_PARAMETER, "got %d\n", ret);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %ld\n", ret);
adapter_name.header.type = DISPLAYCONFIG_DEVICE_INFO_GET_ADAPTER_NAME;
adapter_name.header.size = sizeof(adapter_name);
adapter_name.header.adapterId.LowPart = 0xFFFF;
adapter_name.header.adapterId.HighPart = 0xFFFF;
ret = pDisplayConfigGetDeviceInfo(&adapter_name.header);
- ok(ret == ERROR_GEN_FAILURE || ret == ERROR_INVALID_PARAMETER || ret == ERROR_NOT_SUPPORTED, "got %d\n", ret);
+ ok(ret == ERROR_GEN_FAILURE || ret == ERROR_INVALID_PARAMETER || ret == ERROR_NOT_SUPPORTED, "got %ld\n", ret);
}
static void test_display_config(void)
@@ -1986,7 +1987,7 @@ static void test_DisplayConfigSetDeviceInfo(void)
lstrcpyW(open_adapter_gdi_desc.DeviceName, L"\\\\.\\DISPLAY1");
status = pD3DKMTOpenAdapterFromGdiDisplayName(&open_adapter_gdi_desc);
- ok(status == STATUS_SUCCESS, "D3DKMTOpenAdapterFromGdiDisplayName failed, status %#x.\n", status);
+ ok(status == STATUS_SUCCESS, "D3DKMTOpenAdapterFromGdiDisplayName failed, status %#lx.\n", status);
get_scale_req.header.type = DISPLAYCONFIG_DEVICE_INFO_GET_SOURCE_DPI_SCALE;
get_scale_req.header.size = sizeof(get_scale_req);
@@ -1995,7 +1996,7 @@ static void test_DisplayConfigSetDeviceInfo(void)
ret = pDisplayConfigGetDeviceInfo(&get_scale_req.header);
if (ret != NO_ERROR)
{
- skip("DisplayConfigGetDeviceInfo failed, returned %d.\n", ret);
+ skip("DisplayConfigGetDeviceInfo failed, returned %ld.\n", ret);
goto failed;
}
@@ -2024,7 +2025,7 @@ static void test_DisplayConfigSetDeviceInfo(void)
{
set_scale_req.relativeScaleStep = step;
ret = pDisplayConfigSetDeviceInfo(&set_scale_req.header);
- ok(ret == NO_ERROR, "DisplayConfigSetDeviceInfo failed, returned %d.\n", ret);
+ ok(ret == NO_ERROR, "DisplayConfigSetDeviceInfo failed, returned %ld.\n", ret);
dpi = scales[step + recommended_scale_idx] * 96 / 100;
ok(dpi == get_primary_dpi(), "Expected %d, got %d.\n", get_primary_dpi(), dpi);
@@ -2033,7 +2034,7 @@ static void test_DisplayConfigSetDeviceInfo(void)
/* Restore to the original scale */
set_scale_req.relativeScaleStep = get_scale_req.curRelativeScaleStep;
ret = pDisplayConfigSetDeviceInfo(&set_scale_req.header);
- ok(ret == NO_ERROR, "DisplayConfigSetDeviceInfo failed, returned %d.\n", ret);
+ ok(ret == NO_ERROR, "DisplayConfigSetDeviceInfo failed, returned %ld.\n", ret);
ok(old_dpi == get_primary_dpi(), "Expected %d, got %d.\n", get_primary_dpi(), old_dpi);
/* Remove IgnorePerProcessSystemDPIToast registry value */
@@ -2043,7 +2044,7 @@ static void test_DisplayConfigSetDeviceInfo(void)
failed:
close_adapter_desc.hAdapter = open_adapter_gdi_desc.hAdapter;
status = pD3DKMTCloseAdapter(&close_adapter_desc);
- ok(status == STATUS_SUCCESS, "Got unexpected return code %#x.\n", status);
+ ok(status == STATUS_SUCCESS, "Got unexpected return code %#lx.\n", status);
}
static BOOL CALLBACK test_handle_proc(HMONITOR full_monitor, HDC hdc, LPRECT rect, LPARAM lparam)
@@ -2059,37 +2060,37 @@ static BOOL CALLBACK test_handle_proc(HMONITOR full_monitor, HDC hdc, LPRECT rec
monitor = (HMONITOR)((ULONG_PTR)full_monitor | ((ULONG_PTR)~0u << 32));
SetLastError(0xdeadbeef);
ret = GetMonitorInfoW(monitor, &monitor_info);
- ok(ret, "GetMonitorInfoW failed, error %#x.\n", GetLastError());
+ ok(ret, "GetMonitorInfoW failed, error %#lx.\n", GetLastError());
monitor = (HMONITOR)((ULONG_PTR)full_monitor & 0xffffffff);
SetLastError(0xdeadbeef);
ret = GetMonitorInfoW(monitor, &monitor_info);
- ok(ret, "GetMonitorInfoW failed, error %#x.\n", GetLastError());
+ ok(ret, "GetMonitorInfoW failed, error %#lx.\n", GetLastError());
monitor = (HMONITOR)(((ULONG_PTR)full_monitor & 0xffffffff) | ((ULONG_PTR)0x1234 << 32));
SetLastError(0xdeadbeef);
ret = GetMonitorInfoW(monitor, &monitor_info);
- ok(ret, "GetMonitorInfoW failed, error %#x.\n", GetLastError());
+ ok(ret, "GetMonitorInfoW failed, error %#lx.\n", GetLastError());
monitor = (HMONITOR)((ULONG_PTR)full_monitor & 0xffff);
SetLastError(0xdeadbeef);
ret = GetMonitorInfoW(monitor, &monitor_info);
todo_wine ok(!ret, "GetMonitorInfoW succeeded.\n");
- todo_wine ok(GetLastError() == ERROR_INVALID_MONITOR_HANDLE, "Expected error code %#x, got %#x.\n",
+ todo_wine ok(GetLastError() == ERROR_INVALID_MONITOR_HANDLE, "Expected error code %#x, got %#lx.\n",
ERROR_INVALID_MONITOR_HANDLE, GetLastError());
monitor = (HMONITOR)(((ULONG_PTR)full_monitor & 0xffff) | ((ULONG_PTR)0x9876 << 16));
SetLastError(0xdeadbeef);
ret = GetMonitorInfoW(monitor, &monitor_info);
ok(!ret, "GetMonitorInfoW succeeded.\n");
- ok(GetLastError() == ERROR_INVALID_MONITOR_HANDLE, "Expected error code %#x, got %#x.\n",
+ ok(GetLastError() == ERROR_INVALID_MONITOR_HANDLE, "Expected error code %#x, got %#lx.\n",
ERROR_INVALID_MONITOR_HANDLE, GetLastError());
monitor = (HMONITOR)(((ULONG_PTR)full_monitor & 0xffff) | ((ULONG_PTR)0x12345678 << 16));
SetLastError(0xdeadbeef);
ret = GetMonitorInfoW(monitor, &monitor_info);
ok(!ret, "GetMonitorInfoW succeeded.\n");
- ok(GetLastError() == ERROR_INVALID_MONITOR_HANDLE, "Expected error code %#x, got %#x.\n",
+ ok(GetLastError() == ERROR_INVALID_MONITOR_HANDLE, "Expected error code %#x, got %#lx.\n",
ERROR_INVALID_MONITOR_HANDLE, GetLastError());
#else
if ((ULONG_PTR)full_monitor >> 16)
@@ -2099,18 +2100,18 @@ static BOOL CALLBACK test_handle_proc(HMONITOR full_monitor, HDC hdc, LPRECT rec
SetLastError(0xdeadbeef);
ret = GetMonitorInfoW(monitor, &monitor_info);
todo_wine_if(((ULONG_PTR)full_monitor >> 16) == 0)
- ok(ret, "GetMonitorInfoW failed, error %#x.\n", GetLastError());
+ ok(ret, "GetMonitorInfoW failed, error %#lx.\n", GetLastError());
monitor = (HMONITOR)((ULONG_PTR)full_monitor & 0xffff);
SetLastError(0xdeadbeef);
ret = GetMonitorInfoW(monitor, &monitor_info);
- ok(ret, "GetMonitorInfoW failed, error %#x.\n", GetLastError());
+ ok(ret, "GetMonitorInfoW failed, error %#lx.\n", GetLastError());
monitor = (HMONITOR)(((ULONG_PTR)full_monitor & 0xffff) | ((ULONG_PTR)0x1234 << 16));
SetLastError(0xdeadbeef);
ret = GetMonitorInfoW(monitor, &monitor_info);
ok(!ret, "GetMonitorInfoW succeeded.\n");
- ok(GetLastError() == ERROR_INVALID_MONITOR_HANDLE, "Expected error code %#x, got %#x.\n",
+ ok(GetLastError() == ERROR_INVALID_MONITOR_HANDLE, "Expected error code %#x, got %#lx.\n",
ERROR_INVALID_MONITOR_HANDLE, GetLastError());
#endif
@@ -2123,7 +2124,7 @@ static void test_handles(void)
/* Test that monitor handles are user32 handles */
ret = EnumDisplayMonitors(NULL, NULL, test_handle_proc, 0);
- ok(ret, "EnumDisplayMonitors failed, error %#x.\n", GetLastError());
+ ok(ret, "EnumDisplayMonitors failed, error %#lx.\n", GetLastError());
}
#define check_display_dc(a, b, c) _check_display_dc(__LINE__, a, b, c)
@@ -2136,40 +2137,40 @@ static void _check_display_dc(INT line, HDC hdc, const DEVMODEA *dm, BOOL allow_
value = GetDeviceCaps(hdc, HORZRES);
todo_wine_if(allow_todo && dm->dmPelsWidth != GetSystemMetrics(SM_CXSCREEN))
- ok_(__FILE__, line)(value == dm->dmPelsWidth, "Expected HORZRES %d, got %d.\n",
+ ok_(__FILE__, line)(value == dm->dmPelsWidth, "Expected HORZRES %ld, got %d.\n",
dm->dmPelsWidth, value);
value = GetDeviceCaps(hdc, VERTRES);
todo_wine_if(allow_todo && dm->dmPelsHeight != GetSystemMetrics(SM_CYSCREEN))
- ok_(__FILE__, line)(value == dm->dmPelsHeight, "Expected VERTRES %d, got %d.\n",
+ ok_(__FILE__, line)(value == dm->dmPelsHeight, "Expected VERTRES %ld, got %d.\n",
dm->dmPelsHeight, value);
value = GetDeviceCaps(hdc, DESKTOPHORZRES);
todo_wine_if(dm->dmPelsWidth != GetSystemMetrics(SM_CXVIRTUALSCREEN)
&& value == GetSystemMetrics(SM_CXVIRTUALSCREEN))
- ok_(__FILE__, line)(value == dm->dmPelsWidth, "Expected DESKTOPHORZRES %d, got %d.\n",
+ ok_(__FILE__, line)(value == dm->dmPelsWidth, "Expected DESKTOPHORZRES %ld, got %d.\n",
dm->dmPelsWidth, value);
value = GetDeviceCaps(hdc, DESKTOPVERTRES);
todo_wine_if(dm->dmPelsHeight != GetSystemMetrics(SM_CYVIRTUALSCREEN)
&& value == GetSystemMetrics(SM_CYVIRTUALSCREEN))
- ok_(__FILE__, line)(value == dm->dmPelsHeight, "Expected DESKTOPVERTRES %d, got %d.\n",
+ ok_(__FILE__, line)(value == dm->dmPelsHeight, "Expected DESKTOPVERTRES %ld, got %d.\n",
dm->dmPelsHeight, value);
value = GetDeviceCaps(hdc, VREFRESH);
todo_wine_if(allow_todo)
- ok_(__FILE__, line)(value == dm->dmDisplayFrequency, "Expected VREFRESH %d, got %d.\n",
+ ok_(__FILE__, line)(value == dm->dmDisplayFrequency, "Expected VREFRESH %ld, got %d.\n",
dm->dmDisplayFrequency, value);
value = GetDeviceCaps(hdc, BITSPIXEL);
- ok_(__FILE__, line)(value == dm->dmBitsPerPel, "Expected BITSPIXEL %d, got %d.\n",
+ ok_(__FILE__, line)(value == dm->dmBitsPerPel, "Expected BITSPIXEL %ld, got %d.\n",
dm->dmBitsPerPel, value);
hbmp = GetCurrentObject(hdc, OBJ_BITMAP);
- ok_(__FILE__, line)(!!hbmp, "GetCurrentObject failed, error %#x.\n", GetLastError());
+ ok_(__FILE__, line)(!!hbmp, "GetCurrentObject failed, error %#lx.\n", GetLastError());
ret = GetObjectA(hbmp, sizeof(bitmap), &bitmap);
/* GetObjectA fails on Win7 and older */
- ok_(__FILE__, line)(ret || broken(!ret), "GetObjectA failed, error %d.\n", GetLastError());
+ ok_(__FILE__, line)(ret || broken(!ret), "GetObjectA failed, error %ld.\n", GetLastError());
if (ret)
{
ok_(__FILE__, line)(bitmap.bmType == 0, "Expected bmType %d, got %d.\n", 0, bitmap.bmType);
@@ -2217,12 +2218,12 @@ static void test_display_dc(void)
/* Test that CreateCompatibleBitmap() for display DCs creates DDBs */
hbitmap = CreateCompatibleBitmap(hdc, dm.dmPelsWidth, dm.dmPelsHeight);
- ok(!!hbitmap, "CreateCompatibleBitmap failed, error %d.\n", GetLastError());
+ ok(!!hbitmap, "CreateCompatibleBitmap failed, error %ld.\n", GetLastError());
count = GetObjectW(hbitmap, sizeof(dib), &dib);
ok(count == sizeof(BITMAP), "GetObject failed, count %d.\n", count);
count = GetObjectW(hbitmap, sizeof(bitmap), &bitmap);
ok(count == sizeof(BITMAP), "GetObject failed, count %d.\n", count);
- ok(bitmap.bmBitsPixel == dm.dmBitsPerPel, "Expected %d, got %d.\n", dm.dmBitsPerPel,
+ ok(bitmap.bmBitsPixel == dm.dmBitsPerPel, "Expected %ld, got %d.\n", dm.dmBitsPerPel,
bitmap.bmBitsPixel);
DeleteObject(hbitmap);
@@ -2233,7 +2234,7 @@ static void test_display_dc(void)
mem_dc = CreateCompatibleDC(hdc);
hbitmap = CreateBitmap(dm.dmPelsWidth, dm.dmPelsHeight, 1, bpps[i], NULL);
- ok(!!hbitmap, "CreateBitmap failed, error %d.\n", GetLastError());
+ ok(!!hbitmap, "CreateBitmap failed, error %ld.\n", GetLastError());
old_hbitmap = SelectObject(mem_dc, hbitmap);
if (bpps[i] != 1 && bpps[i] != 32)
ok(!old_hbitmap, "Selecting bitmap succeeded.\n");
@@ -2250,11 +2251,11 @@ static void test_display_dc(void)
/* Test selecting a DDB of the same color depth into a display compatible DC */
mem_dc = CreateCompatibleDC(hdc);
bpp = GetDeviceCaps(mem_dc, BITSPIXEL);
- ok(bpp == dm.dmBitsPerPel, "Expected bpp %d, got %d.\n", dm.dmBitsPerPel, bpp);
+ ok(bpp == dm.dmBitsPerPel, "Expected bpp %ld, got %d.\n", dm.dmBitsPerPel, bpp);
hbitmap = CreateCompatibleBitmap(hdc, dm.dmPelsWidth, dm.dmPelsHeight);
count = GetObjectW(hbitmap, sizeof(bitmap), &bitmap);
ok(count == sizeof(BITMAP), "GetObject failed, count %d.\n", count);
- ok(bitmap.bmBitsPixel == dm.dmBitsPerPel, "Expected %d, got %d.\n", dm.dmBitsPerPel, bitmap.bmBitsPixel);
+ ok(bitmap.bmBitsPixel == dm.dmBitsPerPel, "Expected %ld, got %d.\n", dm.dmBitsPerPel, bitmap.bmBitsPixel);
old_hbitmap = SelectObject(mem_dc, hbitmap);
ok(!!old_hbitmap, "Failed to select bitmap.\n");
SelectObject(mem_dc, old_hbitmap);
@@ -2273,13 +2274,13 @@ static void test_display_dc(void)
res = ChangeDisplaySettingsExA(NULL, &dm2, NULL, CDS_RESET, NULL);
ok(res == DISP_CHANGE_SUCCESSFUL || broken(res == DISP_CHANGE_FAILED), /* Win8 TestBots */
- "ChangeDisplaySettingsExA returned unexpected %d.\n", res);
+ "ChangeDisplaySettingsExA returned unexpected %ld.\n", res);
if (res == DISP_CHANGE_SUCCESSFUL)
{
check_display_dc(hdc, &dm2, FALSE);
res = ChangeDisplaySettingsExA(NULL, NULL, NULL, 0, NULL);
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA returned unexpected %d.\n", res);
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA returned unexpected %ld.\n", res);
}
/* Tests after mode changes to a different color depth */
@@ -2295,7 +2296,7 @@ static void test_display_dc(void)
res = ChangeDisplaySettingsExA(NULL, &dm2, NULL, CDS_RESET, NULL);
/* Win8 TestBots */
ok(res == DISP_CHANGE_SUCCESSFUL || broken(res == DISP_CHANGE_FAILED),
- "ChangeDisplaySettingsExA returned unexpected %d.\n", res);
+ "ChangeDisplaySettingsExA returned unexpected %ld.\n", res);
if (res == DISP_CHANGE_SUCCESSFUL)
{
check_display_dc(hdc, &dm2, FALSE);
@@ -2304,18 +2305,18 @@ static void test_display_dc(void)
* a display DC into a new compatible DC */
count = GetObjectW(hbitmap, sizeof(bitmap), &bitmap);
ok(count == sizeof(BITMAP), "GetObject failed, count %d.\n", count);
- ok(bitmap.bmBitsPixel == dm.dmBitsPerPel, "Expected %d, got %d.\n", dm.dmBitsPerPel,
+ ok(bitmap.bmBitsPixel == dm.dmBitsPerPel, "Expected %ld, got %d.\n", dm.dmBitsPerPel,
bitmap.bmBitsPixel);
/* Note that hbitmap is of a different color depth and it can be successfully selected
* into the new compatible DC */
mem_dc = CreateCompatibleDC(hdc);
bpp = GetDeviceCaps(mem_dc, BITSPIXEL);
- ok(bpp == dm2.dmBitsPerPel, "Expected bpp %d, got %d.\n", dm2.dmBitsPerPel, bpp);
+ ok(bpp == dm2.dmBitsPerPel, "Expected bpp %ld, got %d.\n", dm2.dmBitsPerPel, bpp);
old_hbitmap = SelectObject(mem_dc, hbitmap);
ok(!!old_hbitmap, "Failed to select bitmap.\n");
bpp = GetDeviceCaps(mem_dc, BITSPIXEL);
- ok(bpp == dm2.dmBitsPerPel, "Expected bpp %d, got %d.\n", dm2.dmBitsPerPel, bpp);
+ ok(bpp == dm2.dmBitsPerPel, "Expected bpp %ld, got %d.\n", dm2.dmBitsPerPel, bpp);
SelectObject(mem_dc, old_hbitmap);
DeleteDC(mem_dc);
DeleteObject(hbitmap);
@@ -2327,7 +2328,7 @@ static void test_display_dc(void)
mem_dc = CreateCompatibleDC(hdc);
hbitmap = CreateBitmap(dm2.dmPelsWidth, dm2.dmPelsHeight, 1, bpps[i], NULL);
- ok(!!hbitmap, "CreateBitmap failed, error %d.\n", GetLastError());
+ ok(!!hbitmap, "CreateBitmap failed, error %ld.\n", GetLastError());
old_hbitmap = SelectObject(mem_dc, hbitmap);
/* On Win7 dual-QXL test bot and XP, only 1-bit DDBs and DDBs with the same color
* depth can be selected to the compatible DC. On newer versions of Windows, only
@@ -2352,12 +2353,12 @@ static void test_display_dc(void)
hbitmap = NULL;
res = ChangeDisplaySettingsExA(NULL, NULL, NULL, 0, NULL);
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA returned unexpected %d.\n", res);
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA returned unexpected %ld.\n", res);
}
}
else
{
- win_skip("Failed to find a different color depth other than %u.\n", dm.dmBitsPerPel);
+ win_skip("Failed to find a different color depth other than %lu.\n", dm.dmBitsPerPel);
}
if (hbitmap)
@@ -2394,7 +2395,7 @@ static void test_display_dc(void)
res = ChangeDisplaySettingsExA(dd.DeviceName, &dm2, NULL, CDS_RESET, NULL);
ok(res == DISP_CHANGE_SUCCESSFUL || broken(res == DISP_CHANGE_FAILED), /* Win8 TestBots */
- "ChangeDisplaySettingsExA %s returned unexpected %d.\n", dd.DeviceName, res);
+ "ChangeDisplaySettingsExA %s returned unexpected %ld.\n", dd.DeviceName, res);
if (res != DISP_CHANGE_SUCCESSFUL)
{
win_skip("Failed to change display mode for %s.\n", dd.DeviceName);
@@ -2415,16 +2416,16 @@ static void test_display_dc(void)
if (dm2.dmBitsPerPel && dm2.dmBitsPerPel != dm.dmBitsPerPel)
{
res = ChangeDisplaySettingsExA(dd.DeviceName, &dm2, NULL, CDS_RESET, NULL);
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA returned unexpected %d.\n", res);
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA returned unexpected %ld.\n", res);
check_display_dc(hdc, &dm2, FALSE);
res = ChangeDisplaySettingsExA(NULL, NULL, NULL, 0, NULL);
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA returned unexpected %d.\n", res);
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA returned unexpected %ld.\n", res);
}
else
{
- win_skip("Failed to find a different color depth other than %u.\n", dm.dmBitsPerPel);
+ win_skip("Failed to find a different color depth other than %lu.\n", dm.dmBitsPerPel);
}
/* Tests after monitor detach */
@@ -2444,10 +2445,10 @@ static void test_display_dc(void)
dm3.dmPelsWidth = 0;
dm3.dmPelsHeight = 0;
res = ChangeDisplaySettingsExA(dd.DeviceName, &dm3, NULL, CDS_UPDATEREGISTRY | CDS_NORESET, NULL);
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %d.\n",
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %ld.\n",
dd.DeviceName, res);
res = ChangeDisplaySettingsExA(dd.DeviceName, NULL, NULL, 0, NULL);
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %d.\n",
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %ld.\n",
dd.DeviceName, res);
count = GetSystemMetrics(SM_CMONITORS);
@@ -2458,10 +2459,10 @@ static void test_display_dc(void)
}
res = ChangeDisplaySettingsExA(dd.DeviceName, &dm, NULL, CDS_UPDATEREGISTRY | CDS_NORESET, NULL);
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %d.\n",
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %ld.\n",
dd.DeviceName, res);
res = ChangeDisplaySettingsExA(NULL, NULL, NULL, 0, NULL);
- ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %d.\n",
+ ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %ld.\n",
dd.DeviceName, res);
DeleteDC(hdc);
}
1
0
[PATCH 1/3] dlls/oleaut32/tests: convert UI8 to existing integer test scheme (vartype.c)
by Eric Pouech March 12, 2022
by Eric Pouech March 12, 2022
March 12, 2022
- getting rid of EXPECTI8 macro
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/oleaut32/tests/vartype.c | 152 +++++++++++++++++------------------------
1 file changed, 63 insertions(+), 89 deletions(-)
diff --git a/dlls/oleaut32/tests/vartype.c b/dlls/oleaut32/tests/vartype.c
index 1f8cafc82b8..601520eb2f6 100644
--- a/dlls/oleaut32/tests/vartype.c
+++ b/dlls/oleaut32/tests/vartype.c
@@ -1871,13 +1871,6 @@ static void test_VarUI4ChangeTypeEx(void)
#undef EXPECTRES
#define EXPECTRES(res, x) _EXPECTRES(res, x, "%I64d")
-#define EXPECTI8(x) \
- ok((hres == S_OK && out == (CONV_TYPE)(x)), \
- "expected " #x "(%u,%u), got (%u,%u); hres=0x%08x\n", \
- (ULONG)((LONG64)(x) >> 32), (ULONG)((x) & 0xffffffff), \
- (ULONG)(out >> 32), (ULONG)(out & 0xffffffff), hres)
-
-
static void test_VarI8FromI1(void)
{
CONVVARS(signed char);
@@ -2087,20 +2080,16 @@ static void test_VarI8ChangeTypeEx(void)
/* Adapt the test macros to UI8 */
#undef CONV_TYPE
#define CONV_TYPE ULONG64
+#undef EXPECTRES
+#define EXPECTRES(res, x) _EXPECTRES(res, x, "%I64u")
static void test_VarUI8FromI1(void)
{
CONVVARS(signed char);
int i;
- for (i = -128; i < 128; i++)
- {
- CONVERT(VarUI8FromI1,i);
- if (i < 0)
- EXPECT_OVERFLOW;
- else
- EXPECTI8(i);
- }
+ OVERFLOWRANGE(VarUI8FromI1, -128, 0);
+ CONVERTRANGE(VarUI8FromI1, 0, 128);
}
static void test_VarUI8FromUI1(void)
@@ -2108,10 +2097,7 @@ static void test_VarUI8FromUI1(void)
CONVVARS(BYTE);
int i;
- for (i = 0; i < 256; i++)
- {
- CONVERT(VarUI8FromUI1,i); EXPECTI8(i);
- }
+ CONVERTRANGE(VarUI8FromUI1, 0, 256);
}
static void test_VarUI8FromI2(void)
@@ -2119,14 +2105,8 @@ static void test_VarUI8FromI2(void)
CONVVARS(SHORT);
int i;
- for (i = -32768; i < 32768; i++)
- {
- CONVERT(VarUI8FromI2,i);
- if (i < 0)
- EXPECT_OVERFLOW;
- else
- EXPECTI8(i);
- }
+ OVERFLOWRANGE(VarUI8FromI2, -32768, 0);
+ CONVERTRANGE(VarUI8FromI2, 0, 32768);
}
static void test_VarUI8FromUI2(void)
@@ -2134,18 +2114,15 @@ static void test_VarUI8FromUI2(void)
CONVVARS(USHORT);
int i;
- for (i = 0; i < 65535; i++)
- {
- CONVERT(VarUI8FromUI2,i); EXPECTI8(i);
- }
+ CONVERTRANGE(VarUI8FromUI2, 0, 65535);
}
static void test_VarUI8FromUI4(void)
{
CONVVARS(ULONG);
- CONVERT(VarUI8FromUI4, 0); EXPECTI8(0);
- CONVERT(VarUI8FromUI4, 0xffffffff); EXPECTI8(0xffffffff);
+ CONVERT(VarUI8FromUI4, 0); EXPECT(0);
+ CONVERT(VarUI8FromUI4, 0xffffffff); EXPECT(0xffffffff);
}
static void test_VarUI8FromR4(void)
@@ -2153,18 +2130,18 @@ static void test_VarUI8FromR4(void)
CONVVARS(FLOAT);
CONVERT(VarUI8FromR4, -1.0f); EXPECT_OVERFLOW;
- CONVERT(VarUI8FromR4, 0.0f); EXPECTI8(0);
- CONVERT(VarUI8FromR4, 1.0f); EXPECTI8(1);
- CONVERT(VarUI8FromR4, 255.0f); EXPECTI8(255);
+ CONVERT(VarUI8FromR4, 0.0f); EXPECT(0);
+ CONVERT(VarUI8FromR4, 1.0f); EXPECT(1);
+ CONVERT(VarUI8FromR4, 255.0f); EXPECT(255);
CONVERT(VarUI8FromR4, -1.5f); EXPECT_OVERFLOW;
CONVERT(VarUI8FromR4, -0.6f); EXPECT_OVERFLOW;
- CONVERT(VarUI8FromR4, -0.5f); EXPECTI8(0);
- CONVERT(VarUI8FromR4, -0.4f); EXPECTI8(0);
- CONVERT(VarUI8FromR4, 0.4f); EXPECTI8(0);
- CONVERT(VarUI8FromR4, 0.5f); EXPECTI8(0);
- CONVERT(VarUI8FromR4, 0.6f); EXPECTI8(1);
- CONVERT(VarUI8FromR4, 1.5f); EXPECTI8(2);
+ CONVERT(VarUI8FromR4, -0.5f); EXPECT(0);
+ CONVERT(VarUI8FromR4, -0.4f); EXPECT(0);
+ CONVERT(VarUI8FromR4, 0.4f); EXPECT(0);
+ CONVERT(VarUI8FromR4, 0.5f); EXPECT(0);
+ CONVERT(VarUI8FromR4, 0.6f); EXPECT(1);
+ CONVERT(VarUI8FromR4, 1.5f); EXPECT(2);
}
static void test_VarUI8FromR8(void)
@@ -2172,18 +2149,18 @@ static void test_VarUI8FromR8(void)
CONVVARS(DOUBLE);
CONVERT(VarUI8FromR8, -1.0); EXPECT_OVERFLOW;
- CONVERT(VarUI8FromR8, 0.0); EXPECTI8(0);
- CONVERT(VarUI8FromR8, 1.0); EXPECTI8(1);
- CONVERT(VarUI8FromR8, 255.0); EXPECTI8(255);
+ CONVERT(VarUI8FromR8, 0.0); EXPECT(0);
+ CONVERT(VarUI8FromR8, 1.0); EXPECT(1);
+ CONVERT(VarUI8FromR8, 255.0); EXPECT(255);
CONVERT(VarUI8FromR8, -1.5); EXPECT_OVERFLOW;
CONVERT(VarUI8FromR8, -0.6); EXPECT_OVERFLOW;
- CONVERT(VarUI8FromR8, -0.5); EXPECTI8(0);
- CONVERT(VarUI8FromR8, -0.4); EXPECTI8(0);
- CONVERT(VarUI8FromR8, 0.4); EXPECTI8(0);
- CONVERT(VarUI8FromR8, 0.5); EXPECTI8(0);
- CONVERT(VarUI8FromR8, 0.6); EXPECTI8(1);
- CONVERT(VarUI8FromR8, 1.5); EXPECTI8(2);
+ CONVERT(VarUI8FromR8, -0.5); EXPECT(0);
+ CONVERT(VarUI8FromR8, -0.4); EXPECT(0);
+ CONVERT(VarUI8FromR8, 0.4); EXPECT(0);
+ CONVERT(VarUI8FromR8, 0.5); EXPECT(0);
+ CONVERT(VarUI8FromR8, 0.6); EXPECT(1);
+ CONVERT(VarUI8FromR8, 1.5); EXPECT(2);
}
static void test_VarUI8FromDate(void)
@@ -2191,18 +2168,18 @@ static void test_VarUI8FromDate(void)
CONVVARS(DATE);
CONVERT(VarUI8FromDate, -1.0); EXPECT_OVERFLOW;
- CONVERT(VarUI8FromDate, 0.0); EXPECTI8(0);
- CONVERT(VarUI8FromDate, 1.0); EXPECTI8(1);
- CONVERT(VarUI8FromDate, 255.0); EXPECTI8(255);
+ CONVERT(VarUI8FromDate, 0.0); EXPECT(0);
+ CONVERT(VarUI8FromDate, 1.0); EXPECT(1);
+ CONVERT(VarUI8FromDate, 255.0); EXPECT(255);
CONVERT(VarUI8FromDate, -1.5); EXPECT_OVERFLOW;
CONVERT(VarUI8FromDate, -0.6); EXPECT_OVERFLOW;
- CONVERT(VarUI8FromDate, -0.5); EXPECTI8(0);
- CONVERT(VarUI8FromDate, -0.4); EXPECTI8(0);
- CONVERT(VarUI8FromDate, 0.4); EXPECTI8(0);
- CONVERT(VarUI8FromDate, 0.5); EXPECTI8(0);
- CONVERT(VarUI8FromDate, 0.6); EXPECTI8(1);
- CONVERT(VarUI8FromDate, 1.5); EXPECTI8(2);
+ CONVERT(VarUI8FromDate, -0.5); EXPECT(0);
+ CONVERT(VarUI8FromDate, -0.4); EXPECT(0);
+ CONVERT(VarUI8FromDate, 0.4); EXPECT(0);
+ CONVERT(VarUI8FromDate, 0.5); EXPECT(0);
+ CONVERT(VarUI8FromDate, 0.6); EXPECT(1);
+ CONVERT(VarUI8FromDate, 1.5); EXPECT(2);
}
static void test_VarUI8FromBool(void)
@@ -2210,10 +2187,7 @@ static void test_VarUI8FromBool(void)
CONVVARS(VARIANT_BOOL);
int i;
- for (i = -32768; i < 32768; i++)
- {
- CONVERT(VarUI8FromBool, i); EXPECTI8(i);
- }
+ CONVERTRANGE(VarUI8FromBool, -32768, 32768);
}
static void test_VarUI8FromI8(void)
@@ -2221,8 +2195,8 @@ static void test_VarUI8FromI8(void)
CONVVARS(LONG64);
CONVERT(VarUI8FromI8, -1); EXPECT_OVERFLOW;
- CONVERT(VarUI8FromI8, 0); EXPECTI8(0);
- CONVERT(VarUI8FromI8, 1); EXPECTI8(1);
+ CONVERT(VarUI8FromI8, 0); EXPECT(0);
+ CONVERT(VarUI8FromI8, 1); EXPECT(1);
}
static void test_VarUI8FromCy(void)
@@ -2230,18 +2204,18 @@ static void test_VarUI8FromCy(void)
CONVVARS(CY);
CONVERT_CY(VarUI8FromCy,-1); EXPECT_OVERFLOW;
- CONVERT_CY(VarUI8FromCy,0); EXPECTI8(0);
- CONVERT_CY(VarUI8FromCy,1); EXPECTI8(1);
- CONVERT_CY(VarUI8FromCy,255); EXPECTI8(255);
+ CONVERT_CY(VarUI8FromCy,0); EXPECT(0);
+ CONVERT_CY(VarUI8FromCy,1); EXPECT(1);
+ CONVERT_CY(VarUI8FromCy,255); EXPECT(255);
CONVERT_CY(VarUI8FromCy,-1.5); EXPECT_OVERFLOW;
CONVERT_CY(VarUI8FromCy,-0.6); EXPECT_OVERFLOW;
- CONVERT_CY(VarUI8FromCy,-0.5); EXPECTI8(0);
- CONVERT_CY(VarUI8FromCy,-0.4); EXPECTI8(0);
- CONVERT_CY(VarUI8FromCy,0.4); EXPECTI8(0);
- CONVERT_CY(VarUI8FromCy,0.5); EXPECTI8(0);
- CONVERT_CY(VarUI8FromCy,0.6); EXPECTI8(1);
- CONVERT_CY(VarUI8FromCy,1.5); EXPECTI8(2);
+ CONVERT_CY(VarUI8FromCy,-0.5); EXPECT(0);
+ CONVERT_CY(VarUI8FromCy,-0.4); EXPECT(0);
+ CONVERT_CY(VarUI8FromCy,0.4); EXPECT(0);
+ CONVERT_CY(VarUI8FromCy,0.5); EXPECT(0);
+ CONVERT_CY(VarUI8FromCy,0.6); EXPECT(1);
+ CONVERT_CY(VarUI8FromCy,1.5); EXPECT(2);
}
static void test_VarUI8FromDec(void)
@@ -2256,12 +2230,12 @@ static void test_VarUI8FromDec(void)
CONVERT_DEC(VarUI8FromDec,0,0x80,0,1);
}
- CONVERT_DEC(VarUI8FromDec,0,0,0,0); EXPECTI8(0);
- CONVERT_DEC(VarUI8FromDec,0,0,0,1); EXPECTI8(1);
- CONVERT_DEC(VarUI8FromDec,0,0,0,255); EXPECTI8(255);
+ CONVERT_DEC(VarUI8FromDec,0,0,0,0); EXPECT(0);
+ CONVERT_DEC(VarUI8FromDec,0,0,0,1); EXPECT(1);
+ CONVERT_DEC(VarUI8FromDec,0,0,0,255); EXPECT(255);
CONVERT_DEC(VarUI8FromDec,2,0x80,0,100); EXPECT_OVERFLOW;
- CONVERT_DEC(VarUI8FromDec,2,0,0,25500); EXPECTI8(255);
+ CONVERT_DEC(VarUI8FromDec,2,0,0,25500); EXPECT(255);
}
static void test_VarUI8FromStr(void)
@@ -2272,21 +2246,21 @@ static void test_VarUI8FromStr(void)
in = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT);
CONVERT_STR(VarUI8FromStr,NULL,0); EXPECT_MISMATCH;
- CONVERT_STR(VarUI8FromStr,"0",0); EXPECTI8(0);
+ CONVERT_STR(VarUI8FromStr,"0",0); EXPECT(0);
CONVERT_STR(VarUI8FromStr,"-1",0); EXPECT_OVERFLOW;
- CONVERT_STR(VarUI8FromStr,"2147483647",0); EXPECTI8(2147483647);
- CONVERT_STR(VarUI8FromStr,"18446744073709551614",0); EXPECTI8(0xFFFFFFFFFFFFFFFEull);
- CONVERT_STR(VarUI8FromStr,"18446744073709551615",0); EXPECTI8(0xFFFFFFFFFFFFFFFFull);
+ CONVERT_STR(VarUI8FromStr,"2147483647",0); EXPECT(2147483647);
+ CONVERT_STR(VarUI8FromStr,"18446744073709551614",0); EXPECT(0xFFFFFFFFFFFFFFFEull);
+ CONVERT_STR(VarUI8FromStr,"18446744073709551615",0); EXPECT(0xFFFFFFFFFFFFFFFFull);
CONVERT_STR(VarUI8FromStr,"18446744073709551616",0); EXPECT_OVERFLOW;
CONVERT_STR(VarUI8FromStr,"-1.5",LOCALE_NOUSEROVERRIDE); EXPECT_OVERFLOW;
CONVERT_STR(VarUI8FromStr,"-0.6",LOCALE_NOUSEROVERRIDE); EXPECT_OVERFLOW;
- CONVERT_STR(VarUI8FromStr,"-0.5",LOCALE_NOUSEROVERRIDE); EXPECTI8(0);
- CONVERT_STR(VarUI8FromStr,"-0.4",LOCALE_NOUSEROVERRIDE); EXPECTI8(0);
- CONVERT_STR(VarUI8FromStr,"0.4",LOCALE_NOUSEROVERRIDE); EXPECTI8(0);
- CONVERT_STR(VarUI8FromStr,"0.5",LOCALE_NOUSEROVERRIDE); EXPECTI8(0);
- CONVERT_STR(VarUI8FromStr,"0.6",LOCALE_NOUSEROVERRIDE); EXPECTI8(1);
- CONVERT_STR(VarUI8FromStr,"1.5",LOCALE_NOUSEROVERRIDE); EXPECTI8(2);
+ CONVERT_STR(VarUI8FromStr,"-0.5",LOCALE_NOUSEROVERRIDE); EXPECT(0);
+ CONVERT_STR(VarUI8FromStr,"-0.4",LOCALE_NOUSEROVERRIDE); EXPECT(0);
+ CONVERT_STR(VarUI8FromStr,"0.4",LOCALE_NOUSEROVERRIDE); EXPECT(0);
+ CONVERT_STR(VarUI8FromStr,"0.5",LOCALE_NOUSEROVERRIDE); EXPECT(0);
+ CONVERT_STR(VarUI8FromStr,"0.6",LOCALE_NOUSEROVERRIDE); EXPECT(1);
+ CONVERT_STR(VarUI8FromStr,"1.5",LOCALE_NOUSEROVERRIDE); EXPECT(2);
}
static void test_VarUI8Copy(void)
1
2
March 12, 2022
This fixes the send part of the issue #52401 [1]: "Improper
synchronization in sock_recv/sock_send leads to arbitrary reordering of
completion of I/O requests", which was initially reported (outside
Bugzilla) by Dongwan Kim [2].
Changelog:
v1 -> v2:
- drop patch "server: Compact struct set_async_direct_result_reply."
- add async and fd arguments to async_initial_status_callback
- recv_socket_initial_callback: pass OOB flag via private instead of
implementing two separate functions for OOB and non-OOB
- detect short write in send_socket_initial_callback
- preserve the behaviour of returning success if we had a short write
and the socket is nonblocking and force_async is unset
v2 -> v3:
- fix typo in comment
v3 -> v4:
- fix typo in commit message
- address feedback
- drop patch "server: Defer postprocessing until after setting initial
status in recv_socket handler."
v4 -> v5:
- drop patch "server: Add async_initial_status_callback."
- drop patch "server: Defer postprocessing until after setting initial
status in send_socket handler."
- add patch "server: Ensure completion_callback is called before async
is destroyed."
- add patch "ws2_32/tests: Continue sending remaining data on short
write in test_write_events."
- add patch "server: Defer clearing events until async is either pending
or completed in send_socket handler."
- add patch "server: Ensure datagram sockets are bound in send_socket."
v5 -> v6:
- centralise status code computation in one place, even for bind errno
translation
- fix erroneous subject (s/either pending or completed/completed/)
Supersedes 227636 - 227644.
Supersedes 228988 - 228998.
[1] https://bugs.winehq.org/show_bug.cgi?id=52401
[2] https://www.winehq.org/pipermail/wine-devel/2021-May/186454.html
Jinoh Kang (10):
server: Actually set initial status in set_async_direct_result
handler.
server: Ensure initial status is set in async_set_result().
server: Ensure completion_callback is called before async is
destroyed.
ws2_32/tests: Continue sending remaining data on short write in
test_write_events.
server: Defer clearing events until async is completed in send_socket
handler.
server: Add mark_pending field to set_async_direct_result request.
server: Attempt to complete I/O request immediately in send_socket.
server: Ensure datagram sockets are bound in send_socket.
ntdll: Don't call try_send before server call in sock_send.
server: Replace redundant send_socket status fields with force_async
boolean field.
dlls/ntdll/unix/socket.c | 91 ++++++++++++------
dlls/ntdll/unix/sync.c | 9 +-
dlls/ntdll/unix/unix_private.h | 2 +-
dlls/ws2_32/tests/sock.c | 23 ++---
server/async.c | 27 +++---
server/protocol.def | 5 +-
server/sock.c | 164 +++++++++++++++++++++++----------
7 files changed, 213 insertions(+), 108 deletions(-)
--
2.34.1
2
11
Binary packages for various distributions will be available from:
https://www.winehq.org/download
Summary since last release
* Rebased to current wine 7.4 (561 patches are applied to wine vanilla)
Upstreamed (Either directly from staging or fixed with a similar patch).
* None
Added:
* None
Updated:
* Various patchset to remove the long warnings.
Where can you help
* Run Steam/Battle.net/GOG/UPlay/Epic
* Test your favorite game.
* Test your favorite applications.
* Improve staging patches and get them accepted upstream.
As always, if you find a bug, please report it via
https://bugs.winehq.org
Best Regards
Alistair.
1
0
Signed-off-by: Mohamad Al-Jaf <mohamadaljaf(a)gmail.com>
---
The function WinUsb_Free is defined without WINBASEAPI
in the Windows SDK header.
---
include/Makefile.in | 1 +
include/winusb.h | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 37 insertions(+)
create mode 100644 include/winusb.h
diff --git a/include/Makefile.in b/include/Makefile.in
index 9578c557af7..189b4676091 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -833,6 +833,7 @@ SOURCES = \
wintabx.h \
winternl.h \
wintrust.h \
+ winusb.h \
winuser.h \
winuser.rh \
winver.h \
diff --git a/include/winusb.h b/include/winusb.h
new file mode 100644
index 00000000000..188b4380878
--- /dev/null
+++ b/include/winusb.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2022 Mohamad Al-Jaf
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef _WINUSB_H_
+#define _WINUSB_H_
+
+#include <winapifamily.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef PVOID WINUSB_INTERFACE_HANDLE, *PWINUSB_INTERFACE_HANDLE;
+
+BOOL WINAPI WinUsb_Free(WINUSB_INTERFACE_HANDLE);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _WINUSB_H_ */
--
2.35.1
2
3
3
3
March 11, 2022
This fixes the send part of the issue #52401 [1]: "Improper
synchronization in sock_recv/sock_send leads to arbitrary reordering of
completion of I/O requests", which was initially reported (outside
Bugzilla) by Dongwan Kim [2].
Changelog:
v1 -> v2:
- drop patch "server: Compact struct set_async_direct_result_reply."
- add async and fd arguments to async_initial_status_callback
- recv_socket_initial_callback: pass OOB flag via private instead of
implementing two separate functions for OOB and non-OOB
- detect short write in send_socket_initial_callback
- preserve the behaviour of returning success if we had a short write
and the socket is nonblocking and force_async is unset
v2 -> v3:
- fix typo in comment
v3 -> v4:
- fix typo in commit message
- address feedback
- drop patch "server: Defer postprocessing until after setting initial
status in recv_socket handler."
v4 -> v5:
- drop patch "server: Add async_initial_status_callback."
- dorp patch "server: Defer postprocessing until after setting initial
status in send_socket handler."
- add patch "server: Ensure completion_callback is called before async
is destroyed."
- add patch "ws2_32/tests: Continue sending remaining data on short
write in test_write_events."
- add patch "server: Defer clearing events until async is either pending
or completed in send_socket handler."
- add patch "server: Ensure datagram sockets are bound in send_socket."
[1] https://bugs.winehq.org/show_bug.cgi?id=52401
[2] https://www.winehq.org/pipermail/wine-devel/2021-May/186454.html
Jinoh Kang (10):
server: Actually set initial status in set_async_direct_result
handler.
server: Ensure initial status is set in async_set_result().
server: Ensure completion_callback is called before async is
destroyed.
ws2_32/tests: Continue sending remaining data on short write in
test_write_events.
server: Defer clearing events until async is either pending or
completed in send_socket handler.
server: Add mark_pending field to set_async_direct_result request.
server: Attempt to complete I/O request immediately in send_socket.
server: Ensure datagram sockets are bound in send_socket.
ntdll: Don't call try_send before server call in sock_send.
server: Replace redundant send_socket status fields with force_async
boolean field.
dlls/ntdll/unix/socket.c | 91 ++++++++++++------
dlls/ntdll/unix/sync.c | 9 +-
dlls/ntdll/unix/unix_private.h | 2 +-
dlls/ws2_32/tests/sock.c | 23 ++---
server/async.c | 27 +++---
server/protocol.def | 5 +-
server/sock.c | 164 +++++++++++++++++++++++----------
7 files changed, 213 insertions(+), 108 deletions(-)
--
2.34.1
1
10
March 11, 2022
Make sure to flush the output buffer after drawing. Helps applications
that draw to HWNDs belonging to another process.
Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com>
---
This fixes an issue with Chromium based applications that draw on HWNDs
that belong to other processes. Without calling XFlush, we often end up
one frame behind, with the XFlush call in free_xrender_picture causing
the update.
This may not be the correct way to solve the issue I'm dealing with, so
if not, I'd also appreciate feedback/ideas on a proper way to solve the
problem.
---
dlls/winex11.drv/xrender.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c
index 5ede97fb026..fce1b231919 100644
--- a/dlls/winex11.drv/xrender.c
+++ b/dlls/winex11.drv/xrender.c
@@ -1508,6 +1508,8 @@ static void xrender_blit( int op, Picture src_pict, Picture mask_pict, Picture d
}
pXRenderComposite( gdi_display, op, src_pict, mask_pict, dst_pict,
x_offset, y_offset, 0, 0, x_dst, y_dst, width_dst, height_dst );
+
+ XFlush( gdi_display );
}
/* Helper function for (stretched) mono->color blitting using xrender */
--
2.25.1
1
0