Signed-off-by: Eric Pouech eric.pouech@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); }