FWIW, I split user32/tests in 3 sub-patches in order to ease review A+ ---
Eric Pouech (20): dlls/kernel32/tests/sync.c: enable compilation with long types dlls/kernel32/tests/thread.c: enable compilation with long types dlls/kernel32/tests/virtual.c: enable compilation with long types dlls/kernel32/tests/volume.c: enable compilation with long types dlls/urlmon/tests: enable compilation with long types dlls/userenv/tests: enable compilation with long types dlls/uxtheme/tests: enable compilation with long types dlls/user32/tests: use correct integral type dlls/user32/tests: wrap helper macro inside function dlls/user32/tests/[a-i]*.c: enable compilation with long types dlls/user32/tests/[j-u]*.c: enable compilation with long types dlls/user32/tests: enable compilation with long types dlls/vbscript/tests: enable compilation with long types dlls/vcomp110/tests: enable compilation with long types dlls/vcomp/tests: enable compilation with long types dlls/version/tests: enable compilation with long types dlls/virtdisk/tests: enable compilation with long types dlls/vulkan-1/tests: enable compilation with long types dlls/wer/tests: enable compilation with long types dlls/wevtapi/tests: enable compilation with long types
dlls/kernel32/tests/sync.c | 463 ++++---- dlls/kernel32/tests/thread.c | 405 +++---- dlls/kernel32/tests/virtual.c | 1839 ++++++++++++++++--------------- dlls/kernel32/tests/volume.c | 423 +++---- dlls/urlmon/tests/Makefile.in | 1 - dlls/urlmon/tests/misc.c | 668 +++++------ dlls/urlmon/tests/protocol.c | 606 +++++----- dlls/urlmon/tests/sec_mgr.c | 382 +++---- dlls/urlmon/tests/stream.c | 32 +- dlls/urlmon/tests/uri.c | 1086 +++++++++--------- dlls/urlmon/tests/url.c | 558 +++++----- dlls/user32/tests/Makefile.in | 1 - dlls/user32/tests/broadcast.c | 60 +- dlls/user32/tests/class.c | 84 +- dlls/user32/tests/clipboard.c | 400 +++---- dlls/user32/tests/combo.c | 58 +- dlls/user32/tests/cursoricon.c | 300 ++--- dlls/user32/tests/dce.c | 24 +- dlls/user32/tests/dde.c | 481 ++++---- dlls/user32/tests/dialog.c | 108 +- dlls/user32/tests/edit.c | 207 ++-- dlls/user32/tests/input.c | 444 ++++---- dlls/user32/tests/listbox.c | 210 ++-- dlls/user32/tests/menu.c | 332 +++--- dlls/user32/tests/monitor.c | 434 ++++---- dlls/user32/tests/msg.c | 972 ++++++++-------- dlls/user32/tests/resource.c | 20 +- dlls/user32/tests/scroll.c | 92 +- dlls/user32/tests/static.c | 16 +- dlls/user32/tests/sysparams.c | 592 +++++----- dlls/user32/tests/text.c | 72 +- dlls/user32/tests/uitools.c | 4 +- dlls/user32/tests/win.c | 1498 ++++++++++++------------- dlls/user32/tests/winstation.c | 158 +-- dlls/user32/tests/wsprintf.c | 8 +- dlls/userenv/tests/Makefile.in | 1 - dlls/userenv/tests/userenv.c | 46 +- dlls/uxtheme/tests/Makefile.in | 1 - dlls/uxtheme/tests/msg.h | 16 +- dlls/uxtheme/tests/system.c | 404 +++---- dlls/uxtheme/tests/v6util.h | 4 +- dlls/vbscript/tests/Makefile.in | 1 - dlls/vbscript/tests/createobj.c | 84 +- dlls/vbscript/tests/run.c | 380 +++---- dlls/vbscript/tests/vbscript.c | 738 ++++++------- dlls/vcomp/tests/Makefile.in | 1 - dlls/vcomp/tests/vcomp.c | 156 +-- dlls/vcomp110/tests/Makefile.in | 1 - dlls/vcomp110/tests/vcomp110.c | 4 +- dlls/version/tests/Makefile.in | 1 - dlls/version/tests/info.c | 138 +-- dlls/version/tests/install.c | 76 +- dlls/virtdisk/tests/Makefile.in | 1 - dlls/virtdisk/tests/virtdisk.c | 16 +- dlls/vulkan-1/tests/Makefile.in | 1 - dlls/vulkan-1/tests/vulkan.c | 4 +- dlls/wer/tests/Makefile.in | 1 - dlls/wer/tests/main.c | 82 +- dlls/wevtapi/tests/Makefile.in | 1 - dlls/wevtapi/tests/wevtapi.c | 16 +- 60 files changed, 7604 insertions(+), 7608 deletions(-)
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/kernel32/tests/sync.c | 463 ++++++++++++++++++++++---------------------- 1 file changed, 232 insertions(+), 231 deletions(-)
diff --git a/dlls/kernel32/tests/sync.c b/dlls/kernel32/tests/sync.c index a6ee90b81f3..e70ebf9ea96 100644 --- a/dlls/kernel32/tests/sync.c +++ b/dlls/kernel32/tests/sync.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 <stdarg.h> #include <stdlib.h> @@ -194,35 +195,35 @@ static void test_mutex(void) SetLastError(0xdeadbeef); hOpened = OpenMutexA(0, FALSE, "WineTestMutex"); ok(hOpened == NULL, "OpenMutex succeeded\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %lu\n", GetLastError());
SetLastError(0xdeadbeef); hCreated = CreateMutexA(NULL, FALSE, "WineTestMutex"); - ok(hCreated != NULL, "CreateMutex failed with error %d\n", GetLastError()); + ok(hCreated != NULL, "CreateMutex failed with error %ld\n", GetLastError());
SetLastError(0xdeadbeef); hOpened = OpenMutexA(0, FALSE, "WineTestMutex"); todo_wine ok(hOpened == NULL, "OpenMutex succeeded\n"); todo_wine - ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error %lu\n", GetLastError());
SetLastError(0xdeadbeef); hOpened = OpenMutexA(GENERIC_EXECUTE, FALSE, "WineTestMutex"); - ok(hOpened != NULL, "OpenMutex failed with error %d\n", GetLastError()); + ok(hOpened != NULL, "OpenMutex failed with error %ld\n", GetLastError()); wait_ret = WaitForSingleObject(hOpened, INFINITE); - ok(wait_ret == WAIT_OBJECT_0, "WaitForSingleObject failed with error %d\n", GetLastError()); + ok(wait_ret == WAIT_OBJECT_0, "WaitForSingleObject failed with error %ld\n", GetLastError()); CloseHandle(hOpened);
for(i=0; i < 31; i++) { wait_ret = WaitForSingleObject(hCreated, INFINITE); - ok(wait_ret == WAIT_OBJECT_0, "WaitForSingleObject failed with error 0x%08x\n", wait_ret); + ok(wait_ret == WAIT_OBJECT_0, "WaitForSingleObject failed with error 0x%08lx\n", wait_ret); }
SetLastError(0xdeadbeef); hOpened = OpenMutexA(GENERIC_READ | GENERIC_WRITE, FALSE, "WineTestMutex"); - ok(hOpened != NULL, "OpenMutex failed with error %d\n", GetLastError()); + ok(hOpened != NULL, "OpenMutex failed with error %ld\n", GetLastError()); wait_ret = WaitForSingleObject(hOpened, INFINITE); ok(wait_ret == WAIT_FAILED, "WaitForSingleObject succeeded\n"); CloseHandle(hOpened); @@ -235,60 +236,60 @@ static void test_mutex(void) { SetLastError(0xdeadbeef); ret = ReleaseMutex(hOpened); - ok(ret, "ReleaseMutex failed with error %d, access %x\n", GetLastError(), 1 << i); + ok(ret, "ReleaseMutex failed with error %ld, access %x\n", GetLastError(), 1 << i); CloseHandle(hOpened); } else { if ((1 << i) == ACCESS_SYSTEM_SECURITY) - todo_wine ok(GetLastError() == ERROR_PRIVILEGE_NOT_HELD, "wrong error %u, access %x\n", GetLastError(), 1 << i); + todo_wine ok(GetLastError() == ERROR_PRIVILEGE_NOT_HELD, "wrong error %lu, access %x\n", GetLastError(), 1 << i); else - todo_wine ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error %u, , access %x\n", GetLastError(), 1 << i); + todo_wine ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error %lu, , access %x\n", GetLastError(), 1 << i); ReleaseMutex(hCreated); failed |=0x1 << i; } }
todo_wine - ok( failed == 0x0de0fffe, "open succeeded when it shouldn't: %x\n", failed); + ok( failed == 0x0de0fffe, "open succeeded when it shouldn't: %lx\n", failed);
SetLastError(0xdeadbeef); ret = ReleaseMutex(hCreated); ok(!ret && (GetLastError() == ERROR_NOT_OWNER), - "ReleaseMutex should have failed with ERROR_NOT_OWNER instead of %d\n", GetLastError()); + "ReleaseMutex should have failed with ERROR_NOT_OWNER instead of %ld\n", GetLastError());
/* test case sensitivity */
SetLastError(0xdeadbeef); hOpened = OpenMutexA(READ_CONTROL, FALSE, "WINETESTMUTEX"); ok(!hOpened, "OpenMutex succeeded\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %lu\n", GetLastError());
SetLastError(0xdeadbeef); hOpened = OpenMutexA(READ_CONTROL, FALSE, "winetestmutex"); ok(!hOpened, "OpenMutex succeeded\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %lu\n", GetLastError());
SetLastError(0xdeadbeef); hOpened = OpenMutexA(READ_CONTROL, FALSE, NULL); ok(!hOpened, "OpenMutex succeeded\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError());
SetLastError(0xdeadbeef); hOpened = OpenMutexW(READ_CONTROL, FALSE, NULL); ok(!hOpened, "OpenMutex succeeded\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError());
SetLastError(0xdeadbeef); hOpened = CreateMutexA(NULL, FALSE, "WineTestMutex"); - ok(hOpened != NULL, "CreateMutex failed with error %d\n", GetLastError()); - ok(GetLastError() == ERROR_ALREADY_EXISTS, "wrong error %u\n", GetLastError()); + ok(hOpened != NULL, "CreateMutex failed with error %ld\n", GetLastError()); + ok(GetLastError() == ERROR_ALREADY_EXISTS, "wrong error %lu\n", GetLastError()); CloseHandle(hOpened);
SetLastError(0xdeadbeef); hOpened = CreateMutexA(NULL, FALSE, "WINETESTMUTEX"); - ok(hOpened != NULL, "CreateMutex failed with error %d\n", GetLastError()); - ok(GetLastError() == 0, "wrong error %u\n", GetLastError()); + ok(hOpened != NULL, "CreateMutex failed with error %ld\n", GetLastError()); + ok(GetLastError() == 0, "wrong error %lu\n", GetLastError()); CloseHandle(hOpened);
CloseHandle(hCreated); @@ -476,7 +477,7 @@ static void test_event(void)
/* no sd */ handle = CreateEventA(NULL, FALSE, FALSE, __FILE__ ": Test Event"); - ok(handle != NULL, "CreateEventW with blank sd failed with error %d\n", GetLastError()); + ok(handle != NULL, "CreateEventW with blank sd failed with error %ld\n", GetLastError()); CloseHandle(handle);
sa.nLength = sizeof(sa); @@ -487,60 +488,60 @@ static void test_event(void)
/* blank sd */ handle = CreateEventA(&sa, FALSE, FALSE, __FILE__ ": Test Event"); - ok(handle != NULL, "CreateEventW with blank sd failed with error %d\n", GetLastError()); + ok(handle != NULL, "CreateEventW with blank sd failed with error %ld\n", GetLastError()); CloseHandle(handle);
/* sd with NULL dacl */ SetSecurityDescriptorDacl(&sd, TRUE, NULL, FALSE); handle = CreateEventA(&sa, FALSE, FALSE, __FILE__ ": Test Event"); - ok(handle != NULL, "CreateEventW with blank sd failed with error %d\n", GetLastError()); + ok(handle != NULL, "CreateEventW with blank sd failed with error %ld\n", GetLastError()); CloseHandle(handle);
/* sd with empty dacl */ InitializeAcl(&acl, sizeof(acl), ACL_REVISION); SetSecurityDescriptorDacl(&sd, TRUE, &acl, FALSE); handle = CreateEventA(&sa, FALSE, FALSE, __FILE__ ": Test Event"); - ok(handle != NULL, "CreateEventW with blank sd failed with error %d\n", GetLastError()); + ok(handle != NULL, "CreateEventW with blank sd failed with error %ld\n", GetLastError()); CloseHandle(handle);
/* test case sensitivity */
SetLastError(0xdeadbeef); handle = CreateEventA(NULL, FALSE, FALSE, __FILE__ ": Test Event"); - ok( handle != NULL, "CreateEvent failed with error %u\n", GetLastError()); - ok( GetLastError() == 0, "wrong error %u\n", GetLastError()); + ok( handle != NULL, "CreateEvent failed with error %lu\n", GetLastError()); + ok( GetLastError() == 0, "wrong error %lu\n", GetLastError());
SetLastError(0xdeadbeef); handle2 = CreateEventA(NULL, FALSE, FALSE, __FILE__ ": Test Event"); - ok( handle2 != NULL, "CreateEvent failed with error %d\n", GetLastError()); - ok( GetLastError() == ERROR_ALREADY_EXISTS, "wrong error %u\n", GetLastError()); + ok( handle2 != NULL, "CreateEvent failed with error %ld\n", GetLastError()); + ok( GetLastError() == ERROR_ALREADY_EXISTS, "wrong error %lu\n", GetLastError()); CloseHandle( handle2 );
SetLastError(0xdeadbeef); handle2 = CreateEventA(NULL, FALSE, FALSE, __FILE__ ": TEST EVENT"); - ok( handle2 != NULL, "CreateEvent failed with error %d\n", GetLastError()); - ok( GetLastError() == 0, "wrong error %u\n", GetLastError()); + ok( handle2 != NULL, "CreateEvent failed with error %ld\n", GetLastError()); + ok( GetLastError() == 0, "wrong error %lu\n", GetLastError()); CloseHandle( handle2 );
SetLastError(0xdeadbeef); handle2 = OpenEventA( EVENT_ALL_ACCESS, FALSE, __FILE__ ": Test Event"); - ok( handle2 != NULL, "OpenEvent failed with error %d\n", GetLastError()); + ok( handle2 != NULL, "OpenEvent failed with error %ld\n", GetLastError()); CloseHandle( handle2 );
SetLastError(0xdeadbeef); handle2 = OpenEventA( EVENT_ALL_ACCESS, FALSE, __FILE__ ": TEST EVENT"); ok( !handle2, "OpenEvent succeeded\n"); - ok( GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %u\n", GetLastError()); + ok( GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %lu\n", GetLastError());
SetLastError(0xdeadbeef); handle2 = OpenEventA( EVENT_ALL_ACCESS, FALSE, NULL ); ok( !handle2, "OpenEvent succeeded\n"); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError()); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError());
SetLastError(0xdeadbeef); handle2 = OpenEventW( EVENT_ALL_ACCESS, FALSE, NULL ); ok( !handle2, "OpenEvent succeeded\n"); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError()); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError());
CloseHandle( handle );
@@ -553,27 +554,27 @@ static void test_event(void) } handle = pCreateMemoryResourceNotification( HighMemoryResourceNotification + 1 ); ok( !handle, "CreateMemoryResourceNotification succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() ); ret = pQueryMemoryResourceNotification( handle, &val ); ok( !ret, "QueryMemoryResourceNotification succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
handle = pCreateMemoryResourceNotification( LowMemoryResourceNotification ); - ok( handle != 0, "CreateMemoryResourceNotification failed err %u\n", GetLastError() ); + ok( handle != 0, "CreateMemoryResourceNotification failed err %lu\n", GetLastError() ); ret = WaitForSingleObject( handle, 10 ); - ok( ret == WAIT_OBJECT_0 || ret == WAIT_TIMEOUT, "WaitForSingleObject wrong ret %u\n", ret ); + ok( ret == WAIT_OBJECT_0 || ret == WAIT_TIMEOUT, "WaitForSingleObject wrong ret %lu\n", ret );
val = ~0; ret = pQueryMemoryResourceNotification( handle, &val ); - ok( ret, "QueryMemoryResourceNotification failed err %u\n", GetLastError() ); + ok( ret, "QueryMemoryResourceNotification failed err %lu\n", GetLastError() ); ok( val == FALSE || val == TRUE, "wrong value %u\n", val ); ret = CloseHandle( handle ); - ok( ret, "CloseHandle failed err %u\n", GetLastError() ); + ok( ret, "CloseHandle failed err %lu\n", GetLastError() );
handle = CreateEventA(NULL, FALSE, FALSE, __FILE__ ": Test Event"); val = ~0; ret = pQueryMemoryResourceNotification( handle, &val ); - ok( ret, "QueryMemoryResourceNotification failed err %u\n", GetLastError() ); + ok( ret, "QueryMemoryResourceNotification failed err %lu\n", GetLastError() ); ok( val == FALSE || val == TRUE, "wrong value %u\n", val ); CloseHandle( handle ); } @@ -586,40 +587,40 @@ static void test_semaphore(void)
SetLastError(0xdeadbeef); handle = CreateSemaphoreA(NULL, 0, 1, __FILE__ ": Test Semaphore"); - ok(handle != NULL, "CreateSemaphore failed with error %u\n", GetLastError()); - ok(GetLastError() == 0, "wrong error %u\n", GetLastError()); + ok(handle != NULL, "CreateSemaphore failed with error %lu\n", GetLastError()); + ok(GetLastError() == 0, "wrong error %lu\n", GetLastError());
SetLastError(0xdeadbeef); handle2 = CreateSemaphoreA(NULL, 0, 1, __FILE__ ": Test Semaphore"); - ok( handle2 != NULL, "CreateSemaphore failed with error %d\n", GetLastError()); - ok( GetLastError() == ERROR_ALREADY_EXISTS, "wrong error %u\n", GetLastError()); + ok( handle2 != NULL, "CreateSemaphore failed with error %ld\n", GetLastError()); + ok( GetLastError() == ERROR_ALREADY_EXISTS, "wrong error %lu\n", GetLastError()); CloseHandle( handle2 );
SetLastError(0xdeadbeef); handle2 = CreateSemaphoreA(NULL, 0, 1, __FILE__ ": TEST SEMAPHORE"); - ok( handle2 != NULL, "CreateSemaphore failed with error %d\n", GetLastError()); - ok( GetLastError() == 0, "wrong error %u\n", GetLastError()); + ok( handle2 != NULL, "CreateSemaphore failed with error %ld\n", GetLastError()); + ok( GetLastError() == 0, "wrong error %lu\n", GetLastError()); CloseHandle( handle2 );
SetLastError(0xdeadbeef); handle2 = OpenSemaphoreA( SEMAPHORE_ALL_ACCESS, FALSE, __FILE__ ": Test Semaphore"); - ok( handle2 != NULL, "OpenSemaphore failed with error %d\n", GetLastError()); + ok( handle2 != NULL, "OpenSemaphore failed with error %ld\n", GetLastError()); CloseHandle( handle2 );
SetLastError(0xdeadbeef); handle2 = OpenSemaphoreA( SEMAPHORE_ALL_ACCESS, FALSE, __FILE__ ": TEST SEMAPHORE"); ok( !handle2, "OpenSemaphore succeeded\n"); - ok( GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %u\n", GetLastError()); + ok( GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %lu\n", GetLastError());
SetLastError(0xdeadbeef); handle2 = OpenSemaphoreA( SEMAPHORE_ALL_ACCESS, FALSE, NULL ); ok( !handle2, "OpenSemaphore succeeded\n"); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError()); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError());
SetLastError(0xdeadbeef); handle2 = OpenSemaphoreW( SEMAPHORE_ALL_ACCESS, FALSE, NULL ); ok( !handle2, "OpenSemaphore succeeded\n"); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError()); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError());
CloseHandle( handle ); } @@ -632,40 +633,40 @@ static void test_waitable_timer(void)
SetLastError(0xdeadbeef); handle = CreateWaitableTimerA(NULL, FALSE, __FILE__ ": Test WaitableTimer"); - ok(handle != NULL, "CreateWaitableTimer failed with error %u\n", GetLastError()); - ok(GetLastError() == 0, "wrong error %u\n", GetLastError()); + ok(handle != NULL, "CreateWaitableTimer failed with error %lu\n", GetLastError()); + ok(GetLastError() == 0, "wrong error %lu\n", GetLastError());
SetLastError(0xdeadbeef); handle2 = CreateWaitableTimerA(NULL, FALSE, __FILE__ ": Test WaitableTimer"); - ok( handle2 != NULL, "CreateWaitableTimer failed with error %d\n", GetLastError()); - ok( GetLastError() == ERROR_ALREADY_EXISTS, "wrong error %u\n", GetLastError()); + ok( handle2 != NULL, "CreateWaitableTimer failed with error %ld\n", GetLastError()); + ok( GetLastError() == ERROR_ALREADY_EXISTS, "wrong error %lu\n", GetLastError()); CloseHandle( handle2 );
SetLastError(0xdeadbeef); handle2 = CreateWaitableTimerA(NULL, FALSE, __FILE__ ": TEST WAITABLETIMER"); - ok( handle2 != NULL, "CreateWaitableTimer failed with error %d\n", GetLastError()); - ok( GetLastError() == 0, "wrong error %u\n", GetLastError()); + ok( handle2 != NULL, "CreateWaitableTimer failed with error %ld\n", GetLastError()); + ok( GetLastError() == 0, "wrong error %lu\n", GetLastError()); CloseHandle( handle2 );
SetLastError(0xdeadbeef); handle2 = OpenWaitableTimerA( TIMER_ALL_ACCESS, FALSE, __FILE__ ": Test WaitableTimer"); - ok( handle2 != NULL, "OpenWaitableTimer failed with error %d\n", GetLastError()); + ok( handle2 != NULL, "OpenWaitableTimer failed with error %ld\n", GetLastError()); CloseHandle( handle2 );
SetLastError(0xdeadbeef); handle2 = OpenWaitableTimerA( TIMER_ALL_ACCESS, FALSE, __FILE__ ": TEST WAITABLETIMER"); ok( !handle2, "OpenWaitableTimer succeeded\n"); - ok( GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %u\n", GetLastError()); + ok( GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %lu\n", GetLastError());
SetLastError(0xdeadbeef); handle2 = OpenWaitableTimerA( TIMER_ALL_ACCESS, FALSE, NULL ); - ok( !handle2, "OpenWaitableTimer failed with error %d\n", GetLastError()); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError()); + ok( !handle2, "OpenWaitableTimer failed with error %ld\n", GetLastError()); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError());
SetLastError(0xdeadbeef); handle2 = OpenWaitableTimerW( TIMER_ALL_ACCESS, FALSE, NULL ); - ok( !handle2, "OpenWaitableTimer failed with error %d\n", GetLastError()); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError()); + ok( !handle2, "OpenWaitableTimer failed with error %ld\n", GetLastError()); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError());
CloseHandle( handle ); } @@ -702,35 +703,35 @@ static void test_iocp_callback(void) ok(sem != INVALID_HANDLE_VALUE, "Creating a semaphore failed\n");
ret = GetTempPathA(MAX_PATH, temp_path); - ok(ret != 0, "GetTempPathA error %d\n", GetLastError()); + ok(ret != 0, "GetTempPathA error %ld\n", GetLastError()); ok(ret < MAX_PATH, "temp path should fit into MAX_PATH\n");
ret = GetTempFileNameA(temp_path, prefix, 0, filename); - ok(ret != 0, "GetTempFileNameA error %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameA error %ld\n", GetLastError());
hFile = CreateFileA(filename, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_FLAG_RANDOM_ACCESS, 0); - ok(hFile != INVALID_HANDLE_VALUE, "CreateFileA: error %d\n", GetLastError()); + ok(hFile != INVALID_HANDLE_VALUE, "CreateFileA: error %ld\n", GetLastError());
retb = p_BindIoCompletionCallback(hFile, iocp_callback, 0); ok(retb == FALSE, "BindIoCompletionCallback succeeded on a file that wasn't created with FILE_FLAG_OVERLAPPED\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Last error is %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Last error is %ld\n", GetLastError());
ret = CloseHandle(hFile); - ok( ret, "CloseHandle: error %d\n", GetLastError()); + ok( ret, "CloseHandle: error %ld\n", GetLastError()); ret = DeleteFileA(filename); - ok( ret, "DeleteFileA: error %d\n", GetLastError()); + ok( ret, "DeleteFileA: error %ld\n", GetLastError());
hFile = CreateFileA(filename, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_FLAG_RANDOM_ACCESS | FILE_FLAG_OVERLAPPED, 0); - ok(hFile != INVALID_HANDLE_VALUE, "CreateFileA: error %d\n", GetLastError()); + ok(hFile != INVALID_HANDLE_VALUE, "CreateFileA: error %ld\n", GetLastError());
retb = p_BindIoCompletionCallback(hFile, iocp_callback, 0); ok(retb == TRUE, "BindIoCompletionCallback failed\n");
memset(&overlapped, 0, sizeof(overlapped)); retb = WriteFile(hFile, buffer, 4, &bytesWritten, &overlapped); - ok(retb == TRUE || GetLastError() == ERROR_IO_PENDING, "WriteFile failed, lastError = %d\n", GetLastError()); + ok(retb == TRUE || GetLastError() == ERROR_IO_PENDING, "WriteFile failed, lastError = %ld\n", GetLastError());
ret = WaitForSingleObject(sem, 5000); ok(ret == WAIT_OBJECT_0, "Wait for the IO completion callback failed\n"); @@ -738,37 +739,37 @@ static void test_iocp_callback(void)
retb = p_BindIoCompletionCallback(hFile, iocp_callback, 0); ok(retb == FALSE, "BindIoCompletionCallback succeeded when setting the same callback on the file again\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Last error is %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Last error is %ld\n", GetLastError()); retb = p_BindIoCompletionCallback(hFile, NULL, 0); ok(retb == FALSE, "BindIoCompletionCallback succeeded when setting the callback to NULL\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Last error is %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Last error is %ld\n", GetLastError());
ret = CloseHandle(hFile); - ok( ret, "CloseHandle: error %d\n", GetLastError()); + ok( ret, "CloseHandle: error %ld\n", GetLastError()); ret = DeleteFileA(filename); - ok( ret, "DeleteFileA: error %d\n", GetLastError()); + ok( ret, "DeleteFileA: error %ld\n", GetLastError());
/* win2k3 requires the Flags parameter to be zero */ SetLastError(0xdeadbeef); hFile = CreateFileA(filename, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_FLAG_RANDOM_ACCESS | FILE_FLAG_OVERLAPPED, 0); - ok(hFile != INVALID_HANDLE_VALUE, "CreateFileA: error %d\n", GetLastError()); + ok(hFile != INVALID_HANDLE_VALUE, "CreateFileA: error %ld\n", GetLastError()); retb = p_BindIoCompletionCallback(hFile, iocp_callback, 12345); if (!retb) ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); else ok(retb == TRUE, "BindIoCompletionCallback failed with Flags != 0\n"); ret = CloseHandle(hFile); - ok( ret, "CloseHandle: error %d\n", GetLastError()); + ok( ret, "CloseHandle: error %ld\n", GetLastError()); ret = DeleteFileA(filename); - ok( ret, "DeleteFileA: error %d\n", GetLastError()); + ok( ret, "DeleteFileA: error %ld\n", GetLastError());
retb = p_BindIoCompletionCallback(NULL, iocp_callback, 0); ok(retb == FALSE, "BindIoCompletionCallback succeeded on a NULL file\n"); ok(GetLastError() == ERROR_INVALID_HANDLE || GetLastError() == ERROR_INVALID_PARAMETER, /* vista */ - "Last error is %d\n", GetLastError()); + "Last error is %ld\n", GetLastError()); }
static void CALLBACK timer_queue_cb1(PVOID p, BOOLEAN timedOut) @@ -888,7 +889,7 @@ static void test_timer_queue(void) SetLastError(0xdeadbeef); ret = DeleteTimerQueueEx(q, NULL); ok(ret /* vista */ || GetLastError() == ERROR_IO_PENDING, - "DeleteTimerQueueEx, GetLastError: expected ERROR_IO_PENDING, got %d\n", + "DeleteTimerQueueEx, GetLastError: expected ERROR_IO_PENDING, got %ld\n", GetLastError());
/* Test synchronous deletion of the queue and running timers. */ @@ -904,7 +905,7 @@ static void test_timer_queue(void) ret0 = DeleteTimerQueueTimer(q, t0, NULL); ok((!ret0 && GetLastError() == ERROR_IO_PENDING) || broken(ret0), /* Win 2000 & XP & 2003 */ - "DeleteTimerQueueTimer ret=%d le=%u\n", ret0, GetLastError()); + "DeleteTimerQueueTimer ret=%d le=%lu\n", ret0, GetLastError());
/* Called once. */ t1 = NULL; @@ -1006,21 +1007,21 @@ static void test_timer_queue(void) SetLastError(0xdeadbeef); ret = DeleteTimerQueueTimer(q, t1, NULL); ok(ret /* vista */ || GetLastError() == ERROR_IO_PENDING, - "DeleteTimerQueueTimer, GetLastError: expected ERROR_IO_PENDING, got %d\n", + "DeleteTimerQueueTimer, GetLastError: expected ERROR_IO_PENDING, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = DeleteTimerQueueTimer(q, t2, NULL); ok(!ret, "DeleteTimerQueueTimer call was expected to fail\n"); ok(GetLastError() == ERROR_IO_PENDING, - "DeleteTimerQueueTimer, GetLastError: expected ERROR_IO_PENDING, got %d\n", + "DeleteTimerQueueTimer, GetLastError: expected ERROR_IO_PENDING, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = DeleteTimerQueueTimer(q, t3, et1); ok(ret, "DeleteTimerQueueTimer call was expected to fail\n"); ok(GetLastError() == 0xdeadbeef, - "DeleteTimerQueueTimer, GetLastError: expected 0xdeadbeef, got %d\n", + "DeleteTimerQueueTimer, GetLastError: expected 0xdeadbeef, got %ld\n", GetLastError()); ok(WaitForSingleObject(et1, 250) == WAIT_OBJECT_0, "Timer destruction event not triggered\n"); @@ -1029,7 +1030,7 @@ static void test_timer_queue(void) ret = DeleteTimerQueueTimer(q, t4, et2); ok(!ret, "DeleteTimerQueueTimer call was expected to fail\n"); ok(GetLastError() == ERROR_IO_PENDING, - "DeleteTimerQueueTimer, GetLastError: expected ERROR_IO_PENDING, got %d\n", + "DeleteTimerQueueTimer, GetLastError: expected ERROR_IO_PENDING, got %ld\n", GetLastError()); ok(WaitForSingleObject(et2, 1000) == WAIT_OBJECT_0, "Timer destruction event not triggered\n"); @@ -1037,7 +1038,7 @@ static void test_timer_queue(void) SetLastError(0xdeadbeef); ret = DeleteTimerQueueEx(q, e); ok(ret /* vista */ || GetLastError() == ERROR_IO_PENDING, - "DeleteTimerQueueEx, GetLastError: expected ERROR_IO_PENDING, got %d\n", + "DeleteTimerQueueEx, GetLastError: expected ERROR_IO_PENDING, got %ld\n", GetLastError()); ok(WaitForSingleObject(e, 250) == WAIT_OBJECT_0, "Queue destruction event not triggered\n"); @@ -1109,7 +1110,7 @@ static void test_timer_queue(void) SetLastError(0xdeadbeef); ret = DeleteTimerQueueEx(q, NULL); ok(ret /* vista */ || GetLastError() == ERROR_IO_PENDING, - "DeleteTimerQueueEx, GetLastError: expected ERROR_IO_PENDING, got %d\n", + "DeleteTimerQueueEx, GetLastError: expected ERROR_IO_PENDING, got %ld\n", GetLastError()); ok(d1.num_calls == 1, "DeleteTimerQueueTimer\n");
@@ -1159,13 +1160,13 @@ static void test_timer_queue(void) ret = DeleteTimerQueueEx(NULL, NULL); ok(!ret, "DeleteTimerQueueEx call was expected to fail\n"); ok(GetLastError() == ERROR_INVALID_HANDLE, - "DeleteTimerQueueEx, GetLastError: expected ERROR_INVALID_HANDLE, got %d\n", + "DeleteTimerQueueEx, GetLastError: expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = DeleteTimerQueueEx(q, NULL); ok(ret /* vista */ || GetLastError() == ERROR_IO_PENDING, - "DeleteTimerQueueEx, GetLastError: expected ERROR_IO_PENDING, got %d\n", + "DeleteTimerQueueEx, GetLastError: expected ERROR_IO_PENDING, got %ld\n", GetLastError()); }
@@ -1190,80 +1191,80 @@ static void test_WaitForSingleObject(void) /* invalid handle with different values for lower 2 bits */ SetLastError(0xdeadbeef); ret = WaitForSingleObject(invalid, 0); - ok(ret == WAIT_FAILED, "expected WAIT_FAILED, got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + ok(ret == WAIT_FAILED, "expected WAIT_FAILED, got %ld\n", ret); + ok(GetLastError() == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = WaitForSingleObject(modify_handle(invalid, 1), 0); - ok(ret == WAIT_FAILED, "expected WAIT_FAILED, got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + ok(ret == WAIT_FAILED, "expected WAIT_FAILED, got %ld\n", ret); + ok(GetLastError() == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = WaitForSingleObject(modify_handle(invalid, 2), 0); - ok(ret == WAIT_FAILED, "expected WAIT_FAILED, got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + ok(ret == WAIT_FAILED, "expected WAIT_FAILED, got %ld\n", ret); + ok(GetLastError() == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = WaitForSingleObject(modify_handle(invalid, 3), 0); - ok(ret == WAIT_FAILED, "expected WAIT_FAILED, got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + ok(ret == WAIT_FAILED, "expected WAIT_FAILED, got %ld\n", ret); + ok(GetLastError() == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
/* valid handle with different values for lower 2 bits */ SetLastError(0xdeadbeef); ret = WaitForSingleObject(nonsignaled, 0); - ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); + ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %ld\n", ret); + ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = WaitForSingleObject(modify_handle(nonsignaled, 1), 0); - ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); + ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %ld\n", ret); + ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = WaitForSingleObject(modify_handle(nonsignaled, 2), 0); - ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); + ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %ld\n", ret); + ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = WaitForSingleObject(modify_handle(nonsignaled, 3), 0); - ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); + ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %ld\n", ret); + ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %ld\n", GetLastError());
/* valid handle with different values for lower 2 bits */ SetLastError(0xdeadbeef); ret = WaitForSingleObject(signaled, 0); - ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); + ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %ld\n", ret); + ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = WaitForSingleObject(modify_handle(signaled, 1), 0); - ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); + ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %ld\n", ret); + ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = WaitForSingleObject(modify_handle(signaled, 2), 0); - ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); + ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %ld\n", ret); + ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = WaitForSingleObject(modify_handle(signaled, 3), 0); - ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); + ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %ld\n", ret); + ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %ld\n", GetLastError());
/* pseudo handles are allowed in WaitForSingleObject and NtWaitForSingleObject */ ret = WaitForSingleObject(GetCurrentProcess(), 100); - ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %u\n", ret); + ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %lu\n", ret);
ret = WaitForSingleObject(GetCurrentThread(), 100); - ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %u\n", ret); + ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %lu\n", ret);
timeout.QuadPart = -1000000; status = pNtWaitForSingleObject(GetCurrentProcess(), FALSE, &timeout); - ok(status == STATUS_TIMEOUT, "expected STATUS_TIMEOUT, got %08x\n", status); + ok(status == STATUS_TIMEOUT, "expected STATUS_TIMEOUT, got %08lx\n", status);
timeout.QuadPart = -1000000; status = pNtWaitForSingleObject(GetCurrentThread(), FALSE, &timeout); - ok(status == STATUS_TIMEOUT, "expected STATUS_TIMEOUT, got %08x\n", status); + ok(status == STATUS_TIMEOUT, "expected STATUS_TIMEOUT, got %08lx\n", status);
CloseHandle(signaled); CloseHandle(nonsignaled); @@ -1287,15 +1288,15 @@ static void test_WaitForMultipleObjects(void)
/* a manual-reset event remains signaled, an auto-reset event is cleared */ r = WaitForMultipleObjects(MAXIMUM_WAIT_OBJECTS, maxevents, FALSE, 0); - ok( r == WAIT_OBJECT_0, "should signal lowest handle first, got %d\n", r); + ok( r == WAIT_OBJECT_0, "should signal lowest handle first, got %ld\n", r); r = WaitForMultipleObjects(MAXIMUM_WAIT_OBJECTS, maxevents, FALSE, 0); - ok( r == WAIT_OBJECT_0, "should signal handle #0 first, got %d\n", r); + ok( r == WAIT_OBJECT_0, "should signal handle #0 first, got %ld\n", r); ok(ResetEvent(maxevents[0]), "ResetEvent\n"); for (i=1; i<MAXIMUM_WAIT_OBJECTS; i++) { /* the lowest index is checked first and remaining events are untouched */ r = WaitForMultipleObjects(MAXIMUM_WAIT_OBJECTS, maxevents, FALSE, 0); - ok( r == WAIT_OBJECT_0+i, "should signal handle #%d first, got %d\n", i, r); + ok( r == WAIT_OBJECT_0+i, "should signal handle #%d first, got %ld\n", i, r); }
/* run same test with Nt* call */ @@ -1304,15 +1305,15 @@ static void test_WaitForMultipleObjects(void)
/* a manual-reset event remains signaled, an auto-reset event is cleared */ status = pNtWaitForMultipleObjects(MAXIMUM_WAIT_OBJECTS, maxevents, TRUE, FALSE, NULL); - ok(status == STATUS_WAIT_0, "should signal lowest handle first, got %08x\n", status); + ok(status == STATUS_WAIT_0, "should signal lowest handle first, got %08lx\n", status); status = pNtWaitForMultipleObjects(MAXIMUM_WAIT_OBJECTS, maxevents, TRUE, FALSE, NULL); - ok(status == STATUS_WAIT_0, "should signal handle #0 first, got %08x\n", status); + ok(status == STATUS_WAIT_0, "should signal handle #0 first, got %08lx\n", status); ok(ResetEvent(maxevents[0]), "ResetEvent\n"); for (i=1; i<MAXIMUM_WAIT_OBJECTS; i++) { /* the lowest index is checked first and remaining events are untouched */ status = pNtWaitForMultipleObjects(MAXIMUM_WAIT_OBJECTS, maxevents, TRUE, FALSE, NULL); - ok(status == STATUS_WAIT_0 + i, "should signal handle #%d first, got %08x\n", i, status); + ok(status == STATUS_WAIT_0 + i, "should signal handle #%d first, got %08lx\n", i, status); }
for (i=0; i<MAXIMUM_WAIT_OBJECTS; i++) @@ -1323,26 +1324,26 @@ static void test_WaitForMultipleObjects(void) maxevents[0] = GetCurrentProcess(); SetLastError(0xdeadbeef); r = WaitForMultipleObjects(1, maxevents, FALSE, 100); - todo_wine ok(r == WAIT_FAILED, "expected WAIT_FAILED, got %u\n", r); + todo_wine ok(r == WAIT_FAILED, "expected WAIT_FAILED, got %lu\n", r); todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, - "expected ERROR_INVALID_HANDLE, got %u\n", GetLastError()); + "expected ERROR_INVALID_HANDLE, got %lu\n", GetLastError());
maxevents[0] = GetCurrentThread(); SetLastError(0xdeadbeef); r = WaitForMultipleObjects(1, maxevents, FALSE, 100); - todo_wine ok(r == WAIT_FAILED, "expected WAIT_FAILED, got %u\n", r); + todo_wine ok(r == WAIT_FAILED, "expected WAIT_FAILED, got %lu\n", r); todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, - "expected ERROR_INVALID_HANDLE, got %u\n", GetLastError()); + "expected ERROR_INVALID_HANDLE, got %lu\n", GetLastError());
timeout.QuadPart = -1000000; maxevents[0] = GetCurrentProcess(); status = pNtWaitForMultipleObjects(1, maxevents, TRUE, FALSE, &timeout); - todo_wine ok(status == STATUS_INVALID_HANDLE, "expected STATUS_INVALID_HANDLE, got %08x\n", status); + todo_wine ok(status == STATUS_INVALID_HANDLE, "expected STATUS_INVALID_HANDLE, got %08lx\n", status);
timeout.QuadPart = -1000000; maxevents[0] = GetCurrentThread(); status = pNtWaitForMultipleObjects(1, maxevents, TRUE, FALSE, &timeout); - todo_wine ok(status == STATUS_INVALID_HANDLE, "expected STATUS_INVALID_HANDLE, got %08x\n", status); + todo_wine ok(status == STATUS_INVALID_HANDLE, "expected STATUS_INVALID_HANDLE, got %08lx\n", status); }
static BOOL g_initcallback_ret, g_initcallback_called; @@ -1378,7 +1379,7 @@ static void test_initonce(void) g_initcallback_ret = TRUE; g_initctxt = NULL; ret = pInitOnceExecuteOnce(&initonce, initonce_callback, (void*)0xdeadbeef, &g_initctxt); - ok(ret, "wrong ret %d err %u\n", ret, GetLastError()); + ok(ret, "wrong ret %d err %lu\n", ret, GetLastError()); ok(initonce.Ptr == (void*)0x2, "got %p\n", initonce.Ptr); ok(g_initctxt == NULL, "got %p\n", g_initctxt); ok(g_initcallback_called, "got %d\n", g_initcallback_called); @@ -1387,7 +1388,7 @@ static void test_initonce(void) g_initctxt = NULL; g_initcallback_called = FALSE; ret = pInitOnceExecuteOnce(&initonce, initonce_callback, (void*)0xdeadbeef, &g_initctxt); - ok(ret, "wrong ret %d err %u\n", ret, GetLastError()); + ok(ret, "wrong ret %d err %lu\n", ret, GetLastError()); ok(initonce.Ptr == (void*)0x2, "got %p\n", initonce.Ptr); ok(g_initctxt == NULL, "got %p\n", g_initctxt); ok(!g_initcallback_called, "got %d\n", g_initcallback_called); @@ -1397,7 +1398,7 @@ static void test_initonce(void) /* 2 lower order bits should never be used, you'll get a crash in result */ g_initctxt = (void*)0xFFFFFFF0; ret = pInitOnceExecuteOnce(&initonce, initonce_callback, (void*)0xdeadbeef, &g_initctxt); - ok(ret, "wrong ret %d err %u\n", ret, GetLastError()); + ok(ret, "wrong ret %d err %lu\n", ret, GetLastError()); ok(initonce.Ptr == (void*)0xFFFFFFF2, "got %p\n", initonce.Ptr); ok(g_initctxt == (void*)0xFFFFFFF0, "got %p\n", g_initctxt); ok(g_initcallback_called, "got %d\n", g_initcallback_called); @@ -1409,7 +1410,7 @@ static void test_initonce(void) pInitOnceInitialize(&initonce); SetLastError( 0xdeadbeef ); ret = pInitOnceExecuteOnce(&initonce, initonce_callback, (void*)0xdeadbeef, &g_initctxt); - ok(!ret && GetLastError() == 0xdeadbeef, "got wrong ret value %d err %u\n", ret, GetLastError()); + ok(!ret && GetLastError() == 0xdeadbeef, "got wrong ret value %d err %lu\n", ret, GetLastError()); ok(initonce.Ptr == NULL, "got %p\n", initonce.Ptr); ok(g_initctxt == NULL, "got %p\n", g_initctxt); ok(g_initcallback_called, "got %d\n", g_initcallback_called); @@ -1419,7 +1420,7 @@ static void test_initonce(void) g_initctxt = NULL; pending = FALSE; ret = pInitOnceBeginInitialize(&initonce, 0, &pending, &g_initctxt); - ok(ret, "wrong ret %d err %u\n", ret, GetLastError()); + ok(ret, "wrong ret %d err %lu\n", ret, GetLastError()); ok(pending, "got %d\n", pending); ok(initonce.Ptr == (void*)1, "got %p\n", initonce.Ptr); ok(g_initctxt == NULL, "got %p\n", g_initctxt); @@ -1429,7 +1430,7 @@ static void test_initonce(void) pending = 0xf; SetLastError( 0xdeadbeef ); ret = pInitOnceBeginInitialize(&initonce, INIT_ONCE_CHECK_ONLY, &pending, &g_initctxt); - ok(!ret && GetLastError() == ERROR_GEN_FAILURE, "wrong ret %d err %u\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_GEN_FAILURE, "wrong ret %d err %lu\n", ret, GetLastError()); ok(pending == 0xf, "got %d\n", pending); ok(initonce.Ptr == (void*)1, "got %p\n", initonce.Ptr); ok(g_initctxt == NULL, "got %p\n", g_initctxt); @@ -1437,91 +1438,91 @@ static void test_initonce(void) g_initctxt = (void*)0xdeadbee0; SetLastError( 0xdeadbeef ); ret = pInitOnceComplete(&initonce, INIT_ONCE_INIT_FAILED, g_initctxt); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "wrong ret %d err %u\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "wrong ret %d err %lu\n", ret, GetLastError()); ok(initonce.Ptr == (void*)1, "got %p\n", initonce.Ptr);
/* once failed already */ g_initctxt = (void*)0xdeadbee0; ret = pInitOnceComplete(&initonce, 0, g_initctxt); - ok(ret, "wrong ret %d err %u\n", ret, GetLastError()); + ok(ret, "wrong ret %d err %lu\n", ret, GetLastError()); ok(initonce.Ptr == (void*)0xdeadbee2, "got %p\n", initonce.Ptr);
pInitOnceInitialize(&initonce); SetLastError( 0xdeadbeef ); ret = pInitOnceComplete(&initonce, INIT_ONCE_INIT_FAILED, NULL); - ok(!ret && GetLastError() == ERROR_GEN_FAILURE, "wrong ret %d err %u\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_GEN_FAILURE, "wrong ret %d err %lu\n", ret, GetLastError()); ok(initonce.Ptr == NULL, "got %p\n", initonce.Ptr);
SetLastError( 0xdeadbeef ); ret = pInitOnceComplete(&initonce, INIT_ONCE_INIT_FAILED | INIT_ONCE_ASYNC, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "wrong ret %d err %u\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "wrong ret %d err %lu\n", ret, GetLastError()); ok(initonce.Ptr == NULL, "got %p\n", initonce.Ptr);
ret = pInitOnceBeginInitialize(&initonce, 0, &pending, &g_initctxt); - ok(ret, "wrong ret %d err %u\n", ret, GetLastError()); + ok(ret, "wrong ret %d err %lu\n", ret, GetLastError()); ok(pending, "got %d\n", pending); ok(initonce.Ptr == (void*)1, "got %p\n", initonce.Ptr);
SetLastError( 0xdeadbeef ); ret = pInitOnceBeginInitialize(&initonce, INIT_ONCE_ASYNC, &pending, &g_initctxt); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "wrong ret %d err %u\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "wrong ret %d err %lu\n", ret, GetLastError());
SetLastError( 0xdeadbeef ); ret = pInitOnceComplete(&initonce, INIT_ONCE_INIT_FAILED | INIT_ONCE_ASYNC, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "wrong ret %d err %u\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "wrong ret %d err %lu\n", ret, GetLastError()); ok(initonce.Ptr == (void*)1, "got %p\n", initonce.Ptr);
SetLastError( 0xdeadbeef ); ret = pInitOnceComplete(&initonce, 0, (void *)0xdeadbeef); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "wrong ret %d err %u\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "wrong ret %d err %lu\n", ret, GetLastError()); ok(initonce.Ptr == (void*)1, "got %p\n", initonce.Ptr);
ret = pInitOnceComplete(&initonce, INIT_ONCE_INIT_FAILED, NULL); - ok(ret, "wrong ret %d err %u\n", ret, GetLastError()); + ok(ret, "wrong ret %d err %lu\n", ret, GetLastError()); ok(initonce.Ptr == NULL, "got %p\n", initonce.Ptr);
pInitOnceInitialize(&initonce); ret = pInitOnceBeginInitialize(&initonce, INIT_ONCE_ASYNC, &pending, &g_initctxt); - ok(ret, "wrong ret %d err %u\n", ret, GetLastError()); + ok(ret, "wrong ret %d err %lu\n", ret, GetLastError()); ok(pending, "got %d\n", pending); ok(initonce.Ptr == (void*)3, "got %p\n", initonce.Ptr);
SetLastError( 0xdeadbeef ); ret = pInitOnceBeginInitialize(&initonce, 0, &pending, &g_initctxt); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "wrong ret %d err %u\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "wrong ret %d err %lu\n", ret, GetLastError());
ret = pInitOnceBeginInitialize(&initonce, INIT_ONCE_ASYNC, &pending, &g_initctxt); - ok(ret, "wrong ret %d err %u\n", ret, GetLastError()); + ok(ret, "wrong ret %d err %lu\n", ret, GetLastError()); ok(pending, "got %d\n", pending); ok(initonce.Ptr == (void*)3, "got %p\n", initonce.Ptr);
SetLastError( 0xdeadbeef ); ret = pInitOnceComplete(&initonce, INIT_ONCE_INIT_FAILED, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "wrong ret %d err %u\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "wrong ret %d err %lu\n", ret, GetLastError()); ok(initonce.Ptr == (void*)3, "got %p\n", initonce.Ptr);
SetLastError( 0xdeadbeef ); ret = pInitOnceComplete(&initonce, INIT_ONCE_INIT_FAILED | INIT_ONCE_ASYNC, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "wrong ret %d err %u\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "wrong ret %d err %lu\n", ret, GetLastError()); ok(initonce.Ptr == (void*)3, "got %p\n", initonce.Ptr);
SetLastError( 0xdeadbeef ); ret = pInitOnceComplete(&initonce, INIT_ONCE_ASYNC, (void *)0xdeadbeef); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "wrong ret %d err %u\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "wrong ret %d err %lu\n", ret, GetLastError()); ok(initonce.Ptr == (void*)3, "got %p\n", initonce.Ptr);
ret = pInitOnceComplete(&initonce, INIT_ONCE_ASYNC, (void *)0xdeadbee0); - ok(ret, "wrong ret %d err %u\n", ret, GetLastError()); + ok(ret, "wrong ret %d err %lu\n", ret, GetLastError()); ok(initonce.Ptr == (void*)0xdeadbee2, "got %p\n", initonce.Ptr);
SetLastError( 0xdeadbeef ); ret = pInitOnceComplete(&initonce, INIT_ONCE_INIT_FAILED | INIT_ONCE_ASYNC, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "wrong ret %d err %u\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "wrong ret %d err %lu\n", ret, GetLastError()); ok(initonce.Ptr == (void*)0xdeadbee2, "got %p\n", initonce.Ptr);
pInitOnceInitialize(&initonce); ret = pInitOnceBeginInitialize(&initonce, 0, &pending, &g_initctxt); - ok(ret, "wrong ret %d err %u\n", ret, GetLastError()); + ok(ret, "wrong ret %d err %lu\n", ret, GetLastError()); ok(pending, "got %d\n", pending); ok(initonce.Ptr == (void*)1, "got %p\n", initonce.Ptr);
@@ -1530,63 +1531,63 @@ static void test_initonce(void) pInitOnceInitialize(&initonce); SetLastError( 0xdeadbeef ); ret = pInitOnceBeginInitialize(&initonce, INIT_ONCE_CHECK_ONLY, &pending, &g_initctxt); - ok(!ret && GetLastError() == ERROR_GEN_FAILURE, "wrong ret %d err %u\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_GEN_FAILURE, "wrong ret %d err %lu\n", ret, GetLastError()); SetLastError( 0xdeadbeef ); ret = pInitOnceBeginInitialize(&initonce, INIT_ONCE_CHECK_ONLY|INIT_ONCE_ASYNC, &pending, &g_initctxt); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "wrong ret %d err %u\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "wrong ret %d err %lu\n", ret, GetLastError());
ret = pInitOnceBeginInitialize(&initonce, 0, &pending, &g_initctxt); - ok(ret, "wrong ret %d err %u\n", ret, GetLastError()); + ok(ret, "wrong ret %d err %lu\n", ret, GetLastError()); ok(pending, "got %d\n", pending); ok(initonce.Ptr == (void*)1, "got %p\n", initonce.Ptr);
SetLastError( 0xdeadbeef ); ret = pInitOnceBeginInitialize(&initonce, INIT_ONCE_CHECK_ONLY, &pending, &g_initctxt); - ok(!ret && GetLastError() == ERROR_GEN_FAILURE, "wrong ret %d err %u\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_GEN_FAILURE, "wrong ret %d err %lu\n", ret, GetLastError()); SetLastError( 0xdeadbeef ); ret = pInitOnceBeginInitialize(&initonce, INIT_ONCE_CHECK_ONLY|INIT_ONCE_ASYNC, &pending, &g_initctxt); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "wrong ret %d err %u\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "wrong ret %d err %lu\n", ret, GetLastError());
ret = pInitOnceComplete(&initonce, 0, (void *)0xdeadbee0); - ok(ret, "wrong ret %d err %u\n", ret, GetLastError()); + ok(ret, "wrong ret %d err %lu\n", ret, GetLastError()); ok(initonce.Ptr == (void*)0xdeadbee2, "got %p\n", initonce.Ptr);
ret = pInitOnceBeginInitialize(&initonce, INIT_ONCE_CHECK_ONLY, &pending, &g_initctxt); - ok(ret, "got wrong ret value %d err %u\n", ret, GetLastError()); + ok(ret, "got wrong ret value %d err %lu\n", ret, GetLastError()); ok(!pending, "got %d\n", pending); ok(initonce.Ptr == (void*)0xdeadbee2, "got %p\n", initonce.Ptr); ok(g_initctxt == (void*)0xdeadbee0, "got %p\n", initonce.Ptr);
SetLastError( 0xdeadbeef ); ret = pInitOnceBeginInitialize(&initonce, INIT_ONCE_CHECK_ONLY|INIT_ONCE_ASYNC, &pending, &g_initctxt); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "wrong ret %d err %u\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "wrong ret %d err %lu\n", ret, GetLastError());
pInitOnceInitialize(&initonce); ret = pInitOnceBeginInitialize(&initonce, INIT_ONCE_ASYNC, &pending, &g_initctxt); - ok(ret, "wrong ret %d err %u\n", ret, GetLastError()); + ok(ret, "wrong ret %d err %lu\n", ret, GetLastError()); ok(pending, "got %d\n", pending); ok(initonce.Ptr == (void*)3, "got %p\n", initonce.Ptr);
SetLastError( 0xdeadbeef ); ret = pInitOnceBeginInitialize(&initonce, INIT_ONCE_CHECK_ONLY, &pending, &g_initctxt); - ok(!ret && GetLastError() == ERROR_GEN_FAILURE, "wrong ret %d err %u\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_GEN_FAILURE, "wrong ret %d err %lu\n", ret, GetLastError()); SetLastError( 0xdeadbeef ); ret = pInitOnceBeginInitialize(&initonce, INIT_ONCE_CHECK_ONLY|INIT_ONCE_ASYNC, &pending, &g_initctxt); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "wrong ret %d err %u\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "wrong ret %d err %lu\n", ret, GetLastError());
ret = pInitOnceComplete(&initonce, INIT_ONCE_ASYNC, (void *)0xdeadbee0); - ok(ret, "wrong ret %d err %u\n", ret, GetLastError()); + ok(ret, "wrong ret %d err %lu\n", ret, GetLastError()); ok(initonce.Ptr == (void*)0xdeadbee2, "got %p\n", initonce.Ptr);
ret = pInitOnceBeginInitialize(&initonce, INIT_ONCE_CHECK_ONLY, &pending, &g_initctxt); - ok(ret, "got wrong ret value %d err %u\n", ret, GetLastError()); + ok(ret, "got wrong ret value %d err %lu\n", ret, GetLastError()); ok(!pending, "got %d\n", pending); ok(initonce.Ptr == (void*)0xdeadbee2, "got %p\n", initonce.Ptr); ok(g_initctxt == (void*)0xdeadbee0, "got %p\n", initonce.Ptr);
SetLastError( 0xdeadbeef ); ret = pInitOnceBeginInitialize(&initonce, INIT_ONCE_CHECK_ONLY|INIT_ONCE_ASYNC, &pending, &g_initctxt); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "wrong ret %d err %u\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "wrong ret %d err %lu\n", ret, GetLastError()); }
static CONDITION_VARIABLE buffernotempty = CONDITION_VARIABLE_INIT; @@ -1708,16 +1709,16 @@ static void test_condvars_consumer_producer(void) WaitForSingleObject(hc3, 1000);
ok(totalconsumed == totalproduced, - "consumed %d != produced %d\n", totalconsumed, totalproduced); + "consumed %ld != produced %ld\n", totalconsumed, totalproduced); ok (!condvar_sleeperr, "error occurred during SleepConditionVariableCS\n");
/* Checking cnt1 - cnt2 for non-0 would be not good, the case where * one consumer does not get anything to do is possible. */ - trace("produced %d, c1 %d, c2 %d, c3 %d\n", totalproduced, cnt1, cnt2, cnt3); + trace("produced %ld, c1 %ld, c2 %ld, c3 %ld\n", totalproduced, cnt1, cnt2, cnt3); /* The sleeps of the producer or consumer should not go above 100* produced count, * otherwise the implementation does not sleep correctly. But yet again, this is * not hard defined. */ - trace("producer sleep %d, consumer sleep %d\n", condvar_producer_sleepcnt, condvar_consumer_sleepcnt); + trace("producer sleep %ld, consumer sleep %ld\n", condvar_producer_sleepcnt, condvar_consumer_sleepcnt); }
/* Sample test for some sequence of events happening, sequenced using "condvar_seq" */ @@ -1821,7 +1822,7 @@ static DWORD WINAPI condvar_base_consumer(void *arg) ret = pSleepConditionVariableCS(cv, &condvar_crit, 10); LeaveCriticalSection (&condvar_crit); ok (!ret, "SleepConditionVariableCS should return FALSE on out of band wake\n"); - ok (GetLastError() == ERROR_TIMEOUT, "SleepConditionVariableCS should return ERROR_TIMEOUT on out of band wake, not %d\n", GetLastError()); + ok (GetLastError() == ERROR_TIMEOUT, "SleepConditionVariableCS should return ERROR_TIMEOUT on out of band wake, not %ld\n", GetLastError());
condvar_seq = 3; while (condvar_seq < 4) Sleep(1); @@ -1831,7 +1832,7 @@ static DWORD WINAPI condvar_base_consumer(void *arg) ret = pSleepConditionVariableCS(cv, &condvar_crit, 10); LeaveCriticalSection (&condvar_crit); ok (!ret, "SleepConditionVariableCS should return FALSE on out of band wake\n"); - ok (GetLastError() == ERROR_TIMEOUT, "SleepConditionVariableCS should return ERROR_TIMEOUT on out of band wake, not %d\n", GetLastError()); + ok (GetLastError() == ERROR_TIMEOUT, "SleepConditionVariableCS should return ERROR_TIMEOUT on out of band wake, not %ld\n", GetLastError());
EnterCriticalSection (&condvar_crit); condvar_seq = 5; @@ -1850,7 +1851,7 @@ static DWORD WINAPI condvar_base_consumer(void *arg) ret = pSleepConditionVariableCS(cv, &condvar_crit, 10); LeaveCriticalSection (&condvar_crit); ok (!ret, "SleepConditionVariableCS should return FALSE on out of band wake\n"); - ok (GetLastError() == ERROR_TIMEOUT, "SleepConditionVariableCS should return ERROR_TIMEOUT on out of band wake, not %d\n", GetLastError()); + ok (GetLastError() == ERROR_TIMEOUT, "SleepConditionVariableCS should return ERROR_TIMEOUT on out of band wake, not %ld\n", GetLastError());
EnterCriticalSection (&condvar_crit); condvar_seq = 8; @@ -1916,7 +1917,7 @@ static void test_condvars_base(RTL_CONDITION_VARIABLE *cv) LeaveCriticalSection (&condvar_crit);
ok (!ret, "SleepConditionVariableCS should return FALSE on untriggered condvar\n"); - ok (GetLastError() == ERROR_TIMEOUT, "SleepConditionVariableCS should return ERROR_TIMEOUT on untriggered condvar, not %d\n", GetLastError()); + ok (GetLastError() == ERROR_TIMEOUT, "SleepConditionVariableCS should return ERROR_TIMEOUT on untriggered condvar, not %ld\n", GetLastError());
if (pInitializeSRWLock) { @@ -1925,14 +1926,14 @@ static void test_condvars_base(RTL_CONDITION_VARIABLE *cv) pReleaseSRWLockExclusive(&condvar_srwlock);
ok(!ret, "SleepConditionVariableSRW should return FALSE on untriggered condvar\n"); - ok(GetLastError() == ERROR_TIMEOUT, "SleepConditionVariableSRW should return ERROR_TIMEOUT on untriggered condvar, not %d\n", GetLastError()); + ok(GetLastError() == ERROR_TIMEOUT, "SleepConditionVariableSRW should return ERROR_TIMEOUT on untriggered condvar, not %ld\n", GetLastError());
pAcquireSRWLockShared(&condvar_srwlock); ret = pSleepConditionVariableSRW(cv, &condvar_srwlock, 10, CONDITION_VARIABLE_LOCKMODE_SHARED); pReleaseSRWLockShared(&condvar_srwlock);
ok(!ret, "SleepConditionVariableSRW should return FALSE on untriggered condvar\n"); - ok(GetLastError() == ERROR_TIMEOUT, "SleepConditionVariableSRW should return ERROR_TIMEOUT on untriggered condvar, not %d\n", GetLastError()); + ok(GetLastError() == ERROR_TIMEOUT, "SleepConditionVariableSRW should return ERROR_TIMEOUT on untriggered condvar, not %ld\n", GetLastError()); }
condvar_seq = 0; @@ -2373,35 +2374,35 @@ static void test_srwlock_base(SRWLOCK *lock) WaitForSingleObject(h3, 100);
ok(!srwlock_base_errors.wrong_execution_order, - "thread commands were executed in the wrong order (occurred %d times).\n", + "thread commands were executed in the wrong order (occurred %ld times).\n", srwlock_base_errors.wrong_execution_order);
ok(!srwlock_base_errors.samethread_excl_excl, - "AcquireSRWLockExclusive didn't block when called multiple times from the same thread (occurred %d times).\n", + "AcquireSRWLockExclusive didn't block when called multiple times from the same thread (occurred %ld times).\n", srwlock_base_errors.samethread_excl_excl);
ok(!srwlock_base_errors.samethread_excl_shared, - "AcquireSRWLockShared didn't block when the same thread holds an exclusive lock (occurred %d times).\n", + "AcquireSRWLockShared didn't block when the same thread holds an exclusive lock (occurred %ld times).\n", srwlock_base_errors.samethread_excl_shared);
ok(!srwlock_base_errors.samethread_shared_excl, - "AcquireSRWLockExclusive didn't block when the same thread holds a shared lock (occurred %d times).\n", + "AcquireSRWLockExclusive didn't block when the same thread holds a shared lock (occurred %ld times).\n", srwlock_base_errors.samethread_shared_excl);
ok(!srwlock_base_errors.multithread_excl_excl, - "AcquireSRWLockExclusive didn't block when a second thread holds the exclusive lock (occurred %d times).\n", + "AcquireSRWLockExclusive didn't block when a second thread holds the exclusive lock (occurred %ld times).\n", srwlock_base_errors.multithread_excl_excl);
ok(!srwlock_base_errors.excl_not_preferred, - "thread waiting for exclusive access to the SHMLock was not preferred (occurred %d times).\n", + "thread waiting for exclusive access to the SHMLock was not preferred (occurred %ld times).\n", srwlock_base_errors.excl_not_preferred);
ok(!srwlock_base_errors.trylock_excl, - "TryAcquireSRWLockExclusive didn't behave as expected (occurred %d times).\n", + "TryAcquireSRWLockExclusive didn't behave as expected (occurred %ld times).\n", srwlock_base_errors.trylock_excl);
ok(!srwlock_base_errors.trylock_shared, - "TryAcquireSRWLockShared didn't behave as expected (occurred %d times).\n", + "TryAcquireSRWLockShared didn't behave as expected (occurred %ld times).\n", srwlock_base_errors.trylock_shared);
} @@ -2480,12 +2481,12 @@ static void test_srwlock_example(void) WaitForSingleObject(h2, 1000); WaitForSingleObject(h3, 1000);
- ok(!srwlock_inside, "threads didn't terminate properly, srwlock_inside is %d.\n", srwlock_inside); - ok(!srwlock_example_errors, "errors occurred while running SRWLock example test (number of errors: %d)\n", + ok(!srwlock_inside, "threads didn't terminate properly, srwlock_inside is %ld.\n", srwlock_inside); + ok(!srwlock_example_errors, "errors occurred while running SRWLock example test (number of errors: %ld)\n", srwlock_example_errors);
- trace("number of shared accesses per thread are c1 %d, c2 %d, c3 %d\n", cnt1, cnt2, cnt3); - trace("number of total exclusive accesses is %d\n", srwlock_protected_value); + trace("number of shared accesses per thread are c1 %ld, c2 %ld, c3 %ld\n", cnt1, cnt2, cnt3); + trace("number of total exclusive accesses is %ld\n", srwlock_protected_value); }
static DWORD WINAPI alertable_wait_thread(void *param) @@ -2497,24 +2498,24 @@ static DWORD WINAPI alertable_wait_thread(void *param)
ReleaseSemaphore(semaphores[0], 1, NULL); result = WaitForMultipleObjectsEx(1, &semaphores[1], TRUE, 1000, TRUE); - ok(result == WAIT_IO_COMPLETION, "expected WAIT_IO_COMPLETION, got %u\n", result); + ok(result == WAIT_IO_COMPLETION, "expected WAIT_IO_COMPLETION, got %lu\n", result); result = WaitForMultipleObjectsEx(1, &semaphores[1], TRUE, 200, TRUE); - ok(result == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %u\n", result); + ok(result == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %lu\n", result);
ReleaseSemaphore(semaphores[0], 1, NULL); timeout.QuadPart = -10000000; status = pNtWaitForMultipleObjects(1, &semaphores[1], FALSE, TRUE, &timeout); - ok(status == STATUS_USER_APC, "expected STATUS_USER_APC, got %08x\n", status); + ok(status == STATUS_USER_APC, "expected STATUS_USER_APC, got %08lx\n", status); timeout.QuadPart = -2000000; status = pNtWaitForMultipleObjects(1, &semaphores[1], FALSE, TRUE, &timeout); - ok(status == STATUS_WAIT_0, "expected STATUS_WAIT_0, got %08x\n", status); + ok(status == STATUS_WAIT_0, "expected STATUS_WAIT_0, got %08lx\n", status);
ReleaseSemaphore(semaphores[0], 1, NULL); timeout.QuadPart = -10000000; status = pNtWaitForMultipleObjects(1, &semaphores[1], FALSE, TRUE, &timeout); - ok(status == STATUS_USER_APC, "expected STATUS_USER_APC, got %08x\n", status); + ok(status == STATUS_USER_APC, "expected STATUS_USER_APC, got %08lx\n", status); result = WaitForSingleObject(semaphores[0], 0); - ok(result == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %u\n", result); + ok(result == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %lu\n", result);
return 0; } @@ -2531,7 +2532,7 @@ static void CALLBACK alertable_wait_apc2(ULONG_PTR userdata) DWORD result;
result = WaitForSingleObject(semaphores[0], 1000); - ok(result == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %u\n", result); + ok(result == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %lu\n", result); }
static void test_alertable_wait(void) @@ -2540,35 +2541,35 @@ static void test_alertable_wait(void) DWORD result;
semaphores[0] = CreateSemaphoreW(NULL, 0, 2, NULL); - ok(semaphores[0] != NULL, "CreateSemaphore failed with %u\n", GetLastError()); + ok(semaphores[0] != NULL, "CreateSemaphore failed with %lu\n", GetLastError()); semaphores[1] = CreateSemaphoreW(NULL, 0, 1, NULL); - ok(semaphores[1] != NULL, "CreateSemaphore failed with %u\n", GetLastError()); + ok(semaphores[1] != NULL, "CreateSemaphore failed with %lu\n", GetLastError()); thread = CreateThread(NULL, 0, alertable_wait_thread, semaphores, 0, NULL); - ok(thread != NULL, "CreateThread failed with %u\n", GetLastError()); + ok(thread != NULL, "CreateThread failed with %lu\n", GetLastError());
result = WaitForSingleObject(semaphores[0], 1000); - ok(result == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %u\n", result); + ok(result == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %lu\n", result); Sleep(100); /* ensure the thread is blocking in WaitForMultipleObjectsEx */ result = QueueUserAPC(alertable_wait_apc, thread, (ULONG_PTR)semaphores); - ok(result != 0, "QueueUserAPC failed with %u\n", GetLastError()); + ok(result != 0, "QueueUserAPC failed with %lu\n", GetLastError());
result = WaitForSingleObject(semaphores[0], 1000); - ok(result == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %u\n", result); + ok(result == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %lu\n", result); Sleep(100); /* ensure the thread is blocking in NtWaitForMultipleObjects */ result = QueueUserAPC(alertable_wait_apc, thread, (ULONG_PTR)semaphores); - ok(result != 0, "QueueUserAPC failed with %u\n", GetLastError()); + ok(result != 0, "QueueUserAPC failed with %lu\n", GetLastError());
result = WaitForSingleObject(semaphores[0], 1000); - ok(result == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %u\n", result); + ok(result == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %lu\n", result); Sleep(100); /* ensure the thread is blocking in NtWaitForMultipleObjects */ result = QueueUserAPC(alertable_wait_apc2, thread, (ULONG_PTR)semaphores); - ok(result != 0, "QueueUserAPC failed with %u\n", GetLastError()); + ok(result != 0, "QueueUserAPC failed with %lu\n", GetLastError()); result = QueueUserAPC(alertable_wait_apc2, thread, (ULONG_PTR)semaphores); - ok(result != 0, "QueueUserAPC failed with %u\n", GetLastError()); + ok(result != 0, "QueueUserAPC failed with %lu\n", GetLastError()); ReleaseSemaphore(semaphores[0], 2, NULL);
result = WaitForSingleObject(thread, 1000); - ok(result == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %u\n", result); + ok(result == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %lu\n", result); CloseHandle(thread); CloseHandle(semaphores[0]); CloseHandle(semaphores[1]); @@ -2595,13 +2596,13 @@ static DWORD WINAPI apc_deadlock_thread(void *param) size = 0x1000; status = pNtAllocateVirtualMemory(pi->hProcess, &base, 0, &size, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE); - ok(!status, "expected STATUS_SUCCESS, got %08x\n", status); + ok(!status, "expected STATUS_SUCCESS, got %08lx\n", status); ok(base != NULL, "expected base != NULL, got %p\n", base); SetEvent(info->event);
size = 0; status = pNtFreeVirtualMemory(pi->hProcess, &base, &size, MEM_RELEASE); - ok(!status, "expected STATUS_SUCCESS, got %08x\n", status); + ok(!status, "expected STATUS_SUCCESS, got %08lx\n", status); SetEvent(info->event); }
@@ -2623,44 +2624,44 @@ static void test_apc_deadlock(void) winetest_get_mainargs(&argv); sprintf(cmdline, ""%s" sync apc_deadlock", argv[0]); success = CreateProcessA(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(success, "CreateProcess failed with %u\n", GetLastError()); + ok(success, "CreateProcess failed with %lu\n", GetLastError());
event = CreateEventA(NULL, FALSE, FALSE, NULL); - ok(event != NULL, "CreateEvent failed with %u\n", GetLastError()); + ok(event != NULL, "CreateEvent failed with %lu\n", GetLastError());
info.pi = π info.event = event; info.running = TRUE;
thread = CreateThread(NULL, 0, apc_deadlock_thread, &info, 0, NULL); - ok(thread != NULL, "CreateThread failed with %u\n", GetLastError()); + ok(thread != NULL, "CreateThread failed with %lu\n", GetLastError()); result = WaitForSingleObject(event, 1000); - ok(result == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %u\n", result); + ok(result == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %lu\n", result);
for (i = 0; i < 1000 && info.running; i++) { result = SuspendThread(pi.hThread); - ok(result == 0, "expected 0, got %u\n", result); + ok(result == 0, "expected 0, got %lu\n", result);
WaitForSingleObject(event, 0); /* reset event */ result = WaitForSingleObject(event, 1000); if (result == WAIT_TIMEOUT) { todo_wine - ok(result == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %u\n", result); + ok(result == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %lu\n", result); info.running = FALSE; } else - ok(result == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %u\n", result); + ok(result == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %lu\n", result);
result = ResumeThread(pi.hThread); - ok(result == 1, "expected 1, got %u\n", result); + ok(result == 1, "expected 1, got %lu\n", result); Sleep(1); }
info.running = FALSE; result = WaitForSingleObject(thread, 1000); - ok(result == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %u\n", result); + ok(result == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %lu\n", result); CloseHandle(thread); CloseHandle(event);
@@ -2733,48 +2734,48 @@ static void test_QueueUserAPC(void) NTSTATUS status;
thread = CreateThread(NULL, 0, thread_proc, NULL, CREATE_SUSPENDED, &tid); - ok(thread != NULL, "CreateThread error %u\n", GetLastError()); + ok(thread != NULL, "CreateThread error %lu\n", GetLastError());
ret = TerminateThread(thread, 0xdeadbeef); - ok(ret, "TerminateThread error %u\n", GetLastError()); + ok(ret, "TerminateThread error %lu\n", GetLastError());
ret = WaitForSingleObject(thread, 1000); - ok(ret == WAIT_OBJECT_0, "got %u\n", ret); + ok(ret == WAIT_OBJECT_0, "got %lu\n", ret);
ret = pNtQueueApcThread(thread, call_user_apc, (ULONG_PTR)user_apc, 0, 0); - ok(ret == STATUS_UNSUCCESSFUL, "got %#x\n", ret); + ok(ret == STATUS_UNSUCCESSFUL, "got %#lx\n", ret); ret = pNtQueueApcThread(thread, NULL, 0, 0, 0); - ok(ret == STATUS_UNSUCCESSFUL, "got %#x\n", ret); + ok(ret == STATUS_UNSUCCESSFUL, "got %#lx\n", ret);
SetLastError(0xdeadbeef); ret = QueueUserAPC(user_apc, thread, 0); ok(!ret, "QueueUserAPC should fail\n"); - ok(GetLastError() == ERROR_GEN_FAILURE, "got %u\n", GetLastError()); + ok(GetLastError() == ERROR_GEN_FAILURE, "got %lu\n", GetLastError());
CloseHandle(thread);
apc_count = 0; ret = QueueUserAPC(user_apc, GetCurrentThread(), 0); - ok(ret, "QueueUserAPC failed err %u\n", GetLastError()); + ok(ret, "QueueUserAPC failed err %lu\n", GetLastError()); ok(!apc_count, "APC count %u\n", apc_count); ret = SleepEx( 100, TRUE ); - ok( ret == WAIT_IO_COMPLETION, "SleepEx returned %u\n", ret); + ok( ret == WAIT_IO_COMPLETION, "SleepEx returned %lu\n", ret); ok(apc_count == 1, "APC count %u\n", apc_count);
ret = pNtQueueApcThread( GetCurrentThread(), NULL, 0, 0, 0 ); - ok( !ret, "got %#x\n", ret); + ok( !ret, "got %#lx\n", ret); ret = SleepEx( 100, TRUE ); - ok( ret == WAIT_OBJECT_0, "SleepEx returned %u\n", ret); + ok( ret == WAIT_OBJECT_0, "SleepEx returned %lu\n", ret);
apc_count = 0; ret = QueueUserAPC(user_apc, GetCurrentThread(), 0); - ok(ret, "QueueUserAPC failed err %u\n", GetLastError()); + ok(ret, "QueueUserAPC failed err %lu\n", GetLastError()); ok(!apc_count, "APC count %u\n", apc_count); status = pNtTestAlert(); - ok(!status, "got %x\n", status); + ok(!status, "got %lx\n", status); ok(apc_count == 1, "APC count %u\n", apc_count); status = pNtTestAlert(); - ok(!status, "got %x\n", status); + ok(!status, "got %lx\n", status); ok(apc_count == 1, "APC count %u\n", apc_count); }
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/kernel32/tests/thread.c | 405 +++++++++++++++++++++--------------------- 1 file changed, 203 insertions(+), 202 deletions(-)
diff --git a/dlls/kernel32/tests/thread.c b/dlls/kernel32/tests/thread.c index 3cf58d928ae..0c64ab8063a 100644 --- a/dlls/kernel32/tests/thread.c +++ b/dlls/kernel32/tests/thread.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> @@ -115,9 +116,9 @@ static HANDLE create_target_process(const char *arg) winetest_get_mainargs( &argv ); sprintf(cmdline, "%s %s %s", argv[0], argv[1], arg); ret = CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "error: %u\n", GetLastError()); + ok(ret, "error: %lu\n", GetLastError()); ret = CloseHandle(pi.hThread); - ok(ret, "error %u\n", GetLastError()); + ok(ret, "error %lu\n", GetLastError()); return pi.hProcess; }
@@ -158,7 +159,7 @@ static BOOL sync_threads_and_run_one(DWORD sync_id, DWORD my_id) else { DWORD ret = WaitForSingleObject(start_event, 10000); - ok(ret == WAIT_OBJECT_0, "WaitForSingleObject failed %x\n",ret); + ok(ret == WAIT_OBJECT_0, "WaitForSingleObject failed %lx\n",ret); } return sync_id == my_id; } @@ -308,7 +309,7 @@ static DWORD WINAPI thread_actctx_func(void *p)
cur = (void*)0xdeadbeef; ret = GetCurrentActCtx(&cur); - ok(ret, "thread GetCurrentActCtx failed, %u\n", GetLastError()); + ok(ret, "thread GetCurrentActCtx failed, %lu\n", GetLastError()); ok(cur == param->handle, "got %p, expected %p\n", cur, param->handle); param->thread_context = cur;
@@ -345,13 +346,13 @@ static VOID test_CreateRemoteThread(void) skip("child process wasn't mapped at same address, so can't do CreateRemoteThread tests.\n"); return; } - ok(ret == WAIT_OBJECT_0 || broken(ret == WAIT_OBJECT_0+1 /* nt4,w2k */), "WaitForAllObjects 2 events %d\n", ret); + ok(ret == WAIT_OBJECT_0 || broken(ret == WAIT_OBJECT_0+1 /* nt4,w2k */), "WaitForAllObjects 2 events %ld\n", ret);
hEvent = CreateEventW(NULL, FALSE, FALSE, NULL); - ok(hEvent != NULL, "Can't create event, err=%u\n", GetLastError()); + ok(hEvent != NULL, "Can't create event, err=%lu\n", GetLastError()); ret = DuplicateHandle(GetCurrentProcess(), hEvent, hProcess, &hRemoteEvent, 0, FALSE, DUPLICATE_SAME_ACCESS); - ok(ret != 0, "DuplicateHandle failed, err=%u\n", GetLastError()); + ok(ret != 0, "DuplicateHandle failed, err=%lu\n", GetLastError());
/* create suspended remote thread with entry point SetEvent() */ SetLastError(0xdeadbeef); @@ -362,51 +363,51 @@ static VOID test_CreateRemoteThread(void) win_skip("CreateRemoteThread is not implemented\n"); goto cleanup; } - ok(hThread != NULL, "CreateRemoteThread failed, err=%u\n", GetLastError()); + ok(hThread != NULL, "CreateRemoteThread failed, err=%lu\n", GetLastError()); ok(tid != 0, "null tid\n"); ret = SuspendThread(hThread); - ok(ret == 1, "ret=%u, err=%u\n", ret, GetLastError()); + ok(ret == 1, "ret=%lu, err=%lu\n", ret, GetLastError()); ret = ResumeThread(hThread); - ok(ret == 2, "ret=%u, err=%u\n", ret, GetLastError()); + ok(ret == 2, "ret=%lu, err=%lu\n", ret, GetLastError());
/* thread still suspended, so wait times out */ ret = WaitForSingleObject(hEvent, 1000); - ok(ret == WAIT_TIMEOUT, "wait did not time out, ret=%u\n", ret); + ok(ret == WAIT_TIMEOUT, "wait did not time out, ret=%lu\n", ret);
ret = ResumeThread(hThread); - ok(ret == 1, "ret=%u, err=%u\n", ret, GetLastError()); + ok(ret == 1, "ret=%lu, err=%lu\n", ret, GetLastError());
/* wait that doesn't time out */ ret = WaitForSingleObject(hEvent, 1000); - ok(ret == WAIT_OBJECT_0, "object not signaled, ret=%u\n", ret); + ok(ret == WAIT_OBJECT_0, "object not signaled, ret=%lu\n", ret);
/* wait for thread end */ ret = WaitForSingleObject(hThread, 1000); - ok(ret == WAIT_OBJECT_0, "waiting for thread failed, ret=%u\n", ret); + ok(ret == WAIT_OBJECT_0, "waiting for thread failed, ret=%lu\n", ret); CloseHandle(hThread);
/* create and wait for remote thread with entry point CloseHandle() */ hThread = CreateRemoteThread(hProcess, NULL, 0, threadFunc_CloseHandle, hRemoteEvent, 0, &tid); - ok(hThread != NULL, "CreateRemoteThread failed, err=%u\n", GetLastError()); + ok(hThread != NULL, "CreateRemoteThread failed, err=%lu\n", GetLastError()); ret = WaitForSingleObject(hThread, 1000); - ok(ret == WAIT_OBJECT_0, "waiting for thread failed, ret=%u\n", ret); + ok(ret == WAIT_OBJECT_0, "waiting for thread failed, ret=%lu\n", ret); CloseHandle(hThread);
/* create remote thread with entry point SetEvent() */ hThread = CreateRemoteThread(hProcess, NULL, 0, threadFunc_SetEvent, hRemoteEvent, 0, &tid); - ok(hThread != NULL, "CreateRemoteThread failed, err=%u\n", GetLastError()); + ok(hThread != NULL, "CreateRemoteThread failed, err=%lu\n", GetLastError());
/* closed handle, so wait times out */ ret = WaitForSingleObject(hEvent, 1000); - ok(ret == WAIT_TIMEOUT, "wait did not time out, ret=%u\n", ret); + ok(ret == WAIT_TIMEOUT, "wait did not time out, ret=%lu\n", ret);
/* check that remote SetEvent() failed */ ret = GetExitCodeThread(hThread, &exitcode); - ok(ret != 0, "GetExitCodeThread failed, err=%u\n", GetLastError()); + ok(ret != 0, "GetExitCodeThread failed, err=%lu\n", GetLastError()); if (ret) ok(exitcode == 0, "SetEvent succeeded, expected to fail\n"); CloseHandle(hThread);
@@ -485,31 +486,31 @@ static VOID test_CreateThread_basic(void)
SetLastError(0xCAFEF00D); bRet = TlsFree(tlsIndex); - ok(bRet, "TlsFree failed: %08x\n", GetLastError()); + ok(bRet, "TlsFree failed: %08lx\n", GetLastError()); ok(GetLastError()==0xCAFEF00D, - "GetLastError: expected 0xCAFEF00D, got %08x\n", GetLastError()); + "GetLastError: expected 0xCAFEF00D, got %08lx\n", GetLastError());
/* Test freeing an already freed TLS index */ SetLastError(0xCAFEF00D); ok(TlsFree(tlsIndex)==0,"TlsFree succeeded\n"); ok(GetLastError()==ERROR_INVALID_PARAMETER, - "GetLastError: expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); + "GetLastError: expected ERROR_INVALID_PARAMETER, got %08lx\n", GetLastError());
/* Test how passing NULL as a pointer to threadid works */ SetLastError(0xFACEaBAD); thread[0] = CreateThread(NULL,0,threadFunc2,NULL,0,&tid); GLE = GetLastError(); if (thread[0]) { /* NT */ - ok(GLE==0xFACEaBAD, "CreateThread set last error to %d, expected 4207848365\n", GLE); + ok(GLE==0xFACEaBAD, "CreateThread set last error to %ld, expected 4207848365\n", GLE); ret = WaitForSingleObject(thread[0],100); ok(ret==WAIT_OBJECT_0, "threadFunc2 did not exit during 100 ms\n"); ret = GetExitCodeThread(thread[0],&exitCode); - ok(ret!=0, "GetExitCodeThread returned %d (expected nonzero)\n", ret); - ok(exitCode==99, "threadFunc2 exited with code: %d (expected 99)\n", exitCode); + ok(ret!=0, "GetExitCodeThread returned %ld (expected nonzero)\n", ret); + ok(exitCode==99, "threadFunc2 exited with code: %ld (expected 99)\n", exitCode); ok(CloseHandle(thread[0])!=0,"Error closing thread handle\n"); } else { /* 9x */ - ok(GLE==ERROR_INVALID_PARAMETER, "CreateThread set last error to %d, expected 87\n", GLE); + ok(GLE==ERROR_INVALID_PARAMETER, "CreateThread set last error to %ld, expected 87\n", GLE); } }
@@ -542,12 +543,12 @@ static VOID test_CreateThread_suspended(void) }
suspend_count = SuspendThread(thread); - ok(suspend_count == -1, "SuspendThread returned %d, expected -1\n", suspend_count); + ok(suspend_count == -1, "SuspendThread returned %ld, expected -1\n", suspend_count);
suspend_count = ResumeThread(thread); ok(suspend_count == 0 || broken(suspend_count == -1), /* win9x */ - "ResumeThread returned %d, expected 0\n", suspend_count); + "ResumeThread returned %ld, expected 0\n", suspend_count);
ok(CloseHandle(thread)!=0,"CloseHandle failed\n"); } @@ -600,8 +601,8 @@ static VOID test_SuspendThread(void) } /* Trying to suspend a terminated thread should fail */ error=SuspendThread(thread); - ok(error==~0U, "wrong return code: %d\n", error); - ok(GetLastError()==ERROR_ACCESS_DENIED || GetLastError()==ERROR_NO_MORE_ITEMS, "unexpected error code: %d\n", GetLastError()); + ok(error==~0U, "wrong return code: %ld\n", error); + ok(GetLastError()==ERROR_ACCESS_DENIED || GetLastError()==ERROR_NO_MORE_ITEMS, "unexpected error code: %ld\n", GetLastError());
ok(CloseHandle(thread)!=0,"CloseHandle Failed\n"); } @@ -732,7 +733,7 @@ static VOID test_thread_priority(void) ok(rc == FALSE, "SetThreadPriority passed with a bad argument\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_INVALID_PRIORITY /* Win9x */, - "SetThreadPriority error %d, expected ERROR_INVALID_PARAMETER or ERROR_INVALID_PRIORITY\n", + "SetThreadPriority error %ld, expected ERROR_INVALID_PARAMETER or ERROR_INVALID_PRIORITY\n", GetLastError()); ok(GetThreadPriority(curthread)==min_priority, "GetThreadPriority didn't return min_priority\n"); @@ -744,7 +745,7 @@ static VOID test_thread_priority(void) ok(rc == FALSE, "SetThreadPriority passed with a bad argument\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_INVALID_PRIORITY /* Win9x */, - "SetThreadPriority error %d, expected ERROR_INVALID_PARAMETER or ERROR_INVALID_PRIORITY\n", + "SetThreadPriority error %ld, expected ERROR_INVALID_PARAMETER or ERROR_INVALID_PRIORITY\n", GetLastError()); ok(GetThreadPriority(curthread)==max_priority, "GetThreadPriority didn't return max_priority\n"); @@ -761,7 +762,7 @@ static VOID test_thread_priority(void) return; }
- ok(rc!=0,"error=%d\n",GetLastError()); + ok(rc!=0,"error=%ld\n",GetLastError());
if (pOpenThread) { /* check that access control is obeyed */ @@ -777,18 +778,18 @@ static VOID test_thread_priority(void) }
rc = pSetThreadPriorityBoost(curthread,1); - ok( rc != 0, "error=%d\n",GetLastError()); + ok( rc != 0, "error=%ld\n",GetLastError()); todo_wine { rc=pGetThreadPriorityBoost(curthread,&disabled); ok(rc!=0 && disabled==1, - "rc=%d error=%d disabled=%d\n",rc,GetLastError(),disabled); + "rc=%d error=%ld disabled=%d\n",rc,GetLastError(),disabled); }
rc = pSetThreadPriorityBoost(curthread,0); - ok( rc != 0, "error=%d\n",GetLastError()); + ok( rc != 0, "error=%ld\n",GetLastError()); rc=pGetThreadPriorityBoost(curthread,&disabled); ok(rc!=0 && disabled==0, - "rc=%d error=%d disabled=%d\n",rc,GetLastError(),disabled); + "rc=%d error=%ld disabled=%d\n",rc,GetLastError(),disabled); }
/* check the GetThreadTimes function */ @@ -885,7 +886,7 @@ static VOID test_thread_processor(void) /* Show that the "all processors" flag is handled in ntdll */ DWORD_PTR mask = ~0u; NTSTATUS status = pNtSetInformationThread(curthread, ThreadAffinityMask, &mask, sizeof(mask)); - ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS in NtSetInformationThread, got %x\n", status); + ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS in NtSetInformationThread, got %lx\n", status); }
if (retMask == processMask && sizeof(ULONG_PTR) > sizeof(ULONG)) @@ -916,7 +917,7 @@ static VOID test_thread_processor(void) error=pSetThreadIdealProcessor(curthread,65); ok(error==-1, "SetThreadIdealProcessor succeeded with an illegal processor #\n"); ok(GetLastError()==ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); } else { @@ -924,7 +925,7 @@ static VOID test_thread_processor(void) error=pSetThreadIdealProcessor(curthread,MAXIMUM_PROCESSORS+1); ok(error==-1, "SetThreadIdealProcessor succeeded with an illegal processor #\n"); ok(GetLastError()==ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); }
error=pSetThreadIdealProcessor(curthread,MAXIMUM_PROCESSORS); @@ -945,14 +946,14 @@ static VOID test_thread_processor(void) SetLastError(0xdeadbeef); ok(!pGetThreadGroupAffinity(curthread, NULL), "GetThreadGroupAffinity succeeded\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER || broken(GetLastError() == ERROR_NOACCESS), /* Win 7 and 8 */ - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); ok(affinity.Group == 0, "Expected group 0 got %u\n", affinity.Group);
memset(&affinity_new, 0, sizeof(affinity_new)); affinity_new.Group = 0; affinity_new.Mask = affinity.Mask; ok(pSetThreadGroupAffinity(curthread, &affinity_new, &affinity), "SetThreadGroupAffinity failed\n"); - ok(affinity_new.Mask == affinity.Mask, "Expected old affinity mask %lx, got %lx\n", + ok(affinity_new.Mask == affinity.Mask, "Expected old affinity mask %Ix, got %Ix\n", affinity_new.Mask, affinity.Mask);
/* show that the "all processors" flag is not supported for SetThreadGroupAffinity */ @@ -961,31 +962,31 @@ static VOID test_thread_processor(void) SetLastError(0xdeadbeef); ok(!pSetThreadGroupAffinity(curthread, &affinity_new, NULL), "SetThreadGroupAffinity succeeded\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
affinity_new.Group = 1; /* assumes that you have less than 64 logical processors */ affinity_new.Mask = 0x1; SetLastError(0xdeadbeef); ok(!pSetThreadGroupAffinity(curthread, &affinity_new, NULL), "SetThreadGroupAffinity succeeded\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ok(!pSetThreadGroupAffinity(curthread, NULL, NULL), "SetThreadGroupAffinity succeeded\n"); ok(GetLastError() == ERROR_NOACCESS, - "Expected ERROR_NOACCESS, got %d\n", GetLastError()); + "Expected ERROR_NOACCESS, got %ld\n", GetLastError());
/* show that the access violation was detected in ntdll */ status = pNtSetInformationThread(curthread, ThreadGroupInformation, NULL, sizeof(affinity_new)); ok(status == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", status); + "Expected STATUS_ACCESS_VIOLATION, got %08lx\n", status);
/* restore original mask */ affinity_new.Group = 0; affinity_new.Mask = affinity.Mask; SetLastError(0xdeadbeef); ok(pSetThreadGroupAffinity(curthread, &affinity_new, &affinity), "SetThreadGroupAffinity failed\n"); - ok(affinity_new.Mask == affinity.Mask, "Expected old affinity mask %lx, got %lx\n", + ok(affinity_new.Mask == affinity.Mask, "Expected old affinity mask %Ix, got %Ix\n", affinity_new.Mask, affinity.Mask); } else @@ -1011,8 +1012,8 @@ static VOID test_GetCurrentThreadStackLimits(void) }
pGetCurrentThreadStackLimits(&low, &high); - ok(low == (ULONG_PTR)NtCurrentTeb()->DeallocationStack, "expected %p, got %lx\n", NtCurrentTeb()->DeallocationStack, low); - ok(high == (ULONG_PTR)NtCurrentTeb()->Tib.StackBase, "expected %p, got %lx\n", NtCurrentTeb()->Tib.StackBase, high); + ok(low == (ULONG_PTR)NtCurrentTeb()->DeallocationStack, "expected %p, got %Ix\n", NtCurrentTeb()->DeallocationStack, low); + ok(high == (ULONG_PTR)NtCurrentTeb()->Tib.StackBase, "expected %p, got %Ix\n", NtCurrentTeb()->Tib.StackBase, high); }
static void test_SetThreadStackGuarantee(void) @@ -1027,46 +1028,46 @@ static void test_SetThreadStackGuarantee(void) } size = 0; ret = pSetThreadStackGuarantee( &size ); - ok( ret, "failed err %u\n", GetLastError() ); - ok( size == 0, "wrong size %u\n", size ); - ok( NtCurrentTeb()->GuaranteedStackBytes == 0, "wrong teb %u\n", + ok( ret, "failed err %lu\n", GetLastError() ); + ok( size == 0, "wrong size %lu\n", size ); + ok( NtCurrentTeb()->GuaranteedStackBytes == 0, "wrong teb %lu\n", NtCurrentTeb()->GuaranteedStackBytes ); size = 0xdeadbef; ret = pSetThreadStackGuarantee( &size ); ok( !ret, "succeeded\n" ); ok( GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_INVALID_ADDRESS, - "wrong error %u\n", GetLastError()); - ok( size == 0, "wrong size %u\n", size ); - ok( NtCurrentTeb()->GuaranteedStackBytes == 0, "wrong teb %u\n", + "wrong error %lu\n", GetLastError()); + ok( size == 0, "wrong size %lu\n", size ); + ok( NtCurrentTeb()->GuaranteedStackBytes == 0, "wrong teb %lu\n", NtCurrentTeb()->GuaranteedStackBytes ); size = 200; ret = pSetThreadStackGuarantee( &size ); - ok( ret, "failed err %u\n", GetLastError() ); - ok( size == 0, "wrong size %u\n", size ); - ok( NtCurrentTeb()->GuaranteedStackBytes == 4096 * sizeof(void *) / 4, "wrong teb %u\n", + ok( ret, "failed err %lu\n", GetLastError() ); + ok( size == 0, "wrong size %lu\n", size ); + ok( NtCurrentTeb()->GuaranteedStackBytes == 4096 * sizeof(void *) / 4, "wrong teb %lu\n", NtCurrentTeb()->GuaranteedStackBytes ); size = 5000; ret = pSetThreadStackGuarantee( &size ); - ok( ret, "failed err %u\n", GetLastError() ); - ok( size == 4096 * sizeof(void *) / 4, "wrong size %u\n", size ); - ok( NtCurrentTeb()->GuaranteedStackBytes == 8192, "wrong teb %u\n", + ok( ret, "failed err %lu\n", GetLastError() ); + ok( size == 4096 * sizeof(void *) / 4, "wrong size %lu\n", size ); + ok( NtCurrentTeb()->GuaranteedStackBytes == 8192, "wrong teb %lu\n", NtCurrentTeb()->GuaranteedStackBytes ); size = 2000; ret = pSetThreadStackGuarantee( &size ); - ok( ret, "failed err %u\n", GetLastError() ); - ok( size == 8192, "wrong size %u\n", size ); - ok( NtCurrentTeb()->GuaranteedStackBytes == 8192, "wrong teb %u\n", + ok( ret, "failed err %lu\n", GetLastError() ); + ok( size == 8192, "wrong size %lu\n", size ); + ok( NtCurrentTeb()->GuaranteedStackBytes == 8192, "wrong teb %lu\n", NtCurrentTeb()->GuaranteedStackBytes ); size = 10000; ret = pSetThreadStackGuarantee( &size ); - ok( ret, "failed err %u\n", GetLastError() ); - ok( size == 8192, "wrong size %u\n", size ); - ok( NtCurrentTeb()->GuaranteedStackBytes == 12288, "wrong teb %u\n", + ok( ret, "failed err %lu\n", GetLastError() ); + ok( size == 8192, "wrong size %lu\n", size ); + ok( NtCurrentTeb()->GuaranteedStackBytes == 12288, "wrong teb %lu\n", NtCurrentTeb()->GuaranteedStackBytes ); ret = pSetThreadStackGuarantee( &size ); - ok( ret, "failed err %u\n", GetLastError() ); - ok( size == 12288, "wrong size %u\n", size ); - ok( NtCurrentTeb()->GuaranteedStackBytes == 12288, "wrong teb %u\n", + ok( ret, "failed err %lu\n", GetLastError() ); + ok( size == 12288, "wrong size %lu\n", size ); + ok( NtCurrentTeb()->GuaranteedStackBytes == 12288, "wrong teb %lu\n", NtCurrentTeb()->GuaranteedStackBytes ); }
@@ -1077,17 +1078,17 @@ static VOID test_GetThreadExitCode(void) HANDLE thread;
ret = GetExitCodeThread((HANDLE)0x2bad2bad,&exitCode); - ok(ret==0, "GetExitCodeThread returned non zero value: %d\n", ret); + ok(ret==0, "GetExitCodeThread returned non zero value: %ld\n", ret); GLE = GetLastError(); - ok(GLE==ERROR_INVALID_HANDLE, "GetLastError returned %d (expected 6)\n", GLE); + ok(GLE==ERROR_INVALID_HANDLE, "GetLastError returned %ld (expected 6)\n", GLE);
thread = CreateThread(NULL,0,threadFunc2,NULL,0,&threadid); ret = WaitForSingleObject(thread,100); ok(ret==WAIT_OBJECT_0, "threadFunc2 did not exit during 100 ms\n"); ret = GetExitCodeThread(thread,&exitCode); ok(ret==exitCode || ret==1, - "GetExitCodeThread returned %d (expected 1 or %d)\n", ret, exitCode); - ok(exitCode==99, "threadFunc2 exited with code %d (expected 99)\n", exitCode); + "GetExitCodeThread returned %ld (expected 1 or %ld)\n", ret, exitCode); + ok(exitCode==99, "threadFunc2 exited with code %ld (expected 99)\n", exitCode); ok(CloseHandle(thread)!=0,"Error closing thread handle\n"); }
@@ -1122,7 +1123,7 @@ static void test_SetThreadContext(void) SetLastError(0xdeadbeef); event = CreateEventW( NULL, TRUE, FALSE, NULL ); thread = CreateThread( NULL, 0, threadFunc6, (void *)2, 0, &threadid ); - ok( thread != NULL, "CreateThread failed : (%d)\n", GetLastError() ); + ok( thread != NULL, "CreateThread failed : (%ld)\n", GetLastError() ); if (!thread) { trace("Thread creation failed, skipping rest of test\n"); @@ -1135,7 +1136,7 @@ static void test_SetThreadContext(void) ctx.ContextFlags = CONTEXT_FULL; SetLastError(0xdeadbeef); ret = GetThreadContext( thread, &ctx ); - ok( ret, "GetThreadContext failed : (%u)\n", GetLastError() ); + ok( ret, "GetThreadContext failed : (%lu)\n", GetLastError() );
if (ret) { @@ -1147,12 +1148,12 @@ static void test_SetThreadContext(void) ctx.Eip = (DWORD)set_test_val; SetLastError(0xdeadbeef); ret = SetThreadContext( thread, &ctx ); - ok( ret, "SetThreadContext failed : (%d)\n", GetLastError() ); + ok( ret, "SetThreadContext failed : (%ld)\n", GetLastError() ); }
SetLastError(0xdeadbeef); prevcount = ResumeThread( thread ); - ok ( prevcount == 1, "Previous suspend count (%d) instead of 1, last error : (%d)\n", + ok ( prevcount == 1, "Previous suspend count (%ld) instead of 1, last error : (%ld)\n", prevcount, GetLastError() );
WaitForSingleObject( thread, INFINITE ); @@ -1164,7 +1165,7 @@ static void test_SetThreadContext(void) ok( (!ret && ((GetLastError() == ERROR_GEN_FAILURE) || (GetLastError() == ERROR_ACCESS_DENIED))) || (!ret && broken(GetLastError() == ERROR_INVALID_HANDLE)) || /* win2k */ broken(ret), /* 32bit application on NT 5.x 64bit */ - "got %d with %u (expected FALSE with ERROR_GEN_FAILURE or ERROR_ACCESS_DENIED)\n", + "got %d with %lu (expected FALSE with ERROR_GEN_FAILURE or ERROR_ACCESS_DENIED)\n", ret, GetLastError() );
SetLastError(0xdeadbeef); @@ -1172,7 +1173,7 @@ static void test_SetThreadContext(void) ok( (!ret && ((GetLastError() == ERROR_GEN_FAILURE) || (GetLastError() == ERROR_ACCESS_DENIED))) || (!ret && broken(GetLastError() == ERROR_INVALID_HANDLE)) || /* win2k */ broken(ret), /* 32bit application on NT 5.x 64bit */ - "got %d with %u (expected FALSE with ERROR_GEN_FAILURE or ERROR_ACCESS_DENIED)\n", + "got %d with %lu (expected FALSE with ERROR_GEN_FAILURE or ERROR_ACCESS_DENIED)\n", ret, GetLastError() );
CloseHandle( thread ); @@ -1184,10 +1185,10 @@ static DWORD WINAPI test_stack( void *arg )
ok( stack == NtCurrentTeb()->Tib.StackBase, "wrong stack %p/%p\n", stack, NtCurrentTeb()->Tib.StackBase ); - ok( !stack[-1], "wrong data %p = %08x\n", stack - 1, stack[-1] ); - ok( stack[-2] == (DWORD)arg, "wrong data %p = %08x\n", stack - 2, stack[-2] ); - ok( stack[-3] == (DWORD)test_stack, "wrong data %p = %08x\n", stack - 3, stack[-3] ); - ok( !stack[-4], "wrong data %p = %08x\n", stack - 4, stack[-4] ); + ok( !stack[-1], "wrong data %p = %08lx\n", stack - 1, stack[-1] ); + ok( stack[-2] == (DWORD)arg, "wrong data %p = %08lx\n", stack - 2, stack[-2] ); + ok( stack[-3] == (DWORD)test_stack, "wrong data %p = %08lx\n", stack - 3, stack[-3] ); + ok( !stack[-4], "wrong data %p = %08lx\n", stack - 4, stack[-4] ); return 0; }
@@ -1200,10 +1201,10 @@ static void test_GetThreadContext(void) memset(&ctx, 0xcc, sizeof(ctx)); ctx.ContextFlags = CONTEXT_DEBUG_REGISTERS; ret = GetThreadContext(GetCurrentThread(), &ctx); - ok(ret, "GetThreadContext failed: %u\n", GetLastError()); - ok(ctx.ContextFlags == CONTEXT_DEBUG_REGISTERS, "ContextFlags = %x\n", ctx.ContextFlags); - ok(!ctx.Dr0, "Dr0 = %x\n", ctx.Dr0); - ok(!ctx.Dr1, "Dr0 = %x\n", ctx.Dr0); + ok(ret, "GetThreadContext failed: %lu\n", GetLastError()); + ok(ctx.ContextFlags == CONTEXT_DEBUG_REGISTERS, "ContextFlags = %lx\n", ctx.ContextFlags); + ok(!ctx.Dr0, "Dr0 = %lx\n", ctx.Dr0); + ok(!ctx.Dr1, "Dr0 = %lx\n", ctx.Dr0);
thread = CreateThread( NULL, 0, test_stack, (void *)0x1234, 0, NULL ); WaitForSingleObject( thread, 1000 ); @@ -1221,41 +1222,41 @@ static void test_GetThreadSelectorEntry(void) memset(&ctx, 0x11, sizeof(ctx)); ctx.ContextFlags = CONTEXT_SEGMENTS | CONTEXT_CONTROL; ret = GetThreadContext(GetCurrentThread(), &ctx); - ok(ret, "GetThreadContext error %u\n", GetLastError()); - ok(!HIWORD(ctx.SegCs), "expected HIWORD(SegCs) == 0, got %u\n", ctx.SegCs); - ok(!HIWORD(ctx.SegDs), "expected HIWORD(SegDs) == 0, got %u\n", ctx.SegDs); - ok(!HIWORD(ctx.SegFs), "expected HIWORD(SegFs) == 0, got %u\n", ctx.SegFs); + ok(ret, "GetThreadContext error %lu\n", GetLastError()); + ok(!HIWORD(ctx.SegCs), "expected HIWORD(SegCs) == 0, got %lu\n", ctx.SegCs); + ok(!HIWORD(ctx.SegDs), "expected HIWORD(SegDs) == 0, got %lu\n", ctx.SegDs); + ok(!HIWORD(ctx.SegFs), "expected HIWORD(SegFs) == 0, got %lu\n", ctx.SegFs);
ret = GetThreadSelectorEntry(GetCurrentThread(), ctx.SegCs, &entry); - ok(ret, "GetThreadSelectorEntry(SegCs) error %u\n", GetLastError()); + ok(ret, "GetThreadSelectorEntry(SegCs) error %lu\n", GetLastError()); ret = GetThreadSelectorEntry(GetCurrentThread(), ctx.SegDs, &entry); - ok(ret, "GetThreadSelectorEntry(SegDs) error %u\n", GetLastError()); + ok(ret, "GetThreadSelectorEntry(SegDs) error %lu\n", GetLastError()); ret = GetThreadSelectorEntry(GetCurrentThread(), ctx.SegDs & ~3, &entry); - ok(ret, "GetThreadSelectorEntry(SegDs) error %u\n", GetLastError()); + ok(ret, "GetThreadSelectorEntry(SegDs) error %lu\n", GetLastError()); ret = GetThreadSelectorEntry(GetCurrentThread(), 0, &entry); - ok(ret, "GetThreadSelectorEntry(SegDs) error %u\n", GetLastError()); + ok(ret, "GetThreadSelectorEntry(SegDs) error %lu\n", GetLastError()); ret = GetThreadSelectorEntry(GetCurrentThread(), 3, &entry); - ok(ret, "GetThreadSelectorEntry(SegDs) error %u\n", GetLastError()); + ok(ret, "GetThreadSelectorEntry(SegDs) error %lu\n", GetLastError()); SetLastError( 0xdeadbeef ); ret = GetThreadSelectorEntry(GetCurrentThread(), 0xdeadbeef, &entry); ok(!ret, "GetThreadSelectorEntry(invalid) succeeded\n"); ok( GetLastError() == ERROR_GEN_FAILURE - || GetLastError() == ERROR_INVALID_THREAD_ID /* 32-bit */, "wrong error %u\n", GetLastError() ); + || GetLastError() == ERROR_INVALID_THREAD_ID /* 32-bit */, "wrong error %lu\n", GetLastError() ); ret = GetThreadSelectorEntry(GetCurrentThread(), ctx.SegDs + 0x100, &entry); ok(!ret, "GetThreadSelectorEntry(invalid) succeeded\n"); ok( GetLastError() == ERROR_GEN_FAILURE - || GetLastError() == ERROR_NOACCESS /* 32-bit */, "wrong error %u\n", GetLastError() ); + || GetLastError() == ERROR_NOACCESS /* 32-bit */, "wrong error %lu\n", GetLastError() );
memset(&entry, 0x11, sizeof(entry)); ret = GetThreadSelectorEntry(GetCurrentThread(), ctx.SegFs, &entry); - ok(ret, "GetThreadSelectorEntry(SegFs) error %u\n", GetLastError()); + ok(ret, "GetThreadSelectorEntry(SegFs) error %lu\n", GetLastError()); entry.HighWord.Bits.Type &= ~1; /* ignore accessed bit */
base = (void *)((entry.HighWord.Bits.BaseHi << 24) | (entry.HighWord.Bits.BaseMid << 16) | entry.BaseLow); limit = (entry.HighWord.Bits.LimitHi << 16) | entry.LimitLow;
ok(base == NtCurrentTeb(), "expected %p, got %p\n", NtCurrentTeb(), base); - ok(limit == 0x0fff || limit == 0x4000, "expected 0x0fff or 0x4000, got %#x\n", limit); + ok(limit == 0x0fff || limit == 0x4000, "expected 0x0fff or 0x4000, got %#lx\n", limit); ok(entry.HighWord.Bits.Type == 0x12, "expected 0x12, got %#x\n", entry.HighWord.Bits.Type); ok(entry.HighWord.Bits.Dpl == 3, "expected 3, got %u\n", entry.HighWord.Bits.Dpl); ok(entry.HighWord.Bits.Pres == 1, "expected 1, got %u\n", entry.HighWord.Bits.Pres); @@ -1266,13 +1267,13 @@ static void test_GetThreadSelectorEntry(void)
memset(&entry, 0x11, sizeof(entry)); ret = GetThreadSelectorEntry(GetCurrentThread(), ctx.SegCs, &entry); - ok(ret, "GetThreadSelectorEntry(SegDs) error %u\n", GetLastError()); + ok(ret, "GetThreadSelectorEntry(SegDs) error %lu\n", GetLastError()); entry.HighWord.Bits.Type &= ~1; /* ignore accessed bit */ base = (void *)((entry.HighWord.Bits.BaseHi << 24) | (entry.HighWord.Bits.BaseMid << 16) | entry.BaseLow); limit = (entry.HighWord.Bits.LimitHi << 16) | entry.LimitLow;
ok(base == 0, "got base %p\n", base); - ok(limit == ~0u >> 12, "got limit %#x\n", limit); + ok(limit == ~0u >> 12, "got limit %#lx\n", limit); ok(entry.HighWord.Bits.Type == 0x1a, "expected 0x12, got %#x\n", entry.HighWord.Bits.Type); ok(entry.HighWord.Bits.Dpl == 3, "expected 3, got %u\n", entry.HighWord.Bits.Dpl); ok(entry.HighWord.Bits.Pres == 1, "expected 1, got %u\n", entry.HighWord.Bits.Pres); @@ -1283,13 +1284,13 @@ static void test_GetThreadSelectorEntry(void)
memset(&entry, 0x11, sizeof(entry)); ret = GetThreadSelectorEntry(GetCurrentThread(), ctx.SegDs, &entry); - ok(ret, "GetThreadSelectorEntry(SegDs) error %u\n", GetLastError()); + ok(ret, "GetThreadSelectorEntry(SegDs) error %lu\n", GetLastError()); entry.HighWord.Bits.Type &= ~1; /* ignore accessed bit */ base = (void *)((entry.HighWord.Bits.BaseHi << 24) | (entry.HighWord.Bits.BaseMid << 16) | entry.BaseLow); limit = (entry.HighWord.Bits.LimitHi << 16) | entry.LimitLow;
ok(base == 0, "got base %p\n", base); - ok(limit == ~0u >> 12, "got limit %#x\n", limit); + ok(limit == ~0u >> 12, "got limit %#lx\n", limit); ok(entry.HighWord.Bits.Type == 0x12, "expected 0x12, got %#x\n", entry.HighWord.Bits.Type); ok(entry.HighWord.Bits.Dpl == 3, "expected 3, got %u\n", entry.HighWord.Bits.Dpl); ok(entry.HighWord.Bits.Pres == 1, "expected 1, got %u\n", entry.HighWord.Bits.Pres); @@ -1329,14 +1330,14 @@ static void test_QueueUserWorkItem(void) for (i = 0; i < 100; i++) { BOOL ret = pQueueUserWorkItem(work_function, (void *)i, WT_EXECUTEDEFAULT); - ok(ret, "QueueUserWorkItem failed with error %d\n", GetLastError()); + ok(ret, "QueueUserWorkItem failed with error %ld\n", GetLastError()); }
wait_result = WaitForSingleObject(finish_event, 10000);
after = GetTickCount(); - trace("100 QueueUserWorkItem calls took %dms\n", after - before); - ok(wait_result == WAIT_OBJECT_0, "wait failed with error 0x%x\n", wait_result); + trace("100 QueueUserWorkItem calls took %ldms\n", after - before); + ok(wait_result == WAIT_OBJECT_0, "wait failed with error 0x%lx\n", wait_result);
ok(times_executed == 100, "didn't execute all of the work items\n"); } @@ -1354,7 +1355,7 @@ static void CALLBACK wait_complete_function(PVOID p, BOOLEAN TimerOrWaitFired) DWORD res; ok(!TimerOrWaitFired, "wait shouldn't have timed out\n"); res = WaitForSingleObject(event, INFINITE); - ok(res == WAIT_OBJECT_0, "WaitForSingleObject returned %x\n", res); + ok(res == WAIT_OBJECT_0, "WaitForSingleObject returned %lx\n", res); }
static void CALLBACK timeout_function(PVOID p, BOOLEAN TimerOrWaitFired) @@ -1395,7 +1396,7 @@ static void CALLBACK unregister_function(PVOID p, BOOLEAN TimerOrWaitFired) BOOL ret; ok(wait_handle != INVALID_HANDLE_VALUE, "invalid wait handle\n"); ret = pUnregisterWait(param->wait_handle); - todo_wine ok(ret, "UnregisterWait failed with error %d\n", GetLastError()); + todo_wine ok(ret, "UnregisterWait failed with error %ld\n", GetLastError()); SetEvent(param->complete_event); }
@@ -1422,36 +1423,36 @@ static void test_RegisterWaitForSingleObject(void) complete_event = CreateEventW(NULL, FALSE, FALSE, NULL);
ret = pRegisterWaitForSingleObject(&wait_handle, handle, signaled_function, complete_event, INFINITE, WT_EXECUTEONLYONCE); - ok(ret, "RegisterWaitForSingleObject failed with error %d\n", GetLastError()); + ok(ret, "RegisterWaitForSingleObject failed with error %ld\n", GetLastError());
WaitForSingleObject(complete_event, INFINITE); /* give worker thread chance to complete */ Sleep(100);
ret = pUnregisterWait(wait_handle); - ok(ret, "UnregisterWait failed with error %d\n", GetLastError()); + ok(ret, "UnregisterWait failed with error %ld\n", GetLastError());
/* test cancel case */
ResetEvent(handle);
ret = pRegisterWaitForSingleObject(&wait_handle, handle, signaled_function, complete_event, INFINITE, WT_EXECUTEONLYONCE); - ok(ret, "RegisterWaitForSingleObject failed with error %d\n", GetLastError()); + ok(ret, "RegisterWaitForSingleObject failed with error %ld\n", GetLastError());
ret = pUnregisterWait(wait_handle); - ok(ret, "UnregisterWait failed with error %d\n", GetLastError()); + ok(ret, "UnregisterWait failed with error %ld\n", GetLastError());
/* test unregister while running */
SetEvent(handle); ret = pRegisterWaitForSingleObject(&wait_handle, handle, wait_complete_function, complete_event, INFINITE, WT_EXECUTEONLYONCE); - ok(ret, "RegisterWaitForSingleObject failed with error %d\n", GetLastError()); + ok(ret, "RegisterWaitForSingleObject failed with error %ld\n", GetLastError());
/* give worker thread chance to start */ Sleep(50); ret = pUnregisterWait(wait_handle); ok(!ret, "UnregisterWait succeeded\n"); - ok(GetLastError() == ERROR_IO_PENDING, "UnregisterWait failed with error %d\n", GetLastError()); + ok(GetLastError() == ERROR_IO_PENDING, "UnregisterWait failed with error %ld\n", GetLastError());
/* give worker thread chance to complete */ SetEvent(complete_event); @@ -1462,33 +1463,33 @@ static void test_RegisterWaitForSingleObject(void) ResetEvent(handle);
ret = pRegisterWaitForSingleObject(&wait_handle, handle, timeout_function, complete_event, 0, WT_EXECUTEONLYONCE); - ok(ret, "RegisterWaitForSingleObject failed with error %d\n", GetLastError()); + ok(ret, "RegisterWaitForSingleObject failed with error %ld\n", GetLastError());
WaitForSingleObject(complete_event, INFINITE); /* give worker thread chance to complete */ Sleep(100);
ret = pUnregisterWait(wait_handle); - ok(ret, "UnregisterWait failed with error %d\n", GetLastError()); + ok(ret, "UnregisterWait failed with error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = pUnregisterWait(NULL); ok(!ret, "Expected UnregisterWait to fail\n"); ok(GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
/* test WT_EXECUTEINWAITTHREAD */
SetEvent(handle); ret = pRegisterWaitForSingleObject(&wait_handle, handle, signaled_function, complete_event, INFINITE, WT_EXECUTEONLYONCE | WT_EXECUTEINWAITTHREAD); - ok(ret, "RegisterWaitForSingleObject failed with error %d\n", GetLastError()); + ok(ret, "RegisterWaitForSingleObject failed with error %ld\n", GetLastError());
WaitForSingleObject(complete_event, INFINITE); /* give worker thread chance to complete */ Sleep(100);
ret = pUnregisterWait(wait_handle); - ok(ret, "UnregisterWait failed with error %d\n", GetLastError()); + ok(ret, "UnregisterWait failed with error %ld\n", GetLastError());
/* the callback execution should be sequentially consistent with the wait handle return, even if the event is already set */ @@ -1500,7 +1501,7 @@ static void test_RegisterWaitForSingleObject(void) unregister_param.wait_handle = INVALID_HANDLE_VALUE;
ret = pRegisterWaitForSingleObject(&unregister_param.wait_handle, handle, unregister_function, &unregister_param, INFINITE, WT_EXECUTEONLYONCE | WT_EXECUTEINWAITTHREAD); - ok(ret, "RegisterWaitForSingleObject failed with error %d\n", GetLastError()); + ok(ret, "RegisterWaitForSingleObject failed with error %ld\n", GetLastError());
WaitForSingleObject(complete_event, INFINITE); } @@ -1519,20 +1520,20 @@ static void test_RegisterWaitForSingleObject(void)
ret = pRegisterWaitForSingleObject(&wait_handle2, waitthread_trigger_event, signaled_function, waitthread_wait_event, INFINITE, WT_EXECUTEONLYONCE | WT_EXECUTEINWAITTHREAD); - ok(ret, "RegisterWaitForSingleObject failed with error %d\n", GetLastError()); + ok(ret, "RegisterWaitForSingleObject failed with error %ld\n", GetLastError());
ret = pRegisterWaitForSingleObject(&wait_handle, handle, waitthread_test_function, ¶m, INFINITE, WT_EXECUTEONLYONCE | WT_EXECUTEINWAITTHREAD); - ok(ret, "RegisterWaitForSingleObject failed with error %d\n", GetLastError()); + ok(ret, "RegisterWaitForSingleObject failed with error %ld\n", GetLastError());
WaitForSingleObject(complete_event, INFINITE); /* give worker thread chance to complete */ Sleep(100);
ret = pUnregisterWait(wait_handle); - ok(ret, "UnregisterWait failed with error %d\n", GetLastError()); + ok(ret, "UnregisterWait failed with error %ld\n", GetLastError());
ret = pUnregisterWait(wait_handle2); - ok(ret, "UnregisterWait failed with error %d\n", GetLastError()); + ok(ret, "UnregisterWait failed with error %ld\n", GetLastError());
CloseHandle(waitthread_wait_event); CloseHandle(waitthread_trigger_event); @@ -1738,7 +1739,7 @@ static void run_LS_tests(void) }
ret = WaitForMultipleObjects(2, threads, TRUE, 60000); - ok(ret == WAIT_OBJECT_0 || broken(ret == WAIT_OBJECT_0+1 /* nt4,w2k */), "WaitForAllObjects 2 threads %d\n",ret); + ok(ret == WAIT_OBJECT_0 || broken(ret == WAIT_OBJECT_0+1 /* nt4,w2k */), "WaitForAllObjects 2 threads %ld\n",ret);
for (i = 0; i < 2; ++i) CloseHandle(threads[i]); @@ -1811,48 +1812,48 @@ static void test_ThreadErrorMode(void) ret = pSetThreadErrorMode(0, &mode); ok(ret, "SetThreadErrorMode failed\n"); ok(mode == oldmode, - "SetThreadErrorMode returned old mode 0x%x, expected 0x%x\n", + "SetThreadErrorMode returned old mode 0x%lx, expected 0x%lx\n", mode, oldmode); mode = pGetThreadErrorMode(); - ok(mode == 0, "GetThreadErrorMode returned mode 0x%x, expected 0\n", mode); + ok(mode == 0, "GetThreadErrorMode returned mode 0x%lx, expected 0\n", mode); rtlmode = pRtlGetThreadErrorMode(); ok(rtlmode == 0, - "RtlGetThreadErrorMode returned mode 0x%x, expected 0\n", mode); + "RtlGetThreadErrorMode returned mode 0x%lx, expected 0\n", mode);
ret = pSetThreadErrorMode(SEM_FAILCRITICALERRORS, &mode); ok(ret, "SetThreadErrorMode failed\n"); ok(mode == 0, - "SetThreadErrorMode returned old mode 0x%x, expected 0\n", mode); + "SetThreadErrorMode returned old mode 0x%lx, expected 0\n", mode); mode = pGetThreadErrorMode(); ok(mode == SEM_FAILCRITICALERRORS, - "GetThreadErrorMode returned mode 0x%x, expected SEM_FAILCRITICALERRORS\n", + "GetThreadErrorMode returned mode 0x%lx, expected SEM_FAILCRITICALERRORS\n", mode); rtlmode = pRtlGetThreadErrorMode(); ok(rtlmode == 0x10, - "RtlGetThreadErrorMode returned mode 0x%x, expected 0x10\n", mode); + "RtlGetThreadErrorMode returned mode 0x%lx, expected 0x10\n", mode);
ret = pSetThreadErrorMode(SEM_NOGPFAULTERRORBOX, &mode); ok(ret, "SetThreadErrorMode failed\n"); ok(mode == SEM_FAILCRITICALERRORS, - "SetThreadErrorMode returned old mode 0x%x, expected SEM_FAILCRITICALERRORS\n", + "SetThreadErrorMode returned old mode 0x%lx, expected SEM_FAILCRITICALERRORS\n", mode); mode = pGetThreadErrorMode(); ok(mode == SEM_NOGPFAULTERRORBOX, - "GetThreadErrorMode returned mode 0x%x, expected SEM_NOGPFAULTERRORBOX\n", + "GetThreadErrorMode returned mode 0x%lx, expected SEM_NOGPFAULTERRORBOX\n", mode); rtlmode = pRtlGetThreadErrorMode(); ok(rtlmode == 0x20, - "RtlGetThreadErrorMode returned mode 0x%x, expected 0x20\n", mode); + "RtlGetThreadErrorMode returned mode 0x%lx, expected 0x20\n", mode);
ret = pSetThreadErrorMode(SEM_NOOPENFILEERRORBOX, NULL); ok(ret, "SetThreadErrorMode failed\n"); mode = pGetThreadErrorMode(); ok(mode == SEM_NOOPENFILEERRORBOX, - "GetThreadErrorMode returned mode 0x%x, expected SEM_NOOPENFILEERRORBOX\n", + "GetThreadErrorMode returned mode 0x%lx, expected SEM_NOOPENFILEERRORBOX\n", mode); rtlmode = pRtlGetThreadErrorMode(); ok(rtlmode == 0x40, - "RtlGetThreadErrorMode returned mode 0x%x, expected 0x40\n", rtlmode); + "RtlGetThreadErrorMode returned mode 0x%lx, expected 0x40\n", rtlmode);
for (mode = 1; mode; mode <<= 1) { @@ -1862,17 +1863,17 @@ static void test_ThreadErrorMode(void) SEM_NOOPENFILEERRORBOX)) { ok(ret, - "SetThreadErrorMode(0x%x,NULL) failed with error %d\n", + "SetThreadErrorMode(0x%lx,NULL) failed with error %ld\n", mode, GetLastError()); } else { DWORD GLE = GetLastError(); ok(!ret, - "SetThreadErrorMode(0x%x,NULL) succeeded, expected failure\n", + "SetThreadErrorMode(0x%lx,NULL) succeeded, expected failure\n", mode); ok(GLE == ERROR_INVALID_PARAMETER, - "SetThreadErrorMode(0x%x,NULL) failed with %d, " + "SetThreadErrorMode(0x%lx,NULL) failed with %ld, " "expected ERROR_INVALID_PARAMETER\n", mode, GLE); } @@ -1941,7 +1942,7 @@ static DWORD WINAPI fpu_thread(void *param) ctx->fpu_cw = get_fpu_cw();
ret = SetEvent(ctx->finished); - ok(ret, "SetEvent failed, last error %#x.\n", GetLastError()); + ok(ret, "SetEvent failed, last error %#lx.\n", GetLastError());
return 0; } @@ -1953,16 +1954,16 @@ static unsigned int get_thread_fpu_cw( unsigned long *fpu_cw ) HANDLE thread;
ctx.finished = CreateEventW(NULL, FALSE, FALSE, NULL); - ok(!!ctx.finished, "Failed to create event, last error %#x.\n", GetLastError()); + ok(!!ctx.finished, "Failed to create event, last error %#lx.\n", GetLastError());
thread = CreateThread(NULL, 0, fpu_thread, &ctx, 0, &tid); - ok(!!thread, "Failed to create thread, last error %#x.\n", GetLastError()); + ok(!!thread, "Failed to create thread, last error %#lx.\n", GetLastError());
res = WaitForSingleObject(ctx.finished, INFINITE); - ok(res == WAIT_OBJECT_0, "Wait failed (%#x), last error %#x.\n", res, GetLastError()); + ok(res == WAIT_OBJECT_0, "Wait failed (%#lx), last error %#lx.\n", res, GetLastError());
res = CloseHandle(ctx.finished); - ok(!!res, "Failed to close event handle, last error %#x.\n", GetLastError()); + ok(!!res, "Failed to close event handle, last error %#lx.\n", GetLastError());
CloseHandle(thread); *fpu_cw = ctx.fpu_cw; @@ -2080,7 +2081,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); } @@ -2097,10 +2098,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); @@ -2129,14 +2130,14 @@ static void test_thread_actctx(void)
handle = (void*)0xdeadbeef; b = GetCurrentActCtx(&handle); - ok(b, "GetCurrentActCtx failed: %u\n", GetLastError()); + ok(b, "GetCurrentActCtx failed: %lu\n", GetLastError()); ok(handle == 0, "active context %p\n", handle);
/* without active context */ param.thread_context = (void*)0xdeadbeef; param.handle = NULL; thread = CreateThread(NULL, 0, thread_actctx_func, ¶m, 0, &tid); - ok(thread != NULL, "failed, got %u\n", GetLastError()); + ok(thread != NULL, "failed, got %lu\n", GetLastError());
ret = WaitForSingleObject(thread, 1000); ok(ret == WAIT_OBJECT_0, "wait timeout\n"); @@ -2144,21 +2145,21 @@ static void test_thread_actctx(void) CloseHandle(thread);
b = ActivateActCtx(context, &cookie); - ok(b, "activation failed: %u\n", GetLastError()); + ok(b, "activation failed: %lu\n", GetLastError());
handle = 0; b = GetCurrentActCtx(&handle); - ok(b, "GetCurrentActCtx failed: %u\n", GetLastError()); + ok(b, "GetCurrentActCtx failed: %lu\n", GetLastError()); ok(handle != 0, "no active context\n"); ReleaseActCtx(handle);
param.handle = NULL; b = GetCurrentActCtx(¶m.handle); - ok(b && param.handle != NULL, "failed to get context, %u\n", GetLastError()); + ok(b && param.handle != NULL, "failed to get context, %lu\n", GetLastError());
param.thread_context = (void*)0xdeadbeef; thread = CreateThread(NULL, 0, thread_actctx_func, ¶m, 0, &tid); - ok(thread != NULL, "failed, got %u\n", GetLastError()); + ok(thread != NULL, "failed, got %lu\n", GetLastError());
ret = WaitForSingleObject(thread, 1000); ok(ret == WAIT_OBJECT_0, "wait timeout\n"); @@ -2169,7 +2170,7 @@ static void test_thread_actctx(void) /* similar test for CreateRemoteThread() */ param.thread_context = (void*)0xdeadbeef; thread = CreateRemoteThread(GetCurrentProcess(), NULL, 0, thread_actctx_func, ¶m, 0, &tid); - ok(thread != NULL, "failed, got %u\n", GetLastError()); + ok(thread != NULL, "failed, got %lu\n", GetLastError());
ret = WaitForSingleObject(thread, 1000); ok(ret == WAIT_OBJECT_0, "wait timeout\n"); @@ -2180,7 +2181,7 @@ static void test_thread_actctx(void) ReleaseActCtx(param.handle);
b = DeactivateActCtx(0, cookie); - ok(b, "DeactivateActCtx failed: %u\n", GetLastError()); + ok(b, "DeactivateActCtx failed: %lu\n", GetLastError()); ReleaseActCtx(context); }
@@ -2203,7 +2204,7 @@ static void test_threadpool(void) }
work = pCreateThreadpoolWork(threadpool_workcallback, &workcalled, NULL); - ok (work != NULL, "Error %d in CreateThreadpoolWork\n", GetLastError()); + ok (work != NULL, "Error %ld in CreateThreadpoolWork\n", GetLastError()); pSubmitThreadpoolWork(work); pWaitForThreadpoolWorkCallbacks(work, FALSE); pCloseThreadpoolWork(work); @@ -2232,7 +2233,7 @@ static void test_reserved_tls(void)
/* Also make sure that there is a TLS allocated. */ tls = TlsAlloc(); - ok(tls && tls != TLS_OUT_OF_INDEXES, "tls = %x\n", tls); + ok(tls && tls != TLS_OUT_OF_INDEXES, "tls = %lx\n", tls); TlsSetValue(tls, (void*)1);
val = TlsGetValue(0); @@ -2245,7 +2246,7 @@ static void test_reserved_tls(void) /* Set TLS index 0 value and see that this works and doesn't cause problems * for remaining tests. */ ret = TlsSetValue(0, (void*)1); - ok(ret, "TlsSetValue(0, 1) failed: %u\n", GetLastError()); + ok(ret, "TlsSetValue(0, 1) failed: %lu\n", GetLastError());
val = TlsGetValue(0); ok(val == (void*)1, "TlsGetValue(0) = %p\n", val); @@ -2325,27 +2326,27 @@ static void test_thread_info(void) case ThreadBasicInformation: case ThreadAmILastThread: case ThreadPriorityBoost: - ok(status == STATUS_SUCCESS, "for info %u expected STATUS_SUCCESS, got %08x (ret_len %u)\n", i, status, ret_len); + ok(status == STATUS_SUCCESS, "for info %lu expected STATUS_SUCCESS, got %08lx (ret_len %lu)\n", i, status, ret_len); break;
#ifdef __i386__ case ThreadDescriptorTableEntry: ok(status == STATUS_SUCCESS || broken(status == STATUS_ACCESS_DENIED) /* testbot VM is broken */, - "for info %u expected STATUS_SUCCESS, got %08x (ret_len %u)\n", i, status, ret_len); + "for info %lu expected STATUS_SUCCESS, got %08lx (ret_len %lu)\n", i, status, ret_len); break; #endif
case ThreadTimes: - ok(status == STATUS_SUCCESS, "for info %u expected STATUS_SUCCESS, got %08x (ret_len %u)\n", i, status, ret_len); + ok(status == STATUS_SUCCESS, "for info %lu expected STATUS_SUCCESS, got %08lx (ret_len %lu)\n", i, status, ret_len); break;
case ThreadIsIoPending: todo_wine - ok(status == STATUS_ACCESS_DENIED, "for info %u expected STATUS_ACCESS_DENIED, got %08x (ret_len %u)\n", i, status, ret_len); + ok(status == STATUS_ACCESS_DENIED, "for info %lu expected STATUS_ACCESS_DENIED, got %08lx (ret_len %lu)\n", i, status, ret_len); break;
default: - ok(status == STATUS_ACCESS_DENIED, "for info %u expected STATUS_ACCESS_DENIED, got %08x (ret_len %u)\n", i, status, ret_len); + ok(status == STATUS_ACCESS_DENIED, "for info %lu expected STATUS_ACCESS_DENIED, got %08lx (ret_len %lu)\n", i, status, ret_len); break; } } @@ -2395,47 +2396,47 @@ static void test_thread_description(void) /* Initial description. */ ptr = NULL; hr = pGetThreadDescription(GetCurrentThread(), &ptr); - ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to get thread description, hr %#x.\n", hr); + ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to get thread description, hr %#lx.\n", hr); ok(!lstrcmpW(ptr, L""), "Unexpected description %s.\n", wine_dbgstr_w(ptr)); LocalFree(ptr);
len = 0; status = pNtQueryInformationThread(GetCurrentThread(), ThreadNameInformation, NULL, 0, &len); - ok(status == STATUS_BUFFER_TOO_SMALL, "Unexpected status %#x.\n", status); - ok(len == sizeof(*thread_desc), "Unexpected structure length %u.\n", len); + ok(status == STATUS_BUFFER_TOO_SMALL, "Unexpected status %#lx.\n", status); + ok(len == sizeof(*thread_desc), "Unexpected structure length %lu.\n", len);
len2 = 0; thread_desc->ThreadName.Length = 1; thread_desc->ThreadName.MaximumLength = 0; thread_desc->ThreadName.Buffer = (WCHAR *)thread_desc; status = pNtQueryInformationThread(GetCurrentThread(), ThreadNameInformation, thread_desc, len, &len2); - ok(!status, "Failed to get thread info, status %#x.\n", status); - ok(len2 == sizeof(*thread_desc), "Unexpected structure length %u.\n", len); + ok(!status, "Failed to get thread info, status %#lx.\n", status); + ok(len2 == sizeof(*thread_desc), "Unexpected structure length %lu.\n", len); ok(!thread_desc->ThreadName.Length, "Unexpected description length %#x.\n", thread_desc->ThreadName.Length); ok(thread_desc->ThreadName.Buffer == (WCHAR *)(thread_desc + 1), "Unexpected description string pointer %p, %p.\n", thread_desc->ThreadName.Buffer, thread_desc);
hr = pSetThreadDescription(GetCurrentThread(), NULL); - ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to set thread description, hr %#x.\n", hr); + ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to set thread description, hr %#lx.\n", hr);
hr = pSetThreadDescription(GetCurrentThread(), desc); - ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to set thread description, hr %#x.\n", hr); + ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to set thread description, hr %#lx.\n", hr);
ptr = NULL; hr = pGetThreadDescription(GetCurrentThread(), &ptr); - ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to get thread description, hr %#x.\n", hr); + ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to get thread description, hr %#lx.\n", hr); ok(!lstrcmpW(ptr, desc), "Unexpected description %s.\n", wine_dbgstr_w(ptr)); LocalFree(ptr);
len = 0; status = pNtQueryInformationThread(GetCurrentThread(), ThreadNameInformation, NULL, 0, &len); - ok(status == STATUS_BUFFER_TOO_SMALL, "Failed to get thread info, status %#x.\n", status); - ok(len == sizeof(*thread_desc) + desc_len, "Unexpected structure length %u.\n", len); + ok(status == STATUS_BUFFER_TOO_SMALL, "Failed to get thread info, status %#lx.\n", status); + ok(len == sizeof(*thread_desc) + desc_len, "Unexpected structure length %lu.\n", len);
len = 0; status = pNtQueryInformationThread(GetCurrentThread(), ThreadNameInformation, buff, sizeof(buff), &len); ok(!status, "Failed to get thread info.\n"); - ok(len == sizeof(*thread_desc) + desc_len, "Unexpected structure length %u.\n", len); + ok(len == sizeof(*thread_desc) + desc_len, "Unexpected structure length %lu.\n", len);
ok(thread_desc->ThreadName.Length == desc_len && thread_desc->ThreadName.MaximumLength == desc_len, "Unexpected description length %u.\n", thread_desc->ThreadName.Length); @@ -2446,72 +2447,72 @@ static void test_thread_description(void) /* Partial results. */ len = 0; status = pNtQueryInformationThread(GetCurrentThread(), ThreadNameInformation, NULL, 0, &len); - ok(status == STATUS_BUFFER_TOO_SMALL, "Unexpected status %#x.\n", status); - ok(len == sizeof(*thread_desc) + desc_len, "Unexpected structure length %u.\n", len); + ok(status == STATUS_BUFFER_TOO_SMALL, "Unexpected status %#lx.\n", status); + ok(len == sizeof(*thread_desc) + desc_len, "Unexpected structure length %lu.\n", len);
status = pNtQueryInformationThread(GetCurrentThread(), ThreadNameInformation, buff, len - sizeof(WCHAR), &len); - ok(status == STATUS_BUFFER_TOO_SMALL, "Unexpected status %#x.\n", status); - ok(len == sizeof(*thread_desc) + desc_len, "Unexpected structure length %u.\n", len); + ok(status == STATUS_BUFFER_TOO_SMALL, "Unexpected status %#lx.\n", status); + ok(len == sizeof(*thread_desc) + desc_len, "Unexpected structure length %lu.\n", len);
/* Change description. */ thread_desc->ThreadName.Length = thread_desc->ThreadName.MaximumLength = 8; lstrcpyW((WCHAR *)(thread_desc + 1), L"desc");
status = pNtSetInformationThread(GetCurrentThread(), ThreadNameInformation, thread_desc, sizeof(*thread_desc)); - ok(status == STATUS_SUCCESS, "Failed to set thread description, status %#x.\n", status); + ok(status == STATUS_SUCCESS, "Failed to set thread description, status %#lx.\n", status);
ptr = NULL; hr = pGetThreadDescription(GetCurrentThread(), &ptr); - ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to get thread description, hr %#x.\n", hr); + ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to get thread description, hr %#lx.\n", hr); ok(!lstrcmpW(ptr, L"desc"), "Unexpected description %s.\n", wine_dbgstr_w(ptr)); LocalFree(ptr);
status = pNtSetInformationThread(GetCurrentThread(), ThreadNameInformation, thread_desc, sizeof(*thread_desc) - 1); - ok(status == STATUS_INFO_LENGTH_MISMATCH, "Unexpected status %#x.\n", status); + ok(status == STATUS_INFO_LENGTH_MISMATCH, "Unexpected status %#lx.\n", status);
status = NtSetInformationThread(GetCurrentThread(), ThreadNameInformation, NULL, sizeof(*thread_desc)); - ok(status == STATUS_ACCESS_VIOLATION, "Unexpected status %#x.\n", status); + ok(status == STATUS_ACCESS_VIOLATION, "Unexpected status %#lx.\n", status);
thread_desc->ThreadName.Buffer = NULL; status = pNtSetInformationThread(GetCurrentThread(), ThreadNameInformation, thread_desc, sizeof(*thread_desc)); - ok(status == STATUS_ACCESS_VIOLATION, "Unexpected status %#x.\n", status); + ok(status == STATUS_ACCESS_VIOLATION, "Unexpected status %#lx.\n", status);
hr = pSetThreadDescription(GetCurrentThread(), NULL); - ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to set thread description, hr %#x.\n", hr); + ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to set thread description, hr %#lx.\n", hr);
ptr = NULL; hr = pGetThreadDescription(GetCurrentThread(), &ptr); - ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to get thread description, hr %#x.\n", hr); + ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to get thread description, hr %#lx.\n", hr); ok(!lstrcmpW(ptr, L""), "Unexpected description %s.\n", wine_dbgstr_w(ptr)); LocalFree(ptr);
/* Set with a string from RtlInitUnicodeString. */ hr = pSetThreadDescription(GetCurrentThread(), L"123"); - ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to set thread description, hr %#x.\n", hr); + ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to set thread description, hr %#lx.\n", hr);
lstrcpyW((WCHAR *)(thread_desc + 1), L"desc"); RtlInitUnicodeString(&thread_desc->ThreadName, (WCHAR *)(thread_desc + 1));
status = pNtSetInformationThread(GetCurrentThread(), ThreadNameInformation, thread_desc, sizeof(*thread_desc)); - ok(status == STATUS_SUCCESS, "Failed to set thread description, status %#x.\n", status); + ok(status == STATUS_SUCCESS, "Failed to set thread description, status %#lx.\n", status);
ptr = NULL; hr = pGetThreadDescription(GetCurrentThread(), &ptr); - ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to get thread description, hr %#x.\n", hr); + ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to get thread description, hr %#lx.\n", hr); ok(!lstrcmpW(ptr, L"desc"), "Unexpected description %s.\n", wine_dbgstr_w(ptr)); LocalFree(ptr);
/* Set with 0 length/NULL pointer. */ hr = pSetThreadDescription(GetCurrentThread(), L"123"); - ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to set thread description, hr %#x.\n", hr); + ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to set thread description, hr %#lx.\n", hr);
memset(thread_desc, 0, sizeof(*thread_desc)); status = pNtSetInformationThread(GetCurrentThread(), ThreadNameInformation, thread_desc, sizeof(*thread_desc)); - ok(!status, "Failed to set thread description, status %#x.\n", status); + ok(!status, "Failed to set thread description, status %#lx.\n", status);
ptr = NULL; hr = pGetThreadDescription(GetCurrentThread(), &ptr); - ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to get thread description, hr %#x.\n", hr); + ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to get thread description, hr %#lx.\n", hr); ok(!lstrcmpW(ptr, L""), "Unexpected description %s.\n", wine_dbgstr_w(ptr)); LocalFree(ptr);
@@ -2520,14 +2521,14 @@ static void test_thread_description(void)
ptr = NULL; hr = pGetThreadDescription(thread, &ptr); - ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to get thread description, hr %#x.\n", hr); + ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to get thread description, hr %#lx.\n", hr); ok(!lstrcmpW(ptr, L""), "Unexpected description %s.\n", wine_dbgstr_w(ptr)); LocalFree(ptr);
len = 0; status = pNtQueryInformationThread(thread, ThreadNameInformation, NULL, 0, &len); - ok(status == STATUS_BUFFER_TOO_SMALL, "Unexpected status %#x.\n", status); - ok(len == sizeof(*thread_desc), "Unexpected structure length %u.\n", len); + ok(status == STATUS_BUFFER_TOO_SMALL, "Unexpected status %#lx.\n", status); + ok(len == sizeof(*thread_desc), "Unexpected structure length %lu.\n", len);
CloseHandle(thread);
@@ -2536,11 +2537,11 @@ static void test_thread_description(void)
hr = pSetThreadDescription(thread, desc); todo_wine - ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to set thread description, hr %#x.\n", hr); + ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to set thread description, hr %#lx.\n", hr);
ptr = NULL; hr = pGetThreadDescription(GetCurrentThread(), &ptr); - ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to get thread description, hr %#x.\n", hr); + ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to get thread description, hr %#lx.\n", hr); todo_wine ok(!lstrcmpW(ptr, desc), "Unexpected description %s.\n", wine_dbgstr_w(ptr)); LocalFree(ptr); @@ -2549,7 +2550,7 @@ static void test_thread_description(void)
/* The old exception-based thread name method should not affect GetThreadDescription. */ hr = pSetThreadDescription(GetCurrentThread(), desc); - ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to set thread description, hr %#x.\n", hr); + ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to set thread description, hr %#lx.\n", hr);
vectored_handler = pRtlAddVectoredExceptionHandler(FALSE, &msvc_threadname_vec_handler); ok(vectored_handler != 0, "RtlAddVectoredExceptionHandler failed\n"); @@ -2564,7 +2565,7 @@ static void test_thread_description(void)
ptr = NULL; hr = pGetThreadDescription(GetCurrentThread(), &ptr); - ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to get thread description, hr %#x.\n", hr); + ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to get thread description, hr %#lx.\n", hr); ok(!lstrcmpW(ptr, desc), "Unexpected description %s.\n", wine_dbgstr_w(ptr)); LocalFree(ptr); } @@ -2645,7 +2646,7 @@ START_TEST(thread) HANDLE hThread; DWORD tid; hThread = CreateThread(NULL, 0, threadFunc2, NULL, 0, &tid); - ok(hThread != NULL, "CreateThread failed, error %u\n", + ok(hThread != NULL, "CreateThread failed, error %lu\n", GetLastError()); ok(WaitForSingleObject(hThread, 200) == WAIT_OBJECT_0, "Thread did not exit in time\n");
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/kernel32/tests/virtual.c | 1839 +++++++++++++++++++++-------------------- 1 file changed, 920 insertions(+), 919 deletions(-)
diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c index a3b2d365c33..c4bcf95b668 100644 --- a/dlls/kernel32/tests/virtual.c +++ b/dlls/kernel32/tests/virtual.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 <stdarg.h> #include <stdio.h> @@ -66,9 +67,9 @@ static HANDLE create_target_process(const char *arg) winetest_get_mainargs( &argv ); sprintf(cmdline, "%s %s %s", argv[0], argv[1], arg); ret = CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "error: %u\n", GetLastError()); + ok(ret, "error: %lu\n", GetLastError()); ret = CloseHandle(pi.hThread); - ok(ret, "error %u\n", GetLastError()); + ok(ret, "error %lu\n", GetLastError()); return pi.hProcess; }
@@ -89,7 +90,7 @@ static void test_VirtualAllocEx(void) SetLastError(0xdeadbeef); addr1 = VirtualAllocEx(hProcess, NULL, alloc_size, MEM_COMMIT, PAGE_EXECUTE_READWRITE); - ok(addr1 != NULL, "VirtualAllocEx error %u\n", GetLastError()); + ok(addr1 != NULL, "VirtualAllocEx error %lu\n", GetLastError());
src = VirtualAlloc( NULL, alloc_size, MEM_COMMIT, PAGE_READWRITE ); dst = VirtualAlloc( NULL, alloc_size, MEM_COMMIT, PAGE_READWRITE ); @@ -97,48 +98,48 @@ static void test_VirtualAllocEx(void) src[i] = i & 0xff;
b = WriteProcessMemory(hProcess, addr1, src, alloc_size, &bytes_written); - ok(b && (bytes_written == alloc_size), "%lu bytes written\n", + ok(b && (bytes_written == alloc_size), "%Iu bytes written\n", bytes_written); b = ReadProcessMemory(hProcess, addr1, dst, alloc_size, &bytes_read); - ok(b && (bytes_read == alloc_size), "%lu bytes read\n", bytes_read); + ok(b && (bytes_read == alloc_size), "%Iu bytes read\n", bytes_read); ok(!memcmp(src, dst, alloc_size), "Data from remote process differs\n");
/* test invalid source buffers */
b = VirtualProtect( src + 0x2000, 0x2000, PAGE_NOACCESS, &old_prot ); - ok( b, "VirtualProtect failed error %u\n", GetLastError() ); + ok( b, "VirtualProtect failed error %lu\n", GetLastError() ); b = WriteProcessMemory(hProcess, addr1, src, alloc_size, &bytes_written); ok( !b, "WriteProcessMemory succeeded\n" ); ok( GetLastError() == ERROR_NOACCESS || GetLastError() == ERROR_PARTIAL_COPY, /* vista */ - "wrong error %u\n", GetLastError() ); - ok( bytes_written == 0, "%lu bytes written\n", bytes_written ); + "wrong error %lu\n", GetLastError() ); + ok( bytes_written == 0, "%Iu bytes written\n", bytes_written ); b = ReadProcessMemory(hProcess, addr1, src, alloc_size, &bytes_read); ok( !b, "ReadProcessMemory succeeded\n" ); ok( GetLastError() == ERROR_NOACCESS || GetLastError() == ERROR_PARTIAL_COPY, /* win10 v1607+ */ - "wrong error %u\n", GetLastError() ); + "wrong error %lu\n", GetLastError() ); if (GetLastError() == ERROR_NOACCESS) - ok( bytes_read == 0, "%lu bytes written\n", bytes_read ); + ok( bytes_read == 0, "%Iu bytes written\n", bytes_read );
b = VirtualProtect( src, 0x2000, PAGE_NOACCESS, &old_prot ); - ok( b, "VirtualProtect failed error %u\n", GetLastError() ); + ok( b, "VirtualProtect failed error %lu\n", GetLastError() ); b = WriteProcessMemory(hProcess, addr1, src, alloc_size, &bytes_written); ok( !b, "WriteProcessMemory succeeded\n" ); ok( GetLastError() == ERROR_NOACCESS || GetLastError() == ERROR_PARTIAL_COPY, /* vista */ - "wrong error %u\n", GetLastError() ); - ok( bytes_written == 0, "%lu bytes written\n", bytes_written ); + "wrong error %lu\n", GetLastError() ); + ok( bytes_written == 0, "%Iu bytes written\n", bytes_written ); b = ReadProcessMemory(hProcess, addr1, src, alloc_size, &bytes_read); ok( !b, "ReadProcessMemory succeeded\n" ); ok( GetLastError() == ERROR_NOACCESS || GetLastError() == ERROR_PARTIAL_COPY, /* win10 v1607+ */ - "wrong error %u\n", GetLastError() ); + "wrong error %lu\n", GetLastError() ); if (GetLastError() == ERROR_NOACCESS) - ok( bytes_read == 0, "%lu bytes written\n", bytes_read ); + ok( bytes_read == 0, "%Iu bytes written\n", bytes_read );
b = VirtualFreeEx(hProcess, addr1, 0, MEM_RELEASE); - ok(b != 0, "VirtualFreeEx, error %u\n", GetLastError()); + ok(b != 0, "VirtualFreeEx, error %lu\n", GetLastError());
VirtualFree( src, 0, MEM_RELEASE ); VirtualFree( dst, 0, MEM_RELEASE ); @@ -151,7 +152,7 @@ static void test_VirtualAllocEx(void) addr1 = VirtualAllocEx(hProcess, 0, 0, MEM_RESERVE, PAGE_NOACCESS); ok(addr1 == NULL, "VirtualAllocEx should fail on zero-sized allocation\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "got %u, expected ERROR_INVALID_PARAMETER\n", GetLastError()); + "got %lu, expected ERROR_INVALID_PARAMETER\n", GetLastError());
addr1 = VirtualAllocEx(hProcess, 0, 0xFFFC, MEM_RESERVE, PAGE_NOACCESS); ok(addr1 != NULL, "VirtualAllocEx failed\n"); @@ -161,17 +162,17 @@ static void test_VirtualAllocEx(void) ok(VirtualQueryEx(hProcess, addr1, &info, sizeof(info)) == sizeof(info), "VirtualQueryEx failed\n"); ok(info.BaseAddress == addr1, "%p != %p\n", info.BaseAddress, addr1); ok(info.AllocationBase == addr1, "%p != %p\n", info.AllocationBase, addr1); - ok(info.AllocationProtect == PAGE_NOACCESS, "%x != PAGE_NOACCESS\n", info.AllocationProtect); - ok(info.RegionSize == 0x10000, "%lx != 0x10000\n", info.RegionSize); - ok(info.State == MEM_RESERVE, "%x != MEM_RESERVE\n", info.State); - ok(info.Protect == 0, "%x != PAGE_NOACCESS\n", info.Protect); - ok(info.Type == MEM_PRIVATE, "%x != MEM_PRIVATE\n", info.Type); + ok(info.AllocationProtect == PAGE_NOACCESS, "%lx != PAGE_NOACCESS\n", info.AllocationProtect); + ok(info.RegionSize == 0x10000, "%Ix != 0x10000\n", info.RegionSize); + ok(info.State == MEM_RESERVE, "%lx != MEM_RESERVE\n", info.State); + ok(info.Protect == 0, "%lx != PAGE_NOACCESS\n", info.Protect); + ok(info.Type == MEM_PRIVATE, "%lx != MEM_PRIVATE\n", info.Type);
SetLastError(0xdeadbeef); ok(!VirtualProtectEx(hProcess, addr1, 0xFFFC, PAGE_READONLY, &old_prot), "VirtualProtectEx should fail on a not committed memory\n"); ok(GetLastError() == ERROR_INVALID_ADDRESS, - "got %u, expected ERROR_INVALID_ADDRESS\n", GetLastError()); + "got %lu, expected ERROR_INVALID_ADDRESS\n", GetLastError());
addr2 = VirtualAllocEx(hProcess, addr1, 0x1000, MEM_COMMIT, PAGE_NOACCESS); ok(addr1 == addr2, "VirtualAllocEx failed\n"); @@ -181,32 +182,32 @@ static void test_VirtualAllocEx(void) "VirtualQueryEx failed\n"); ok(info.BaseAddress == addr1, "%p != %p\n", info.BaseAddress, addr1); ok(info.AllocationBase == addr1, "%p != %p\n", info.AllocationBase, addr1); - ok(info.AllocationProtect == PAGE_NOACCESS, "%x != PAGE_NOACCESS\n", info.AllocationProtect); - ok(info.RegionSize == 0x1000, "%lx != 0x1000\n", info.RegionSize); - ok(info.State == MEM_COMMIT, "%x != MEM_COMMIT\n", info.State); + ok(info.AllocationProtect == PAGE_NOACCESS, "%lx != PAGE_NOACCESS\n", info.AllocationProtect); + ok(info.RegionSize == 0x1000, "%Ix != 0x1000\n", info.RegionSize); + ok(info.State == MEM_COMMIT, "%lx != MEM_COMMIT\n", info.State); /* this time NT reports PAGE_NOACCESS as well */ - ok(info.Protect == PAGE_NOACCESS, "%x != PAGE_NOACCESS\n", info.Protect); - ok(info.Type == MEM_PRIVATE, "%x != MEM_PRIVATE\n", info.Type); + ok(info.Protect == PAGE_NOACCESS, "%lx != PAGE_NOACCESS\n", info.Protect); + ok(info.Type == MEM_PRIVATE, "%lx != MEM_PRIVATE\n", info.Type);
/* this should fail, since not the whole range is committed yet */ SetLastError(0xdeadbeef); ok(!VirtualProtectEx(hProcess, addr1, 0xFFFC, PAGE_READONLY, &old_prot), "VirtualProtectEx should fail on a not committed memory\n"); ok(GetLastError() == ERROR_INVALID_ADDRESS, - "got %u, expected ERROR_INVALID_ADDRESS\n", GetLastError()); + "got %lu, expected ERROR_INVALID_ADDRESS\n", GetLastError());
old_prot = 0; ok(VirtualProtectEx(hProcess, addr1, 0x1000, PAGE_READONLY, &old_prot), "VirtualProtectEx failed\n"); - ok(old_prot == PAGE_NOACCESS, "wrong old protection: got %04x instead of PAGE_NOACCESS\n", old_prot); + ok(old_prot == PAGE_NOACCESS, "wrong old protection: got %04lx instead of PAGE_NOACCESS\n", old_prot);
old_prot = 0; ok(VirtualProtectEx(hProcess, addr1, 0x1000, PAGE_READWRITE, &old_prot), "VirtualProtectEx failed\n"); - ok(old_prot == PAGE_READONLY, "wrong old protection: got %04x instead of PAGE_READONLY\n", old_prot); + ok(old_prot == PAGE_READONLY, "wrong old protection: got %04lx instead of PAGE_READONLY\n", old_prot);
ok(!VirtualFreeEx(hProcess, addr1, 0x10000, 0), "VirtualFreeEx should fail with type 0\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "got %u, expected ERROR_INVALID_PARAMETER\n", GetLastError()); + "got %lu, expected ERROR_INVALID_PARAMETER\n", GetLastError());
ok(VirtualFreeEx(hProcess, addr1, 0x10000, MEM_DECOMMIT), "VirtualFreeEx failed\n");
@@ -214,7 +215,7 @@ static void test_VirtualAllocEx(void) ok(!VirtualFreeEx(hProcess, addr1, 1, MEM_RELEASE), "VirtualFreeEx should fail\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "got %u, expected ERROR_INVALID_PARAMETER\n", GetLastError()); + "got %lu, expected ERROR_INVALID_PARAMETER\n", GetLastError());
ok(VirtualFreeEx(hProcess, addr1, 0, MEM_RELEASE), "VirtualFreeEx failed\n");
@@ -232,7 +233,7 @@ static void test_VirtualAlloc(void) addr1 = VirtualAlloc(0, 0, MEM_RESERVE, PAGE_NOACCESS); ok(addr1 == NULL, "VirtualAlloc should fail on zero-sized allocation\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "got %d, expected ERROR_INVALID_PARAMETER\n", GetLastError()); + "got %ld, expected ERROR_INVALID_PARAMETER\n", GetLastError());
addr1 = VirtualAlloc(0, 0xFFFC, MEM_RESERVE, PAGE_NOACCESS); ok(addr1 != NULL, "VirtualAlloc failed\n"); @@ -242,17 +243,17 @@ static void test_VirtualAlloc(void) "VirtualQuery failed\n"); ok(info.BaseAddress == addr1, "%p != %p\n", info.BaseAddress, addr1); ok(info.AllocationBase == addr1, "%p != %p\n", info.AllocationBase, addr1); - ok(info.AllocationProtect == PAGE_NOACCESS, "%x != PAGE_NOACCESS\n", info.AllocationProtect); - ok(info.RegionSize == 0x10000, "%lx != 0x10000\n", info.RegionSize); - ok(info.State == MEM_RESERVE, "%x != MEM_RESERVE\n", info.State); - ok(info.Protect == 0, "%x != PAGE_NOACCESS\n", info.Protect); - ok(info.Type == MEM_PRIVATE, "%x != MEM_PRIVATE\n", info.Type); + ok(info.AllocationProtect == PAGE_NOACCESS, "%lx != PAGE_NOACCESS\n", info.AllocationProtect); + ok(info.RegionSize == 0x10000, "%Ix != 0x10000\n", info.RegionSize); + ok(info.State == MEM_RESERVE, "%lx != MEM_RESERVE\n", info.State); + ok(info.Protect == 0, "%lx != PAGE_NOACCESS\n", info.Protect); + ok(info.Type == MEM_PRIVATE, "%lx != MEM_PRIVATE\n", info.Type);
SetLastError(0xdeadbeef); ok(!VirtualProtect(addr1, 0xFFFC, PAGE_READONLY, &old_prot), "VirtualProtect should fail on a not committed memory\n"); ok( GetLastError() == ERROR_INVALID_ADDRESS, - "got %d, expected ERROR_INVALID_ADDRESS\n", GetLastError()); + "got %ld, expected ERROR_INVALID_ADDRESS\n", GetLastError());
addr2 = VirtualAlloc(addr1, 0x1000, MEM_COMMIT, PAGE_NOACCESS); ok(addr1 == addr2, "VirtualAlloc failed\n"); @@ -262,99 +263,99 @@ static void test_VirtualAlloc(void) "VirtualQuery failed\n"); ok(info.BaseAddress == addr1, "%p != %p\n", info.BaseAddress, addr1); ok(info.AllocationBase == addr1, "%p != %p\n", info.AllocationBase, addr1); - ok(info.AllocationProtect == PAGE_NOACCESS, "%x != PAGE_NOACCESS\n", info.AllocationProtect); - ok(info.RegionSize == 0x1000, "%lx != 0x1000\n", info.RegionSize); - ok(info.State == MEM_COMMIT, "%x != MEM_COMMIT\n", info.State); + ok(info.AllocationProtect == PAGE_NOACCESS, "%lx != PAGE_NOACCESS\n", info.AllocationProtect); + ok(info.RegionSize == 0x1000, "%Ix != 0x1000\n", info.RegionSize); + ok(info.State == MEM_COMMIT, "%lx != MEM_COMMIT\n", info.State); /* this time NT reports PAGE_NOACCESS as well */ - ok(info.Protect == PAGE_NOACCESS, "%x != PAGE_NOACCESS\n", info.Protect); - ok(info.Type == MEM_PRIVATE, "%x != MEM_PRIVATE\n", info.Type); + ok(info.Protect == PAGE_NOACCESS, "%lx != PAGE_NOACCESS\n", info.Protect); + ok(info.Type == MEM_PRIVATE, "%lx != MEM_PRIVATE\n", info.Type);
/* this should fail, since not the whole range is committed yet */ SetLastError(0xdeadbeef); ok(!VirtualProtect(addr1, 0xFFFC, PAGE_READONLY, &old_prot), "VirtualProtect should fail on a not committed memory\n"); ok( GetLastError() == ERROR_INVALID_ADDRESS, - "got %d, expected ERROR_INVALID_ADDRESS\n", GetLastError()); + "got %ld, expected ERROR_INVALID_ADDRESS\n", GetLastError());
ok(VirtualProtect(addr1, 0x1000, PAGE_READONLY, &old_prot), "VirtualProtect failed\n"); ok(old_prot == PAGE_NOACCESS, - "wrong old protection: got %04x instead of PAGE_NOACCESS\n", old_prot); + "wrong old protection: got %04lx instead of PAGE_NOACCESS\n", old_prot);
ok(VirtualProtect(addr1, 0x1000, PAGE_READWRITE, &old_prot), "VirtualProtect failed\n"); ok(old_prot == PAGE_READONLY, - "wrong old protection: got %04x instead of PAGE_READONLY\n", old_prot); + "wrong old protection: got %04lx instead of PAGE_READONLY\n", old_prot);
ok(VirtualQuery(addr1, &info, sizeof(info)) == sizeof(info), "VirtualQuery failed\n"); - ok(info.RegionSize == 0x1000, "%lx != 0x1000\n", info.RegionSize); - ok(info.State == MEM_COMMIT, "%x != MEM_COMMIT\n", info.State); - ok(info.Protect == PAGE_READWRITE, "%x != PAGE_READWRITE\n", info.Protect); + ok(info.RegionSize == 0x1000, "%Ix != 0x1000\n", info.RegionSize); + ok(info.State == MEM_COMMIT, "%lx != MEM_COMMIT\n", info.State); + ok(info.Protect == PAGE_READWRITE, "%lx != PAGE_READWRITE\n", info.Protect); memset( addr1, 0x55, 20 ); - ok( *(DWORD *)addr1 == 0x55555555, "wrong data %x\n", *(DWORD *)addr1 ); + ok( *(DWORD *)addr1 == 0x55555555, "wrong data %lx\n", *(DWORD *)addr1 );
addr2 = VirtualAlloc( addr1, 0x1000, MEM_RESET, PAGE_NOACCESS ); - ok( addr2 == addr1, "VirtualAlloc failed err %u\n", GetLastError() ); - ok( *(DWORD *)addr1 == 0x55555555 || *(DWORD *)addr1 == 0, "wrong data %x\n", *(DWORD *)addr1 ); + ok( addr2 == addr1, "VirtualAlloc failed err %lu\n", GetLastError() ); + ok( *(DWORD *)addr1 == 0x55555555 || *(DWORD *)addr1 == 0, "wrong data %lx\n", *(DWORD *)addr1 ); ok(VirtualQuery(addr1, &info, sizeof(info)) == sizeof(info), "VirtualQuery failed\n"); - ok(info.RegionSize == 0x1000, "%lx != 0x1000\n", info.RegionSize); - ok(info.State == MEM_COMMIT, "%x != MEM_COMMIT\n", info.State); - ok(info.Protect == PAGE_READWRITE, "%x != PAGE_READWRITE\n", info.Protect); + ok(info.RegionSize == 0x1000, "%Ix != 0x1000\n", info.RegionSize); + ok(info.State == MEM_COMMIT, "%lx != MEM_COMMIT\n", info.State); + ok(info.Protect == PAGE_READWRITE, "%lx != PAGE_READWRITE\n", info.Protect);
addr2 = VirtualAlloc( (char *)addr1 + 0x1000, 0x1000, MEM_RESET, PAGE_NOACCESS ); ok( (char *)addr2 == (char *)addr1 + 0x1000, "VirtualAlloc failed\n" );
ok(VirtualQuery(addr2, &info, sizeof(info)) == sizeof(info), "VirtualQuery failed\n"); - ok(info.RegionSize == 0xf000, "%lx != 0xf000\n", info.RegionSize); - ok(info.State == MEM_RESERVE, "%x != MEM_RESERVE\n", info.State); - ok(info.Protect == 0, "%x != 0\n", info.Protect); + ok(info.RegionSize == 0xf000, "%Ix != 0xf000\n", info.RegionSize); + ok(info.State == MEM_RESERVE, "%lx != MEM_RESERVE\n", info.State); + ok(info.Protect == 0, "%lx != 0\n", info.Protect);
addr2 = VirtualAlloc( (char *)addr1 + 0xf000, 0x2000, MEM_RESET, PAGE_NOACCESS ); ok( !addr2, "VirtualAlloc failed\n" ); - ok( GetLastError() == ERROR_INVALID_ADDRESS, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_ADDRESS, "wrong error %lu\n", GetLastError() );
/* invalid protection values */ SetLastError(0xdeadbeef); addr2 = VirtualAlloc(NULL, 0x1000, MEM_RESERVE, 0); ok(!addr2, "VirtualAlloc succeeded\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError());
SetLastError(0xdeadbeef); addr2 = VirtualAlloc(NULL, 0x1000, MEM_COMMIT, 0); ok(!addr2, "VirtualAlloc succeeded\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError());
SetLastError(0xdeadbeef); addr2 = VirtualAlloc(addr1, 0x1000, MEM_COMMIT, PAGE_READONLY | PAGE_EXECUTE); ok(!addr2, "VirtualAlloc succeeded\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ok(!VirtualProtect(addr1, 0x1000, PAGE_READWRITE | PAGE_EXECUTE_WRITECOPY, &old_prot), "VirtualProtect succeeded\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ok(!VirtualProtect(addr1, 0x1000, 0, &old_prot), "VirtualProtect succeeded\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ok(!VirtualFree(addr1, 0x10000, 0), "VirtualFree should fail with type 0\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "got %d, expected ERROR_INVALID_PARAMETER\n", GetLastError()); + "got %ld, expected ERROR_INVALID_PARAMETER\n", GetLastError());
SetLastError(0xdeadbeef); ok(!VirtualFree(addr1, 0, MEM_FREE), "VirtualFree should fail with type MEM_FREE\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "got %d, expected ERROR_INVALID_PARAMETER\n", GetLastError()); + "got %ld, expected ERROR_INVALID_PARAMETER\n", GetLastError());
ok(VirtualFree(addr1, 0x10000, MEM_DECOMMIT), "VirtualFree failed\n");
/* if the type is MEM_RELEASE, size must be 0 */ ok(!VirtualFree(addr1, 1, MEM_RELEASE), "VirtualFree should fail\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "got %d, expected ERROR_INVALID_PARAMETER\n", GetLastError()); + "got %ld, expected ERROR_INVALID_PARAMETER\n", GetLastError());
ok(VirtualFree(addr1, 0, MEM_RELEASE), "VirtualFree failed\n");
@@ -365,39 +366,39 @@ static void test_VirtualAlloc(void) ok(info.BaseAddress == addr1, "%p != %p\n", info.BaseAddress, addr1); ok(info.AllocationBase == addr1, "%p != %p\n", info.AllocationBase, addr1); ok(info.AllocationProtect == (PAGE_READWRITE | PAGE_NOCACHE), - "wrong protect %x\n", info.AllocationProtect); - ok(info.RegionSize == 0x2000, "wrong size %lx\n", info.RegionSize); - ok(info.State == MEM_COMMIT, "wrong state %x\n", info.State); - ok(info.Protect == (PAGE_READWRITE | PAGE_NOCACHE), "wrong protect %x\n", info.Protect); - ok(info.Type == MEM_PRIVATE, "wrong type %x\n", info.Type); + "wrong protect %lx\n", info.AllocationProtect); + ok(info.RegionSize == 0x2000, "wrong size %Ix\n", info.RegionSize); + ok(info.State == MEM_COMMIT, "wrong state %lx\n", info.State); + ok(info.Protect == (PAGE_READWRITE | PAGE_NOCACHE), "wrong protect %lx\n", info.Protect); + ok(info.Type == MEM_PRIVATE, "wrong type %lx\n", info.Type);
ok(VirtualProtect(addr1, 0x1000, PAGE_READWRITE, &old_prot), "VirtualProtect failed\n"); - ok( old_prot == (PAGE_READWRITE | PAGE_NOCACHE), "wrong protect %x\n", old_prot ); + ok( old_prot == (PAGE_READWRITE | PAGE_NOCACHE), "wrong protect %lx\n", old_prot ); ok(VirtualQuery(addr1, &info, sizeof(info)) == sizeof(info), "VirtualQuery failed\n"); ok(info.BaseAddress == addr1, "%p != %p\n", info.BaseAddress, addr1); ok(info.AllocationBase == addr1, "%p != %p\n", info.AllocationBase, addr1); ok(info.AllocationProtect == (PAGE_READWRITE | PAGE_NOCACHE), - "wrong protect %x\n", info.AllocationProtect); + "wrong protect %lx\n", info.AllocationProtect); ok(info.RegionSize == 0x2000 || broken(info.RegionSize == 0x1000), - "wrong size %lx\n", info.RegionSize); - ok(info.State == MEM_COMMIT, "wrong state %x\n", info.State); + "wrong size %Ix\n", info.RegionSize); + ok(info.State == MEM_COMMIT, "wrong state %lx\n", info.State); ok(info.Protect == (PAGE_READWRITE | PAGE_NOCACHE) || broken(info.Protect == PAGE_READWRITE), - "wrong protect %x\n", info.Protect); - ok(info.Type == MEM_PRIVATE, "wrong type %x\n", info.Type); + "wrong protect %lx\n", info.Protect); + ok(info.Type == MEM_PRIVATE, "wrong type %lx\n", info.Type);
ok(VirtualProtect(addr1, 0x1000, PAGE_READONLY, &old_prot), "VirtualProtect failed\n"); ok( old_prot == (PAGE_READWRITE | PAGE_NOCACHE) || broken(old_prot == PAGE_READWRITE), - "wrong protect %x\n", old_prot ); + "wrong protect %lx\n", old_prot ); ok(VirtualQuery(addr1, &info, sizeof(info)) == sizeof(info), "VirtualQuery failed\n"); ok(info.BaseAddress == addr1, "%p != %p\n", info.BaseAddress, addr1); ok(info.AllocationBase == addr1, "%p != %p\n", info.AllocationBase, addr1); ok(info.AllocationProtect == (PAGE_READWRITE | PAGE_NOCACHE), - "wrong protect %x\n", info.AllocationProtect); - ok(info.RegionSize == 0x1000, "wrong size %lx\n", info.RegionSize); - ok(info.State == MEM_COMMIT, "wrong state %x\n", info.State); + "wrong protect %lx\n", info.AllocationProtect); + ok(info.RegionSize == 0x1000, "wrong size %Ix\n", info.RegionSize); + ok(info.State == MEM_COMMIT, "wrong state %lx\n", info.State); ok(info.Protect == (PAGE_READONLY | PAGE_NOCACHE) || broken(info.Protect == PAGE_READONLY), - "wrong protect %x\n", info.Protect); - ok(info.Type == MEM_PRIVATE, "wrong type %x\n", info.Type); + "wrong protect %lx\n", info.Protect); + ok(info.Type == MEM_PRIVATE, "wrong type %lx\n", info.Type);
ok(VirtualFree(addr1, 0, MEM_RELEASE), "VirtualFree failed\n");
@@ -407,23 +408,23 @@ static void test_VirtualAlloc(void) ok(info.BaseAddress == addr1, "%p != %p\n", info.BaseAddress, addr1); ok(info.AllocationBase == addr1, "%p != %p\n", info.AllocationBase, addr1); ok(info.AllocationProtect == PAGE_READWRITE, - "wrong protect %x\n", info.AllocationProtect); - ok(info.RegionSize == 0x2000, "wrong size %lx\n", info.RegionSize); - ok(info.State == MEM_COMMIT, "wrong state %x\n", info.State); - ok(info.Protect == PAGE_READWRITE, "wrong protect %x\n", info.Protect); - ok(info.Type == MEM_PRIVATE, "wrong type %x\n", info.Type); + "wrong protect %lx\n", info.AllocationProtect); + ok(info.RegionSize == 0x2000, "wrong size %Ix\n", info.RegionSize); + ok(info.State == MEM_COMMIT, "wrong state %lx\n", info.State); + ok(info.Protect == PAGE_READWRITE, "wrong protect %lx\n", info.Protect); + ok(info.Type == MEM_PRIVATE, "wrong type %lx\n", info.Type);
ok(VirtualProtect(addr1, 0x1000, PAGE_READONLY | PAGE_NOCACHE, &old_prot), "VirtualProtect failed\n"); - ok( old_prot == PAGE_READWRITE, "wrong protect %x\n", old_prot ); + ok( old_prot == PAGE_READWRITE, "wrong protect %lx\n", old_prot ); ok(VirtualQuery(addr1, &info, sizeof(info)) == sizeof(info), "VirtualQuery failed\n"); ok(info.BaseAddress == addr1, "%p != %p\n", info.BaseAddress, addr1); ok(info.AllocationBase == addr1, "%p != %p\n", info.AllocationBase, addr1); - ok(info.AllocationProtect == PAGE_READWRITE, "wrong protect %x\n", info.AllocationProtect); - ok(info.RegionSize == 0x1000, "wrong size %lx\n", info.RegionSize); - ok(info.State == MEM_COMMIT, "wrong state %x\n", info.State); + ok(info.AllocationProtect == PAGE_READWRITE, "wrong protect %lx\n", info.AllocationProtect); + ok(info.RegionSize == 0x1000, "wrong size %Ix\n", info.RegionSize); + ok(info.State == MEM_COMMIT, "wrong state %lx\n", info.State); ok(info.Protect == PAGE_READONLY || broken(info.Protect == (PAGE_READONLY | PAGE_NOCACHE)), - "wrong protect %x\n", info.Protect); - ok(info.Type == MEM_PRIVATE, "wrong type %x\n", info.Type); + "wrong protect %lx\n", info.Protect); + ok(info.Type == MEM_PRIVATE, "wrong type %lx\n", info.Type);
ok(VirtualFree(addr1, 0, MEM_RELEASE), "VirtualFree failed\n");
@@ -439,7 +440,7 @@ static void test_VirtualAlloc(void) SetLastError(0xdeadbeef); addr2 = VirtualAlloc(addr1, 0x1000, MEM_RESERVE | MEM_COMMIT | AT_ROUND_TO_PAGE, PAGE_EXECUTE_READWRITE); ok(!addr2, "VirtualAlloc unexpectedly succeeded\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %d, expected ERROR_INVALID_PARAMETER\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %ld, expected ERROR_INVALID_PARAMETER\n", GetLastError());
ok(VirtualFree(addr1, 0, MEM_RELEASE), "VirtualFree failed\n"); } @@ -459,21 +460,21 @@ static void test_VirtualAllocFromApp(void)
SetLastError(0xdeadbeef); p = pVirtualAllocFromApp(NULL, 0x1000, MEM_RESERVE, PAGE_READWRITE); - ok(p && GetLastError() == 0xdeadbeef, "Got unexpected mem %p, GetLastError() %u.\n", p, GetLastError()); + ok(p && GetLastError() == 0xdeadbeef, "Got unexpected mem %p, GetLastError() %lu.\n", p, GetLastError()); ret = VirtualFree(p, 0, MEM_RELEASE); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
SetLastError(0xdeadbeef); p = pVirtualAllocFromApp(NULL, 0x1000, MEM_RESERVE, PAGE_EXECUTE); - ok(!p && GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected mem %p, GetLastError() %u.\n", + ok(!p && GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected mem %p, GetLastError() %lu.\n", p, GetLastError()); SetLastError(0xdeadbeef); p = pVirtualAllocFromApp(NULL, 0x1000, MEM_RESERVE, PAGE_EXECUTE_READ); - ok(!p && GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected mem %p, GetLastError() %u.\n", + ok(!p && GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected mem %p, GetLastError() %lu.\n", p, GetLastError()); SetLastError(0xdeadbeef); p = pVirtualAllocFromApp(NULL, 0x1000, MEM_RESERVE, PAGE_EXECUTE_READWRITE); - ok(!p && GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected mem %p, GetLastError() %u.\n", + ok(!p && GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected mem %p, GetLastError() %lu.\n", p, GetLastError()); }
@@ -494,7 +495,7 @@ static void test_MapViewOfFile(void)
SetLastError(0xdeadbeef); file = CreateFileA( testfile, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0 ); - ok( file != INVALID_HANDLE_VALUE, "CreateFile error %u\n", GetLastError() ); + ok( file != INVALID_HANDLE_VALUE, "CreateFile error %lu\n", GetLastError() ); SetFilePointer( file, 12288, NULL, FILE_BEGIN ); SetEndOfFile( file );
@@ -502,56 +503,56 @@ static void test_MapViewOfFile(void)
SetLastError(0xdeadbeef); mapping = CreateFileMappingA( file, NULL, PAGE_READWRITE, 0, 4096, NULL ); - ok( mapping != 0, "CreateFileMapping error %u\n", GetLastError() ); + ok( mapping != 0, "CreateFileMapping error %lu\n", GetLastError() );
SetLastError(0xdeadbeef); ptr = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 4096 ); - ok( ptr != NULL, "MapViewOfFile FILE_MAP_READ error %u\n", GetLastError() ); + ok( ptr != NULL, "MapViewOfFile FILE_MAP_READ error %lu\n", GetLastError() ); UnmapViewOfFile( ptr );
SetLastError(0xdeadbeef); ptr = MapViewOfFile( mapping, FILE_MAP_COPY, 0, 0, 4096 ); - ok( ptr != NULL, "MapViewOfFile FILE_MAP_COPY error %u\n", GetLastError() ); + ok( ptr != NULL, "MapViewOfFile FILE_MAP_COPY error %lu\n", GetLastError() ); UnmapViewOfFile( ptr );
SetLastError(0xdeadbeef); ptr = MapViewOfFile( mapping, 0, 0, 0, 4096 ); - ok( ptr != NULL, "MapViewOfFile 0 error %u\n", GetLastError() ); + ok( ptr != NULL, "MapViewOfFile 0 error %lu\n", GetLastError() ); UnmapViewOfFile( ptr );
SetLastError(0xdeadbeef); ptr = MapViewOfFile( mapping, FILE_MAP_WRITE, 0, 0, 4096 ); - ok( ptr != NULL, "MapViewOfFile FILE_MAP_WRITE error %u\n", GetLastError() ); + ok( ptr != NULL, "MapViewOfFile FILE_MAP_WRITE error %lu\n", GetLastError() ); UnmapViewOfFile( ptr );
ret = DuplicateHandle( GetCurrentProcess(), mapping, GetCurrentProcess(), &map2, FILE_MAP_READ|FILE_MAP_WRITE, FALSE, 0 ); - ok( ret, "DuplicateHandle failed error %u\n", GetLastError()); + ok( ret, "DuplicateHandle failed error %lu\n", GetLastError()); ptr = MapViewOfFile( map2, FILE_MAP_WRITE, 0, 0, 4096 ); - ok( ptr != NULL, "MapViewOfFile FILE_MAP_WRITE error %u\n", GetLastError() ); + ok( ptr != NULL, "MapViewOfFile FILE_MAP_WRITE error %lu\n", GetLastError() ); UnmapViewOfFile( ptr ); CloseHandle( map2 );
ret = DuplicateHandle( GetCurrentProcess(), mapping, GetCurrentProcess(), &map2, FILE_MAP_READ, FALSE, 0 ); - ok( ret, "DuplicateHandle failed error %u\n", GetLastError()); + ok( ret, "DuplicateHandle failed error %lu\n", GetLastError()); SetLastError(0xdeadbeef); ptr = MapViewOfFile( map2, FILE_MAP_WRITE, 0, 0, 4096 ); ok( !ptr, "MapViewOfFile succeeded\n" ); - ok( GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %d\n", GetLastError() ); + ok( GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %ld\n", GetLastError() ); CloseHandle( map2 ); ret = DuplicateHandle( GetCurrentProcess(), mapping, GetCurrentProcess(), &map2, 0, FALSE, 0 ); - ok( ret, "DuplicateHandle failed error %u\n", GetLastError()); + ok( ret, "DuplicateHandle failed error %lu\n", GetLastError()); SetLastError(0xdeadbeef); ptr = MapViewOfFile( map2, 0, 0, 0, 4096 ); ok( !ptr, "MapViewOfFile succeeded\n" ); - ok( GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %d\n", GetLastError() ); + ok( GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %ld\n", GetLastError() ); CloseHandle( map2 ); ret = DuplicateHandle( GetCurrentProcess(), mapping, GetCurrentProcess(), &map2, FILE_MAP_READ, FALSE, 0 ); - ok( ret, "DuplicateHandle failed error %u\n", GetLastError()); + ok( ret, "DuplicateHandle failed error %lu\n", GetLastError()); ptr = MapViewOfFile( map2, 0, 0, 0, 4096 ); - ok( ptr != NULL, "MapViewOfFile NO_ACCESS error %u\n", GetLastError() ); + ok( ptr != NULL, "MapViewOfFile NO_ACCESS error %lu\n", GetLastError() );
UnmapViewOfFile( ptr ); CloseHandle( map2 ); @@ -561,56 +562,56 @@ static void test_MapViewOfFile(void)
SetLastError(0xdeadbeef); mapping = CreateFileMappingA( file, NULL, PAGE_READONLY, 0, 4096, NULL ); - ok( mapping != 0, "CreateFileMapping error %u\n", GetLastError() ); + ok( mapping != 0, "CreateFileMapping error %lu\n", GetLastError() );
SetLastError(0xdeadbeef); ptr = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 4096 ); - ok( ptr != NULL, "MapViewOfFile FILE_MAP_READ error %u\n", GetLastError() ); + ok( ptr != NULL, "MapViewOfFile FILE_MAP_READ error %lu\n", GetLastError() ); UnmapViewOfFile( ptr );
SetLastError(0xdeadbeef); ptr = MapViewOfFile( mapping, FILE_MAP_COPY, 0, 0, 4096 ); - ok( ptr != NULL, "MapViewOfFile FILE_MAP_COPY error %u\n", GetLastError() ); + ok( ptr != NULL, "MapViewOfFile FILE_MAP_COPY error %lu\n", GetLastError() ); UnmapViewOfFile( ptr );
SetLastError(0xdeadbeef); ptr = MapViewOfFile( mapping, 0, 0, 0, 4096 ); - ok( ptr != NULL, "MapViewOfFile 0 error %u\n", GetLastError() ); + ok( ptr != NULL, "MapViewOfFile 0 error %lu\n", GetLastError() ); UnmapViewOfFile( ptr );
SetLastError(0xdeadbeef); ptr = MapViewOfFile( mapping, FILE_MAP_WRITE, 0, 0, 4096 ); ok( !ptr, "MapViewOfFile FILE_MAP_WRITE succeeded\n" ); ok( GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %d\n", GetLastError() ); + GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %ld\n", GetLastError() ); CloseHandle( mapping );
/* copy-on-write mapping */
SetLastError(0xdeadbeef); mapping = CreateFileMappingA( file, NULL, PAGE_WRITECOPY, 0, 4096, NULL ); - ok( mapping != 0, "CreateFileMapping error %u\n", GetLastError() ); + ok( mapping != 0, "CreateFileMapping error %lu\n", GetLastError() );
SetLastError(0xdeadbeef); ptr = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 4096 ); - ok( ptr != NULL, "MapViewOfFile FILE_MAP_READ error %u\n", GetLastError() ); + ok( ptr != NULL, "MapViewOfFile FILE_MAP_READ error %lu\n", GetLastError() ); UnmapViewOfFile( ptr );
SetLastError(0xdeadbeef); ptr = MapViewOfFile( mapping, FILE_MAP_COPY, 0, 0, 4096 ); - ok( ptr != NULL, "MapViewOfFile FILE_MAP_COPY error %u\n", GetLastError() ); + ok( ptr != NULL, "MapViewOfFile FILE_MAP_COPY error %lu\n", GetLastError() ); UnmapViewOfFile( ptr );
SetLastError(0xdeadbeef); ptr = MapViewOfFile( mapping, 0, 0, 0, 4096 ); - ok( ptr != NULL, "MapViewOfFile 0 error %u\n", GetLastError() ); + ok( ptr != NULL, "MapViewOfFile 0 error %lu\n", GetLastError() ); UnmapViewOfFile( ptr );
SetLastError(0xdeadbeef); ptr = MapViewOfFile( mapping, FILE_MAP_WRITE, 0, 0, 4096 ); ok( !ptr, "MapViewOfFile FILE_MAP_WRITE succeeded\n" ); ok( GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %d\n", GetLastError() ); + GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %ld\n", GetLastError() ); CloseHandle( mapping );
/* no access mapping */ @@ -618,29 +619,29 @@ static void test_MapViewOfFile(void) SetLastError(0xdeadbeef); mapping = CreateFileMappingA( file, NULL, PAGE_NOACCESS, 0, 4096, NULL ); ok( !mapping, "CreateFileMappingA succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "Wrong error %d\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "Wrong error %ld\n", GetLastError() ); CloseHandle( file );
/* now try read-only file */
SetLastError(0xdeadbeef); file = CreateFileA( testfile, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0 ); - ok( file != INVALID_HANDLE_VALUE, "CreateFile error %u\n", GetLastError() ); + ok( file != INVALID_HANDLE_VALUE, "CreateFile error %lu\n", GetLastError() );
SetLastError(0xdeadbeef); mapping = CreateFileMappingA( file, NULL, PAGE_READWRITE, 0, 4096, NULL ); ok( !mapping, "CreateFileMapping PAGE_READWRITE succeeded\n" ); ok( GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %d\n", GetLastError() ); + GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %ld\n", GetLastError() );
SetLastError(0xdeadbeef); mapping = CreateFileMappingA( file, NULL, PAGE_WRITECOPY, 0, 4096, NULL ); - ok( mapping != 0, "CreateFileMapping PAGE_WRITECOPY error %u\n", GetLastError() ); + ok( mapping != 0, "CreateFileMapping PAGE_WRITECOPY error %lu\n", GetLastError() ); CloseHandle( mapping );
SetLastError(0xdeadbeef); mapping = CreateFileMappingA( file, NULL, PAGE_READONLY, 0, 4096, NULL ); - ok( mapping != 0, "CreateFileMapping PAGE_READONLY error %u\n", GetLastError() ); + ok( mapping != 0, "CreateFileMapping PAGE_READONLY error %lu\n", GetLastError() ); CloseHandle( mapping ); CloseHandle( file );
@@ -648,25 +649,25 @@ static void test_MapViewOfFile(void)
SetLastError(0xdeadbeef); file = CreateFileA( testfile, 0, 0, NULL, OPEN_EXISTING, 0, 0 ); - ok( file != INVALID_HANDLE_VALUE, "CreateFile error %u\n", GetLastError() ); + ok( file != INVALID_HANDLE_VALUE, "CreateFile error %lu\n", GetLastError() );
SetLastError(0xdeadbeef); mapping = CreateFileMappingA( file, NULL, PAGE_READWRITE, 0, 4096, NULL ); ok( !mapping, "CreateFileMapping PAGE_READWRITE succeeded\n" ); ok( GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %d\n", GetLastError() ); + GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %ld\n", GetLastError() );
SetLastError(0xdeadbeef); mapping = CreateFileMappingA( file, NULL, PAGE_WRITECOPY, 0, 4096, NULL ); ok( !mapping, "CreateFileMapping PAGE_WRITECOPY succeeded\n" ); ok( GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %d\n", GetLastError() ); + GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %ld\n", GetLastError() );
SetLastError(0xdeadbeef); mapping = CreateFileMappingA( file, NULL, PAGE_READONLY, 0, 4096, NULL ); ok( !mapping, "CreateFileMapping PAGE_READONLY succeeded\n" ); ok( GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %d\n", GetLastError() ); + GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %ld\n", GetLastError() );
CloseHandle( file ); DeleteFileA( testfile ); @@ -680,83 +681,83 @@ static void test_MapViewOfFile(void) name = "Foo"; file = CreateFileMappingA( INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 4090, name ); } - ok( file != 0, "CreateFileMapping PAGE_READWRITE error %u\n", GetLastError() ); + ok( file != 0, "CreateFileMapping PAGE_READWRITE error %lu\n", GetLastError() );
SetLastError(0xdeadbeef); mapping = OpenFileMappingA( FILE_MAP_READ, FALSE, name ); - ok( mapping != 0, "OpenFileMapping FILE_MAP_READ error %u\n", GetLastError() ); + ok( mapping != 0, "OpenFileMapping FILE_MAP_READ error %lu\n", GetLastError() ); SetLastError(0xdeadbeef); ptr = MapViewOfFile( mapping, FILE_MAP_WRITE, 0, 0, 0 ); ok( !ptr, "MapViewOfFile FILE_MAP_WRITE succeeded\n" ); - ok( GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %d\n", GetLastError() ); + ok( GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %ld\n", GetLastError() ); SetLastError(0xdeadbeef); ptr = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 0 ); - ok( ptr != NULL, "MapViewOfFile FILE_MAP_READ error %u\n", GetLastError() ); + ok( ptr != NULL, "MapViewOfFile FILE_MAP_READ error %lu\n", GetLastError() ); SetLastError(0xdeadbeef); size = VirtualQuery( ptr, &info, sizeof(info) ); ok( size == sizeof(info), - "VirtualQuery error %u\n", GetLastError() ); + "VirtualQuery error %lu\n", GetLastError() ); ok( info.BaseAddress == ptr, "%p != %p\n", info.BaseAddress, ptr ); ok( info.AllocationBase == ptr, "%p != %p\n", info.AllocationBase, ptr ); - ok( info.AllocationProtect == PAGE_READONLY, "%x != PAGE_READONLY\n", info.AllocationProtect ); - ok( info.RegionSize == 4096, "%lx != 4096\n", info.RegionSize ); - ok( info.State == MEM_COMMIT, "%x != MEM_COMMIT\n", info.State ); - ok( info.Protect == PAGE_READONLY, "%x != PAGE_READONLY\n", info.Protect ); + ok( info.AllocationProtect == PAGE_READONLY, "%lx != PAGE_READONLY\n", info.AllocationProtect ); + ok( info.RegionSize == 4096, "%Ix != 4096\n", info.RegionSize ); + ok( info.State == MEM_COMMIT, "%lx != MEM_COMMIT\n", info.State ); + ok( info.Protect == PAGE_READONLY, "%lx != PAGE_READONLY\n", info.Protect ); UnmapViewOfFile( ptr ); status = pNtQuerySection( mapping, SectionBasicInformation, §ion_info, sizeof(section_info), &info_size ); - ok( status == STATUS_ACCESS_DENIED, "NtQuerySection failed err %x\n", status ); + ok( status == STATUS_ACCESS_DENIED, "NtQuerySection failed err %lx\n", status ); CloseHandle( mapping ); mapping = OpenFileMappingA( FILE_MAP_READ | SECTION_QUERY, FALSE, name ); - ok( mapping != 0, "OpenFileMapping FILE_MAP_READ error %u\n", GetLastError() ); + ok( mapping != 0, "OpenFileMapping FILE_MAP_READ error %lu\n", GetLastError() ); info_size = (SIZE_T)0xdeadbeef << 16; status = pNtQuerySection( mapping, SectionBasicInformation, §ion_info, sizeof(section_info), &info_size ); - ok( !status, "NtQuerySection failed err %x\n", status ); - ok( info_size == sizeof(section_info), "NtQuerySection wrong size %lu\n", info_size ); - ok( section_info.Attributes == SEC_COMMIT, "NtQuerySection wrong attr %08x\n", + ok( !status, "NtQuerySection failed err %lx\n", status ); + ok( info_size == sizeof(section_info), "NtQuerySection wrong size %Iu\n", info_size ); + ok( section_info.Attributes == SEC_COMMIT, "NtQuerySection wrong attr %08lx\n", section_info.Attributes ); ok( section_info.BaseAddress == NULL, "NtQuerySection wrong base %p\n", section_info.BaseAddress ); - ok( section_info.Size.QuadPart == info.RegionSize, "NtQuerySection wrong size %x%08x / %08lx\n", + ok( section_info.Size.QuadPart == info.RegionSize, "NtQuerySection wrong size %lx%08lx / %08Ix\n", section_info.Size.u.HighPart, section_info.Size.u.LowPart, info.RegionSize ); CloseHandle( mapping );
SetLastError(0xdeadbeef); mapping = OpenFileMappingA( FILE_MAP_WRITE, FALSE, name ); - ok( mapping != 0, "OpenFileMapping FILE_MAP_WRITE error %u\n", GetLastError() ); + ok( mapping != 0, "OpenFileMapping FILE_MAP_WRITE error %lu\n", GetLastError() ); SetLastError(0xdeadbeef); ptr = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 0 ); ok( !ptr, "MapViewOfFile succeeded\n" ); - ok( GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %d\n", GetLastError() ); + ok( GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %ld\n", GetLastError() ); SetLastError(0xdeadbeef); ptr = MapViewOfFile( mapping, FILE_MAP_WRITE, 0, 0, 0 ); - ok( ptr != NULL, "MapViewOfFile FILE_MAP_WRITE error %u\n", GetLastError() ); + ok( ptr != NULL, "MapViewOfFile FILE_MAP_WRITE error %lu\n", GetLastError() ); SetLastError(0xdeadbeef); size = VirtualQuery( ptr, &info, sizeof(info) ); ok( size == sizeof(info), - "VirtualQuery error %u\n", GetLastError() ); + "VirtualQuery error %lu\n", GetLastError() ); ok( info.BaseAddress == ptr, "%p != %p\n", info.BaseAddress, ptr ); ok( info.AllocationBase == ptr, "%p != %p\n", info.AllocationBase, ptr ); - ok( info.AllocationProtect == PAGE_READWRITE, "%x != PAGE_READWRITE\n", info.AllocationProtect ); - ok( info.RegionSize == 4096, "%lx != 4096\n", info.RegionSize ); - ok( info.State == MEM_COMMIT, "%x != MEM_COMMIT\n", info.State ); - ok( info.Protect == PAGE_READWRITE, "%x != PAGE_READWRITE\n", info.Protect ); + ok( info.AllocationProtect == PAGE_READWRITE, "%lx != PAGE_READWRITE\n", info.AllocationProtect ); + ok( info.RegionSize == 4096, "%Ix != 4096\n", info.RegionSize ); + ok( info.State == MEM_COMMIT, "%lx != MEM_COMMIT\n", info.State ); + ok( info.Protect == PAGE_READWRITE, "%lx != PAGE_READWRITE\n", info.Protect ); UnmapViewOfFile( ptr ); status = pNtQuerySection( mapping, SectionBasicInformation, §ion_info, sizeof(section_info), &info_size ); - ok( status == STATUS_ACCESS_DENIED, "NtQuerySection failed err %x\n", status ); + ok( status == STATUS_ACCESS_DENIED, "NtQuerySection failed err %lx\n", status ); CloseHandle( mapping );
mapping = OpenFileMappingA( FILE_MAP_WRITE | SECTION_QUERY, FALSE, name ); - ok( mapping != 0, "OpenFileMapping FILE_MAP_WRITE error %u\n", GetLastError() ); + ok( mapping != 0, "OpenFileMapping FILE_MAP_WRITE error %lu\n", GetLastError() ); status = pNtQuerySection( mapping, SectionBasicInformation, §ion_info, sizeof(section_info), &info_size ); - ok( !status, "NtQuerySection failed err %x\n", status ); - ok( info_size == sizeof(section_info), "NtQuerySection wrong size %lu\n", info_size ); - ok( section_info.Attributes == SEC_COMMIT, "NtQuerySection wrong attr %08x\n", + ok( !status, "NtQuerySection failed err %lx\n", status ); + ok( info_size == sizeof(section_info), "NtQuerySection wrong size %Iu\n", info_size ); + ok( section_info.Attributes == SEC_COMMIT, "NtQuerySection wrong attr %08lx\n", section_info.Attributes ); ok( section_info.BaseAddress == NULL, "NtQuerySection wrong base %p\n", section_info.BaseAddress ); - ok( section_info.Size.QuadPart == info.RegionSize, "NtQuerySection wrong size %x%08x / %08lx\n", + ok( section_info.Size.QuadPart == info.RegionSize, "NtQuerySection wrong size %lx%08lx / %08Ix\n", section_info.Size.u.HighPart, section_info.Size.u.LowPart, info.RegionSize ); CloseHandle( mapping );
@@ -764,203 +765,203 @@ static void test_MapViewOfFile(void)
/* read/write mapping with SEC_RESERVE */ mapping = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE | SEC_RESERVE, 0, MAPPING_SIZE, NULL); - ok(mapping != 0, "CreateFileMappingA failed with error %d\n", GetLastError()); + ok(mapping != 0, "CreateFileMappingA failed with error %ld\n", GetLastError()); status = pNtQuerySection( mapping, SectionBasicInformation, §ion_info, sizeof(section_info), NULL ); - ok( !status, "NtQuerySection failed err %x\n", status ); - ok( section_info.Attributes == SEC_RESERVE, "NtQuerySection wrong attr %08x\n", + ok( !status, "NtQuerySection failed err %lx\n", status ); + ok( section_info.Attributes == SEC_RESERVE, "NtQuerySection wrong attr %08lx\n", section_info.Attributes ); ok( section_info.BaseAddress == NULL, "NtQuerySection wrong base %p\n", section_info.BaseAddress ); - ok( section_info.Size.QuadPart == MAPPING_SIZE, "NtQuerySection wrong size %x%08x / %08x\n", + ok( section_info.Size.QuadPart == MAPPING_SIZE, "NtQuerySection wrong size %lx%08lx / %08x\n", section_info.Size.u.HighPart, section_info.Size.u.LowPart, MAPPING_SIZE );
ptr = MapViewOfFile(mapping, FILE_MAP_WRITE, 0, 0, 0); - ok(ptr != NULL, "MapViewOfFile failed with error %d\n", GetLastError()); + ok(ptr != NULL, "MapViewOfFile failed with error %ld\n", GetLastError());
ptr2 = MapViewOfFile(mapping, FILE_MAP_WRITE, 0, 0, 0); - ok( ptr2 != NULL, "MapViewOfFile failed with error %d\n", GetLastError()); + ok( ptr2 != NULL, "MapViewOfFile failed with error %ld\n", GetLastError()); ok( ptr != ptr2, "MapViewOfFile returned same pointer\n" );
ret = VirtualQuery(ptr, &info, sizeof(info)); - ok(ret, "VirtualQuery failed with error %d\n", GetLastError()); + ok(ret, "VirtualQuery failed with error %ld\n", GetLastError()); ok(info.BaseAddress == ptr, "BaseAddress should have been %p but was %p instead\n", ptr, info.BaseAddress); ok(info.AllocationBase == ptr, "AllocationBase should have been %p but was %p instead\n", ptr, info.AllocationBase); - ok(info.RegionSize == MAPPING_SIZE, "RegionSize should have been 0x%x but was 0x%lx\n", MAPPING_SIZE, info.RegionSize); - ok(info.State == MEM_RESERVE, "State should have been MEM_RESERVE instead of 0x%x\n", info.State); + ok(info.RegionSize == MAPPING_SIZE, "RegionSize should have been 0x%x but was 0x%Ix\n", MAPPING_SIZE, info.RegionSize); + ok(info.State == MEM_RESERVE, "State should have been MEM_RESERVE instead of 0x%lx\n", info.State); ok(info.AllocationProtect == PAGE_READWRITE, - "AllocationProtect should have been PAGE_READWRITE but was 0x%x\n", info.AllocationProtect); - ok(info.Protect == 0, "Protect should have been 0 instead of 0x%x\n", info.Protect); - ok(info.Type == MEM_MAPPED, "Type should have been MEM_MAPPED instead of 0x%x\n", info.Type); + "AllocationProtect should have been PAGE_READWRITE but was 0x%lx\n", info.AllocationProtect); + ok(info.Protect == 0, "Protect should have been 0 instead of 0x%lx\n", info.Protect); + ok(info.Type == MEM_MAPPED, "Type should have been MEM_MAPPED instead of 0x%lx\n", info.Type);
ret = VirtualQuery(ptr2, &info, sizeof(info)); - ok(ret, "VirtualQuery failed with error %d\n", GetLastError()); + ok(ret, "VirtualQuery failed with error %ld\n", GetLastError()); ok(info.BaseAddress == ptr2, "BaseAddress should have been %p but was %p instead\n", ptr2, info.BaseAddress); ok(info.AllocationBase == ptr2, "AllocationBase should have been %p but was %p instead\n", ptr2, info.AllocationBase); ok(info.AllocationProtect == PAGE_READWRITE, - "AllocationProtect should have been PAGE_READWRITE but was 0x%x\n", info.AllocationProtect); + "AllocationProtect should have been PAGE_READWRITE but was 0x%lx\n", info.AllocationProtect); ok(info.RegionSize == MAPPING_SIZE, - "RegionSize should have been 0x%x but was 0x%lx\n", MAPPING_SIZE, info.RegionSize); - ok(info.State == MEM_RESERVE, "State should have been MEM_RESERVE instead of 0x%x\n", info.State); - ok(info.Protect == 0, "Protect should have been 0 instead of 0x%x\n", info.Protect); - ok(info.Type == MEM_MAPPED, "Type should have been MEM_MAPPED instead of 0x%x\n", info.Type); + "RegionSize should have been 0x%x but was 0x%Ix\n", MAPPING_SIZE, info.RegionSize); + ok(info.State == MEM_RESERVE, "State should have been MEM_RESERVE instead of 0x%lx\n", info.State); + ok(info.Protect == 0, "Protect should have been 0 instead of 0x%lx\n", info.Protect); + ok(info.Type == MEM_MAPPED, "Type should have been MEM_MAPPED instead of 0x%lx\n", info.Type);
ptr = VirtualAlloc(ptr, 0x10000, MEM_COMMIT, PAGE_READONLY); - ok(ptr != NULL, "VirtualAlloc failed with error %d\n", GetLastError()); + ok(ptr != NULL, "VirtualAlloc failed with error %ld\n", GetLastError());
ret = VirtualQuery(ptr, &info, sizeof(info)); - ok(ret, "VirtualQuery failed with error %d\n", GetLastError()); + ok(ret, "VirtualQuery failed with error %ld\n", GetLastError()); ok(info.BaseAddress == ptr, "BaseAddress should have been %p but was %p instead\n", ptr, info.BaseAddress); ok(info.AllocationBase == ptr, "AllocationBase should have been %p but was %p instead\n", ptr, info.AllocationBase); - ok(info.RegionSize == 0x10000, "RegionSize should have been 0x10000 but was 0x%lx\n", info.RegionSize); - ok(info.State == MEM_COMMIT, "State should have been MEM_COMMIT instead of 0x%x\n", info.State); - ok(info.Protect == PAGE_READONLY, "Protect should have been PAGE_READONLY instead of 0x%x\n", info.Protect); + ok(info.RegionSize == 0x10000, "RegionSize should have been 0x10000 but was 0x%Ix\n", info.RegionSize); + ok(info.State == MEM_COMMIT, "State should have been MEM_COMMIT instead of 0x%lx\n", info.State); + ok(info.Protect == PAGE_READONLY, "Protect should have been PAGE_READONLY instead of 0x%lx\n", info.Protect); ok(info.AllocationProtect == PAGE_READWRITE, - "AllocationProtect should have been PAGE_READWRITE but was 0x%x\n", info.AllocationProtect); - ok(info.Type == MEM_MAPPED, "Type should have been MEM_MAPPED instead of 0x%x\n", info.Type); + "AllocationProtect should have been PAGE_READWRITE but was 0x%lx\n", info.AllocationProtect); + ok(info.Type == MEM_MAPPED, "Type should have been MEM_MAPPED instead of 0x%lx\n", info.Type);
/* shows that the VirtualAlloc above affects the mapping, not just the * virtual memory in this process - it also affects all other processes * with a view of the mapping, but that isn't tested here */ ret = VirtualQuery(ptr2, &info, sizeof(info)); - ok(ret, "VirtualQuery failed with error %d\n", GetLastError()); + ok(ret, "VirtualQuery failed with error %ld\n", GetLastError()); ok(info.BaseAddress == ptr2, "BaseAddress should have been %p but was %p instead\n", ptr2, info.BaseAddress); ok(info.AllocationBase == ptr2, "AllocationBase should have been %p but was %p instead\n", ptr2, info.AllocationBase); ok(info.AllocationProtect == PAGE_READWRITE, - "AllocationProtect should have been PAGE_READWRITE but was 0x%x\n", info.AllocationProtect); + "AllocationProtect should have been PAGE_READWRITE but was 0x%lx\n", info.AllocationProtect); ok(info.RegionSize == 0x10000, - "RegionSize should have been 0x10000 but was 0x%lx\n", info.RegionSize); + "RegionSize should have been 0x10000 but was 0x%Ix\n", info.RegionSize); ok(info.State == MEM_COMMIT, - "State should have been MEM_COMMIT instead of 0x%x\n", info.State); + "State should have been MEM_COMMIT instead of 0x%lx\n", info.State); ok(info.Protect == PAGE_READWRITE, - "Protect should have been PAGE_READWRITE instead of 0x%x\n", info.Protect); - ok(info.Type == MEM_MAPPED, "Type should have been MEM_MAPPED instead of 0x%x\n", info.Type); + "Protect should have been PAGE_READWRITE instead of 0x%lx\n", info.Protect); + ok(info.Type == MEM_MAPPED, "Type should have been MEM_MAPPED instead of 0x%lx\n", info.Type);
addr = VirtualAlloc( ptr, MAPPING_SIZE, MEM_RESET, PAGE_READONLY ); - ok( addr == ptr, "VirtualAlloc failed with error %u\n", GetLastError() ); + ok( addr == ptr, "VirtualAlloc failed with error %lu\n", GetLastError() );
ret = VirtualFree( ptr, 0x10000, MEM_DECOMMIT ); ok( !ret, "VirtualFree succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "VirtualFree failed with %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "VirtualFree failed with %lu\n", GetLastError() );
ret = UnmapViewOfFile(ptr2); - ok(ret, "UnmapViewOfFile failed with error %d\n", GetLastError()); + ok(ret, "UnmapViewOfFile failed with error %ld\n", GetLastError()); ret = UnmapViewOfFile(ptr); - ok(ret, "UnmapViewOfFile failed with error %d\n", GetLastError()); + ok(ret, "UnmapViewOfFile failed with error %ld\n", GetLastError()); CloseHandle(mapping);
/* same thing with SEC_COMMIT */ mapping = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE | SEC_COMMIT, 0, MAPPING_SIZE, NULL); - ok(mapping != 0, "CreateFileMappingA failed with error %d\n", GetLastError()); + ok(mapping != 0, "CreateFileMappingA failed with error %ld\n", GetLastError()); status = pNtQuerySection( mapping, SectionBasicInformation, §ion_info, sizeof(section_info), NULL ); - ok( !status, "NtQuerySection failed err %x\n", status ); - ok( section_info.Attributes == SEC_COMMIT, "NtQuerySection wrong attr %08x\n", + ok( !status, "NtQuerySection failed err %lx\n", status ); + ok( section_info.Attributes == SEC_COMMIT, "NtQuerySection wrong attr %08lx\n", section_info.Attributes ); ok( section_info.BaseAddress == NULL, "NtQuerySection wrong base %p\n", section_info.BaseAddress ); - ok( section_info.Size.QuadPart == MAPPING_SIZE, "NtQuerySection wrong size %x%08x / %08x\n", + ok( section_info.Size.QuadPart == MAPPING_SIZE, "NtQuerySection wrong size %lx%08lx / %08x\n", section_info.Size.u.HighPart, section_info.Size.u.LowPart, MAPPING_SIZE );
ptr = MapViewOfFile(mapping, FILE_MAP_WRITE, 0, 0, 0); - ok(ptr != NULL, "MapViewOfFile failed with error %d\n", GetLastError()); + ok(ptr != NULL, "MapViewOfFile failed with error %ld\n", GetLastError());
ret = VirtualQuery(ptr, &info, sizeof(info)); - ok(ret, "VirtualQuery failed with error %d\n", GetLastError()); + ok(ret, "VirtualQuery failed with error %ld\n", GetLastError()); ok(info.BaseAddress == ptr, "wrong BaseAddress %p/%p\n", ptr, info.BaseAddress); ok(info.AllocationBase == ptr, "wrong AllocationBase %p/%p\n", ptr, info.AllocationBase); - ok(info.RegionSize == MAPPING_SIZE, "wrong RegionSize 0x%lx\n", info.RegionSize); - ok(info.State == MEM_COMMIT, "wrong State 0x%x\n", info.State); - ok(info.AllocationProtect == PAGE_READWRITE, "wrong AllocationProtect 0x%x\n", info.AllocationProtect); - ok(info.Protect == PAGE_READWRITE, "wrong Protect 0x%x\n", info.Protect); - ok(info.Type == MEM_MAPPED, "wrong Type 0x%x\n", info.Type); + ok(info.RegionSize == MAPPING_SIZE, "wrong RegionSize 0x%Ix\n", info.RegionSize); + ok(info.State == MEM_COMMIT, "wrong State 0x%lx\n", info.State); + ok(info.AllocationProtect == PAGE_READWRITE, "wrong AllocationProtect 0x%lx\n", info.AllocationProtect); + ok(info.Protect == PAGE_READWRITE, "wrong Protect 0x%lx\n", info.Protect); + ok(info.Type == MEM_MAPPED, "wrong Type 0x%lx\n", info.Type);
ptr = VirtualAlloc(ptr, 0x10000, MEM_COMMIT, PAGE_READONLY); - ok(ptr != NULL, "VirtualAlloc failed with error %d\n", GetLastError()); + ok(ptr != NULL, "VirtualAlloc failed with error %ld\n", GetLastError());
ret = VirtualQuery(ptr, &info, sizeof(info)); - ok(ret, "VirtualQuery failed with error %d\n", GetLastError()); + ok(ret, "VirtualQuery failed with error %ld\n", GetLastError()); ok(info.BaseAddress == ptr, "wrong BaseAddress %p/%p\n", ptr, info.BaseAddress); ok(info.AllocationBase == ptr, "wrong AllocationBase %p/%p\n", ptr, info.AllocationBase); - ok(info.RegionSize == 0x10000, "wrong RegionSize 0x%lx\n", info.RegionSize); - ok(info.State == MEM_COMMIT, "wrong State 0x%x\n", info.State); - ok(info.AllocationProtect == PAGE_READWRITE, "wrong AllocationProtect 0x%x\n", info.AllocationProtect); - ok(info.Protect == PAGE_READONLY, "wrong Protect 0x%x\n", info.Protect); - ok(info.Type == MEM_MAPPED, "wrong Type 0x%x\n", info.Type); + ok(info.RegionSize == 0x10000, "wrong RegionSize 0x%Ix\n", info.RegionSize); + ok(info.State == MEM_COMMIT, "wrong State 0x%lx\n", info.State); + ok(info.AllocationProtect == PAGE_READWRITE, "wrong AllocationProtect 0x%lx\n", info.AllocationProtect); + ok(info.Protect == PAGE_READONLY, "wrong Protect 0x%lx\n", info.Protect); + ok(info.Type == MEM_MAPPED, "wrong Type 0x%lx\n", info.Type);
addr = VirtualAlloc( ptr, MAPPING_SIZE, MEM_RESET, PAGE_READONLY ); - ok( addr == ptr, "VirtualAlloc failed with error %u\n", GetLastError() ); + ok( addr == ptr, "VirtualAlloc failed with error %lu\n", GetLastError() );
ret = VirtualFree( ptr, 0x10000, MEM_DECOMMIT ); ok( !ret, "VirtualFree succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "VirtualFree failed with %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "VirtualFree failed with %lu\n", GetLastError() );
ret = UnmapViewOfFile(ptr); - ok(ret, "UnmapViewOfFile failed with error %d\n", GetLastError()); + ok(ret, "UnmapViewOfFile failed with error %ld\n", GetLastError()); CloseHandle(mapping);
/* same thing with SEC_NOCACHE (only supported on recent Windows versions) */ mapping = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE | SEC_COMMIT | SEC_NOCACHE, 0, MAPPING_SIZE, NULL); - ok(mapping != 0, "CreateFileMappingA failed with error %d\n", GetLastError()); + ok(mapping != 0, "CreateFileMappingA failed with error %ld\n", GetLastError()); status = pNtQuerySection( mapping, SectionBasicInformation, §ion_info, sizeof(section_info), NULL ); - ok( !status, "NtQuerySection failed err %x\n", status ); + ok( !status, "NtQuerySection failed err %lx\n", status ); ok( section_info.Attributes == (SEC_COMMIT | SEC_NOCACHE) || broken(section_info.Attributes == SEC_COMMIT), - "NtQuerySection wrong attr %08x\n", section_info.Attributes ); + "NtQuerySection wrong attr %08lx\n", section_info.Attributes ); if (section_info.Attributes & SEC_NOCACHE) { ptr = MapViewOfFile(mapping, FILE_MAP_WRITE, 0, 0, 0); - ok(ptr != NULL, "MapViewOfFile failed with error %d\n", GetLastError()); + ok(ptr != NULL, "MapViewOfFile failed with error %ld\n", GetLastError());
ret = VirtualQuery(ptr, &info, sizeof(info)); - ok(ret, "VirtualQuery failed with error %d\n", GetLastError()); + ok(ret, "VirtualQuery failed with error %ld\n", GetLastError()); ok(info.BaseAddress == ptr, "wrong BaseAddress %p/%p\n", ptr, info.BaseAddress); ok(info.AllocationBase == ptr, "wrong AllocationBase %p/%p\n", ptr, info.AllocationBase); - ok(info.RegionSize == MAPPING_SIZE, "wrong RegionSize 0x%lx\n", info.RegionSize); - ok(info.State == MEM_COMMIT, "wrong State 0x%x\n", info.State); + ok(info.RegionSize == MAPPING_SIZE, "wrong RegionSize 0x%Ix\n", info.RegionSize); + ok(info.State == MEM_COMMIT, "wrong State 0x%lx\n", info.State); ok(info.AllocationProtect == (PAGE_READWRITE | PAGE_NOCACHE), - "wrong AllocationProtect 0x%x\n", info.AllocationProtect); - ok(info.Protect == (PAGE_READWRITE | PAGE_NOCACHE), "wrong Protect 0x%x\n", info.Protect); - ok(info.Type == MEM_MAPPED, "wrong Type 0x%x\n", info.Type); + "wrong AllocationProtect 0x%lx\n", info.AllocationProtect); + ok(info.Protect == (PAGE_READWRITE | PAGE_NOCACHE), "wrong Protect 0x%lx\n", info.Protect); + ok(info.Type == MEM_MAPPED, "wrong Type 0x%lx\n", info.Type);
ptr = VirtualAlloc(ptr, 0x10000, MEM_COMMIT, PAGE_READONLY); - ok(ptr != NULL, "VirtualAlloc failed with error %d\n", GetLastError()); + ok(ptr != NULL, "VirtualAlloc failed with error %ld\n", GetLastError());
ret = VirtualQuery(ptr, &info, sizeof(info)); - ok(ret, "VirtualQuery failed with error %d\n", GetLastError()); + ok(ret, "VirtualQuery failed with error %ld\n", GetLastError()); ok(info.BaseAddress == ptr, "wrong BaseAddress %p/%p\n", ptr, info.BaseAddress); ok(info.AllocationBase == ptr, "wrong AllocationBase %p/%p\n", ptr, info.AllocationBase); - ok(info.RegionSize == 0x10000, "wrong RegionSize 0x%lx\n", info.RegionSize); - ok(info.State == MEM_COMMIT, "wrong State 0x%x\n", info.State); + ok(info.RegionSize == 0x10000, "wrong RegionSize 0x%Ix\n", info.RegionSize); + ok(info.State == MEM_COMMIT, "wrong State 0x%lx\n", info.State); ok(info.AllocationProtect == (PAGE_READWRITE | PAGE_NOCACHE), - "wrong AllocationProtect 0x%x\n", info.AllocationProtect); - ok(info.Protect == (PAGE_READONLY | PAGE_NOCACHE), "wrong Protect 0x%x\n", info.Protect); - ok(info.Type == MEM_MAPPED, "wrong Type 0x%x\n", info.Type); + "wrong AllocationProtect 0x%lx\n", info.AllocationProtect); + ok(info.Protect == (PAGE_READONLY | PAGE_NOCACHE), "wrong Protect 0x%lx\n", info.Protect); + ok(info.Type == MEM_MAPPED, "wrong Type 0x%lx\n", info.Type);
ret = UnmapViewOfFile(ptr); - ok(ret, "UnmapViewOfFile failed with error %d\n", GetLastError()); + ok(ret, "UnmapViewOfFile failed with error %ld\n", GetLastError()); } CloseHandle(mapping);
addr = VirtualAlloc(NULL, 0x10000, MEM_COMMIT, PAGE_READONLY ); - ok( addr != NULL, "VirtualAlloc failed with error %u\n", GetLastError() ); + ok( addr != NULL, "VirtualAlloc failed with error %lu\n", GetLastError() );
SetLastError(0xdeadbeef); ok( !UnmapViewOfFile(addr), "UnmapViewOfFile should fail on VirtualAlloc mem\n" ); ok( GetLastError() == ERROR_INVALID_ADDRESS, - "got %u, expected ERROR_INVALID_ADDRESS\n", GetLastError()); + "got %lu, expected ERROR_INVALID_ADDRESS\n", GetLastError()); SetLastError(0xdeadbeef); ok( !UnmapViewOfFile((char *)addr + 0x3000), "UnmapViewOfFile should fail on VirtualAlloc mem\n" ); ok( GetLastError() == ERROR_INVALID_ADDRESS, - "got %u, expected ERROR_INVALID_ADDRESS\n", GetLastError()); + "got %lu, expected ERROR_INVALID_ADDRESS\n", GetLastError()); SetLastError(0xdeadbeef); ok( !UnmapViewOfFile((void *)0xdeadbeef), "UnmapViewOfFile should fail on VirtualAlloc mem\n" ); ok( GetLastError() == ERROR_INVALID_ADDRESS, - "got %u, expected ERROR_INVALID_ADDRESS\n", GetLastError()); + "got %lu, expected ERROR_INVALID_ADDRESS\n", GetLastError());
ok( VirtualFree(addr, 0, MEM_RELEASE), "VirtualFree failed\n" );
@@ -968,268 +969,268 @@ static void test_MapViewOfFile(void) name = "Foo"; SetLastError(0xdeadbeef); mapping = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, MAPPING_SIZE, name); - ok( mapping != 0, "CreateFileMappingA failed with error %d\n", GetLastError() ); + ok( mapping != 0, "CreateFileMappingA failed with error %ld\n", GetLastError() ); SetLastError(0xdeadbeef); ptr = MapViewOfFile(mapping, FILE_MAP_WRITE, 0, 0, 0); - ok( ptr != NULL, "MapViewOfFile failed with error %d\n", GetLastError() ); + ok( ptr != NULL, "MapViewOfFile failed with error %ld\n", GetLastError() ); SetLastError(0xdeadbeef); map2 = OpenFileMappingA(FILE_MAP_READ, FALSE, name); - ok( map2 != 0, "OpenFileMappingA failed with error %d\n", GetLastError() ); + ok( map2 != 0, "OpenFileMappingA failed with error %ld\n", GetLastError() ); SetLastError(0xdeadbeef); ret = CloseHandle(map2); - ok(ret, "CloseHandle error %d\n", GetLastError()); + ok(ret, "CloseHandle error %ld\n", GetLastError()); SetLastError(0xdeadbeef); ret = CloseHandle(mapping); - ok(ret, "CloseHandle error %d\n", GetLastError()); + ok(ret, "CloseHandle error %ld\n", GetLastError());
ret = IsBadReadPtr(ptr, MAPPING_SIZE); ok( !ret, "memory is not accessible\n" );
ret = VirtualQuery(ptr, &info, sizeof(info)); - ok(ret, "VirtualQuery error %d\n", GetLastError()); + ok(ret, "VirtualQuery error %ld\n", GetLastError()); ok(info.BaseAddress == ptr, "got %p != expected %p\n", info.BaseAddress, ptr); - ok(info.RegionSize == MAPPING_SIZE, "got %#lx != expected %#x\n", info.RegionSize, MAPPING_SIZE); - ok(info.Protect == PAGE_READWRITE, "got %#x != expected PAGE_READWRITE\n", info.Protect); + ok(info.RegionSize == MAPPING_SIZE, "got %#Ix != expected %#x\n", info.RegionSize, MAPPING_SIZE); + ok(info.Protect == PAGE_READWRITE, "got %#lx != expected PAGE_READWRITE\n", info.Protect); ok(info.AllocationBase == ptr, "%p != %p\n", info.AllocationBase, ptr); - ok(info.AllocationProtect == PAGE_READWRITE, "%#x != PAGE_READWRITE\n", info.AllocationProtect); - ok(info.State == MEM_COMMIT, "%#x != MEM_COMMIT\n", info.State); - ok(info.Type == MEM_MAPPED, "%#x != MEM_MAPPED\n", info.Type); + ok(info.AllocationProtect == PAGE_READWRITE, "%#lx != PAGE_READWRITE\n", info.AllocationProtect); + ok(info.State == MEM_COMMIT, "%#lx != MEM_COMMIT\n", info.State); + ok(info.Type == MEM_MAPPED, "%#lx != MEM_MAPPED\n", info.Type);
SetLastError(0xdeadbeef); map2 = OpenFileMappingA(FILE_MAP_READ, FALSE, name); ok( map2 == 0, "OpenFileMappingA succeeded\n" ); - ok( GetLastError() == ERROR_FILE_NOT_FOUND, "OpenFileMappingA set error %d\n", GetLastError() ); + ok( GetLastError() == ERROR_FILE_NOT_FOUND, "OpenFileMappingA set error %ld\n", GetLastError() ); if (map2) CloseHandle(map2); /* FIXME: remove once Wine is fixed */ SetLastError(0xdeadbeef); mapping = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, MAPPING_SIZE, name); ok( mapping != 0, "CreateFileMappingA failed\n" ); - ok( GetLastError() == ERROR_SUCCESS, "CreateFileMappingA set error %d\n", GetLastError() ); + ok( GetLastError() == ERROR_SUCCESS, "CreateFileMappingA set error %ld\n", GetLastError() ); SetLastError(0xdeadbeef); ret = CloseHandle(mapping); - ok(ret, "CloseHandle error %d\n", GetLastError()); + ok(ret, "CloseHandle error %ld\n", GetLastError());
ret = IsBadReadPtr(ptr, MAPPING_SIZE); ok( !ret, "memory is not accessible\n" );
ret = VirtualQuery(ptr, &info, sizeof(info)); - ok(ret, "VirtualQuery error %d\n", GetLastError()); + ok(ret, "VirtualQuery error %ld\n", GetLastError()); ok(info.BaseAddress == ptr, "got %p != expected %p\n", info.BaseAddress, ptr); - ok(info.RegionSize == MAPPING_SIZE, "got %#lx != expected %#x\n", info.RegionSize, MAPPING_SIZE); - ok(info.Protect == PAGE_READWRITE, "got %#x != expected PAGE_READWRITE\n", info.Protect); + ok(info.RegionSize == MAPPING_SIZE, "got %#Ix != expected %#x\n", info.RegionSize, MAPPING_SIZE); + ok(info.Protect == PAGE_READWRITE, "got %#lx != expected PAGE_READWRITE\n", info.Protect); ok(info.AllocationBase == ptr, "%p != %p\n", info.AllocationBase, ptr); - ok(info.AllocationProtect == PAGE_READWRITE, "%#x != PAGE_READWRITE\n", info.AllocationProtect); - ok(info.State == MEM_COMMIT, "%#x != MEM_COMMIT\n", info.State); - ok(info.Type == MEM_MAPPED, "%#x != MEM_MAPPED\n", info.Type); + ok(info.AllocationProtect == PAGE_READWRITE, "%#lx != PAGE_READWRITE\n", info.AllocationProtect); + ok(info.State == MEM_COMMIT, "%#lx != MEM_COMMIT\n", info.State); + ok(info.Type == MEM_MAPPED, "%#lx != MEM_MAPPED\n", info.Type);
SetLastError(0xdeadbeef); ret = UnmapViewOfFile(ptr); - ok( ret, "UnmapViewOfFile failed with error %d\n", GetLastError() ); + ok( ret, "UnmapViewOfFile failed with error %ld\n", GetLastError() );
ret = IsBadReadPtr(ptr, MAPPING_SIZE); ok( ret, "memory is accessible\n" );
ret = VirtualQuery(ptr, &info, sizeof(info)); - ok(ret, "VirtualQuery error %d\n", GetLastError()); + ok(ret, "VirtualQuery error %ld\n", GetLastError()); ok(info.BaseAddress == ptr, "got %p != expected %p\n", info.BaseAddress, ptr); - ok(info.Protect == PAGE_NOACCESS, "got %#x != expected PAGE_NOACCESS\n", info.Protect); + ok(info.Protect == PAGE_NOACCESS, "got %#lx != expected PAGE_NOACCESS\n", info.Protect); ok(info.AllocationBase == NULL, "%p != NULL\n", info.AllocationBase); - ok(info.AllocationProtect == 0, "%#x != 0\n", info.AllocationProtect); - ok(info.State == MEM_FREE, "%#x != MEM_FREE\n", info.State); - ok(info.Type == 0, "%#x != 0\n", info.Type); + ok(info.AllocationProtect == 0, "%#lx != 0\n", info.AllocationProtect); + ok(info.State == MEM_FREE, "%#lx != MEM_FREE\n", info.State); + ok(info.Type == 0, "%#lx != 0\n", info.Type);
SetLastError(0xdeadbeef); file = CreateFileA(testfile, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); - ok( file != INVALID_HANDLE_VALUE, "CreateFile error %u\n", GetLastError() ); + ok( file != INVALID_HANDLE_VALUE, "CreateFile error %lu\n", GetLastError() ); SetFilePointer(file, 4096, NULL, FILE_BEGIN); SetEndOfFile(file);
SetLastError(0xdeadbeef); mapping = CreateFileMappingA(file, NULL, PAGE_READWRITE, 0, MAPPING_SIZE, name); - ok( mapping != 0, "CreateFileMappingA failed with error %d\n", GetLastError() ); + ok( mapping != 0, "CreateFileMappingA failed with error %ld\n", GetLastError() ); SetLastError(0xdeadbeef); ptr = MapViewOfFile(mapping, FILE_MAP_WRITE, 0, 0, 0); - ok( ptr != NULL, "MapViewOfFile failed with error %d\n", GetLastError() ); + ok( ptr != NULL, "MapViewOfFile failed with error %ld\n", GetLastError() ); SetLastError(0xdeadbeef); map2 = OpenFileMappingA(FILE_MAP_READ, FALSE, name); - ok( map2 != 0, "OpenFileMappingA failed with error %d\n", GetLastError() ); + ok( map2 != 0, "OpenFileMappingA failed with error %ld\n", GetLastError() ); SetLastError(0xdeadbeef); ret = CloseHandle(map2); - ok(ret, "CloseHandle error %d\n", GetLastError()); + ok(ret, "CloseHandle error %ld\n", GetLastError()); status = pNtQuerySection( mapping, SectionBasicInformation, §ion_info, sizeof(section_info), &info_size ); - ok( !status, "NtQuerySection failed err %x\n", status ); - ok( info_size == sizeof(section_info), "NtQuerySection wrong size %lu\n", info_size ); - ok( section_info.Attributes == SEC_FILE, "NtQuerySection wrong attr %08x\n", + ok( !status, "NtQuerySection failed err %lx\n", status ); + ok( info_size == sizeof(section_info), "NtQuerySection wrong size %Iu\n", info_size ); + ok( section_info.Attributes == SEC_FILE, "NtQuerySection wrong attr %08lx\n", section_info.Attributes ); ok( section_info.BaseAddress == NULL, "NtQuerySection wrong base %p\n", section_info.BaseAddress ); - ok( section_info.Size.QuadPart == MAPPING_SIZE, "NtQuerySection wrong size %x%08x\n", + ok( section_info.Size.QuadPart == MAPPING_SIZE, "NtQuerySection wrong size %lx%08lx\n", section_info.Size.u.HighPart, section_info.Size.u.LowPart ); SetLastError(0xdeadbeef); ret = CloseHandle(mapping); - ok(ret, "CloseHandle error %d\n", GetLastError()); + ok(ret, "CloseHandle error %ld\n", GetLastError());
ret = IsBadReadPtr(ptr, MAPPING_SIZE); ok( !ret, "memory is not accessible\n" );
ret = VirtualQuery(ptr, &info, sizeof(info)); - ok(ret, "VirtualQuery error %d\n", GetLastError()); + ok(ret, "VirtualQuery error %ld\n", GetLastError()); ok(info.BaseAddress == ptr, "got %p != expected %p\n", info.BaseAddress, ptr); - ok(info.RegionSize == MAPPING_SIZE, "got %#lx != expected %#x\n", info.RegionSize, MAPPING_SIZE); - ok(info.Protect == PAGE_READWRITE, "got %#x != expected PAGE_READWRITE\n", info.Protect); + ok(info.RegionSize == MAPPING_SIZE, "got %#Ix != expected %#x\n", info.RegionSize, MAPPING_SIZE); + ok(info.Protect == PAGE_READWRITE, "got %#lx != expected PAGE_READWRITE\n", info.Protect); ok(info.AllocationBase == ptr, "%p != %p\n", info.AllocationBase, ptr); - ok(info.AllocationProtect == PAGE_READWRITE, "%#x != PAGE_READWRITE\n", info.AllocationProtect); - ok(info.State == MEM_COMMIT, "%#x != MEM_COMMIT\n", info.State); - ok(info.Type == MEM_MAPPED, "%#x != MEM_MAPPED\n", info.Type); + ok(info.AllocationProtect == PAGE_READWRITE, "%#lx != PAGE_READWRITE\n", info.AllocationProtect); + ok(info.State == MEM_COMMIT, "%#lx != MEM_COMMIT\n", info.State); + ok(info.Type == MEM_MAPPED, "%#lx != MEM_MAPPED\n", info.Type);
SetLastError(0xdeadbeef); map2 = OpenFileMappingA(FILE_MAP_READ, FALSE, name); ok( map2 == 0, "OpenFileMappingA succeeded\n" ); - ok( GetLastError() == ERROR_FILE_NOT_FOUND, "OpenFileMappingA set error %d\n", GetLastError() ); + ok( GetLastError() == ERROR_FILE_NOT_FOUND, "OpenFileMappingA set error %ld\n", GetLastError() ); CloseHandle(map2); SetLastError(0xdeadbeef); mapping = CreateFileMappingA(file, NULL, PAGE_READWRITE, 0, MAPPING_SIZE, name); ok( mapping != 0, "CreateFileMappingA failed\n" ); - ok( GetLastError() == ERROR_SUCCESS, "CreateFileMappingA set error %d\n", GetLastError() ); + ok( GetLastError() == ERROR_SUCCESS, "CreateFileMappingA set error %ld\n", GetLastError() ); SetLastError(0xdeadbeef); ret = CloseHandle(mapping); - ok(ret, "CloseHandle error %d\n", GetLastError()); + ok(ret, "CloseHandle error %ld\n", GetLastError());
ret = IsBadReadPtr(ptr, MAPPING_SIZE); ok( !ret, "memory is not accessible\n" );
ret = VirtualQuery(ptr, &info, sizeof(info)); - ok(ret, "VirtualQuery error %d\n", GetLastError()); + ok(ret, "VirtualQuery error %ld\n", GetLastError()); ok(info.BaseAddress == ptr, "got %p != expected %p\n", info.BaseAddress, ptr); - ok(info.RegionSize == MAPPING_SIZE, "got %#lx != expected %#x\n", info.RegionSize, MAPPING_SIZE); - ok(info.Protect == PAGE_READWRITE, "got %#x != expected PAGE_READWRITE\n", info.Protect); + ok(info.RegionSize == MAPPING_SIZE, "got %#Ix != expected %#x\n", info.RegionSize, MAPPING_SIZE); + ok(info.Protect == PAGE_READWRITE, "got %#lx != expected PAGE_READWRITE\n", info.Protect); ok(info.AllocationBase == ptr, "%p != %p\n", info.AllocationBase, ptr); - ok(info.AllocationProtect == PAGE_READWRITE, "%#x != PAGE_READWRITE\n", info.AllocationProtect); - ok(info.State == MEM_COMMIT, "%#x != MEM_COMMIT\n", info.State); - ok(info.Type == MEM_MAPPED, "%#x != MEM_MAPPED\n", info.Type); + ok(info.AllocationProtect == PAGE_READWRITE, "%#lx != PAGE_READWRITE\n", info.AllocationProtect); + ok(info.State == MEM_COMMIT, "%#lx != MEM_COMMIT\n", info.State); + ok(info.Type == MEM_MAPPED, "%#lx != MEM_MAPPED\n", info.Type);
SetLastError(0xdeadbeef); ret = UnmapViewOfFile(ptr); - ok( ret, "UnmapViewOfFile failed with error %d\n", GetLastError() ); + ok( ret, "UnmapViewOfFile failed with error %ld\n", GetLastError() );
ret = IsBadReadPtr(ptr, MAPPING_SIZE); ok( ret, "memory is accessible\n" );
ret = VirtualQuery(ptr, &info, sizeof(info)); - ok(ret, "VirtualQuery error %d\n", GetLastError()); + ok(ret, "VirtualQuery error %ld\n", GetLastError()); ok(info.BaseAddress == ptr, "got %p != expected %p\n", info.BaseAddress, ptr); - ok(info.Protect == PAGE_NOACCESS, "got %#x != expected PAGE_NOACCESS\n", info.Protect); + ok(info.Protect == PAGE_NOACCESS, "got %#lx != expected PAGE_NOACCESS\n", info.Protect); ok(info.AllocationBase == NULL, "%p != NULL\n", info.AllocationBase); - ok(info.AllocationProtect == 0, "%#x != 0\n", info.AllocationProtect); - ok(info.State == MEM_FREE, "%#x != MEM_FREE\n", info.State); - ok(info.Type == 0, "%#x != 0\n", info.Type); + ok(info.AllocationProtect == 0, "%#lx != 0\n", info.AllocationProtect); + ok(info.State == MEM_FREE, "%#lx != MEM_FREE\n", info.State); + ok(info.Type == 0, "%#lx != 0\n", info.Type);
mapping = CreateFileMappingA( file, NULL, PAGE_READONLY, 0, 12288, NULL ); - ok( mapping != NULL, "CreateFileMappingA failed with error %u\n", GetLastError() ); + ok( mapping != NULL, "CreateFileMappingA failed with error %lu\n", GetLastError() );
ptr = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 12288 ); - ok( ptr != NULL, "MapViewOfFile failed with error %u\n", GetLastError() ); + ok( ptr != NULL, "MapViewOfFile failed with error %lu\n", GetLastError() );
ret = UnmapViewOfFile( (char *)ptr + 100 ); - ok( ret, "UnmapViewOfFile failed with error %u\n", GetLastError() ); + ok( ret, "UnmapViewOfFile failed with error %lu\n", GetLastError() );
ptr = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 12288 ); - ok( ptr != NULL, "MapViewOfFile failed with error %u\n", GetLastError() ); + ok( ptr != NULL, "MapViewOfFile failed with error %lu\n", GetLastError() );
ret = UnmapViewOfFile( (char *)ptr + 4096 ); - ok( ret, "UnmapViewOfFile failed with error %u\n", GetLastError() ); + ok( ret, "UnmapViewOfFile failed with error %lu\n", GetLastError() );
ptr = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 12288 ); - ok( ptr != NULL, "MapViewOfFile failed with error %u\n", GetLastError() ); + ok( ptr != NULL, "MapViewOfFile failed with error %lu\n", GetLastError() );
ret = UnmapViewOfFile( (char *)ptr + 4096 + 100 ); - ok( ret, "UnmapViewOfFile failed with error %u\n", GetLastError() ); + ok( ret, "UnmapViewOfFile failed with error %lu\n", GetLastError() );
CloseHandle(mapping);
mapping = CreateFileMappingA( file, NULL, PAGE_READONLY, 0, 36, NULL ); - ok( mapping != NULL, "CreateFileMappingA failed with error %u\n", GetLastError() ); + ok( mapping != NULL, "CreateFileMappingA failed with error %lu\n", GetLastError() ); status = pNtQuerySection( mapping, SectionBasicInformation, §ion_info, sizeof(section_info), &info_size ); - ok( !status, "NtQuerySection failed err %x\n", status ); - ok( info_size == sizeof(section_info), "NtQuerySection wrong size %lu\n", info_size ); - ok( section_info.Attributes == SEC_FILE, "NtQuerySection wrong attr %08x\n", + ok( !status, "NtQuerySection failed err %lx\n", status ); + ok( info_size == sizeof(section_info), "NtQuerySection wrong size %Iu\n", info_size ); + ok( section_info.Attributes == SEC_FILE, "NtQuerySection wrong attr %08lx\n", section_info.Attributes ); ok( section_info.BaseAddress == NULL, "NtQuerySection wrong base %p\n", section_info.BaseAddress ); - ok( section_info.Size.QuadPart == 36, "NtQuerySection wrong size %x%08x\n", + ok( section_info.Size.QuadPart == 36, "NtQuerySection wrong size %lx%08lx\n", section_info.Size.u.HighPart, section_info.Size.u.LowPart ); CloseHandle(mapping);
SetFilePointer(file, 0x3456, NULL, FILE_BEGIN); SetEndOfFile(file); mapping = CreateFileMappingA( file, NULL, PAGE_READONLY, 0, 0, NULL ); - ok( mapping != NULL, "CreateFileMappingA failed with error %u\n", GetLastError() ); + ok( mapping != NULL, "CreateFileMappingA failed with error %lu\n", GetLastError() ); status = pNtQuerySection( mapping, SectionBasicInformation, §ion_info, sizeof(section_info), &info_size ); - ok( !status, "NtQuerySection failed err %x\n", status ); - ok( info_size == sizeof(section_info), "NtQuerySection wrong size %lu\n", info_size ); - ok( section_info.Attributes == SEC_FILE, "NtQuerySection wrong attr %08x\n", + ok( !status, "NtQuerySection failed err %lx\n", status ); + ok( info_size == sizeof(section_info), "NtQuerySection wrong size %Iu\n", info_size ); + ok( section_info.Attributes == SEC_FILE, "NtQuerySection wrong attr %08lx\n", section_info.Attributes ); ok( section_info.BaseAddress == NULL, "NtQuerySection wrong base %p\n", section_info.BaseAddress ); - ok( section_info.Size.QuadPart == 0x3456, "NtQuerySection wrong size %x%08x\n", + ok( section_info.Size.QuadPart == 0x3456, "NtQuerySection wrong size %lx%08lx\n", section_info.Size.u.HighPart, section_info.Size.u.LowPart ); CloseHandle(mapping);
map_size.QuadPart = 0x3457; status = pNtCreateSection( &mapping, SECTION_QUERY | SECTION_MAP_READ, NULL, &map_size, PAGE_READONLY, SEC_COMMIT, file ); - ok( status == STATUS_SECTION_TOO_BIG, "NtCreateSection failed %x\n", status ); + ok( status == STATUS_SECTION_TOO_BIG, "NtCreateSection failed %lx\n", status ); status = pNtCreateSection( &mapping, SECTION_QUERY | SECTION_MAP_READ, NULL, &map_size, PAGE_READONLY, SEC_IMAGE, file ); - ok( status == STATUS_INVALID_IMAGE_NOT_MZ, "NtCreateSection failed %x\n", status ); + ok( status == STATUS_INVALID_IMAGE_NOT_MZ, "NtCreateSection failed %lx\n", status ); if (!status) CloseHandle( mapping ); map_size.QuadPart = 0x3452; status = pNtCreateSection( &mapping, SECTION_QUERY | SECTION_MAP_READ, NULL, &map_size, PAGE_READONLY, SEC_COMMIT, file ); - ok( !status, "NtCreateSection failed %x\n", status ); + ok( !status, "NtCreateSection failed %lx\n", status ); status = pNtQuerySection( mapping, SectionBasicInformation, §ion_info, sizeof(section_info), NULL ); - ok( !status, "NtQuerySection failed err %x\n", status ); - ok( section_info.Attributes == SEC_FILE, "NtQuerySection wrong attr %08x\n", + ok( !status, "NtQuerySection failed err %lx\n", status ); + ok( section_info.Attributes == SEC_FILE, "NtQuerySection wrong attr %08lx\n", section_info.Attributes ); ok( section_info.BaseAddress == NULL, "NtQuerySection wrong base %p\n", section_info.BaseAddress ); - ok( section_info.Size.QuadPart == 0x3452, "NtQuerySection wrong size %x%08x\n", + ok( section_info.Size.QuadPart == 0x3452, "NtQuerySection wrong size %lx%08lx\n", section_info.Size.u.HighPart, section_info.Size.u.LowPart ); size = map_size.QuadPart; status = pNtMapViewOfSection( mapping, GetCurrentProcess(), &ptr, 0, 0, NULL, &size, ViewShare, 0, PAGE_READONLY ); - ok( !status, "NtMapViewOfSection failed err %x\n", status ); + ok( !status, "NtMapViewOfSection failed err %lx\n", status ); pNtUnmapViewOfSection( GetCurrentProcess(), ptr ); size = map_size.QuadPart + 1; status = pNtMapViewOfSection( mapping, GetCurrentProcess(), &ptr, 0, 0, NULL, &size, ViewShare, 0, PAGE_READONLY ); - ok( status == STATUS_INVALID_VIEW_SIZE, "NtMapViewOfSection failed err %x\n", status ); + ok( status == STATUS_INVALID_VIEW_SIZE, "NtMapViewOfSection failed err %lx\n", status ); CloseHandle(mapping);
status = pNtCreateSection( &mapping, SECTION_QUERY | SECTION_MAP_READ, NULL, &map_size, PAGE_READONLY, SEC_COMMIT, 0 ); - ok( !status, "NtCreateSection failed %x\n", status ); + ok( !status, "NtCreateSection failed %lx\n", status ); status = pNtQuerySection( mapping, SectionBasicInformation, §ion_info, sizeof(section_info), NULL ); - ok( !status, "NtQuerySection failed err %x\n", status ); - ok( section_info.Attributes == SEC_COMMIT, "NtQuerySection wrong attr %08x\n", + ok( !status, "NtQuerySection failed err %lx\n", status ); + ok( section_info.Attributes == SEC_COMMIT, "NtQuerySection wrong attr %08lx\n", section_info.Attributes ); ok( section_info.BaseAddress == NULL, "NtQuerySection wrong base %p\n", section_info.BaseAddress ); - ok( section_info.Size.QuadPart == 0x4000, "NtQuerySection wrong size %x%08x\n", + ok( section_info.Size.QuadPart == 0x4000, "NtQuerySection wrong size %lx%08lx\n", section_info.Size.u.HighPart, section_info.Size.u.LowPart ); status = pNtQuerySection( mapping, SectionBasicInformation, §ion_info, sizeof(section_info)-1, NULL ); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "NtQuerySection failed err %x\n", status ); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "NtQuerySection failed err %lx\n", status ); status = pNtQuerySection( mapping, SectionBasicInformation, §ion_info, sizeof(section_info)+1, NULL ); - ok( !status, "NtQuerySection failed err %x\n", status ); + ok( !status, "NtQuerySection failed err %lx\n", status ); status = pNtQuerySection( mapping, SectionImageInformation, &image_info, sizeof(image_info)-1, NULL ); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "NtQuerySection failed err %x\n", status ); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "NtQuerySection failed err %lx\n", status ); status = pNtQuerySection( mapping, SectionImageInformation, &image_info, sizeof(image_info), NULL ); - ok( status == STATUS_SECTION_NOT_IMAGE, "NtQuerySection failed err %x\n", status ); + ok( status == STATUS_SECTION_NOT_IMAGE, "NtQuerySection failed err %lx\n", status ); status = pNtQuerySection( mapping, SectionImageInformation, &image_info, sizeof(image_info)+1, NULL ); - ok( status == STATUS_SECTION_NOT_IMAGE, "NtQuerySection failed err %x\n", status ); + ok( status == STATUS_SECTION_NOT_IMAGE, "NtQuerySection failed err %lx\n", status ); if (sizeof(SIZE_T) > sizeof(int)) { status = pNtQuerySection( mapping, SectionImageInformation, &image_info, sizeof(image_info) + ((SIZE_T)0x10000000 << 8), NULL ); todo_wine - ok( status == STATUS_ACCESS_VIOLATION, "NtQuerySection wrong err %x\n", status ); + ok( status == STATUS_ACCESS_VIOLATION, "NtQuerySection wrong err %lx\n", status ); } CloseHandle(mapping);
@@ -1237,10 +1238,10 @@ static void test_MapViewOfFile(void) SetEndOfFile(file); status = pNtCreateSection( &mapping, SECTION_QUERY | SECTION_MAP_READ, NULL, NULL, PAGE_READONLY, SEC_COMMIT, file ); - ok( status == STATUS_MAPPED_FILE_SIZE_ZERO, "NtCreateSection failed %x\n", status ); + ok( status == STATUS_MAPPED_FILE_SIZE_ZERO, "NtCreateSection failed %lx\n", status ); status = pNtCreateSection( &mapping, SECTION_QUERY | SECTION_MAP_READ, NULL, NULL, PAGE_READONLY, SEC_IMAGE, file ); - ok( status == STATUS_INVALID_FILE_FOR_SECTION, "NtCreateSection failed %x\n", status ); + ok( status == STATUS_INVALID_FILE_FOR_SECTION, "NtCreateSection failed %lx\n", status );
CloseHandle(file); DeleteFileA(testfile); @@ -1263,73 +1264,73 @@ static void test_NtAreMappedFilesTheSame(void)
file = CreateFileA( testfile, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, 0, 0 ); - ok( file != INVALID_HANDLE_VALUE, "CreateFile error %u\n", GetLastError() ); + ok( file != INVALID_HANDLE_VALUE, "CreateFile error %lu\n", GetLastError() ); SetFilePointer( file, 4096, NULL, FILE_BEGIN ); SetEndOfFile( file );
mapping = CreateFileMappingA( file, NULL, PAGE_READWRITE, 0, 4096, NULL ); - ok( mapping != 0, "CreateFileMapping error %u\n", GetLastError() ); + ok( mapping != 0, "CreateFileMapping error %lu\n", GetLastError() );
ptr = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 4096 ); - ok( ptr != NULL, "MapViewOfFile FILE_MAP_READ error %u\n", GetLastError() ); + ok( ptr != NULL, "MapViewOfFile FILE_MAP_READ error %lu\n", GetLastError() );
file2 = CreateFileA( testfile, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0 ); - ok( file2 != INVALID_HANDLE_VALUE, "CreateFile error %u\n", GetLastError() ); + ok( file2 != INVALID_HANDLE_VALUE, "CreateFile error %lu\n", GetLastError() );
map2 = CreateFileMappingA( file2, NULL, PAGE_READONLY, 0, 4096, NULL ); - ok( map2 != 0, "CreateFileMapping error %u\n", GetLastError() ); + ok( map2 != 0, "CreateFileMapping error %lu\n", GetLastError() ); ptr2 = MapViewOfFile( map2, FILE_MAP_READ, 0, 0, 4096 ); - ok( ptr2 != NULL, "MapViewOfFile FILE_MAP_READ error %u\n", GetLastError() ); + ok( ptr2 != NULL, "MapViewOfFile FILE_MAP_READ error %lu\n", GetLastError() ); status = pNtAreMappedFilesTheSame( ptr, ptr2 ); - ok( status == STATUS_NOT_SAME_DEVICE, "NtAreMappedFilesTheSame returned %x\n", status ); + ok( status == STATUS_NOT_SAME_DEVICE, "NtAreMappedFilesTheSame returned %lx\n", status ); UnmapViewOfFile( ptr2 );
ptr2 = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 4096 ); - ok( ptr2 != NULL, "MapViewOfFile FILE_MAP_READ error %u\n", GetLastError() ); + ok( ptr2 != NULL, "MapViewOfFile FILE_MAP_READ error %lu\n", GetLastError() ); status = pNtAreMappedFilesTheSame( ptr, ptr2 ); - ok( status == STATUS_NOT_SAME_DEVICE, "NtAreMappedFilesTheSame returned %x\n", status ); + ok( status == STATUS_NOT_SAME_DEVICE, "NtAreMappedFilesTheSame returned %lx\n", status ); UnmapViewOfFile( ptr2 ); CloseHandle( map2 );
map2 = CreateFileMappingA( file, NULL, PAGE_READONLY, 0, 4096, NULL ); - ok( map2 != 0, "CreateFileMapping error %u\n", GetLastError() ); + ok( map2 != 0, "CreateFileMapping error %lu\n", GetLastError() ); ptr2 = MapViewOfFile( map2, FILE_MAP_READ, 0, 0, 4096 ); - ok( ptr2 != NULL, "MapViewOfFile FILE_MAP_READ error %u\n", GetLastError() ); + ok( ptr2 != NULL, "MapViewOfFile FILE_MAP_READ error %lu\n", GetLastError() ); status = pNtAreMappedFilesTheSame( ptr, ptr2 ); - ok( status == STATUS_NOT_SAME_DEVICE, "NtAreMappedFilesTheSame returned %x\n", status ); + ok( status == STATUS_NOT_SAME_DEVICE, "NtAreMappedFilesTheSame returned %lx\n", status ); UnmapViewOfFile( ptr2 ); CloseHandle( map2 ); CloseHandle( file2 );
status = pNtAreMappedFilesTheSame( ptr, ptr ); ok( status == STATUS_SUCCESS || broken(status == STATUS_NOT_SAME_DEVICE), - "NtAreMappedFilesTheSame returned %x\n", status ); + "NtAreMappedFilesTheSame returned %lx\n", status );
status = pNtAreMappedFilesTheSame( ptr, (char *)ptr + 30 ); ok( status == STATUS_SUCCESS || broken(status == STATUS_NOT_SAME_DEVICE), - "NtAreMappedFilesTheSame returned %x\n", status ); + "NtAreMappedFilesTheSame returned %lx\n", status );
status = pNtAreMappedFilesTheSame( ptr, GetModuleHandleA("kernel32.dll") ); - ok( status == STATUS_NOT_SAME_DEVICE, "NtAreMappedFilesTheSame returned %x\n", status ); + ok( status == STATUS_NOT_SAME_DEVICE, "NtAreMappedFilesTheSame returned %lx\n", status );
status = pNtAreMappedFilesTheSame( ptr, (void *)0xdeadbeef ); ok( status == STATUS_CONFLICTING_ADDRESSES || status == STATUS_INVALID_ADDRESS, - "NtAreMappedFilesTheSame returned %x\n", status ); + "NtAreMappedFilesTheSame returned %lx\n", status );
status = pNtAreMappedFilesTheSame( ptr, NULL ); - ok( status == STATUS_INVALID_ADDRESS, "NtAreMappedFilesTheSame returned %x\n", status ); + ok( status == STATUS_INVALID_ADDRESS, "NtAreMappedFilesTheSame returned %lx\n", status );
status = pNtAreMappedFilesTheSame( ptr, (void *)GetProcessHeap() ); - ok( status == STATUS_CONFLICTING_ADDRESSES, "NtAreMappedFilesTheSame returned %x\n", status ); + ok( status == STATUS_CONFLICTING_ADDRESSES, "NtAreMappedFilesTheSame returned %lx\n", status );
status = pNtAreMappedFilesTheSame( NULL, NULL ); - ok( status == STATUS_INVALID_ADDRESS, "NtAreMappedFilesTheSame returned %x\n", status ); + ok( status == STATUS_INVALID_ADDRESS, "NtAreMappedFilesTheSame returned %lx\n", status );
ptr2 = VirtualAlloc( NULL, 0x10000, MEM_COMMIT, PAGE_READWRITE ); - ok( ptr2 != NULL, "VirtualAlloc error %u\n", GetLastError() ); + ok( ptr2 != NULL, "VirtualAlloc error %lu\n", GetLastError() ); status = pNtAreMappedFilesTheSame( ptr, ptr2 ); - ok( status == STATUS_CONFLICTING_ADDRESSES, "NtAreMappedFilesTheSame returned %x\n", status ); + ok( status == STATUS_CONFLICTING_ADDRESSES, "NtAreMappedFilesTheSame returned %lx\n", status ); VirtualFree( ptr2, 0, MEM_RELEASE );
UnmapViewOfFile( ptr ); @@ -1338,50 +1339,50 @@ static void test_NtAreMappedFilesTheSame(void)
status = pNtAreMappedFilesTheSame( GetModuleHandleA("ntdll.dll"), GetModuleHandleA("kernel32.dll") ); - ok( status == STATUS_NOT_SAME_DEVICE, "NtAreMappedFilesTheSame returned %x\n", status ); + ok( status == STATUS_NOT_SAME_DEVICE, "NtAreMappedFilesTheSame returned %lx\n", status ); status = pNtAreMappedFilesTheSame( GetModuleHandleA("kernel32.dll"), GetModuleHandleA("kernel32.dll") ); - ok( status == STATUS_SUCCESS, "NtAreMappedFilesTheSame returned %x\n", status ); + ok( status == STATUS_SUCCESS, "NtAreMappedFilesTheSame returned %lx\n", status ); status = pNtAreMappedFilesTheSame( GetModuleHandleA("kernel32.dll"), (char *)GetModuleHandleA("kernel32.dll") + 4096 ); - ok( status == STATUS_SUCCESS, "NtAreMappedFilesTheSame returned %x\n", status ); + ok( status == STATUS_SUCCESS, "NtAreMappedFilesTheSame returned %lx\n", status );
GetSystemDirectoryA( path, MAX_PATH ); strcat( path, "\kernel32.dll" ); file = CreateFileA( path, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0 ); - ok( file != INVALID_HANDLE_VALUE, "CreateFile error %u\n", GetLastError() ); + ok( file != INVALID_HANDLE_VALUE, "CreateFile error %lu\n", GetLastError() );
mapping = CreateFileMappingA( file, NULL, PAGE_READONLY, 0, 4096, NULL ); - ok( mapping != 0, "CreateFileMapping error %u\n", GetLastError() ); + ok( mapping != 0, "CreateFileMapping error %lu\n", GetLastError() ); ptr = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 4096 ); - ok( ptr != NULL, "MapViewOfFile FILE_MAP_READ error %u\n", GetLastError() ); + ok( ptr != NULL, "MapViewOfFile FILE_MAP_READ error %lu\n", GetLastError() ); status = pNtAreMappedFilesTheSame( ptr, GetModuleHandleA("kernel32.dll") ); - ok( status == STATUS_NOT_SAME_DEVICE, "NtAreMappedFilesTheSame returned %x\n", status ); + ok( status == STATUS_NOT_SAME_DEVICE, "NtAreMappedFilesTheSame returned %lx\n", status ); status = pNtAreMappedFilesTheSame( GetModuleHandleA("kernel32.dll"), ptr ); todo_wine - ok( status == STATUS_SUCCESS, "NtAreMappedFilesTheSame returned %x\n", status ); + ok( status == STATUS_SUCCESS, "NtAreMappedFilesTheSame returned %lx\n", status ); UnmapViewOfFile( ptr ); CloseHandle( mapping );
mapping = CreateFileMappingA( file, NULL, PAGE_READONLY | SEC_IMAGE, 0, 0, NULL ); - ok( mapping != 0, "CreateFileMapping error %u\n", GetLastError() ); + ok( mapping != 0, "CreateFileMapping error %lu\n", GetLastError() ); ptr = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 0 ); - ok( ptr != NULL, "MapViewOfFile FILE_MAP_READ error %u\n", GetLastError() ); + ok( ptr != NULL, "MapViewOfFile FILE_MAP_READ error %lu\n", GetLastError() ); status = pNtAreMappedFilesTheSame( ptr, GetModuleHandleA("kernel32.dll") ); - ok( status == STATUS_SUCCESS, "NtAreMappedFilesTheSame returned %x\n", status ); + ok( status == STATUS_SUCCESS, "NtAreMappedFilesTheSame returned %lx\n", status ); status = pNtAreMappedFilesTheSame( GetModuleHandleA("kernel32.dll"), ptr ); - ok( status == STATUS_SUCCESS, "NtAreMappedFilesTheSame returned %x\n", status ); + ok( status == STATUS_SUCCESS, "NtAreMappedFilesTheSame returned %lx\n", status );
file2 = CreateFileA( path, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0 ); - ok( file2 != INVALID_HANDLE_VALUE, "CreateFile error %u\n", GetLastError() ); + ok( file2 != INVALID_HANDLE_VALUE, "CreateFile error %lu\n", GetLastError() ); map2 = CreateFileMappingA( file2, NULL, PAGE_READONLY | SEC_IMAGE, 0, 0, NULL ); - ok( map2 != 0, "CreateFileMapping error %u\n", GetLastError() ); + ok( map2 != 0, "CreateFileMapping error %lu\n", GetLastError() ); ptr2 = MapViewOfFile( map2, FILE_MAP_READ, 0, 0, 0 ); - ok( ptr2 != NULL, "MapViewOfFile FILE_MAP_READ error %u\n", GetLastError() ); + ok( ptr2 != NULL, "MapViewOfFile FILE_MAP_READ error %lu\n", GetLastError() ); status = pNtAreMappedFilesTheSame( ptr, ptr2 ); - ok( status == STATUS_SUCCESS, "NtAreMappedFilesTheSame returned %x\n", status ); + ok( status == STATUS_SUCCESS, "NtAreMappedFilesTheSame returned %lx\n", status ); status = pNtAreMappedFilesTheSame( ptr2, ptr ); - ok( status == STATUS_SUCCESS, "NtAreMappedFilesTheSame returned %x\n", status ); + ok( status == STATUS_SUCCESS, "NtAreMappedFilesTheSame returned %lx\n", status ); UnmapViewOfFile( ptr2 ); CloseHandle( map2 ); CloseHandle( file2 ); @@ -1456,32 +1457,32 @@ static void test_CreateFileMapping(void) SetLastError(0xdeadbeef); handle = CreateFileMappingA( INVALID_HANDLE_VALUE, NULL, SEC_COMMIT | PAGE_READWRITE, 0, 0x1000, "Wine Test Mapping"); - ok( handle != NULL, "CreateFileMapping failed with error %u\n", GetLastError()); - ok( GetLastError() == 0, "wrong error %u\n", GetLastError()); + ok( handle != NULL, "CreateFileMapping failed with error %lu\n", GetLastError()); + ok( GetLastError() == 0, "wrong error %lu\n", GetLastError());
SetLastError(0xdeadbeef); handle2 = CreateFileMappingA( INVALID_HANDLE_VALUE, NULL, SEC_COMMIT | PAGE_READWRITE, 0, 0x1000, "Wine Test Mapping"); - ok( handle2 != NULL, "CreateFileMapping failed with error %d\n", GetLastError()); - ok( GetLastError() == ERROR_ALREADY_EXISTS, "wrong error %u\n", GetLastError()); + ok( handle2 != NULL, "CreateFileMapping failed with error %ld\n", GetLastError()); + ok( GetLastError() == ERROR_ALREADY_EXISTS, "wrong error %lu\n", GetLastError()); CloseHandle( handle2 );
SetLastError(0xdeadbeef); handle2 = CreateFileMappingA( INVALID_HANDLE_VALUE, NULL, SEC_COMMIT | PAGE_READWRITE, 0, 0x1000, "WINE TEST MAPPING"); - ok( handle2 != NULL, "CreateFileMapping failed with error %d\n", GetLastError()); - ok( GetLastError() == 0, "wrong error %u\n", GetLastError()); + ok( handle2 != NULL, "CreateFileMapping failed with error %ld\n", GetLastError()); + ok( GetLastError() == 0, "wrong error %lu\n", GetLastError()); CloseHandle( handle2 );
SetLastError(0xdeadbeef); handle2 = OpenFileMappingA( FILE_MAP_ALL_ACCESS, FALSE, "Wine Test Mapping"); - ok( handle2 != NULL, "OpenFileMapping failed with error %d\n", GetLastError()); + ok( handle2 != NULL, "OpenFileMapping failed with error %ld\n", GetLastError()); CloseHandle( handle2 );
SetLastError(0xdeadbeef); handle2 = OpenFileMappingA( FILE_MAP_ALL_ACCESS, FALSE, "WINE TEST MAPPING"); ok( !handle2, "OpenFileMapping succeeded\n"); - ok( GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %u\n", GetLastError()); + ok( GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %lu\n", GetLastError());
CloseHandle( handle );
@@ -1492,14 +1493,14 @@ static void test_CreateFileMapping(void) GetTempFileNameA( path, "map", 0, filename );
file[1] = CreateFileA( filename, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0 ); - ok( file[1] != INVALID_HANDLE_VALUE, "CreateFile error %u\n", GetLastError() ); + ok( file[1] != INVALID_HANDLE_VALUE, "CreateFile error %lu\n", GetLastError() ); SetFilePointer( file[1], 0x2000, NULL, FILE_BEGIN ); SetEndOfFile( file[1] );
GetSystemDirectoryA( path, MAX_PATH ); strcat( path, "\kernel32.dll" ); file[2] = CreateFileA( path, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0 ); - ok( file[2] != INVALID_HANDLE_VALUE, "CreateFile error %u\n", GetLastError() ); + ok( file[2] != INVALID_HANDLE_VALUE, "CreateFile error %lu\n", GetLastError() );
for (i = 0; i < ARRAY_SIZE(sec_flag_tests); i++) { @@ -1511,7 +1512,7 @@ static void test_CreateFileMapping(void) if (sec_flag_tests[i].error) { ok( !handle, "%u: CreateFileMapping succeeded\n", i ); - ok( GetLastError() == sec_flag_tests[i].error, "%u: wrong error %u\n", i, GetLastError()); + ok( GetLastError() == sec_flag_tests[i].error, "%u: wrong error %lu\n", i, GetLastError()); } else { @@ -1519,9 +1520,9 @@ static void test_CreateFileMapping(void) BOOL new_flags = ((flags & SEC_WRITECOMBINE) || ((flags & SEC_IMAGE_NO_EXECUTE) == SEC_IMAGE_NO_EXECUTE)); ok( handle != NULL || broken(new_flags), - "%u: CreateFileMapping failed with error %u\n", i, GetLastError()); + "%u: CreateFileMapping failed with error %lu\n", i, GetLastError()); ok( GetLastError() == 0 || broken(new_flags && GetLastError() == ERROR_INVALID_PARAMETER), - "%u: wrong error %u\n", i, GetLastError()); + "%u: wrong error %lu\n", i, GetLastError()); }
if (handle) @@ -1530,10 +1531,10 @@ static void test_CreateFileMapping(void) DWORD expect = sec_flag_tests[i].attrs ? sec_flag_tests[i].attrs : sec_flag_tests[i].flags;
status = pNtQuerySection( handle, SectionBasicInformation, &info, sizeof(info), NULL ); - ok( !status, "%u: NtQuerySection failed err %x\n", i, status ); + ok( !status, "%u: NtQuerySection failed err %lx\n", i, status ); /* SEC_NOCACHE not supported on older Windows */ ok( info.Attributes == expect || broken( info.Attributes == (expect & ~SEC_NOCACHE) ), - "%u: NtQuerySection wrong attr %08x\n", i, info.Attributes ); + "%u: NtQuerySection wrong attr %08lx\n", i, info.Attributes ); CloseHandle( handle ); } } @@ -1636,11 +1637,11 @@ static DWORD CALLBACK read_pipe( void *arg ) DWORD num_bytes; BOOL success = ConnectNamedPipe( args->pipe, NULL ); ok( success || GetLastError() == ERROR_PIPE_CONNECTED, - "%u: ConnectNamedPipe failed %u\n", args->index, GetLastError() ); + "%u: ConnectNamedPipe failed %lu\n", args->index, GetLastError() );
success = ReadFile( args->pipe, args->base, args->size, &num_bytes, NULL ); - ok( success, "%u: ReadFile failed %u\n", args->index, GetLastError() ); - ok( num_bytes == sizeof(testdata), "%u: wrong number of bytes read %u\n", args->index, num_bytes ); + ok( success, "%u: ReadFile failed %lu\n", args->index, GetLastError() ); + ok( num_bytes == sizeof(testdata), "%u: wrong number of bytes read %lu\n", args->index, num_bytes ); ok( !memcmp( args->base, testdata, sizeof(testdata)), "%u: didn't receive expected data\n", args->index ); return 0; @@ -1673,137 +1674,137 @@ static void test_write_watch(void) win_skip( "MEM_WRITE_WATCH not supported\n" ); return; } - ok( base != NULL, "VirtualAlloc failed %u\n", GetLastError() ); + ok( base != NULL, "VirtualAlloc failed %lu\n", GetLastError() ); ret = VirtualQuery( base, &info, sizeof(info) ); - ok(ret, "VirtualQuery failed %u\n", GetLastError()); + ok(ret, "VirtualQuery failed %lu\n", GetLastError()); ok( info.BaseAddress == base, "BaseAddress %p instead of %p\n", info.BaseAddress, base ); - ok( info.AllocationProtect == PAGE_READWRITE, "wrong AllocationProtect %x\n", info.AllocationProtect ); - ok( info.RegionSize == size, "wrong RegionSize 0x%lx\n", info.RegionSize ); - ok( info.State == MEM_COMMIT, "wrong State 0x%x\n", info.State ); - ok( info.Protect == PAGE_READWRITE, "wrong Protect 0x%x\n", info.Protect ); - ok( info.Type == MEM_PRIVATE, "wrong Type 0x%x\n", info.Type ); + ok( info.AllocationProtect == PAGE_READWRITE, "wrong AllocationProtect %lx\n", info.AllocationProtect ); + ok( info.RegionSize == size, "wrong RegionSize 0x%Ix\n", info.RegionSize ); + ok( info.State == MEM_COMMIT, "wrong State 0x%lx\n", info.State ); + ok( info.Protect == PAGE_READWRITE, "wrong Protect 0x%lx\n", info.Protect ); + ok( info.Type == MEM_PRIVATE, "wrong Type 0x%lx\n", info.Type );
count = 64; SetLastError( 0xdeadbeef ); ret = pGetWriteWatch( 0, NULL, size, results, &count, &pagesize ); - ok( ret == ~0u, "GetWriteWatch succeeded %u\n", ret ); + ok( ret == ~0u, "GetWriteWatch succeeded %lu\n", ret ); ok( GetLastError() == ERROR_INVALID_PARAMETER || broken( GetLastError() == 0xdeadbeef ), /* win98 */ - "wrong error %u\n", GetLastError() ); + "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); ret = pGetWriteWatch( 0, GetModuleHandleW(NULL), size, results, &count, &pagesize ); if (ret) { - ok( ret == ~0u, "GetWriteWatch succeeded %u\n", ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( ret == ~0u, "GetWriteWatch succeeded %lu\n", ret ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() ); } else /* win98 */ { - ok( count == 0, "wrong count %lu\n", count ); + ok( count == 0, "wrong count %Iu\n", count ); }
ret = pGetWriteWatch( 0, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 0, "wrong count %lu\n", count ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); + ok( count == 0, "wrong count %Iu\n", count );
base[pagesize + 1] = 0x44;
count = 64; ret = pGetWriteWatch( 0, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 1, "wrong count %lu\n", count ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); + ok( count == 1, "wrong count %Iu\n", count ); ok( results[0] == base + pagesize, "wrong result %p\n", results[0] );
count = 64; ret = pGetWriteWatch( WRITE_WATCH_FLAG_RESET, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 1, "wrong count %lu\n", count ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); + ok( count == 1, "wrong count %Iu\n", count ); ok( results[0] == base + pagesize, "wrong result %p\n", results[0] );
count = 64; ret = pGetWriteWatch( 0, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 0, "wrong count %lu\n", count ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); + ok( count == 0, "wrong count %Iu\n", count );
base[2*pagesize + 3] = 0x11; base[4*pagesize + 8] = 0x11;
count = 64; ret = pGetWriteWatch( 0, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 2, "wrong count %lu\n", count ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); + ok( count == 2, "wrong count %Iu\n", count ); ok( results[0] == base + 2*pagesize, "wrong result %p\n", results[0] ); ok( results[1] == base + 4*pagesize, "wrong result %p\n", results[1] );
count = 64; ret = pGetWriteWatch( 0, base + 3*pagesize, 2*pagesize, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 1, "wrong count %lu\n", count ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); + ok( count == 1, "wrong count %Iu\n", count ); ok( results[0] == base + 4*pagesize, "wrong result %p\n", results[0] );
ret = pResetWriteWatch( base, 3*pagesize ); - ok( !ret, "pResetWriteWatch failed %u\n", GetLastError() ); + ok( !ret, "pResetWriteWatch failed %lu\n", GetLastError() );
count = 64; ret = pGetWriteWatch( 0, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 1, "wrong count %lu\n", count ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); + ok( count == 1, "wrong count %Iu\n", count ); ok( results[0] == base + 4*pagesize, "wrong result %p\n", results[0] );
*(DWORD *)(base + 2*pagesize - 2) = 0xdeadbeef;
count = 64; ret = pGetWriteWatch( 0, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 3, "wrong count %lu\n", count ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); + ok( count == 3, "wrong count %Iu\n", count ); ok( results[0] == base + pagesize, "wrong result %p\n", results[0] ); ok( results[1] == base + 2*pagesize, "wrong result %p\n", results[1] ); ok( results[2] == base + 4*pagesize, "wrong result %p\n", results[2] );
count = 1; ret = pGetWriteWatch( WRITE_WATCH_FLAG_RESET, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 1, "wrong count %lu\n", count ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); + ok( count == 1, "wrong count %Iu\n", count ); ok( results[0] == base + pagesize, "wrong result %p\n", results[0] );
count = 64; ret = pGetWriteWatch( 0, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 2, "wrong count %lu\n", count ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); + ok( count == 2, "wrong count %Iu\n", count ); ok( results[0] == base + 2*pagesize, "wrong result %p\n", results[0] ); ok( results[1] == base + 4*pagesize, "wrong result %p\n", results[1] );
/* changing protections doesn't affect watches */
ret = VirtualProtect( base, 3*pagesize, PAGE_READONLY, &old_prot ); - ok( ret, "VirtualProtect failed error %u\n", GetLastError() ); - ok( old_prot == PAGE_READWRITE, "wrong old prot %x\n", old_prot ); + ok( ret, "VirtualProtect failed error %lu\n", GetLastError() ); + ok( old_prot == PAGE_READWRITE, "wrong old prot %lx\n", old_prot );
ret = VirtualQuery( base, &info, sizeof(info) ); - ok(ret, "VirtualQuery failed %u\n", GetLastError()); + ok(ret, "VirtualQuery failed %lu\n", GetLastError()); ok( info.BaseAddress == base, "BaseAddress %p instead of %p\n", info.BaseAddress, base ); - ok( info.RegionSize == 3*pagesize, "wrong RegionSize 0x%lx\n", info.RegionSize ); - ok( info.State == MEM_COMMIT, "wrong State 0x%x\n", info.State ); - ok( info.Protect == PAGE_READONLY, "wrong Protect 0x%x\n", info.Protect ); + ok( info.RegionSize == 3*pagesize, "wrong RegionSize 0x%Ix\n", info.RegionSize ); + ok( info.State == MEM_COMMIT, "wrong State 0x%lx\n", info.State ); + ok( info.Protect == PAGE_READONLY, "wrong Protect 0x%lx\n", info.Protect );
ret = VirtualProtect( base, 3*pagesize, PAGE_READWRITE, &old_prot ); - ok( ret, "VirtualProtect failed error %u\n", GetLastError() ); - ok( old_prot == PAGE_READONLY, "wrong old prot %x\n", old_prot ); + ok( ret, "VirtualProtect failed error %lu\n", GetLastError() ); + ok( old_prot == PAGE_READONLY, "wrong old prot %lx\n", old_prot );
count = 64; ret = pGetWriteWatch( 0, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 2, "wrong count %lu\n", count ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); + ok( count == 2, "wrong count %Iu\n", count ); ok( results[0] == base + 2*pagesize, "wrong result %p\n", results[0] ); ok( results[1] == base + 4*pagesize, "wrong result %p\n", results[1] );
ret = VirtualQuery( base, &info, sizeof(info) ); - ok(ret, "VirtualQuery failed %u\n", GetLastError()); + ok(ret, "VirtualQuery failed %lu\n", GetLastError()); ok( info.BaseAddress == base, "BaseAddress %p instead of %p\n", info.BaseAddress, base ); - ok( info.RegionSize == size, "wrong RegionSize 0x%lx\n", info.RegionSize ); - ok( info.State == MEM_COMMIT, "wrong State 0x%x\n", info.State ); - ok( info.Protect == PAGE_READWRITE, "wrong Protect 0x%x\n", info.Protect ); + ok( info.RegionSize == size, "wrong RegionSize 0x%Ix\n", info.RegionSize ); + ok( info.State == MEM_COMMIT, "wrong State 0x%lx\n", info.State ); + ok( info.Protect == PAGE_READWRITE, "wrong Protect 0x%lx\n", info.Protect );
/* ReadFile should trigger write watches */
@@ -1815,53 +1816,53 @@ static void test_write_watch(void) readpipe = CreateNamedPipeA( pipename, FILE_FLAG_OVERLAPPED | PIPE_ACCESS_INBOUND, (i ? PIPE_TYPE_MESSAGE : PIPE_TYPE_BYTE) | PIPE_WAIT, 1, 1024, 1024, NMPWAIT_USE_DEFAULT_WAIT, NULL ); - ok( readpipe != INVALID_HANDLE_VALUE, "CreateNamedPipeA failed %u\n", GetLastError() ); + ok( readpipe != INVALID_HANDLE_VALUE, "CreateNamedPipeA failed %lu\n", GetLastError() );
success = ConnectNamedPipe( readpipe, &overlapped ); - ok( !success, "%u: ConnectNamedPipe unexpectedly succeeded\n", i ); - ok( GetLastError() == ERROR_IO_PENDING, "%u: expected ERROR_IO_PENDING, got %u\n", + ok( !success, "%lu: ConnectNamedPipe unexpectedly succeeded\n", i ); + ok( GetLastError() == ERROR_IO_PENDING, "%lu: expected ERROR_IO_PENDING, got %lu\n", i, GetLastError() );
writepipe = CreateFileA( pipename, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL ); - ok( writepipe != INVALID_HANDLE_VALUE, "%u: CreateFileA failed %u\n", i, GetLastError() ); + ok( writepipe != INVALID_HANDLE_VALUE, "%lu: CreateFileA failed %lu\n", i, GetLastError() );
ret = WaitForSingleObject( overlapped.hEvent, 1000 ); - ok( ret == WAIT_OBJECT_0, "%u: expected WAIT_OBJECT_0, got %u\n", i, ret ); + ok( ret == WAIT_OBJECT_0, "%lu: expected WAIT_OBJECT_0, got %lu\n", i, ret );
memset( base, 0, size );
count = 64; ret = pGetWriteWatch( WRITE_WATCH_FLAG_RESET, base, size, results, &count, &pagesize ); - ok( !ret, "%u: GetWriteWatch failed %u\n", i, GetLastError() ); - ok( count == 16, "%u: wrong count %lu\n", i, count ); + ok( !ret, "%lu: GetWriteWatch failed %lu\n", i, GetLastError() ); + ok( count == 16, "%lu: wrong count %Iu\n", i, count );
success = ReadFile( readpipe, base, size, NULL, &overlapped ); - ok( !success, "%u: ReadFile unexpectedly succeeded\n", i ); - ok( GetLastError() == ERROR_IO_PENDING, "%u: expected ERROR_IO_PENDING, got %u\n", + ok( !success, "%lu: ReadFile unexpectedly succeeded\n", i ); + ok( GetLastError() == ERROR_IO_PENDING, "%lu: expected ERROR_IO_PENDING, got %lu\n", i, GetLastError() );
count = 64; ret = pGetWriteWatch( WRITE_WATCH_FLAG_RESET, base, size, results, &count, &pagesize ); - ok( !ret, "%u: GetWriteWatch failed %u\n", i, GetLastError() ); - ok( count == 16, "%u: wrong count %lu\n", i, count ); + ok( !ret, "%lu: GetWriteWatch failed %lu\n", i, GetLastError() ); + ok( count == 16, "%lu: wrong count %Iu\n", i, count );
num_bytes = 0; success = WriteFile( writepipe, testdata, sizeof(testdata), &num_bytes, NULL ); - ok( success, "%u: WriteFile failed %u\n", i, GetLastError() ); - ok( num_bytes == sizeof(testdata), "%u: wrong number of bytes written %u\n", i, num_bytes ); + ok( success, "%lu: WriteFile failed %lu\n", i, GetLastError() ); + ok( num_bytes == sizeof(testdata), "%lu: wrong number of bytes written %lu\n", i, num_bytes );
num_bytes = 0; success = GetOverlappedResult( readpipe, &overlapped, &num_bytes, TRUE ); - ok( success, "%u: GetOverlappedResult failed %u\n", i, GetLastError() ); - ok( num_bytes == sizeof(testdata), "%u: wrong number of bytes read %u\n", i, num_bytes ); - ok( !memcmp( base, testdata, sizeof(testdata)), "%u: didn't receive expected data\n", i ); + ok( success, "%lu: GetOverlappedResult failed %lu\n", i, GetLastError() ); + ok( num_bytes == sizeof(testdata), "%lu: wrong number of bytes read %lu\n", i, num_bytes ); + ok( !memcmp( base, testdata, sizeof(testdata)), "%lu: didn't receive expected data\n", i );
count = 64; memset( results, 0, sizeof(results) ); ret = pGetWriteWatch( WRITE_WATCH_FLAG_RESET, base, size, results, &count, &pagesize ); - ok( !ret, "%u: GetWriteWatch failed %u\n", i, GetLastError() ); - ok( count == 1, "%u: wrong count %lu\n", i, count ); - ok( results[0] == base, "%u: wrong result %p\n", i, results[0] ); + ok( !ret, "%lu: GetWriteWatch failed %lu\n", i, GetLastError() ); + ok( count == 1, "%lu: wrong count %Iu\n", i, count ); + ok( results[0] == base, "%lu: wrong result %p\n", i, results[0] );
CloseHandle( readpipe ); CloseHandle( writepipe ); @@ -1876,14 +1877,14 @@ static void test_write_watch(void) readpipe = CreateNamedPipeA( pipename, PIPE_ACCESS_INBOUND, (i ? PIPE_TYPE_MESSAGE : PIPE_TYPE_BYTE) | PIPE_WAIT, 1, 1024, 1024, NMPWAIT_USE_DEFAULT_WAIT, NULL ); - ok( readpipe != INVALID_HANDLE_VALUE, "CreateNamedPipeA failed %u\n", GetLastError() ); + ok( readpipe != INVALID_HANDLE_VALUE, "CreateNamedPipeA failed %lu\n", GetLastError() );
memset( base, 0, size );
count = 64; ret = pGetWriteWatch( WRITE_WATCH_FLAG_RESET, base, size, results, &count, &pagesize ); - ok( !ret, "%u: GetWriteWatch failed %u\n", i, GetLastError() ); - ok( count == 16, "%u: wrong count %lu\n", i, count ); + ok( !ret, "%lu: GetWriteWatch failed %lu\n", i, GetLastError() ); + ok( count == 16, "%lu: wrong count %Iu\n", i, count );
args.pipe = readpipe; args.index = i; @@ -1892,26 +1893,26 @@ static void test_write_watch(void) thread = CreateThread( NULL, 0, read_pipe, &args, 0, NULL );
writepipe = CreateFileA( pipename, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL ); - ok( writepipe != INVALID_HANDLE_VALUE, "%u: CreateFileA failed %u\n", i, GetLastError() ); + ok( writepipe != INVALID_HANDLE_VALUE, "%lu: CreateFileA failed %lu\n", i, GetLastError() ); Sleep( 200 );
count = 64; ret = pGetWriteWatch( WRITE_WATCH_FLAG_RESET, base, size, results, &count, &pagesize ); - ok( !ret, "%u: GetWriteWatch failed %u\n", i, GetLastError() ); - ok( count == 16, "%u: wrong count %lu\n", i, count ); + ok( !ret, "%lu: GetWriteWatch failed %lu\n", i, GetLastError() ); + ok( count == 16, "%lu: wrong count %Iu\n", i, count );
num_bytes = 0; success = WriteFile( writepipe, testdata, sizeof(testdata), &num_bytes, NULL ); - ok( success, "%u: WriteFile failed %u\n", i, GetLastError() ); - ok( num_bytes == sizeof(testdata), "%u: wrong number of bytes written %u\n", i, num_bytes ); + ok( success, "%lu: WriteFile failed %lu\n", i, GetLastError() ); + ok( num_bytes == sizeof(testdata), "%lu: wrong number of bytes written %lu\n", i, num_bytes ); WaitForSingleObject( thread, 10000 );
count = 64; memset( results, 0, sizeof(results) ); ret = pGetWriteWatch( WRITE_WATCH_FLAG_RESET, base, size, results, &count, &pagesize ); - ok( !ret, "%u: GetWriteWatch failed %u\n", i, GetLastError() ); - ok( count == 1, "%u: wrong count %lu\n", i, count ); - ok( results[0] == base, "%u: wrong result %p\n", i, results[0] ); + ok( !ret, "%lu: GetWriteWatch failed %lu\n", i, GetLastError() ); + ok( count == 1, "%lu: wrong count %Iu\n", i, count ); + ok( results[0] == base, "%lu: wrong result %p\n", i, results[0] );
CloseHandle( readpipe ); CloseHandle( writepipe ); @@ -1921,40 +1922,40 @@ static void test_write_watch(void) GetTempPathA( MAX_PATH, path ); GetTempFileNameA( path, "map", 0, filename ); file = CreateFileA( filename, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0 ); - ok( file != INVALID_HANDLE_VALUE, "CreateFile error %u\n", GetLastError() ); + ok( file != INVALID_HANDLE_VALUE, "CreateFile error %lu\n", GetLastError() ); SetFilePointer( file, 2 * pagesize + 3, NULL, FILE_BEGIN ); SetEndOfFile( file ); SetFilePointer( file, 0, NULL, FILE_BEGIN );
success = ReadFile( file, base, size, &num_bytes, NULL ); - ok( success, "ReadFile failed %u\n", GetLastError() ); - ok( num_bytes == 2 * pagesize + 3, "wrong bytes %u\n", num_bytes ); + ok( success, "ReadFile failed %lu\n", GetLastError() ); + ok( num_bytes == 2 * pagesize + 3, "wrong bytes %lu\n", num_bytes );
count = 64; ret = pGetWriteWatch( WRITE_WATCH_FLAG_RESET, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 16, "wrong count %lu\n", count ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); + ok( count == 16, "wrong count %Iu\n", count );
success = ReadFile( file, base, size, &num_bytes, NULL ); - ok( success, "ReadFile failed %u\n", GetLastError() ); - ok( num_bytes == 0, "wrong bytes %u\n", num_bytes ); + ok( success, "ReadFile failed %lu\n", GetLastError() ); + ok( num_bytes == 0, "wrong bytes %lu\n", num_bytes );
count = 64; ret = pGetWriteWatch( WRITE_WATCH_FLAG_RESET, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 16, "wrong count %lu\n", count ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); + ok( count == 16, "wrong count %Iu\n", count );
CloseHandle( file ); DeleteFileA( filename );
success = ReadFile( (HANDLE)0xdead, base, size, &num_bytes, NULL ); ok( !success, "ReadFile succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %lu\n", GetLastError() );
count = 64; ret = pGetWriteWatch( WRITE_WATCH_FLAG_RESET, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 0, "wrong count %lu\n", count ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); + ok( count == 0, "wrong count %Iu\n", count );
/* OVERLAPPED structure write watch */ memset( &overlapped, 0, sizeof(overlapped) ); @@ -1963,17 +1964,17 @@ static void test_write_watch(void) readpipe = CreateNamedPipeA( pipename, FILE_FLAG_OVERLAPPED | PIPE_ACCESS_INBOUND, PIPE_TYPE_MESSAGE | PIPE_WAIT, 1, 1024, 1024, NMPWAIT_USE_DEFAULT_WAIT, NULL ); - ok( readpipe != INVALID_HANDLE_VALUE, "CreateNamedPipeA failed %u\n", GetLastError() ); + ok( readpipe != INVALID_HANDLE_VALUE, "CreateNamedPipeA failed %lu\n", GetLastError() );
success = ConnectNamedPipe( readpipe, &overlapped ); ok( !success, "ConnectNamedPipe unexpectedly succeeded\n" ); - ok( GetLastError() == ERROR_IO_PENDING, "expected ERROR_IO_PENDING, got %u\n", GetLastError() ); + ok( GetLastError() == ERROR_IO_PENDING, "expected ERROR_IO_PENDING, got %lu\n", GetLastError() );
writepipe = CreateFileA( pipename, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL ); - ok( writepipe != INVALID_HANDLE_VALUE, "CreateFileA failed %u\n", GetLastError() ); + ok( writepipe != INVALID_HANDLE_VALUE, "CreateFileA failed %lu\n", GetLastError() );
ret = WaitForSingleObject( overlapped.hEvent, 1000 ); - ok( ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %u\n", ret ); + ok( ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %lu\n", ret );
memset( base, 0, size ); overlapped2 = (OVERLAPPED*)(base + size - sizeof(*overlapped2)); @@ -1981,35 +1982,35 @@ static void test_write_watch(void)
count = 64; ret = pGetWriteWatch( WRITE_WATCH_FLAG_RESET, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 16, "wrong count %lu\n", count ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); + ok( count == 16, "wrong count %Iu\n", count );
success = ReadFile( readpipe, base, sizeof(testdata), NULL, overlapped2 ); ok( !success, "ReadFile unexpectedly succeeded\n" ); - ok( GetLastError() == ERROR_IO_PENDING, "expected ERROR_IO_PENDING, got %u\n", GetLastError() ); + ok( GetLastError() == ERROR_IO_PENDING, "expected ERROR_IO_PENDING, got %lu\n", GetLastError() ); overlapped2->Internal = 0xdeadbeef;
count = 64; ret = pGetWriteWatch( WRITE_WATCH_FLAG_RESET, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 2, "wrong count %lu\n", count ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); + ok( count == 2, "wrong count %Iu\n", count );
num_bytes = 0; success = WriteFile( writepipe, testdata, sizeof(testdata), &num_bytes, NULL ); - ok( success, "WriteFile failed %u\n", GetLastError() ); - ok( num_bytes == sizeof(testdata), "wrong number of bytes written %u\n", num_bytes ); + ok( success, "WriteFile failed %lu\n", GetLastError() ); + ok( num_bytes == sizeof(testdata), "wrong number of bytes written %lu\n", num_bytes );
num_bytes = 0; success = GetOverlappedResult( readpipe, overlapped2, &num_bytes, TRUE ); - ok( success, "GetOverlappedResult failed %u\n", GetLastError() ); - ok( num_bytes == sizeof(testdata), "wrong number of bytes read %u\n", num_bytes ); + ok( success, "GetOverlappedResult failed %lu\n", GetLastError() ); + ok( num_bytes == sizeof(testdata), "wrong number of bytes read %lu\n", num_bytes ); ok( !memcmp( base, testdata, sizeof(testdata)), "didn't receive expected data\n" );
count = 64; memset( results, 0, sizeof(results) ); ret = pGetWriteWatch( WRITE_WATCH_FLAG_RESET, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 2, "wrong count %lu\n", count ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); + ok( count == 2, "wrong count %Iu\n", count ); ok( results[0] == base, "wrong result %p\n", results[0] );
CloseHandle( readpipe ); @@ -2024,139 +2025,139 @@ static void test_write_watch(void) ret = pGetWriteWatch( 0, base, size, results, &count, &pagesize ); if (ret) { - ok( ret == ~0u, "GetWriteWatch succeeded %u\n", ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( ret == ~0u, "GetWriteWatch succeeded %lu\n", ret ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); ret = pGetWriteWatch( 0, base, size, results, NULL, &pagesize ); - ok( ret == ~0u, "GetWriteWatch succeeded %u\n", ret ); - ok( GetLastError() == ERROR_NOACCESS, "wrong error %u\n", GetLastError() ); + ok( ret == ~0u, "GetWriteWatch succeeded %lu\n", ret ); + ok( GetLastError() == ERROR_NOACCESS, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); count = 64; ret = pGetWriteWatch( 0, base, size, results, &count, NULL ); - ok( ret == ~0u, "GetWriteWatch succeeded %u\n", ret ); - ok( GetLastError() == ERROR_NOACCESS, "wrong error %u\n", GetLastError() ); + ok( ret == ~0u, "GetWriteWatch succeeded %lu\n", ret ); + ok( GetLastError() == ERROR_NOACCESS, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); count = 64; ret = pGetWriteWatch( 0, base, size, NULL, &count, &pagesize ); - ok( ret == ~0u, "GetWriteWatch succeeded %u\n", ret ); - ok( GetLastError() == ERROR_NOACCESS, "wrong error %u\n", GetLastError() ); + ok( ret == ~0u, "GetWriteWatch succeeded %lu\n", ret ); + ok( GetLastError() == ERROR_NOACCESS, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); count = 0; ret = pGetWriteWatch( 0, base, size, NULL, &count, &pagesize ); - ok( ret == ~0u, "GetWriteWatch succeeded %u\n", ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( ret == ~0u, "GetWriteWatch succeeded %lu\n", ret ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); count = 64; ret = pGetWriteWatch( 0xdeadbeef, base, size, results, &count, &pagesize ); - ok( ret == ~0u, "GetWriteWatch succeeded %u\n", ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( ret == ~0u, "GetWriteWatch succeeded %lu\n", ret ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); count = 64; ret = pGetWriteWatch( 0, base, 0, results, &count, &pagesize ); - ok( ret == ~0u, "GetWriteWatch succeeded %u\n", ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( ret == ~0u, "GetWriteWatch succeeded %lu\n", ret ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); count = 64; ret = pGetWriteWatch( 0, base, size * 2, results, &count, &pagesize ); - ok( ret == ~0u, "GetWriteWatch succeeded %u\n", ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( ret == ~0u, "GetWriteWatch succeeded %lu\n", ret ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); count = 64; ret = pGetWriteWatch( 0, base + size - pagesize, pagesize + 1, results, &count, &pagesize ); - ok( ret == ~0u, "GetWriteWatch succeeded %u\n", ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( ret == ~0u, "GetWriteWatch succeeded %lu\n", ret ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); ret = pResetWriteWatch( base, 0 ); - ok( ret == ~0u, "ResetWriteWatch succeeded %u\n", ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( ret == ~0u, "ResetWriteWatch succeeded %lu\n", ret ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); ret = pResetWriteWatch( GetModuleHandleW(NULL), size ); - ok( ret == ~0u, "ResetWriteWatch succeeded %u\n", ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( ret == ~0u, "ResetWriteWatch succeeded %lu\n", ret ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() ); } else /* win98 is completely different */ { SetLastError( 0xdeadbeef ); count = 64; ret = pGetWriteWatch( 0, base, size, NULL, &count, &pagesize ); - ok( ret == ERROR_INVALID_PARAMETER, "GetWriteWatch succeeded %u\n", ret ); - ok( GetLastError() == 0xdeadbeef, "wrong error %u\n", GetLastError() ); + ok( ret == ERROR_INVALID_PARAMETER, "GetWriteWatch succeeded %lu\n", ret ); + ok( GetLastError() == 0xdeadbeef, "wrong error %lu\n", GetLastError() );
count = 0; ret = pGetWriteWatch( 0, base, size, NULL, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", ret ); + ok( !ret, "GetWriteWatch failed %lu\n", ret );
count = 64; ret = pGetWriteWatch( 0xdeadbeef, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", ret ); + ok( !ret, "GetWriteWatch failed %lu\n", ret );
count = 64; ret = pGetWriteWatch( 0, base, 0, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", ret ); + ok( !ret, "GetWriteWatch failed %lu\n", ret );
ret = pResetWriteWatch( base, 0 ); - ok( !ret, "ResetWriteWatch failed %u\n", ret ); + ok( !ret, "ResetWriteWatch failed %lu\n", ret );
ret = pResetWriteWatch( GetModuleHandleW(NULL), size ); - ok( !ret, "ResetWriteWatch failed %u\n", ret ); + ok( !ret, "ResetWriteWatch failed %lu\n", ret ); }
VirtualFree( base, 0, MEM_RELEASE );
base = VirtualAlloc( 0, size, MEM_RESERVE | MEM_WRITE_WATCH, PAGE_READWRITE ); - ok( base != NULL, "VirtualAlloc failed %u\n", GetLastError() ); + ok( base != NULL, "VirtualAlloc failed %lu\n", GetLastError() ); VirtualFree( base, 0, MEM_RELEASE );
base = VirtualAlloc( 0, size, MEM_WRITE_WATCH, PAGE_READWRITE ); ok( !base, "VirtualAlloc succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
/* initial protect doesn't matter */
base = VirtualAlloc( 0, size, MEM_RESERVE | MEM_WRITE_WATCH, PAGE_NOACCESS ); - ok( base != NULL, "VirtualAlloc failed %u\n", GetLastError() ); + ok( base != NULL, "VirtualAlloc failed %lu\n", GetLastError() ); base = VirtualAlloc( base, size, MEM_COMMIT, PAGE_NOACCESS ); - ok( base != NULL, "VirtualAlloc failed %u\n", GetLastError() ); + ok( base != NULL, "VirtualAlloc failed %lu\n", GetLastError() );
count = 64; ret = pGetWriteWatch( 0, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 0, "wrong count %lu\n", count ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); + ok( count == 0, "wrong count %Iu\n", count );
ret = VirtualProtect( base, 6*pagesize, PAGE_READWRITE, &old_prot ); - ok( ret, "VirtualProtect failed error %u\n", GetLastError() ); - ok( old_prot == PAGE_NOACCESS, "wrong old prot %x\n", old_prot ); + ok( ret, "VirtualProtect failed error %lu\n", GetLastError() ); + ok( old_prot == PAGE_NOACCESS, "wrong old prot %lx\n", old_prot );
base[5*pagesize + 200] = 3;
ret = VirtualProtect( base, 6*pagesize, PAGE_NOACCESS, &old_prot ); - ok( ret, "VirtualProtect failed error %u\n", GetLastError() ); - ok( old_prot == PAGE_READWRITE, "wrong old prot %x\n", old_prot ); + ok( ret, "VirtualProtect failed error %lu\n", GetLastError() ); + ok( old_prot == PAGE_READWRITE, "wrong old prot %lx\n", old_prot );
count = 64; ret = pGetWriteWatch( 0, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 1, "wrong count %lu\n", count ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); + ok( count == 1, "wrong count %Iu\n", count ); ok( results[0] == base + 5*pagesize, "wrong result %p\n", results[0] );
ret = VirtualFree( base, size, MEM_DECOMMIT ); - ok( ret, "VirtualFree failed %u\n", GetLastError() ); + ok( ret, "VirtualFree failed %lu\n", GetLastError() );
count = 64; ret = pGetWriteWatch( 0, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); ok( count == 1 || broken(count == 0), /* win98 */ - "wrong count %lu\n", count ); + "wrong count %Iu\n", count ); if (count) ok( results[0] == base + 5*pagesize, "wrong result %p\n", results[0] );
VirtualFree( base, 0, MEM_RELEASE ); @@ -2219,12 +2220,12 @@ static void test_stack_commit(void) DWORD result;
call_on_stack = VirtualAlloc( 0, 0x1000, MEM_RESERVE | MEM_COMMIT, PAGE_EXECUTE_READWRITE ); - ok( call_on_stack != NULL, "VirtualAlloc failed %u\n", GetLastError() ); + ok( call_on_stack != NULL, "VirtualAlloc failed %lu\n", GetLastError() ); memcpy( call_on_stack, code_call_on_stack, sizeof(code_call_on_stack) );
/* allocate a new stack, only the first guard page is committed */ new_stack = VirtualAlloc( 0, 0x400000, MEM_RESERVE, PAGE_READWRITE ); - ok( new_stack != NULL, "VirtualAlloc failed %u\n", GetLastError() ); + ok( new_stack != NULL, "VirtualAlloc failed %lu\n", GetLastError() ); new_stack_base = (char *)new_stack + 0x400000; VirtualAlloc( (char *)new_stack_base - 0x1000, 0x1000, MEM_COMMIT, PAGE_READWRITE | PAGE_GUARD );
@@ -2242,7 +2243,7 @@ static void test_stack_commit(void) NtCurrentTeb()->Tib.StackBase = old_stack_base; NtCurrentTeb()->Tib.StackLimit = old_stack_limit;
- ok( result == 42, "expected 42, got %u\n", result ); + ok( result == 42, "expected 42, got %lu\n", result );
VirtualFree( new_stack, 0, MEM_RELEASE ); VirtualFree( call_on_stack, 0, MEM_RELEASE ); @@ -2256,11 +2257,11 @@ static LONG num_guard_page_calls; static DWORD guard_page_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame, CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher ) { - trace( "exception: %08x flags:%x addr:%p\n", + trace( "exception: %08lx flags:%lx addr:%p\n", rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionAddress );
- ok( rec->NumberParameters == 2, "NumberParameters is %d instead of 2\n", rec->NumberParameters ); - ok( rec->ExceptionCode == STATUS_GUARD_PAGE_VIOLATION, "ExceptionCode is %08x instead of %08x\n", + ok( rec->NumberParameters == 2, "NumberParameters is %ld instead of 2\n", rec->NumberParameters ); + ok( rec->ExceptionCode == STATUS_GUARD_PAGE_VIOLATION, "ExceptionCode is %08lx instead of %08lx\n", rec->ExceptionCode, STATUS_GUARD_PAGE_VIOLATION );
InterlockedIncrement( &num_guard_page_calls ); @@ -2274,7 +2275,7 @@ static void test_guard_page(void) EXCEPTION_REGISTRATION_RECORD frame; MEMORY_BASIC_INFORMATION info; DWORD ret, size, old_prot; - int *value, old_value; + LONG *value, old_value; void *results[64]; ULONG_PTR count; ULONG pagesize; @@ -2283,63 +2284,63 @@ static void test_guard_page(void)
size = 0x1000; base = VirtualAlloc( 0, size, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE | PAGE_GUARD ); - ok( base != NULL, "VirtualAlloc failed %u\n", GetLastError() ); - value = (int *)base; + ok( base != NULL, "VirtualAlloc failed %lu\n", GetLastError() ); + value = (LONG *)base;
/* verify info structure */ ret = VirtualQuery( base, &info, sizeof(info) ); - ok( ret, "VirtualQuery failed %u\n", GetLastError()); + ok( ret, "VirtualQuery failed %lu\n", GetLastError()); ok( info.BaseAddress == base, "BaseAddress %p instead of %p\n", info.BaseAddress, base ); - ok( info.AllocationProtect == (PAGE_READWRITE | PAGE_GUARD), "wrong AllocationProtect %x\n", info.AllocationProtect ); + ok( info.AllocationProtect == (PAGE_READWRITE | PAGE_GUARD), "wrong AllocationProtect %lx\n", info.AllocationProtect ); ok( info.RegionSize == size, "wrong RegionSize 0x%lx\n", info.RegionSize ); - ok( info.State == MEM_COMMIT, "wrong State 0x%x\n", info.State ); - ok( info.Protect == (PAGE_READWRITE | PAGE_GUARD), "wrong Protect 0x%x\n", info.Protect ); - ok( info.Type == MEM_PRIVATE, "wrong Type 0x%x\n", info.Type ); + ok( info.State == MEM_COMMIT, "wrong State 0x%lx\n", info.State ); + ok( info.Protect == (PAGE_READWRITE | PAGE_GUARD), "wrong Protect 0x%lx\n", info.Protect ); + ok( info.Type == MEM_PRIVATE, "wrong Type 0x%lx\n", info.Type );
/* put some initial value into the memory */ success = VirtualProtect( base, size, PAGE_READWRITE, &old_prot ); - ok( success, "VirtualProtect failed %u\n", GetLastError() ); - ok( old_prot == (PAGE_READWRITE | PAGE_GUARD), "wrong old prot %x\n", old_prot ); + ok( success, "VirtualProtect failed %lu\n", GetLastError() ); + ok( old_prot == (PAGE_READWRITE | PAGE_GUARD), "wrong old prot %lx\n", old_prot );
*value = 1; *(value + 1) = 2;
success = VirtualProtect( base, size, PAGE_READWRITE | PAGE_GUARD, &old_prot ); - ok( success, "VirtualProtect failed %u\n", GetLastError() ); - ok( old_prot == PAGE_READWRITE, "wrong old prot %x\n", old_prot ); + ok( success, "VirtualProtect failed %lu\n", GetLastError() ); + ok( old_prot == PAGE_READWRITE, "wrong old prot %lx\n", old_prot );
/* test behaviour of VirtualLock - first attempt should fail */ SetLastError( 0xdeadbeef ); success = VirtualLock( base, size ); ok( !success, "VirtualLock unexpectedly succeeded\n" ); todo_wine - ok( GetLastError() == STATUS_GUARD_PAGE_VIOLATION, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == STATUS_GUARD_PAGE_VIOLATION, "wrong error %lu\n", GetLastError() );
success = VirtualLock( base, size ); todo_wine - ok( success, "VirtualLock failed %u\n", GetLastError() ); + ok( success, "VirtualLock failed %lu\n", GetLastError() ); if (success) { - ok( *value == 1, "memory block contains wrong value, expected 1, got 0x%x\n", *value ); + ok( *value == 1, "memory block contains wrong value, expected 1, got 0x%lx\n", *value ); success = VirtualUnlock( base, size ); - ok( success, "VirtualUnlock failed %u\n", GetLastError() ); + ok( success, "VirtualUnlock failed %lu\n", GetLastError() ); }
/* check info structure again, PAGE_GUARD should be removed now */ ret = VirtualQuery( base, &info, sizeof(info) ); - ok( ret, "VirtualQuery failed %u\n", GetLastError()); + ok( ret, "VirtualQuery failed %lu\n", GetLastError()); ok( info.BaseAddress == base, "BaseAddress %p instead of %p\n", info.BaseAddress, base ); - ok( info.AllocationProtect == (PAGE_READWRITE | PAGE_GUARD), "wrong AllocationProtect %x\n", info.AllocationProtect ); + ok( info.AllocationProtect == (PAGE_READWRITE | PAGE_GUARD), "wrong AllocationProtect %lx\n", info.AllocationProtect ); ok( info.RegionSize == size, "wrong RegionSize 0x%lx\n", info.RegionSize ); - ok( info.State == MEM_COMMIT, "wrong State 0x%x\n", info.State ); + ok( info.State == MEM_COMMIT, "wrong State 0x%lx\n", info.State ); todo_wine - ok( info.Protect == PAGE_READWRITE, "wrong Protect 0x%x\n", info.Protect ); - ok( info.Type == MEM_PRIVATE, "wrong Type 0x%x\n", info.Type ); + ok( info.Protect == PAGE_READWRITE, "wrong Protect 0x%lx\n", info.Protect ); + ok( info.Type == MEM_PRIVATE, "wrong Type 0x%lx\n", info.Type );
success = VirtualProtect( base, size, PAGE_READWRITE | PAGE_GUARD, &old_prot ); - ok( success, "VirtualProtect failed %u\n", GetLastError() ); + ok( success, "VirtualProtect failed %lu\n", GetLastError() ); todo_wine - ok( old_prot == PAGE_READWRITE, "wrong old prot %x\n", old_prot ); + ok( old_prot == PAGE_READWRITE, "wrong old prot %lx\n", old_prot );
/* test directly accessing the memory - we need to setup an exception handler first */ frame.Handler = guard_page_handler; @@ -2349,19 +2350,19 @@ static void test_guard_page(void) InterlockedExchange( &num_guard_page_calls, 0 ); InterlockedExchange( &old_value, *value ); /* exception handler increments value by 0x100 */ *value = 2; - ok( old_value == 0x101, "memory block contains wrong value, expected 0x101, got 0x%x\n", old_value ); - ok( num_guard_page_calls == 1, "expected one callback of guard page handler, got %d calls\n", num_guard_page_calls ); + ok( old_value == 0x101, "memory block contains wrong value, expected 0x101, got 0x%lx\n", old_value ); + ok( num_guard_page_calls == 1, "expected one callback of guard page handler, got %ld calls\n", num_guard_page_calls );
NtCurrentTeb()->Tib.ExceptionList = frame.Prev;
/* check info structure again, PAGE_GUARD should be removed now */ ret = VirtualQuery( base, &info, sizeof(info) ); - ok( ret, "VirtualQuery failed %u\n", GetLastError()); - ok( info.Protect == PAGE_READWRITE, "wrong Protect 0x%x\n", info.Protect ); + ok( ret, "VirtualQuery failed %lu\n", GetLastError()); + ok( info.Protect == PAGE_READWRITE, "wrong Protect 0x%lx\n", info.Protect );
success = VirtualProtect( base, size, PAGE_READWRITE | PAGE_GUARD, &old_prot ); - ok( success, "VirtualProtect failed %u\n", GetLastError() ); - ok( old_prot == PAGE_READWRITE, "wrong old prot %x\n", old_prot ); + ok( success, "VirtualProtect failed %lu\n", GetLastError() ); + ok( old_prot == PAGE_READWRITE, "wrong old prot %lx\n", old_prot );
/* test accessing second integer in memory */ frame.Handler = guard_page_handler; @@ -2370,19 +2371,19 @@ static void test_guard_page(void)
InterlockedExchange( &num_guard_page_calls, 0 ); old_value = *(value + 1); - ok( old_value == 0x102, "memory block contains wrong value, expected 0x102, got 0x%x\n", old_value ); - ok( *value == 2, "memory block contains wrong value, expected 2, got 0x%x\n", *value ); - ok( num_guard_page_calls == 1, "expected one callback of guard page handler, got %d calls\n", num_guard_page_calls ); + ok( old_value == 0x102, "memory block contains wrong value, expected 0x102, got 0x%lx\n", old_value ); + ok( *value == 2, "memory block contains wrong value, expected 2, got 0x%lx\n", *value ); + ok( num_guard_page_calls == 1, "expected one callback of guard page handler, got %ld calls\n", num_guard_page_calls );
NtCurrentTeb()->Tib.ExceptionList = frame.Prev;
success = VirtualLock( base, size ); - ok( success, "VirtualLock failed %u\n", GetLastError() ); + ok( success, "VirtualLock failed %lu\n", GetLastError() ); if (success) { - ok( *value == 2, "memory block contains wrong value, expected 2, got 0x%x\n", *value ); + ok( *value == 2, "memory block contains wrong value, expected 2, got 0x%lx\n", *value ); success = VirtualUnlock( base, size ); - ok( success, "VirtualUnlock failed %u\n", GetLastError() ); + ok( success, "VirtualUnlock failed %lu\n", GetLastError() ); }
VirtualFree( base, 0, MEM_RELEASE ); @@ -2400,21 +2401,21 @@ static void test_guard_page(void) win_skip( "MEM_WRITE_WATCH not supported\n" ); return; } - ok( base != NULL, "VirtualAlloc failed %u\n", GetLastError() ); - value = (int *)base; + ok( base != NULL, "VirtualAlloc failed %lu\n", GetLastError() ); + value = (LONG *)base;
ret = VirtualQuery( base, &info, sizeof(info) ); - ok( ret, "VirtualQuery failed %u\n", GetLastError() ); + ok( ret, "VirtualQuery failed %lu\n", GetLastError() ); ok( info.BaseAddress == base, "BaseAddress %p instead of %p\n", info.BaseAddress, base ); - ok( info.AllocationProtect == (PAGE_READWRITE | PAGE_GUARD), "wrong AllocationProtect %x\n", info.AllocationProtect ); + ok( info.AllocationProtect == (PAGE_READWRITE | PAGE_GUARD), "wrong AllocationProtect %lx\n", info.AllocationProtect ); ok( info.RegionSize == size, "wrong RegionSize 0x%lx\n", info.RegionSize ); - ok( info.State == MEM_COMMIT, "wrong State 0x%x\n", info.State ); - ok( info.Protect == (PAGE_READWRITE | PAGE_GUARD), "wrong Protect 0x%x\n", info.Protect ); - ok( info.Type == MEM_PRIVATE, "wrong Type 0x%x\n", info.Type ); + ok( info.State == MEM_COMMIT, "wrong State 0x%lx\n", info.State ); + ok( info.Protect == (PAGE_READWRITE | PAGE_GUARD), "wrong Protect 0x%lx\n", info.Protect ); + ok( info.Type == MEM_PRIVATE, "wrong Type 0x%lx\n", info.Type );
count = 64; ret = pGetWriteWatch( 0, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); ok( count == 0, "wrong count %lu\n", count );
/* writing to a page should trigger should trigger guard page, even if write watch is set */ @@ -2425,18 +2426,18 @@ static void test_guard_page(void) InterlockedExchange( &num_guard_page_calls, 0 ); *value = 1; *(value + 1) = 2; - ok( num_guard_page_calls == 1, "expected one callback of guard page handler, got %d calls\n", num_guard_page_calls ); + ok( num_guard_page_calls == 1, "expected one callback of guard page handler, got %ld calls\n", num_guard_page_calls );
NtCurrentTeb()->Tib.ExceptionList = frame.Prev;
count = 64; ret = pGetWriteWatch( WRITE_WATCH_FLAG_RESET, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); ok( count == 1, "wrong count %lu\n", count ); ok( results[0] == base, "wrong result %p\n", results[0] );
success = VirtualProtect( base, size, PAGE_READWRITE | PAGE_GUARD, &old_prot ); - ok( success, "VirtualProtect failed %u\n", GetLastError() ); + ok( success, "VirtualProtect failed %lu\n", GetLastError() );
/* write watch is triggered from inside of the guard page handler */ frame.Handler = guard_page_handler; @@ -2445,47 +2446,47 @@ static void test_guard_page(void)
InterlockedExchange( &num_guard_page_calls, 0 ); old_value = *(value + 1); /* doesn't trigger write watch */ - ok( old_value == 0x102, "memory block contains wrong value, expected 0x102, got 0x%x\n", old_value ); - ok( *value == 1, "memory block contains wrong value, expected 1, got 0x%x\n", *value ); - ok( num_guard_page_calls == 1, "expected one callback of guard page handler, got %d calls\n", num_guard_page_calls ); + ok( old_value == 0x102, "memory block contains wrong value, expected 0x102, got 0x%lx\n", old_value ); + ok( *value == 1, "memory block contains wrong value, expected 1, got 0x%lx\n", *value ); + ok( num_guard_page_calls == 1, "expected one callback of guard page handler, got %ld calls\n", num_guard_page_calls );
NtCurrentTeb()->Tib.ExceptionList = frame.Prev;
count = 64; ret = pGetWriteWatch( WRITE_WATCH_FLAG_RESET, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); ok( count == 1, "wrong count %lu\n", count ); ok( results[0] == base, "wrong result %p\n", results[0] );
success = VirtualProtect( base, size, PAGE_READWRITE | PAGE_GUARD, &old_prot ); - ok( success, "VirtualProtect failed %u\n", GetLastError() ); + ok( success, "VirtualProtect failed %lu\n", GetLastError() );
/* test behaviour of VirtualLock - first attempt should fail without triggering write watches */ SetLastError( 0xdeadbeef ); success = VirtualLock( base, size ); ok( !success, "VirtualLock unexpectedly succeeded\n" ); todo_wine - ok( GetLastError() == STATUS_GUARD_PAGE_VIOLATION, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == STATUS_GUARD_PAGE_VIOLATION, "wrong error %lu\n", GetLastError() );
count = 64; ret = pGetWriteWatch( 0, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); ok( count == 0, "wrong count %lu\n", count );
success = VirtualLock( base, size ); todo_wine - ok( success, "VirtualLock failed %u\n", GetLastError() ); + ok( success, "VirtualLock failed %lu\n", GetLastError() ); if (success) { - ok( *value == 1, "memory block contains wrong value, expected 1, got 0x%x\n", *value ); + ok( *value == 1, "memory block contains wrong value, expected 1, got 0x%lx\n", *value ); success = VirtualUnlock( base, size ); - ok( success, "VirtualUnlock failed %u\n", GetLastError() ); + ok( success, "VirtualUnlock failed %lu\n", GetLastError() ); }
count = 64; results[0] = (void *)0xdeadbeef; ret = pGetWriteWatch( WRITE_WATCH_FLAG_RESET, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); todo_wine ok( count == 1 || broken(count == 0) /* Windows 8 */, "wrong count %lu\n", count ); todo_wine @@ -2502,13 +2503,13 @@ static DWORD execute_fault_seh_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTR ULONG flags = MEM_EXECUTE_OPTION_ENABLE; DWORD err;
- trace( "exception: %08x flags:%x addr:%p info[0]:%ld info[1]:%p\n", + trace( "exception: %08lx flags:%lx addr:%p info[0]:%ld info[1]:%p\n", rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionAddress, rec->ExceptionInformation[0], (void *)rec->ExceptionInformation[1] );
- ok( rec->NumberParameters == 2, "NumberParameters is %d instead of 2\n", rec->NumberParameters ); + ok( rec->NumberParameters == 2, "NumberParameters is %ld instead of 2\n", rec->NumberParameters ); ok( rec->ExceptionCode == STATUS_ACCESS_VIOLATION || rec->ExceptionCode == STATUS_GUARD_PAGE_VIOLATION, - "ExceptionCode is %08x instead of STATUS_ACCESS_VIOLATION or STATUS_GUARD_PAGE_VIOLATION\n", rec->ExceptionCode ); + "ExceptionCode is %08lx instead of STATUS_ACCESS_VIOLATION or STATUS_GUARD_PAGE_VIOLATION\n", rec->ExceptionCode );
NtQueryInformationProcess( GetCurrentProcess(), ProcessExecuteFlags, &flags, sizeof(flags), NULL );
@@ -2516,7 +2517,7 @@ static DWORD execute_fault_seh_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTR {
err = IsProcessorFeaturePresent( PF_NX_ENABLED ) ? EXCEPTION_EXECUTE_FAULT : EXCEPTION_READ_FAULT; - ok( rec->ExceptionInformation[0] == err, "ExceptionInformation[0] is %d instead of %d\n", + ok( rec->ExceptionInformation[0] == err, "ExceptionInformation[0] is %ld instead of %ld\n", (DWORD)rec->ExceptionInformation[0], err );
InterlockedIncrement( &num_guard_page_calls ); @@ -2527,12 +2528,12 @@ static DWORD execute_fault_seh_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTR BOOL success;
err = (flags & MEM_EXECUTE_OPTION_DISABLE) ? EXCEPTION_EXECUTE_FAULT : EXCEPTION_READ_FAULT; - ok( rec->ExceptionInformation[0] == err, "ExceptionInformation[0] is %d instead of %d\n", + ok( rec->ExceptionInformation[0] == err, "ExceptionInformation[0] is %ld instead of %ld\n", (DWORD)rec->ExceptionInformation[0], err );
success = VirtualProtect( (void *)rec->ExceptionInformation[1], 16, PAGE_EXECUTE_READWRITE, &old_prot ); - ok( success, "VirtualProtect failed %u\n", GetLastError() ); - ok( old_prot == PAGE_READWRITE, "wrong old prot %x\n", old_prot ); + ok( success, "VirtualProtect failed %lu\n", GetLastError() ); + ok( old_prot == PAGE_READWRITE, "wrong old prot %lx\n", old_prot );
InterlockedIncrement( &num_execute_fault_calls ); } @@ -2546,13 +2547,13 @@ static LONG CALLBACK execute_fault_vec_handler( EXCEPTION_POINTERS *ExceptionInf DWORD old_prot; BOOL success;
- trace( "exception: %08x flags:%x addr:%p info[0]:%ld info[1]:%p\n", + trace( "exception: %08lx flags:%lx addr:%p info[0]:%ld info[1]:%p\n", rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionAddress, rec->ExceptionInformation[0], (void *)rec->ExceptionInformation[1] );
- ok( rec->NumberParameters == 2, "NumberParameters is %d instead of 2\n", rec->NumberParameters ); + ok( rec->NumberParameters == 2, "NumberParameters is %ld instead of 2\n", rec->NumberParameters ); ok( rec->ExceptionCode == STATUS_ACCESS_VIOLATION, - "ExceptionCode is %08x instead of STATUS_ACCESS_VIOLATION\n", rec->ExceptionCode ); + "ExceptionCode is %08lx instead of STATUS_ACCESS_VIOLATION\n", rec->ExceptionCode );
if (rec->ExceptionCode == STATUS_ACCESS_VIOLATION) InterlockedIncrement( &num_execute_fault_calls ); @@ -2561,8 +2562,8 @@ static LONG CALLBACK execute_fault_vec_handler( EXCEPTION_POINTERS *ExceptionInf return EXCEPTION_CONTINUE_SEARCH;
success = VirtualProtect( (void *)rec->ExceptionInformation[1], 16, PAGE_EXECUTE_READWRITE, &old_prot ); - ok( success, "VirtualProtect failed %u\n", GetLastError() ); - ok( old_prot == PAGE_NOACCESS, "wrong old prot %x\n", old_prot ); + ok( success, "VirtualProtect failed %lu\n", GetLastError() ); + ok( old_prot == PAGE_NOACCESS, "wrong old prot %lx\n", old_prot );
return EXCEPTION_CONTINUE_EXECUTION; } @@ -2615,7 +2616,7 @@ static LRESULT CALLBACK atl_test_func( HWND hWnd, UINT uMsg, WPARAM wParam, LPAR { DWORD arg = (DWORD)hWnd; if (uMsg == WM_USER) - ok( arg == 0x11223344, "arg is 0x%08x instead of 0x11223344\n", arg ); + ok( arg == 0x11223344, "arg is 0x%08lx instead of 0x11223344\n", arg ); else ok( arg != 0x11223344, "arg is unexpectedly 0x11223344\n" ); return 43; @@ -2645,7 +2646,7 @@ static void test_atl_thunk_emulation( ULONG dep_flags ) char *base; HWND hWnd;
- trace( "Running DEP tests with ProcessExecuteFlags = %d\n", dep_flags ); + trace( "Running DEP tests with ProcessExecuteFlags = %ld\n", dep_flags );
NtQueryInformationProcess( GetCurrentProcess(), ProcessExecuteFlags, &old_flags, sizeof(old_flags), NULL ); if (old_flags != dep_flags) @@ -2654,16 +2655,16 @@ static void test_atl_thunk_emulation( ULONG dep_flags ) if (ret == STATUS_INVALID_INFO_CLASS /* Windows 2000 */ || ret == STATUS_ACCESS_DENIED) { - win_skip( "Skipping DEP tests with ProcessExecuteFlags = %d\n", dep_flags ); + win_skip( "Skipping DEP tests with ProcessExecuteFlags = %ld\n", dep_flags ); return; } - ok( !ret, "NtSetInformationProcess failed with status %08x\n", ret ); + ok( !ret, "NtSetInformationProcess failed with status %08lx\n", ret ); restore_flags = TRUE; }
size = 0x1000; base = VirtualAlloc( 0, size, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE ); - ok( base != NULL, "VirtualAlloc failed %u\n", GetLastError() ); + ok( base != NULL, "VirtualAlloc failed %lu\n", GetLastError() );
/* Check result of GetProcessDEPPolicy */ if (!pGetProcessDEPPolicy) @@ -2684,10 +2685,10 @@ static void test_atl_thunk_emulation( ULONG dep_flags ) *(DWORD *)(base + 6) = (DWORD_PTR)pGetProcessDEPPolicy - (DWORD_PTR)(base + 10);
success = VirtualProtect( base, size, PAGE_EXECUTE_READWRITE, &old_prot ); - ok( success, "VirtualProtect failed %u\n", GetLastError() ); + ok( success, "VirtualProtect failed %lu\n", GetLastError() );
success = get_dep_policy( GetCurrentProcess(), &policy_flags, &policy_permanent ); - ok( success, "GetProcessDEPPolicy failed %u\n", GetLastError() ); + ok( success, "GetProcessDEPPolicy failed %lu\n", GetLastError() );
ret = 0; if (dep_flags & MEM_EXECUTE_OPTION_DISABLE) @@ -2695,7 +2696,7 @@ static void test_atl_thunk_emulation( ULONG dep_flags ) if (dep_flags & MEM_EXECUTE_OPTION_DISABLE_THUNK_EMULATION) ret |= PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION;
- ok( policy_flags == ret, "expected policy flags %d, got %d\n", ret, policy_flags ); + ok( policy_flags == ret, "expected policy flags %ld, got %ld\n", ret, policy_flags ); ok( !policy_permanent || broken(policy_permanent == 0x44), "expected policy permanent FALSE, got %d\n", policy_permanent ); } @@ -2710,7 +2711,7 @@ static void test_atl_thunk_emulation( ULONG dep_flags ) * prevent crashes while creating the window. */
success = VirtualProtect( base, size, PAGE_EXECUTE_READWRITE, &old_prot ); - ok( success, "VirtualProtect failed %u\n", GetLastError() ); + ok( success, "VirtualProtect failed %lu\n", GetLastError() );
memset( &wc, 0, sizeof(wc) ); wc.cbSize = sizeof(wc); @@ -2721,56 +2722,56 @@ static void test_atl_thunk_emulation( ULONG dep_flags ) wc.lpszClassName = cls_name; wc.lpfnWndProc = (WNDPROC)base; success = RegisterClassExA(&wc) != 0; - ok( success, "RegisterClassExA failed %u\n", GetLastError() ); + ok( success, "RegisterClassExA failed %lu\n", GetLastError() );
hWnd = CreateWindowExA(0, cls_name, "Test", WS_TILEDWINDOW, 0, 0, 640, 480, 0, 0, 0, 0); - ok( hWnd != 0, "CreateWindowExA failed %u\n", GetLastError() ); + ok( hWnd != 0, "CreateWindowExA failed %lu\n", GetLastError() );
ret = SendMessageA(hWnd, WM_USER, 0, 0); - ok( ret == 42, "SendMessage returned unexpected result %d\n", ret ); + ok( ret == 42, "SendMessage returned unexpected result %ld\n", ret );
/* At first try with an instruction which is not recognized as proper ATL thunk * by the Windows ATL Thunk Emulator. Removing execute permissions will lead to * STATUS_ACCESS_VIOLATION exceptions when DEP is enabled. */
success = VirtualProtect( base, size, PAGE_READWRITE, &old_prot ); - ok( success, "VirtualProtect failed %u\n", GetLastError() ); + ok( success, "VirtualProtect failed %lu\n", GetLastError() );
ret = send_message_excpt( hWnd, WM_USER, 0, 0 ); - ok( ret == 42, "call returned wrong result, expected 42, got %d\n", ret ); - ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %d exceptions\n", num_guard_page_calls ); + ok( ret == 42, "call returned wrong result, expected 42, got %ld\n", ret ); + ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %ld exceptions\n", num_guard_page_calls ); if ((dep_flags & MEM_EXECUTE_OPTION_DISABLE) && !IsProcessorFeaturePresent( PF_NX_ENABLED )) { trace( "DEP hardware support is not available\n" ); - ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls ); dep_flags = MEM_EXECUTE_OPTION_ENABLE; } else if (dep_flags & MEM_EXECUTE_OPTION_DISABLE) { trace( "DEP hardware support is available\n" ); - ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls ); } else - ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls );
/* Now a bit more complicated, the page containing the code is protected with * PAGE_GUARD memory protection. */
success = VirtualProtect( base, size, PAGE_READWRITE | PAGE_GUARD, &old_prot ); - ok( success, "VirtualProtect failed %u\n", GetLastError() ); + ok( success, "VirtualProtect failed %lu\n", GetLastError() );
ret = send_message_excpt( hWnd, WM_USER, 0, 0 ); - ok( ret == 42, "call returned wrong result, expected 42, got %d\n", ret ); - ok( num_guard_page_calls == 1, "expected one STATUS_GUARD_PAGE_VIOLATION exception, got %d exceptions\n", num_guard_page_calls ); + ok( ret == 42, "call returned wrong result, expected 42, got %ld\n", ret ); + ok( num_guard_page_calls == 1, "expected one STATUS_GUARD_PAGE_VIOLATION exception, got %ld exceptions\n", num_guard_page_calls ); if (dep_flags & MEM_EXECUTE_OPTION_DISABLE) - ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls ); else - ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls );
ret = send_message_excpt( hWnd, WM_USER, 0, 0 ); - ok( ret == 42, "call returned wrong result, expected 42, got %d\n", ret ); - ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %d exceptions\n", num_guard_page_calls ); - ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( ret == 42, "call returned wrong result, expected 42, got %ld\n", ret ); + ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %ld exceptions\n", num_guard_page_calls ); + ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls );
/* Now test with a proper ATL thunk instruction. */
@@ -2778,43 +2779,43 @@ static void test_atl_thunk_emulation( ULONG dep_flags ) *(DWORD *)(base + 9) = (DWORD_PTR)atl_test_func - (DWORD_PTR)(base + 13);
success = VirtualProtect( base, size, PAGE_EXECUTE_READWRITE, &old_prot ); - ok( success, "VirtualProtect failed %u\n", GetLastError() ); + ok( success, "VirtualProtect failed %lu\n", GetLastError() );
ret = SendMessageA(hWnd, WM_USER, 0, 0); - ok( ret == 43, "SendMessage returned unexpected result %d\n", ret ); + ok( ret == 43, "SendMessage returned unexpected result %ld\n", ret );
/* Try executing with PAGE_READWRITE protection. */
success = VirtualProtect( base, size, PAGE_READWRITE, &old_prot ); - ok( success, "VirtualProtect failed %u\n", GetLastError() ); + ok( success, "VirtualProtect failed %lu\n", GetLastError() );
ret = send_message_excpt( hWnd, WM_USER, 0, 0 ); - ok( ret == 43, "call returned wrong result, expected 43, got %d\n", ret ); - ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %d exceptions\n", num_guard_page_calls ); + ok( ret == 43, "call returned wrong result, expected 43, got %ld\n", ret ); + ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %ld exceptions\n", num_guard_page_calls ); if ((dep_flags & MEM_EXECUTE_OPTION_DISABLE) && (dep_flags & MEM_EXECUTE_OPTION_DISABLE_THUNK_EMULATION)) - ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls ); else - ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls );
/* Now a bit more complicated, the page containing the code is protected with * PAGE_GUARD memory protection. */
success = VirtualProtect( base, size, PAGE_READWRITE | PAGE_GUARD, &old_prot ); - ok( success, "VirtualProtect failed %u\n", GetLastError() ); + ok( success, "VirtualProtect failed %lu\n", GetLastError() );
/* the same, but with PAGE_GUARD set */ ret = send_message_excpt( hWnd, WM_USER, 0, 0 ); - ok( ret == 43, "call returned wrong result, expected 43, got %d\n", ret ); - ok( num_guard_page_calls == 1, "expected one STATUS_GUARD_PAGE_VIOLATION exception, got %d exceptions\n", num_guard_page_calls ); + ok( ret == 43, "call returned wrong result, expected 43, got %ld\n", ret ); + ok( num_guard_page_calls == 1, "expected one STATUS_GUARD_PAGE_VIOLATION exception, got %ld exceptions\n", num_guard_page_calls ); if ((dep_flags & MEM_EXECUTE_OPTION_DISABLE) && (dep_flags & MEM_EXECUTE_OPTION_DISABLE_THUNK_EMULATION)) - ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls ); else - ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls );
ret = send_message_excpt( hWnd, WM_USER, 0, 0 ); - ok( ret == 43, "call returned wrong result, expected 43, got %d\n", ret ); - ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %d exceptions\n", num_guard_page_calls ); - ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( ret == 43, "call returned wrong result, expected 43, got %ld\n", ret ); + ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %ld exceptions\n", num_guard_page_calls ); + ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls );
/* The following test shows that on Windows, even a vectored exception handler * cannot intercept internal exceptions thrown by the ATL thunk emulation layer. */ @@ -2826,7 +2827,7 @@ static void test_atl_thunk_emulation( ULONG dep_flags ) PVOID vectored_handler;
success = VirtualProtect( base, size, PAGE_NOACCESS, &old_prot ); - ok( success, "VirtualProtect failed %u\n", GetLastError() ); + ok( success, "VirtualProtect failed %lu\n", GetLastError() );
vectored_handler = pRtlAddVectoredExceptionHandler( TRUE, &execute_fault_vec_handler ); ok( vectored_handler != 0, "RtlAddVectoredExceptionHandler failed\n" ); @@ -2835,8 +2836,8 @@ static void test_atl_thunk_emulation( ULONG dep_flags )
pRtlRemoveVectoredExceptionHandler( vectored_handler );
- ok( ret == 43, "call returned wrong result, expected 43, got %d\n", ret ); - ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( ret == 43, "call returned wrong result, expected 43, got %ld\n", ret ); + ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls ); } else win_skip( "RtlAddVectoredExceptionHandler or RtlRemoveVectoredExceptionHandler not found\n" ); @@ -2848,67 +2849,67 @@ static void test_atl_thunk_emulation( ULONG dep_flags ) *(DWORD *)(base + 6) = (DWORD_PTR)atl_test_func - (DWORD_PTR)(base + 10);
success = VirtualProtect( base, size, PAGE_READWRITE, &old_prot ); - ok( success, "VirtualProtect failed %u\n", GetLastError() ); + ok( success, "VirtualProtect failed %lu\n", GetLastError() );
ret = send_message_excpt( hWnd, WM_USER + 1, 0, 0 ); /* FIXME: we don't check the content of the register ECX yet */ - ok( ret == 43, "call returned wrong result, expected 43, got %d\n", ret ); - ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %d exceptions\n", num_guard_page_calls ); + ok( ret == 43, "call returned wrong result, expected 43, got %ld\n", ret ); + ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %ld exceptions\n", num_guard_page_calls ); if ((dep_flags & MEM_EXECUTE_OPTION_DISABLE) && (dep_flags & MEM_EXECUTE_OPTION_DISABLE_THUNK_EMULATION)) - ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls ); else - ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls );
memcpy( base, code_atl3, sizeof(code_atl3) ); *(DWORD *)(base + 6) = (DWORD_PTR)atl_test_func;
success = VirtualProtect( base, size, PAGE_READWRITE, &old_prot ); - ok( success, "VirtualProtect failed %u\n", GetLastError() ); + ok( success, "VirtualProtect failed %lu\n", GetLastError() );
ret = send_message_excpt( hWnd, WM_USER + 1, 0, 0 ); /* FIXME: we don't check the content of the registers ECX/EDX yet */ - ok( ret == 43, "call returned wrong result, expected 43, got %d\n", ret ); - ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %d exceptions\n", num_guard_page_calls ); + ok( ret == 43, "call returned wrong result, expected 43, got %ld\n", ret ); + ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %ld exceptions\n", num_guard_page_calls ); if ((dep_flags & MEM_EXECUTE_OPTION_DISABLE) && (dep_flags & MEM_EXECUTE_OPTION_DISABLE_THUNK_EMULATION)) - ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls ); else - ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls );
memcpy( base, code_atl4, sizeof(code_atl4) ); *(DWORD *)(base + 6) = (DWORD_PTR)atl_test_func;
success = VirtualProtect( base, size, PAGE_READWRITE, &old_prot ); - ok( success, "VirtualProtect failed %u\n", GetLastError() ); + ok( success, "VirtualProtect failed %lu\n", GetLastError() );
ret = send_message_excpt( hWnd, WM_USER + 1, 0, 0 ); /* FIXME: We don't check the content of the registers EAX/ECX yet */ - ok( ret == 43, "call returned wrong result, expected 43, got %d\n", ret ); - ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %d exceptions\n", num_guard_page_calls ); + ok( ret == 43, "call returned wrong result, expected 43, got %ld\n", ret ); + ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %ld exceptions\n", num_guard_page_calls ); if ((dep_flags & MEM_EXECUTE_OPTION_DISABLE) && (dep_flags & MEM_EXECUTE_OPTION_DISABLE_THUNK_EMULATION)) - ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls ); else if (dep_flags & MEM_EXECUTE_OPTION_DISABLE) ok( num_execute_fault_calls == 0 || broken(num_execute_fault_calls == 1) /* Windows XP */, - "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + "expected no STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls ); else - ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls );
memcpy( base, code_atl5, sizeof(code_atl5) );
success = VirtualProtect( base, size, PAGE_READWRITE, &old_prot ); - ok( success, "VirtualProtect failed %u\n", GetLastError() ); + ok( success, "VirtualProtect failed %lu\n", GetLastError() );
results[1] = atl5_test_func; ret = call_proc_excpt( (void *)base, results ); /* FIXME: We don't check the content of the registers EAX/ECX yet */ - ok( ret == 44, "call returned wrong result, expected 44, got %d\n", ret ); - ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %d exceptions\n", num_guard_page_calls ); + ok( ret == 44, "call returned wrong result, expected 44, got %ld\n", ret ); + ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %ld exceptions\n", num_guard_page_calls ); if ((dep_flags & MEM_EXECUTE_OPTION_DISABLE) && (dep_flags & MEM_EXECUTE_OPTION_DISABLE_THUNK_EMULATION)) - ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls ); else if (dep_flags & MEM_EXECUTE_OPTION_DISABLE) ok( num_execute_fault_calls == 0 || broken(num_execute_fault_calls == 1) /* Windows XP */, - "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + "expected no STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls ); else - ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls );
/* Restore the JMP instruction, set to executable, and then destroy the Window */
@@ -2916,12 +2917,12 @@ static void test_atl_thunk_emulation( ULONG dep_flags ) *(DWORD *)(base + 1) = (DWORD_PTR)jmp_test_func - (DWORD_PTR)(base + 5);
success = VirtualProtect( base, size, PAGE_EXECUTE_READWRITE, &old_prot ); - ok( success, "VirtualProtect failed %u\n", GetLastError() ); + ok( success, "VirtualProtect failed %lu\n", GetLastError() );
DestroyWindow( hWnd );
success = UnregisterClassA( cls_name, GetModuleHandleA(0) ); - ok( success, "UnregisterClass failed %u\n", GetLastError() ); + ok( success, "UnregisterClass failed %lu\n", GetLastError() );
VirtualFree( base, 0, MEM_RELEASE );
@@ -2933,11 +2934,11 @@ static void test_atl_thunk_emulation( ULONG dep_flags ) win_skip( "MEM_WRITE_WATCH not supported\n" ); goto out; } - ok( base != NULL, "VirtualAlloc failed %u\n", GetLastError() ); + ok( base != NULL, "VirtualAlloc failed %lu\n", GetLastError() );
count = 64; ret = pGetWriteWatch( WRITE_WATCH_FLAG_RESET, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); ok( count == 0, "wrong count %lu\n", count );
memcpy( base, code_jmp, sizeof(code_jmp) ); @@ -2945,14 +2946,14 @@ static void test_atl_thunk_emulation( ULONG dep_flags )
count = 64; ret = pGetWriteWatch( WRITE_WATCH_FLAG_RESET, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); ok( count == 1, "wrong count %lu\n", count ); ok( results[0] == base, "wrong result %p\n", results[0] );
/* Create a new window class and associated Window (see above) */
success = VirtualProtect( base, size, PAGE_EXECUTE_READWRITE, &old_prot ); - ok( success, "VirtualProtect failed %u\n", GetLastError() ); + ok( success, "VirtualProtect failed %lu\n", GetLastError() );
memset( &wc, 0, sizeof(wc) ); wc.cbSize = sizeof(wc); @@ -2963,17 +2964,17 @@ static void test_atl_thunk_emulation( ULONG dep_flags ) wc.lpszClassName = cls_name; wc.lpfnWndProc = (WNDPROC)base; success = RegisterClassExA(&wc) != 0; - ok( success, "RegisterClassExA failed %u\n", GetLastError() ); + ok( success, "RegisterClassExA failed %lu\n", GetLastError() );
hWnd = CreateWindowExA(0, cls_name, "Test", WS_TILEDWINDOW, 0, 0, 640, 480, 0, 0, 0, 0); - ok( hWnd != 0, "CreateWindowExA failed %u\n", GetLastError() ); + ok( hWnd != 0, "CreateWindowExA failed %lu\n", GetLastError() );
ret = SendMessageA(hWnd, WM_USER, 0, 0); - ok( ret == 42, "SendMessage returned unexpected result %d\n", ret ); + ok( ret == 42, "SendMessage returned unexpected result %ld\n", ret );
count = 64; ret = pGetWriteWatch( WRITE_WATCH_FLAG_RESET, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); ok( count == 0, "wrong count %lu\n", count );
/* At first try with an instruction which is not recognized as proper ATL thunk @@ -2981,48 +2982,48 @@ static void test_atl_thunk_emulation( ULONG dep_flags ) * STATUS_ACCESS_VIOLATION exceptions when DEP is enabled. */
success = VirtualProtect( base, size, PAGE_READWRITE, &old_prot ); - ok( success, "VirtualProtect failed %u\n", GetLastError() ); + ok( success, "VirtualProtect failed %lu\n", GetLastError() );
ret = send_message_excpt( hWnd, WM_USER, 0, 0 ); - ok( ret == 42, "call returned wrong result, expected 42, got %d\n", ret ); - ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %d exceptions\n", num_guard_page_calls ); + ok( ret == 42, "call returned wrong result, expected 42, got %ld\n", ret ); + ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %ld exceptions\n", num_guard_page_calls ); if (dep_flags & MEM_EXECUTE_OPTION_DISABLE) - ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls ); else - ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls );
count = 64; ret = pGetWriteWatch( WRITE_WATCH_FLAG_RESET, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); ok( count == 0, "wrong count %lu\n", count );
ret = send_message_excpt( hWnd, WM_USER, 0, 0 ); - ok( ret == 42, "call returned wrong result, expected 42, got %d\n", ret ); - ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %d exceptions\n", num_guard_page_calls ); - ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( ret == 42, "call returned wrong result, expected 42, got %ld\n", ret ); + ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %ld exceptions\n", num_guard_page_calls ); + ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls );
/* Now a bit more complicated, the page containing the code is protected with * PAGE_GUARD memory protection. */
success = VirtualProtect( base, size, PAGE_READWRITE | PAGE_GUARD, &old_prot ); - ok( success, "VirtualProtect failed %u\n", GetLastError() ); + ok( success, "VirtualProtect failed %lu\n", GetLastError() );
ret = send_message_excpt( hWnd, WM_USER, 0, 0 ); - ok( ret == 42, "call returned wrong result, expected 42, got %d\n", ret ); - ok( num_guard_page_calls == 1, "expected one STATUS_GUARD_PAGE_VIOLATION exception, got %d exceptions\n", num_guard_page_calls ); + ok( ret == 42, "call returned wrong result, expected 42, got %ld\n", ret ); + ok( num_guard_page_calls == 1, "expected one STATUS_GUARD_PAGE_VIOLATION exception, got %ld exceptions\n", num_guard_page_calls ); if (dep_flags & MEM_EXECUTE_OPTION_DISABLE) - ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls ); else - ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls );
ret = send_message_excpt( hWnd, WM_USER, 0, 0 ); - ok( ret == 42, "call returned wrong result, expected 42, got %d\n", ret ); - ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %d exceptions\n", num_guard_page_calls ); - ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( ret == 42, "call returned wrong result, expected 42, got %ld\n", ret ); + ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %ld exceptions\n", num_guard_page_calls ); + ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls );
count = 64; ret = pGetWriteWatch( WRITE_WATCH_FLAG_RESET, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); ok( count == 0 || broken(count == 1) /* Windows 8 */, "wrong count %lu\n", count );
/* Now test with a proper ATL thunk instruction. */ @@ -3032,62 +3033,62 @@ static void test_atl_thunk_emulation( ULONG dep_flags )
count = 64; ret = pGetWriteWatch( WRITE_WATCH_FLAG_RESET, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); ok( count == 1, "wrong count %lu\n", count ); ok( results[0] == base, "wrong result %p\n", results[0] );
success = VirtualProtect( base, size, PAGE_EXECUTE_READWRITE, &old_prot ); - ok( success, "VirtualProtect failed %u\n", GetLastError() ); + ok( success, "VirtualProtect failed %lu\n", GetLastError() );
ret = SendMessageA(hWnd, WM_USER, 0, 0); - ok( ret == 43, "SendMessage returned unexpected result %d\n", ret ); + ok( ret == 43, "SendMessage returned unexpected result %ld\n", ret );
/* Try executing with PAGE_READWRITE protection. */
success = VirtualProtect( base, size, PAGE_READWRITE, &old_prot ); - ok( success, "VirtualProtect failed %u\n", GetLastError() ); + ok( success, "VirtualProtect failed %lu\n", GetLastError() );
ret = send_message_excpt( hWnd, WM_USER, 0, 0 ); - ok( ret == 43, "call returned wrong result, expected 43, got %d\n", ret ); - ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %d exceptions\n", num_guard_page_calls ); + ok( ret == 43, "call returned wrong result, expected 43, got %ld\n", ret ); + ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %ld exceptions\n", num_guard_page_calls ); if ((dep_flags & MEM_EXECUTE_OPTION_DISABLE) && (dep_flags & MEM_EXECUTE_OPTION_DISABLE_THUNK_EMULATION)) - ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls ); else - ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls );
count = 64; ret = pGetWriteWatch( WRITE_WATCH_FLAG_RESET, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); ok( count == 0, "wrong count %lu\n", count );
ret = send_message_excpt( hWnd, WM_USER, 0, 0 ); - ok( ret == 43, "call returned wrong result, expected 43, got %d\n", ret ); - ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %d exceptions\n", num_guard_page_calls ); - ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( ret == 43, "call returned wrong result, expected 43, got %ld\n", ret ); + ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %ld exceptions\n", num_guard_page_calls ); + ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls );
/* Now a bit more complicated, the page containing the code is protected with * PAGE_GUARD memory protection. */
success = VirtualProtect( base, size, PAGE_READWRITE | PAGE_GUARD, &old_prot ); - ok( success, "VirtualProtect failed %u\n", GetLastError() ); + ok( success, "VirtualProtect failed %lu\n", GetLastError() );
/* the same, but with PAGE_GUARD set */ ret = send_message_excpt( hWnd, WM_USER, 0, 0 ); - ok( ret == 43, "call returned wrong result, expected 43, got %d\n", ret ); - ok( num_guard_page_calls == 1, "expected one STATUS_GUARD_PAGE_VIOLATION exception, got %d exceptions\n", num_guard_page_calls ); + ok( ret == 43, "call returned wrong result, expected 43, got %ld\n", ret ); + ok( num_guard_page_calls == 1, "expected one STATUS_GUARD_PAGE_VIOLATION exception, got %ld exceptions\n", num_guard_page_calls ); if ((dep_flags & MEM_EXECUTE_OPTION_DISABLE) && (dep_flags & MEM_EXECUTE_OPTION_DISABLE_THUNK_EMULATION)) - ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls ); else - ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls );
ret = send_message_excpt( hWnd, WM_USER, 0, 0 ); - ok( ret == 43, "call returned wrong result, expected 43, got %d\n", ret ); - ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %d exceptions\n", num_guard_page_calls ); - ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( ret == 43, "call returned wrong result, expected 43, got %ld\n", ret ); + ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %ld exceptions\n", num_guard_page_calls ); + ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %ld exceptions\n", num_execute_fault_calls );
count = 64; ret = pGetWriteWatch( WRITE_WATCH_FLAG_RESET, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); ok( count == 0 || broken(count == 1) /* Windows 8 */, "wrong count %lu\n", count );
/* Restore the JMP instruction, set to executable, and then destroy the Window */ @@ -3097,17 +3098,17 @@ static void test_atl_thunk_emulation( ULONG dep_flags )
count = 64; ret = pGetWriteWatch( WRITE_WATCH_FLAG_RESET, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); + ok( !ret, "GetWriteWatch failed %lu\n", GetLastError() ); ok( count == 1, "wrong count %lu\n", count ); ok( results[0] == base, "wrong result %p\n", results[0] );
success = VirtualProtect( base, size, PAGE_EXECUTE_READWRITE, &old_prot ); - ok( success, "VirtualProtect failed %u\n", GetLastError() ); + ok( success, "VirtualProtect failed %lu\n", GetLastError() );
DestroyWindow( hWnd );
success = UnregisterClassA( cls_name, GetModuleHandleA(0) ); - ok( success, "UnregisterClass failed %u\n", GetLastError() ); + ok( success, "UnregisterClass failed %lu\n", GetLastError() );
VirtualFree( base, 0, MEM_RELEASE );
@@ -3115,7 +3116,7 @@ out: if (restore_flags) { ret = NtSetInformationProcess( GetCurrentProcess(), ProcessExecuteFlags, &old_flags, sizeof(old_flags) ); - ok( !ret, "NtSetInformationProcess failed with status %08x\n", ret ); + ok( !ret, "NtSetInformationProcess failed with status %08lx\n", ret ); } }
@@ -3170,74 +3171,74 @@ static void test_VirtualProtect(void)
SetLastError(0xdeadbeef); base = VirtualAlloc(0, si.dwPageSize, MEM_RESERVE | MEM_COMMIT, PAGE_NOACCESS); - ok(base != NULL, "VirtualAlloc failed %d\n", GetLastError()); + ok(base != NULL, "VirtualAlloc failed %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = VirtualProtect(base, si.dwPageSize, PAGE_READONLY, NULL); ok(!ret, "VirtualProtect should fail\n"); - ok(GetLastError() == ERROR_NOACCESS, "expected ERROR_NOACCESS, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_NOACCESS, "expected ERROR_NOACCESS, got %ld\n", GetLastError()); old_prot = 0xdeadbeef; ret = VirtualProtect(base, si.dwPageSize, PAGE_NOACCESS, &old_prot); - ok(ret, "VirtualProtect failed %d\n", GetLastError()); - ok(old_prot == PAGE_NOACCESS, "got %#x != expected PAGE_NOACCESS\n", old_prot); + ok(ret, "VirtualProtect failed %ld\n", GetLastError()); + ok(old_prot == PAGE_NOACCESS, "got %#lx != expected PAGE_NOACCESS\n", old_prot);
addr = base; size = si.dwPageSize; status = pNtProtectVirtualMemory(GetCurrentProcess(), &addr, &size, PAGE_READONLY, NULL); - ok(status == STATUS_ACCESS_VIOLATION, "NtProtectVirtualMemory should fail, got %08x\n", status); + ok(status == STATUS_ACCESS_VIOLATION, "NtProtectVirtualMemory should fail, got %08lx\n", status); addr = base; size = si.dwPageSize; old_prot = 0xdeadbeef; status = pNtProtectVirtualMemory(GetCurrentProcess(), &addr, &size, PAGE_NOACCESS, &old_prot); - ok(status == STATUS_SUCCESS, "NtProtectVirtualMemory should succeed, got %08x\n", status); - ok(old_prot == PAGE_NOACCESS, "got %#x != expected PAGE_NOACCESS\n", old_prot); + ok(status == STATUS_SUCCESS, "NtProtectVirtualMemory should succeed, got %08lx\n", status); + ok(old_prot == PAGE_NOACCESS, "got %#lx != expected PAGE_NOACCESS\n", old_prot);
for (i = 0; i < ARRAY_SIZE(td); i++) { SetLastError(0xdeadbeef); ret = VirtualQuery(base, &info, sizeof(info)); - ok(ret, "VirtualQuery failed %d\n", GetLastError()); - ok(info.BaseAddress == base, "%d: got %p != expected %p\n", i, info.BaseAddress, base); - ok(info.RegionSize == si.dwPageSize, "%d: got %#lx != expected %#x\n", i, info.RegionSize, si.dwPageSize); - ok(info.Protect == PAGE_NOACCESS, "%d: got %#x != expected PAGE_NOACCESS\n", i, info.Protect); - ok(info.AllocationBase == base, "%d: %p != %p\n", i, info.AllocationBase, base); - ok(info.AllocationProtect == PAGE_NOACCESS, "%d: %#x != PAGE_NOACCESS\n", i, info.AllocationProtect); - ok(info.State == MEM_COMMIT, "%d: %#x != MEM_COMMIT\n", i, info.State); - ok(info.Type == MEM_PRIVATE, "%d: %#x != MEM_PRIVATE\n", i, info.Type); + ok(ret, "VirtualQuery failed %ld\n", GetLastError()); + ok(info.BaseAddress == base, "%ld: got %p != expected %p\n", i, info.BaseAddress, base); + ok(info.RegionSize == si.dwPageSize, "%ld: got %#Ix != expected %#lx\n", i, info.RegionSize, si.dwPageSize); + ok(info.Protect == PAGE_NOACCESS, "%ld: got %#lx != expected PAGE_NOACCESS\n", i, info.Protect); + ok(info.AllocationBase == base, "%ld: %p != %p\n", i, info.AllocationBase, base); + ok(info.AllocationProtect == PAGE_NOACCESS, "%ld: %#lx != PAGE_NOACCESS\n", i, info.AllocationProtect); + ok(info.State == MEM_COMMIT, "%ld: %#lx != MEM_COMMIT\n", i, info.State); + ok(info.Type == MEM_PRIVATE, "%ld: %#lx != MEM_PRIVATE\n", i, info.Type);
old_prot = 0xdeadbeef; SetLastError(0xdeadbeef); ret = VirtualProtect(base, si.dwPageSize, td[i].prot_set, &old_prot); if (td[i].prot_get) { - ok(ret, "%d: VirtualProtect error %d\n", i, GetLastError()); - ok(old_prot == PAGE_NOACCESS, "%d: got %#x != expected PAGE_NOACCESS\n", i, old_prot); + ok(ret, "%ld: VirtualProtect error %ld\n", i, GetLastError()); + ok(old_prot == PAGE_NOACCESS, "%ld: got %#lx != expected PAGE_NOACCESS\n", i, old_prot);
SetLastError(0xdeadbeef); ret = VirtualQuery(base, &info, sizeof(info)); - ok(ret, "VirtualQuery failed %d\n", GetLastError()); - ok(info.BaseAddress == base, "%d: got %p != expected %p\n", i, info.BaseAddress, base); - ok(info.RegionSize == si.dwPageSize, "%d: got %#lx != expected %#x\n", i, info.RegionSize, si.dwPageSize); - ok(info.Protect == td[i].prot_get, "%d: got %#x != expected %#x\n", i, info.Protect, td[i].prot_get); - ok(info.AllocationBase == base, "%d: %p != %p\n", i, info.AllocationBase, base); - ok(info.AllocationProtect == PAGE_NOACCESS, "%d: %#x != PAGE_NOACCESS\n", i, info.AllocationProtect); - ok(info.State == MEM_COMMIT, "%d: %#x != MEM_COMMIT\n", i, info.State); - ok(info.Type == MEM_PRIVATE, "%d: %#x != MEM_PRIVATE\n", i, info.Type); + ok(ret, "VirtualQuery failed %ld\n", GetLastError()); + ok(info.BaseAddress == base, "%ld: got %p != expected %p\n", i, info.BaseAddress, base); + ok(info.RegionSize == si.dwPageSize, "%ld: got %#Ix != expected %#lx\n", i, info.RegionSize, si.dwPageSize); + ok(info.Protect == td[i].prot_get, "%ld: got %#lx != expected %#lx\n", i, info.Protect, td[i].prot_get); + ok(info.AllocationBase == base, "%ld: %p != %p\n", i, info.AllocationBase, base); + ok(info.AllocationProtect == PAGE_NOACCESS, "%ld: %#lx != PAGE_NOACCESS\n", i, info.AllocationProtect); + ok(info.State == MEM_COMMIT, "%ld: %#lx != MEM_COMMIT\n", i, info.State); + ok(info.Type == MEM_PRIVATE, "%ld: %#lx != MEM_PRIVATE\n", i, info.Type); } else { - ok(!ret, "%d: VirtualProtect should fail\n", i); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "%d: expected ERROR_INVALID_PARAMETER, got %d\n", i, GetLastError()); + ok(!ret, "%ld: VirtualProtect should fail\n", i); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "%ld: expected ERROR_INVALID_PARAMETER, got %ld\n", i, GetLastError()); }
old_prot = 0xdeadbeef; SetLastError(0xdeadbeef); ret = VirtualProtect(base, si.dwPageSize, PAGE_NOACCESS, &old_prot); - ok(ret, "%d: VirtualProtect error %d\n", i, GetLastError()); + ok(ret, "%ld: VirtualProtect error %ld\n", i, GetLastError()); if (td[i].prot_get) - ok(old_prot == td[i].prot_get, "%d: got %#x != expected %#x\n", i, old_prot, td[i].prot_get); + ok(old_prot == td[i].prot_get, "%ld: got %#lx != expected %#lx\n", i, old_prot, td[i].prot_get); else - ok(old_prot == PAGE_NOACCESS, "%d: got %#x != expected PAGE_NOACCESS\n", i, old_prot); + ok(old_prot == PAGE_NOACCESS, "%ld: got %#lx != expected PAGE_NOACCESS\n", i, old_prot); }
exec_prot = 0; @@ -3254,19 +3255,19 @@ static void test_VirtualProtect(void) ptr = VirtualAlloc(base, si.dwPageSize, MEM_COMMIT, prot); if ((rw_prot && exec_prot) || (!rw_prot && !exec_prot)) { - ok(!ptr, "VirtualAlloc(%02x) should fail\n", prot); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(!ptr, "VirtualAlloc(%02lx) should fail\n", prot); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); } else { if (prot & (PAGE_WRITECOPY | PAGE_EXECUTE_WRITECOPY)) { - ok(!ptr, "VirtualAlloc(%02x) should fail\n", prot); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(!ptr, "VirtualAlloc(%02lx) should fail\n", prot); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); } else { - ok(ptr != NULL, "VirtualAlloc(%02x) error %d\n", prot, GetLastError()); + ok(ptr != NULL, "VirtualAlloc(%02lx) error %ld\n", prot, GetLastError()); ok(ptr == base, "expected %p, got %p\n", base, ptr); } } @@ -3275,18 +3276,18 @@ static void test_VirtualProtect(void) ret = VirtualProtect(base, si.dwPageSize, prot, &old_prot); if ((rw_prot && exec_prot) || (!rw_prot && !exec_prot)) { - ok(!ret, "VirtualProtect(%02x) should fail\n", prot); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(!ret, "VirtualProtect(%02lx) should fail\n", prot); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); } else { if (prot & (PAGE_WRITECOPY | PAGE_EXECUTE_WRITECOPY)) { - ok(!ret, "VirtualProtect(%02x) should fail\n", prot); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(!ret, "VirtualProtect(%02lx) should fail\n", prot); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); } else - ok(ret, "VirtualProtect(%02x) error %d\n", prot, GetLastError()); + ok(ret, "VirtualProtect(%02lx) error %ld\n", prot, GetLastError()); }
rw_prot = 1 << j; @@ -3365,18 +3366,18 @@ static void test_VirtualAlloc_protection(void)
if (td[i].success) { - ok(base != NULL, "%d: VirtualAlloc failed %d\n", i, GetLastError()); + ok(base != NULL, "%ld: VirtualAlloc failed %ld\n", i, GetLastError());
SetLastError(0xdeadbeef); ret = VirtualQuery(base, &info, sizeof(info)); - ok(ret, "VirtualQuery failed %d\n", GetLastError()); - ok(info.BaseAddress == base, "%d: got %p != expected %p\n", i, info.BaseAddress, base); - ok(info.RegionSize == si.dwPageSize, "%d: got %#lx != expected %#x\n", i, info.RegionSize, si.dwPageSize); - ok(info.Protect == td[i].prot, "%d: got %#x != expected %#x\n", i, info.Protect, td[i].prot); - ok(info.AllocationBase == base, "%d: %p != %p\n", i, info.AllocationBase, base); - ok(info.AllocationProtect == td[i].prot, "%d: %#x != %#x\n", i, info.AllocationProtect, td[i].prot); - ok(info.State == MEM_COMMIT, "%d: %#x != MEM_COMMIT\n", i, info.State); - ok(info.Type == MEM_PRIVATE, "%d: %#x != MEM_PRIVATE\n", i, info.Type); + ok(ret, "VirtualQuery failed %ld\n", GetLastError()); + ok(info.BaseAddress == base, "%ld: got %p != expected %p\n", i, info.BaseAddress, base); + ok(info.RegionSize == si.dwPageSize, "%ld: got %#Ix != expected %#lx\n", i, info.RegionSize, si.dwPageSize); + ok(info.Protect == td[i].prot, "%ld: got %#lx != expected %#lx\n", i, info.Protect, td[i].prot); + ok(info.AllocationBase == base, "%ld: %p != %p\n", i, info.AllocationBase, base); + ok(info.AllocationProtect == td[i].prot, "%ld: %#lx != %#lx\n", i, info.AllocationProtect, td[i].prot); + ok(info.State == MEM_COMMIT, "%ld: %#lx != MEM_COMMIT\n", i, info.State); + ok(info.Type == MEM_PRIVATE, "%ld: %#lx != MEM_PRIVATE\n", i, info.Type);
if (is_mem_writable(info.Protect)) { @@ -3384,20 +3385,20 @@ static void test_VirtualAlloc_protection(void)
SetLastError(0xdeadbeef); ret = VirtualQuery(base, &info, sizeof(info)); - ok(ret, "VirtualQuery failed %d\n", GetLastError()); - ok(info.Protect == td[i].prot, "%d: got %#x != expected %#x\n", i, info.Protect, td[i].prot); + ok(ret, "VirtualQuery failed %ld\n", GetLastError()); + ok(info.Protect == td[i].prot, "%ld: got %#lx != expected %#lx\n", i, info.Protect, td[i].prot); }
SetLastError(0xdeadbeef); ptr = VirtualAlloc(base, si.dwPageSize, MEM_COMMIT, td[i].prot); - ok(ptr == base, "%d: VirtualAlloc failed %d\n", i, GetLastError()); + ok(ptr == base, "%ld: VirtualAlloc failed %ld\n", i, GetLastError());
VirtualFree(base, 0, MEM_RELEASE); } else { - ok(!base, "%d: VirtualAlloc should fail\n", i); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "%d: expected ERROR_INVALID_PARAMETER, got %d\n", i, GetLastError()); + ok(!base, "%ld: VirtualAlloc should fail\n", i); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "%ld: expected ERROR_INVALID_PARAMETER, got %ld\n", i, GetLastError()); } } } @@ -3457,7 +3458,7 @@ static void test_CreateFileMapping_protection(void)
SetLastError(0xdeadbeef); hfile = CreateFileA(file_name, GENERIC_READ|GENERIC_WRITE|GENERIC_EXECUTE, 0, NULL, CREATE_ALWAYS, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "CreateFile(%s) error %d\n", file_name, GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "CreateFile(%s) error %ld\n", file_name, GetLastError()); SetFilePointer(hfile, si.dwPageSize, NULL, FILE_BEGIN); SetEndOfFile(hfile);
@@ -3470,51 +3471,51 @@ static void test_CreateFileMapping_protection(void) { if (!hmap) { - trace("%d: CreateFileMapping(%04x) failed: %d\n", i, td[i].prot, GetLastError()); + trace("%ld: CreateFileMapping(%04lx) failed: %ld\n", i, td[i].prot, GetLastError()); /* NT4 and win2k don't support EXEC on file mappings */ if (td[i].prot == PAGE_EXECUTE_READ || td[i].prot == PAGE_EXECUTE_READWRITE) { page_exec_supported = FALSE; - ok(broken(!hmap), "%d: CreateFileMapping doesn't support PAGE_EXECUTE\n", i); + ok(broken(!hmap), "%ld: CreateFileMapping doesn't support PAGE_EXECUTE\n", i); continue; } /* Vista+ supports PAGE_EXECUTE_WRITECOPY, earlier versions don't */ if (td[i].prot == PAGE_EXECUTE_WRITECOPY) { page_exec_supported = FALSE; - ok(broken(!hmap), "%d: CreateFileMapping doesn't support PAGE_EXECUTE_WRITECOPY\n", i); + ok(broken(!hmap), "%ld: CreateFileMapping doesn't support PAGE_EXECUTE_WRITECOPY\n", i); continue; } } - ok(hmap != 0, "%d: CreateFileMapping(%04x) error %d\n", i, td[i].prot, GetLastError()); + ok(hmap != 0, "%ld: CreateFileMapping(%04lx) error %ld\n", i, td[i].prot, GetLastError());
base = MapViewOfFile(hmap, FILE_MAP_READ, 0, 0, 0); - ok(base != NULL, "%d: MapViewOfFile failed %d\n", i, GetLastError()); + ok(base != NULL, "%ld: MapViewOfFile failed %ld\n", i, GetLastError());
SetLastError(0xdeadbeef); ret = VirtualQuery(base, &info, sizeof(info)); - ok(ret, "VirtualQuery failed %d\n", GetLastError()); - ok(info.BaseAddress == base, "%d: got %p != expected %p\n", i, info.BaseAddress, base); - ok(info.RegionSize == si.dwPageSize, "%d: got %#lx != expected %#x\n", i, info.RegionSize, si.dwPageSize); - ok(info.Protect == PAGE_READONLY, "%d: got %#x != expected PAGE_READONLY\n", i, info.Protect); - ok(info.AllocationBase == base, "%d: %p != %p\n", i, info.AllocationBase, base); - ok(info.AllocationProtect == PAGE_READONLY, "%d: %#x != PAGE_READONLY\n", i, info.AllocationProtect); - ok(info.State == MEM_COMMIT, "%d: %#x != MEM_COMMIT\n", i, info.State); - ok(info.Type == MEM_MAPPED, "%d: %#x != MEM_MAPPED\n", i, info.Type); + ok(ret, "VirtualQuery failed %ld\n", GetLastError()); + ok(info.BaseAddress == base, "%ld: got %p != expected %p\n", i, info.BaseAddress, base); + ok(info.RegionSize == si.dwPageSize, "%ld: got %#Ix != expected %#lx\n", i, info.RegionSize, si.dwPageSize); + ok(info.Protect == PAGE_READONLY, "%ld: got %#lx != expected PAGE_READONLY\n", i, info.Protect); + ok(info.AllocationBase == base, "%ld: %p != %p\n", i, info.AllocationBase, base); + ok(info.AllocationProtect == PAGE_READONLY, "%ld: %#lx != PAGE_READONLY\n", i, info.AllocationProtect); + ok(info.State == MEM_COMMIT, "%ld: %#lx != MEM_COMMIT\n", i, info.State); + ok(info.Type == MEM_MAPPED, "%ld: %#lx != MEM_MAPPED\n", i, info.Type);
SetLastError(0xdeadbeef); ptr = VirtualAlloc(base, si.dwPageSize, MEM_COMMIT, td[i].prot); - ok(!ptr, "%d: VirtualAlloc(%02x) should fail\n", i, td[i].prot); - ok(GetLastError() == ERROR_ACCESS_DENIED, "%d: expected ERROR_ACCESS_DENIED, got %d\n", i, GetLastError()); + ok(!ptr, "%ld: VirtualAlloc(%02lx) should fail\n", i, td[i].prot); + ok(GetLastError() == ERROR_ACCESS_DENIED, "%ld: expected ERROR_ACCESS_DENIED, got %ld\n", i, GetLastError());
SetLastError(0xdeadbeef); ret = VirtualProtect(base, si.dwPageSize, td[i].prot, &old_prot); if (td[i].prot == PAGE_READONLY || td[i].prot == PAGE_WRITECOPY) - ok(ret, "%d: VirtualProtect(%02x) error %d\n", i, td[i].prot, GetLastError()); + ok(ret, "%ld: VirtualProtect(%02lx) error %ld\n", i, td[i].prot, GetLastError()); else { - ok(!ret, "%d: VirtualProtect(%02x) should fail\n", i, td[i].prot); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "%d: expected ERROR_INVALID_PARAMETER, got %d\n", i, GetLastError()); + ok(!ret, "%ld: VirtualProtect(%02lx) should fail\n", i, td[i].prot); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "%ld: expected ERROR_INVALID_PARAMETER, got %ld\n", i, GetLastError()); }
UnmapViewOfFile(base); @@ -3522,8 +3523,8 @@ static void test_CreateFileMapping_protection(void) } else { - ok(!hmap, "%d: CreateFileMapping should fail\n", i); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "%d: expected ERROR_INVALID_PARAMETER, got %d\n", i, GetLastError()); + ok(!hmap, "%ld: CreateFileMapping should fail\n", i); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "%ld: expected ERROR_INVALID_PARAMETER, got %ld\n", i, GetLastError()); } }
@@ -3531,30 +3532,30 @@ static void test_CreateFileMapping_protection(void) else alloc_prot = PAGE_READWRITE; SetLastError(0xdeadbeef); hmap = CreateFileMappingW(hfile, NULL, alloc_prot, 0, si.dwPageSize, NULL); - ok(hmap != 0, "%d: CreateFileMapping error %d\n", i, GetLastError()); + ok(hmap != 0, "%ld: CreateFileMapping error %ld\n", i, GetLastError());
for (i = 0; i < ARRAY_SIZE(td); i++) { SetLastError(0xdeadbeef); base = MapViewOfFile(hmap, FILE_MAP_READ | FILE_MAP_WRITE | (page_exec_supported ? FILE_MAP_EXECUTE : 0), 0, 0, 0); - ok(base != NULL, "MapViewOfFile failed %d\n", GetLastError()); + ok(base != NULL, "MapViewOfFile failed %ld\n", GetLastError());
old_prot = 0xdeadbeef; SetLastError(0xdeadbeef); ret = VirtualProtect(base, si.dwPageSize, PAGE_NOACCESS, &old_prot); - ok(ret, "VirtualProtect error %d\n", GetLastError()); - ok(old_prot == alloc_prot, "got %#x != expected %#x\n", old_prot, alloc_prot); + ok(ret, "VirtualProtect error %ld\n", GetLastError()); + ok(old_prot == alloc_prot, "got %#lx != expected %#lx\n", old_prot, alloc_prot);
SetLastError(0xdeadbeef); ret = VirtualQuery(base, &info, sizeof(info)); - ok(ret, "VirtualQuery failed %d\n", GetLastError()); - ok(info.BaseAddress == base, "%d: got %p != expected %p\n", i, info.BaseAddress, base); - ok(info.RegionSize == si.dwPageSize, "%d: got %#lx != expected %#x\n", i, info.RegionSize, si.dwPageSize); - ok(info.Protect == PAGE_NOACCESS, "%d: got %#x != expected PAGE_NOACCESS\n", i, info.Protect); - ok(info.AllocationBase == base, "%d: %p != %p\n", i, info.AllocationBase, base); - ok(info.AllocationProtect == alloc_prot, "%d: %#x != %#x\n", i, info.AllocationProtect, alloc_prot); - ok(info.State == MEM_COMMIT, "%d: %#x != MEM_COMMIT\n", i, info.State); - ok(info.Type == MEM_MAPPED, "%d: %#x != MEM_MAPPED\n", i, info.Type); + ok(ret, "VirtualQuery failed %ld\n", GetLastError()); + ok(info.BaseAddress == base, "%ld: got %p != expected %p\n", i, info.BaseAddress, base); + ok(info.RegionSize == si.dwPageSize, "%ld: got %#Ix != expected %#lx\n", i, info.RegionSize, si.dwPageSize); + ok(info.Protect == PAGE_NOACCESS, "%ld: got %#lx != expected PAGE_NOACCESS\n", i, info.Protect); + ok(info.AllocationBase == base, "%ld: %p != %p\n", i, info.AllocationBase, base); + ok(info.AllocationProtect == alloc_prot, "%ld: %#lx != %#lx\n", i, info.AllocationProtect, alloc_prot); + ok(info.State == MEM_COMMIT, "%ld: %#lx != MEM_COMMIT\n", i, info.State); + ok(info.Type == MEM_MAPPED, "%ld: %#lx != MEM_MAPPED\n", i, info.Type);
old_prot = 0xdeadbeef; SetLastError(0xdeadbeef); @@ -3566,36 +3567,36 @@ static void test_CreateFileMapping_protection(void) /* win2k and XP don't support EXEC on file mappings */ if (td[i].prot == PAGE_EXECUTE) { - ok(broken(!ret), "%d: VirtualProtect doesn't support PAGE_EXECUTE\n", i); + ok(broken(!ret), "%ld: VirtualProtect doesn't support PAGE_EXECUTE\n", i); continue; } /* NT4 and win2k don't support EXEC on file mappings */ if (td[i].prot == PAGE_EXECUTE_READ || td[i].prot == PAGE_EXECUTE_READWRITE) { - ok(broken(!ret), "%d: VirtualProtect doesn't support PAGE_EXECUTE\n", i); + ok(broken(!ret), "%ld: VirtualProtect doesn't support PAGE_EXECUTE\n", i); continue; } /* Vista+ supports PAGE_EXECUTE_WRITECOPY, earlier versions don't */ if (td[i].prot == PAGE_EXECUTE_WRITECOPY) { - ok(broken(!ret), "%d: VirtualProtect doesn't support PAGE_EXECUTE_WRITECOPY\n", i); + ok(broken(!ret), "%ld: VirtualProtect doesn't support PAGE_EXECUTE_WRITECOPY\n", i); continue; } }
- ok(ret, "%d: VirtualProtect error %d\n", i, GetLastError()); - ok(old_prot == PAGE_NOACCESS, "%d: got %#x != expected PAGE_NOACCESS\n", i, old_prot); + ok(ret, "%ld: VirtualProtect error %ld\n", i, GetLastError()); + ok(old_prot == PAGE_NOACCESS, "%ld: got %#lx != expected PAGE_NOACCESS\n", i, old_prot);
SetLastError(0xdeadbeef); ret = VirtualQuery(base, &info, sizeof(info)); - ok(ret, "VirtualQuery failed %d\n", GetLastError()); - ok(info.BaseAddress == base, "%d: got %p != expected %p\n", i, info.BaseAddress, base); - ok(info.RegionSize == si.dwPageSize, "%d: got %#lx != expected %#x\n", i, info.RegionSize, si.dwPageSize); - ok(info.Protect == td[i].prot, "%d: got %#x != expected %#x\n", i, info.Protect, td[i].prot); - ok(info.AllocationBase == base, "%d: %p != %p\n", i, info.AllocationBase, base); - ok(info.AllocationProtect == alloc_prot, "%d: %#x != %#x\n", i, info.AllocationProtect, alloc_prot); - ok(info.State == MEM_COMMIT, "%d: %#x != MEM_COMMIT\n", i, info.State); - ok(info.Type == MEM_MAPPED, "%d: %#x != MEM_MAPPED\n", i, info.Type); + ok(ret, "VirtualQuery failed %ld\n", GetLastError()); + ok(info.BaseAddress == base, "%ld: got %p != expected %p\n", i, info.BaseAddress, base); + ok(info.RegionSize == si.dwPageSize, "%ld: got %#Ix != expected %#lx\n", i, info.RegionSize, si.dwPageSize); + ok(info.Protect == td[i].prot, "%ld: got %#lx != expected %#lx\n", i, info.Protect, td[i].prot); + ok(info.AllocationBase == base, "%ld: %p != %p\n", i, info.AllocationBase, base); + ok(info.AllocationProtect == alloc_prot, "%ld: %#lx != %#lx\n", i, info.AllocationProtect, alloc_prot); + ok(info.State == MEM_COMMIT, "%ld: %#lx != MEM_COMMIT\n", i, info.State); + ok(info.Type == MEM_MAPPED, "%ld: %#lx != MEM_MAPPED\n", i, info.Type);
if (is_mem_writable(info.Protect)) { @@ -3603,26 +3604,26 @@ static void test_CreateFileMapping_protection(void)
SetLastError(0xdeadbeef); ret = VirtualQuery(base, &info, sizeof(info)); - ok(ret, "VirtualQuery failed %d\n", GetLastError()); + ok(ret, "VirtualQuery failed %ld\n", GetLastError()); /* FIXME: remove the condition below once Wine is fixed */ todo_wine_if (td[i].prot == PAGE_WRITECOPY || td[i].prot == PAGE_EXECUTE_WRITECOPY) - ok(info.Protect == td[i].prot_after_write, "%d: got %#x != expected %#x\n", i, info.Protect, td[i].prot_after_write); + ok(info.Protect == td[i].prot_after_write, "%ld: got %#lx != expected %#lx\n", i, info.Protect, td[i].prot_after_write); } } else { - ok(!ret, "%d: VirtualProtect should fail\n", i); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "%d: expected ERROR_INVALID_PARAMETER, got %d\n", i, GetLastError()); + ok(!ret, "%ld: VirtualProtect should fail\n", i); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "%ld: expected ERROR_INVALID_PARAMETER, got %ld\n", i, GetLastError()); continue; }
old_prot = 0xdeadbeef; SetLastError(0xdeadbeef); ret = VirtualProtect(base, si.dwPageSize, PAGE_NOACCESS, &old_prot); - ok(ret, "%d: VirtualProtect error %d\n", i, GetLastError()); + ok(ret, "%ld: VirtualProtect error %ld\n", i, GetLastError()); /* FIXME: remove the condition below once Wine is fixed */ todo_wine_if (td[i].prot == PAGE_WRITECOPY || td[i].prot == PAGE_EXECUTE_WRITECOPY) - ok(old_prot == td[i].prot_after_write, "%d: got %#x != expected %#x\n", i, old_prot, td[i].prot_after_write); + ok(old_prot == td[i].prot_after_write, "%ld: got %#lx != expected %#lx\n", i, old_prot, td[i].prot_after_write);
UnmapViewOfFile(base); } @@ -3799,7 +3800,7 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly ) MEMORY_BASIC_INFORMATION info, nt_info; BOOL anon_mapping = (hfile == INVALID_HANDLE_VALUE);
- trace( "testing %s mapping flags %08x %s\n", anon_mapping ? "anonymous" : "file", + trace( "testing %s mapping flags %08lx %s\n", anon_mapping ? "anonymous" : "file", sec_flags, readonly ? "readonly file" : "" ); for (i = 0; i < ARRAY_SIZE(page_prot); i++) { @@ -3811,9 +3812,9 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly ) { todo_wine_if(page_prot[i] == PAGE_EXECUTE_READ || page_prot[i] == PAGE_EXECUTE_WRITECOPY) { - ok(!hmap, "%d: CreateFileMapping(%04x) should fail\n", i, page_prot[i]); + ok(!hmap, "%ld: CreateFileMapping(%04lx) should fail\n", i, page_prot[i]); ok(GetLastError() == ERROR_ACCESS_DENIED || broken(GetLastError() == ERROR_INVALID_PARAMETER), - "expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + "expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError()); } if (hmap) CloseHandle(hmap); continue; @@ -3824,7 +3825,7 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly ) HANDLE hmap2;
ok(!hmap, "CreateFileMapping(PAGE_NOACCESS) should fail\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* A trick to create a not accessible mapping */ SetLastError(0xdeadbeef); @@ -3832,10 +3833,10 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly ) hmap = CreateFileMappingW(hfile, NULL, PAGE_WRITECOPY | sec_flags, 0, si.dwPageSize, NULL); else hmap = CreateFileMappingW(hfile, NULL, PAGE_READONLY | sec_flags, 0, si.dwPageSize, NULL); - ok(hmap != 0, "CreateFileMapping(PAGE_READWRITE) error %d\n", GetLastError()); + ok(hmap != 0, "CreateFileMapping(PAGE_READWRITE) error %ld\n", GetLastError()); SetLastError(0xdeadbeef); ret = DuplicateHandle(GetCurrentProcess(), hmap, GetCurrentProcess(), &hmap2, 0, FALSE, 0); - ok(ret, "DuplicateHandle error %d\n", GetLastError()); + ok(ret, "DuplicateHandle error %ld\n", GetLastError()); CloseHandle(hmap); hmap = hmap2; } @@ -3843,13 +3844,13 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly ) { ok(!hmap, "CreateFileMapping(PAGE_EXECUTE) should fail\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); continue; }
if (!hmap) { - trace("%d: CreateFileMapping(%04x) failed: %d\n", i, page_prot[i], GetLastError()); + trace("%ld: CreateFileMapping(%04lx) failed: %ld\n", i, page_prot[i], GetLastError());
if ((sec_flags & SEC_IMAGE) && (page_prot[i] == PAGE_READWRITE || page_prot[i] == PAGE_EXECUTE_READWRITE)) @@ -3858,18 +3859,18 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly ) /* NT4 and win2k don't support EXEC on file mappings */ if (page_prot[i] == PAGE_EXECUTE_READ || page_prot[i] == PAGE_EXECUTE_READWRITE) { - ok(broken(!hmap), "%d: CreateFileMapping doesn't support PAGE_EXECUTE\n", i); + ok(broken(!hmap), "%ld: CreateFileMapping doesn't support PAGE_EXECUTE\n", i); continue; } /* Vista+ supports PAGE_EXECUTE_WRITECOPY, earlier versions don't */ if (page_prot[i] == PAGE_EXECUTE_WRITECOPY) { - ok(broken(!hmap), "%d: CreateFileMapping doesn't support PAGE_EXECUTE_WRITECOPY\n", i); + ok(broken(!hmap), "%ld: CreateFileMapping doesn't support PAGE_EXECUTE_WRITECOPY\n", i); continue; } }
- ok(hmap != 0, "%d: CreateFileMapping(%04x) error %d\n", i, page_prot[i], GetLastError()); + ok(hmap != 0, "%ld: CreateFileMapping(%04lx) error %ld\n", i, page_prot[i], GetLastError());
for (j = 0; j < ARRAY_SIZE(view); j++) { @@ -3878,7 +3879,7 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly ) { SetLastError(0xdeadbeef); ret = VirtualQuery(nt_base, &nt_info, sizeof(nt_info)); - ok(ret, "%d: VirtualQuery failed %d\n", j, GetLastError()); + ok(ret, "%ld: VirtualQuery failed %ld\n", j, GetLastError()); UnmapViewOfFile(nt_base); }
@@ -3888,22 +3889,22 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly ) /* Vista+ supports FILE_MAP_EXECUTE properly, earlier versions don't */ ok(!nt_base == !base || broken((view[j].access & FILE_MAP_EXECUTE) && !nt_base != !base), - "%d: (%04x/%04x) NT %p kernel %p\n", j, page_prot[i], view[j].access, nt_base, base); + "%ld: (%04lx/%04lx) NT %p kernel %p\n", j, page_prot[i], view[j].access, nt_base, base);
if (!is_compatible_access(page_prot[i], view[j].access)) { /* FILE_MAP_EXECUTE | FILE_MAP_COPY broken on XP */ if (base != NULL && view[j].access == (FILE_MAP_EXECUTE | FILE_MAP_COPY)) { - ok( broken(base != NULL), "%d: MapViewOfFile(%04x/%04x) should fail\n", + ok( broken(base != NULL), "%ld: MapViewOfFile(%04lx/%04lx) should fail\n", j, page_prot[i], view[j].access); UnmapViewOfFile( base ); } else { - ok(!base, "%d: MapViewOfFile(%04x/%04x) should fail\n", + ok(!base, "%ld: MapViewOfFile(%04lx/%04lx) should fail\n", j, page_prot[i], view[j].access); - ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error %d\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error %ld\n", GetLastError()); } continue; } @@ -3911,49 +3912,49 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly ) /* Vista+ properly supports FILE_MAP_EXECUTE, earlier versions don't */ if (!base && (view[j].access & FILE_MAP_EXECUTE)) { - ok(broken(!base), "%d: MapViewOfFile(%04x/%04x) failed %d\n", j, page_prot[i], view[j].access, GetLastError()); + ok(broken(!base), "%ld: MapViewOfFile(%04lx/%04lx) failed %ld\n", j, page_prot[i], view[j].access, GetLastError()); continue; }
- ok(base != NULL, "%d: MapViewOfFile(%04x/%04x) failed %d\n", j, page_prot[i], view[j].access, GetLastError()); + ok(base != NULL, "%ld: MapViewOfFile(%04lx/%04lx) failed %ld\n", j, page_prot[i], view[j].access, GetLastError());
SetLastError(0xdeadbeef); ret = VirtualQuery(base, &info, sizeof(info)); - ok(ret, "%d: VirtualQuery failed %d\n", j, GetLastError()); - ok(info.BaseAddress == base, "%d: (%04x) got %p, expected %p\n", j, view[j].access, info.BaseAddress, base); + ok(ret, "%ld: VirtualQuery failed %ld\n", j, GetLastError()); + ok(info.BaseAddress == base, "%ld: (%04lx) got %p, expected %p\n", j, view[j].access, info.BaseAddress, base); ok(info.RegionSize == 2*si.dwPageSize || (info.RegionSize == si.dwPageSize && (sec_flags & SEC_IMAGE)), - "%d: (%04x) got %#lx != expected %#x\n", j, view[j].access, info.RegionSize, 2*si.dwPageSize); + "%ld: (%04lx) got %#Ix != expected %#lx\n", j, view[j].access, info.RegionSize, 2*si.dwPageSize); if (sec_flags & SEC_IMAGE) ok(info.Protect == PAGE_READONLY, - "%d: (%04x) got %#x, expected %#x\n", j, view[j].access, info.Protect, view[j].prot); + "%ld: (%04lx) got %#lx, expected %#lx\n", j, view[j].access, info.Protect, view[j].prot); else ok(info.Protect == view[j].prot || broken(view[j].prot == PAGE_EXECUTE_READ && info.Protect == PAGE_READONLY) || /* win2k */ broken(view[j].prot == PAGE_EXECUTE_READWRITE && info.Protect == PAGE_READWRITE) || /* win2k */ broken(view[j].prot == PAGE_EXECUTE_WRITECOPY && info.Protect == PAGE_NOACCESS), /* XP */ - "%d: (%04x) got %#x, expected %#x\n", j, view[j].access, info.Protect, view[j].prot); - ok(info.AllocationBase == base, "%d: (%04x) got %p, expected %p\n", j, view[j].access, info.AllocationBase, base); + "%ld: (%04lx) got %#lx, expected %#lx\n", j, view[j].access, info.Protect, view[j].prot); + ok(info.AllocationBase == base, "%ld: (%04lx) got %p, expected %p\n", j, view[j].access, info.AllocationBase, base); if (sec_flags & SEC_IMAGE) - ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%d: (%04x) got %#x, expected %#x\n", + ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%ld: (%04lx) got %#lx, expected %#lx\n", j, view[j].access, info.AllocationProtect, info.Protect); else - ok(info.AllocationProtect == info.Protect, "%d: (%04x) got %#x, expected %#x\n", + ok(info.AllocationProtect == info.Protect, "%ld: (%04lx) got %#lx, expected %#lx\n", j, view[j].access, info.AllocationProtect, info.Protect); - ok(info.State == MEM_COMMIT, "%d: (%04x) got %#x, expected MEM_COMMIT\n", j, view[j].access, info.State); + ok(info.State == MEM_COMMIT, "%ld: (%04lx) got %#lx, expected MEM_COMMIT\n", j, view[j].access, info.State); ok(info.Type == (sec_flags & SEC_IMAGE) ? SEC_IMAGE : MEM_MAPPED, - "%d: (%04x) got %#x, expected MEM_MAPPED\n", j, view[j].access, info.Type); + "%ld: (%04lx) got %#lx, expected MEM_MAPPED\n", j, view[j].access, info.Type);
if (nt_base && base) { - ok(nt_info.RegionSize == info.RegionSize, "%d: (%04x) got %#lx != expected %#lx\n", j, view[j].access, nt_info.RegionSize, info.RegionSize); + ok(nt_info.RegionSize == info.RegionSize, "%ld: (%04lx) got %#Ix != expected %#Ix\n", j, view[j].access, nt_info.RegionSize, info.RegionSize); ok(nt_info.Protect == info.Protect /* Vista+ */ || broken(nt_info.AllocationProtect == PAGE_EXECUTE_WRITECOPY && info.Protect == PAGE_NOACCESS), /* XP */ - "%d: (%04x) got %#x, expected %#x\n", j, view[j].access, nt_info.Protect, info.Protect); + "%ld: (%04lx) got %#lx, expected %#lx\n", j, view[j].access, nt_info.Protect, info.Protect); ok(nt_info.AllocationProtect == info.AllocationProtect /* Vista+ */ || broken(nt_info.AllocationProtect == PAGE_EXECUTE_WRITECOPY && info.Protect == PAGE_NOACCESS), /* XP */ - "%d: (%04x) got %#x, expected %#x\n", j, view[j].access, nt_info.AllocationProtect, info.AllocationProtect); - ok(nt_info.State == info.State, "%d: (%04x) got %#x, expected %#x\n", j, view[j].access, nt_info.State, info.State); - ok(nt_info.Type == info.Type, "%d: (%04x) got %#x, expected %#x\n", j, view[j].access, nt_info.Type, info.Type); + "%ld: (%04lx) got %#lx, expected %#lx\n", j, view[j].access, nt_info.AllocationProtect, info.AllocationProtect); + ok(nt_info.State == info.State, "%ld: (%04lx) got %#lx, expected %#lx\n", j, view[j].access, nt_info.State, info.State); + ok(nt_info.Type == info.Type, "%ld: (%04lx) got %#lx, expected %#lx\n", j, view[j].access, nt_info.Type, info.Type); }
prev_prot = info.Protect; @@ -3976,22 +3977,22 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly ) }
todo_wine_if(readonly && page_prot[k] == PAGE_WRITECOPY && view[j].prot != PAGE_WRITECOPY) - ok(ret, "VirtualProtect error %d, map %#x, view %#x, requested prot %#x\n", GetLastError(), page_prot[i], view[j].prot, page_prot[k]); + ok(ret, "VirtualProtect error %ld, map %#lx, view %#lx, requested prot %#lx\n", GetLastError(), page_prot[i], view[j].prot, page_prot[k]); todo_wine_if(readonly && page_prot[k] == PAGE_WRITECOPY && view[j].prot != PAGE_WRITECOPY) - ok(old_prot == prev_prot, "got %#x, expected %#x\n", old_prot, prev_prot); + ok(old_prot == prev_prot, "got %#lx, expected %#lx\n", old_prot, prev_prot); prev_prot = actual_prot;
ret = VirtualQuery(base, &info, sizeof(info)); - ok(ret, "%d: VirtualQuery failed %d\n", j, GetLastError()); + ok(ret, "%ld: VirtualQuery failed %ld\n", j, GetLastError()); todo_wine_if(readonly && page_prot[k] == PAGE_WRITECOPY && view[j].prot != PAGE_WRITECOPY) ok(info.Protect == actual_prot, - "VirtualProtect wrong prot, map %#x, view %#x, requested prot %#x got %#x\n", + "VirtualProtect wrong prot, map %#lx, view %#lx, requested prot %#lx got %#lx\n", page_prot[i], view[j].prot, page_prot[k], info.Protect ); } else { - ok(!ret, "VirtualProtect should fail, map %#x, view %#x, requested prot %#x\n", page_prot[i], view[j].prot, page_prot[k]); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(!ret, "VirtualProtect should fail, map %#lx, view %#lx, requested prot %#lx\n", page_prot[i], view[j].prot, page_prot[k]); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); } }
@@ -4004,34 +4005,34 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly ) { if (is_compatible_protection(view[j].prot, page_prot[k])) { - ok(ptr != NULL, "VirtualAlloc error %u, map %#x, view %#x, requested prot %#x\n", + ok(ptr != NULL, "VirtualAlloc error %lu, map %#lx, view %#lx, requested prot %#lx\n", GetLastError(), page_prot[i], view[j].prot, page_prot[k]); } else { /* versions <= Vista accept all protections without checking */ ok(!ptr || broken(ptr != NULL), - "VirtualAlloc should fail, map %#x, view %#x, requested prot %#x\n", + "VirtualAlloc should fail, map %#lx, view %#lx, requested prot %#lx\n", page_prot[i], view[j].prot, page_prot[k]); if (!ptr) ok( GetLastError() == ERROR_INVALID_PARAMETER, - "wrong error %u\n", GetLastError()); + "wrong error %lu\n", GetLastError()); } if (ptr) { ret = VirtualQuery(base, &info, sizeof(info)); - ok(ret, "%d: VirtualQuery failed %d\n", j, GetLastError()); + ok(ret, "%ld: VirtualQuery failed %ld\n", j, GetLastError()); ok(info.Protect == page_prot[k] || /* if the mapping doesn't have write access, * broken versions silently switch to WRITECOPY */ broken( info.Protect == map_prot_no_write(page_prot[k]) ), - "VirtualAlloc wrong prot, map %#x, view %#x, requested prot %#x got %#x\n", + "VirtualAlloc wrong prot, map %#lx, view %#lx, requested prot %#lx got %#lx\n", page_prot[i], view[j].prot, page_prot[k], info.Protect ); } } else { - ok(!ptr, "VirtualAlloc(%02x) should fail\n", page_prot[k]); - ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + ok(!ptr, "VirtualAlloc(%02lx) should fail\n", page_prot[k]); + ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError()); } }
@@ -4039,15 +4040,15 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly ) { ret = VirtualProtect(base, sec_flags & SEC_IMAGE ? si.dwPageSize : 2*si.dwPageSize, PAGE_WRITECOPY, &old_prot); todo_wine_if(readonly && view[j].prot != PAGE_WRITECOPY) - ok(ret, "VirtualProtect error %d, map %#x, view %#x\n", GetLastError(), page_prot[i], view[j].prot); + ok(ret, "VirtualProtect error %ld, map %#lx, view %#lx\n", GetLastError(), page_prot[i], view[j].prot); if (ret) *(DWORD*)base = 0xdeadbeef; ret = VirtualQuery(base, &info, sizeof(info)); - ok(ret, "%d: VirtualQuery failed %d\n", j, GetLastError()); + ok(ret, "%ld: VirtualQuery failed %ld\n", j, GetLastError()); todo_wine - ok(info.Protect == PAGE_READWRITE, "VirtualProtect wrong prot, map %#x, view %#x got %#x\n", + ok(info.Protect == PAGE_READWRITE, "VirtualProtect wrong prot, map %#lx, view %#lx got %#lx\n", page_prot[i], view[j].prot, info.Protect ); todo_wine_if (!(sec_flags & SEC_IMAGE)) - ok(info.RegionSize == si.dwPageSize, "wrong region size %#lx after write, map %#x, view %#x got %#x\n", + ok(info.RegionSize == si.dwPageSize, "wrong region size %#Ix after write, map %#lx, view %#lx got %#lx\n", info.RegionSize, page_prot[i], view[j].prot, info.Protect );
prev_prot = info.Protect; @@ -4056,9 +4057,9 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly ) if (!(sec_flags & SEC_IMAGE)) { ret = VirtualQuery((char*)base + si.dwPageSize, &info, sizeof(info)); - ok(ret, "%d: VirtualQuery failed %d\n", j, GetLastError()); + ok(ret, "%ld: VirtualQuery failed %ld\n", j, GetLastError()); todo_wine_if(readonly && view[j].prot != PAGE_WRITECOPY) - ok(info.Protect == PAGE_WRITECOPY, "wrong prot, map %#x, view %#x got %#x\n", + ok(info.Protect == PAGE_WRITECOPY, "wrong prot, map %#lx, view %#lx got %#lx\n", page_prot[i], view[j].prot, info.Protect); }
@@ -4078,22 +4079,22 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly ) }
todo_wine_if(readonly && page_prot[k] == PAGE_WRITECOPY && view[j].prot != PAGE_WRITECOPY) - ok(ret, "VirtualProtect error %d, map %#x, view %#x, requested prot %#x\n", GetLastError(), page_prot[i], view[j].prot, page_prot[k]); + ok(ret, "VirtualProtect error %ld, map %#lx, view %#lx, requested prot %#lx\n", GetLastError(), page_prot[i], view[j].prot, page_prot[k]); todo_wine_if(readonly && page_prot[k] == PAGE_WRITECOPY && view[j].prot != PAGE_WRITECOPY) - ok(old_prot == prev_prot, "got %#x, expected %#x\n", old_prot, prev_prot); + ok(old_prot == prev_prot, "got %#lx, expected %#lx\n", old_prot, prev_prot);
ret = VirtualQuery(base, &info, sizeof(info)); - ok(ret, "%d: VirtualQuery failed %d\n", j, GetLastError()); + ok(ret, "%ld: VirtualQuery failed %ld\n", j, GetLastError()); todo_wine_if( map_prot_written( page_prot[k] ) != actual_prot ) ok(info.Protect == map_prot_written( page_prot[k] ), - "VirtualProtect wrong prot, map %#x, view %#x, requested prot %#x got %#x\n", + "VirtualProtect wrong prot, map %#lx, view %#lx, requested prot %#lx got %#lx\n", page_prot[i], view[j].prot, page_prot[k], info.Protect ); prev_prot = info.Protect; } else { - ok(!ret, "VirtualProtect should fail, map %#x, view %#x, requested prot %#x\n", page_prot[i], view[j].prot, page_prot[k]); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(!ret, "VirtualProtect should fail, map %#lx, view %#lx, requested prot %#lx\n", page_prot[i], view[j].prot, page_prot[k]); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); } } } @@ -4115,7 +4116,7 @@ static void test_mappings(void) GetTempFileNameA(temp_path, "map", 0, file_name);
hfile = CreateFileA(file_name, GENERIC_READ|GENERIC_WRITE|GENERIC_EXECUTE, 0, NULL, CREATE_ALWAYS, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "CreateFile(%s) error %d\n", file_name, GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "CreateFile(%s) error %ld\n", file_name, GetLastError()); SetFilePointer(hfile, 2*si.dwPageSize, NULL, FILE_BEGIN); SetEndOfFile(hfile);
@@ -4124,14 +4125,14 @@ static void test_mappings(void) /* test that file was not modified */ SetFilePointer(hfile, 0, NULL, FILE_BEGIN); ok(ReadFile(hfile, &data, sizeof(data), &num_bytes, NULL), "ReadFile failed\n"); - ok(num_bytes == sizeof(data), "num_bytes = %d\n", num_bytes); + ok(num_bytes == sizeof(data), "num_bytes = %ld\n", num_bytes); todo_wine - ok(!data, "data = %x\n", data); + ok(!data, "data = %lx\n", data);
CloseHandle( hfile );
hfile = CreateFileA(file_name, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "CreateFile(%s) error %d\n", file_name, GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "CreateFile(%s) error %ld\n", file_name, GetLastError());
test_mapping( hfile, SEC_COMMIT, TRUE );
@@ -4143,7 +4144,7 @@ static void test_mappings(void) strcat( file_name, "\kernel32.dll" );
hfile = CreateFileA( file_name, GENERIC_READ|GENERIC_EXECUTE, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0 ); - ok(hfile != INVALID_HANDLE_VALUE, "CreateFile(%s) error %d\n", file_name, GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "CreateFile(%s) error %ld\n", file_name, GetLastError());
test_mapping( hfile, SEC_IMAGE, FALSE );
@@ -4160,17 +4161,17 @@ static void test_shared_memory(BOOL is_child)
SetLastError(0xdeadbef); mapping = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 4096, "winetest_virtual.c"); - ok(mapping != 0, "CreateFileMapping error %d\n", GetLastError()); + ok(mapping != 0, "CreateFileMapping error %ld\n", GetLastError()); if (is_child) - ok(GetLastError() == ERROR_ALREADY_EXISTS, "expected ERROR_ALREADY_EXISTS, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_ALREADY_EXISTS, "expected ERROR_ALREADY_EXISTS, got %ld\n", GetLastError());
SetLastError(0xdeadbef); p = MapViewOfFile(mapping, FILE_MAP_READ|FILE_MAP_WRITE, 0, 0, 4096); - ok(p != NULL, "MapViewOfFile error %d\n", GetLastError()); + ok(p != NULL, "MapViewOfFile error %ld\n", GetLastError());
if (is_child) { - ok(*p == 0x1a2b3c4d, "expected 0x1a2b3c4d in child, got %#x\n", *p); + ok(*p == 0x1a2b3c4d, "expected 0x1a2b3c4d in child, got %#lx\n", *p); } else { @@ -4185,7 +4186,7 @@ static void test_shared_memory(BOOL is_child) winetest_get_mainargs(&argv); sprintf(cmdline, ""%s" virtual sharedmem", argv[0]); ret = CreateProcessA(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "CreateProcess(%s) error %d\n", cmdline, GetLastError()); + ok(ret, "CreateProcess(%s) error %ld\n", cmdline, GetLastError()); wait_child_process(pi.hProcess); CloseHandle(pi.hThread); CloseHandle(pi.hProcess); @@ -4202,13 +4203,13 @@ static void test_shared_memory_ro(BOOL is_child, DWORD child_access)
SetLastError(0xdeadbef); mapping = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 4096, "winetest_virtual.c_ro"); - ok(mapping != 0, "CreateFileMapping error %d\n", GetLastError()); + ok(mapping != 0, "CreateFileMapping error %ld\n", GetLastError()); if (is_child) - ok(GetLastError() == ERROR_ALREADY_EXISTS, "expected ERROR_ALREADY_EXISTS, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_ALREADY_EXISTS, "expected ERROR_ALREADY_EXISTS, got %ld\n", GetLastError());
SetLastError(0xdeadbef); p = MapViewOfFile(mapping, is_child ? child_access : FILE_MAP_READ, 0, 0, 4096); - ok(p != NULL, "MapViewOfFile error %d\n", GetLastError()); + ok(p != NULL, "MapViewOfFile error %ld\n", GetLastError());
if (is_child) { @@ -4223,17 +4224,17 @@ static void test_shared_memory_ro(BOOL is_child, DWORD child_access) DWORD ret;
winetest_get_mainargs(&argv); - sprintf(cmdline, ""%s" virtual sharedmemro %x", argv[0], child_access); + sprintf(cmdline, ""%s" virtual sharedmemro %lx", argv[0], child_access); ret = CreateProcessA(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "CreateProcess(%s) error %d\n", cmdline, GetLastError()); + ok(ret, "CreateProcess(%s) error %ld\n", cmdline, GetLastError()); wait_child_process(pi.hProcess); CloseHandle(pi.hThread); CloseHandle(pi.hProcess);
if(child_access & FILE_MAP_WRITE) - ok(*p == 0xdeadbeef, "*p = %x, expected 0xdeadbeef\n", *p); + ok(*p == 0xdeadbeef, "*p = %lx, expected 0xdeadbeef\n", *p); else - ok(!*p, "*p = %x, expected 0\n", *p); + ok(!*p, "*p = %lx, expected 0\n", *p); }
UnmapViewOfFile(p); @@ -4269,10 +4270,10 @@ START_TEST(virtual) BOOL ret; mem = VirtualAlloc(NULL, 1<<20, MEM_COMMIT|MEM_RESERVE, PAGE_EXECUTE_READWRITE); - ok(mem != NULL, "VirtualAlloc failed %u\n", GetLastError()); + ok(mem != NULL, "VirtualAlloc failed %lu\n", GetLastError()); if (mem == NULL) break; ret = VirtualFree(mem, 0, MEM_RELEASE); - ok(ret, "VirtualFree failed %u\n", GetLastError()); + ok(ret, "VirtualFree failed %lu\n", GetLastError()); if (!ret) break; } return; @@ -4297,7 +4298,7 @@ START_TEST(virtual) pVirtualAllocFromApp = (void *)GetProcAddress( hkernelbase, "VirtualAllocFromApp" );
GetSystemInfo(&si); - trace("system page size %#x\n", si.dwPageSize); + trace("system page size %#lx\n", si.dwPageSize);
test_shared_memory(FALSE); test_shared_memory_ro(FALSE, FILE_MAP_READ|FILE_MAP_WRITE);
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/kernel32/tests/volume.c | 423 +++++++++++++++++++++--------------------- 1 file changed, 212 insertions(+), 211 deletions(-)
diff --git a/dlls/kernel32/tests/volume.c b/dlls/kernel32/tests/volume.c index 723dfabb817..3bc3c7e4872 100644 --- a/dlls/kernel32/tests/volume.c +++ b/dlls/kernel32/tests/volume.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 <stdio.h> #include "ntstatus.h" @@ -74,20 +75,20 @@ static void test_query_dos_deviceA(void) SetLastError(0xdeadbeef); ret = QueryDosDeviceA( NULL, NULL, 0 ); ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "QueryDosDeviceA(no buffer): returned %u, le=%u\n", ret, GetLastError()); + "QueryDosDeviceA(no buffer): returned %lu, le=%lu\n", ret, GetLastError());
buffer = HeapAlloc( GetProcessHeap(), 0, buflen ); SetLastError(0xdeadbeef); ret = QueryDosDeviceA( NULL, buffer, buflen ); ok((ret && GetLastError() != ERROR_INSUFFICIENT_BUFFER), - "QueryDosDeviceA failed to return list, last error %u\n", GetLastError()); + "QueryDosDeviceA failed to return list, last error %lu\n", GetLastError());
if (ret && GetLastError() != ERROR_INSUFFICIENT_BUFFER) { p = buffer; for (;;) { if (!*p) break; ret2 = QueryDosDeviceA( p, buffer2, sizeof(buffer2) ); - ok(ret2, "QueryDosDeviceA failed to return current mapping for %s, last error %u\n", p, GetLastError()); + ok(ret2, "QueryDosDeviceA failed to return current mapping for %s, last error %lu\n", p, GetLastError()); p += strlen(p) + 1; if (ret <= (p-buffer)) break; } @@ -97,7 +98,7 @@ static void test_query_dos_deviceA(void) /* Older W2K fails with ERROR_INSUFFICIENT_BUFFER when buflen is > 32767 */ ret = QueryDosDeviceA( drivestr, buffer, buflen - 1); ok(ret || GetLastError() == ERROR_FILE_NOT_FOUND, - "QueryDosDeviceA failed to return current mapping for %s, last error %u\n", drivestr, GetLastError()); + "QueryDosDeviceA failed to return current mapping for %s, last error %lu\n", drivestr, GetLastError()); if(ret) { for (p = buffer; *p; p++) *p = toupper(*p); if (strstr(buffer, "HARDDISK") || strstr(buffer, "RAMDISK")) found = TRUE; @@ -127,16 +128,16 @@ static void test_dos_devices(void) }
ret = DefineDosDeviceA( 0, drivestr, "C:/windows/" ); - ok(ret, "failed to define drive %s, error %u\n", drivestr, GetLastError()); + ok(ret, "failed to define drive %s, error %lu\n", drivestr, GetLastError());
ret = QueryDosDeviceA( drivestr, buf, sizeof(buf) ); - ok(ret, "failed to query drive %s, error %u\n", drivestr, GetLastError()); + ok(ret, "failed to query drive %s, error %lu\n", drivestr, GetLastError()); ok(!strcmp(buf, "\??\C:\windows\"), "got path %s\n", debugstr_a(buf));
sprintf(buf, "%s/system32", drivestr); file = CreateFileA( buf, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL ); - todo_wine ok(file != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError()); + todo_wine ok(file != INVALID_HANDLE_VALUE, "got error %lu\n", GetLastError()); CloseHandle( file );
/* but it's not a volume mount point */ @@ -144,47 +145,47 @@ static void test_dos_devices(void) sprintf(buf, "%s\", drivestr); ret = GetVolumeNameForVolumeMountPointA( buf, buf2, sizeof(buf2) ); ok(!ret, "expected failure\n"); - todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError()); + todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %lu\n", GetLastError());
ret = DefineDosDeviceA(DDD_REMOVE_DEFINITION, drivestr, NULL); - ok(ret, "failed to remove drive %s, error %u\n", drivestr, GetLastError()); + ok(ret, "failed to remove drive %s, error %lu\n", drivestr, GetLastError());
ret = QueryDosDeviceA( drivestr, buf, sizeof(buf) ); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "got error %lu\n", GetLastError());
sprintf(buf, "%s/system32", drivestr); file = CreateFileA( buf, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL ); ok(file == INVALID_HANDLE_VALUE, "expected failure\n"); - todo_wine ok(GetLastError() == ERROR_PATH_NOT_FOUND, "got error %u\n", GetLastError()); + todo_wine ok(GetLastError() == ERROR_PATH_NOT_FOUND, "got error %lu\n", GetLastError());
/* try with DDD_RAW_TARGET_PATH */
ret = DefineDosDeviceA( DDD_RAW_TARGET_PATH, drivestr, "\??\C:\windows\" ); - ok(ret, "failed to define drive %s, error %u\n", drivestr, GetLastError()); + ok(ret, "failed to define drive %s, error %lu\n", drivestr, GetLastError());
ret = QueryDosDeviceA( drivestr, buf, sizeof(buf) ); - ok(ret, "failed to query drive %s, error %u\n", drivestr, GetLastError()); + ok(ret, "failed to query drive %s, error %lu\n", drivestr, GetLastError()); ok(!strcmp(buf, "\??\C:\windows\"), "got path %s\n", debugstr_a(buf));
sprintf(buf, "%s/system32", drivestr); file = CreateFileA( buf, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL ); - todo_wine ok(file != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError()); + todo_wine ok(file != INVALID_HANDLE_VALUE, "got error %lu\n", GetLastError()); CloseHandle( file );
sprintf(buf, "%s\", drivestr); ret = GetVolumeNameForVolumeMountPointA( buf, buf2, sizeof(buf2) ); ok(!ret, "expected failure\n"); - todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError()); + todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %lu\n", GetLastError());
ret = DefineDosDeviceA(DDD_REMOVE_DEFINITION, drivestr, NULL); - ok(ret, "failed to remove drive %s, error %u\n", drivestr, GetLastError()); + ok(ret, "failed to remove drive %s, error %lu\n", drivestr, GetLastError());
ret = QueryDosDeviceA( drivestr, buf, sizeof(buf) ); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "got error %lu\n", GetLastError()); }
static void test_FindFirstVolume(void) @@ -202,12 +203,12 @@ static void test_FindFirstVolume(void) ok( handle == INVALID_HANDLE_VALUE, "succeeded with short buffer\n" ); ok( GetLastError() == ERROR_MORE_DATA || /* XP */ GetLastError() == ERROR_FILENAME_EXCED_RANGE, /* Vista */ - "wrong error %u\n", GetLastError() ); + "wrong error %lu\n", GetLastError() ); handle = pFindFirstVolumeA( volume, 49 ); ok( handle == INVALID_HANDLE_VALUE, "succeeded with short buffer\n" ); - ok( GetLastError() == ERROR_FILENAME_EXCED_RANGE, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_FILENAME_EXCED_RANGE, "wrong error %lu\n", GetLastError() ); handle = pFindFirstVolumeA( volume, 51 ); - ok( handle != INVALID_HANDLE_VALUE, "failed err %u\n", GetLastError() ); + ok( handle != INVALID_HANDLE_VALUE, "failed err %lu\n", GetLastError() ); if (handle != INVALID_HANDLE_VALUE) { do @@ -216,7 +217,7 @@ static void test_FindFirstVolume(void) ok( !memcmp( volume, "\\?\Volume{", 11 ), "bad volume name %s\n", volume ); ok( !memcmp( volume + 47, "}\", 2 ), "bad volume name %s\n", volume ); } while (pFindNextVolumeA( handle, volume, MAX_PATH )); - ok( GetLastError() == ERROR_NO_MORE_FILES, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_NO_MORE_FILES, "wrong error %lu\n", GetLastError() ); pFindVolumeClose( handle ); } } @@ -229,14 +230,14 @@ static void test_GetVolumeNameForVolumeMountPointA(void) char temp_path[MAX_PATH];
reti = GetTempPathA(MAX_PATH, temp_path); - ok(reti != 0, "GetTempPathA error %d\n", GetLastError()); + ok(reti != 0, "GetTempPathA error %ld\n", GetLastError()); ok(reti < MAX_PATH, "temp path should fit into MAX_PATH\n");
ret = GetVolumeNameForVolumeMountPointA(path, volume, 0); ok(ret == FALSE, "GetVolumeNameForVolumeMountPointA succeeded\n"); ok(GetLastError() == ERROR_FILENAME_EXCED_RANGE || GetLastError() == ERROR_INVALID_PARAMETER, /* Vista */ - "wrong error, last=%d\n", GetLastError()); + "wrong error, last=%ld\n", GetLastError());
if (0) { /* these crash on XP */ ret = GetVolumeNameForVolumeMountPointA(path, NULL, len); @@ -255,7 +256,7 @@ static void test_GetVolumeNameForVolumeMountPointA(void) /* test with too small buffer */ ret = GetVolumeNameForVolumeMountPointA(path, volume, 10); ok(ret == FALSE && GetLastError() == ERROR_FILENAME_EXCED_RANGE, - "GetVolumeNameForVolumeMountPointA failed, wrong error returned, was %d, should be ERROR_FILENAME_EXCED_RANGE\n", + "GetVolumeNameForVolumeMountPointA failed, wrong error returned, was %ld, should be ERROR_FILENAME_EXCED_RANGE\n", GetLastError());
/* Try on an arbitrary directory */ @@ -264,7 +265,7 @@ static void test_GetVolumeNameForVolumeMountPointA(void) ret = GetVolumeNameForVolumeMountPointA(temp_path, volume, len); ok(ret == FALSE && (GetLastError() == ERROR_NOT_A_REPARSE_POINT || GetLastError() == ERROR_INVALID_FUNCTION), - "GetVolumeNameForVolumeMountPointA failed on %s, last=%d\n", + "GetVolumeNameForVolumeMountPointA failed on %s, last=%ld\n", temp_path, GetLastError());
/* Try on a nonexistent dos drive */ @@ -278,14 +279,14 @@ static void test_GetVolumeNameForVolumeMountPointA(void) path[2] = '\'; ret = GetVolumeNameForVolumeMountPointA(path, volume, len); ok(ret == FALSE && GetLastError() == ERROR_FILE_NOT_FOUND, - "GetVolumeNameForVolumeMountPointA failed on %s, last=%d\n", + "GetVolumeNameForVolumeMountPointA failed on %s, last=%ld\n", path, GetLastError());
/* Try without trailing \ and on a nonexistent dos drive */ path[2] = 0; ret = GetVolumeNameForVolumeMountPointA(path, volume, len); ok(ret == FALSE && GetLastError() == ERROR_INVALID_NAME, - "GetVolumeNameForVolumeMountPointA failed on %s, last=%d\n", + "GetVolumeNameForVolumeMountPointA failed on %s, last=%ld\n", path, GetLastError()); } } @@ -300,7 +301,7 @@ static void test_GetVolumeNameForVolumeMountPointW(void) ok(ret == FALSE, "GetVolumeNameForVolumeMountPointW succeeded\n"); ok(GetLastError() == ERROR_FILENAME_EXCED_RANGE || GetLastError() == ERROR_INVALID_PARAMETER, /* Vista */ - "wrong error, last=%d\n", GetLastError()); + "wrong error, last=%ld\n", GetLastError());
if (0) { /* these crash on XP */ ret = GetVolumeNameForVolumeMountPointW(path, NULL, len); @@ -403,34 +404,34 @@ static void test_GetVolumeInformationA(void) /* get windows drive letter and update strings for testing */ result = GetWindowsDirectoryA(windowsdir, sizeof(windowsdir)); ok(result < sizeof(windowsdir), "windowsdir is abnormally long!\n"); - ok(result != 0, "GetWindowsDirectory: error %d\n", GetLastError()); + ok(result != 0, "GetWindowsDirectory: error %ld\n", GetLastError()); Root_Colon[0] = windowsdir[0]; Root_Slash[0] = windowsdir[0]; Root_UNC[4] = windowsdir[0];
result = GetCurrentDirectoryA(MAX_PATH, currentdir); - ok(result, "GetCurrentDirectory: error %d\n", GetLastError()); + ok(result, "GetCurrentDirectory: error %ld\n", GetLastError()); /* Note that GetCurrentDir yields no trailing slash for subdirs */
/* check for NO error on no trailing \ when current dir is root dir */ ret = SetCurrentDirectoryA(Root_Slash); - ok(ret, "SetCurrentDirectory: error %d\n", GetLastError()); + ok(ret, "SetCurrentDirectory: error %ld\n", GetLastError()); ret = GetVolumeInformationA(Root_Colon, vol_name_buf, vol_name_size, NULL, NULL, NULL, fs_name_buf, fs_name_len); - ok(ret, "GetVolumeInformationA root failed, last error %u\n", GetLastError()); + ok(ret, "GetVolumeInformationA root failed, last error %lu\n", GetLastError());
/* check for error on no trailing \ when current dir is subdir (windows) of queried drive */ ret = SetCurrentDirectoryA(windowsdir); - ok(ret, "SetCurrentDirectory: error %d\n", GetLastError()); + ok(ret, "SetCurrentDirectory: error %ld\n", GetLastError()); SetLastError(0xdeadbeef); ret = GetVolumeInformationA(Root_Colon, vol_name_buf, vol_name_size, NULL, NULL, NULL, fs_name_buf, fs_name_len); ok(!ret && (GetLastError() == ERROR_INVALID_NAME), - "GetVolumeInformationA did%s fail, last error %u\n", ret ? " not":"", GetLastError()); + "GetVolumeInformationA did%s fail, last error %lu\n", ret ? " not":"", GetLastError());
/* reset current directory */ ret = SetCurrentDirectoryA(currentdir); - ok(ret, "SetCurrentDirectory: error %d\n", GetLastError()); + ok(ret, "SetCurrentDirectory: error %ld\n", GetLastError());
if (toupper(currentdir[0]) == toupper(windowsdir[0])) { skip("Please re-run from another device than %c:\n", windowsdir[0]); @@ -445,26 +446,26 @@ static void test_GetVolumeInformationA(void) ok(ret, "SetEnvironmentVariable %s failed\n", Root_Env);
ret = SetCurrentDirectoryA(windowsdir); - ok(ret, "SetCurrentDirectory: error %d\n", GetLastError()); + ok(ret, "SetCurrentDirectory: error %ld\n", GetLastError()); ret = SetCurrentDirectoryA(currentdir); - ok(ret, "SetCurrentDirectory: error %d\n", GetLastError()); + ok(ret, "SetCurrentDirectory: error %ld\n", GetLastError());
/* windows dir is current on the root drive, call fails */ SetLastError(0xdeadbeef); ret = GetVolumeInformationA(Root_Colon, vol_name_buf, vol_name_size, NULL, NULL, NULL, fs_name_buf, fs_name_len); ok(!ret && (GetLastError() == ERROR_INVALID_NAME), - "GetVolumeInformationA did%s fail, last error %u\n", ret ? " not":"", GetLastError()); + "GetVolumeInformationA did%s fail, last error %lu\n", ret ? " not":"", GetLastError());
/* Try normal drive letter with trailing \ */ ret = GetVolumeInformationA(Root_Slash, vol_name_buf, vol_name_size, NULL, NULL, NULL, fs_name_buf, fs_name_len); - ok(ret, "GetVolumeInformationA with \ failed, last error %u\n", GetLastError()); + ok(ret, "GetVolumeInformationA with \ failed, last error %lu\n", GetLastError());
ret = SetCurrentDirectoryA(Root_Slash); - ok(ret, "SetCurrentDirectory: error %d\n", GetLastError()); + ok(ret, "SetCurrentDirectory: error %ld\n", GetLastError()); ret = SetCurrentDirectoryA(currentdir); - ok(ret, "SetCurrentDirectory: error %d\n", GetLastError()); + ok(ret, "SetCurrentDirectory: error %ld\n", GetLastError());
/* windows dir is STILL CURRENT on root drive; the call fails as before, */ /* proving that SetCurrentDir did not remember the other drive's directory */ @@ -472,7 +473,7 @@ static void test_GetVolumeInformationA(void) ret = GetVolumeInformationA(Root_Colon, vol_name_buf, vol_name_size, NULL, NULL, NULL, fs_name_buf, fs_name_len); ok(!ret && (GetLastError() == ERROR_INVALID_NAME), - "GetVolumeInformationA did%s fail, last error %u\n", ret ? " not":"", GetLastError()); + "GetVolumeInformationA did%s fail, last error %lu\n", ret ? " not":"", GetLastError());
/* Now C:\ becomes the current directory on drive C: */ ret = SetEnvironmentVariableA(Root_Env, Root_Slash); /* set =C:=C:\ */ @@ -481,42 +482,42 @@ static void test_GetVolumeInformationA(void) /* \ is current on root drive, call succeeds */ ret = GetVolumeInformationA(Root_Colon, vol_name_buf, vol_name_size, NULL, NULL, NULL, fs_name_buf, fs_name_len); - ok(ret, "GetVolumeInformationA failed, last error %u\n", GetLastError()); + ok(ret, "GetVolumeInformationA failed, last error %lu\n", GetLastError());
/* again, SetCurrentDirectory on another drive does not matter */ ret = SetCurrentDirectoryA(Root_Slash); - ok(ret, "SetCurrentDirectory: error %d\n", GetLastError()); + ok(ret, "SetCurrentDirectory: error %ld\n", GetLastError()); ret = SetCurrentDirectoryA(currentdir); - ok(ret, "SetCurrentDirectory: error %d\n", GetLastError()); + ok(ret, "SetCurrentDirectory: error %ld\n", GetLastError());
/* \ is current on root drive, call succeeds */ ret = GetVolumeInformationA(Root_Colon, vol_name_buf, vol_name_size, NULL, NULL, NULL, fs_name_buf, fs_name_len); - ok(ret, "GetVolumeInformationA failed, last error %u\n", GetLastError()); + ok(ret, "GetVolumeInformationA failed, last error %lu\n", GetLastError()); }
/* try null root directory to return "root of the current directory" */ ret = GetVolumeInformationA(NULL, vol_name_buf, vol_name_size, NULL, NULL, NULL, fs_name_buf, fs_name_len); - ok(ret, "GetVolumeInformationA failed on null root dir, last error %u\n", GetLastError()); + ok(ret, "GetVolumeInformationA failed on null root dir, last error %lu\n", GetLastError());
/* Try normal drive letter with trailing \ */ ret = GetVolumeInformationA(Root_Slash, vol_name_buf, vol_name_size, &vol_serial_num, &max_comp_len, &fs_flags, fs_name_buf, fs_name_len); - ok(ret, "GetVolumeInformationA failed, root=%s, last error=%u\n", Root_Slash, GetLastError()); + ok(ret, "GetVolumeInformationA failed, root=%s, last error=%lu\n", Root_Slash, GetLastError());
/* try again with drive letter and the "disable parsing" prefix */ SetLastError(0xdeadbeef); ret = GetVolumeInformationA(Root_UNC, vol_name_buf, vol_name_size, &vol_serial_num, &max_comp_len, &fs_flags, fs_name_buf, fs_name_len); - ok(ret, "GetVolumeInformationA did%s fail, root=%s, last error=%u\n", ret ? " not":"", Root_UNC, GetLastError()); + ok(ret, "GetVolumeInformationA did%s fail, root=%s, last error=%lu\n", ret ? " not":"", Root_UNC, GetLastError());
/* try again with device name space */ Root_UNC[2] = '.'; SetLastError(0xdeadbeef); ret = GetVolumeInformationA(Root_UNC, vol_name_buf, vol_name_size, &vol_serial_num, &max_comp_len, &fs_flags, fs_name_buf, fs_name_len); - ok(ret, "GetVolumeInformationA did%s fail, root=%s, last error=%u\n", ret ? " not":"", Root_UNC, GetLastError()); + ok(ret, "GetVolumeInformationA did%s fail, root=%s, last error=%lu\n", ret ? " not":"", Root_UNC, GetLastError());
/* try again with a directory off the root - should generate error */ if (windowsdir[strlen(windowsdir)-1] != '\') strcat(windowsdir, "\"); @@ -524,14 +525,14 @@ static void test_GetVolumeInformationA(void) ret = GetVolumeInformationA(windowsdir, vol_name_buf, vol_name_size, &vol_serial_num, &max_comp_len, &fs_flags, fs_name_buf, fs_name_len); ok(!ret && (GetLastError()==ERROR_DIR_NOT_ROOT), - "GetVolumeInformationA did%s fail, root=%s, last error=%u\n", ret ? " not":"", windowsdir, GetLastError()); + "GetVolumeInformationA did%s fail, root=%s, last error=%lu\n", ret ? " not":"", windowsdir, GetLastError()); /* A subdir with trailing \ yields DIR_NOT_ROOT instead of INVALID_NAME */ if (windowsdir[strlen(windowsdir)-1] == '\') windowsdir[strlen(windowsdir)-1] = 0; SetLastError(0xdeadbeef); ret = GetVolumeInformationA(windowsdir, vol_name_buf, vol_name_size, &vol_serial_num, &max_comp_len, &fs_flags, fs_name_buf, fs_name_len); ok(!ret && (GetLastError()==ERROR_INVALID_NAME), - "GetVolumeInformationA did%s fail, root=%s, last error=%u\n", ret ? " not":"", windowsdir, GetLastError()); + "GetVolumeInformationA did%s fail, root=%s, last error=%lu\n", ret ? " not":"", windowsdir, GetLastError());
/* get the unique volume name for the windows drive */ ret = GetVolumeNameForVolumeMountPointA(Root_Slash, volume, MAX_PATH); @@ -540,7 +541,7 @@ static void test_GetVolumeInformationA(void) /* try again with unique volume name */ ret = GetVolumeInformationA(volume, vol_name_buf, vol_name_size, &vol_serial_num, &max_comp_len, &fs_flags, fs_name_buf, fs_name_len); - ok(ret, "GetVolumeInformationA failed, root=%s, last error=%u\n", volume, GetLastError()); + ok(ret, "GetVolumeInformationA failed, root=%s, last error=%lu\n", volume, GetLastError()); }
/* Test to check that unique volume name from windows dir mount point */ @@ -559,7 +560,7 @@ static void test_enum_vols(void) /*get windows drive letter and update strings for testing */ ret = GetWindowsDirectoryA( windowsdir, sizeof(windowsdir) ); ok(ret < sizeof(windowsdir), "windowsdir is abnormally long!\n"); - ok(ret != 0, "GetWindowsDirectory: error %d\n", GetLastError()); + ok(ret != 0, "GetWindowsDirectory: error %ld\n", GetLastError()); path[0] = windowsdir[0];
/* get the unique volume name for the windows drive */ @@ -569,7 +570,7 @@ static void test_enum_vols(void)
/* get first unique volume name of list */ hFind = pFindFirstVolumeA( Volume_2, MAX_PATH ); - ok(hFind != INVALID_HANDLE_VALUE, "FindFirstVolume failed, err=%u\n", + ok(hFind != INVALID_HANDLE_VALUE, "FindFirstVolume failed, err=%lu\n", GetLastError());
do @@ -596,7 +597,7 @@ static void test_disk_extents(void) handle = CreateFileA( "\\.\c:", GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0 ); if (handle == INVALID_HANDLE_VALUE) { - win_skip("can't open c: drive %u\n", GetLastError()); + win_skip("can't open c: drive %lu\n", GetLastError()); return; } size = 0; @@ -608,8 +609,8 @@ static void test_disk_extents(void) CloseHandle( handle ); return; } - ok(ret, "DeviceIoControl failed %u\n", GetLastError()); - ok(size == 32, "expected 32, got %u\n", size); + ok(ret, "DeviceIoControl failed %lu\n", GetLastError()); + ok(size == 32, "expected 32, got %lu\n", size); CloseHandle( handle ); }
@@ -627,7 +628,7 @@ static void test_disk_query_property(void) 0, 0); if (handle == INVALID_HANDLE_VALUE) { - win_skip("can't open \\.\PhysicalDrive0 %#x\n", GetLastError()); + win_skip("can't open \\.\PhysicalDrive0 %#lx\n", GetLastError()); return; }
@@ -639,20 +640,20 @@ static void test_disk_query_property(void) NULL); error = GetLastError(); ok(ret, "expect ret %#x, got %#x\n", TRUE, ret); - ok(error == 0xdeadbeef, "expect err %#x, got err %#x\n", 0xdeadbeef, error); - ok(size == sizeof(header), "got size %d\n", size); - ok(header.Version == sizeof(descriptor), "got header.Version %d\n", header.Version); - ok(header.Size >= sizeof(descriptor), "got header.Size %d\n", header.Size); + ok(error == 0xdeadbeef, "expect err %#x, got err %#lx\n", 0xdeadbeef, error); + ok(size == sizeof(header), "got size %ld\n", size); + ok(header.Version == sizeof(descriptor), "got header.Version %ld\n", header.Version); + ok(header.Size >= sizeof(descriptor), "got header.Size %ld\n", header.Size);
SetLastError(0xdeadbeef); ret = DeviceIoControl(handle, IOCTL_STORAGE_QUERY_PROPERTY, &query, sizeof(query), &descriptor, sizeof(descriptor), &size, NULL); error = GetLastError(); ok(ret, "expect ret %#x, got %#x\n", TRUE, ret); - ok(error == 0xdeadbeef, "expect err %#x, got err %#x\n", 0xdeadbeef, error); - ok(size == sizeof(descriptor), "got size %d\n", size); - ok(descriptor.Version == sizeof(descriptor), "got descriptor.Version %d\n", descriptor.Version); - ok(descriptor.Size >= sizeof(descriptor), "got descriptor.Size %d\n", descriptor.Size); + ok(error == 0xdeadbeef, "expect err %#x, got err %#lx\n", 0xdeadbeef, error); + ok(size == sizeof(descriptor), "got size %ld\n", size); + ok(descriptor.Version == sizeof(descriptor), "got descriptor.Version %ld\n", descriptor.Version); + ok(descriptor.Size >= sizeof(descriptor), "got descriptor.Size %ld\n", descriptor.Size);
CloseHandle(handle); } @@ -844,7 +845,7 @@ static void test_GetVolumePathNameA(void) { /* On success Windows always returns ERROR_MORE_DATA, so only worry about failure */ success = (error == test_paths[i].error || broken(error == test_paths[i].broken_error)); - ok(success, "GetVolumePathName test %d unexpectedly returned error 0x%x (expected 0x%x).\n", + ok(success, "GetVolumePathName test %d unexpectedly returned error 0x%lx (expected 0x%lx).\n", i, error, test_paths[i].error); }
@@ -854,14 +855,14 @@ static void test_GetVolumePathNameA(void) }
ret = GetCurrentDirectoryA( sizeof(cwd), cwd ); - ok(ret, "Failed to obtain the current working directory, error %u.\n", GetLastError()); + ok(ret, "Failed to obtain the current working directory, error %lu.\n", GetLastError()); ret = GetVolumePathNameA( cwd, expect_path, sizeof(expect_path) ); - ok(ret, "Failed to obtain the current volume path, error %u.\n", GetLastError()); + ok(ret, "Failed to obtain the current volume path, error %lu.\n", GetLastError());
for (i = 0; i < ARRAY_SIZE(relative_tests); i++) { ret = GetVolumePathNameA( relative_tests[i], volume_path, sizeof(volume_path) ); - ok(ret, "GetVolumePathName(%s) failed unexpectedly, error %u.\n", + ok(ret, "GetVolumePathName(%s) failed unexpectedly, error %lu.\n", debugstr_a( relative_tests[i] ), GetLastError()); ok(!strcmp( volume_path, expect_path ), "%s: expected %s, got %s.\n", debugstr_a( relative_tests[i] ), debugstr_a( expect_path ), debugstr_a( volume_path )); @@ -871,27 +872,27 @@ static void test_GetVolumePathNameA(void) for (i = 0; i < ARRAY_SIZE(global_prefix_tests); i++) { ret = GetVolumePathNameA( global_prefix_tests[i], volume_path, sizeof(volume_path) ); - ok(ret, "GetVolumePathName(%s) failed unexpectedly, error %u.\n", + ok(ret, "GetVolumePathName(%s) failed unexpectedly, error %lu.\n", debugstr_a( global_prefix_tests[i] ), GetLastError()); ok(!strcmp( volume_path, cwd ), "%s: expected %s, got %s.\n", debugstr_a( global_prefix_tests[i] ), debugstr_a( cwd ), debugstr_a( volume_path )); }
ret = GetVolumePathNameA( "C:.", expect_path, sizeof(expect_path) ); - ok(ret, "Failed to obtain the volume path, error %u.\n", GetLastError()); + ok(ret, "Failed to obtain the volume path, error %lu.\n", GetLastError());
SetLastError( 0xdeadbeef ); ret = GetVolumePathNameA( "C::", volume_path, 1 ); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_FILENAME_EXCED_RANGE, "Got error %u.\n", GetLastError()); + ok(GetLastError() == ERROR_FILENAME_EXCED_RANGE, "Got error %lu.\n", GetLastError());
ret = GetVolumePathNameA( "C::", volume_path, sizeof(volume_path) ); - ok(ret, "Failed to obtain the volume path, error %u.\n", GetLastError()); + ok(ret, "Failed to obtain the volume path, error %lu.\n", GetLastError()); ok(!strcmp(volume_path, expect_path), "Expected %s, got %s.\n", debugstr_a( expect_path ), debugstr_a( volume_path ));
ret = GetVolumePathNameA( "C:ABC:DEF:\AnInvalidFolder", volume_path, sizeof(volume_path) ); - ok(ret, "Failed to obtain the volume path, error %u.\n", GetLastError()); + ok(ret, "Failed to obtain the volume path, error %lu.\n", GetLastError()); ok(!strcmp(volume_path, expect_path), "Expected %s, got %s.\n", debugstr_a( expect_path ), debugstr_a( volume_path )); } @@ -905,7 +906,7 @@ static void test_GetVolumePathNameW(void) volume_path[1] = 0x11; ret = GetVolumePathNameW( L"C:\", volume_path, 1 ); ok(!ret, "GetVolumePathNameW test succeeded unexpectedly.\n"); - ok(GetLastError() == ERROR_FILENAME_EXCED_RANGE, "GetVolumePathNameW unexpectedly returned error 0x%x (expected 0x%x).\n", + ok(GetLastError() == ERROR_FILENAME_EXCED_RANGE, "GetVolumePathNameW unexpectedly returned error 0x%lx (expected 0x%x).\n", GetLastError(), ERROR_FILENAME_EXCED_RANGE); ok(volume_path[1] == 0x11, "GetVolumePathW corrupted byte after end of buffer.\n");
@@ -913,7 +914,7 @@ static void test_GetVolumePathNameW(void) volume_path[2] = 0x11; ret = GetVolumePathNameW( L"C:\", volume_path, 2 ); ok(!ret, "GetVolumePathNameW test succeeded unexpectedly.\n"); - ok(GetLastError() == ERROR_FILENAME_EXCED_RANGE, "GetVolumePathNameW unexpectedly returned error 0x%x (expected 0x%x).\n", + ok(GetLastError() == ERROR_FILENAME_EXCED_RANGE, "GetVolumePathNameW unexpectedly returned error 0x%lx (expected 0x%x).\n", GetLastError(), ERROR_FILENAME_EXCED_RANGE); ok(volume_path[2] == 0x11, "GetVolumePathW corrupted byte after end of buffer.\n");
@@ -946,36 +947,36 @@ static void test_GetVolumePathNamesForVolumeNameA(void) }
ret = GetVolumeNameForVolumeMountPointA( "c:\", volume, sizeof(volume) ); - ok(ret, "failed to get volume name %u\n", GetLastError()); + ok(ret, "failed to get volume name %lu\n", GetLastError()); trace("c:\ -> %s\n", volume);
SetLastError( 0xdeadbeef ); ret = pGetVolumePathNamesForVolumeNameA( NULL, NULL, 0, NULL ); error = GetLastError(); ok(!ret, "expected failure\n"); - ok(error == ERROR_INVALID_NAME, "expected ERROR_INVALID_NAME got %u\n", error); + ok(error == ERROR_INVALID_NAME, "expected ERROR_INVALID_NAME got %lu\n", error);
SetLastError( 0xdeadbeef ); ret = pGetVolumePathNamesForVolumeNameA( "", NULL, 0, NULL ); error = GetLastError(); ok(!ret, "expected failure\n"); - ok(error == ERROR_INVALID_NAME, "expected ERROR_INVALID_NAME got %u\n", error); + ok(error == ERROR_INVALID_NAME, "expected ERROR_INVALID_NAME got %lu\n", error);
SetLastError( 0xdeadbeef ); ret = pGetVolumePathNamesForVolumeNameA( volume, NULL, 0, NULL ); error = GetLastError(); ok(!ret, "expected failure\n"); - ok(error == ERROR_MORE_DATA, "expected ERROR_MORE_DATA got %u\n", error); + ok(error == ERROR_MORE_DATA, "expected ERROR_MORE_DATA got %lu\n", error);
SetLastError( 0xdeadbeef ); ret = pGetVolumePathNamesForVolumeNameA( volume, buffer, 0, NULL ); error = GetLastError(); ok(!ret, "expected failure\n"); - ok(error == ERROR_MORE_DATA, "expected ERROR_MORE_DATA got %u\n", error); + ok(error == ERROR_MORE_DATA, "expected ERROR_MORE_DATA got %lu\n", error);
memset( buffer, 0xff, sizeof(buffer) ); ret = pGetVolumePathNamesForVolumeNameA( volume, buffer, sizeof(buffer), NULL ); - ok(ret, "failed to get path names %u\n", GetLastError()); + ok(ret, "failed to get path names %lu\n", GetLastError()); ok(!strcmp( "C:\", buffer ), "expected "\C:" got "%s"\n", buffer); ok(!buffer[4], "expected double null-terminated buffer\n");
@@ -984,34 +985,34 @@ static void test_GetVolumePathNamesForVolumeNameA(void) ret = pGetVolumePathNamesForVolumeNameA( NULL, NULL, 0, &len ); error = GetLastError(); ok(!ret, "expected failure\n"); - ok(error == ERROR_INVALID_NAME, "expected ERROR_INVALID_NAME got %u\n", error); + ok(error == ERROR_INVALID_NAME, "expected ERROR_INVALID_NAME got %lu\n", error);
len = 0; SetLastError( 0xdeadbeef ); ret = pGetVolumePathNamesForVolumeNameA( NULL, NULL, sizeof(buffer), &len ); error = GetLastError(); ok(!ret, "expected failure\n"); - ok(error == ERROR_INVALID_NAME, "expected ERROR_INVALID_NAME got %u\n", error); + ok(error == ERROR_INVALID_NAME, "expected ERROR_INVALID_NAME got %lu\n", error);
len = 0; SetLastError( 0xdeadbeef ); ret = pGetVolumePathNamesForVolumeNameA( NULL, buffer, sizeof(buffer), &len ); error = GetLastError(); ok(!ret, "expected failure\n"); - ok(error == ERROR_INVALID_NAME, "expected ERROR_INVALID_NAME got %u\n", error); + ok(error == ERROR_INVALID_NAME, "expected ERROR_INVALID_NAME got %lu\n", error);
len = 0; SetLastError( 0xdeadbeef ); ret = pGetVolumePathNamesForVolumeNameA( NULL, buffer, sizeof(buffer), &len ); error = GetLastError(); ok(!ret, "expected failure\n"); - ok(error == ERROR_INVALID_NAME, "expected ERROR_INVALID_NAME got %u\n", error); + ok(error == ERROR_INVALID_NAME, "expected ERROR_INVALID_NAME got %lu\n", error);
len = 0; memset( buffer, 0xff, sizeof(buffer) ); ret = pGetVolumePathNamesForVolumeNameA( volume, buffer, sizeof(buffer), &len ); - ok(ret, "failed to get path names %u\n", GetLastError()); - ok(len == 5 || broken(len == 2), "expected 5 got %u\n", len); + ok(ret, "failed to get path names %lu\n", GetLastError()); + ok(len == 5 || broken(len == 2), "expected 5 got %lu\n", len); ok(!strcmp( "C:\", buffer ), "expected "\C:" got "%s"\n", buffer); ok(!buffer[4], "expected double null-terminated buffer\n"); } @@ -1034,39 +1035,39 @@ static void test_GetVolumePathNamesForVolumeNameW(void) }
ret = GetVolumeNameForVolumeMountPointW( drive_c, volume, ARRAY_SIZE(volume) ); - ok(ret, "failed to get volume name %u\n", GetLastError()); + ok(ret, "failed to get volume name %lu\n", GetLastError());
SetLastError( 0xdeadbeef ); ret = pGetVolumePathNamesForVolumeNameW( empty, NULL, 0, NULL ); error = GetLastError(); ok(!ret, "expected failure\n"); - ok(error == ERROR_INVALID_NAME, "expected ERROR_INVALID_NAME got %u\n", error); + ok(error == ERROR_INVALID_NAME, "expected ERROR_INVALID_NAME got %lu\n", error);
SetLastError( 0xdeadbeef ); ret = pGetVolumePathNamesForVolumeNameW( volume, NULL, 0, NULL ); error = GetLastError(); ok(!ret, "expected failure\n"); - ok(error == ERROR_MORE_DATA, "expected ERROR_MORE_DATA got %u\n", error); + ok(error == ERROR_MORE_DATA, "expected ERROR_MORE_DATA got %lu\n", error);
SetLastError( 0xdeadbeef ); ret = pGetVolumePathNamesForVolumeNameW( volume, buffer, 0, NULL ); error = GetLastError(); ok(!ret, "expected failure\n"); - ok(error == ERROR_MORE_DATA, "expected ERROR_MORE_DATA got %u\n", error); + ok(error == ERROR_MORE_DATA, "expected ERROR_MORE_DATA got %lu\n", error);
if (0) { /* crash */ ret = pGetVolumePathNamesForVolumeNameW( volume, NULL, ARRAY_SIZE(buffer), NULL ); - ok(ret, "failed to get path names %u\n", GetLastError()); + ok(ret, "failed to get path names %lu\n", GetLastError()); }
ret = pGetVolumePathNamesForVolumeNameW( volume, buffer, ARRAY_SIZE(buffer), NULL ); - ok(ret, "failed to get path names %u\n", GetLastError()); + ok(ret, "failed to get path names %lu\n", GetLastError());
len = 0; memset( buffer, 0xff, sizeof(buffer) ); ret = pGetVolumePathNamesForVolumeNameW( volume, buffer, ARRAY_SIZE(buffer), &len ); - ok(ret, "failed to get path names %u\n", GetLastError()); - ok(len == 5, "expected 5 got %u\n", len); + ok(ret, "failed to get path names %lu\n", GetLastError()); + ok(len == 5, "expected 5 got %lu\n", len); ok(!buffer[4], "expected double null-terminated buffer\n");
len = 0; @@ -1076,7 +1077,7 @@ static void test_GetVolumePathNamesForVolumeNameW(void) ret = pGetVolumePathNamesForVolumeNameW( volume, buffer, ARRAY_SIZE(buffer), &len ); error = GetLastError(); ok(!ret, "expected failure\n"); - ok(error == ERROR_INVALID_NAME, "expected ERROR_INVALID_NAME got %u\n", error); + ok(error == ERROR_INVALID_NAME, "expected ERROR_INVALID_NAME got %lu\n", error);
len = 0; volume[0] = '\'; @@ -1085,7 +1086,7 @@ static void test_GetVolumePathNamesForVolumeNameW(void) ret = pGetVolumePathNamesForVolumeNameW( volume, buffer, ARRAY_SIZE(buffer), &len ); error = GetLastError(); ok(!ret, "expected failure\n"); - todo_wine ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %u\n", error); + todo_wine ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %lu\n", error);
len = 0; lstrcpyW( volume, volume_null ); @@ -1093,7 +1094,7 @@ static void test_GetVolumePathNamesForVolumeNameW(void) ret = pGetVolumePathNamesForVolumeNameW( volume, buffer, ARRAY_SIZE(buffer), &len ); error = GetLastError(); ok(!ret, "expected failure\n"); - ok(error == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND got %u\n", error); + ok(error == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND got %lu\n", error); }
static void test_dvd_read_structure(HANDLE handle) @@ -1123,7 +1124,7 @@ static void test_dvd_read_structure(HANDLE handle)
if(!ret) { - skip("IOCTL_DVD_READ_STRUCTURE not supported: %u\n", GetLastError()); + skip("IOCTL_DVD_READ_STRUCTURE not supported: %lu\n", GetLastError()); return; }
@@ -1180,7 +1181,7 @@ static void test_dvd_read_structure(HANDLE handle) /* Strangely, with NULL lpOutBuffer, last error is insufficient buffer, not invalid parameter as we could expect */ ret = DeviceIoControl(handle, IOCTL_DVD_READ_STRUCTURE, &dvdReadStructure, sizeof(DVD_READ_STRUCTURE), NULL, sizeof(DVD_COPYRIGHT_DESCRIPTOR), &nbBytes, NULL); - ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "IOCTL_DVD_READ_STRUCTURE should have failed %d %u\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "IOCTL_DVD_READ_STRUCTURE should have failed %d %lu\n", ret, GetLastError());
for(i=0; i<sizeof(DVD_COPYRIGHT_DESCRIPTOR); i++) { @@ -1188,7 +1189,7 @@ static void test_dvd_read_structure(HANDLE handle)
ret = DeviceIoControl(handle, IOCTL_DVD_READ_STRUCTURE, &dvdReadStructure, sizeof(DVD_READ_STRUCTURE), &dvdCopyrightDescriptor, i, &nbBytes, NULL); - ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "IOCTL_DVD_READ_STRUCTURE should have failed %d %u\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "IOCTL_DVD_READ_STRUCTURE should have failed %d %lu\n", ret, GetLastError()); }
@@ -1200,7 +1201,7 @@ static void test_dvd_read_structure(HANDLE handle) ret = DeviceIoControl(handle, IOCTL_DVD_READ_STRUCTURE, &dvdReadStructure, sizeof(DVD_READ_STRUCTURE), &completeDvdManufacturerDescriptor, sizeof(DVD_MANUFACTURER_DESCRIPTOR), &nbBytes, NULL); ok(ret || broken(GetLastError() == ERROR_NOT_READY), - "IOCTL_DVD_READ_STRUCTURE (DvdManufacturerDescriptor) failed, last error = %u\n", GetLastError()); + "IOCTL_DVD_READ_STRUCTURE (DvdManufacturerDescriptor) failed, last error = %lu\n", GetLastError()); if(!ret) return;
@@ -1214,7 +1215,7 @@ static void test_dvd_read_structure(HANDLE handle) /* Basic parameter check */ ret = DeviceIoControl(handle, IOCTL_DVD_READ_STRUCTURE, &dvdReadStructure, sizeof(DVD_READ_STRUCTURE), NULL, sizeof(DVD_MANUFACTURER_DESCRIPTOR), &nbBytes, NULL); - ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "IOCTL_DVD_READ_STRUCTURE should have failed %d %u\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "IOCTL_DVD_READ_STRUCTURE should have failed %d %lu\n", ret, GetLastError()); }
static void test_cdrom_ioctl(void) @@ -1226,7 +1227,7 @@ static void test_cdrom_ioctl(void) bitmask = GetLogicalDrives(); if(!bitmask) { - trace("GetLogicalDrives failed : %u\n", GetLastError()); + trace("GetLogicalDrives failed : %lu\n", GetLastError()); return; }
@@ -1248,7 +1249,7 @@ static void test_cdrom_ioctl(void) handle = CreateFileA(drive_full_path, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0); if(handle == INVALID_HANDLE_VALUE) { - trace("Failed to open the device : %u\n", GetLastError()); + trace("Failed to open the device : %lu\n", GetLastError()); continue; }
@@ -1273,25 +1274,25 @@ static void test_mounted_folder(void)
file = CreateFileA( "C:\", 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, NULL ); - ok(file != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "got error %lu\n", GetLastError());
status = NtQueryInformationFile( file, &io, &info, sizeof(info), FileAttributeTagInformation ); - ok(!status, "got status %#x\n", status); + ok(!status, "got status %#lx\n", status); ok(!(info.FileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) - && (info.FileAttributes & FILE_ATTRIBUTE_DIRECTORY), "got attributes %#x\n", info.FileAttributes); - ok(!info.ReparseTag, "got reparse tag %#x\n", info.ReparseTag); + && (info.FileAttributes & FILE_ATTRIBUTE_DIRECTORY), "got attributes %#lx\n", info.FileAttributes); + ok(!info.ReparseTag, "got reparse tag %#lx\n", info.ReparseTag);
CloseHandle( file );
file = CreateFileA( "C:\", 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL ); - ok(file != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "got error %lu\n", GetLastError());
status = NtQueryInformationFile( file, &io, &info, sizeof(info), FileAttributeTagInformation ); - ok(!status, "got status %#x\n", status); + ok(!status, "got status %#lx\n", status); ok(!(info.FileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) - && (info.FileAttributes & FILE_ATTRIBUTE_DIRECTORY), "got attributes %#x\n", info.FileAttributes); - ok(!info.ReparseTag, "got reparse tag %#x\n", info.ReparseTag); + && (info.FileAttributes & FILE_ATTRIBUTE_DIRECTORY), "got attributes %#lx\n", info.FileAttributes); + ok(!info.ReparseTag, "got reparse tag %#lx\n", info.ReparseTag);
CloseHandle( file );
@@ -1304,10 +1305,10 @@ static void test_mounted_folder(void) skip("Not enough permissions to create a folder in the C: drive.\n"); return; } - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = GetVolumeNameForVolumeMountPointA( "C:\", volume_name, sizeof(volume_name) ); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = SetVolumeMountPointA( "C:\winetest_mnt\", volume_name ); if (!ret) @@ -1316,21 +1317,21 @@ static void test_mounted_folder(void) RemoveDirectoryA( "C:\winetest_mnt" ); return; } - todo_wine ok(ret, "got error %u\n", GetLastError()); + todo_wine ok(ret, "got error %lu\n", GetLastError());
file = CreateFileA( "C:\winetest_mnt", 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, NULL ); - ok(file != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "got error %lu\n", GetLastError());
status = NtQueryInformationFile( file, &io, &info, sizeof(info), FileAttributeTagInformation ); - ok(!status, "got status %#x\n", status); + ok(!status, "got status %#lx\n", status); ok((info.FileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) - && (info.FileAttributes & FILE_ATTRIBUTE_DIRECTORY), "got attributes %#x\n", info.FileAttributes); - ok(info.ReparseTag == IO_REPARSE_TAG_MOUNT_POINT, "got reparse tag %#x\n", info.ReparseTag); + && (info.FileAttributes & FILE_ATTRIBUTE_DIRECTORY), "got attributes %#lx\n", info.FileAttributes); + ok(info.ReparseTag == IO_REPARSE_TAG_MOUNT_POINT, "got reparse tag %#lx\n", info.ReparseTag);
status = NtQueryInformationFile( file, &io, name, sizeof(name_buffer), FileNameInformation ); - ok(!status, "got status %#x\n", status); - ok(name->FileNameLength == wcslen(L"\winetest_mnt") * sizeof(WCHAR), "got length %u\n", name->FileNameLength); + ok(!status, "got status %#lx\n", status); + ok(name->FileNameLength == wcslen(L"\winetest_mnt") * sizeof(WCHAR), "got length %lu\n", name->FileNameLength); ok(!wcsnicmp(name->FileName, L"\winetest_mnt", wcslen(L"\winetest_mnt")), "got name %s\n", debugstr_wn(name->FileName, name->FileNameLength / sizeof(WCHAR)));
@@ -1338,100 +1339,100 @@ static void test_mounted_folder(void)
file = CreateFileA( "C:\winetest_mnt", 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL ); - ok(file != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "got error %lu\n", GetLastError());
status = NtQueryInformationFile( file, &io, &info, sizeof(info), FileAttributeTagInformation ); - ok(!status, "got status %#x\n", status); + ok(!status, "got status %#lx\n", status); ok(!(info.FileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) - && (info.FileAttributes & FILE_ATTRIBUTE_DIRECTORY), "got attributes %#x\n", info.FileAttributes); - ok(!info.ReparseTag, "got reparse tag %#x\n", info.ReparseTag); + && (info.FileAttributes & FILE_ATTRIBUTE_DIRECTORY), "got attributes %#lx\n", info.FileAttributes); + ok(!info.ReparseTag, "got reparse tag %#lx\n", info.ReparseTag);
status = NtQueryInformationFile( file, &io, name, sizeof(name_buffer), FileNameInformation ); - ok(!status, "got status %#x\n", status); - ok(name->FileNameLength == wcslen(L"\") * sizeof(WCHAR), "got length %u\n", name->FileNameLength); + ok(!status, "got status %#lx\n", status); + ok(name->FileNameLength == wcslen(L"\") * sizeof(WCHAR), "got length %lu\n", name->FileNameLength); ok(!wcsnicmp(name->FileName, L"\", wcslen(L"\")), "got name %s\n", debugstr_wn(name->FileName, name->FileNameLength / sizeof(WCHAR)));
CloseHandle( file );
ret = GetFileAttributesA( "C:\winetest_mnt" ); - ok(ret != INVALID_FILE_ATTRIBUTES, "got error %u\n", GetLastError()); + ok(ret != INVALID_FILE_ATTRIBUTES, "got error %lu\n", GetLastError()); ok((ret & FILE_ATTRIBUTE_REPARSE_POINT) && (ret & FILE_ATTRIBUTE_DIRECTORY), "got attributes %#x\n", ret);
file = CreateFileA( "C:\winetest_mnt\windows", 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL ); - ok(file != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "got error %lu\n", GetLastError());
status = NtQueryInformationFile( file, &io, name, sizeof(name_buffer), FileNameInformation ); - ok(!status, "got status %#x\n", status); - ok(name->FileNameLength == wcslen(L"\windows") * sizeof(WCHAR), "got length %u\n", name->FileNameLength); + ok(!status, "got status %#lx\n", status); + ok(name->FileNameLength == wcslen(L"\windows") * sizeof(WCHAR), "got length %lu\n", name->FileNameLength); ok(!wcsnicmp(name->FileName, L"\windows", wcslen(L"\windows")), "got name %s\n", debugstr_wn(name->FileName, name->FileNameLength / sizeof(WCHAR)));
CloseHandle( file );
ret = GetVolumePathNameA( "C:\winetest_mnt", path, sizeof(path) ); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(!strcmp(path, "C:\winetest_mnt\"), "got %s\n", debugstr_a(path)); SetLastError(0xdeadbeef); ret = GetVolumeNameForVolumeMountPointA( "C:\winetest_mnt", path, sizeof(path) ); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_INVALID_NAME, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_NAME, "wrong error %lu\n", GetLastError()); SetLastError(0xdeadbeef); ret = GetVolumeInformationA( "C:\winetest_mnt", NULL, 0, NULL, NULL, NULL, NULL, 0 ); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_INVALID_NAME, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_NAME, "wrong error %lu\n", GetLastError());
ret = GetVolumeNameForVolumeMountPointA( "C:\winetest_mnt\", path, sizeof(path) ); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(!strcmp(path, volume_name), "expected %s, got %s\n", debugstr_a(volume_name), debugstr_a(path)); ret = GetVolumeInformationA( "C:\winetest_mnt\", NULL, 0, NULL, NULL, NULL, NULL, 0 ); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = GetVolumePathNameA( "C:\winetest_mnt\windows", path, sizeof(path) ); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(!strcmp(path, "C:\winetest_mnt\"), "got %s\n", debugstr_a(path)); SetLastError(0xdeadbeef); ret = GetVolumeNameForVolumeMountPointA( "C:\winetest_mnt\windows\", path, sizeof(path) ); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_NOT_A_REPARSE_POINT, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_NOT_A_REPARSE_POINT, "wrong error %lu\n", GetLastError()); SetLastError(0xdeadbeef); ret = GetVolumeInformationA( "C:\winetest_mnt\windows\", NULL, 0, NULL, NULL, NULL, NULL, 0 ); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_DIR_NOT_ROOT, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_DIR_NOT_ROOT, "wrong error %lu\n", GetLastError());
ret = GetVolumePathNameA( "C:\winetest_mnt\nonexistent\", path, sizeof(path) ); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(!strcmp(path, "C:\winetest_mnt\"), "got %s\n", debugstr_a(path)); SetLastError(0xdeadbeef); ret = GetVolumeNameForVolumeMountPointA( "C:\winetest_mnt\nonexistent\", path, sizeof(path) ); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %lu\n", GetLastError()); SetLastError(0xdeadbeef); ret = GetVolumeInformationA( "C:\winetest_mnt\nonexistent\", NULL, 0, NULL, NULL, NULL, NULL, 0 ); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %lu\n", GetLastError());
ret = GetVolumePathNameA( "C:\winetest_mnt\winetest_mnt", path, sizeof(path) ); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(!strcmp(path, "C:\winetest_mnt\winetest_mnt\"), "got %s\n", debugstr_a(path)); ret = GetVolumeNameForVolumeMountPointA( "C:\winetest_mnt\winetest_mnt\", path, sizeof(path) ); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(!strcmp(path, volume_name), "expected %s, got %s\n", debugstr_a(volume_name), debugstr_a(path)); ret = GetVolumeInformationA( "C:\winetest_mnt\winetest_mnt\", NULL, 0, NULL, NULL, NULL, NULL, 0 ); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = GetVolumePathNameA( "C:/winetest_mnt/../winetest_mnt/.", path, sizeof(path) ); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(!strcmp(path, "C:\winetest_mnt\"), "got %s\n", debugstr_a(path)); ret = GetVolumeNameForVolumeMountPointA( "C:/winetest_mnt/../winetest_mnt/.\", path, sizeof(path) ); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(!strcmp(path, volume_name), "expected %s, got %s\n", debugstr_a(volume_name), debugstr_a(path)); ret = GetVolumeInformationA( "C:/winetest_mnt/../winetest_mnt/.\", NULL, 0, NULL, NULL, NULL, NULL, 0 ); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = GetVolumePathNamesForVolumeNameA( volume_name, path, sizeof(path), &size ); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); got_path = FALSE; for (p = path; *p; p += strlen(p) + 1) { @@ -1446,62 +1447,62 @@ static void test_mounted_folder(void) if (pCreateSymbolicLinkA) { ret = pCreateSymbolicLinkA( "C:\winetest_link", "C:\winetest_mnt\", SYMBOLIC_LINK_FLAG_DIRECTORY ); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = GetVolumePathNameA( "C:\winetest_link\", path, sizeof(path) ); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(!strcmp(path, "C:\"), "got %s\n", path); SetLastError(0xdeadbeef); ret = GetVolumeNameForVolumeMountPointA( "C:\winetest_link\", path, sizeof(path) ); ok(!ret, "expected failure\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER - || broken(GetLastError() == ERROR_SUCCESS) /* 2008 */, "wrong error %u\n", GetLastError()); + || broken(GetLastError() == ERROR_SUCCESS) /* 2008 */, "wrong error %lu\n", GetLastError()); ret = GetVolumeInformationA( "C:\winetest_link\", NULL, 0, NULL, NULL, NULL, NULL, 0 ); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = GetVolumePathNameA( "C:\winetest_link\windows\", path, sizeof(path) ); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(!strcmp(path, "C:\"), "got %s\n", path); SetLastError(0xdeadbeef); ret = GetVolumeNameForVolumeMountPointA( "C:\winetest_link\windows\", path, sizeof(path) ); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_NOT_A_REPARSE_POINT, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_NOT_A_REPARSE_POINT, "wrong error %lu\n", GetLastError()); SetLastError(0xdeadbeef); ret = GetVolumeInformationA( "C:\winetest_link\windows\", NULL, 0, NULL, NULL, NULL, NULL, 0 ); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_DIR_NOT_ROOT, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_DIR_NOT_ROOT, "wrong error %lu\n", GetLastError());
ret = GetVolumePathNameA( "C:\winetest_link\winetest_mnt", path, sizeof(path) ); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(!strcmp(path, "C:\winetest_link\winetest_mnt\"), "got %s\n", debugstr_a(path)); ret = GetVolumeNameForVolumeMountPointA( "C:\winetest_link\winetest_mnt\", path, sizeof(path) ); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(!strcmp(path, volume_name), "expected %s, got %s\n", debugstr_a(volume_name), debugstr_a(path)); ret = GetVolumeInformationA( "C:\winetest_link\winetest_mnt\", NULL, 0, NULL, NULL, NULL, NULL, 0 ); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
/* The following test makes it clear that when we encounter a symlink * while resolving, we resolve *every* junction in the path, i.e. both * mount points and symlinks. */ ret = GetVolumePathNameA( "C:\winetest_link\winetest_mnt\winetest_link\windows\", path, sizeof(path) ); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(!strcmp(path, "C:\") || !strcmp(path, "C:\winetest_link\winetest_mnt\") /* 2008 */, "got %s\n", debugstr_a(path));
file = CreateFileA( "C:\winetest_link\winetest_mnt\winetest_link\windows\", 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL ); - ok(file != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "got error %lu\n", GetLastError());
status = NtQueryInformationFile( file, &io, name, sizeof(name_buffer), FileNameInformation ); - ok(!status, "got status %#x\n", status); - ok(name->FileNameLength == wcslen(L"\windows") * sizeof(WCHAR), "got length %u\n", name->FileNameLength); + ok(!status, "got status %#lx\n", status); + ok(name->FileNameLength == wcslen(L"\windows") * sizeof(WCHAR), "got length %lu\n", name->FileNameLength); ok(!wcsnicmp(name->FileName, L"\windows", wcslen(L"\windows")), "got name %s\n", debugstr_wn(name->FileName, name->FileNameLength / sizeof(WCHAR)));
CloseHandle( file );
ret = RemoveDirectoryA( "C:\winetest_link\" ); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
/* The following cannot be automatically tested: * @@ -1513,9 +1514,9 @@ static void test_mounted_folder(void) }
ret = DeleteVolumeMountPointA( "C:\winetest_mnt\" ); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ret = RemoveDirectoryA( "C:\winetest_mnt" ); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); }
static void test_GetVolumeInformationByHandle(void) @@ -1539,47 +1540,47 @@ static void test_GetVolumeInformationByHandle(void)
file = CreateFileA( "C:/windows", 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL ); - ok(file != INVALID_HANDLE_VALUE, "failed to open file, error %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "failed to open file, error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = pGetVolumeInformationByHandleW( INVALID_HANDLE_VALUE, label, ARRAY_SIZE(label), &serial, &filename_len, &flags, fsname, ARRAY_SIZE(fsname) ); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got error %lu\n", GetLastError());
ret = pGetVolumeInformationByHandleW( file, NULL, 0, NULL, NULL, NULL, NULL, 0 ); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = pGetVolumeInformationByHandleW( file, label, ARRAY_SIZE(label), &serial, &filename_len, &flags, fsname, ARRAY_SIZE(fsname) ); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
memset(buffer, 0, sizeof(buffer)); status = NtQueryVolumeInformationFile( file, &io, buffer, sizeof(buffer), FileFsAttributeInformation ); - ok(!status, "got status %#x\n", status); - ok(flags == attr_info->FileSystemAttributes, "expected flags %#x, got %#x\n", + ok(!status, "got status %#lx\n", status); + ok(flags == attr_info->FileSystemAttributes, "expected flags %#lx, got %#lx\n", attr_info->FileSystemAttributes, flags); - ok(filename_len == attr_info->MaximumComponentNameLength, "expected filename_len %u, got %u\n", + ok(filename_len == attr_info->MaximumComponentNameLength, "expected filename_len %lu, got %lu\n", attr_info->MaximumComponentNameLength, filename_len); ok(!wcscmp( fsname, attr_info->FileSystemName ), "expected fsname %s, got %s\n", debugstr_w( attr_info->FileSystemName ), debugstr_w( fsname )); ok(wcslen( fsname ) == attr_info->FileSystemNameLength / sizeof(WCHAR), - "expected fsname length %u, got %u\n", attr_info->FileSystemNameLength / sizeof(WCHAR), wcslen( fsname )); + "expected fsname length %Iu, got %Iu\n", attr_info->FileSystemNameLength / sizeof(WCHAR), wcslen( fsname ));
SetLastError(0xdeadbeef); ret = pGetVolumeInformationByHandleW( file, NULL, 0, NULL, &filename_len, &flags, fsname, 2 ); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_BAD_LENGTH, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_BAD_LENGTH, "got error %lu\n", GetLastError());
memset(buffer, 0, sizeof(buffer)); status = NtQueryVolumeInformationFile( file, &io, buffer, sizeof(buffer), FileFsVolumeInformation ); - ok(!status, "got status %#x\n", status); - ok(serial == volume_info->VolumeSerialNumber, "expected serial %08x, got %08x\n", + ok(!status, "got status %#lx\n", status); + ok(serial == volume_info->VolumeSerialNumber, "expected serial %08lx, got %08lx\n", volume_info->VolumeSerialNumber, serial); ok(!wcscmp( label, volume_info->VolumeLabel ), "expected label %s, got %s\n", debugstr_w( volume_info->VolumeLabel ), debugstr_w( label )); ok(wcslen( label ) == volume_info->VolumeLabelLength / sizeof(WCHAR), - "expected label length %u, got %u\n", volume_info->VolumeLabelLength / sizeof(WCHAR), wcslen( label )); + "expected label length %Iu, got %Iu\n", volume_info->VolumeLabelLength / sizeof(WCHAR), wcslen( label ));
CloseHandle( file );
@@ -1591,33 +1592,33 @@ static void test_GetVolumeInformationByHandle(void)
file = CreateFileA( volume, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL ); - ok(file != INVALID_HANDLE_VALUE, "failed to open file, error %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "failed to open file, error %lu\n", GetLastError());
ret = pGetVolumeInformationByHandleW( file, label, ARRAY_SIZE(label), &serial, &filename_len, &flags, fsname, ARRAY_SIZE(fsname) ); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
memset(buffer, 0, sizeof(buffer)); status = NtQueryVolumeInformationFile( file, &io, buffer, sizeof(buffer), FileFsVolumeInformation ); - ok(!status, "got status %#x\n", status); - ok(serial == volume_info->VolumeSerialNumber, "expected serial %08x, got %08x\n", + ok(!status, "got status %#lx\n", status); + ok(serial == volume_info->VolumeSerialNumber, "expected serial %08lx, got %08lx\n", volume_info->VolumeSerialNumber, serial); ok(!wcscmp( label, volume_info->VolumeLabel ), "expected label %s, got %s\n", debugstr_w( volume_info->VolumeLabel ), debugstr_w( label )); ok(wcslen( label ) == volume_info->VolumeLabelLength / sizeof(WCHAR), - "expected label length %u, got %u\n", volume_info->VolumeLabelLength / sizeof(WCHAR), wcslen( label )); + "expected label length %Iu, got %Iu\n", volume_info->VolumeLabelLength / sizeof(WCHAR), wcslen( label ));
memset(buffer, 0, sizeof(buffer)); status = NtQueryVolumeInformationFile( file, &io, buffer, sizeof(buffer), FileFsAttributeInformation ); - ok(!status, "got status %#x\n", status); - ok(flags == attr_info->FileSystemAttributes, "expected flags %#x, got %#x\n", + ok(!status, "got status %#lx\n", status); + ok(flags == attr_info->FileSystemAttributes, "expected flags %#lx, got %#lx\n", attr_info->FileSystemAttributes, flags); - ok(filename_len == attr_info->MaximumComponentNameLength, "expected filename_len %u, got %u\n", + ok(filename_len == attr_info->MaximumComponentNameLength, "expected filename_len %lu, got %lu\n", attr_info->MaximumComponentNameLength, filename_len); ok(!wcscmp( fsname, attr_info->FileSystemName ), "expected fsname %s, got %s\n", debugstr_w( attr_info->FileSystemName ), debugstr_w( fsname )); ok(wcslen( fsname ) == attr_info->FileSystemNameLength / sizeof(WCHAR), - "expected fsname length %u, got %u\n", attr_info->FileSystemNameLength / sizeof(WCHAR), wcslen( fsname )); + "expected fsname length %Iu, got %Iu\n", attr_info->FileSystemNameLength / sizeof(WCHAR), wcslen( fsname ));
CloseHandle( file ); } @@ -1634,14 +1635,14 @@ static void test_mountmgr_query_points(void) output = malloc(1024);
file = CreateFileW( MOUNTMGR_DOS_DEVICE_NAME, 0, 0, NULL, OPEN_EXISTING, 0, NULL ); - ok(file != INVALID_HANDLE_VALUE, "failed to open mountmgr, error %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "failed to open mountmgr, error %lu\n", GetLastError());
io.Status = 0xdeadf00d; io.Information = 0xdeadf00d; status = NtDeviceIoControlFile( file, NULL, NULL, NULL, &io, IOCTL_MOUNTMGR_QUERY_POINTS, NULL, 0, NULL, 0 ); - ok(status == STATUS_INVALID_PARAMETER, "got %#x\n", status); - ok(io.Status == 0xdeadf00d, "got status %#x\n", io.Status); + ok(status == STATUS_INVALID_PARAMETER, "got %#lx\n", status); + ok(io.Status == 0xdeadf00d, "got status %#lx\n", io.Status); ok(io.Information == 0xdeadf00d, "got information %#Ix\n", io.Information);
memset( input, 0, sizeof(*input) ); @@ -1650,16 +1651,16 @@ static void test_mountmgr_query_points(void) io.Information = 0xdeadf00d; status = NtDeviceIoControlFile( file, NULL, NULL, NULL, &io, IOCTL_MOUNTMGR_QUERY_POINTS, input, sizeof(*input) - 1, NULL, 0 ); - ok(status == STATUS_INVALID_PARAMETER, "got %#x\n", status); - ok(io.Status == 0xdeadf00d, "got status %#x\n", io.Status); + ok(status == STATUS_INVALID_PARAMETER, "got %#lx\n", status); + ok(io.Status == 0xdeadf00d, "got status %#lx\n", io.Status); ok(io.Information == 0xdeadf00d, "got information %#Ix\n", io.Information);
io.Status = 0xdeadf00d; io.Information = 0xdeadf00d; status = NtDeviceIoControlFile( file, NULL, NULL, NULL, &io, IOCTL_MOUNTMGR_QUERY_POINTS, input, sizeof(*input), NULL, 0 ); - ok(status == STATUS_INVALID_PARAMETER, "got %#x\n", status); - ok(io.Status == 0xdeadf00d, "got status %#x\n", io.Status); + ok(status == STATUS_INVALID_PARAMETER, "got %#lx\n", status); + ok(io.Status == 0xdeadf00d, "got status %#lx\n", io.Status); ok(io.Information == 0xdeadf00d, "got information %#Ix\n", io.Information);
io.Status = 0xdeadf00d; @@ -1667,23 +1668,23 @@ static void test_mountmgr_query_points(void) memset(output, 0xcc, sizeof(*output)); status = NtDeviceIoControlFile( file, NULL, NULL, NULL, &io, IOCTL_MOUNTMGR_QUERY_POINTS, input, sizeof(*input), output, sizeof(*output) - 1 ); - ok(status == STATUS_INVALID_PARAMETER, "got %#x\n", status); - ok(io.Status == 0xdeadf00d, "got status %#x\n", io.Status); + ok(status == STATUS_INVALID_PARAMETER, "got %#lx\n", status); + ok(io.Status == 0xdeadf00d, "got status %#lx\n", io.Status); ok(io.Information == 0xdeadf00d, "got information %#Ix\n", io.Information); - ok(output->Size == 0xcccccccc, "got size %u\n", output->Size); - ok(output->NumberOfMountPoints == 0xcccccccc, "got count %u\n", output->NumberOfMountPoints); + ok(output->Size == 0xcccccccc, "got size %lu\n", output->Size); + ok(output->NumberOfMountPoints == 0xcccccccc, "got count %lu\n", output->NumberOfMountPoints);
io.Status = 0xdeadf00d; io.Information = 0xdeadf00d; memset(output, 0xcc, sizeof(*output)); status = NtDeviceIoControlFile( file, NULL, NULL, NULL, &io, IOCTL_MOUNTMGR_QUERY_POINTS, input, sizeof(*input), output, sizeof(*output) ); - ok(status == STATUS_BUFFER_OVERFLOW, "got %#x\n", status); - ok(io.Status == STATUS_BUFFER_OVERFLOW, "got status %#x\n", io.Status); + ok(status == STATUS_BUFFER_OVERFLOW, "got %#lx\n", status); + ok(io.Status == STATUS_BUFFER_OVERFLOW, "got status %#lx\n", io.Status); todo_wine ok(io.Information == offsetof(MOUNTMGR_MOUNT_POINTS, MountPoints[0]), "got information %#Ix\n", io.Information); - ok(output->Size > offsetof(MOUNTMGR_MOUNT_POINTS, MountPoints[0]), "got size %u\n", output->Size); + ok(output->Size > offsetof(MOUNTMGR_MOUNT_POINTS, MountPoints[0]), "got size %lu\n", output->Size); todo_wine ok(output->NumberOfMountPoints && output->NumberOfMountPoints != 0xcccccccc, - "got count %u\n", output->NumberOfMountPoints); + "got count %lu\n", output->NumberOfMountPoints);
output = realloc(output, output->Size);
@@ -1691,12 +1692,12 @@ static void test_mountmgr_query_points(void) io.Information = 0xdeadf00d; status = NtDeviceIoControlFile( file, NULL, NULL, NULL, &io, IOCTL_MOUNTMGR_QUERY_POINTS, input, sizeof(*input), output, output->Size ); - ok(!status, "got %#x\n", status); - ok(!io.Status, "got status %#x\n", io.Status); - ok(io.Information == output->Size, "got size %u, information %#Ix\n", output->Size, io.Information); - ok(output->Size > offsetof(MOUNTMGR_MOUNT_POINTS, MountPoints[0]), "got size %u\n", output->Size); + ok(!status, "got %#lx\n", status); + ok(!io.Status, "got status %#lx\n", io.Status); + ok(io.Information == output->Size, "got size %lu, information %#Ix\n", output->Size, io.Information); + ok(output->Size > offsetof(MOUNTMGR_MOUNT_POINTS, MountPoints[0]), "got size %lu\n", output->Size); ok(output->NumberOfMountPoints && output->NumberOfMountPoints != 0xcccccccc, - "got count %u\n", output->NumberOfMountPoints); + "got count %lu\n", output->NumberOfMountPoints);
CloseHandle( file );
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/urlmon/tests/Makefile.in | 1 dlls/urlmon/tests/misc.c | 668 +++++++++++++------------ dlls/urlmon/tests/protocol.c | 606 +++++++++++------------ dlls/urlmon/tests/sec_mgr.c | 382 +++++++------- dlls/urlmon/tests/stream.c | 32 + dlls/urlmon/tests/uri.c | 1086 +++++++++++++++++++++-------------------- dlls/urlmon/tests/url.c | 558 +++++++++++---------- 7 files changed, 1666 insertions(+), 1667 deletions(-)
diff --git a/dlls/urlmon/tests/Makefile.in b/dlls/urlmon/tests/Makefile.in index c0880892f98..7217f5326ad 100644 --- a/dlls/urlmon/tests/Makefile.in +++ b/dlls/urlmon/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = urlmon.dll IMPORTS = urlmon wininet ole32 oleaut32 shlwapi user32 advapi32
diff --git a/dlls/urlmon/tests/misc.c b/dlls/urlmon/tests/misc.c index a92521b12db..0575a43b097 100644 --- a/dlls/urlmon/tests/misc.c +++ b/dlls/urlmon/tests/misc.c @@ -116,88 +116,88 @@ static void test_CreateFormatEnum(void) };
hres = CreateFormatEnumerator(0, formatetc, &fenum); - ok(hres == E_FAIL, "CreateFormatEnumerator failed: %08x, expected E_FAIL\n", hres); + ok(hres == E_FAIL, "CreateFormatEnumerator failed: %08lx, expected E_FAIL\n", hres); hres = CreateFormatEnumerator(0, formatetc, NULL); - ok(hres == E_INVALIDARG, "CreateFormatEnumerator failed: %08x, expected E_INVALIDARG\n", hres); + ok(hres == E_INVALIDARG, "CreateFormatEnumerator failed: %08lx, expected E_INVALIDARG\n", hres); hres = CreateFormatEnumerator(5, formatetc, NULL); - ok(hres == E_INVALIDARG, "CreateFormatEnumerator failed: %08x, expected E_INVALIDARG\n", hres); + ok(hres == E_INVALIDARG, "CreateFormatEnumerator failed: %08lx, expected E_INVALIDARG\n", hres);
hres = CreateFormatEnumerator(5, formatetc, &fenum); - ok(hres == S_OK, "CreateFormatEnumerator failed: %08x\n", hres); + ok(hres == S_OK, "CreateFormatEnumerator failed: %08lx\n", hres); if(FAILED(hres)) return;
hres = IEnumFORMATETC_Next(fenum, 2, NULL, &ul); - ok(hres == E_INVALIDARG, "Next failed: %08x, expected E_INVALIDARG\n", hres); + ok(hres == E_INVALIDARG, "Next failed: %08lx, expected E_INVALIDARG\n", hres); ul = 100; hres = IEnumFORMATETC_Next(fenum, 0, fetc, &ul); - ok(hres == S_OK, "Next failed: %08x\n", hres); - ok(ul == 0, "ul=%d, expected 0\n", ul); + ok(hres == S_OK, "Next failed: %08lx\n", hres); + ok(ul == 0, "ul=%ld, expected 0\n", ul);
hres = IEnumFORMATETC_Next(fenum, 2, fetc, &ul); - ok(hres == S_OK, "Next failed: %08x\n", hres); - ok(fetc[0].lindex == 0, "fetc[0].lindex=%d, expected 0\n", fetc[0].lindex); - ok(fetc[1].lindex == 1, "fetc[1].lindex=%d, expected 1\n", fetc[1].lindex); + ok(hres == S_OK, "Next failed: %08lx\n", hres); + ok(fetc[0].lindex == 0, "fetc[0].lindex=%ld, expected 0\n", fetc[0].lindex); + ok(fetc[1].lindex == 1, "fetc[1].lindex=%ld, expected 1\n", fetc[1].lindex); ok(fetc[0].ptd == &dev, "fetc[0].ptd=%p, expected %p\n", fetc[0].ptd, &dev); - ok(ul == 2, "ul=%d, expected 2\n", ul); + ok(ul == 2, "ul=%ld, expected 2\n", ul);
hres = IEnumFORMATETC_Skip(fenum, 1); - ok(hres == S_OK, "Skip failed: %08x\n", hres); + ok(hres == S_OK, "Skip failed: %08lx\n", hres);
hres = IEnumFORMATETC_Next(fenum, 4, fetc, &ul); - ok(hres == S_FALSE, "Next failed: %08x, expected S_FALSE\n", hres); - ok(fetc[0].lindex == 3, "fetc[0].lindex=%d, expected 3\n", fetc[0].lindex); - ok(fetc[1].lindex == 4, "fetc[1].lindex=%d, expected 4\n", fetc[1].lindex); + ok(hres == S_FALSE, "Next failed: %08lx, expected S_FALSE\n", hres); + ok(fetc[0].lindex == 3, "fetc[0].lindex=%ld, expected 3\n", fetc[0].lindex); + ok(fetc[1].lindex == 4, "fetc[1].lindex=%ld, expected 4\n", fetc[1].lindex); ok(fetc[0].ptd == NULL, "fetc[0].ptd=%p, expected NULL\n", fetc[0].ptd); - ok(ul == 2, "ul=%d, expected 2\n", ul); + ok(ul == 2, "ul=%ld, expected 2\n", ul);
hres = IEnumFORMATETC_Next(fenum, 4, fetc, &ul); - ok(hres == S_FALSE, "Next failed: %08x, expected S_FALSE\n", hres); - ok(ul == 0, "ul=%d, expected 0\n", ul); + ok(hres == S_FALSE, "Next failed: %08lx, expected S_FALSE\n", hres); + ok(ul == 0, "ul=%ld, expected 0\n", ul); ul = 100; hres = IEnumFORMATETC_Next(fenum, 0, fetc, &ul); - ok(hres == S_OK, "Next failed: %08x\n", hres); - ok(ul == 0, "ul=%d, expected 0\n", ul); + ok(hres == S_OK, "Next failed: %08lx\n", hres); + ok(ul == 0, "ul=%ld, expected 0\n", ul);
hres = IEnumFORMATETC_Skip(fenum, 3); - ok(hres == S_FALSE, "Skip failed: %08x, expected S_FALSE\n", hres); + ok(hres == S_FALSE, "Skip failed: %08lx, expected S_FALSE\n", hres);
hres = IEnumFORMATETC_Reset(fenum); - ok(hres == S_OK, "Reset failed: %08x\n", hres); + ok(hres == S_OK, "Reset failed: %08lx\n", hres);
hres = IEnumFORMATETC_Next(fenum, 5, fetc, NULL); - ok(hres == S_OK, "Next failed: %08x\n", hres); - ok(fetc[0].lindex == 0, "fetc[0].lindex=%d, expected 0\n", fetc[0].lindex); + ok(hres == S_OK, "Next failed: %08lx\n", hres); + ok(fetc[0].lindex == 0, "fetc[0].lindex=%ld, expected 0\n", fetc[0].lindex);
hres = IEnumFORMATETC_Reset(fenum); - ok(hres == S_OK, "Reset failed: %08x\n", hres); + ok(hres == S_OK, "Reset failed: %08lx\n", hres);
hres = IEnumFORMATETC_Skip(fenum, 2); - ok(hres == S_OK, "Skip failed: %08x\n", hres); + ok(hres == S_OK, "Skip failed: %08lx\n", hres);
hres = IEnumFORMATETC_Clone(fenum, NULL); - ok(hres == E_INVALIDARG, "Clone failed: %08x, expected E_INVALIDARG\n", hres); + ok(hres == E_INVALIDARG, "Clone failed: %08lx, expected E_INVALIDARG\n", hres);
hres = IEnumFORMATETC_Clone(fenum, &fenum2); - ok(hres == S_OK, "Clone failed: %08x\n", hres); + ok(hres == S_OK, "Clone failed: %08lx\n", hres);
if(SUCCEEDED(hres)) { ok(fenum != fenum2, "fenum == fenum2\n");
hres = IEnumFORMATETC_Next(fenum2, 2, fetc, &ul); - ok(hres == S_OK, "Next failed: %08x\n", hres); - ok(fetc[0].lindex == 2, "fetc[0].lindex=%d, expected 2\n", fetc[0].lindex); + ok(hres == S_OK, "Next failed: %08lx\n", hres); + ok(fetc[0].lindex == 2, "fetc[0].lindex=%ld, expected 2\n", fetc[0].lindex);
IEnumFORMATETC_Release(fenum2); }
hres = IEnumFORMATETC_Next(fenum, 2, fetc, &ul); - ok(hres == S_OK, "Next failed: %08x\n", hres); - ok(fetc[0].lindex == 2, "fetc[0].lindex=%d, expected 2\n", fetc[0].lindex); + ok(hres == S_OK, "Next failed: %08lx\n", hres); + ok(fetc[0].lindex == 2, "fetc[0].lindex=%ld, expected 2\n", fetc[0].lindex);
hres = IEnumFORMATETC_Skip(fenum, 1); - ok(hres == S_OK, "Skip failed: %08x\n", hres); + ok(hres == S_OK, "Skip failed: %08lx\n", hres);
IEnumFORMATETC_Release(fenum); } @@ -216,61 +216,61 @@ static void test_RegisterFormatEnumerator(void) CreateBindCtx(0, &bctx);
hres = CreateFormatEnumerator(1, &formatetc, &format); - ok(hres == S_OK, "CreateFormatEnumerator failed: %08x\n", hres); + ok(hres == S_OK, "CreateFormatEnumerator failed: %08lx\n", hres); if(FAILED(hres)) return;
hres = RegisterFormatEnumerator(NULL, format, 0); ok(hres == E_INVALIDARG, - "RegisterFormatEnumerator failed: %08x, expected E_INVALIDARG\n", hres); + "RegisterFormatEnumerator failed: %08lx, expected E_INVALIDARG\n", hres); hres = RegisterFormatEnumerator(bctx, NULL, 0); ok(hres == E_INVALIDARG, - "RegisterFormatEnumerator failed: %08x, expected E_INVALIDARG\n", hres); + "RegisterFormatEnumerator failed: %08lx, expected E_INVALIDARG\n", hres);
hres = RegisterFormatEnumerator(bctx, format, 0); - ok(hres == S_OK, "RegisterFormatEnumerator failed: %08x\n", hres); + ok(hres == S_OK, "RegisterFormatEnumerator failed: %08lx\n", hres);
hres = IBindCtx_GetObjectParam(bctx, wszEnumFORMATETC, &unk); - ok(hres == S_OK, "GetObjectParam failed: %08x\n", hres); + ok(hres == S_OK, "GetObjectParam failed: %08lx\n", hres); ok(unk == (IUnknown*)format, "unk != format\n");
hres = RevokeFormatEnumerator(NULL, format); ok(hres == E_INVALIDARG, - "RevokeFormatEnumerator failed: %08x, expected E_INVALIDARG\n", hres); + "RevokeFormatEnumerator failed: %08lx, expected E_INVALIDARG\n", hres);
hres = RevokeFormatEnumerator(bctx, format); - ok(hres == S_OK, "RevokeFormatEnumerator failed: %08x\n", hres); + ok(hres == S_OK, "RevokeFormatEnumerator failed: %08lx\n", hres);
hres = RevokeFormatEnumerator(bctx, format); - ok(hres == E_FAIL, "RevokeFormatEnumerator failed: %08x, expected E_FAIL\n", hres); + ok(hres == E_FAIL, "RevokeFormatEnumerator failed: %08lx, expected E_FAIL\n", hres);
hres = IBindCtx_GetObjectParam(bctx, wszEnumFORMATETC, &unk); - ok(hres == E_FAIL, "GetObjectParam failed: %08x, expected E_FAIL\n", hres); + ok(hres == E_FAIL, "GetObjectParam failed: %08lx, expected E_FAIL\n", hres);
hres = RegisterFormatEnumerator(bctx, format, 0); - ok(hres == S_OK, "RegisterFormatEnumerator failed: %08x\n", hres); + ok(hres == S_OK, "RegisterFormatEnumerator failed: %08lx\n", hres);
hres = CreateFormatEnumerator(1, &formatetc, &format2); - ok(hres == S_OK, "CreateFormatEnumerator failed: %08x\n", hres); + ok(hres == S_OK, "CreateFormatEnumerator failed: %08lx\n", hres);
if(SUCCEEDED(hres)) { hres = RevokeFormatEnumerator(bctx, format); - ok(hres == S_OK, "RevokeFormatEnumerator failed: %08x\n", hres); + ok(hres == S_OK, "RevokeFormatEnumerator failed: %08lx\n", hres);
IEnumFORMATETC_Release(format2); }
hres = IBindCtx_GetObjectParam(bctx, wszEnumFORMATETC, &unk); - ok(hres == E_FAIL, "GetObjectParam failed: %08x, expected E_FAIL\n", hres); + ok(hres == E_FAIL, "GetObjectParam failed: %08lx, expected E_FAIL\n", hres);
IEnumFORMATETC_Release(format);
hres = RegisterFormatEnumerator(bctx, format, 0); - ok(hres == S_OK, "RegisterFormatEnumerator failed: %08x\n", hres); + ok(hres == S_OK, "RegisterFormatEnumerator failed: %08lx\n", hres); hres = RevokeFormatEnumerator(bctx, NULL); - ok(hres == S_OK, "RevokeFormatEnumerator failed: %08x\n", hres); + ok(hres == S_OK, "RevokeFormatEnumerator failed: %08lx\n", hres); hres = IBindCtx_GetObjectParam(bctx, wszEnumFORMATETC, &unk); - ok(hres == E_FAIL, "GetObjectParam failed: %08x, expected E_FAIL\n", hres); + ok(hres == E_FAIL, "GetObjectParam failed: %08lx, expected E_FAIL\n", hres);
IEnumFORMATETC_Release(format); IBindCtx_Release(bctx); @@ -345,33 +345,33 @@ static void test_CoInternetParseUrl(void) memset(buf, 0xf0, sizeof(buf)); hres = pCoInternetParseUrl(parse_tests[0].url, PARSE_SCHEMA, 0, buf, 3, &size, 0); - ok(hres == E_POINTER, "schema failed: %08x, expected E_POINTER\n", hres); + ok(hres == E_POINTER, "schema failed: %08lx, expected E_POINTER\n", hres);
for(i = 0; i < ARRAY_SIZE(parse_tests); i++) { memset(buf, 0xf0, sizeof(buf)); hres = pCoInternetParseUrl(parse_tests[i].url, PARSE_SECURITY_URL, 0, buf, ARRAY_SIZE(buf), &size, 0); - ok(hres == parse_tests[i].secur_hres, "[%d] security url failed: %08x, expected %08x\n", + ok(hres == parse_tests[i].secur_hres, "[%d] security url failed: %08lx, expected %08lx\n", i, hres, parse_tests[i].secur_hres);
memset(buf, 0xf0, sizeof(buf)); hres = pCoInternetParseUrl(parse_tests[i].url, PARSE_ENCODE, 0, buf, ARRAY_SIZE(buf), &size, 0); - ok(hres == S_OK, "[%d] encoding failed: %08x\n", i, hres); + ok(hres == S_OK, "[%d] encoding failed: %08lx\n", i, hres); ok(size == lstrlenW(parse_tests[i].encoded_url), "[%d] wrong size\n", i); ok(!lstrcmpW(parse_tests[i].encoded_url, buf), "[%d] wrong encoded url\n", i);
memset(buf, 0xf0, sizeof(buf)); hres = pCoInternetParseUrl(parse_tests[i].url, PARSE_UNESCAPE, 0, buf, ARRAY_SIZE(buf), &size, 0); - ok(hres == S_OK, "[%d] encoding failed: %08x\n", i, hres); + ok(hres == S_OK, "[%d] encoding failed: %08lx\n", i, hres); ok(size == lstrlenW(parse_tests[i].encoded_url), "[%d] wrong size\n", i); ok(!lstrcmpW(parse_tests[i].encoded_url, buf), "[%d] wrong encoded url\n", i);
memset(buf, 0xf0, sizeof(buf)); hres = pCoInternetParseUrl(parse_tests[i].url, PARSE_PATH_FROM_URL, 0, buf, ARRAY_SIZE(buf), &size, 0); - ok(hres == parse_tests[i].path_hres, "[%d] path failed: %08x, expected %08x\n", + ok(hres == parse_tests[i].path_hres, "[%d] path failed: %08lx, expected %08lx\n", i, hres, parse_tests[i].path_hres); if(parse_tests[i].path) { ok(size == lstrlenW(parse_tests[i].path), "[%d] wrong size\n", i); @@ -381,7 +381,7 @@ static void test_CoInternetParseUrl(void) memset(buf, 0xf0, sizeof(buf)); hres = pCoInternetParseUrl(parse_tests[i].url, PARSE_SCHEMA, 0, buf, ARRAY_SIZE(buf), &size, 0); - ok(hres == S_OK, "[%d] schema failed: %08x\n", i, hres); + ok(hres == S_OK, "[%d] schema failed: %08lx\n", i, hres); ok(size == lstrlenW(parse_tests[i].schema), "[%d] wrong size\n", i); ok(!lstrcmpW(parse_tests[i].schema, buf), "[%d] wrong schema\n", i);
@@ -390,7 +390,7 @@ static void test_CoInternetParseUrl(void) memset(buf, 0xf0, sizeof(buf)); hres = pCoInternetParseUrl(parse_tests[i].url, PARSE_DOMAIN, 0, buf, ARRAY_SIZE(buf), &size, 0); - ok(hres == parse_tests[i].domain_hres, "[%d] domain failed: %08x\n", i, hres); + ok(hres == parse_tests[i].domain_hres, "[%d] domain failed: %08lx\n", i, hres); if(parse_tests[i].domain) ok(!lstrcmpW(parse_tests[i].domain, buf), "[%d] wrong domain, received %s\n", i, wine_dbgstr_w(buf)); } @@ -398,7 +398,7 @@ static void test_CoInternetParseUrl(void) memset(buf, 0xf0, sizeof(buf)); hres = pCoInternetParseUrl(parse_tests[i].url, PARSE_ROOTDOCUMENT, 0, buf, ARRAY_SIZE(buf), &size, 0); - ok(hres == parse_tests[i].rootdocument_hres, "[%d] rootdocument failed: %08x\n", i, hres); + ok(hres == parse_tests[i].rootdocument_hres, "[%d] rootdocument failed: %08lx\n", i, hres); if(parse_tests[i].rootdocument) ok(!lstrcmpW(parse_tests[i].rootdocument, buf), "[%d] wrong rootdocument, received %s\n", i, wine_dbgstr_w(buf)); } @@ -409,13 +409,13 @@ static void test_CoInternetCompareUrl(void) HRESULT hres;
hres = pCoInternetCompareUrl(url1, url1, 0); - ok(hres == S_OK, "CoInternetCompareUrl failed: %08x\n", hres); + ok(hres == S_OK, "CoInternetCompareUrl failed: %08lx\n", hres);
hres = pCoInternetCompareUrl(url1, url3, 0); - ok(hres == S_FALSE, "CoInternetCompareUrl failed: %08x\n", hres); + ok(hres == S_FALSE, "CoInternetCompareUrl failed: %08lx\n", hres);
hres = pCoInternetCompareUrl(url3, url1, 0); - ok(hres == S_FALSE, "CoInternetCompareUrl failed: %08x\n", hres); + ok(hres == S_FALSE, "CoInternetCompareUrl failed: %08lx\n", hres); }
static const struct { @@ -442,20 +442,20 @@ static void test_CoInternetQueryInfo(void) cb = 0xdeadbeef; memset(buf, '?', sizeof(buf)); hres = pCoInternetQueryInfo(query_info_tests[0].url, QUERY_USES_NETWORK, 0, buf, sizeof(buf), &cb, 0); - ok(hres == S_OK, "[%d] CoInternetQueryInfo failed: %08x\n", i, hres); - ok(cb == sizeof(DWORD), "[%d] cb = %d\n", i, cb); - ok(*(DWORD*)buf == query_info_tests[i].uses_net, "[%d] ret %x, expected %x\n", + ok(hres == S_OK, "[%ld] CoInternetQueryInfo failed: %08lx\n", i, hres); + ok(cb == sizeof(DWORD), "[%ld] cb = %ld\n", i, cb); + ok(*(DWORD*)buf == query_info_tests[i].uses_net, "[%ld] ret %lx, expected %lx\n", i, *(DWORD*)buf, query_info_tests[i].uses_net);
hres = pCoInternetQueryInfo(query_info_tests[0].url, QUERY_USES_NETWORK, 0, buf, 3, &cb, 0); - ok(hres == E_FAIL, "[%d] CoInternetQueryInfo failed: %08x, expected E_FAIL\n", i, hres); + ok(hres == E_FAIL, "[%ld] CoInternetQueryInfo failed: %08lx, expected E_FAIL\n", i, hres); hres = pCoInternetQueryInfo(query_info_tests[0].url, QUERY_USES_NETWORK, 0, NULL, sizeof(buf), &cb, 0); - ok(hres == E_FAIL, "[%d] CoInternetQueryInfo failed: %08x, expected E_FAIL\n", i, hres); + ok(hres == E_FAIL, "[%ld] CoInternetQueryInfo failed: %08lx, expected E_FAIL\n", i, hres);
memset(buf, '?', sizeof(buf)); hres = pCoInternetQueryInfo(query_info_tests[0].url, QUERY_USES_NETWORK, 0, buf, sizeof(buf), NULL, 0); - ok(hres == S_OK, "[%d] CoInternetQueryInfo failed: %08x\n", i, hres); - ok(*(DWORD*)buf == query_info_tests[i].uses_net, "[%d] ret %x, expected %x\n", + ok(hres == S_OK, "[%ld] CoInternetQueryInfo failed: %08lx\n", i, hres); + ok(*(DWORD*)buf == query_info_tests[i].uses_net, "[%ld] ret %lx, expected %lx\n", i, *(DWORD*)buf, query_info_tests[i].uses_net); } } @@ -715,7 +715,7 @@ static void test_FindMimeFromData(void) mime = (LPWSTR)0xf0f0f0f0; hres = pFindMimeFromData(NULL, mime_tests[i].url, NULL, 0, NULL, 0, &mime, 0); if(mime_tests[i].mime) { - ok(hres == S_OK || broken(mime_tests[i].broken_failure), "[%d] FindMimeFromData failed: %08x\n", i, hres); + ok(hres == S_OK || broken(mime_tests[i].broken_failure), "[%d] FindMimeFromData failed: %08lx\n", i, hres); if(hres == S_OK) { ok(!lstrcmpW(mime, mime_tests[i].mime) || broken(mime_tests[i].broken_mime && !lstrcmpW(mime, mime_tests[i].broken_mime)), @@ -724,20 +724,20 @@ static void test_FindMimeFromData(void) } }else { ok(hres == E_FAIL || hres == mime_tests[i].hres, - "[%d] FindMimeFromData failed: %08x, expected %08x\n", + "[%d] FindMimeFromData failed: %08lx, expected %08lx\n", i, hres, mime_tests[i].hres); ok(mime == (LPWSTR)0xf0f0f0f0, "[%d] mime != 0xf0f0f0f0\n", i); }
mime = (LPWSTR)0xf0f0f0f0; hres = pFindMimeFromData(NULL, mime_tests[i].url, NULL, 0, text_plainW, 0, &mime, 0); - ok(hres == S_OK, "[%d] FindMimeFromData failed: %08x\n", i, hres); + ok(hres == S_OK, "[%d] FindMimeFromData failed: %08lx\n", i, hres); ok(!lstrcmpW(mime, L"text/plain"), "[%d] wrong mime: %s\n", i, wine_dbgstr_w(mime)); CoTaskMemFree(mime);
mime = (LPWSTR)0xf0f0f0f0; hres = pFindMimeFromData(NULL, mime_tests[i].url, NULL, 0, app_octet_streamW, 0, &mime, 0); - ok(hres == S_OK, "[%d] FindMimeFromData failed: %08x\n", i, hres); + ok(hres == S_OK, "[%d] FindMimeFromData failed: %08lx\n", i, hres); ok(!lstrcmpW(mime, L"application/octet-stream"), "[%d] wrong mime: %s\n", i, wine_dbgstr_w(mime)); CoTaskMemFree(mime); } @@ -745,7 +745,7 @@ static void test_FindMimeFromData(void) for(i = 0; i < ARRAY_SIZE(mime_tests2); i++) { hres = pFindMimeFromData(NULL, mime_tests2[i].url, mime_tests2[i].data, mime_tests2[i].size, mime_tests2[i].proposed_mime, 0, &mime, 0); - ok(hres == S_OK, "[%d] FindMimeFromData failed: %08x\n", i, hres); + ok(hres == S_OK, "[%d] FindMimeFromData failed: %08lx\n", i, hres); b = !lstrcmpW(mime, mime_tests2[i].mime); ok(b || broken(mime_tests2[i].broken_mime && !lstrcmpW(mime, mime_tests2[i].broken_mime)), "[%d] wrong mime: %s\n", i, wine_dbgstr_w(mime)); @@ -755,7 +755,7 @@ static void test_FindMimeFromData(void)
hres = pFindMimeFromData(NULL, NULL, mime_tests2[i].data, mime_tests2[i].size, app_octet_streamW, 0, &mime, 0); - ok(hres == S_OK, "[%d] FindMimeFromData failed: %08x\n", i, hres); + ok(hres == S_OK, "[%d] FindMimeFromData failed: %08lx\n", i, hres); ok(!lstrcmpW(mime, mime_tests2[i].mime) || broken(mime_tests2[i].broken_mime && !lstrcmpW(mime, mime_tests2[i].broken_mime)), "[%d] wrong mime: %s\n", i, wine_dbgstr_w(mime)); @@ -763,7 +763,7 @@ static void test_FindMimeFromData(void)
hres = pFindMimeFromData(NULL, NULL, mime_tests2[i].data, mime_tests2[i].size, text_plainW, 0, &mime, 0); - ok(hres == S_OK, "[%d] FindMimeFromData failed: %08x\n", i, hres); + ok(hres == S_OK, "[%d] FindMimeFromData failed: %08lx\n", i, hres); ok(!lstrcmpW(mime, mime_tests2[i].mime) || broken(mime_tests2[i].broken_mime && !lstrcmpW(mime, mime_tests2[i].broken_mime)), "[%d] wrong mime: %s\n", i, wine_dbgstr_w(mime)); @@ -771,7 +771,7 @@ static void test_FindMimeFromData(void)
hres = pFindMimeFromData(NULL, NULL, mime_tests2[i].data, mime_tests2[i].size, text_htmlW, 0, &mime, 0); - ok(hres == S_OK, "[%d] FindMimeFromData failed: %08x\n", i, hres); + ok(hres == S_OK, "[%d] FindMimeFromData failed: %08lx\n", i, hres); if(!lstrcmpW(L"application/octet-stream", mime_tests2[i].mime) || !lstrcmpW(L"text/plain", mime_tests2[i].mime) || i==92) ok(!lstrcmpW(mime, L"text/html"), "[%d] wrong mime: %s\n", i, wine_dbgstr_w(mime)); @@ -781,7 +781,7 @@ static void test_FindMimeFromData(void)
hres = pFindMimeFromData(NULL, NULL, mime_tests2[i].data, mime_tests2[i].size, image_pjpegW, 0, &mime, 0); - ok(hres == S_OK, "[%d] FindMimeFromData failed: %08x\n", i, hres); + ok(hres == S_OK, "[%d] FindMimeFromData failed: %08lx\n", i, hres); ok(!lstrcmpW(mime, mime_tests2[i].mime_pjpeg ? mime_tests2[i].mime_pjpeg : mime_tests2[i].mime) || broken(!lstrcmpW(mime, mime_tests2[i].mime)), "[%d] wrong mime, got %s\n", i, wine_dbgstr_w(mime)); @@ -789,24 +789,24 @@ static void test_FindMimeFromData(void) }
hres = pFindMimeFromData(NULL, NULL, NULL, 0, NULL, 0, &mime, 0); - ok(hres == E_INVALIDARG, "FindMimeFromData failed: %08x, expected E_INVALIDARG\n", hres); + ok(hres == E_INVALIDARG, "FindMimeFromData failed: %08lx, expected E_INVALIDARG\n", hres);
hres = pFindMimeFromData(NULL, NULL, NULL, 0, text_plainW, 0, &mime, 0); - ok(hres == E_INVALIDARG, "FindMimeFromData failed: %08x, expected E_INVALIDARG\n", hres); + ok(hres == E_INVALIDARG, "FindMimeFromData failed: %08lx, expected E_INVALIDARG\n", hres);
hres = pFindMimeFromData(NULL, NULL, data1, 0, NULL, 0, &mime, 0); - ok(hres == E_FAIL, "FindMimeFromData failed: %08x, expected E_FAIL\n", hres); + ok(hres == E_FAIL, "FindMimeFromData failed: %08lx, expected E_FAIL\n", hres);
hres = pFindMimeFromData(NULL, url1, data1, 0, NULL, 0, &mime, 0); - ok(hres == E_FAIL, "FindMimeFromData failed: %08x, expected E_FAIL\n", hres); + ok(hres == E_FAIL, "FindMimeFromData failed: %08lx, expected E_FAIL\n", hres);
hres = pFindMimeFromData(NULL, NULL, data1, 0, text_plainW, 0, &mime, 0); - ok(hres == S_OK, "FindMimeFromData failed: %08x\n", hres); + ok(hres == S_OK, "FindMimeFromData failed: %08lx\n", hres); ok(!lstrcmpW(mime, L"text/plain"), "wrong mime: %s\n", wine_dbgstr_w(mime)); CoTaskMemFree(mime);
hres = pFindMimeFromData(NULL, NULL, data1, 0, text_plainW, 0, NULL, 0); - ok(hres == E_INVALIDARG, "FindMimeFromData failed: %08x, expected E_INVALIDARG\n", hres); + ok(hres == E_INVALIDARG, "FindMimeFromData failed: %08lx, expected E_INVALIDARG\n", hres); }
static void register_protocols(void) @@ -818,13 +818,13 @@ static void register_protocols(void) static const WCHAR wszAbout[] = {'a','b','o','u','t',0};
hres = pCoInternetGetSession(0, &session, 0); - ok(hres == S_OK, "CoInternetGetSession failed: %08x\n", hres); + ok(hres == S_OK, "CoInternetGetSession failed: %08lx\n", hres); if(FAILED(hres)) return;
hres = CoGetClassObject(&CLSID_AboutProtocol, CLSCTX_INPROC_SERVER, NULL, &IID_IClassFactory, (void**)&factory); - ok(hres == S_OK, "Could not get AboutProtocol factory: %08x\n", hres); + ok(hres == S_OK, "Could not get AboutProtocol factory: %08lx\n", hres); if(FAILED(hres)) return;
@@ -1002,21 +1002,21 @@ static void test_NameSpace(void) static const WCHAR wszTest[] = {'t','e','s','t',0};
hres = pCoInternetGetSession(0, &session, 0); - ok(hres == S_OK, "CoInternetGetSession failed: %08x\n", hres); + ok(hres == S_OK, "CoInternetGetSession failed: %08lx\n", hres); if(FAILED(hres)) return;
hres = IInternetSession_RegisterNameSpace(session, NULL, &IID_NULL, wszTest, 0, NULL, 0); - ok(hres == E_INVALIDARG, "RegisterNameSpace failed: %08x\n", hres); + ok(hres == E_INVALIDARG, "RegisterNameSpace failed: %08lx\n", hres);
hres = IInternetSession_RegisterNameSpace(session, &test_protocol_cf, &IID_NULL, NULL, 0, NULL, 0); - ok(hres == E_INVALIDARG, "RegisterNameSpace failed: %08x\n", hres); + ok(hres == E_INVALIDARG, "RegisterNameSpace failed: %08lx\n", hres);
hres = IInternetSession_RegisterNameSpace(session, &test_protocol_cf, &IID_NULL, wszTest, 0, NULL, 0); - ok(hres == S_OK, "RegisterNameSpace failed: %08x\n", hres); + ok(hres == S_OK, "RegisterNameSpace failed: %08lx\n", hres);
qiret = E_NOINTERFACE; expect_cf = &test_protocol_cf; @@ -1025,7 +1025,7 @@ static void test_NameSpace(void) SET_EXPECT(ParseUrl_ENCODE);
hres = pCoInternetParseUrl(url8, PARSE_ENCODE, 0, buf, ARRAY_SIZE(buf), &size, 0); - ok(hres == S_OK, "CoInternetParseUrl failed: %08x\n", hres); + ok(hres == S_OK, "CoInternetParseUrl failed: %08lx\n", hres);
CHECK_CALLED(QI_IInternetProtocolInfo); CHECK_CALLED(CreateInstance); @@ -1036,7 +1036,7 @@ static void test_NameSpace(void) SET_EXPECT(ParseUrl_ENCODE);
hres = pCoInternetParseUrl(url8, PARSE_ENCODE, 0, buf, ARRAY_SIZE(buf), &size, 0); - ok(hres == S_OK, "CoInternetParseUrl failed: %08x\n", hres); + ok(hres == S_OK, "CoInternetParseUrl failed: %08lx\n", hres);
CHECK_CALLED(QI_IInternetProtocolInfo); CHECK_CALLED(ParseUrl_ENCODE); @@ -1046,7 +1046,7 @@ static void test_NameSpace(void) SET_EXPECT(ParseUrl_UNESCAPE);
hres = pCoInternetParseUrl(url8, PARSE_UNESCAPE, 0, buf, ARRAY_SIZE(buf), &size, 0); - ok(hres == S_OK, "CoInternetParseUrl failed: %08x\n", hres); + ok(hres == S_OK, "CoInternetParseUrl failed: %08lx\n", hres);
CHECK_CALLED(QI_IInternetProtocolInfo); CHECK_CALLED(ParseUrl_UNESCAPE); @@ -1055,8 +1055,8 @@ static void test_NameSpace(void) SET_EXPECT(ParseUrl);
hres = pCoInternetParseUrl(url8, PARSE_SECURITY_URL, 0, buf, ARRAY_SIZE(buf), &size, 0); - ok(hres == S_OK, "CoInternetParseUrl failed: %08x\n", hres); - ok(size == ARRAY_SIZE(url1), "Size = %d\n", size); + ok(hres == S_OK, "CoInternetParseUrl failed: %08lx\n", hres); + ok(size == ARRAY_SIZE(url1), "Size = %ld\n", size); if(size == ARRAY_SIZE(url1)) ok(!memcmp(buf, url1, sizeof(url1)), "Encoded url = %s\n", wine_dbgstr_w(buf));
@@ -1068,7 +1068,7 @@ static void test_NameSpace(void)
if (pCoInternetGetSecurityUrl) { hres = pCoInternetGetSecurityUrl(url8, &sec_url, PSU_SECURITY_URL_ONLY, 0); - ok(hres == S_OK, "CoInternetGetSecurityUrl failed: %08x\n", hres); + ok(hres == S_OK, "CoInternetGetSecurityUrl failed: %08lx\n", hres); if(hres == S_OK) { ok(lstrlenW(sec_url) > ARRAY_SIZE(wszFile) && !memcmp(sec_url, wszFile, sizeof(wszFile)-sizeof(WCHAR)), @@ -1081,71 +1081,71 @@ static void test_NameSpace(void) }
hres = IInternetSession_UnregisterNameSpace(session, &test_protocol_cf, wszTest); - ok(hres == S_OK, "UnregisterNameSpace failed: %08x\n", hres); + ok(hres == S_OK, "UnregisterNameSpace failed: %08lx\n", hres);
hres = pCoInternetParseUrl(url8, PARSE_ENCODE, 0, buf, ARRAY_SIZE(buf), &size, 0); - ok(hres == S_OK, "CoInternetParseUrl failed: %08x\n", hres); + ok(hres == S_OK, "CoInternetParseUrl failed: %08lx\n", hres);
hres = IInternetSession_RegisterNameSpace(session, &test_protocol_cf2, &IID_NULL, wszTest, 0, NULL, 0); - ok(hres == S_OK, "RegisterNameSpace failed: %08x\n", hres); + ok(hres == S_OK, "RegisterNameSpace failed: %08lx\n", hres);
hres = IInternetSession_RegisterNameSpace(session, &test_protocol_cf, &IID_NULL, wszTest, 0, NULL, 0); - ok(hres == S_OK, "RegisterNameSpace failed: %08x\n", hres); + ok(hres == S_OK, "RegisterNameSpace failed: %08lx\n", hres);
hres = IInternetSession_RegisterNameSpace(session, &test_protocol_cf, &IID_NULL, wszTest, 0, NULL, 0); - ok(hres == S_OK, "RegisterNameSpace failed: %08x\n", hres); + ok(hres == S_OK, "RegisterNameSpace failed: %08lx\n", hres);
SET_EXPECT(QI_IInternetProtocolInfo); SET_EXPECT(ParseUrl_ENCODE);
hres = pCoInternetParseUrl(url8, PARSE_ENCODE, 0, buf, ARRAY_SIZE(buf), &size, 0); - ok(hres == S_OK, "CoInternetParseUrl failed: %08x\n", hres); + ok(hres == S_OK, "CoInternetParseUrl failed: %08lx\n", hres);
CHECK_CALLED(QI_IInternetProtocolInfo); CHECK_CALLED(ParseUrl_ENCODE);
hres = IInternetSession_UnregisterNameSpace(session, &test_protocol_cf, wszTest); - ok(hres == S_OK, "UnregisterNameSpace failed: %08x\n", hres); + ok(hres == S_OK, "UnregisterNameSpace failed: %08lx\n", hres);
SET_EXPECT(QI_IInternetProtocolInfo); SET_EXPECT(ParseUrl_ENCODE);
hres = pCoInternetParseUrl(url8, PARSE_ENCODE, 0, buf, ARRAY_SIZE(buf), &size, 0); - ok(hres == S_OK, "CoInternetParseUrl failed: %08x\n", hres); + ok(hres == S_OK, "CoInternetParseUrl failed: %08lx\n", hres);
CHECK_CALLED(QI_IInternetProtocolInfo); CHECK_CALLED(ParseUrl_ENCODE);
hres = IInternetSession_UnregisterNameSpace(session, &test_protocol_cf, wszTest); - ok(hres == S_OK, "UnregisterNameSpace failed: %08x\n", hres); + ok(hres == S_OK, "UnregisterNameSpace failed: %08lx\n", hres);
expect_cf = &test_protocol_cf2; SET_EXPECT(QI_IInternetProtocolInfo); SET_EXPECT(ParseUrl_ENCODE);
hres = pCoInternetParseUrl(url8, PARSE_ENCODE, 0, buf, ARRAY_SIZE(buf), &size, 0); - ok(hres == S_OK, "CoInternetParseUrl failed: %08x\n", hres); + ok(hres == S_OK, "CoInternetParseUrl failed: %08lx\n", hres);
CHECK_CALLED(QI_IInternetProtocolInfo); CHECK_CALLED(ParseUrl_ENCODE);
hres = IInternetSession_UnregisterNameSpace(session, &test_protocol_cf, wszTest); - ok(hres == S_OK, "UnregisterNameSpace failed: %08x\n", hres); + ok(hres == S_OK, "UnregisterNameSpace failed: %08lx\n", hres); hres = IInternetSession_UnregisterNameSpace(session, &test_protocol_cf, wszTest); - ok(hres == S_OK, "UnregisterNameSpace failed: %08x\n", hres); + ok(hres == S_OK, "UnregisterNameSpace failed: %08lx\n", hres); hres = IInternetSession_UnregisterNameSpace(session, &test_protocol_cf, NULL); - ok(hres == E_INVALIDARG, "UnregisterNameSpace failed: %08x\n", hres); + ok(hres == E_INVALIDARG, "UnregisterNameSpace failed: %08lx\n", hres); hres = IInternetSession_UnregisterNameSpace(session, NULL, wszTest); - ok(hres == E_INVALIDARG, "UnregisterNameSpace failed: %08x\n", hres); + ok(hres == E_INVALIDARG, "UnregisterNameSpace failed: %08lx\n", hres);
hres = IInternetSession_UnregisterNameSpace(session, &test_protocol_cf2, wszTest); - ok(hres == S_OK, "UnregisterNameSpace failed: %08x\n", hres); + ok(hres == S_OK, "UnregisterNameSpace failed: %08lx\n", hres);
hres = pCoInternetParseUrl(url8, PARSE_ENCODE, 0, buf, ARRAY_SIZE(buf), &size, 0); - ok(hres == S_OK, "CoInternetParseUrl failed: %08x\n", hres); + ok(hres == S_OK, "CoInternetParseUrl failed: %08lx\n", hres);
IInternetSession_Release(session); } @@ -1158,21 +1158,21 @@ static void test_MimeFilter(void) static const WCHAR mimeW[] = {'t','e','s','t','/','m','i','m','e',0};
hres = pCoInternetGetSession(0, &session, 0); - ok(hres == S_OK, "CoInternetGetSession failed: %08x\n", hres); + ok(hres == S_OK, "CoInternetGetSession failed: %08lx\n", hres); if(FAILED(hres)) return;
hres = IInternetSession_RegisterMimeFilter(session, &test_cf, &IID_NULL, mimeW); - ok(hres == S_OK, "RegisterMimeFilter failed: %08x\n", hres); + ok(hres == S_OK, "RegisterMimeFilter failed: %08lx\n", hres);
hres = IInternetSession_UnregisterMimeFilter(session, &test_cf, mimeW); - ok(hres == S_OK, "UnregisterMimeFilter failed: %08x\n", hres); + ok(hres == S_OK, "UnregisterMimeFilter failed: %08lx\n", hres);
hres = IInternetSession_UnregisterMimeFilter(session, &test_cf, mimeW); - ok(hres == S_OK, "UnregisterMimeFilter failed: %08x\n", hres); + ok(hres == S_OK, "UnregisterMimeFilter failed: %08lx\n", hres);
hres = IInternetSession_UnregisterMimeFilter(session, (void*)0xdeadbeef, mimeW); - ok(hres == S_OK, "UnregisterMimeFilter failed: %08x\n", hres); + ok(hres == S_OK, "UnregisterMimeFilter failed: %08lx\n", hres);
IInternetSession_Release(session); } @@ -1201,7 +1201,7 @@ static void test_ReleaseBindInfo(void) bi.pUnk = &unk; SET_EXPECT(unk_Release); pReleaseBindInfo(&bi); - ok(bi.cbSize == sizeof(BINDINFO), "bi.cbSize=%d\n", bi.cbSize); + ok(bi.cbSize == sizeof(BINDINFO), "bi.cbSize=%ld\n", bi.cbSize); ok(bi.pUnk == NULL, "bi.pUnk=%p, expected NULL\n", bi.pUnk); CHECK_CALLED(unk_Release);
@@ -1209,13 +1209,13 @@ static void test_ReleaseBindInfo(void) bi.cbSize = offsetof(BINDINFO, pUnk); bi.pUnk = &unk; pReleaseBindInfo(&bi); - ok(bi.cbSize == offsetof(BINDINFO, pUnk), "bi.cbSize=%d\n", bi.cbSize); + ok(bi.cbSize == offsetof(BINDINFO, pUnk), "bi.cbSize=%ld\n", bi.cbSize); ok(bi.pUnk == &unk, "bi.pUnk=%p, expected %p\n", bi.pUnk, &unk);
memset(&bi, 0, sizeof(bi)); bi.pUnk = &unk; pReleaseBindInfo(&bi); - ok(!bi.cbSize, "bi.cbSize=%d, expected 0\n", bi.cbSize); + ok(!bi.cbSize, "bi.cbSize=%ld, expected 0\n", bi.cbSize); ok(bi.pUnk == &unk, "bi.pUnk=%p, expected %p\n", bi.pUnk, &unk); }
@@ -1235,8 +1235,8 @@ static void test_CopyStgMedium(void) src.tymed = TYMED_NULL; src.pUnkForRelease = NULL; hres = pCopyStgMedium(&src, &dst); - ok(hres == S_OK, "CopyStgMedium failed: %08x\n", hres); - ok(dst.tymed == TYMED_NULL, "tymed=%d\n", dst.tymed); + ok(hres == S_OK, "CopyStgMedium failed: %08lx\n", hres); + ok(dst.tymed == TYMED_NULL, "tymed=%ld\n", dst.tymed); ok(dst.u.hGlobal == empty, "u=%p\n", dst.u.hGlobal); ok(!dst.pUnkForRelease, "pUnkForRelease=%p, expected NULL\n", dst.pUnkForRelease);
@@ -1245,8 +1245,8 @@ static void test_CopyStgMedium(void) src.u.pstm = NULL; src.pUnkForRelease = NULL; hres = pCopyStgMedium(&src, &dst); - ok(hres == S_OK, "CopyStgMedium failed: %08x\n", hres); - ok(dst.tymed == TYMED_ISTREAM, "tymed=%d\n", dst.tymed); + ok(hres == S_OK, "CopyStgMedium failed: %08lx\n", hres); + ok(dst.tymed == TYMED_ISTREAM, "tymed=%ld\n", dst.tymed); ok(!dst.u.pstm, "pstm=%p\n", dst.u.pstm); ok(!dst.pUnkForRelease, "pUnkForRelease=%p, expected NULL\n", dst.pUnkForRelease);
@@ -1255,8 +1255,8 @@ static void test_CopyStgMedium(void) src.u.lpszFileName = fileW; src.pUnkForRelease = NULL; hres = pCopyStgMedium(&src, &dst); - ok(hres == S_OK, "CopyStgMedium failed: %08x\n", hres); - ok(dst.tymed == TYMED_FILE, "tymed=%d\n", dst.tymed); + ok(hres == S_OK, "CopyStgMedium failed: %08lx\n", hres); + ok(dst.tymed == TYMED_FILE, "tymed=%ld\n", dst.tymed); ok(dst.u.lpszFileName && dst.u.lpszFileName != fileW, "lpszFileName=%p\n", dst.u.lpszFileName); ok(!lstrcmpW(dst.u.lpszFileName, fileW), "wrong file name\n"); ok(!dst.pUnkForRelease, "pUnkForRelease=%p, expected NULL\n", dst.pUnkForRelease); @@ -1270,8 +1270,8 @@ static void test_CopyStgMedium(void) src.tymed = TYMED_HGLOBAL; src.u.hGlobal = hg; hres = pCopyStgMedium(&src, &dst); - ok(hres == S_OK, "CopyStgMedium failed: %08x\n", hres); - ok(dst.tymed == TYMED_HGLOBAL, "tymed=%d\n", dst.tymed); + ok(hres == S_OK, "CopyStgMedium failed: %08lx\n", hres); + ok(dst.tymed == TYMED_HGLOBAL, "tymed=%ld\n", dst.tymed); ok(dst.u.hGlobal != hg, "got %p, %p\n", dst.u.hGlobal, hg); size = GlobalSize(dst.u.hGlobal); ok(size == 10, "got size %d\n", size); @@ -1288,13 +1288,13 @@ static void test_CopyStgMedium(void) src.tymed = TYMED_HGLOBAL; src.u.hGlobal = NULL; hres = pCopyStgMedium(&src, &dst); - ok(hres == S_OK, "CopyStgMedium failed: %08x\n", hres); + ok(hres == S_OK, "CopyStgMedium failed: %08lx\n", hres); ok(dst.u.hGlobal == NULL, "got %p\n", dst.u.hGlobal);
hres = pCopyStgMedium(&src, NULL); - ok(hres == E_POINTER, "CopyStgMedium failed: %08x, expected E_POINTER\n", hres); + ok(hres == E_POINTER, "CopyStgMedium failed: %08lx, expected E_POINTER\n", hres); hres = pCopyStgMedium(NULL, &dst); - ok(hres == E_POINTER, "CopyStgMedium failed: %08x, expected E_POINTER\n", hres); + ok(hres == E_POINTER, "CopyStgMedium failed: %08lx, expected E_POINTER\n", hres); }
static void test_CopyBindInfo(void) @@ -1305,27 +1305,27 @@ static void test_CopyBindInfo(void) int i;
hres = pCopyBindInfo(NULL, NULL); - ok(hres == E_POINTER, "CopyBindInfo returned %08x, expected E_POINTER\n", hres); + ok(hres == E_POINTER, "CopyBindInfo returned %08lx, expected E_POINTER\n", hres);
memset(src, 0, sizeof(BINDINFO[2])); memset(dest, 0xde, sizeof(BINDINFO[2])); hres = pCopyBindInfo(src, dest); - ok(hres == E_INVALIDARG, "CopyBindInfo returned: %08x, expected E_INVALIDARG\n", hres); + ok(hres == E_INVALIDARG, "CopyBindInfo returned: %08lx, expected E_INVALIDARG\n", hres);
memset(src, 0, sizeof(BINDINFO[2])); memset(dest, 0xde, sizeof(BINDINFO[2])); src[0].cbSize = sizeof(BINDINFO); dest[0].cbSize = 0; hres = pCopyBindInfo(src, dest); - ok(hres == E_INVALIDARG, "CopyBindInfo returned: %08x, expected E_INVALIDARG\n", hres); + ok(hres == E_INVALIDARG, "CopyBindInfo returned: %08lx, expected E_INVALIDARG\n", hres);
memset(src, 0, sizeof(BINDINFO[2])); memset(dest, 0xde, sizeof(BINDINFO[2])); src[0].cbSize = 1; dest[0].cbSize = sizeof(BINDINFO)+sizeof(DWORD); hres = pCopyBindInfo(src, dest); - ok(hres == S_OK, "CopyBindInfo failed: %08x\n", hres); - ok(dest[0].cbSize == sizeof(BINDINFO)+sizeof(DWORD), "incorrect cbSize: %d\n", dest[0].cbSize); + ok(hres == S_OK, "CopyBindInfo failed: %08lx\n", hres); + ok(dest[0].cbSize == sizeof(BINDINFO)+sizeof(DWORD), "incorrect cbSize: %ld\n", dest[0].cbSize); for(i=1; i<dest[0].cbSize/sizeof(int); i++) ok(((int*)dest)[i] == 0, "unset values should be set to 0, got %d on %d\n", ((int*)dest)[i], i);
@@ -1334,7 +1334,7 @@ static void test_CopyBindInfo(void) src[0].cbSize = sizeof(BINDINFO)+2*sizeof(DWORD); dest[0].cbSize = sizeof(BINDINFO)+sizeof(DWORD); hres = pCopyBindInfo(src, dest); - ok(hres == S_OK, "CopyBindInfo failed: %08x\n", hres); + ok(hres == S_OK, "CopyBindInfo failed: %08lx\n", hres); ok(dest[1].cbSize == src[1].cbSize, "additional data should be copied\n"); ok(dest[1].szExtraInfo != src[1].szExtraInfo, "data not fitting in destination buffer should not be copied\n"); @@ -1350,29 +1350,29 @@ static void test_CopyBindInfo(void) src[0].stgmedData.pUnkForRelease = NULL; dest[0].cbSize = sizeof(BINDINFO); hres = pCopyBindInfo(src, dest); - ok(hres == S_OK, "CopyBindInfo failed: %08x\n", hres); + ok(hres == S_OK, "CopyBindInfo failed: %08lx\n", hres);
- ok(dest[0].cbSize == sizeof(BINDINFO), "incorrect cbSize: %d\n", dest[0].cbSize); + ok(dest[0].cbSize == sizeof(BINDINFO), "incorrect cbSize: %ld\n", dest[0].cbSize); ok(dest[0].szExtraInfo && !dest[0].szExtraInfo[0] && dest[0].szExtraInfo!=src[0].szExtraInfo, "incorrect szExtraInfo: (%p!=%p) %d\n", dest[0].szExtraInfo, src[0].szExtraInfo, dest[0].szExtraInfo[0]); ok(!memcmp(&dest[0].stgmedData, &src[0].stgmedData, sizeof(STGMEDIUM)), "incorrect stgmedData value\n"); - ok(src[0].grfBindInfoF == dest[0].grfBindInfoF, "grfBindInfoF = %x, expected %x\n", + ok(src[0].grfBindInfoF == dest[0].grfBindInfoF, "grfBindInfoF = %lx, expected %lx\n", dest[0].grfBindInfoF, src[0].grfBindInfoF); - ok(src[0].dwBindVerb == dest[0].dwBindVerb, "dwBindVerb = %x, expected %x\n", + ok(src[0].dwBindVerb == dest[0].dwBindVerb, "dwBindVerb = %lx, expected %lx\n", dest[0].dwBindVerb, src[0].dwBindVerb); ok(!dest[0].szCustomVerb, "szCustmoVerb != NULL\n"); - ok(src[0].cbstgmedData == dest[0].cbstgmedData, "cbstgmedData = %x, expected %x\n", + ok(src[0].cbstgmedData == dest[0].cbstgmedData, "cbstgmedData = %lx, expected %lx\n", dest[0].cbstgmedData, src[0].cbstgmedData); - ok(src[0].dwOptions == dest[0].dwOptions, "dwOptions = %x, expected %x\n", + ok(src[0].dwOptions == dest[0].dwOptions, "dwOptions = %lx, expected %lx\n", dest[0].dwOptions, src[0].dwOptions); - ok(src[0].dwOptionsFlags == dest[0].dwOptionsFlags, "dwOptionsFlags = %x, expected %x\n", + ok(src[0].dwOptionsFlags == dest[0].dwOptionsFlags, "dwOptionsFlags = %lx, expected %lx\n", dest[0].dwOptionsFlags, src[0].dwOptionsFlags); - ok(src[0].dwCodePage == dest[0].dwCodePage, "dwCodePage = %x, expected %x\n", + ok(src[0].dwCodePage == dest[0].dwCodePage, "dwCodePage = %lx, expected %lx\n", dest[0].dwCodePage, src[0].dwCodePage); ok(!dest[0].securityAttributes.nLength, - "unexpected securityAttributes.nLength value: %d\n", + "unexpected securityAttributes.nLength value: %ld\n", dest[0].securityAttributes.nLength); ok(!dest[0].securityAttributes.lpSecurityDescriptor, "unexpected securityAttributes.lpSecurityDescriptor value: %p\n", @@ -1383,7 +1383,7 @@ static void test_CopyBindInfo(void) ok(!memcmp(&dest[0].iid, &src[0].iid, sizeof(IID)), "incorrect iid value\n"); ok(!dest[0].pUnk, "pUnk != NULL\n"); - ok(src[0].dwReserved == dest[0].dwReserved, "dwReserved = %x, expected %x\n", + ok(src[0].dwReserved == dest[0].dwReserved, "dwReserved = %lx, expected %lx\n", dest[0].dwReserved, src[0].dwReserved);
CoTaskMemFree(src[0].szExtraInfo); @@ -1396,9 +1396,9 @@ static void test_CopyBindInfo(void) src[0].securityAttributes.lpSecurityDescriptor = (void*)&sec_desc; src[0].securityAttributes.bInheritHandle = TRUE; hres = pCopyBindInfo(src, dest); - ok(hres == S_OK, "CopyBindInfo failed: %08x\n", hres); + ok(hres == S_OK, "CopyBindInfo failed: %08lx\n", hres); ok(!dest[0].securityAttributes.nLength, - "unexpected securityAttributes.nLength value: %d\n", + "unexpected securityAttributes.nLength value: %ld\n", dest[0].securityAttributes.nLength); ok(!dest[0].securityAttributes.lpSecurityDescriptor, "unexpected securityAttributes.lpSecurityDescriptor value: %p\n", @@ -1416,36 +1416,36 @@ static void test_UrlMkGetSessionOption(void) size = encoding = 0xdeadbeef; hres = pUrlMkGetSessionOption(URLMON_OPTION_URL_ENCODING, &encoding, sizeof(encoding), &size, 0); - ok(hres == S_OK, "UrlMkGetSessionOption failed: %08x\n", hres); + ok(hres == S_OK, "UrlMkGetSessionOption failed: %08lx\n", hres); ok(encoding != 0xdeadbeef, "encoding not changed\n"); - ok(size == sizeof(encoding), "size=%d\n", size); + ok(size == sizeof(encoding), "size=%ld\n", size);
size = encoding = 0xdeadbeef; hres = pUrlMkGetSessionOption(URLMON_OPTION_URL_ENCODING, &encoding, sizeof(encoding)+1, &size, 0); - ok(hres == S_OK, "UrlMkGetSessionOption failed: %08x\n", hres); + ok(hres == S_OK, "UrlMkGetSessionOption failed: %08lx\n", hres); ok(encoding != 0xdeadbeef, "encoding not changed\n"); - ok(size == sizeof(encoding), "size=%d\n", size); + ok(size == sizeof(encoding), "size=%ld\n", size);
size = encoding = 0xdeadbeef; hres = pUrlMkGetSessionOption(URLMON_OPTION_URL_ENCODING, &encoding, sizeof(encoding)-1, &size, 0); - ok(hres == E_INVALIDARG, "UrlMkGetSessionOption failed: %08x\n", hres); - ok(encoding == 0xdeadbeef, "encoding = %08x, exepcted 0xdeadbeef\n", encoding); - ok(size == 0xdeadbeef, "size=%d\n", size); + ok(hres == E_INVALIDARG, "UrlMkGetSessionOption failed: %08lx\n", hres); + ok(encoding == 0xdeadbeef, "encoding = %08lx, exepcted 0xdeadbeef\n", encoding); + ok(size == 0xdeadbeef, "size=%ld\n", size);
size = encoding = 0xdeadbeef; hres = pUrlMkGetSessionOption(URLMON_OPTION_URL_ENCODING, NULL, sizeof(encoding)-1, &size, 0); - ok(hres == E_INVALIDARG, "UrlMkGetSessionOption failed: %08x\n", hres); - ok(encoding == 0xdeadbeef, "encoding = %08x, exepcted 0xdeadbeef\n", encoding); - ok(size == 0xdeadbeef, "size=%d\n", size); + ok(hres == E_INVALIDARG, "UrlMkGetSessionOption failed: %08lx\n", hres); + ok(encoding == 0xdeadbeef, "encoding = %08lx, exepcted 0xdeadbeef\n", encoding); + ok(size == 0xdeadbeef, "size=%ld\n", size);
encoding = 0xdeadbeef; hres = pUrlMkGetSessionOption(URLMON_OPTION_URL_ENCODING, &encoding, sizeof(encoding)-1, NULL, 0); - ok(hres == E_INVALIDARG, "UrlMkGetSessionOption failed: %08x\n", hres); - ok(encoding == 0xdeadbeef, "encoding = %08x, exepcted 0xdeadbeef\n", encoding); + ok(hres == E_INVALIDARG, "UrlMkGetSessionOption failed: %08lx\n", hres); + ok(encoding == 0xdeadbeef, "encoding = %08lx, exepcted 0xdeadbeef\n", encoding); }
static size_t check_prefix(const char *str, const char *prefix) @@ -1473,35 +1473,35 @@ static void test_user_agent(void) DWORD size, saved;
hres = pObtainUserAgentString(0, NULL, NULL); - ok(hres == E_INVALIDARG, "ObtainUserAgentString failed: %08x\n", hres); + ok(hres == E_INVALIDARG, "ObtainUserAgentString failed: %08lx\n", hres);
size = 100; hres = pObtainUserAgentString(0, NULL, &size); - ok(hres == E_INVALIDARG, "ObtainUserAgentString failed: %08x\n", hres); - ok(size == 100, "size=%d, expected %d\n", size, 100); + ok(hres == E_INVALIDARG, "ObtainUserAgentString failed: %08lx\n", hres); + ok(size == 100, "size=%ld, expected %d\n", size, 100);
size = 0; hres = pObtainUserAgentString(0, str, &size); - ok(hres == E_OUTOFMEMORY, "ObtainUserAgentString failed: %08x\n", hres); - ok(size > 0, "size=%d, expected non-zero\n", size); + ok(hres == E_OUTOFMEMORY, "ObtainUserAgentString failed: %08lx\n", hres); + ok(size > 0, "size=%ld, expected non-zero\n", size);
size = 2; str[0] = 'a'; hres = pObtainUserAgentString(0, str, &size); - ok(hres == E_OUTOFMEMORY, "ObtainUserAgentString failed: %08x\n", hres); - ok(size > 0, "size=%d, expected non-zero\n", size); + ok(hres == E_OUTOFMEMORY, "ObtainUserAgentString failed: %08lx\n", hres); + ok(size > 0, "size=%ld, expected non-zero\n", size); ok(str[0] == 'a', "str[0]=%c, expected 'a'\n", str[0]);
size = 0; hres = pObtainUserAgentString(1, str, &size); - ok(hres == E_OUTOFMEMORY, "ObtainUserAgentString failed: %08x\n", hres); - ok(size > 0, "size=%d, expected non-zero\n", size); + ok(hres == E_OUTOFMEMORY, "ObtainUserAgentString failed: %08lx\n", hres); + ok(size > 0, "size=%ld, expected non-zero\n", size);
str2 = HeapAlloc(GetProcessHeap(), 0, (size+20)*sizeof(CHAR)); saved = size; hres = pObtainUserAgentString(0, str2, &size); - ok(hres == S_OK, "ObtainUserAgentString failed: %08x\n", hres); - ok(size == saved, "size=%d, expected %d\n", size, saved); + ok(hres == S_OK, "ObtainUserAgentString failed: %08lx\n", hres); + ok(size == saved, "size=%ld, expected %ld\n", size, saved); ok(strlen(expected) <= strlen(str2) && !memcmp(expected, str2, strlen(expected)*sizeof(CHAR)), "user agent was "%s", expected to start with "%s"\n", @@ -1516,16 +1516,16 @@ static void test_user_agent(void) if (i != 7) { size = sizeof(ua); hres = pObtainUserAgentString(i | UAS_EXACTLEGACY, ua, &size); - ok(hres == S_OK, "ObtainUserAgentString failed: %08x\n", hres); - ok(size == strlen(ua) + 1, "unexpected size %u, expected %u\n", size, strlen(ua) + 1); + ok(hres == S_OK, "ObtainUserAgentString failed: %08lx\n", hres); + ok(size == strlen(ua) + 1, "unexpected size %lu, expected %Iu\n", size, strlen(ua) + 1); ok(!strcmp(ua, str2), "unexpected UA for version %u %s, expected %s\n", i, wine_dbgstr_a(ua), wine_dbgstr_a(str2)); }
size = sizeof(ua); hres = pObtainUserAgentString(i != 1 ? i : UAS_EXACTLEGACY | 7, ua, &size); - ok(hres == S_OK, "ObtainUserAgentString failed: %08x\n", hres); - ok(size == strlen(ua) + 1, "unexpected size %u, expected %u\n", size, strlen(ua) + 1); + ok(hres == S_OK, "ObtainUserAgentString failed: %08lx\n", hres); + ok(size == strlen(ua) + 1, "unexpected size %lu, expected %Iu\n", size, strlen(ua) + 1); if(i < 8 && i != 1) ok(!strcmp(ua, str2), "unexpected UA for version %u %s, expected %s\n", i, wine_dbgstr_a(ua), wine_dbgstr_a(str2)); @@ -1539,7 +1539,7 @@ static void test_user_agent(void) sprintf(buf, "MSIE %u.0; ", max(i, 7)); p += check_prefix(p, buf); } - sprintf(buf, "Windows NT %u.%u; ", os_info.dwMajorVersion, os_info.dwMinorVersion); + sprintf(buf, "Windows NT %lu.%lu; ", os_info.dwMajorVersion, os_info.dwMinorVersion); p += check_prefix(p, buf); if(is_wow) { p += check_prefix(p, "WOW64; "); @@ -1581,24 +1581,24 @@ static void test_user_agent(void)
size = saved+10; hres = pObtainUserAgentString(0, str2, &size); - ok(hres == S_OK, "ObtainUserAgentString failed: %08x\n", hres); - ok(size == saved, "size=%d, expected %d\n", size, saved); + ok(hres == S_OK, "ObtainUserAgentString failed: %08lx\n", hres); + ok(size == saved, "size=%ld, expected %ld\n", size, saved);
size = 0; hres = pUrlMkGetSessionOption(URLMON_OPTION_USERAGENT, NULL, 0, &size, 0); - ok(hres == E_OUTOFMEMORY, "UrlMkGetSessionOption failed: %08x\n", hres); + ok(hres == E_OUTOFMEMORY, "UrlMkGetSessionOption failed: %08lx\n", hres); ok(size, "size == 0\n");
size = 0xdeadbeef; hres = pUrlMkGetSessionOption(URLMON_OPTION_USERAGENT, NULL, 1000, &size, 0); - ok(hres == E_INVALIDARG, "UrlMkGetSessionOption failed: %08x\n", hres); + ok(hres == E_INVALIDARG, "UrlMkGetSessionOption failed: %08lx\n", hres); ok(size, "size == 0\n");
saved = size; size = 0; hres = pUrlMkGetSessionOption(URLMON_OPTION_USERAGENT, str2, saved+10, &size, 0); - ok(hres == E_OUTOFMEMORY, "UrlMkGetSessionOption failed: %08x\n", hres); - ok(size == saved, "size = %d, expected %d\n", size, saved); + ok(hres == E_OUTOFMEMORY, "UrlMkGetSessionOption failed: %08lx\n", hres); + ok(size == saved, "size = %ld, expected %ld\n", size, saved); ok(sizeof(expected) <= strlen(str2) && !memcmp(expected, str2, sizeof(expected)-1), "user agent was "%s", expected to start with "%s"\n", str2, expected); @@ -1606,8 +1606,8 @@ static void test_user_agent(void) size = 0; str2[0] = 0; hres = pUrlMkGetSessionOption(URLMON_OPTION_USERAGENT, str2, saved, &size, 0); - ok(hres == E_OUTOFMEMORY, "UrlMkGetSessionOption failed: %08x\n", hres); - ok(size == saved, "size = %d, expected %d\n", size, saved); + ok(hres == E_OUTOFMEMORY, "UrlMkGetSessionOption failed: %08lx\n", hres); + ok(size == saved, "size = %ld, expected %ld\n", size, saved); ok(sizeof(expected) <= strlen(str2) && !memcmp(expected, str2, sizeof(expected)-1), "user agent was "%s", expected to start with "%s"\n", str2, expected); @@ -1615,51 +1615,51 @@ static void test_user_agent(void) size = saved; str2[0] = 0; hres = pUrlMkGetSessionOption(URLMON_OPTION_USERAGENT, str2, saved-1, &size, 0); - ok(hres == E_OUTOFMEMORY, "UrlMkGetSessionOption failed: %08x\n", hres); - ok(size == saved, "size = %d, expected %d\n", size, saved); + ok(hres == E_OUTOFMEMORY, "UrlMkGetSessionOption failed: %08lx\n", hres); + ok(size == saved, "size = %ld, expected %ld\n", size, saved); ok(!str2[0], "buf changed\n");
size = saved; str2[0] = 0; hres = pUrlMkGetSessionOption(URLMON_OPTION_USERAGENT, str2, saved, NULL, 0); - ok(hres == E_INVALIDARG, "UrlMkGetSessionOption failed: %08x\n", hres); + ok(hres == E_INVALIDARG, "UrlMkGetSessionOption failed: %08lx\n", hres); ok(!str2[0], "buf changed\n");
hres = UrlMkSetSessionOption(URLMON_OPTION_USERAGENT, test_str, sizeof(test_str), 0); - ok(hres == S_OK, "UrlMkSetSessionOption failed: %08x\n", hres); + ok(hres == S_OK, "UrlMkSetSessionOption failed: %08lx\n", hres);
size = 0; str2[0] = 0; hres = pUrlMkGetSessionOption(URLMON_OPTION_USERAGENT, str2, saved, &size, 0); - ok(hres == E_OUTOFMEMORY, "UrlMkGetSessionOption failed: %08x\n", hres); + ok(hres == E_OUTOFMEMORY, "UrlMkGetSessionOption failed: %08lx\n", hres); ok(size == sizeof(test_str) && !memcmp(str2, test_str, sizeof(test_str)), "wrong user agent\n");
hres = UrlMkSetSessionOption(URLMON_OPTION_USERAGENT, test2_str, sizeof(test2_str), 0); - ok(hres == S_OK, "UrlMkSetSessionOption failed: %08x\n", hres); + ok(hres == S_OK, "UrlMkSetSessionOption failed: %08lx\n", hres);
size = 0; str2[0] = 0; hres = pUrlMkGetSessionOption(URLMON_OPTION_USERAGENT, str2, saved, &size, 0); - ok(hres == E_OUTOFMEMORY, "UrlMkGetSessionOption failed: %08x\n", hres); + ok(hres == E_OUTOFMEMORY, "UrlMkGetSessionOption failed: %08lx\n", hres); ok(size == sizeof(test_str) && !memcmp(str2, test_str, sizeof(test_str)), "wrong user agent\n");
hres = UrlMkSetSessionOption(URLMON_OPTION_USERAGENT, test_str, 2, 0); - ok(hres == S_OK, "UrlMkSetSessionOption failed: %08x\n", hres); + ok(hres == S_OK, "UrlMkSetSessionOption failed: %08lx\n", hres);
size = 0; str2[0] = 0; hres = pUrlMkGetSessionOption(URLMON_OPTION_USERAGENT, str2, saved, &size, 0); - ok(hres == E_OUTOFMEMORY, "UrlMkGetSessionOption failed: %08x\n", hres); + ok(hres == E_OUTOFMEMORY, "UrlMkGetSessionOption failed: %08lx\n", hres); ok(size == 3 && !strcmp(str2, "te"), "wrong user agent\n");
hres = UrlMkSetSessionOption(URLMON_OPTION_USERAGENT, test_str, 0, 0); - ok(hres == E_INVALIDARG, "UrlMkSetSessionOption failed: %08x\n", hres); + ok(hres == E_INVALIDARG, "UrlMkSetSessionOption failed: %08lx\n", hres);
hres = UrlMkSetSessionOption(URLMON_OPTION_USERAGENT, NULL, sizeof(test_str), 0); - ok(hres == E_INVALIDARG, "UrlMkSetSessionOption failed: %08x\n", hres); + ok(hres == E_INVALIDARG, "UrlMkSetSessionOption failed: %08lx\n", hres);
hres = UrlMkSetSessionOption(URLMON_OPTION_USERAGENT, NULL, 0, 0); - ok(hres == E_INVALIDARG, "UrlMkSetSessionOption failed: %08x\n", hres); + ok(hres == E_INVALIDARG, "UrlMkSetSessionOption failed: %08lx\n", hres);
HeapFree(GetProcessHeap(), 0, str2); } @@ -1716,40 +1716,40 @@ static void test_MkParseDisplayNameEx(void) invalid_parameters[i].pchEaten, invalid_parameters[i].ppmk); ok(hres == E_INVALIDARG, - "[%d] Expected MkParseDisplayNameEx to return E_INVALIDARG, got %08x\n", i, hres); - ok(eaten == 0xdeadbeef, "[%d] Expected eaten to be 0xdeadbeef, got %u\n", i, eaten); + "[%d] Expected MkParseDisplayNameEx to return E_INVALIDARG, got %08lx\n", i, hres); + ok(eaten == 0xdeadbeef, "[%d] Expected eaten to be 0xdeadbeef, got %lu\n", i, eaten); ok(mon == (IMoniker *)0xdeadbeef, "[%d] Expected mon to be 0xdeadbeef, got %p\n", i, mon); }
hres = MkParseDisplayNameEx(bctx, url9, &eaten, &mon); - ok(hres == S_OK, "MkParseDisplayNameEx failed: %08x\n", hres); - ok(eaten == ARRAY_SIZE(url9)-1, "eaten=%d\n", eaten); + ok(hres == S_OK, "MkParseDisplayNameEx failed: %08lx\n", hres); + ok(eaten == ARRAY_SIZE(url9)-1, "eaten=%ld\n", eaten); ok(mon != NULL, "mon == NULL\n");
hres = IMoniker_GetDisplayName(mon, NULL, 0, &name); - ok(hres == S_OK, "GetDisplayName failed: %08x\n", hres); + ok(hres == S_OK, "GetDisplayName failed: %08lx\n", hres); ok(!lstrcmpW(name, url9), "wrong display name %s\n", wine_dbgstr_w(name)); CoTaskMemFree(name);
hres = IMoniker_IsSystemMoniker(mon, &issys); - ok(hres == S_OK, "IsSystemMoniker failed: %08x\n", hres); - ok(issys == MKSYS_URLMONIKER, "issys=%x\n", issys); + ok(hres == S_OK, "IsSystemMoniker failed: %08lx\n", hres); + ok(issys == MKSYS_URLMONIKER, "issys=%lx\n", issys);
IMoniker_Release(mon);
hres = MkParseDisplayNameEx(bctx, clsid_nameW, &eaten, &mon); - ok(hres == S_OK, "MkParseDisplayNameEx failed: %08x\n", hres); - ok(eaten == ARRAY_SIZE(clsid_nameW)-1, "eaten=%d\n", eaten); + ok(hres == S_OK, "MkParseDisplayNameEx failed: %08lx\n", hres); + ok(eaten == ARRAY_SIZE(clsid_nameW)-1, "eaten=%ld\n", eaten); ok(mon != NULL, "mon == NULL\n");
hres = IMoniker_IsSystemMoniker(mon, &issys); - ok(hres == S_OK, "IsSystemMoniker failed: %08x\n", hres); - ok(issys == MKSYS_CLASSMONIKER, "issys=%x\n", issys); + ok(hres == S_OK, "IsSystemMoniker failed: %08lx\n", hres); + ok(issys == MKSYS_CLASSMONIKER, "issys=%lx\n", issys);
IMoniker_Release(mon);
hres = MkParseDisplayNameEx(bctx, url8, &eaten, &mon); - ok(FAILED(hres), "MkParseDisplayNameEx succeeded: %08x\n", hres); + ok(FAILED(hres), "MkParseDisplayNameEx succeeded: %08lx\n", hres);
IBindCtx_Release(bctx); } @@ -1760,15 +1760,15 @@ static void test_IsValidURL(void) IBindCtx *bctx = NULL;
hr = IsValidURL(NULL, 0, 0); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr);
hr = IsValidURL(NULL, wszHttpWineHQ, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
CreateBindCtx(0, &bctx);
hr = IsValidURL(bctx, wszHttpWineHQ, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
IBindCtx_Release(bctx); } @@ -1816,7 +1816,7 @@ static void test_internet_feature_defaults(void) { for(i = 0; i < ARRAY_SIZE(default_feature_tests); ++i) { hres = pCoInternetIsFeatureEnabled(default_feature_tests[i].feature, default_feature_tests[i].get_flags); todo_wine_if (default_feature_tests[i].todo) - ok(hres == default_feature_tests[i].expected, "CoInternetIsFeatureEnabled returned %08x, expected %08x on test %d\n", + ok(hres == default_feature_tests[i].expected, "CoInternetIsFeatureEnabled returned %08lx, expected %08lx on test %ld\n", hres, default_feature_tests[i].expected, i); } } @@ -1851,13 +1851,13 @@ static void test_internet_features_registry(void) { }
res = GetModuleFileNameA(NULL, module, sizeof(module)); - ok(res, "GetModuleFileName failed: %d\n", GetLastError()); + ok(res, "GetModuleFileName failed: %ld\n", GetLastError());
name = strrchr(module, '\')+1;
/* Some Windows machines don't have a FeatureControl key in HKCU. */ res = RegOpenKeyA(HKEY_CURRENT_USER, szFeatureControlKey, &feature_control); - ok(res == ERROR_SUCCESS, "RegCreateKey failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegCreateKey failed: %ld\n", res);
res = RegOpenKeyA(feature_control, szFeatureBehaviorsKey, &feature); if(res == ERROR_SUCCESS) { @@ -1865,15 +1865,15 @@ static void test_internet_features_registry(void) { delete_feature_key = FALSE; }else { res = RegCreateKeyA(feature_control, szFeatureBehaviorsKey, &feature); - ok(res == ERROR_SUCCESS, "RegCreateKey failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegCreateKey failed: %ld\n", res); }
value = 0; res = RegSetValueExA(feature, name, 0, REG_DWORD, (BYTE*)&value, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "RegSetValueEx failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegSetValueEx failed: %ld\n", res);
hres = pCoInternetIsFeatureEnabled(FEATURE_BEHAVIORS, GET_FEATURE_FROM_PROCESS); - ok(hres == S_FALSE, "CoInternetIsFeatureEnabled returned %08x, expected S_FALSE\n", hres); + ok(hres == S_FALSE, "CoInternetIsFeatureEnabled returned %08lx, expected S_FALSE\n", hres);
if(delete_feature_key) { RegCloseKey(feature); @@ -1885,19 +1885,19 @@ static void test_internet_features_registry(void) {
/* IE's feature control cached the value it got from the registry earlier. */ hres = pCoInternetIsFeatureEnabled(FEATURE_BEHAVIORS, GET_FEATURE_FROM_PROCESS); - ok(hres == S_FALSE, "CoInternetIsFeatureEnabled returned %08x, expected S_FALSE\n", hres); + ok(hres == S_FALSE, "CoInternetIsFeatureEnabled returned %08lx, expected S_FALSE\n", hres);
/* Restore this feature back to its default value. */ hres = pCoInternetSetFeatureEnabled(FEATURE_BEHAVIORS, SET_FEATURE_ON_PROCESS, TRUE); - ok(hres == S_OK, "CoInternetSetFeatureEnabled failed: %08x\n", hres); + ok(hres == S_OK, "CoInternetSetFeatureEnabled failed: %08lx\n", hres);
RegCloseKey(feature_control);
res = RegOpenKeyA(HKEY_LOCAL_MACHINE, szFeatureControlKey, &feature_control); - ok(res == ERROR_SUCCESS, "RegOpenKey failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegOpenKey failed: %ld\n", res);
res = RegOpenKeyA(feature_control, szFeatureZoneElevationKey, &feature); - ok(res == ERROR_SUCCESS, "RegOpenKey failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegOpenKey failed: %ld\n", res);
value = 1; res = RegSetValueExA(feature, "*", 0, REG_DWORD, (BYTE*)&value, sizeof(DWORD)); @@ -1909,10 +1909,10 @@ static void test_internet_features_registry(void) { else { skip_zone = FALSE; - ok(res == ERROR_SUCCESS, "RegSetValueEx failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegSetValueEx failed: %ld\n", res);
hres = pCoInternetIsFeatureEnabled(FEATURE_ZONE_ELEVATION, GET_FEATURE_FROM_PROCESS); - ok(hres == S_OK, "CoInternetIsFeatureEnabled returned %08x, expected S_OK\n", hres); + ok(hres == S_OK, "CoInternetIsFeatureEnabled returned %08lx, expected S_OK\n", hres); } RegDeleteValueA(feature, "*"); RegCloseKey(feature); @@ -1922,10 +1922,10 @@ static void test_internet_features_registry(void) { if (!skip_zone) { hres = pCoInternetIsFeatureEnabled(FEATURE_ZONE_ELEVATION, GET_FEATURE_FROM_PROCESS); - ok(hres == S_OK, "CoInternetIsFeatureEnabled returned %08x, expected S_OK\n", hres); + ok(hres == S_OK, "CoInternetIsFeatureEnabled returned %08lx, expected S_OK\n", hres);
hres = pCoInternetSetFeatureEnabled(FEATURE_ZONE_ELEVATION, SET_FEATURE_ON_PROCESS, FALSE); - ok(hres == S_OK, "CoInternetSetFeatureEnabled failed: %08x\n", hres); + ok(hres == S_OK, "CoInternetSetFeatureEnabled failed: %08lx\n", hres); }
test_internet_feature_defaults(); @@ -1935,7 +1935,7 @@ static void test_CoInternetIsFeatureEnabled(void) { HRESULT hres;
hres = pCoInternetIsFeatureEnabled(FEATURE_ENTRY_COUNT, GET_FEATURE_FROM_PROCESS); - ok(hres == E_FAIL, "CoInternetIsFeatureEnabled returned %08x, expected E_FAIL\n", hres); + ok(hres == E_FAIL, "CoInternetIsFeatureEnabled returned %08lx, expected E_FAIL\n", hres); }
static const struct { @@ -1958,18 +1958,18 @@ static void test_CoInternetSetFeatureEnabled(void) { DWORD i;
hres = pCoInternetSetFeatureEnabled(FEATURE_ENTRY_COUNT,SET_FEATURE_ON_PROCESS,TRUE); - ok(hres == E_FAIL, "CoInternetSetFeatureEnabled returned %08x, expected E_FAIL\n", hres); + ok(hres == E_FAIL, "CoInternetSetFeatureEnabled returned %08lx, expected E_FAIL\n", hres);
for(i = 0; i < ARRAY_SIZE(internet_feature_tests); ++i) { hres = pCoInternetSetFeatureEnabled(internet_feature_tests[i].feature, internet_feature_tests[i].set_flags, internet_feature_tests[i].enable); todo_wine_if (internet_feature_tests[i].set_todo) - ok(hres == internet_feature_tests[i].set_expected, "CoInternetSetFeatureEnabled returned %08x, expected %08x on test %d\n", + ok(hres == internet_feature_tests[i].set_expected, "CoInternetSetFeatureEnabled returned %08lx, expected %08lx on test %ld\n", hres, internet_feature_tests[i].set_expected, i);
hres = pCoInternetIsFeatureEnabled(internet_feature_tests[i].feature, internet_feature_tests[i].set_flags); todo_wine_if (internet_feature_tests[i].get_todo) - ok(hres == internet_feature_tests[i].get_expected, "CoInternetIsFeatureEnabled returned %08x, expected %08x on test %d\n", + ok(hres == internet_feature_tests[i].get_expected, "CoInternetIsFeatureEnabled returned %08lx, expected %08lx on test %ld\n", hres, internet_feature_tests[i].get_expected, i);
} @@ -1994,14 +1994,14 @@ static void test_internet_features(void) { BOOL ret;
res = RegCreateKeyA(HKEY_CURRENT_USER, szFeatureControlKey, &key); - ok(res == ERROR_SUCCESS, "RegCreateKey failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegCreateKey failed: %ld\n", res);
trace("Running features tests in a separated process.\n");
winetest_get_mainargs( &argv ); sprintf(cmdline, ""%s" %s internet_features", argv[0], argv[1]); ret = CreateProcessA(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "Could not create process: %u\n", GetLastError()); + ok(ret, "Could not create process: %lu\n", GetLastError()); wait_child_process( pi.hProcess ); CloseHandle(pi.hThread); CloseHandle(pi.hProcess); @@ -2180,11 +2180,11 @@ static DWORD WINAPI bsc_thread(void *arg)
hres = CoMarshalInterface(stream, &IID_IBindStatusCallback, (IUnknown*)&BindStatusCallback, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok(hres == S_OK, "CoMarshalInterface failed: %08x\n", hres); + ok(hres == S_OK, "CoMarshalInterface failed: %08lx\n", hres);
zero.QuadPart = 0; hres = IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); - ok(hres == S_OK, "Seek failed: 0x%08x\n", hres); + ok(hres == S_OK, "Seek failed: 0x%08lx\n", hres);
SetEvent(thread_ready);
@@ -2214,19 +2214,19 @@ static void test_bsc_marshaling(void) HRESULT hres;
hres = CreateStreamOnHGlobal(NULL, TRUE, &stream); - ok(hres == S_OK, "CreateStreamOnHGlobal returned: %08x\n", hres); + ok(hres == S_OK, "CreateStreamOnHGlobal returned: %08lx\n", hres);
thread_ready = CreateEventW(NULL, TRUE, FALSE, NULL); thread = CreateThread(NULL, 0, bsc_thread, stream, 0, NULL); WaitForSingleObject(thread_ready, INFINITE);
hres = CoUnmarshalInterface(stream, &IID_IBindStatusCallback, (void**)&bsc); - ok(hres == S_OK, "CoUnmarshalInterface failed: %08x\n", hres); + ok(hres == S_OK, "CoUnmarshalInterface failed: %08lx\n", hres);
hres = CreateStreamOnHGlobal(NULL, TRUE, &binding_stream); - ok(hres == S_OK, "CreateStreamOnHGlobal returned: %08x\n", hres); + ok(hres == S_OK, "CreateStreamOnHGlobal returned: %08lx\n", hres); hres = IStream_Write(binding_stream, "xxx", 3, NULL); - ok(hres == S_OK, "Write failed: %08x\n", hres); + ok(hres == S_OK, "Write failed: %08lx\n", hres);
rem_bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA; bindf = 0xdeadbeef; @@ -2268,22 +2268,22 @@ static void test_bsc_marshaling(void) unk_out.ref = 1;
hres = IBindStatusCallback_GetBindInfo(bsc, &bindf, &bindinfo); - ok(hres == S_OK, "GetBindInfo failed: %08x\n", hres); - ok(bindf == rem_bindf, "bindf = %x, expected %x\n", bindf, rem_bindf); + ok(hres == S_OK, "GetBindInfo failed: %08lx\n", hres); + ok(bindf == rem_bindf, "bindf = %lx, expected %lx\n", bindf, rem_bindf);
- ok(in_bindinfo.cbSize == sizeof(in_bindinfo), "cbSize = %u\n", in_bindinfo.cbSize); + ok(in_bindinfo.cbSize == sizeof(in_bindinfo), "cbSize = %lu\n", in_bindinfo.cbSize); ok(!in_bindinfo.szExtraInfo, "szExtraInfo = %s\n", wine_dbgstr_w(in_bindinfo.szExtraInfo)); - ok(in_bindinfo.grfBindInfoF == 12, "cbSize = %u\n", in_bindinfo.grfBindInfoF); - ok(in_bindinfo.dwBindVerb == 13, "dwBindVerb = %u\n", in_bindinfo.dwBindVerb); + ok(in_bindinfo.grfBindInfoF == 12, "cbSize = %lu\n", in_bindinfo.grfBindInfoF); + ok(in_bindinfo.dwBindVerb == 13, "dwBindVerb = %lu\n", in_bindinfo.dwBindVerb); ok(!in_bindinfo.szCustomVerb, "szCustomVerb = %s\n", wine_dbgstr_w(in_bindinfo.szCustomVerb)); - ok(in_bindinfo.cbstgmedData == 19, "cbstgmedData = %u\n", in_bindinfo.cbstgmedData); - ok(!in_bindinfo.dwOptions, "dwOptions = %u\n", in_bindinfo.dwOptions); - ok(!in_bindinfo.dwOptionsFlags, "dwOptionsFlags = %u\n", in_bindinfo.dwOptionsFlags); - ok(!in_bindinfo.dwCodePage, "dwCodePage = %u\n", in_bindinfo.dwCodePage); + ok(in_bindinfo.cbstgmedData == 19, "cbstgmedData = %lu\n", in_bindinfo.cbstgmedData); + ok(!in_bindinfo.dwOptions, "dwOptions = %lu\n", in_bindinfo.dwOptions); + ok(!in_bindinfo.dwOptionsFlags, "dwOptionsFlags = %lu\n", in_bindinfo.dwOptionsFlags); + ok(!in_bindinfo.dwCodePage, "dwCodePage = %lu\n", in_bindinfo.dwCodePage); ok(!in_bindinfo.iid.Data1, "iid = %s\n", debugstr_guid(&in_bindinfo.iid)); ok(!in_bindinfo.pUnk, "pUnk = %p\n", in_bindinfo.pUnk); - ok(!in_bindinfo.dwReserved, "dwReserved = %u\n", in_bindinfo.dwReserved); - ok(!in_bindinfo.securityAttributes.nLength, "securityAttributes.nLength = %u\n", + ok(!in_bindinfo.dwReserved, "dwReserved = %lu\n", in_bindinfo.dwReserved); + ok(!in_bindinfo.securityAttributes.nLength, "securityAttributes.nLength = %lu\n", in_bindinfo.securityAttributes.nLength); ok(!in_bindinfo.securityAttributes.lpSecurityDescriptor, "securityAttributes.lpSecurityDescriptor = %p\n", @@ -2293,22 +2293,22 @@ static void test_bsc_marshaling(void) ok(!in_bindinfo.stgmedData.pUnkForRelease, "pUnkForRelease = %p\n", in_bindinfo.stgmedData.pUnkForRelease);
- ok(bindinfo.cbSize == sizeof(rem_bindinfo), "cbSize = %u\n", rem_bindinfo.cbSize); + ok(bindinfo.cbSize == sizeof(rem_bindinfo), "cbSize = %lu\n", rem_bindinfo.cbSize); ok(!lstrcmpW(bindinfo.szExtraInfo, L"extra info out"), "szExtraInfo = %s\n", wine_dbgstr_w(bindinfo.szExtraInfo)); - ok(bindinfo.grfBindInfoF == 22, "grfBindInfoF = %u\n", rem_bindinfo.grfBindInfoF); - ok(bindinfo.dwBindVerb == 23, "dwBindVerb = %u\n", bindinfo.dwBindVerb); + ok(bindinfo.grfBindInfoF == 22, "grfBindInfoF = %lu\n", rem_bindinfo.grfBindInfoF); + ok(bindinfo.dwBindVerb == 23, "dwBindVerb = %lu\n", bindinfo.dwBindVerb); ok(bindinfo.szCustomVerb != verb_out, "szCustomVerb == inbuf\n"); ok(!lstrcmpW(bindinfo.szCustomVerb, L"custom verb out"), "szCustomVerb = %s\n", wine_dbgstr_w(bindinfo.szCustomVerb)); - ok(bindinfo.cbstgmedData == 29, "cbstgmedData = %u\n", bindinfo.cbstgmedData); - ok(bindinfo.dwOptions == 24, "dwOptions = %u\n", bindinfo.dwOptions); - ok(bindinfo.dwOptionsFlags == 25, "dwOptionsFlags = %u\n", bindinfo.dwOptionsFlags); - ok(bindinfo.dwCodePage, "dwCodePage = %u\n", bindinfo.dwCodePage); + ok(bindinfo.cbstgmedData == 29, "cbstgmedData = %lu\n", bindinfo.cbstgmedData); + ok(bindinfo.dwOptions == 24, "dwOptions = %lu\n", bindinfo.dwOptions); + ok(bindinfo.dwOptionsFlags == 25, "dwOptionsFlags = %lu\n", bindinfo.dwOptionsFlags); + ok(bindinfo.dwCodePage, "dwCodePage = %lu\n", bindinfo.dwCodePage); ok(!bindinfo.iid.Data1, "iid = %s\n", debugstr_guid(&bindinfo.iid)); ok(!bindinfo.pUnk, "pUnk = %p\n", bindinfo.pUnk); - ok(bindinfo.dwReserved == 18, "dwReserved = %u\n", bindinfo.dwReserved); - ok(bindinfo.securityAttributes.nLength == 30, "securityAttributes.nLength = %u\n", + ok(bindinfo.dwReserved == 18, "dwReserved = %lu\n", bindinfo.dwReserved); + ok(bindinfo.securityAttributes.nLength == 30, "securityAttributes.nLength = %lu\n", bindinfo.securityAttributes.nLength); ok(bindinfo.securityAttributes.lpSecurityDescriptor == (void*)0xdead0001, "securityAttributes.lpSecurityDescriptor = %p\n", @@ -2317,14 +2317,14 @@ static void test_bsc_marshaling(void) bindinfo.securityAttributes.bInheritHandle); ok(bindinfo.stgmedData.pUnkForRelease == &unk_in.IUnknown_iface, "pUnkForRelease = %p\n", bindinfo.stgmedData.pUnkForRelease); - ok(unk_out.ref == 1, "unk_out.ref = %u\n", unk_out.ref); + ok(unk_out.ref == 1, "unk_out.ref = %lu\n", unk_out.ref);
bindinfo.stgmedData.pUnkForRelease = NULL; ReleaseBindInfo(&bindinfo);
zero.QuadPart = 0; hres = IStream_Seek(binding_stream, zero, STREAM_SEEK_SET, NULL); - ok(hres == S_OK, "Seek failed: 0x%08x\n", hres); + ok(hres == S_OK, "Seek failed: 0x%08lx\n", hres);
/* Return IStream stgmed from GetBindInfo, it's not marshaled back */ rem_bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA; @@ -2342,23 +2342,23 @@ static void test_bsc_marshaling(void) IStream_AddRef(binding_stream);
hres = IBindStatusCallback_GetBindInfo(bsc, &bindf, &bindinfo); - ok(hres == S_OK, "GetBindInfo failed: %08x\n", hres); - ok(bindf == rem_bindf, "bindf = %x, expected %x\n", bindf, rem_bindf); + ok(hres == S_OK, "GetBindInfo failed: %08lx\n", hres); + ok(bindf == rem_bindf, "bindf = %lx, expected %lx\n", bindf, rem_bindf);
- ok(in_bindinfo.cbSize == sizeof(in_bindinfo), "cbSize = %u\n", in_bindinfo.cbSize); + ok(in_bindinfo.cbSize == sizeof(in_bindinfo), "cbSize = %lu\n", in_bindinfo.cbSize); ok(!in_bindinfo.pUnk, "pUnk = %p\n", in_bindinfo.pUnk); - ok(in_bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %u\n", + ok(in_bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %lu\n", in_bindinfo.stgmedData.tymed);
- ok(bindinfo.cbSize == sizeof(bindinfo), "cbSize = %u\n", bindinfo.cbSize); + ok(bindinfo.cbSize == sizeof(bindinfo), "cbSize = %lu\n", bindinfo.cbSize); ok(!bindinfo.pUnk, "pUnk = %p\n", bindinfo.pUnk); - ok(bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %u\n", + ok(bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %lu\n", bindinfo.stgmedData.tymed); ok(!bindinfo.stgmedData.u.pstm, "stm = %p\n", bindinfo.stgmedData.u.pstm); ok(!bindinfo.stgmedData.pUnkForRelease, "pUnkForRelease = %p\n", bindinfo.stgmedData.pUnkForRelease); - ok(bindinfo.cbstgmedData == 3, "cbstgmedData = %u\n", bindinfo.cbstgmedData); + ok(bindinfo.cbstgmedData == 3, "cbstgmedData = %lu\n", bindinfo.cbstgmedData);
ReleaseBindInfo(&bindinfo);
@@ -2380,23 +2380,23 @@ static void test_bsc_marshaling(void) IStream_AddRef(binding_stream);
hres = IBindStatusCallback_GetBindInfo(bsc, &bindf, &bindinfo); - ok(hres == S_OK, "GetBindInfo failed: %08x\n", hres); - ok(bindf == rem_bindf, "bindf = %x, expected %x\n", bindf, rem_bindf); + ok(hres == S_OK, "GetBindInfo failed: %08lx\n", hres); + ok(bindf == rem_bindf, "bindf = %lx, expected %lx\n", bindf, rem_bindf);
- ok(in_bindinfo.cbSize == sizeof(in_bindinfo), "cbSize = %u\n", in_bindinfo.cbSize); + ok(in_bindinfo.cbSize == sizeof(in_bindinfo), "cbSize = %lu\n", in_bindinfo.cbSize); ok(!in_bindinfo.pUnk, "pUnk = %p\n", in_bindinfo.pUnk); - ok(in_bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %u\n", + ok(in_bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %lu\n", in_bindinfo.stgmedData.tymed);
- ok(bindinfo.cbSize == sizeof(bindinfo), "cbSize = %u\n", bindinfo.cbSize); + ok(bindinfo.cbSize == sizeof(bindinfo), "cbSize = %lu\n", bindinfo.cbSize); ok(!bindinfo.pUnk, "pUnk = %p\n", bindinfo.pUnk); - ok(bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %u\n", + ok(bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %lu\n", bindinfo.stgmedData.tymed); ok(!bindinfo.stgmedData.u.pstm, "stm = %p\n", bindinfo.stgmedData.u.pstm); ok(!bindinfo.stgmedData.pUnkForRelease, "pUnkForRelease = %p\n", bindinfo.stgmedData.pUnkForRelease); - ok(bindinfo.cbstgmedData == 3, "cbstgmedData = %u\n", bindinfo.cbstgmedData); + ok(bindinfo.cbstgmedData == 3, "cbstgmedData = %lu\n", bindinfo.cbstgmedData);
ReleaseBindInfo(&bindinfo);
@@ -2418,23 +2418,23 @@ static void test_bsc_marshaling(void) rem_bindinfo.cbstgmedData = 5;
hres = IBindStatusCallback_GetBindInfo(bsc, &bindf, &bindinfo); - ok(hres == S_OK, "GetBindInfo failed: %08x\n", hres); - ok(bindf == rem_bindf, "bindf = %x, expected %x\n", bindf, rem_bindf); + ok(hres == S_OK, "GetBindInfo failed: %08lx\n", hres); + ok(bindf == rem_bindf, "bindf = %lx, expected %lx\n", bindf, rem_bindf);
- ok(in_bindinfo.cbSize == sizeof(in_bindinfo), "cbSize = %u\n", in_bindinfo.cbSize); + ok(in_bindinfo.cbSize == sizeof(in_bindinfo), "cbSize = %lu\n", in_bindinfo.cbSize); ok(!in_bindinfo.pUnk, "pUnk = %p\n", in_bindinfo.pUnk); - ok(in_bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %u\n", + ok(in_bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %lu\n", in_bindinfo.stgmedData.tymed);
- ok(bindinfo.cbSize == sizeof(bindinfo), "cbSize = %u\n", bindinfo.cbSize); + ok(bindinfo.cbSize == sizeof(bindinfo), "cbSize = %lu\n", bindinfo.cbSize); ok(!bindinfo.pUnk, "pUnk = %p\n", bindinfo.pUnk); - ok(bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %u\n", + ok(bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %lu\n", bindinfo.stgmedData.tymed); ok(!bindinfo.stgmedData.u.pstm, "stm = %p\n", bindinfo.stgmedData.u.pstm); ok(!bindinfo.stgmedData.pUnkForRelease, "pUnkForRelease = %p\n", bindinfo.stgmedData.pUnkForRelease); - ok(bindinfo.cbstgmedData == 5, "cbstgmedData = %u\n", bindinfo.cbstgmedData); + ok(bindinfo.cbstgmedData == 5, "cbstgmedData = %lu\n", bindinfo.cbstgmedData);
ReleaseBindInfo(&bindinfo);
@@ -2483,24 +2483,24 @@ static void test_bsc_marshaling(void) unk_out.ref = 1;
hres = IBindStatusCallbackEx_GetBindInfoEx(callbackex, &bindf, &bindinfo, &bindf2, &reserved); - ok(hres == S_OK, "GetBindInfo failed: %08x\n", hres); - ok(bindf == rem_bindf, "bindf = %x, expected %x\n", bindf, rem_bindf); - ok(bindf2 == 11, "bindf2 = %x\n", bindf); - ok(reserved == 12, "reserved = %x\n", reserved); + ok(hres == S_OK, "GetBindInfo failed: %08lx\n", hres); + ok(bindf == rem_bindf, "bindf = %lx, expected %lx\n", bindf, rem_bindf); + ok(bindf2 == 11, "bindf2 = %lx\n", bindf); + ok(reserved == 12, "reserved = %lx\n", reserved);
- ok(in_bindinfo.cbSize == sizeof(in_bindinfo), "cbSize = %u\n", in_bindinfo.cbSize); + ok(in_bindinfo.cbSize == sizeof(in_bindinfo), "cbSize = %lu\n", in_bindinfo.cbSize); ok(!in_bindinfo.szExtraInfo, "szExtraInfo = %s\n", wine_dbgstr_w(in_bindinfo.szExtraInfo)); - ok(in_bindinfo.grfBindInfoF == 12, "cbSize = %u\n", in_bindinfo.grfBindInfoF); - ok(in_bindinfo.dwBindVerb == 13, "dwBindVerb = %u\n", in_bindinfo.dwBindVerb); + ok(in_bindinfo.grfBindInfoF == 12, "cbSize = %lu\n", in_bindinfo.grfBindInfoF); + ok(in_bindinfo.dwBindVerb == 13, "dwBindVerb = %lu\n", in_bindinfo.dwBindVerb); ok(!in_bindinfo.szCustomVerb, "szCustomVerb = %s\n", wine_dbgstr_w(in_bindinfo.szCustomVerb)); - ok(in_bindinfo.cbstgmedData == 19, "cbstgmedData = %u\n", in_bindinfo.cbstgmedData); - ok(!in_bindinfo.dwOptions, "dwOptions = %u\n", in_bindinfo.dwOptions); - ok(!in_bindinfo.dwOptionsFlags, "dwOptionsFlags = %u\n", in_bindinfo.dwOptionsFlags); - ok(!in_bindinfo.dwCodePage, "dwCodePage = %u\n", in_bindinfo.dwCodePage); + ok(in_bindinfo.cbstgmedData == 19, "cbstgmedData = %lu\n", in_bindinfo.cbstgmedData); + ok(!in_bindinfo.dwOptions, "dwOptions = %lu\n", in_bindinfo.dwOptions); + ok(!in_bindinfo.dwOptionsFlags, "dwOptionsFlags = %lu\n", in_bindinfo.dwOptionsFlags); + ok(!in_bindinfo.dwCodePage, "dwCodePage = %lu\n", in_bindinfo.dwCodePage); ok(!in_bindinfo.iid.Data1, "iid = %s\n", debugstr_guid(&in_bindinfo.iid)); ok(!in_bindinfo.pUnk, "pUnk = %p\n", in_bindinfo.pUnk); - ok(!in_bindinfo.dwReserved, "dwReserved = %u\n", in_bindinfo.dwReserved); - ok(!in_bindinfo.securityAttributes.nLength, "securityAttributes.nLength = %u\n", + ok(!in_bindinfo.dwReserved, "dwReserved = %lu\n", in_bindinfo.dwReserved); + ok(!in_bindinfo.securityAttributes.nLength, "securityAttributes.nLength = %lu\n", in_bindinfo.securityAttributes.nLength); ok(!in_bindinfo.securityAttributes.lpSecurityDescriptor, "securityAttributes.lpSecurityDescriptor = %p\n", @@ -2510,21 +2510,21 @@ static void test_bsc_marshaling(void) ok(!in_bindinfo.stgmedData.pUnkForRelease, "pUnkForRelease = %p\n", in_bindinfo.stgmedData.pUnkForRelease);
- ok(bindinfo.cbSize == sizeof(rem_bindinfo), "cbSize = %u\n", rem_bindinfo.cbSize); + ok(bindinfo.cbSize == sizeof(rem_bindinfo), "cbSize = %lu\n", rem_bindinfo.cbSize); ok(!lstrcmpW(bindinfo.szExtraInfo, L"extra info out"), "szExtraInfo = %s\n", wine_dbgstr_w(bindinfo.szExtraInfo)); - ok(bindinfo.grfBindInfoF == 22, "grfBindInfoF = %u\n", rem_bindinfo.grfBindInfoF); - ok(bindinfo.dwBindVerb == 23, "dwBindVerb = %u\n", bindinfo.dwBindVerb); + ok(bindinfo.grfBindInfoF == 22, "grfBindInfoF = %lu\n", rem_bindinfo.grfBindInfoF); + ok(bindinfo.dwBindVerb == 23, "dwBindVerb = %lu\n", bindinfo.dwBindVerb); ok(!lstrcmpW(bindinfo.szCustomVerb, L"custom verb out"), "szCustomVerb = %s\n", wine_dbgstr_w(bindinfo.szCustomVerb)); - ok(bindinfo.cbstgmedData == 29, "cbstgmedData = %u\n", bindinfo.cbstgmedData); - ok(bindinfo.dwOptions == 24, "dwOptions = %u\n", bindinfo.dwOptions); - ok(bindinfo.dwOptionsFlags == 25, "dwOptionsFlags = %u\n", bindinfo.dwOptionsFlags); - ok(bindinfo.dwCodePage, "dwCodePage = %u\n", bindinfo.dwCodePage); + ok(bindinfo.cbstgmedData == 29, "cbstgmedData = %lu\n", bindinfo.cbstgmedData); + ok(bindinfo.dwOptions == 24, "dwOptions = %lu\n", bindinfo.dwOptions); + ok(bindinfo.dwOptionsFlags == 25, "dwOptionsFlags = %lu\n", bindinfo.dwOptionsFlags); + ok(bindinfo.dwCodePage, "dwCodePage = %lu\n", bindinfo.dwCodePage); ok(!bindinfo.iid.Data1, "iid = %s\n", debugstr_guid(&bindinfo.iid)); ok(!bindinfo.pUnk, "pUnk = %p\n", bindinfo.pUnk); - ok(bindinfo.dwReserved == 18, "dwReserved = %u\n", bindinfo.dwReserved); - ok(bindinfo.securityAttributes.nLength == 30, "securityAttributes.nLength = %u\n", + ok(bindinfo.dwReserved == 18, "dwReserved = %lu\n", bindinfo.dwReserved); + ok(bindinfo.securityAttributes.nLength == 30, "securityAttributes.nLength = %lu\n", bindinfo.securityAttributes.nLength); ok(bindinfo.securityAttributes.lpSecurityDescriptor == (void*)0xdead0001, "securityAttributes.lpSecurityDescriptor = %p\n", @@ -2533,14 +2533,14 @@ static void test_bsc_marshaling(void) bindinfo.securityAttributes.bInheritHandle); ok(bindinfo.stgmedData.pUnkForRelease == &unk_in.IUnknown_iface, "pUnkForRelease = %p\n", bindinfo.stgmedData.pUnkForRelease); - ok(unk_out.ref == 1, "unk_out.ref = %u\n", unk_out.ref); + ok(unk_out.ref == 1, "unk_out.ref = %lu\n", unk_out.ref);
bindinfo.stgmedData.pUnkForRelease = NULL; ReleaseBindInfo(&bindinfo);
zero.QuadPart = 0; hres = IStream_Seek(binding_stream, zero, STREAM_SEEK_SET, NULL); - ok(hres == S_OK, "Seek failed: 0x%08x\n", hres); + ok(hres == S_OK, "Seek failed: 0x%08lx\n", hres);
/* Return IStream stgmed from GetBindInfoEx, it's not marshaled back */ rem_bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA; @@ -2558,23 +2558,23 @@ static void test_bsc_marshaling(void) IStream_AddRef(binding_stream);
hres = IBindStatusCallbackEx_GetBindInfoEx(callbackex, &bindf, &bindinfo, &bindf2, &reserved); - ok(hres == S_OK, "GetBindInfoEx failed: %08x\n", hres); - ok(bindf == rem_bindf, "bindf = %x, expected %x\n", bindf, rem_bindf); + ok(hres == S_OK, "GetBindInfoEx failed: %08lx\n", hres); + ok(bindf == rem_bindf, "bindf = %lx, expected %lx\n", bindf, rem_bindf);
- ok(in_bindinfo.cbSize == sizeof(in_bindinfo), "cbSize = %u\n", in_bindinfo.cbSize); + ok(in_bindinfo.cbSize == sizeof(in_bindinfo), "cbSize = %lu\n", in_bindinfo.cbSize); ok(!in_bindinfo.pUnk, "pUnk = %p\n", in_bindinfo.pUnk); - ok(in_bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %u\n", + ok(in_bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %lu\n", in_bindinfo.stgmedData.tymed);
- ok(bindinfo.cbSize == sizeof(bindinfo), "cbSize = %u\n", bindinfo.cbSize); + ok(bindinfo.cbSize == sizeof(bindinfo), "cbSize = %lu\n", bindinfo.cbSize); ok(!bindinfo.pUnk, "pUnk = %p\n", bindinfo.pUnk); - ok(bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %u\n", + ok(bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %lu\n", bindinfo.stgmedData.tymed); ok(!bindinfo.stgmedData.u.pstm, "stm = %p\n", bindinfo.stgmedData.u.pstm); ok(!bindinfo.stgmedData.pUnkForRelease, "pUnkForRelease = %p\n", bindinfo.stgmedData.pUnkForRelease); - ok(bindinfo.cbstgmedData == 3, "cbstgmedData = %u\n", bindinfo.cbstgmedData); + ok(bindinfo.cbstgmedData == 3, "cbstgmedData = %lu\n", bindinfo.cbstgmedData);
ReleaseBindInfo(&bindinfo);
@@ -2596,23 +2596,23 @@ static void test_bsc_marshaling(void) IStream_AddRef(binding_stream);
hres = IBindStatusCallbackEx_GetBindInfoEx(callbackex, &bindf, &bindinfo, &bindf2, &reserved); - ok(hres == S_OK, "GetBindInfoEx failed: %08x\n", hres); - ok(bindf == rem_bindf, "bindf = %x, expected %x\n", bindf, rem_bindf); + ok(hres == S_OK, "GetBindInfoEx failed: %08lx\n", hres); + ok(bindf == rem_bindf, "bindf = %lx, expected %lx\n", bindf, rem_bindf);
- ok(in_bindinfo.cbSize == sizeof(in_bindinfo), "cbSize = %u\n", in_bindinfo.cbSize); + ok(in_bindinfo.cbSize == sizeof(in_bindinfo), "cbSize = %lu\n", in_bindinfo.cbSize); ok(!in_bindinfo.pUnk, "pUnk = %p\n", in_bindinfo.pUnk); - ok(in_bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %u\n", + ok(in_bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %lu\n", in_bindinfo.stgmedData.tymed);
- ok(bindinfo.cbSize == sizeof(bindinfo), "cbSize = %u\n", bindinfo.cbSize); + ok(bindinfo.cbSize == sizeof(bindinfo), "cbSize = %lu\n", bindinfo.cbSize); ok(!bindinfo.pUnk, "pUnk = %p\n", bindinfo.pUnk); - ok(bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %u\n", + ok(bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %lu\n", bindinfo.stgmedData.tymed); ok(!bindinfo.stgmedData.u.pstm, "stm = %p\n", bindinfo.stgmedData.u.pstm); ok(!bindinfo.stgmedData.pUnkForRelease, "pUnkForRelease = %p\n", bindinfo.stgmedData.pUnkForRelease); - ok(bindinfo.cbstgmedData == 3, "cbstgmedData = %u\n", bindinfo.cbstgmedData); + ok(bindinfo.cbstgmedData == 3, "cbstgmedData = %lu\n", bindinfo.cbstgmedData);
ReleaseBindInfo(&bindinfo);
@@ -2634,23 +2634,23 @@ static void test_bsc_marshaling(void) rem_bindinfo.cbstgmedData = 5;
hres = IBindStatusCallbackEx_GetBindInfoEx(callbackex, &bindf, &bindinfo, &bindf2, &reserved); - ok(hres == S_OK, "GetBindInfoEx failed: %08x\n", hres); - ok(bindf == rem_bindf, "bindf = %x, expected %x\n", bindf, rem_bindf); + ok(hres == S_OK, "GetBindInfoEx failed: %08lx\n", hres); + ok(bindf == rem_bindf, "bindf = %lx, expected %lx\n", bindf, rem_bindf);
- ok(in_bindinfo.cbSize == sizeof(in_bindinfo), "cbSize = %u\n", in_bindinfo.cbSize); + ok(in_bindinfo.cbSize == sizeof(in_bindinfo), "cbSize = %lu\n", in_bindinfo.cbSize); ok(!in_bindinfo.pUnk, "pUnk = %p\n", in_bindinfo.pUnk); - ok(in_bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %u\n", + ok(in_bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %lu\n", in_bindinfo.stgmedData.tymed);
- ok(bindinfo.cbSize == sizeof(bindinfo), "cbSize = %u\n", bindinfo.cbSize); + ok(bindinfo.cbSize == sizeof(bindinfo), "cbSize = %lu\n", bindinfo.cbSize); ok(!bindinfo.pUnk, "pUnk = %p\n", bindinfo.pUnk); - ok(bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %u\n", + ok(bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %lu\n", bindinfo.stgmedData.tymed); ok(!bindinfo.stgmedData.u.pstm, "stm = %p\n", bindinfo.stgmedData.u.pstm); ok(!bindinfo.stgmedData.pUnkForRelease, "pUnkForRelease = %p\n", bindinfo.stgmedData.pUnkForRelease); - ok(bindinfo.cbstgmedData == 5, "cbstgmedData = %u\n", bindinfo.cbstgmedData); + ok(bindinfo.cbstgmedData == 5, "cbstgmedData = %lu\n", bindinfo.cbstgmedData);
ReleaseBindInfo(&bindinfo);
@@ -2666,9 +2666,9 @@ static void test_bsc_marshaling(void) stgmed.pUnkForRelease = NULL;
hres = IBindStatusCallback_OnDataAvailable(bsc, 1, 10, &formatetc, &stgmed); - ok(hres == S_OK, "OnDataAvailable failed: %08x\n", hres); + ok(hres == S_OK, "OnDataAvailable failed: %08lx\n", hres);
- ok(in_stgmed.tymed == TYMED_ISTREAM, "tymed = %u\n", in_stgmed.tymed); + ok(in_stgmed.tymed == TYMED_ISTREAM, "tymed = %lu\n", in_stgmed.tymed); ok(in_stgmed.u.pstm != NULL, "pstm = NULL\n"); ok(!in_stgmed.pUnkForRelease, "pUnkForRelease = %p\n", in_stgmed.pUnkForRelease);
@@ -2680,12 +2680,12 @@ static void test_bsc_marshaling(void) unk_in.ref = 1;
hres = IBindStatusCallback_OnDataAvailable(bsc, 1, 10, &formatetc, &stgmed); - ok(hres == S_OK, "OnDataAvailable failed: %08x\n", hres); + ok(hres == S_OK, "OnDataAvailable failed: %08lx\n", hres);
- ok(in_stgmed.tymed == TYMED_ISTREAM, "tymed = %u\n", in_stgmed.tymed); + ok(in_stgmed.tymed == TYMED_ISTREAM, "tymed = %lu\n", in_stgmed.tymed); ok(in_stgmed.u.pstm != NULL, "pstm = NULL\n"); ok(in_stgmed.pUnkForRelease != NULL, "pUnkForRelease = %p\n", in_stgmed.pUnkForRelease); - ok(unk_in.ref > 1, "ref = %u\n", unk_in.ref); + ok(unk_in.ref > 1, "ref = %lu\n", unk_in.ref);
/* OnDataAvailable with TYMED_ISTREAM, but NULL stream */ memset(&in_stgmed, 0xcc, sizeof(in_stgmed)); @@ -2694,9 +2694,9 @@ static void test_bsc_marshaling(void) stgmed.pUnkForRelease = NULL;
hres = IBindStatusCallback_OnDataAvailable(bsc, 1, 10, &formatetc, &stgmed); - ok(hres == S_OK, "OnDataAvailable failed: %08x\n", hres); + ok(hres == S_OK, "OnDataAvailable failed: %08lx\n", hres);
- ok(in_stgmed.tymed == TYMED_ISTREAM, "tymed = %u\n", in_stgmed.tymed); + ok(in_stgmed.tymed == TYMED_ISTREAM, "tymed = %lu\n", in_stgmed.tymed); ok(in_stgmed.u.pstm != NULL, "pstm = NULL\n"); ok(!in_stgmed.pUnkForRelease, "pUnkForRelease = %p\n", in_stgmed.pUnkForRelease);
@@ -2708,12 +2708,12 @@ static void test_bsc_marshaling(void) unk_in.ref = 1;
hres = IBindStatusCallback_OnDataAvailable(bsc, 1, 10, &formatetc, &stgmed); - ok(hres == S_OK, "OnDataAvailable failed: %08x\n", hres); + ok(hres == S_OK, "OnDataAvailable failed: %08lx\n", hres);
- ok(in_stgmed.tymed == TYMED_NULL, "tymed = %u\n", in_stgmed.tymed); + ok(in_stgmed.tymed == TYMED_NULL, "tymed = %lu\n", in_stgmed.tymed); ok(!in_stgmed.u.pstm, "pstm != NULL\n"); ok(in_stgmed.pUnkForRelease != NULL, "pUnkForRelease = %p\n", in_stgmed.pUnkForRelease); - ok(unk_in.ref == 1, "ref = %u\n", unk_in.ref); + ok(unk_in.ref == 1, "ref = %lu\n", unk_in.ref);
IStream_Release(binding_stream); IBindStatusCallback_Release(bsc); diff --git a/dlls/urlmon/tests/protocol.c b/dlls/urlmon/tests/protocol.c index b997be7fa01..dcb5c852a92 100644 --- a/dlls/urlmon/tests/protocol.c +++ b/dlls/urlmon/tests/protocol.c @@ -261,9 +261,9 @@ static HRESULT WINAPI HttpSecurity_GetWindow(IHttpSecurity* iface, REFGUID rgui
static HRESULT WINAPI HttpSecurity_OnSecurityProblem(IHttpSecurity *iface, DWORD dwProblem) { - win_skip("Security problem: %u\n", dwProblem); + win_skip("Security problem: %lu\n", dwProblem); ok(dwProblem == ERROR_INTERNET_SEC_CERT_REV_FAILED || dwProblem == ERROR_INTERNET_INVALID_CA, - "Expected got %u security problem\n", dwProblem); + "Expected got %lu security problem\n", dwProblem);
/* Only retry once */ if (security_problem) @@ -326,7 +326,7 @@ static HRESULT WINAPI HttpNegotiate_BeginningTransaction(IHttpNegotiate2 *iface, ok(!lstrcmpW(szURL, binding_urls[tested_protocol]), "szURL != http_url\n"); else ok(!lstrcmpW(szURL, http_url), "szURL != http_url\n"); - ok(!dwReserved, "dwReserved=%d, expected 0\n", dwReserved); + ok(!dwReserved, "dwReserved=%ld, expected 0\n", dwReserved); ok(pszAdditionalHeaders != NULL, "pszAdditionalHeaders == NULL\n"); if(pszAdditionalHeaders) { @@ -347,7 +347,7 @@ static HRESULT WINAPI HttpNegotiate_OnResponse(IHttpNegotiate2 *iface, DWORD dwR { CHECK_EXPECT(OnResponse);
- ok(dwResponseCode == 200, "dwResponseCode=%d, expected 200\n", dwResponseCode); + ok(dwResponseCode == 200, "dwResponseCode=%ld, expected 200\n", dwResponseCode); ok(szResponseHeaders != NULL, "szResponseHeaders == NULL\n"); ok(szRequestHeaders == NULL, "szRequestHeaders != NULL\n"); ok(pszAdditionalRequestHeaders == NULL, "pszAdditionalHeaders != NULL\n"); @@ -362,12 +362,12 @@ static HRESULT WINAPI HttpNegotiate_GetRootSecurityId(IHttpNegotiate2 *iface,
CHECK_EXPECT(GetRootSecurityId);
- ok(!dwReserved, "dwReserved=%ld, expected 0\n", dwReserved); + ok(!dwReserved, "dwReserved=%Id, expected 0\n", dwReserved); ok(pbSecurityId != NULL, "pbSecurityId == NULL\n"); ok(pcbSecurityId != NULL, "pcbSecurityId == NULL\n");
if(pcbSecurityId) { - ok(*pcbSecurityId == 512, "*pcbSecurityId=%d, expected 512\n", *pcbSecurityId); + ok(*pcbSecurityId == 512, "*pcbSecurityId=%ld, expected 512\n", *pcbSecurityId); *pcbSecurityId = sizeof(sec_id); }
@@ -516,10 +516,10 @@ static HRESULT WINAPI Stream_Read(IStream *iface, void *pv, { CHECK_EXPECT2(Stream_Read);
- ok(GetCurrentThreadId() != thread_id, "wrong thread %d\n", GetCurrentThreadId()); + ok(GetCurrentThreadId() != thread_id, "wrong thread %ld\n", GetCurrentThreadId());
ok(pv != NULL, "pv == NULL\n"); - ok(cb == 0x20000 || broken(cb == 0x2000), "cb = %d\n", cb); + ok(cb == 0x20000 || broken(cb == 0x2000), "cb = %ld\n", cb); ok(pcbRead != NULL, "pcbRead == NULL\n");
if(post_stream_read) { @@ -545,7 +545,7 @@ static HRESULT WINAPI Stream_Seek(IStream *iface, LARGE_INTEGER dlibMove, CHECK_EXPECT(Stream_Seek);
ok(!dlibMove.QuadPart, "dlibMove != 0\n"); - ok(dwOrigin == STREAM_SEEK_SET, "dwOrigin = %d\n", dwOrigin); + ok(dwOrigin == STREAM_SEEK_SET, "dwOrigin = %ld\n", dwOrigin); ok(!plibNewPosition, "plibNewPosition == NULL\n");
return S_OK; @@ -686,7 +686,7 @@ static void call_continue(PROTOCOLDATA *protocol_data) if(state != STATE_SENDINGREQUEST && (!test_redirect || !(bindinfo_options & BINDINFO_OPTIONS_DISABLEAUTOREDIRECTS))) SET_EXPECT(ReportData); hres = IInternetProtocol_Continue(async_protocol, protocol_data); - ok(hres == S_OK, "Continue failed: %08x\n", hres); + ok(hres == S_OK, "Continue failed: %08lx\n", hres); if(tested_protocol == FTP_TEST || security_problem) CLEAR_CALLED(ReportData); else if(state != STATE_SENDINGREQUEST && (!test_redirect || !(bindinfo_options & BINDINFO_OPTIONS_DISABLEAUTOREDIRECTS))) @@ -734,13 +734,13 @@ static HRESULT WINAPI ProtocolSink_Switch(IInternetProtocolSink *iface, PROTOCOL ok(pProtocolData != NULL, "pProtocolData == NULL\n"); if(binding_test) { ok(pProtocolData != &protocoldata, "pProtocolData == &protocoldata\n"); - ok(pProtocolData->grfFlags == protocoldata.grfFlags, "grfFlags wrong %x/%x\n", + ok(pProtocolData->grfFlags == protocoldata.grfFlags, "grfFlags wrong %lx/%lx\n", pProtocolData->grfFlags, protocoldata.grfFlags ); - ok(pProtocolData->dwState == protocoldata.dwState, "dwState wrong %x/%x\n", + ok(pProtocolData->dwState == protocoldata.dwState, "dwState wrong %lx/%lx\n", pProtocolData->dwState, protocoldata.dwState ); ok(pProtocolData->pData == protocoldata.pData, "pData wrong %p/%p\n", pProtocolData->pData, protocoldata.pData ); - ok(pProtocolData->cbData == protocoldata.cbData, "cbData wrong %x/%x\n", + ok(pProtocolData->cbData == protocoldata.cbData, "cbData wrong %lx/%lx\n", pProtocolData->cbData, protocoldata.cbData ); }
@@ -831,7 +831,7 @@ static HRESULT WINAPI ProtocolSink_ReportProgress(IInternetProtocolSink *iface, if (ulStatusCode < ARRAY_SIZE(status_names)) trace( "progress: %s %s\n", status_names[ulStatusCode], wine_dbgstr_w(szStatusText) ); else - trace( "progress: %u %s\n", ulStatusCode, wine_dbgstr_w(szStatusText) ); + trace( "progress: %lu %s\n", ulStatusCode, wine_dbgstr_w(szStatusText) ); }
switch(ulStatusCode) { @@ -955,7 +955,7 @@ static HRESULT WINAPI ProtocolSink_ReportProgress(IInternetProtocolSink *iface, if(winetest_debug > 1) trace("BINDSTATUS_RESERVED_8\n"); break; default: - ok(0, "Unexpected status %d (%d)\n", ulStatusCode, ulStatusCode-BINDSTATUS_LAST); + ok(0, "Unexpected status %ld (%ld)\n", ulStatusCode, ulStatusCode-BINDSTATUS_LAST); };
return S_OK; @@ -971,24 +971,24 @@ static void test_http_info(IInternetProtocol *protocol) static const WCHAR connectionW[] = {'c','o','n','n','e','c','t','i','o','n',0};
hres = IInternetProtocol_QueryInterface(protocol, &IID_IWinInetHttpInfo, (void**)&info); - ok(hres == S_OK, "Could not get IWinInterHttpInfo iface: %08x\n", hres); + ok(hres == S_OK, "Could not get IWinInterHttpInfo iface: %08lx\n", hres);
size = sizeof(buf); strcpy(buf, "connection"); hres = IWinInetHttpInfo_QueryInfo(info, HTTP_QUERY_CUSTOM, buf, &size, NULL, NULL); if(tested_protocol != FTP_TEST) { - ok(hres == S_OK, "QueryInfo failed: %08x\n", hres); + ok(hres == S_OK, "QueryInfo failed: %08lx\n", hres);
ok(!strcmp(buf, "Keep-Alive"), "buf = %s\n", buf); len = strlen(buf); - ok(size == len, "size = %u, expected %u\n", size, len); + ok(size == len, "size = %lu, expected %lu\n", size, len);
size = sizeof(buf); memcpy(buf, connectionW, sizeof(connectionW)); hres = IWinInetHttpInfo_QueryInfo(info, HTTP_QUERY_CUSTOM, buf, &size, NULL, NULL); - ok(hres == S_FALSE, "QueryInfo returned %08x\n", hres); + ok(hres == S_FALSE, "QueryInfo returned %08lx\n", hres); }else { - ok(hres == S_FALSE, "QueryInfo failed: %08x\n", hres); + ok(hres == S_FALSE, "QueryInfo failed: %08lx\n", hres); }
IWinInetHttpInfo_Release(info); @@ -1005,23 +1005,23 @@ static HRESULT WINAPI ProtocolSink_ReportData(IInternetProtocolSink *iface, DWOR if(!mimefilter_test && (tested_protocol == FILE_TEST || tested_protocol == ITS_TEST)) { CHECK_EXPECT2(ReportData);
- ok(ulProgress == ulProgressMax, "ulProgress (%d) != ulProgressMax (%d)\n", + ok(ulProgress == ulProgressMax, "ulProgress (%ld) != ulProgressMax (%ld)\n", ulProgress, ulProgressMax); if(!file_with_hash) - ok(ulProgressMax == 13, "ulProgressMax=%d, expected 13\n", ulProgressMax); + ok(ulProgressMax == 13, "ulProgressMax=%ld, expected 13\n", ulProgressMax); /* BSCF_SKIPDRAINDATAFORFILEURLS added in IE8 */ if(tested_protocol == FILE_TEST) ok((grfBSCF == (BSCF_FIRSTDATANOTIFICATION | BSCF_LASTDATANOTIFICATION)) || (grfBSCF == (BSCF_FIRSTDATANOTIFICATION | BSCF_LASTDATANOTIFICATION | BSCF_SKIPDRAINDATAFORFILEURLS)), - "grcfBSCF = %08x\n", grfBSCF); + "grcfBSCF = %08lx\n", grfBSCF); else - ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION | BSCF_DATAFULLYAVAILABLE), "grcfBSCF = %08x\n", grfBSCF); + ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION | BSCF_DATAFULLYAVAILABLE), "grcfBSCF = %08lx\n", grfBSCF); }else if(bind_from_cache) { CHECK_EXPECT(ReportData);
- ok(grfBSCF == (BSCF_LASTDATANOTIFICATION|BSCF_DATAFULLYAVAILABLE), "grcfBSCF = %08x\n", grfBSCF); - ok(ulProgress == 1000, "ulProgress = %u\n", ulProgress); - ok(!ulProgressMax, "ulProgressMax = %u\n", ulProgressMax); + ok(grfBSCF == (BSCF_LASTDATANOTIFICATION|BSCF_DATAFULLYAVAILABLE), "grcfBSCF = %08lx\n", grfBSCF); + ok(ulProgress == 1000, "ulProgress = %lu\n", ulProgress); + ok(!ulProgressMax, "ulProgressMax = %lu\n", ulProgressMax); }else if(direct_read) { BYTE buf[14096]; ULONG read; @@ -1034,17 +1034,17 @@ static HRESULT WINAPI ProtocolSink_ReportData(IInternetProtocolSink *iface, DWOR if(short_read) { ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION|BSCF_LASTDATANOTIFICATION|BSCF_DATAFULLYAVAILABLE) || grfBSCF == BSCF_FIRSTDATANOTIFICATION, /* < IE8 */ - "grcfBSCF = %08x\n", grfBSCF); + "grcfBSCF = %08lx\n", grfBSCF); CHECK_CALLED(Read); /* Set in Continue */ first_data_notif = FALSE; }else if(first_data_notif) { - ok(grfBSCF == BSCF_FIRSTDATANOTIFICATION, "grcfBSCF = %08x\n", grfBSCF); + ok(grfBSCF == BSCF_FIRSTDATANOTIFICATION, "grcfBSCF = %08lx\n", grfBSCF); first_data_notif = FALSE; }else if(reported_all_data) { ok(grfBSCF == (BSCF_LASTDATANOTIFICATION|BSCF_INTERMEDIATEDATANOTIFICATION), - "grcfBSCF = %08x\n", grfBSCF); + "grcfBSCF = %08lx\n", grfBSCF); }else if(!direct_read) { - ok(grfBSCF == BSCF_INTERMEDIATEDATANOTIFICATION, "grcfBSCF = %08x\n", grfBSCF); + ok(grfBSCF == BSCF_INTERMEDIATEDATANOTIFICATION, "grcfBSCF = %08lx\n", grfBSCF); }
do { @@ -1057,11 +1057,11 @@ static HRESULT WINAPI ProtocolSink_ReportData(IInternetProtocolSink *iface, DWOR if(!emulate_prot) SET_EXPECT(Switch); hres = IInternetProtocol_Read(binding_test ? binding_protocol : async_protocol, expect_pv = buf, sizeof(buf), &read); - ok(hres == E_PENDING || hres == S_FALSE || hres == S_OK, "Read failed: %08x\n", hres); + ok(hres == E_PENDING || hres == S_FALSE || hres == S_OK, "Read failed: %08lx\n", hres); if(hres == S_OK) ok(read, "read == 0\n"); if(reported_all_data) - ok(hres == S_FALSE, "Read failed: %08x, expected S_FALSE\n", hres); + ok(hres == S_FALSE, "Read failed: %08lx, expected S_FALSE\n", hres); if(!emulate_prot && hres != E_PENDING) CHECK_NOT_CALLED(Switch); /* otherwise checked in wait_for_switch loop */ if(emulate_prot) @@ -1082,7 +1082,7 @@ static HRESULT WINAPI ProtocolSink_ReportData(IInternetProtocolSink *iface, DWOR }else { CHECK_EXPECT(ReportData2);
- ok(grfBSCF & BSCF_LASTDATANOTIFICATION, "grfBSCF = %08x\n", grfBSCF); + ok(grfBSCF & BSCF_LASTDATANOTIFICATION, "grfBSCF = %08lx\n", grfBSCF);
read = 0xdeadbeef; if(emulate_prot) @@ -1090,8 +1090,8 @@ static HRESULT WINAPI ProtocolSink_ReportData(IInternetProtocolSink *iface, DWOR hres = IInternetProtocol_Read(binding_test ? binding_protocol : async_protocol, expect_pv = buf, sizeof(buf), &read); if(emulate_prot) CHECK_CALLED(Read2); - ok(hres == S_FALSE, "Read returned: %08x, expected E_FALSE\n", hres); - ok(!read, "read = %d\n", read); + ok(hres == S_FALSE, "Read returned: %08lx, expected E_FALSE\n", hres); + ok(!read, "read = %ld\n", read); } }else if(!binding_test && (tested_protocol == HTTP_TEST || tested_protocol == HTTPS_TEST || tested_protocol == FTP_TEST)) { @@ -1100,29 +1100,29 @@ static HRESULT WINAPI ProtocolSink_ReportData(IInternetProtocolSink *iface, DWOR else if(!(grfBSCF & BSCF_LASTDATANOTIFICATION) || (grfBSCF & BSCF_DATAFULLYAVAILABLE)) CHECK_EXPECT(ReportData); else if (http_post_test) - ok(ulProgress == 13, "Read %u bytes instead of 13\n", ulProgress); + ok(ulProgress == 13, "Read %lu bytes instead of 13\n", ulProgress);
if(empty_file) { - ok(!ulProgress, "ulProgress = %d\n", ulProgress); - ok(!ulProgressMax, "ulProgressMax = %d\n", ulProgressMax); + ok(!ulProgress, "ulProgress = %ld\n", ulProgress); + ok(!ulProgressMax, "ulProgressMax = %ld\n", ulProgressMax); }else { ok(ulProgress, "ulProgress == 0\n"); }
if(empty_file) { ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION|BSCF_LASTDATANOTIFICATION), - "grcfBSCF = %08x\n", grfBSCF); + "grcfBSCF = %08lx\n", grfBSCF); first_data_notif = FALSE; }else if(first_data_notif) { ok(grfBSCF == BSCF_FIRSTDATANOTIFICATION || grfBSCF == (BSCF_LASTDATANOTIFICATION|BSCF_DATAFULLYAVAILABLE), - "grcfBSCF = %08x\n", grfBSCF); + "grcfBSCF = %08lx\n", grfBSCF); first_data_notif = FALSE; } else { ok(grfBSCF == BSCF_INTERMEDIATEDATANOTIFICATION || grfBSCF == (BSCF_LASTDATANOTIFICATION|BSCF_INTERMEDIATEDATANOTIFICATION) || broken(grfBSCF == (BSCF_FIRSTDATANOTIFICATION|BSCF_LASTDATANOTIFICATION)), - "grcfBSCF = %08x\n", grfBSCF); + "grcfBSCF = %08lx\n", grfBSCF); }
if((grfBSCF & BSCF_FIRSTDATANOTIFICATION) && !binding_test) @@ -1171,7 +1171,7 @@ static HRESULT WINAPI ProtocolSink_ReportData(IInternetProtocolSink *iface, DWOR if(result_from_lock) { SET_EXPECT(LockRequest); hres = IInternetProtocol_LockRequest(binding_protocol, 0); - ok(hres == S_OK, "LockRequest failed: %08x\n", hres); + ok(hres == S_OK, "LockRequest failed: %08lx\n", hres); CHECK_CALLED(LockRequest);
/* ReportResult is called before ReportData returns */ @@ -1191,12 +1191,12 @@ static HRESULT WINAPI ProtocolSink_ReportResult(IInternetProtocolSink *iface, HR return S_OK;
if(tested_protocol == FTP_TEST) - ok(hrResult == E_PENDING || hrResult == S_OK, "hrResult = %08x, expected E_PENDING or S_OK\n", hrResult); + ok(hrResult == E_PENDING || hrResult == S_OK, "hrResult = %08lx, expected E_PENDING or S_OK\n", hrResult); else - ok(hrResult == expect_hrResult, "hrResult = %08x, expected: %08x\n", + ok(hrResult == expect_hrResult, "hrResult = %08lx, expected: %08lx\n", hrResult, expect_hrResult); if(SUCCEEDED(hrResult) || tested_protocol == FTP_TEST || test_abort || hrResult == INET_E_REDIRECT_FAILED) - ok(dwError == ERROR_SUCCESS, "dwError = %d, expected ERROR_SUCCESS\n", dwError); + ok(dwError == ERROR_SUCCESS, "dwError = %ld, expected ERROR_SUCCESS\n", dwError); else ok(dwError != ERROR_SUCCESS || broken(tested_protocol == MK_TEST), /* WinME and NT4 */ @@ -1255,7 +1255,7 @@ static HRESULT WINAPI MimeProtocolSink_Switch(IInternetProtocolSink *iface, PROT
SET_EXPECT(Switch); hres = IInternetProtocolSink_Switch(filtered_sink, pProtocolData); - ok(hres == S_OK, "Switch failed: %08x\n", hres); + ok(hres == S_OK, "Switch failed: %08lx\n", hres); CHECK_CALLED(Switch);
return S_OK; @@ -1275,7 +1275,7 @@ static HRESULT WINAPI MimeProtocolSink_ReportProgress(IInternetProtocolSink *ifa ok(!szStatusText, "szStatusText = %s\n", wine_dbgstr_w(szStatusText)); break; default: - ok(0, "Unexpected status code %d\n", ulStatusCode); + ok(0, "Unexpected status code %ld\n", ulStatusCode); }
return S_OK; @@ -1295,19 +1295,19 @@ static HRESULT WINAPI MimeProtocolSink_ReportData(IInternetProtocolSink *iface, SET_EXPECT(Read); hres = IInternetProtocol_Read(filtered_protocol, buf, sizeof(buf), &read); if(tested_protocol == HTTP_TEST) - ok(hres == S_OK || hres == E_PENDING || hres == S_FALSE, "Read failed: %08x\n", hres); + ok(hres == S_OK || hres == E_PENDING || hres == S_FALSE, "Read failed: %08lx\n", hres); else - ok(hres == S_OK, "Read failed: %08x\n", hres); + ok(hres == S_OK, "Read failed: %08lx\n", hres); CHECK_CALLED(Read);
SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE); hres = IInternetProtocolSink_ReportProgress(filtered_sink, BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE, text_htmlW); - ok(hres == S_OK, "ReportProgress failed: %08x\n", hres); + ok(hres == S_OK, "ReportProgress failed: %08lx\n", hres); CHECK_CALLED(ReportProgress_MIMETYPEAVAILABLE);
SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE); hres = IInternetProtocolSink_ReportProgress(filtered_sink, BINDSTATUS_MIMETYPEAVAILABLE, text_htmlW); - ok(hres == S_OK, "ReportProgress failed: %08x\n", hres); + ok(hres == S_OK, "ReportProgress failed: %08lx\n", hres); CHECK_CALLED(ReportProgress_MIMETYPEAVAILABLE);
/* FIXME: test BINDSTATUS_CACHEFILENAMEAVAILABLE */ @@ -1324,7 +1324,7 @@ static HRESULT WINAPI MimeProtocolSink_ReportData(IInternetProtocolSink *iface, SET_EXPECT(ReportData); } hres = IInternetProtocolSink_ReportData(filtered_sink, grfBSCF, ulProgress, ulProgressMax); - ok(hres == S_OK, "ReportData failed: %08x\n", hres); + ok(hres == S_OK, "ReportData failed: %08lx\n", hres); if(no_mime && prot_read<=200) { CHECK_CALLED(Read); }else if(report_mime) { @@ -1347,13 +1347,13 @@ static HRESULT WINAPI MimeProtocolSink_ReportResult(IInternetProtocolSink *iface
CHECK_EXPECT(MimeFilter_ReportResult);
- ok(hrResult == S_OK, "hrResult = %08x\n", hrResult); - ok(dwError == ERROR_SUCCESS, "dwError = %u\n", dwError); + ok(hrResult == S_OK, "hrResult = %08lx\n", hrResult); + ok(dwError == ERROR_SUCCESS, "dwError = %lu\n", dwError); ok(!szResult, "szResult = %s\n", wine_dbgstr_w(szResult));
SET_EXPECT(ReportResult); hres = IInternetProtocolSink_ReportResult(filtered_sink, hrResult, dwError, szResult); - ok(SUCCEEDED(hres), "ReportResult failed: %08x\n", hres); + ok(SUCCEEDED(hres), "ReportResult failed: %08lx\n", hres); CHECK_CALLED(ReportResult);
return S_OK; @@ -1426,7 +1426,7 @@ static HRESULT WINAPI BindInfo_GetBindInfo(IInternetBindInfo *iface, DWORD *grfB
ok(grfBINDF != NULL, "grfBINDF == NULL\n"); ok(pbindinfo != NULL, "pbindinfo == NULL\n"); - ok(pbindinfo->cbSize == sizeof(BINDINFO), "wrong size of pbindinfo: %d\n", pbindinfo->cbSize); + ok(pbindinfo->cbSize == sizeof(BINDINFO), "wrong size of pbindinfo: %ld\n", pbindinfo->cbSize);
*grfBINDF = bindf; if(binding_test) @@ -1466,9 +1466,9 @@ static HRESULT WINAPI BindInfo_GetBindString(IInternetBindInfo *iface, ULONG ulS switch(ulStringType) { case BINDSTRING_ACCEPT_MIMES: CHECK_EXPECT(GetBindString_ACCEPT_MIMES); - ok(cEl == 256, "cEl=%d, expected 256\n", cEl); + ok(cEl == 256, "cEl=%ld, expected 256\n", cEl); if(pcElFetched) { - ok(*pcElFetched == 256, "*pcElFetched=%d, expected 256\n", *pcElFetched); + ok(*pcElFetched == 256, "*pcElFetched=%ld, expected 256\n", *pcElFetched); *pcElFetched = 1; } if(ppwzStr) { @@ -1478,9 +1478,9 @@ static HRESULT WINAPI BindInfo_GetBindString(IInternetBindInfo *iface, ULONG ulS return S_OK; case BINDSTRING_USER_AGENT: CHECK_EXPECT(GetBindString_USER_AGENT); - ok(cEl == 1, "cEl=%d, expected 1\n", cEl); + ok(cEl == 1, "cEl=%ld, expected 1\n", cEl); if(pcElFetched) { - ok(*pcElFetched == 0, "*pcElFetch=%d, expected 0\n", *pcElFetched); + ok(*pcElFetched == 0, "*pcElFetch=%ld, expected 0\n", *pcElFetched); *pcElFetched = 1; } if(ppwzStr) { @@ -1490,16 +1490,16 @@ static HRESULT WINAPI BindInfo_GetBindString(IInternetBindInfo *iface, ULONG ulS return S_OK; case BINDSTRING_POST_COOKIE: CHECK_EXPECT(GetBindString_POST_COOKIE); - ok(cEl == 1, "cEl=%d, expected 1\n", cEl); + ok(cEl == 1, "cEl=%ld, expected 1\n", cEl); if(pcElFetched) - ok(*pcElFetched == 0, "*pcElFetch=%d, expected 0\n", *pcElFetched); + ok(*pcElFetched == 0, "*pcElFetch=%ld, expected 0\n", *pcElFetched); return S_OK; case BINDSTRING_URL: { DWORD size;
CHECK_EXPECT(GetBindString_URL); - ok(cEl == 1, "cEl=%d, expected 1\n", cEl); - ok(*pcElFetched == 0, "*pcElFetch=%d, expected 0\n", *pcElFetched); + ok(cEl == 1, "cEl=%ld, expected 1\n", cEl); + ok(*pcElFetched == 0, "*pcElFetch=%ld, expected 0\n", *pcElFetched); *pcElFetched = 1;
size = (lstrlenW(binding_urls[tested_protocol])+1)*sizeof(WCHAR); @@ -1509,17 +1509,17 @@ static HRESULT WINAPI BindInfo_GetBindString(IInternetBindInfo *iface, ULONG ulS } case BINDSTRING_ROOTDOC_URL: CHECK_EXPECT(GetBindString_ROOTDOC_URL); - ok(cEl == 1, "cEl=%d, expected 1\n", cEl); + ok(cEl == 1, "cEl=%ld, expected 1\n", cEl); return E_NOTIMPL; case BINDSTRING_ENTERPRISE_ID: - ok(cEl == 1, "cEl=%d, expected 1\n", cEl); + ok(cEl == 1, "cEl=%ld, expected 1\n", cEl); return E_NOTIMPL; case BINDSTRING_SAMESITE_COOKIE_LEVEL: CHECK_EXPECT(GetBindString_SAMESITE_COOKIE_LEVEL); - ok(cEl == 1, "cEl=%d, expected 1\n", cEl); + ok(cEl == 1, "cEl=%ld, expected 1\n", cEl); return E_NOTIMPL; default: - ok(0, "unexpected ulStringType %d\n", ulStringType); + ok(0, "unexpected ulStringType %ld\n", ulStringType); }
return E_NOTIMPL; @@ -1572,7 +1572,7 @@ static ULONG WINAPI InternetPriority_Release(IInternetPriority *iface) static HRESULT WINAPI InternetPriority_SetPriority(IInternetPriority *iface, LONG nPriority) { CHECK_EXPECT(SetPriority); - ok(nPriority == ex_priority, "nPriority=%d\n", nPriority); + ok(nPriority == ex_priority, "nPriority=%ld\n", nPriority); return S_OK; }
@@ -1610,7 +1610,7 @@ static HRESULT WINAPI Protocol_Abort(IInternetProtocolEx *iface, HRESULT hrReaso
SET_EXPECT(ReportResult); hres = IInternetProtocolSink_ReportResult(binding_sink, S_OK, ERROR_SUCCESS, NULL); - ok(hres == S_OK, "ReportResult failed: %08x\n", hres); + ok(hres == S_OK, "ReportResult failed: %08lx\n", hres); CHECK_CALLED(ReportResult);
return S_OK; @@ -1701,25 +1701,25 @@ static DWORD WINAPI thread_proc(PVOID arg) hres = IInternetProtocolSink_ReportProgress(binding_sink, BINDSTATUS_FINDINGRESOURCE, hostW); CHECK_CALLED(ReportProgress_FINDINGRESOURCE); - ok(hres == S_OK, "ReportProgress failed: %08x\n", hres); + ok(hres == S_OK, "ReportProgress failed: %08lx\n", hres);
SET_EXPECT(ReportProgress_CONNECTING); hres = IInternetProtocolSink_ReportProgress(binding_sink, BINDSTATUS_CONNECTING, winehq_ipW); CHECK_CALLED(ReportProgress_CONNECTING); - ok(hres == S_OK, "ReportProgress failed: %08x\n", hres); + ok(hres == S_OK, "ReportProgress failed: %08lx\n", hres);
SET_EXPECT(ReportProgress_SENDINGREQUEST); hres = IInternetProtocolSink_ReportProgress(binding_sink, BINDSTATUS_SENDINGREQUEST, NULL); CHECK_CALLED(ReportProgress_SENDINGREQUEST); - ok(hres == S_OK, "ReportProgress failed: %08x\n", hres); + ok(hres == S_OK, "ReportProgress failed: %08lx\n", hres);
prot_state = 1; SET_EXPECT(Switch); hres = IInternetProtocolSink_Switch(binding_sink, &protocoldata); CHECK_CALLED(Switch); - ok(hres == S_OK, "Switch failed: %08x\n", hres); + ok(hres == S_OK, "Switch failed: %08lx\n", hres);
if(!redirect) break; @@ -1733,7 +1733,7 @@ static DWORD WINAPI thread_proc(PVOID arg) else SET_EXPECT(Switch); hres = IInternetProtocolSink_Switch(binding_sink, &protocoldata); - ok(hres == S_OK, "Switch failed: %08x\n", hres); + ok(hres == S_OK, "Switch failed: %08lx\n", hres); if(mimefilter_test) CHECK_CALLED(MimeFilter_Switch); else @@ -1750,7 +1750,7 @@ static DWORD WINAPI thread_proc(PVOID arg) else SET_EXPECT(Switch); hres = IInternetProtocolSink_Switch(binding_sink, &protocoldata); - ok(hres == S_OK, "Switch failed: %08x\n", hres); + ok(hres == S_OK, "Switch failed: %08lx\n", hres); if(mimefilter_test) CHECK_CALLED(MimeFilter_Switch); else @@ -1762,7 +1762,7 @@ static DWORD WINAPI thread_proc(PVOID arg) else SET_EXPECT(Switch); hres = IInternetProtocolSink_Switch(binding_sink, &protocoldata); - ok(hres == S_OK, "Switch failed: %08x\n", hres); + ok(hres == S_OK, "Switch failed: %08lx\n", hres); if(mimefilter_test) CHECK_CALLED(MimeFilter_Switch); else @@ -1784,7 +1784,7 @@ static void protocol_start(IInternetProtocolSink *pOIProtSink, IInternetBindInfo ok(pOIBindInfo != NULL, "pOIBindInfo == NULL\n"); ok(pOIProtSink != &protocol_sink, "unexpected pOIProtSink\n"); ok(pOIBindInfo != &bind_info, "unexpected pOIBindInfo\n"); - ok(!pi, "pi = %x\n", pi); + ok(!pi, "pi = %lx\n", pi);
if(binding_test) ok(pOIProtSink == binding_sink, "pOIProtSink != binding_sink\n"); @@ -1800,16 +1800,16 @@ static void protocol_start(IInternetProtocolSink *pOIProtSink, IInternetBindInfo hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &cbindf, &bindinfo); if(redirect_on_continue && (bindinfo_options & BINDINFO_OPTIONS_DISABLEAUTOREDIRECTS)) CHECK_CALLED(QueryService_IBindCallbackRedirect); - ok(hres == S_OK, "GetBindInfo failed: %08x\n", hres); + ok(hres == S_OK, "GetBindInfo failed: %08lx\n", hres); CHECK_CALLED(GetBindInfo); - ok(cbindf == (bindf|BINDF_FROMURLMON), "bindf = %x, expected %x\n", + ok(cbindf == (bindf|BINDF_FROMURLMON), "bindf = %lx, expected %lx\n", cbindf, (bindf|BINDF_FROMURLMON)); ok(!memcmp(&exp_bindinfo, &bindinfo, sizeof(bindinfo)), "unexpected bindinfo\n"); pReleaseBindInfo(&bindinfo);
SET_EXPECT(ReportProgress_SENDINGREQUEST); hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_SENDINGREQUEST, emptyW); - ok(hres == S_OK, "ReportProgress(BINDSTATUS_SENDINGREQUEST) failed: %08x\n", hres); + ok(hres == S_OK, "ReportProgress(BINDSTATUS_SENDINGREQUEST) failed: %08lx\n", hres); CHECK_CALLED(ReportProgress_SENDINGREQUEST);
if(tested_protocol == HTTP_TEST || tested_protocol == HTTPS_TEST) { @@ -1826,8 +1826,8 @@ static void protocol_start(IInternetProtocolSink *pOIProtSink, IInternetBindInfo hres = IInternetBindInfo_GetBindString(pOIBindInfo, BINDSTRING_USER_AGENT, &ua, 1, &fetched); CHECK_CALLED(GetBindString_USER_AGENT); - ok(hres == S_OK, "GetBindString(BINDSTRING_USER_AGETNT) failed: %08x\n", hres); - ok(fetched == 1, "fetched = %d, expected 254\n", fetched); + ok(hres == S_OK, "GetBindString(BINDSTRING_USER_AGETNT) failed: %08lx\n", hres); + ok(fetched == 1, "fetched = %ld, expected 254\n", fetched); ok(ua != NULL, "ua = %p\n", ua); ok(!lstrcmpW(ua, user_agentW), "unexpected user agent %s\n", wine_dbgstr_w(ua)); CoTaskMemFree(ua); @@ -1839,42 +1839,42 @@ static void protocol_start(IInternetProtocolSink *pOIProtSink, IInternetBindInfo CHECK_CALLED(GetBindString_ACCEPT_MIMES);
ok(hres == S_OK, - "GetBindString(BINDSTRING_ACCEPT_MIMES) failed: %08x\n", hres); - ok(fetched == 1, "fetched = %d, expected 1\n", fetched); + "GetBindString(BINDSTRING_ACCEPT_MIMES) failed: %08lx\n", hres); + ok(fetched == 1, "fetched = %ld, expected 1\n", fetched); ok(!lstrcmpW(acc_mimeW, accept_mimes[0]), "unexpected mimes %s\n", wine_dbgstr_w(accept_mimes[0])); CoTaskMemFree(accept_mimes[0]);
hres = IInternetBindInfo_QueryInterface(pOIBindInfo, &IID_IServiceProvider, (void**)&service_provider); - ok(hres == S_OK, "QueryInterface failed: %08x\n", hres); + ok(hres == S_OK, "QueryInterface failed: %08lx\n", hres);
SET_EXPECT(QueryService_HttpNegotiate); hres = IServiceProvider_QueryService(service_provider, &IID_IHttpNegotiate, &IID_IHttpNegotiate, (void**)&http_negotiate); CHECK_CALLED(QueryService_HttpNegotiate); - ok(hres == S_OK, "QueryService failed: %08x\n", hres); + ok(hres == S_OK, "QueryService failed: %08lx\n", hres);
SET_EXPECT(BeginningTransaction); hres = IHttpNegotiate_BeginningTransaction(http_negotiate, binding_urls[tested_protocol], NULL, 0, &additional_headers); CHECK_CALLED(BeginningTransaction); IHttpNegotiate_Release(http_negotiate); - ok(hres == S_OK, "BeginningTransction failed: %08x\n", hres); + ok(hres == S_OK, "BeginningTransction failed: %08lx\n", hres); ok(additional_headers == NULL, "additional_headers=%p\n", additional_headers);
SET_EXPECT(QueryService_HttpNegotiate); hres = IServiceProvider_QueryService(service_provider, &IID_IHttpNegotiate2, &IID_IHttpNegotiate2, (void**)&http_negotiate2); CHECK_CALLED(QueryService_HttpNegotiate); - ok(hres == S_OK, "QueryService failed: %08x\n", hres); + ok(hres == S_OK, "QueryService failed: %08lx\n", hres);
size = 512; SET_EXPECT(GetRootSecurityId); hres = IHttpNegotiate2_GetRootSecurityId(http_negotiate2, sec_id, &size, 0); CHECK_CALLED(GetRootSecurityId); IHttpNegotiate2_Release(http_negotiate2); - ok(hres == E_FAIL, "GetRootSecurityId failed: %08x, expected E_FAIL\n", hres); - ok(size == 13, "size=%d\n", size); + ok(hres == E_FAIL, "GetRootSecurityId failed: %08lx, expected E_FAIL\n", hres); + ok(size == 13, "size=%ld\n", size);
IServiceProvider_Release(service_provider);
@@ -1886,7 +1886,7 @@ static void protocol_start(IInternetProtocolSink *pOIProtSink, IInternetBindInfo SET_EXPECT(ReportProgress_CACHEFILENAMEAVAILABLE); hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_CACHEFILENAMEAVAILABLE, expect_wsz = emptyW); - ok(hres == S_OK, "ReportProgress(BINDSTATUS_CACHEFILENAMEAVAILABLE) failed: %08x\n", hres); + ok(hres == S_OK, "ReportProgress(BINDSTATUS_CACHEFILENAMEAVAILABLE) failed: %08lx\n", hres); CHECK_CALLED(ReportProgress_CACHEFILENAMEAVAILABLE);
if(mimefilter_test) { @@ -1898,7 +1898,7 @@ static void protocol_start(IInternetProtocolSink *pOIProtSink, IInternetBindInfo hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE, mimefilter_test ? pjpegW : (expect_wsz = text_htmlW)); ok(hres == S_OK, - "ReportProgress(BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE) failed: %08x\n", hres); + "ReportProgress(BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE) failed: %08lx\n", hres); if(mimefilter_test) { CHECK_CALLED(MimeFilter_CreateInstance); CHECK_CALLED(MimeFilter_Start); @@ -1915,7 +1915,7 @@ static void protocol_start(IInternetProtocolSink *pOIProtSink, IInternetBindInfo hres = IInternetProtocolSink_ReportData(pOIProtSink, BSCF_FIRSTDATANOTIFICATION | (tested_protocol == ITS_TEST ? BSCF_DATAFULLYAVAILABLE : BSCF_LASTDATANOTIFICATION), 13, 13); - ok(hres == S_OK, "ReportData failed: %08x\n", hres); + ok(hres == S_OK, "ReportData failed: %08lx\n", hres); if(mimefilter_test) CHECK_CALLED(MimeFilter_ReportData); else @@ -1930,13 +1930,13 @@ static void protocol_start(IInternetProtocolSink *pOIProtSink, IInternetBindInfo if(tested_protocol == ITS_TEST) { SET_EXPECT(ReportData); hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_BEGINDOWNLOADDATA, NULL); - ok(hres == S_OK, "ReportProgress(BINDSTATUS_BEGINDOWNLOADDATA) failed: %08x\n", hres); + ok(hres == S_OK, "ReportProgress(BINDSTATUS_BEGINDOWNLOADDATA) failed: %08lx\n", hres); CHECK_CALLED(ReportData); }
if(tested_protocol == BIND_TEST) { hres = IInternetProtocol_Terminate(binding_protocol, 0); - ok(hres == E_FAIL, "Termiante failed: %08x\n", hres); + ok(hres == E_FAIL, "Termiante failed: %08lx\n", hres); }
if(mimefilter_test) @@ -1944,7 +1944,7 @@ static void protocol_start(IInternetProtocolSink *pOIProtSink, IInternetBindInfo else SET_EXPECT(ReportResult); hres = IInternetProtocolSink_ReportResult(pOIProtSink, S_OK, 0, NULL); - ok(hres == S_OK, "ReportResult failed: %08x\n", hres); + ok(hres == S_OK, "ReportResult failed: %08lx\n", hres); if(mimefilter_test) CHECK_CALLED(MimeFilter_ReportResult); else @@ -1957,7 +1957,7 @@ static HRESULT WINAPI ProtocolEmul_Start(IInternetProtocolEx *iface, LPCWSTR szU { CHECK_EXPECT(Start);
- ok(!dwReserved, "dwReserved = %lx\n", dwReserved); + ok(!dwReserved, "dwReserved = %Ix\n", dwReserved); protocol_start(pOIProtSink, pOIBindInfo, grfPI); return S_OK; } @@ -1975,13 +1975,13 @@ static HRESULT WINAPI ProtocolEmul_Continue(IInternetProtocolEx *iface, return S_OK; if(binding_test) { ok(pProtocolData != &protocoldata, "pProtocolData == &protocoldata\n"); - ok(pProtocolData->grfFlags == protocoldata.grfFlags, "grfFlags wrong %x/%x\n", + ok(pProtocolData->grfFlags == protocoldata.grfFlags, "grfFlags wrong %lx/%lx\n", pProtocolData->grfFlags, protocoldata.grfFlags ); - ok(pProtocolData->dwState == protocoldata.dwState, "dwState wrong %x/%x\n", + ok(pProtocolData->dwState == protocoldata.dwState, "dwState wrong %lx/%lx\n", pProtocolData->dwState, protocoldata.dwState ); ok(pProtocolData->pData == protocoldata.pData, "pData wrong %p/%p\n", pProtocolData->pData, protocoldata.pData ); - ok(pProtocolData->cbData == protocoldata.cbData, "cbData wrong %x/%x\n", + ok(pProtocolData->cbData == protocoldata.cbData, "cbData wrong %lx/%lx\n", pProtocolData->cbData, protocoldata.cbData ); }
@@ -2008,7 +2008,7 @@ static HRESULT WINAPI ProtocolEmul_Continue(IInternetProtocolEx *iface, SET_EXPECT(SetPriority); SET_EXPECT(Start); hres = IInternetProtocolSink_ReportResult(binding_sink, INET_E_REDIRECT_FAILED, ERROR_SUCCESS, redirect_urlW); - ok(hres == S_OK, "ReportResult failed: %08x\n", hres); + ok(hres == S_OK, "ReportResult failed: %08lx\n", hres); if(bindinfo_options & BINDINFO_OPTIONS_DISABLEAUTOREDIRECTS) CHECK_CALLED(Redirect); CHECK_CALLED(ReportProgress_REDIRECTING); @@ -2039,7 +2039,7 @@ static HRESULT WINAPI ProtocolEmul_Continue(IInternetProtocolEx *iface, IHttpNegotiate_Release(http_negotiate); CHECK_CALLED(OnResponse); IHttpNegotiate_Release(http_negotiate); - ok(hres == S_OK, "OnResponse failed: %08x\n", hres); + ok(hres == S_OK, "OnResponse failed: %08lx\n", hres);
if(mimefilter_test) { SET_EXPECT(MimeFilter_CreateInstance); @@ -2058,7 +2058,7 @@ static HRESULT WINAPI ProtocolEmul_Continue(IInternetProtocolEx *iface, CHECK_CALLED(ReportProgress_MIMETYPEAVAILABLE); } ok(hres == S_OK, - "ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE) failed: %08x\n", hres); + "ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE) failed: %08lx\n", hres);
bscf |= BSCF_FIRSTDATANOTIFICATION; break; @@ -2088,7 +2088,7 @@ static HRESULT WINAPI ProtocolEmul_Continue(IInternetProtocolEx *iface, }
hres = IInternetProtocolSink_ReportData(binding_sink, bscf, pr, 400); - ok(hres == S_OK, "ReportData failed: %08x\n", hres); + ok(hres == S_OK, "ReportData failed: %08lx\n", hres);
if(mimefilter_test) { SET_EXPECT(MimeFilter_ReportData); @@ -2112,7 +2112,7 @@ static HRESULT WINAPI ProtocolEmul_Continue(IInternetProtocolEx *iface, static HRESULT WINAPI ProtocolEmul_Terminate(IInternetProtocolEx *iface, DWORD dwOptions) { CHECK_EXPECT(Terminate); - ok(!dwOptions, "dwOptions=%d\n", dwOptions); + ok(!dwOptions, "dwOptions=%ld\n", dwOptions); return S_OK; }
@@ -2132,9 +2132,9 @@ static HRESULT WINAPI ProtocolEmul_Read(IInternetProtocolEx *iface, void *pv, if(prot_read < 300) { ok(pv != expect_pv, "pv == expect_pv\n"); if(prot_read < 300) - ok(cb == 2048-prot_read, "cb=%d\n", cb); + ok(cb == 2048-prot_read, "cb=%ld\n", cb); else - ok(cb == 700, "cb=%d\n", cb); + ok(cb == 700, "cb=%ld\n", cb); }else { ok(expect_pv <= pv && (BYTE*)pv < (BYTE*)expect_pv + cb, "pv != expect_pv\n"); } @@ -2143,8 +2143,8 @@ static HRESULT WINAPI ProtocolEmul_Read(IInternetProtocolEx *iface, void *pv, CHECK_EXPECT(Read);
ok(pv == expect_pv, "pv != expect_pv\n"); - ok(cb == 1000, "cb=%d\n", cb); - ok(!*pcbRead, "*pcbRead = %d\n", *pcbRead); + ok(cb == 1000, "cb=%ld\n", cb); + ok(!*pcbRead, "*pcbRead = %ld\n", *pcbRead); } ok(pcbRead != NULL, "pcbRead == NULL\n");
@@ -2165,7 +2165,7 @@ static HRESULT WINAPI ProtocolEmul_Read(IInternetProtocolEx *iface, void *pv, hres = IInternetProtocolSink_ReportData(binding_sink, BSCF_LASTDATANOTIFICATION|BSCF_INTERMEDIATEDATANOTIFICATION, 0, 0); read_report_data--; - ok(hres == S_OK, "ReportData failed: %08x\n", hres); + ok(hres == S_OK, "ReportData failed: %08lx\n", hres); if(short_read) { CLEAR_CALLED(GetBindInfo); /* IE9 */ CHECK_CALLED(ReportProgress_MIMETYPEAVAILABLE); @@ -2180,7 +2180,7 @@ static HRESULT WINAPI ProtocolEmul_Read(IInternetProtocolEx *iface, void *pv, else SET_EXPECT(ReportResult); hres = IInternetProtocolSink_ReportResult(binding_sink, S_OK, ERROR_SUCCESS, NULL); - ok(hres == S_OK, "ReportResult failed: %08x\n", hres); + ok(hres == S_OK, "ReportResult failed: %08lx\n", hres); if(mimefilter_test) CHECK_CALLED(MimeFilter_ReportResult); else @@ -2217,11 +2217,11 @@ static HRESULT WINAPI ProtocolEmul_Read(IInternetProtocolEx *iface, void *pv, static HRESULT WINAPI ProtocolEmul_LockRequest(IInternetProtocolEx *iface, DWORD dwOptions) { CHECK_EXPECT(LockRequest); - ok(dwOptions == 0, "dwOptions=%x\n", dwOptions); + ok(dwOptions == 0, "dwOptions=%lx\n", dwOptions); if(result_from_lock) { HRESULT hres; hres = IInternetProtocolSink_ReportResult(binding_sink, S_OK, ERROR_SUCCESS, NULL); - ok(hres == S_OK, "ReportResult failed: %08x, expected E_FAIL\n", hres); + ok(hres == S_OK, "ReportResult failed: %08lx, expected E_FAIL\n", hres); } return S_OK; } @@ -2324,9 +2324,9 @@ static ULONG WINAPI ProtocolUnk_Release(IUnknown *iface) * and 1 on redirected handler. */ ok(!This->outer_ref || broken(test_redirect && (This->outer_ref == -1 || This->outer_ref == 1)), - "outer_ref = %d\n", This->outer_ref); + "outer_ref = %ld\n", This->outer_ref); if(This->outer_ref) - trace("outer_ref %d\n", This->outer_ref); + trace("outer_ref %ld\n", This->outer_ref); CHECK_EXPECT(Protocol_destructor); heap_free(This); } @@ -2370,7 +2370,7 @@ static HRESULT WINAPI MimeProtocol_Start(IInternetProtocolEx *iface, LPCWSTR szU CHECK_EXPECT(MimeFilter_Start);
ok(!lstrcmpW(szUrl, pjpegW), "wrong url %s\n", wine_dbgstr_w(szUrl)); - ok(grfPI == (PI_FILTER_MODE|PI_FORCE_ASYNC), "grfPI=%x, expected PI_FILTER_MODE|PI_FORCE_ASYNC\n", grfPI); + ok(grfPI == (PI_FILTER_MODE|PI_FORCE_ASYNC), "grfPI=%lx, expected PI_FILTER_MODE|PI_FORCE_ASYNC\n", grfPI); ok(dwReserved, "dwReserved == 0\n"); ok(pOIProtSink != NULL, "pOIProtSink == NULL\n"); ok(pOIBindInfo != NULL, "pOIBindInfo == NULL\n"); @@ -2384,11 +2384,11 @@ static HRESULT WINAPI MimeProtocol_Start(IInternetProtocolEx *iface, LPCWSTR szU }
data = (void*)dwReserved; - ok(data->cbSize == sizeof(*data), "data->cbSize = %d\n", data->cbSize); + ok(data->cbSize == sizeof(*data), "data->cbSize = %ld\n", data->cbSize); ok(!data->pProtocolSink, "data->pProtocolSink != NULL\n"); ok(data->pProtocol != NULL, "data->pProtocol == NULL\n"); ok(!data->pUnk, "data->pUnk != NULL\n"); - ok(!data->dwFilterFlags, "data->dwProtocolFlags = %x\n", data->dwFilterFlags); + ok(!data->dwFilterFlags, "data->dwProtocolFlags = %lx\n", data->dwFilterFlags); if(binding_test) { IInternetProtocolSink *prot_sink;
@@ -2414,21 +2414,21 @@ static HRESULT WINAPI MimeProtocol_Start(IInternetProtocolEx *iface, LPCWSTR szU
SET_EXPECT(ReportProgress_DECODING); hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_DECODING, pjpegW); - ok(hres == S_OK, "ReportProgress(BINDSTATUS_DECODING) failed: %08x\n", hres); + ok(hres == S_OK, "ReportProgress(BINDSTATUS_DECODING) failed: %08lx\n", hres); CHECK_CALLED(ReportProgress_DECODING);
SET_EXPECT(GetBindInfo); memset(&bindinfo, 0, sizeof(bindinfo)); bindinfo.cbSize = sizeof(bindinfo); hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &cbindf, &bindinfo); - ok(hres == S_OK, "GetBindInfo failed: %08x\n", hres); - ok(cbindf == (bindf|BINDF_FROMURLMON), "cbindf = %x, expected %x\n", cbindf, bindf); + ok(hres == S_OK, "GetBindInfo failed: %08lx\n", hres); + ok(cbindf == (bindf|BINDF_FROMURLMON), "cbindf = %lx, expected %lx\n", cbindf, bindf); CHECK_CALLED(GetBindInfo);
SET_EXPECT(GetBindString_URL); hres = IInternetBindInfo_GetBindString(pOIBindInfo, BINDSTRING_URL, &url_str, 1, &fetched); - ok(hres == S_OK, "GetBindString(BINDSTRING_URL) failed: %08x\n", hres); - ok(fetched == 1, "fetched = %d\n", fetched); + ok(hres == S_OK, "GetBindString(BINDSTRING_URL) failed: %08lx\n", hres); + ok(fetched == 1, "fetched = %ld\n", fetched); ok(!lstrcmpW(url_str, binding_urls[tested_protocol]), "wrong url_str %s\n", wine_dbgstr_w(url_str)); CoTaskMemFree(url_str); CHECK_CALLED(GetBindString_URL); @@ -2449,11 +2449,11 @@ static HRESULT WINAPI MimeProtocol_Terminate(IInternetProtocolEx *iface, DWORD d
CHECK_EXPECT(MimeFilter_Terminate);
- ok(!dwOptions, "dwOptions = %x\n", dwOptions); + ok(!dwOptions, "dwOptions = %lx\n", dwOptions);
SET_EXPECT(Terminate); hres = IInternetProtocol_Terminate(filtered_protocol, dwOptions); - ok(hres == S_OK, "Terminate failed: %08x\n", hres); + ok(hres == S_OK, "Terminate failed: %08lx\n", hres); CHECK_CALLED(Terminate);
return S_OK; @@ -2477,14 +2477,14 @@ static HRESULT WINAPI MimeProtocol_Read(IInternetProtocolEx *iface, void *pv, else SET_EXPECT(Read); hres = IInternetProtocol_Read(filtered_protocol, buf, sizeof(buf), &read); - ok(hres == S_OK || hres == S_FALSE || hres == E_PENDING, "Read failed: %08x\n", hres); + ok(hres == S_OK || hres == S_FALSE || hres == E_PENDING, "Read failed: %08lx\n", hres); if(read_report_data) CHECK_CALLED(Read2); else CHECK_CALLED(Read);
if(pcbRead) { - ok(*pcbRead == 0, "*pcbRead=%d, expected 0\n", *pcbRead); + ok(*pcbRead == 0, "*pcbRead=%ld, expected 0\n", *pcbRead); *pcbRead = read; }
@@ -2498,11 +2498,11 @@ static HRESULT WINAPI MimeProtocol_LockRequest(IInternetProtocolEx *iface, DWORD
CHECK_EXPECT(MimeFilter_LockRequest);
- ok(!dwOptions, "dwOptions = %x\n", dwOptions); + ok(!dwOptions, "dwOptions = %lx\n", dwOptions);
SET_EXPECT(LockRequest); hres = IInternetProtocol_LockRequest(filtered_protocol, dwOptions); - ok(hres == S_OK, "LockRequest failed: %08x\n", hres); + ok(hres == S_OK, "LockRequest failed: %08lx\n", hres); CHECK_CALLED(LockRequest);
return S_OK; @@ -2516,7 +2516,7 @@ static HRESULT WINAPI MimeProtocol_UnlockRequest(IInternetProtocolEx *iface)
SET_EXPECT(UnlockRequest); hres = IInternetProtocol_UnlockRequest(filtered_protocol); - ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); + ok(hres == S_OK, "UnlockRequest failed: %08lx\n", hres); CHECK_CALLED(UnlockRequest);
return S_OK; @@ -2717,18 +2717,18 @@ static void register_filter(BOOL do_register) HRESULT hres;
hres = pCoInternetGetSession(0, &session, 0); - ok(hres == S_OK, "CoInternetGetSession failed: %08x\n", hres); + ok(hres == S_OK, "CoInternetGetSession failed: %08lx\n", hres);
if(do_register) { hres = IInternetSession_RegisterMimeFilter(session, &mimefilter_cf, &IID_IInternetProtocol, pjpegW); - ok(hres == S_OK, "RegisterMimeFilter failed: %08x\n", hres); + ok(hres == S_OK, "RegisterMimeFilter failed: %08lx\n", hres); hres = IInternetSession_RegisterMimeFilter(session, &mimefilter_cf, &IID_IInternetProtocol, gifW); - ok(hres == S_OK, "RegisterMimeFilter failed: %08x\n", hres); + ok(hres == S_OK, "RegisterMimeFilter failed: %08lx\n", hres); }else { hres = IInternetSession_UnregisterMimeFilter(session, &mimefilter_cf, pjpegW); - ok(hres == S_OK, "RegisterMimeFilter failed: %08x\n", hres); + ok(hres == S_OK, "RegisterMimeFilter failed: %08lx\n", hres); hres = IInternetSession_UnregisterMimeFilter(session, &mimefilter_cf, gifW); - ok(hres == S_OK, "RegisterMimeFilter failed: %08x\n", hres); + ok(hres == S_OK, "RegisterMimeFilter failed: %08lx\n", hres); }
IInternetSession_Release(session); @@ -2786,20 +2786,20 @@ static void test_priority(IInternetProtocol *protocol)
hres = IInternetProtocol_QueryInterface(protocol, &IID_IInternetPriority, (void**)&priority); - ok(hres == S_OK, "QueryInterface(IID_IInternetPriority) failed: %08x\n", hres); + ok(hres == S_OK, "QueryInterface(IID_IInternetPriority) failed: %08lx\n", hres); if(FAILED(hres)) return;
hres = IInternetPriority_GetPriority(priority, &pr); - ok(hres == S_OK, "GetPriority failed: %08x\n", hres); - ok(pr == 0, "pr=%d, expected 0\n", pr); + ok(hres == S_OK, "GetPriority failed: %08lx\n", hres); + ok(pr == 0, "pr=%ld, expected 0\n", pr);
hres = IInternetPriority_SetPriority(priority, 1); - ok(hres == S_OK, "SetPriority failed: %08x\n", hres); + ok(hres == S_OK, "SetPriority failed: %08lx\n", hres);
hres = IInternetPriority_GetPriority(priority, &pr); - ok(hres == S_OK, "GetPriority failed: %08x\n", hres); - ok(pr == 1, "pr=%d, expected 1\n", pr); + ok(hres == S_OK, "GetPriority failed: %08lx\n", hres); + ok(pr == 1, "pr=%ld, expected 1\n", pr);
IInternetPriority_Release(priority); } @@ -2811,13 +2811,13 @@ static void test_early_abort(const CLSID *clsid)
hres = CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, &IID_IInternetProtocol, (void**)&protocol); - ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres); + ok(hres == S_OK, "CoCreateInstance failed: %08lx\n", hres);
hres = IInternetProtocol_Abort(protocol, E_ABORT, 0); - ok(hres == S_OK, "Abort failed: %08x\n", hres); + ok(hres == S_OK, "Abort failed: %08lx\n", hres);
hres = IInternetProtocol_Abort(protocol, E_FAIL, 0); - ok(hres == S_OK, "Abort failed: %08x\n", hres); + ok(hres == S_OK, "Abort failed: %08lx\n", hres);
IInternetProtocol_Release(protocol); } @@ -2846,14 +2846,14 @@ static BOOL file_protocol_start(IInternetProtocol *protocol, LPCWSTR url,
if(protocolex) { hres = IInternetProtocolEx_StartEx(protocolex, uri, &protocol_sink, &bind_info, 0, 0); - ok(hres == S_OK, "StartEx failed: %08x\n", hres); + ok(hres == S_OK, "StartEx failed: %08lx\n", hres); }else { hres = IInternetProtocol_Start(protocol, url, &protocol_sink, &bind_info, 0, 0); if(hres == INET_E_RESOURCE_NOT_FOUND) { win_skip("Start failed\n"); return FALSE; } - ok(hres == S_OK, "Start failed: %08x\n", hres); + ok(hres == S_OK, "Start failed: %08lx\n", hres); }
CHECK_CALLED(GetBindInfo); @@ -2886,13 +2886,13 @@ static void test_file_protocol_url(LPCWSTR url)
hres = CoGetClassObject(&CLSID_FileProtocol, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void**)&unk); - ok(hres == S_OK, "CoGetClassObject failed: %08x\n", hres); + ok(hres == S_OK, "CoGetClassObject failed: %08lx\n", hres); if(FAILED(hres)) return;
hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocolInfo, (void**)&protocol_info); ok(hres == E_NOINTERFACE, - "Could not get IInternetProtocolInfo interface: %08x, expected E_NOINTERFACE\n", hres); + "Could not get IInternetProtocolInfo interface: %08lx, expected E_NOINTERFACE\n", hres);
hres = IUnknown_QueryInterface(unk, &IID_IClassFactory, (void**)&factory); ok(hres == S_OK, "Could not get IClassFactory interface\n"); @@ -2901,67 +2901,67 @@ static void test_file_protocol_url(LPCWSTR url) return;
hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&protocol); - ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); + ok(hres == S_OK, "Could not get IInternetProtocol: %08lx\n", hres);
if(SUCCEEDED(hres)) { if(file_protocol_start(protocol, url, NULL, NULL, TRUE)) { hres = IInternetProtocol_Read(protocol, buf, 2, &cb); - ok(hres == S_OK, "Read failed: %08x\n", hres); - ok(cb == 2, "cb=%u expected 2\n", cb); + ok(hres == S_OK, "Read failed: %08lx\n", hres); + ok(cb == 2, "cb=%lu expected 2\n", cb); buf[2] = 0; ok(!memcmp(buf, file_with_hash ? "XX" : "<H", 2), "Unexpected data %s\n", buf); hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb); - ok(hres == S_FALSE, "Read failed: %08x\n", hres); + ok(hres == S_FALSE, "Read failed: %08lx\n", hres); hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb); - ok(hres == S_FALSE, "Read failed: %08x expected S_FALSE\n", hres); - ok(cb == 0, "cb=%u expected 0\n", cb); + ok(hres == S_FALSE, "Read failed: %08lx expected S_FALSE\n", hres); + ok(cb == 0, "cb=%lu expected 0\n", cb); hres = IInternetProtocol_UnlockRequest(protocol); - ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); + ok(hres == S_OK, "UnlockRequest failed: %08lx\n", hres); }
if(file_protocol_start(protocol, url, NULL, NULL, FALSE)) { hres = IInternetProtocol_Read(protocol, buf, 2, &cb); - ok(hres == S_FALSE, "Read failed: %08x\n", hres); + ok(hres == S_FALSE, "Read failed: %08lx\n", hres); hres = IInternetProtocol_LockRequest(protocol, 0); - ok(hres == S_OK, "LockRequest failed: %08x\n", hres); + ok(hres == S_OK, "LockRequest failed: %08lx\n", hres); hres = IInternetProtocol_UnlockRequest(protocol); - ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); + ok(hres == S_OK, "UnlockRequest failed: %08lx\n", hres); }
IInternetProtocol_Release(protocol); }
hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&protocol); - ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); + ok(hres == S_OK, "Could not get IInternetProtocol: %08lx\n", hres); if(SUCCEEDED(hres)) { if(file_protocol_start(protocol, url, NULL, NULL, TRUE)) { hres = IInternetProtocol_LockRequest(protocol, 0); - ok(hres == S_OK, "LockRequest failed: %08x\n", hres); + ok(hres == S_OK, "LockRequest failed: %08lx\n", hres); hres = IInternetProtocol_Terminate(protocol, 0); - ok(hres == S_OK, "Terminate failed: %08x\n", hres); + ok(hres == S_OK, "Terminate failed: %08lx\n", hres); hres = IInternetProtocol_Read(protocol, buf, 2, &cb); - ok(hres == S_OK, "Read failed: %08x\n\n", hres); + ok(hres == S_OK, "Read failed: %08lx\n\n", hres); hres = IInternetProtocol_UnlockRequest(protocol); - ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); + ok(hres == S_OK, "UnlockRequest failed: %08lx\n", hres); hres = IInternetProtocol_Read(protocol, buf, 2, &cb); todo_wine_if(file_with_hash) /* FIXME: An effect of UnlockRequest call? */ - ok(hres == S_OK, "Read failed: %08x\n", hres); + ok(hres == S_OK, "Read failed: %08lx\n", hres); hres = IInternetProtocol_Terminate(protocol, 0); - ok(hres == S_OK, "Terminate failed: %08x\n", hres); + ok(hres == S_OK, "Terminate failed: %08lx\n", hres); }
IInternetProtocol_Release(protocol); }
hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&protocol); - ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); + ok(hres == S_OK, "Could not get IInternetProtocol: %08lx\n", hres); if(SUCCEEDED(hres)) { if(file_protocol_start(protocol, url, NULL, NULL, TRUE)) { hres = IInternetProtocol_Terminate(protocol, 0); - ok(hres == S_OK, "Terminate failed: %08x\n", hres); + ok(hres == S_OK, "Terminate failed: %08lx\n", hres); hres = IInternetProtocol_Read(protocol, buf, 2, &cb); - ok(hres == S_OK, "Read failed: %08x\n", hres); - ok(cb == 2, "cb=%u expected 2\n", cb); + ok(hres == S_OK, "Read failed: %08lx\n", hres); + ok(cb == 2, "cb=%lu expected 2\n", cb); }
IInternetProtocol_Release(protocol); @@ -2972,36 +2972,36 @@ static void test_file_protocol_url(LPCWSTR url) IUri *uri;
hres = pCreateUri(url, Uri_CREATE_FILE_USE_DOS_PATH, 0, &uri); - ok(hres == S_OK, "CreateUri failed: %08x\n", hres); + ok(hres == S_OK, "CreateUri failed: %08lx\n", hres);
hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocolEx, (void**)&protocolex); - ok(hres == S_OK, "Could not get IInternetProtocolEx: %08x\n", hres); + ok(hres == S_OK, "Could not get IInternetProtocolEx: %08lx\n", hres);
if(file_protocol_start(NULL, NULL, protocolex, uri, TRUE)) { hres = IInternetProtocolEx_Read(protocolex, buf, 2, &cb); - ok(hres == S_OK, "Read failed: %08x\n", hres); + ok(hres == S_OK, "Read failed: %08lx\n", hres); hres = IInternetProtocolEx_LockRequest(protocolex, 0); - ok(hres == S_OK, "LockRequest failed: %08x\n", hres); + ok(hres == S_OK, "LockRequest failed: %08lx\n", hres); hres = IInternetProtocolEx_UnlockRequest(protocolex); - ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); + ok(hres == S_OK, "UnlockRequest failed: %08lx\n", hres); }
IUri_Release(uri); IInternetProtocolEx_Release(protocolex);
hres = pCreateUri(url, 0, 0, &uri); - ok(hres == S_OK, "CreateUri failed: %08x\n", hres); + ok(hres == S_OK, "CreateUri failed: %08lx\n", hres);
hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocolEx, (void**)&protocolex); - ok(hres == S_OK, "Could not get IInternetProtocolEx: %08x\n", hres); + ok(hres == S_OK, "Could not get IInternetProtocolEx: %08lx\n", hres);
if(file_protocol_start(NULL, NULL, protocolex, uri, TRUE)) { hres = IInternetProtocolEx_Read(protocolex, buf, 2, &cb); - ok(hres == S_OK, "Read failed: %08x\n", hres); + ok(hres == S_OK, "Read failed: %08lx\n", hres); hres = IInternetProtocolEx_LockRequest(protocolex, 0); - ok(hres == S_OK, "LockRequest failed: %08x\n", hres); + ok(hres == S_OK, "LockRequest failed: %08lx\n", hres); hres = IInternetProtocolEx_UnlockRequest(protocolex); - ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); + ok(hres == S_OK, "UnlockRequest failed: %08lx\n", hres); }
IUri_Release(uri); @@ -3023,7 +3023,7 @@ static void test_file_protocol_fail(void)
hres = CoCreateInstance(&CLSID_FileProtocol, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, &IID_IInternetProtocol, (void**)&protocol); - ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres); + ok(hres == S_OK, "CoCreateInstance failed: %08lx\n", hres); if(FAILED(hres)) return;
@@ -3032,7 +3032,7 @@ static void test_file_protocol_fail(void) hres = IInternetProtocol_Start(protocol, wszIndexHtml, &protocol_sink, &bind_info, 0, 0); ok(hres == MK_E_SYNTAX || hres == E_INVALIDARG, - "Start failed: %08x, expected MK_E_SYNTAX or E_INVALIDARG\n", hres); + "Start failed: %08lx, expected MK_E_SYNTAX or E_INVALIDARG\n", hres); CLEAR_CALLED(GetBindInfo); /* GetBindInfo not called in IE7 */
SET_EXPECT(GetBindInfo); @@ -3043,7 +3043,7 @@ static void test_file_protocol_fail(void) expect_hrResult = INET_E_RESOURCE_NOT_FOUND; hres = IInternetProtocol_Start(protocol, index_url, &protocol_sink, &bind_info, 0, 0); ok(hres == INET_E_RESOURCE_NOT_FOUND, - "Start failed: %08x expected INET_E_RESOURCE_NOT_FOUND\n", hres); + "Start failed: %08lx expected INET_E_RESOURCE_NOT_FOUND\n", hres); CHECK_CALLED(GetBindInfo); if(!(bindf & BINDF_FROMURLMON)) CHECK_CALLED(ReportProgress_DIRECTBIND); @@ -3054,7 +3054,7 @@ static void test_file_protocol_fail(void)
hres = CoCreateInstance(&CLSID_FileProtocol, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, &IID_IInternetProtocol, (void**)&protocol); - ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres); + ok(hres == S_OK, "CoCreateInstance failed: %08lx\n", hres); if(FAILED(hres)) return;
@@ -3067,7 +3067,7 @@ static void test_file_protocol_fail(void)
hres = IInternetProtocol_Start(protocol, index_url2, &protocol_sink, &bind_info, 0, 0); ok(hres == INET_E_RESOURCE_NOT_FOUND, - "Start failed: %08x, expected INET_E_RESOURCE_NOT_FOUND\n", hres); + "Start failed: %08lx, expected INET_E_RESOURCE_NOT_FOUND\n", hres); CHECK_CALLED(GetBindInfo); if(!(bindf & BINDF_FROMURLMON)) CHECK_CALLED(ReportProgress_DIRECTBIND); @@ -3076,12 +3076,12 @@ static void test_file_protocol_fail(void)
SET_EXPECT(GetBindInfo); hres = IInternetProtocol_Start(protocol, NULL, &protocol_sink, &bind_info, 0, 0); - ok(hres == E_INVALIDARG, "Start failed: %08x, expected E_INVALIDARG\n", hres); + ok(hres == E_INVALIDARG, "Start failed: %08lx, expected E_INVALIDARG\n", hres); CLEAR_CALLED(GetBindInfo); /* GetBindInfo not called in IE7 */
SET_EXPECT(GetBindInfo); hres = IInternetProtocol_Start(protocol, emptyW, &protocol_sink, &bind_info, 0, 0); - ok(hres == E_INVALIDARG, "Start failed: %08x, expected E_INVALIDARG\n", hres); + ok(hres == E_INVALIDARG, "Start failed: %08lx, expected E_INVALIDARG\n", hres); CLEAR_CALLED(GetBindInfo); /* GetBindInfo not called in IE7 */
IInternetProtocol_Release(protocol); @@ -3230,7 +3230,7 @@ static void create_cache_entry(const WCHAR *urlw) yesterday.dwLowDateTime = li.u.LowPart;
res = CreateUrlCacheEntryA(url, sizeof(content), "", file_path, 0); - ok(res, "CreateUrlCacheEntryA failed: %u\n", GetLastError()); + ok(res, "CreateUrlCacheEntryA failed: %lu\n", GetLastError());
file = CreateFileA(file_path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); ok(file != INVALID_HANDLE_VALUE, "CreateFile failed\n"); @@ -3240,7 +3240,7 @@ static void create_cache_entry(const WCHAR *urlw)
res = CommitUrlCacheEntryA(url, file_path, tomorrow, yesterday, NORMAL_CACHE_ENTRY, cache_headers, sizeof(cache_headers)-1, "", 0); - ok(res, "CommitUrlCacheEntryA failed: %u\n", GetLastError()); + ok(res, "CommitUrlCacheEntryA failed: %lu\n", GetLastError()); }
static BOOL http_protocol_start(LPCWSTR url, BOOL use_iuri) @@ -3251,7 +3251,7 @@ static BOOL http_protocol_start(LPCWSTR url, BOOL use_iuri)
if(use_iuri && pCreateUri) { hres = pCreateUri(url, 0, 0, &uri); - ok(hres == S_OK, "CreateUri failed: %08x\n", hres); + ok(hres == S_OK, "CreateUri failed: %08lx\n", hres); }
SET_EXPECT(GetBindInfo); @@ -3279,16 +3279,16 @@ static BOOL http_protocol_start(LPCWSTR url, BOOL use_iuri) IInternetProtocolEx *protocolex;
hres = IInternetProtocol_QueryInterface(async_protocol, &IID_IInternetProtocolEx, (void**)&protocolex); - ok(hres == S_OK, "Could not get IInternetProtocolEx iface: %08x\n", hres); + ok(hres == S_OK, "Could not get IInternetProtocolEx iface: %08lx\n", hres);
hres = IInternetProtocolEx_StartEx(protocolex, uri, &protocol_sink, &bind_info, 0, 0); - ok(hres == S_OK, "Start failed: %08x\n", hres); + ok(hres == S_OK, "Start failed: %08lx\n", hres);
IInternetProtocolEx_Release(protocolex); IUri_Release(uri); }else { hres = IInternetProtocol_Start(async_protocol, url, &protocol_sink, &bind_info, 0, 0); - ok(hres == S_OK, "Start failed: %08x\n", hres); + ok(hres == S_OK, "Start failed: %08lx\n", hres); } if(FAILED(hres)) return FALSE; @@ -3328,13 +3328,13 @@ static void test_protocol_terminate(IInternetProtocol *protocol) HRESULT hres;
hres = IInternetProtocol_LockRequest(protocol, 0); - ok(hres == S_OK, "LockRequest failed: %08x\n", hres); + ok(hres == S_OK, "LockRequest failed: %08lx\n", hres);
hres = IInternetProtocol_Read(protocol, buf, 1, &cb); - ok(hres == (test_abort ? S_OK : S_FALSE), "Read failed: %08x\n", hres); + ok(hres == (test_abort ? S_OK : S_FALSE), "Read failed: %08lx\n", hres);
hres = IInternetProtocol_Terminate(protocol, 0); - ok(hres == S_OK, "Terminate failed: %08x\n", hres); + ok(hres == S_OK, "Terminate failed: %08lx\n", hres);
/* This wait is to give the internet handles being freed in Terminate * enough time to actually terminate in all cases. Internet handles @@ -3347,7 +3347,7 @@ static void test_protocol_terminate(IInternetProtocol *protocol) Sleep(100);
hres = IInternetProtocol_UnlockRequest(protocol); - ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); + ok(hres == S_OK, "UnlockRequest failed: %08lx\n", hres); }
/* is_first refers to whether this is the first call to this function @@ -3367,13 +3367,13 @@ static void test_http_protocol_url(LPCWSTR url, int prot, DWORD flags, DWORD tym
hres = CoGetClassObject(prot == HTTPS_TEST ? &CLSID_HttpSProtocol : &CLSID_HttpProtocol, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void**)&unk); - ok(hres == S_OK, "CoGetClassObject failed: %08x\n", hres); + ok(hres == S_OK, "CoGetClassObject failed: %08lx\n", hres); if(FAILED(hres)) return;
hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocolInfo, (void**)&protocol_info); ok(hres == E_NOINTERFACE, - "Could not get IInternetProtocolInfo interface: %08x, expected E_NOINTERFACE\n", + "Could not get IInternetProtocolInfo interface: %08lx, expected E_NOINTERFACE\n", hres);
hres = IUnknown_QueryInterface(unk, &IID_IClassFactory, (void**)&factory); @@ -3384,7 +3384,7 @@ static void test_http_protocol_url(LPCWSTR url, int prot, DWORD flags, DWORD tym
hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&async_protocol); - ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); + ok(hres == S_OK, "Could not get IInternetProtocol: %08lx\n", hres); if(SUCCEEDED(hres)) { BYTE buf[3600]; DWORD cb; @@ -3443,19 +3443,19 @@ static void test_http_protocol_url(LPCWSTR url, int prot, DWORD flags, DWORD tym BYTE buf[1500];
hres = IInternetProtocol_Read(async_protocol, buf, 100, &cb); - ok(hres == S_OK && cb == 100, "Read failed: %08x (%d bytes)\n", hres, cb); + ok(hres == S_OK && cb == 100, "Read failed: %08lx (%ld bytes)\n", hres, cb);
SET_EXPECT(ReportResult); hres = IInternetProtocol_Read(async_protocol, buf, sizeof(buf), &cb); - ok(hres == S_OK && cb == 900, "Read failed: %08x (%d bytes)\n", hres, cb); + ok(hres == S_OK && cb == 900, "Read failed: %08lx (%ld bytes)\n", hres, cb); CHECK_CALLED(ReportResult);
hres = IInternetProtocol_Read(async_protocol, buf, sizeof(buf), &cb); - ok(hres == S_FALSE && !cb, "Read failed: %08x (%d bytes)\n", hres, cb); + ok(hres == S_FALSE && !cb, "Read failed: %08lx (%ld bytes)\n", hres, cb); }else { hres = IInternetProtocol_Read(async_protocol, buf, 1, &cb); ok((hres == E_PENDING && cb==0) || - (hres == S_OK && cb==1), "Read failed: %08x (%d bytes)\n", hres, cb); + (hres == S_OK && cb==1), "Read failed: %08lx (%ld bytes)\n", hres, cb);
ok( WaitForSingleObject(event_complete, 90000) == WAIT_OBJECT_0, "wait timed out\n" ); if(bindf & BINDF_FROMURLMON) @@ -3474,7 +3474,7 @@ static void test_http_protocol_url(LPCWSTR url, int prot, DWORD flags, DWORD tym if(hres == E_PENDING) { hres = IInternetProtocol_Read(async_protocol, buf, 1, &cb); ok((hres == E_PENDING && cb==0) || - (hres == S_OK && cb==1), "Read failed: %08x (%d bytes)\n", hres, cb); + (hres == S_OK && cb==1), "Read failed: %08lx (%ld bytes)\n", hres, cb); ok( WaitForSingleObject(event_complete, 90000) == WAIT_OBJECT_0, "wait timed out\n" ); if(bindf & BINDF_FROMURLMON) CHECK_CALLED(Switch); @@ -3486,11 +3486,11 @@ static void test_http_protocol_url(LPCWSTR url, int prot, DWORD flags, DWORD tym
SET_EXPECT(ReportResult); hres = IInternetProtocol_Abort(async_protocol, E_ABORT, 0); - ok(hres == S_OK, "Abort failed: %08x\n", hres); + ok(hres == S_OK, "Abort failed: %08lx\n", hres); CHECK_CALLED(ReportResult);
hres = IInternetProtocol_Abort(async_protocol, E_ABORT, 0); - ok(hres == INET_E_RESULT_DISPATCHED || hres == S_OK /* IE10 */, "Abort failed: %08x\n", hres); + ok(hres == INET_E_RESULT_DISPATCHED || hres == S_OK /* IE10 */, "Abort failed: %08lx\n", hres); break; } }else { @@ -3502,7 +3502,7 @@ static void test_http_protocol_url(LPCWSTR url, int prot, DWORD flags, DWORD tym } } if(!test_abort) { - ok(hres == S_FALSE, "Read failed: %08x\n", hres); + ok(hres == S_FALSE, "Read failed: %08lx\n", hres); CHECK_CALLED(ReportResult); } } @@ -3513,15 +3513,15 @@ static void test_http_protocol_url(LPCWSTR url, int prot, DWORD flags, DWORD tym CLEAR_CALLED(ReportProgress_COOKIE_SENT);
hres = IInternetProtocol_Abort(async_protocol, E_ABORT, 0); - ok(hres == INET_E_RESULT_DISPATCHED || hres == S_OK /* IE10 */, "Abort failed: %08x\n", hres); + ok(hres == INET_E_RESULT_DISPATCHED || hres == S_OK /* IE10 */, "Abort failed: %08lx\n", hres);
test_protocol_terminate(async_protocol);
hres = IInternetProtocol_Abort(async_protocol, E_ABORT, 0); - ok(hres == S_OK, "Abort failed: %08x\n", hres); + ok(hres == S_OK, "Abort failed: %08lx\n", hres);
ref = IInternetProtocol_Release(async_protocol); - ok(!ref, "ref=%x\n", ref); + ok(!ref, "ref=%lx\n", ref); }
IClassFactory_Release(factory); @@ -3530,7 +3530,7 @@ static void test_http_protocol_url(LPCWSTR url, int prot, DWORD flags, DWORD tym BOOL res;
res = DeleteUrlCacheEntryW(url); - ok(res, "DeleteUrlCacheEntryA failed: %u\n", GetLastError()); + ok(res, "DeleteUrlCacheEntryA failed: %lu\n", GetLastError()); } }
@@ -3642,12 +3642,12 @@ static void test_ftp_protocol(void) expect_hrResult = E_PENDING;
hres = CoGetClassObject(&CLSID_FtpProtocol, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void**)&unk); - ok(hres == S_OK, "CoGetClassObject failed: %08x\n", hres); + ok(hres == S_OK, "CoGetClassObject failed: %08lx\n", hres); if(FAILED(hres)) return;
hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocolInfo, (void**)&protocol_info); - ok(hres == E_NOINTERFACE, "Could not get IInternetProtocolInfo interface: %08x, expected E_NOINTERFACE\n", hres); + ok(hres == E_NOINTERFACE, "Could not get IInternetProtocolInfo interface: %08lx, expected E_NOINTERFACE\n", hres);
hres = IUnknown_QueryInterface(unk, &IID_IClassFactory, (void**)&factory); ok(hres == S_OK, "Could not get IClassFactory interface\n"); @@ -3658,7 +3658,7 @@ static void test_ftp_protocol(void) hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&async_protocol); IClassFactory_Release(factory); - ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); + ok(hres == S_OK, "Could not get IInternetProtocol: %08lx\n", hres);
test_priority(async_protocol);
@@ -3669,14 +3669,14 @@ static void test_ftp_protocol(void) SET_EXPECT(Switch);
hres = IInternetProtocol_Start(async_protocol, ftp_urlW, &protocol_sink, &bind_info, 0, 0); - ok(hres == S_OK, "Start failed: %08x\n", hres); + ok(hres == S_OK, "Start failed: %08lx\n", hres); CHECK_CALLED(GetBindInfo);
SET_EXPECT(ReportResult);
hres = IInternetProtocol_Read(async_protocol, buf, 1, &cb); ok((hres == E_PENDING && cb==0) || - (hres == S_OK && cb==1), "Read failed: %08x (%d bytes)\n", hres, cb); + (hres == S_OK && cb==1), "Read failed: %08lx (%ld bytes)\n", hres, cb);
ok( WaitForSingleObject(event_complete, 90000) == WAIT_OBJECT_0, "wait timed out\n" );
@@ -3692,7 +3692,7 @@ static void test_ftp_protocol(void) if(cb == 0) break; }
- ok(hres == S_FALSE, "Read failed: %08x\n", hres); + ok(hres == S_FALSE, "Read failed: %08lx\n", hres); CHECK_CALLED(ReportResult); CHECK_CALLED(Switch);
@@ -3702,12 +3702,12 @@ static void test_ftp_protocol(void) IInternetProtocolEx *protocolex;
hres = IInternetProtocol_QueryInterface(async_protocol, &IID_IInternetProtocolEx, (void**)&protocolex); - ok(hres == S_OK, "Could not get IInternetProtocolEx iface: %08x\n", hres); + ok(hres == S_OK, "Could not get IInternetProtocolEx iface: %08lx\n", hres); IInternetProtocolEx_Release(protocolex); }
ref = IInternetProtocol_Release(async_protocol); - ok(!ref, "ref=%d\n", ref); + ok(!ref, "ref=%ld\n", ref);
test_early_abort(&CLSID_FtpProtocol); } @@ -3724,12 +3724,12 @@ static void test_gopher_protocol(void) hres = CoGetClassObject(&CLSID_GopherProtocol, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void**)&unk); ok(hres == S_OK || broken(hres == REGDB_E_CLASSNOTREG || hres == CLASS_E_CLASSNOTAVAILABLE), /* Gopher protocol has been removed as of Vista */ - "CoGetClassObject failed: %08x\n", hres); + "CoGetClassObject failed: %08lx\n", hres); if(FAILED(hres)) return;
hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocolInfo, (void**)&protocol_info); - ok(hres == E_NOINTERFACE, "Could not get IInternetProtocolInfo interface: %08x, expected E_NOINTERFACE\n", hres); + ok(hres == E_NOINTERFACE, "Could not get IInternetProtocolInfo interface: %08lx, expected E_NOINTERFACE\n", hres);
hres = IUnknown_QueryInterface(unk, &IID_IClassFactory, (void**)&factory); ok(hres == S_OK, "Could not get IClassFactory interface\n"); @@ -3740,7 +3740,7 @@ static void test_gopher_protocol(void) hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&async_protocol); IClassFactory_Release(factory); - ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); + ok(hres == S_OK, "Could not get IInternetProtocol: %08lx\n", hres);
test_priority(async_protocol);
@@ -3766,11 +3766,11 @@ static void test_mk_protocol(void)
hres = CoGetClassObject(&CLSID_MkProtocol, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void**)&unk); - ok(hres == S_OK, "CoGetClassObject failed: %08x\n", hres); + ok(hres == S_OK, "CoGetClassObject failed: %08lx\n", hres);
hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocolInfo, (void**)&protocol_info); ok(hres == E_NOINTERFACE, - "Could not get IInternetProtocolInfo interface: %08x, expected E_NOINTERFACE\n", + "Could not get IInternetProtocolInfo interface: %08lx, expected E_NOINTERFACE\n", hres);
hres = IUnknown_QueryInterface(unk, &IID_IClassFactory, (void**)&factory); @@ -3782,12 +3782,12 @@ static void test_mk_protocol(void) hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&protocol); IClassFactory_Release(factory); - ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); + ok(hres == S_OK, "Could not get IInternetProtocol: %08lx\n", hres);
SET_EXPECT(GetBindInfo); hres = IInternetProtocol_Start(protocol, wrong_url1, &protocol_sink, &bind_info, 0, 0); ok(hres == MK_E_SYNTAX || hres == INET_E_INVALID_URL, - "Start failed: %08x, expected MK_E_SYNTAX or INET_E_INVALID_URL\n", hres); + "Start failed: %08lx, expected MK_E_SYNTAX or INET_E_INVALID_URL\n", hres); CLEAR_CALLED(GetBindInfo);
SET_EXPECT(GetBindInfo); @@ -3800,7 +3800,7 @@ static void test_mk_protocol(void) hres = IInternetProtocol_Start(protocol, wrong_url2, &protocol_sink, &bind_info, 0, 0); ok(hres == INET_E_RESOURCE_NOT_FOUND || hres == INET_E_INVALID_URL, /* win2k3 */ - "Start failed: %08x, expected INET_E_RESOURCE_NOT_FOUND or INET_E_INVALID_URL\n", hres); + "Start failed: %08lx, expected INET_E_RESOURCE_NOT_FOUND or INET_E_INVALID_URL\n", hres);
if (hres == INET_E_RESOURCE_NOT_FOUND) { CHECK_CALLED(GetBindInfo); @@ -3839,48 +3839,48 @@ static void test_CreateBinding(void) init_test(BIND_TEST, TEST_BINDING);
hres = pCoInternetGetSession(0, &session, 0); - ok(hres == S_OK, "CoInternetGetSession failed: %08x\n", hres); + ok(hres == S_OK, "CoInternetGetSession failed: %08lx\n", hres);
hres = IInternetSession_RegisterNameSpace(session, &ClassFactory, &IID_NULL, wsz_test, 0, NULL, 0); - ok(hres == S_OK, "RegisterNameSpace failed: %08x\n", hres); + ok(hres == S_OK, "RegisterNameSpace failed: %08lx\n", hres);
hres = IInternetSession_CreateBinding(session, NULL, test_url, NULL, NULL, &protocol, 0); binding_protocol = protocol; - ok(hres == S_OK, "CreateBinding failed: %08x\n", hres); + ok(hres == S_OK, "CreateBinding failed: %08lx\n", hres); ok(protocol != NULL, "protocol == NULL\n");
hres = IInternetProtocol_QueryInterface(protocol, &IID_IInternetBindInfo, (void**)&prot_bind_info); - ok(hres == S_OK, "QueryInterface(IID_IInternetBindInfo) failed: %08x\n", hres); + ok(hres == S_OK, "QueryInterface(IID_IInternetBindInfo) failed: %08lx\n", hres);
hres = IInternetProtocol_QueryInterface(protocol, &IID_IInternetProtocolSink, (void**)&binding_sink); - ok(hres == S_OK, "Could not get IInternetProtocolSink: %08x\n", hres); + ok(hres == S_OK, "Could not get IInternetProtocolSink: %08lx\n", hres);
hres = IInternetProtocol_Start(protocol, test_url, NULL, &bind_info, 0, 0); - ok(hres == E_INVALIDARG, "Start failed: %08x, expected E_INVALIDARG\n", hres); + ok(hres == E_INVALIDARG, "Start failed: %08lx, expected E_INVALIDARG\n", hres); hres = IInternetProtocol_Start(protocol, test_url, &protocol_sink, NULL, 0, 0); - ok(hres == E_INVALIDARG, "Start failed: %08x, expected E_INVALIDARG\n", hres); + ok(hres == E_INVALIDARG, "Start failed: %08lx, expected E_INVALIDARG\n", hres); hres = IInternetProtocol_Start(protocol, NULL, &protocol_sink, &bind_info, 0, 0); - ok(hres == E_INVALIDARG, "Start failed: %08x, expected E_INVALIDARG\n", hres); + ok(hres == E_INVALIDARG, "Start failed: %08lx, expected E_INVALIDARG\n", hres);
hres = IInternetProtocol_QueryInterface(protocol, &IID_IInternetPriority, (void**)&priority); - ok(hres == S_OK, "QueryInterface(IID_IInternetPriority) failed: %08x\n", hres); + ok(hres == S_OK, "QueryInterface(IID_IInternetPriority) failed: %08lx\n", hres);
p = 0xdeadbeef; hres = IInternetPriority_GetPriority(priority, &p); - ok(hres == S_OK, "GetPriority failed: %08x\n", hres); - ok(!p, "p=%d\n", p); + ok(hres == S_OK, "GetPriority failed: %08lx\n", hres); + ok(!p, "p=%ld\n", p);
ex_priority = 100; hres = IInternetPriority_SetPriority(priority, 100); - ok(hres == S_OK, "SetPriority failed: %08x\n", hres); + ok(hres == S_OK, "SetPriority failed: %08lx\n", hres);
p = 0xdeadbeef; hres = IInternetPriority_GetPriority(priority, &p); - ok(hres == S_OK, "GetPriority failed: %08x\n", hres); - ok(p == 100, "p=%d\n", p); + ok(hres == S_OK, "GetPriority failed: %08lx\n", hres); + ok(p == 100, "p=%ld\n", p);
hres = IInternetProtocol_QueryInterface(protocol, &IID_IWinInetInfo, (void**)&inet_info); - ok(hres == E_NOINTERFACE, "Could not get IWinInetInfo protocol: %08x\n", hres); + ok(hres == E_NOINTERFACE, "Could not get IWinInetInfo protocol: %08lx\n", hres);
SET_EXPECT(QueryService_InternetProtocol);
@@ -3895,23 +3895,23 @@ static void test_CreateBinding(void) SET_EXPECT(ReportProgress_PROTOCOLCLASSID); SET_EXPECT(SetPriority);
- ok(obj_refcount(protocol) == 4, "wrong protocol refcount %d\n", obj_refcount(protocol)); + ok(obj_refcount(protocol) == 4, "wrong protocol refcount %ld\n", obj_refcount(protocol));
expect_hrResult = S_OK; hres = IInternetProtocol_Start(protocol, test_url, &protocol_sink, &bind_info, 0, 0); - ok(hres == S_OK, "Start failed: %08x\n", hres); + ok(hres == S_OK, "Start failed: %08lx\n", hres);
CHECK_CALLED(QueryService_InternetProtocol);
CHECK_CALLED(CreateInstance); if(no_aggregation) { CHECK_CALLED(CreateInstance_no_aggregation); - ok(obj_refcount(protocol) == 4, "wrong protocol refcount %d\n", obj_refcount(protocol)); - ok(protocol_emul->outer_ref == 0, "protocol_outer_ref = %u\n", protocol_emul->outer_ref); + ok(obj_refcount(protocol) == 4, "wrong protocol refcount %ld\n", obj_refcount(protocol)); + ok(protocol_emul->outer_ref == 0, "protocol_outer_ref = %lu\n", protocol_emul->outer_ref); }else { - ok(obj_refcount(protocol) == 5 || broken(obj_refcount(protocol) == 4) /* before win7 */, "wrong protocol refcount %d\n", + ok(obj_refcount(protocol) == 5 || broken(obj_refcount(protocol) == 4) /* before win7 */, "wrong protocol refcount %ld\n", obj_refcount(protocol)); - ok(protocol_emul->outer_ref == 1 || broken(protocol_emul->outer_ref == 0) /* before win7 */, "protocol_outer_ref = %u\n", + ok(protocol_emul->outer_ref == 1 || broken(protocol_emul->outer_ref == 0) /* before win7 */, "protocol_outer_ref = %lu\n", protocol_emul->outer_ref); }
@@ -3925,125 +3925,125 @@ static void test_CreateBinding(void) if(!no_aggregation) SET_EXPECT(QueryInterface_IWinInetInfo); hres = IInternetProtocol_QueryInterface(protocol, &IID_IWinInetInfo, (void**)&inet_info); - ok(hres == E_NOINTERFACE, "Could not get IWinInetInfo protocol: %08x\n", hres); + ok(hres == E_NOINTERFACE, "Could not get IWinInetInfo protocol: %08lx\n", hres); if(!no_aggregation) CHECK_CALLED(QueryInterface_IWinInetInfo);
if(!no_aggregation) SET_EXPECT(QueryInterface_IWinInetInfo); hres = IInternetProtocol_QueryInterface(protocol, &IID_IWinInetInfo, (void**)&inet_info); - ok(hres == E_NOINTERFACE, "Could not get IWinInetInfo protocol: %08x\n", hres); + ok(hres == E_NOINTERFACE, "Could not get IWinInetInfo protocol: %08lx\n", hres); if(!no_aggregation) CHECK_CALLED(QueryInterface_IWinInetInfo);
if(!no_aggregation) SET_EXPECT(QueryInterface_IWinInetHttpInfo); hres = IInternetProtocol_QueryInterface(protocol, &IID_IWinInetHttpInfo, (void**)&http_info); - ok(hres == E_NOINTERFACE, "Could not get IWinInetInfo protocol: %08x\n", hres); + ok(hres == E_NOINTERFACE, "Could not get IWinInetInfo protocol: %08lx\n", hres); if(!no_aggregation) CHECK_CALLED(QueryInterface_IWinInetHttpInfo);
SET_EXPECT(Read); read = 0xdeadbeef; hres = IInternetProtocol_Read(protocol, expect_pv = buf, sizeof(buf), &read); - ok(hres == S_OK, "Read failed: %08x\n", hres); - ok(read == 100, "read = %d\n", read); + ok(hres == S_OK, "Read failed: %08lx\n", hres); + ok(read == 100, "read = %ld\n", read); CHECK_CALLED(Read);
SET_EXPECT(Read); read = 0xdeadbeef; hres = IInternetProtocol_Read(protocol, expect_pv = buf, sizeof(buf), &read); - ok(hres == S_FALSE, "Read failed: %08x\n", hres); - ok(!read, "read = %d\n", read); + ok(hres == S_FALSE, "Read failed: %08lx\n", hres); + ok(!read, "read = %ld\n", read); CHECK_CALLED(Read);
p = 0xdeadbeef; hres = IInternetPriority_GetPriority(priority, &p); - ok(hres == S_OK, "GetPriority failed: %08x\n", hres); - ok(p == 100, "p=%d\n", p); + ok(hres == S_OK, "GetPriority failed: %08lx\n", hres); + ok(p == 100, "p=%ld\n", p);
hres = IInternetPriority_SetPriority(priority, 101); - ok(hres == S_OK, "SetPriority failed: %08x\n", hres); + ok(hres == S_OK, "SetPriority failed: %08lx\n", hres);
if(no_aggregation) { - ok(obj_refcount(protocol) == 4, "wrong protocol refcount %d\n", obj_refcount(protocol)); - ok(protocol_emul->outer_ref == 0, "protocol_outer_ref = %u\n", protocol_emul->outer_ref); + ok(obj_refcount(protocol) == 4, "wrong protocol refcount %ld\n", obj_refcount(protocol)); + ok(protocol_emul->outer_ref == 0, "protocol_outer_ref = %lu\n", protocol_emul->outer_ref); }else { - ok(obj_refcount(protocol) == 5 || broken(obj_refcount(protocol) == 4) /* before win7 */, "wrong protocol refcount %d\n", obj_refcount(protocol)); - ok(protocol_emul->outer_ref == 1 || broken(protocol_emul->outer_ref == 0) /* before win7 */, "protocol_outer_ref = %u\n", protocol_emul->outer_ref); + ok(obj_refcount(protocol) == 5 || broken(obj_refcount(protocol) == 4) /* before win7 */, "wrong protocol refcount %ld\n", obj_refcount(protocol)); + ok(protocol_emul->outer_ref == 1 || broken(protocol_emul->outer_ref == 0) /* before win7 */, "protocol_outer_ref = %lu\n", protocol_emul->outer_ref); }
SET_EXPECT(Terminate); hres = IInternetProtocol_Terminate(protocol, 0xdeadbeef); - ok(hres == S_OK, "Terminate failed: %08x\n", hres); + ok(hres == S_OK, "Terminate failed: %08lx\n", hres); CHECK_CALLED(Terminate);
- ok(obj_refcount(protocol) == 4, "wrong protocol refcount %d\n", obj_refcount(protocol)); - ok(protocol_emul->outer_ref == 0, "protocol_outer_ref = %u\n", protocol_emul->outer_ref); + ok(obj_refcount(protocol) == 4, "wrong protocol refcount %ld\n", obj_refcount(protocol)); + ok(protocol_emul->outer_ref == 0, "protocol_outer_ref = %lu\n", protocol_emul->outer_ref);
SET_EXPECT(Continue); hres = IInternetProtocolSink_Switch(binding_sink, &protocoldata); - ok(hres == S_OK, "Switch failed: %08x\n", hres); + ok(hres == S_OK, "Switch failed: %08lx\n", hres); CHECK_CALLED(Continue);
SET_EXPECT(Read); read = 0xdeadbeef; hres = IInternetProtocol_Read(protocol, expect_pv = buf, sizeof(buf), &read); if(no_aggregation) { - ok(hres == S_OK, "Read failed: %08x\n", hres); - ok(read == 100, "read = %d\n", read); + ok(hres == S_OK, "Read failed: %08lx\n", hres); + ok(read == 100, "read = %ld\n", read); CHECK_CALLED(Read); }else { todo_wine - ok(hres == E_ABORT, "Read failed: %08x\n", hres); + ok(hres == E_ABORT, "Read failed: %08lx\n", hres); todo_wine - ok(read == 0, "read = %d\n", read); + ok(read == 0, "read = %ld\n", read); todo_wine CHECK_NOT_CALLED(Read); }
hres = IInternetProtocolSink_ReportProgress(binding_sink, BINDSTATUS_CACHEFILENAMEAVAILABLE, expect_wsz = emptyW); - ok(hres == S_OK, "ReportProgress(BINDSTATUS_CACHEFILENAMEAVAILABLE) failed: %08x\n", hres); + ok(hres == S_OK, "ReportProgress(BINDSTATUS_CACHEFILENAMEAVAILABLE) failed: %08lx\n", hres);
hres = IInternetProtocolSink_ReportResult(binding_sink, S_OK, ERROR_SUCCESS, NULL); - ok(hres == E_FAIL, "ReportResult failed: %08x, expected E_FAIL\n", hres); + ok(hres == E_FAIL, "ReportResult failed: %08lx, expected E_FAIL\n", hres);
hres = IInternetProtocolSink_ReportData(binding_sink, 0, 0, 0); - ok(hres == S_OK, "ReportData failed: %08x\n", hres); + ok(hres == S_OK, "ReportData failed: %08lx\n", hres);
IInternetProtocolSink_Release(binding_sink); IInternetPriority_Release(priority); IInternetBindInfo_Release(prot_bind_info);
- ok(obj_refcount(protocol) == 1, "wrong protocol refcount %d\n", obj_refcount(protocol)); + ok(obj_refcount(protocol) == 1, "wrong protocol refcount %ld\n", obj_refcount(protocol));
SET_EXPECT(Protocol_destructor); IInternetProtocol_Release(protocol); CHECK_CALLED(Protocol_destructor);
hres = IInternetSession_CreateBinding(session, NULL, test_url, NULL, NULL, &protocol, 0); - ok(hres == S_OK, "CreateBinding failed: %08x\n", hres); + ok(hres == S_OK, "CreateBinding failed: %08lx\n", hres); ok(protocol != NULL, "protocol == NULL\n");
hres = IInternetProtocol_Abort(protocol, E_ABORT, 0); - ok(hres == S_OK, "Abort failed: %08x\n", hres); + ok(hres == S_OK, "Abort failed: %08lx\n", hres);
hres = IInternetProtocol_Abort(protocol, E_FAIL, 0); - ok(hres == S_OK, "Abort failed: %08x\n", hres); + ok(hres == S_OK, "Abort failed: %08lx\n", hres);
IInternetProtocol_Release(protocol);
hres = IInternetSession_UnregisterNameSpace(session, &ClassFactory, wsz_test); - ok(hres == S_OK, "UnregisterNameSpace failed: %08x\n", hres); + ok(hres == S_OK, "UnregisterNameSpace failed: %08lx\n", hres);
hres = IInternetSession_CreateBinding(session, NULL, test_url, NULL, NULL, &protocol, 0); - ok(hres == S_OK, "CreateBinding failed: %08x\n", hres); + ok(hres == S_OK, "CreateBinding failed: %08lx\n", hres); ok(protocol != NULL, "protocol == NULL\n");
SET_EXPECT(QueryService_InternetProtocol); hres = IInternetProtocol_Start(protocol, test_url, &protocol_sink, &bind_info, 0, 0); - ok(hres == MK_E_SYNTAX, "Start failed: %08x, expected MK_E_SYNTAX\n", hres); + ok(hres == MK_E_SYNTAX, "Start failed: %08lx, expected MK_E_SYNTAX\n", hres); CHECK_CALLED(QueryService_InternetProtocol);
IInternetProtocol_Release(protocol); @@ -4065,30 +4065,30 @@ static void test_binding(int prot, DWORD grf_pi, DWORD test_flags) init_test(prot, test_flags|TEST_BINDING);
hres = pCoInternetGetSession(0, &session, 0); - ok(hres == S_OK, "CoInternetGetSession failed: %08x\n", hres); + ok(hres == S_OK, "CoInternetGetSession failed: %08lx\n", hres);
if(test_flags & TEST_EMULATEPROT) { hres = IInternetSession_RegisterNameSpace(session, &ClassFactory, &IID_NULL, protocol_names[prot], 0, NULL, 0); - ok(hres == S_OK, "RegisterNameSpace failed: %08x\n", hres); + ok(hres == S_OK, "RegisterNameSpace failed: %08lx\n", hres); }
hres = IInternetSession_CreateBinding(session, NULL, binding_urls[prot], NULL, NULL, &protocol, 0); binding_protocol = protocol; - ok(hres == S_OK, "CreateBinding failed: %08x\n", hres); + ok(hres == S_OK, "CreateBinding failed: %08lx\n", hres); ok(protocol != NULL, "protocol == NULL\n");
hres = IInternetProtocol_QueryInterface(protocol, &IID_IInternetBindInfo, (void**)&prot_bind_info); - ok(hres == S_OK, "QueryInterface(IID_IInternetBindInfo) failed: %08x\n", hres); + ok(hres == S_OK, "QueryInterface(IID_IInternetBindInfo) failed: %08lx\n", hres);
hres = IInternetProtocol_QueryInterface(protocol, &IID_IInternetProtocolSink, (void**)&binding_sink); - ok(hres == S_OK, "QueryInterface(IID_IInternetProtocolSink) failed: %08x\n", hres); + ok(hres == S_OK, "QueryInterface(IID_IInternetProtocolSink) failed: %08lx\n", hres);
if(test_flags & TEST_USEIURI) { hres = IInternetProtocol_QueryInterface(protocol, &IID_IInternetProtocolEx, (void**)&protocolex); - ok(hres == S_OK, "Could not get IInternetProtocolEx iface: %08x\n", hres); + ok(hres == S_OK, "Could not get IInternetProtocolEx iface: %08lx\n", hres);
hres = pCreateUri(binding_urls[prot], Uri_CREATE_FILE_USE_DOS_PATH, 0, &uri); - ok(hres == S_OK, "CreateUri failed: %08x\n", hres); + ok(hres == S_OK, "CreateUri failed: %08lx\n", hres); }
ex_priority = 0; @@ -4105,10 +4105,10 @@ static void test_binding(int prot, DWORD grf_pi, DWORD test_flags)
if(protocolex) { hres = IInternetProtocolEx_StartEx(protocolex, uri, &protocol_sink, &bind_info, pi, 0); - ok(hres == S_OK, "StartEx failed: %08x\n", hres); + ok(hres == S_OK, "StartEx failed: %08lx\n", hres); }else { hres = IInternetProtocol_Start(protocol, binding_urls[prot], &protocol_sink, &bind_info, pi, 0); - ok(hres == S_OK, "Start failed: %08x\n", hres); + ok(hres == S_OK, "Start failed: %08lx\n", hres); }
CHECK_CALLED(QueryService_InternetProtocol); @@ -4140,11 +4140,11 @@ static void test_binding(int prot, DWORD grf_pi, DWORD test_flags) if(test_abort && prot_state == 2) { SET_EXPECT(Abort); hres = IInternetProtocol_Abort(protocol, E_ABORT, 0); - ok(hres == S_OK, "Abort failed: %08x\n", hres); + ok(hres == S_OK, "Abort failed: %08lx\n", hres); CHECK_CALLED(Abort);
hres = IInternetProtocol_Abort(protocol, E_ABORT, 0); - ok(hres == S_OK, "Abort failed: %08x\n", hres); + ok(hres == S_OK, "Abort failed: %08lx\n", hres); SetEvent(event_complete2); break; } @@ -4160,7 +4160,7 @@ static void test_binding(int prot, DWORD grf_pi, DWORD test_flags) else SET_EXPECT(LockRequest); hres = IInternetProtocol_LockRequest(protocol, 0); - ok(hres == S_OK, "LockRequest failed: %08x\n", hres); + ok(hres == S_OK, "LockRequest failed: %08lx\n", hres); if(mimefilter_test) CHECK_CALLED(MimeFilter_LockRequest); else @@ -4172,7 +4172,7 @@ static void test_binding(int prot, DWORD grf_pi, DWORD test_flags) else SET_EXPECT(UnlockRequest); hres = IInternetProtocol_UnlockRequest(protocol); - ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); + ok(hres == S_OK, "UnlockRequest failed: %08lx\n", hres); if(mimefilter_test) CHECK_CALLED(MimeFilter_UnlockRequest); else @@ -4184,7 +4184,7 @@ static void test_binding(int prot, DWORD grf_pi, DWORD test_flags) else SET_EXPECT(Terminate); hres = IInternetProtocol_Terminate(protocol, 0); - ok(hres == S_OK, "Terminate failed: %08x\n", hres); + ok(hres == S_OK, "Terminate failed: %08lx\n", hres); if(mimefilter_test) CLEAR_CALLED(MimeFilter_Terminate); else @@ -4197,12 +4197,12 @@ static void test_binding(int prot, DWORD grf_pi, DWORD test_flags)
SET_EXPECT(Protocol_destructor); ref = IInternetProtocol_Release(protocol); - ok(!ref, "ref=%u, expected 0\n", ref); + ok(!ref, "ref=%lu, expected 0\n", ref); CHECK_CALLED(Protocol_destructor);
if(test_flags & TEST_EMULATEPROT) { hres = IInternetSession_UnregisterNameSpace(session, &ClassFactory, protocol_names[prot]); - ok(hres == S_OK, "UnregisterNameSpace failed: %08x\n", hres); + ok(hres == S_OK, "UnregisterNameSpace failed: %08lx\n", hres); }
IInternetSession_Release(session); @@ -4245,18 +4245,18 @@ static void test_com_aggregation(const CLSID *clsid) HRESULT hres;
hres = CoGetClassObject(clsid, CLSCTX_INPROC_SERVER, NULL, &IID_IClassFactory, (void**)&class_factory); - ok(hres == S_OK, "CoGetClassObject failed: %08x\n", hres); + ok(hres == S_OK, "CoGetClassObject failed: %08lx\n", hres);
hres = IClassFactory_CreateInstance(class_factory, &outer, &IID_IUnknown, (void**)&unk); - ok(hres == S_OK, "CreateInstance returned: %08x\n", hres); + ok(hres == S_OK, "CreateInstance returned: %08lx\n", hres);
hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocol, (void**)&unk2); - ok(hres == S_OK, "Could not get IDispatch iface: %08x\n", hres); + ok(hres == S_OK, "Could not get IDispatch iface: %08lx\n", hres);
SET_EXPECT(outer_QI_test); hres = IUnknown_QueryInterface(unk2, &outer_test_iid, (void**)&unk3); CHECK_CALLED(outer_QI_test); - ok(hres == S_OK, "Could not get IInternetProtocol iface: %08x\n", hres); + ok(hres == S_OK, "Could not get IInternetProtocol iface: %08lx\n", hres); ok(unk3 == (IUnknown*)0xdeadbeef, "unexpected unk2\n");
IUnknown_Release(unk2); @@ -4264,7 +4264,7 @@ static void test_com_aggregation(const CLSID *clsid)
unk = (void*)0xdeadbeef; hres = IClassFactory_CreateInstance(class_factory, &outer, &IID_IInternetProtocol, (void**)&unk); - ok(hres == CLASS_E_NOAGGREGATION, "CreateInstance returned: %08x\n", hres); + ok(hres == CLASS_E_NOAGGREGATION, "CreateInstance returned: %08lx\n", hres); ok(!unk, "unk = %p\n", unk);
IClassFactory_Release(class_factory); diff --git a/dlls/urlmon/tests/sec_mgr.c b/dlls/urlmon/tests/sec_mgr.c index 4d61079ab83..2f1844ca8e8 100644 --- a/dlls/urlmon/tests/sec_mgr.c +++ b/dlls/urlmon/tests/sec_mgr.c @@ -291,11 +291,11 @@ static HRESULT WINAPI SecurityManager_ProcessUrlAction(IInternetSecurityManager* BYTE *pContext, DWORD cbContext, DWORD dwFlags, DWORD dwReserved) { CHECK_EXPECT(ProcessUrlAction); - ok(dwAction == URLACTION_FEATURE_ZONE_ELEVATION, "dwAction = %x\n", dwAction); - ok(cbPolicy == sizeof(DWORD), "cbPolicy = %d\n", cbPolicy); + ok(dwAction == URLACTION_FEATURE_ZONE_ELEVATION, "dwAction = %lx\n", dwAction); + ok(cbPolicy == sizeof(DWORD), "cbPolicy = %ld\n", cbPolicy); ok(!pContext, "pContext != NULL\n"); - ok(dwFlags == PUAF_NOUI, "dwFlags = %x\n", dwFlags); - ok(dwReserved == 0, "dwReserved = %x\n", dwReserved); + ok(dwFlags == PUAF_NOUI, "dwFlags = %lx\n", dwFlags); + ok(dwReserved == 0, "dwReserved = %lx\n", dwReserved);
*pPolicy = ProcessUrlAction_policy; return ProcessUrlAction_policy==URLPOLICY_ALLOW ? S_OK : S_FALSE; @@ -354,7 +354,7 @@ static void test_SecurityManager(void) trace("Testing security manager...\n");
hres = pCoInternetCreateSecurityManager(NULL, &secmgr, 0); - ok(hres == S_OK, "CoInternetCreateSecurityManager failed: %08x\n", hres); + ok(hres == S_OK, "CoInternetCreateSecurityManager failed: %08lx\n", hres); if(FAILED(hres)) return;
@@ -364,23 +364,23 @@ static void test_SecurityManager(void) &zone, 0); ok(hres == secmgr_tests[i].zone_hres /* IE <=6 */ || (FAILED(secmgr_tests[i].zone_hres) && hres == E_INVALIDARG), /* IE7 */ - "[%d] MapUrlToZone failed: %08x, expected %08x\n", + "[%d] MapUrlToZone failed: %08lx, expected %08lx\n", i, hres, secmgr_tests[i].zone_hres); if(SUCCEEDED(hres)) - ok(zone == secmgr_tests[i].zone, "[%d] zone=%d, expected %d\n", i, zone, + ok(zone == secmgr_tests[i].zone, "[%d] zone=%ld, expected %ld\n", i, zone, secmgr_tests[i].zone); else - ok(zone == secmgr_tests[i].zone || zone == -1, "[%d] zone=%d\n", i, zone); + ok(zone == secmgr_tests[i].zone || zone == -1, "[%d] zone=%ld\n", i, zone);
size = sizeof(buf); memset(buf, 0xf0, sizeof(buf)); hres = IInternetSecurityManager_GetSecurityId(secmgr, secmgr_tests[i].url, buf, &size, 0); ok(hres == secmgr_tests[i].secid_hres, - "[%d] GetSecurityId failed: %08x, expected %08x\n", + "[%d] GetSecurityId failed: %08lx, expected %08lx\n", i, hres, secmgr_tests[i].secid_hres); if(secmgr_tests[i].secid) { - ok(size == secmgr_tests[i].secid_size, "[%d] size=%d, expected %d\n", + ok(size == secmgr_tests[i].secid_size, "[%d] size=%ld, expected %ld\n", i, size, secmgr_tests[i].secid_size); ok(!memcmp(buf, secmgr_tests[i].secid, size), "[%d] wrong secid\n", i); } @@ -388,64 +388,64 @@ static void test_SecurityManager(void)
zone = 100; hres = IInternetSecurityManager_MapUrlToZone(secmgr, url10, &zone, 0); - ok(hres == S_OK, "MapUrlToZone failed: %08x, expected S_OK\n", hres); - ok(zone == 3, "zone=%d, expected 3\n", zone); + ok(hres == S_OK, "MapUrlToZone failed: %08lx, expected S_OK\n", hres); + ok(zone == 3, "zone=%ld, expected 3\n", zone);
/* win2k3 translates %20 into a space */ size = sizeof(buf); memset(buf, 0xf0, sizeof(buf)); hres = IInternetSecurityManager_GetSecurityId(secmgr, url10, buf, &size, 0); - ok(hres == S_OK, "GetSecurityId failed: %08x, expected S_OK\n", hres); + ok(hres == S_OK, "GetSecurityId failed: %08lx, expected S_OK\n", hres); ok(size == sizeof(secid10) || size == sizeof(secid10_2), /* win2k3 */ - "size=%d\n", size); + "size=%ld\n", size); ok(!memcmp(buf, secid10, sizeof(secid10)) || !memcmp(buf, secid10_2, sizeof(secid10_2)), /* win2k3 */ "wrong secid\n");
zone = 100; hres = IInternetSecurityManager_MapUrlToZone(secmgr, url13, &zone, 0); - ok(hres == S_OK, "MapUrlToZone failed: %08x\n", hres); - ok(zone == URLZONE_INVALID || broken(zone == URLZONE_INTERNET), "zone=%d\n", zone); + ok(hres == S_OK, "MapUrlToZone failed: %08lx\n", hres); + ok(zone == URLZONE_INVALID || broken(zone == URLZONE_INTERNET), "zone=%ld\n", zone);
size = sizeof(buf); memset(buf, 0xf0, sizeof(buf)); hres = IInternetSecurityManager_GetSecurityId(secmgr, url13, buf, &size, 0); - ok(hres == E_INVALIDARG || broken(hres == S_OK), "GetSecurityId failed: %08x\n", hres); + ok(hres == E_INVALIDARG || broken(hres == S_OK), "GetSecurityId failed: %08lx\n", hres);
zone = 100; hres = IInternetSecurityManager_MapUrlToZone(secmgr, url14, &zone, 0); - ok(hres == S_OK, "MapUrlToZone failed: %08x, expected S_OK\n", hres); - ok(zone == URLZONE_INTERNET, "zone=%d\n", zone); + ok(hres == S_OK, "MapUrlToZone failed: %08lx, expected S_OK\n", hres); + ok(zone == URLZONE_INTERNET, "zone=%ld\n", zone);
size = sizeof(buf); memset(buf, 0xf0, sizeof(buf)); hres = IInternetSecurityManager_GetSecurityId(secmgr, url14, buf, &size, 0); - ok(hres == S_OK, "GetSecurityId failed: %08x, expected S_OK\n", hres); - ok(size == sizeof(secid14), "size=%d\n", size); + ok(hres == S_OK, "GetSecurityId failed: %08lx, expected S_OK\n", hres); + ok(size == sizeof(secid14), "size=%ld\n", size); ok(!memcmp(buf, secid14, size), "wrong secid\n");
zone = 100; hres = IInternetSecurityManager_MapUrlToZone(secmgr, NULL, &zone, 0); - ok(hres == E_INVALIDARG, "MapUrlToZone failed: %08x, expected E_INVALIDARG\n", hres); - ok(zone == 100 || zone == -1, "zone=%d\n", zone); + ok(hres == E_INVALIDARG, "MapUrlToZone failed: %08lx, expected E_INVALIDARG\n", hres); + ok(zone == 100 || zone == -1, "zone=%ld\n", zone);
size = sizeof(buf); hres = IInternetSecurityManager_GetSecurityId(secmgr, NULL, buf, &size, 0); ok(hres == E_INVALIDARG, - "GetSecurityId failed: %08x, expected E_INVALIDARG\n", hres); + "GetSecurityId failed: %08lx, expected E_INVALIDARG\n", hres); hres = IInternetSecurityManager_GetSecurityId(secmgr, secmgr_tests[1].url, NULL, &size, 0); ok(hres == E_INVALIDARG, - "GetSecurityId failed: %08x, expected E_INVALIDARG\n", hres); + "GetSecurityId failed: %08lx, expected E_INVALIDARG\n", hres); hres = IInternetSecurityManager_GetSecurityId(secmgr, secmgr_tests[1].url, buf, NULL, 0); ok(hres == E_INVALIDARG, - "GetSecurityId failed: %08x, expected E_INVALIDARG\n", hres); + "GetSecurityId failed: %08lx, expected E_INVALIDARG\n", hres);
hres = IInternetSecurityManager_ProcessUrlAction(secmgr, NULL, URLACTION_SCRIPT_RUN, (BYTE*)&policy, sizeof(WCHAR), NULL, 0, 0, 0); - ok(hres == E_INVALIDARG, "ProcessUrlAction failed: %08x, expected E_INVALIDARG\n", hres); + ok(hres == E_INVALIDARG, "ProcessUrlAction failed: %08lx, expected E_INVALIDARG\n", hres);
IInternetSecurityManager_Release(secmgr); } @@ -508,23 +508,23 @@ static void test_url_action(IInternetSecurityManager *secmgr, IInternetZoneManag hres = IInternetSecurityManager_ProcessUrlAction(secmgr, url9, action, (BYTE*)&policy, sizeof(WCHAR), NULL, 0, 0, 0); ok(hres == E_FAIL || broken(hres == HRESULT_FROM_WIN32(ERROR_NOT_FOUND)), - "(0x%x) got 0x%x (expected E_FAIL)\n", action, hres); - ok(policy == 0xdeadbeef, "(%x) policy=%x\n", action, policy); + "(0x%lx) got 0x%lx (expected E_FAIL)\n", action, hres); + ok(policy == 0xdeadbeef, "(%lx) policy=%lx\n", action, policy);
policy = 0xdeadbeef; hres = IInternetZoneManager_GetZoneActionPolicy(zonemgr, 3, action, (BYTE*)&policy, sizeof(DWORD), URLZONEREG_DEFAULT); ok(hres == E_FAIL || broken(hres == HRESULT_FROM_WIN32(ERROR_NOT_FOUND)), - "(0x%x) got 0x%x (expected E_FAIL)\n", action, hres); - ok(policy == 0xdeadbeef, "(%x) policy=%x\n", action, policy); + "(0x%lx) got 0x%lx (expected E_FAIL)\n", action, hres); + ok(policy == 0xdeadbeef, "(%lx) policy=%lx\n", action, policy); return; }
policy = 0xdeadbeef; hres = IInternetZoneManager_GetZoneActionPolicy(zonemgr, 3, action, (BYTE*)&policy, sizeof(DWORD), URLZONEREG_DEFAULT); - ok(hres == S_OK, "GetZoneActionPolicy failed: %08x\n", hres); - ok(policy == reg_policy, "(%x) policy=%x, expected %x\n", action, policy, reg_policy); + ok(hres == S_OK, "GetZoneActionPolicy failed: %08lx\n", hres); + ok(policy == reg_policy, "(%lx) policy=%lx, expected %lx\n", action, policy, reg_policy);
if(policy != URLPOLICY_QUERY) { if(winetest_interactive || ! is_ie_hardened()) { @@ -534,37 +534,37 @@ static void test_url_action(IInternetSecurityManager *secmgr, IInternetZoneManag hres = IInternetSecurityManager_ProcessUrlAction(secmgr, url9, action, (BYTE*)&policy, sizeof(WCHAR), NULL, 0, 0, 0); if(reg_policy == URLPOLICY_DISALLOW) - ok(hres == S_FALSE, "ProcessUrlAction(%x) failed: %08x, expected S_FALSE\n", action, hres); + ok(hres == S_FALSE, "ProcessUrlAction(%lx) failed: %08lx, expected S_FALSE\n", action, hres); else - ok(hres == S_OK, "ProcessUrlAction(%x) failed: %08x\n", action, hres); - ok(policy == 0xdeadbeef, "(%x) policy=%x\n", action, policy); + ok(hres == S_OK, "ProcessUrlAction(%lx) failed: %08lx\n", action, hres); + ok(policy == 0xdeadbeef, "(%lx) policy=%lx\n", action, policy);
policy = 0xdeadbeef; hres = IInternetSecurityManager_ProcessUrlAction(secmgr, url9, action, (BYTE*)&policy, 2, NULL, 0, 0, 0); if(reg_policy == URLPOLICY_DISALLOW) - ok(hres == S_FALSE, "ProcessUrlAction(%x) failed: %08x, expected S_FALSE\n", action, hres); + ok(hres == S_FALSE, "ProcessUrlAction(%lx) failed: %08lx, expected S_FALSE\n", action, hres); else - ok(hres == S_OK, "ProcessUrlAction(%x) failed: %08x\n", action, hres); - ok(policy == 0xdeadbeef, "(%x) policy=%x\n", action, policy); + ok(hres == S_OK, "ProcessUrlAction(%lx) failed: %08lx\n", action, hres); + ok(policy == 0xdeadbeef, "(%lx) policy=%lx\n", action, policy);
policy = 0xdeadbeef; hres = IInternetSecurityManager_ProcessUrlAction(secmgr, url9, action, (BYTE*)&policy, sizeof(DWORD), NULL, 0, 0, 0); if(reg_policy == URLPOLICY_DISALLOW) - ok(hres == S_FALSE, "ProcessUrlAction(%x) failed: %08x, expected S_FALSE\n", action, hres); + ok(hres == S_FALSE, "ProcessUrlAction(%lx) failed: %08lx, expected S_FALSE\n", action, hres); else - ok(hres == S_OK, "ProcessUrlAction(%x) failed: %08x\n", action, hres); - ok(policy == reg_policy, "(%x) policy=%x\n", action, policy); + ok(hres == S_OK, "ProcessUrlAction(%lx) failed: %08lx\n", action, hres); + ok(policy == reg_policy, "(%lx) policy=%lx\n", action, policy);
policy = 0xdeadbeef; hres = IInternetSecurityManager_ProcessUrlAction(secmgr, url9, action, (BYTE*)&policy, sizeof(WCHAR), (BYTE*)0xdeadbeef, 16, 0, 0); if(reg_policy == URLPOLICY_DISALLOW) - ok(hres == S_FALSE, "ProcessUrlAction(%x) failed: %08x, expected S_FALSE\n", action, hres); + ok(hres == S_FALSE, "ProcessUrlAction(%lx) failed: %08lx, expected S_FALSE\n", action, hres); else - ok(hres == S_OK, "ProcessUrlAction(%x) failed: %08x\n", action, hres); - ok(policy == 0xdeadbeef, "(%x) policy=%x\n", action, policy); + ok(hres == S_OK, "ProcessUrlAction(%lx) failed: %08lx\n", action, hres); + ok(policy == 0xdeadbeef, "(%lx) policy=%lx\n", action, policy);
policy = 0xdeadbeef; if(expect_parse_call) @@ -574,10 +574,10 @@ static void test_url_action(IInternetSecurityManager *secmgr, IInternetZoneManag if(expect_parse_call) CHECK_CALLED(ParseUrl_SECURITY_URL_http); if(reg_policy == URLPOLICY_DISALLOW) - ok(hres == S_FALSE, "ProcessUrlAction(%x) failed: %08x, expected S_FALSE\n", action, hres); + ok(hres == S_FALSE, "ProcessUrlAction(%lx) failed: %08lx, expected S_FALSE\n", action, hres); else - ok(hres == S_OK, "ProcessUrlAction(%x) failed: %08x\n", action, hres); - ok(policy == reg_policy, "(%x) policy=%x\n", action, policy); + ok(hres == S_OK, "ProcessUrlAction(%lx) failed: %08lx\n", action, hres); + ok(policy == reg_policy, "(%lx) policy=%lx\n", action, policy); }else { skip("IE running in Enhanced Security Configuration\n"); } @@ -592,19 +592,19 @@ static void test_special_url_action(IInternetSecurityManager *secmgr, IInternetZ policy = 0xdeadbeef; hres = IInternetZoneManager_GetZoneActionPolicy(zonemgr, 3, action, (BYTE*)&policy, sizeof(DWORD), URLZONEREG_DEFAULT); - ok(hres == S_OK, "GetZoneActionPolicy failed: %08x\n", hres); - ok(policy == URLPOLICY_DISALLOW, "(%x) policy=%x, expected URLPOLICY_DISALLOW\n", action, policy); + ok(hres == S_OK, "GetZoneActionPolicy failed: %08lx\n", hres); + ok(policy == URLPOLICY_DISALLOW, "(%lx) policy=%lx, expected URLPOLICY_DISALLOW\n", action, policy);
policy = 0xdeadbeef; hres = IInternetSecurityManager_ProcessUrlAction(secmgr, url1, action, (BYTE*)&policy, sizeof(WCHAR), NULL, 0, 0, 0); - ok(hres == S_FALSE, "ProcessUrlAction(%x) failed: %08x, expected S_FALSE\n", action, hres); + ok(hres == S_FALSE, "ProcessUrlAction(%lx) failed: %08lx, expected S_FALSE\n", action, hres);
policy = 0xdeadbeef; hres = IInternetSecurityManager_ProcessUrlAction(secmgr, url1, action, (BYTE*)&policy, sizeof(DWORD), NULL, 0, 0, 0); - ok(hres == S_FALSE, "ProcessUrlAction(%x) failed: %08x, expected S_FALSE\n", action, hres); - ok(policy == URLPOLICY_DISALLOW, "policy = %x\n", policy); + ok(hres == S_FALSE, "ProcessUrlAction(%lx) failed: %08lx, expected S_FALSE\n", action, hres); + ok(policy == URLPOLICY_DISALLOW, "policy = %lx\n", policy); }
static void test_activex(IInternetSecurityManager *secmgr) @@ -617,15 +617,15 @@ static void test_activex(IInternetSecurityManager *secmgr) policy = 0xdeadbeef; hres = IInternetSecurityManager_ProcessUrlAction(secmgr, url1, URLACTION_ACTIVEX_RUN, (BYTE*)&policy, sizeof(DWORD), (BYTE*)&CLSID_TestActiveX, sizeof(CLSID), 0, 0); - ok(hres == S_OK, "ProcessUrlAction(URLACTION_ACTIVEX_RUN) failed: %08x\n", hres); - ok(policy == URLPOLICY_ALLOW || policy == URLPOLICY_DISALLOW, "policy = %x\n", policy); + ok(hres == S_OK, "ProcessUrlAction(URLACTION_ACTIVEX_RUN) failed: %08lx\n", hres); + ok(policy == URLPOLICY_ALLOW || policy == URLPOLICY_DISALLOW, "policy = %lx\n", policy);
cs.clsid = CLSID_TestActiveX; cs.pUnk = (IUnknown*)0xdeadbeef; cs.dwFlags = 0; hres = IInternetSecurityManager_QueryCustomPolicy(secmgr, url1, &GUID_CUSTOM_CONFIRMOBJECTSAFETY, &ppolicy, &policy_size, (BYTE*)&cs, sizeof(cs), 0); - ok(hres == HRESULT_FROM_WIN32(ERROR_NOT_FOUND), "QueryCusromPolicy failed: %08x\n", hres); + ok(hres == HRESULT_FROM_WIN32(ERROR_NOT_FOUND), "QueryCusromPolicy failed: %08lx\n", hres); }
static void test_polices(void) @@ -637,9 +637,9 @@ static void test_polices(void) trace("testing polices...\n");
hres = pCoInternetCreateSecurityManager(NULL, &secmgr, 0); - ok(hres == S_OK, "CoInternetCreateSecurityManager failed: %08x\n", hres); + ok(hres == S_OK, "CoInternetCreateSecurityManager failed: %08lx\n", hres); hres = pCoInternetCreateZoneManager(NULL, &zonemgr, 0); - ok(hres == S_OK, "CoInternetCreateZoneManager failed: %08x\n", hres); + ok(hres == S_OK, "CoInternetCreateZoneManager failed: %08lx\n", hres);
test_url_action(secmgr, zonemgr, URLACTION_SCRIPT_RUN); test_url_action(secmgr, zonemgr, URLACTION_ACTIVEX_RUN); @@ -671,12 +671,12 @@ static void test_zone_domain_cache(void) 'd','o','m','a','i','n','/',0};
res = RegOpenKeyA(HKEY_CURRENT_USER, szZoneMapDomainsKey, &domains); - ok(res == ERROR_SUCCESS, "RegOpenKey failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegOpenKey failed: %ld\n", res); if(res != ERROR_SUCCESS) return;
res = RegCreateKeyA(domains, "testing.domain", &domain); - ok(res == ERROR_SUCCESS, "RegCreateKey failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegCreateKey failed: %ld\n", res); if(res != ERROR_SUCCESS) { RegCloseKey(domains); return; @@ -684,21 +684,21 @@ static void test_zone_domain_cache(void)
zone = URLZONE_CUSTOM; res = RegSetValueExA(domain, "http", 0, REG_DWORD, (BYTE*)&zone, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "RegSetValueEx failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegSetValueEx failed: %ld\n", res);
RegCloseKey(domain);
hres = pCoInternetCreateSecurityManager(NULL, &secmgr, 0); - ok(hres == S_OK, "CoInternetCreateSecurityManager failed: %08x\n", hres); + ok(hres == S_OK, "CoInternetCreateSecurityManager failed: %08lx\n", hres);
zone = URLZONE_INVALID; hres = IInternetSecurityManager_MapUrlToZone(secmgr, testing_domain_urlW, &zone, 0); - ok(hres == S_OK, "MapUrlToZone failed: %08x\n", hres); - todo_wine ok(zone == URLZONE_INTERNET, "Got %d, expected URLZONE_INTERNET\n", zone); + ok(hres == S_OK, "MapUrlToZone failed: %08lx\n", hres); + todo_wine ok(zone == URLZONE_INTERNET, "Got %ld, expected URLZONE_INTERNET\n", zone);
/* FIXME: Play nice with ZoneMaps that existed before the test is run. */ res = RegDeleteKeyA(domains, "testing.domain"); - ok(res == ERROR_SUCCESS, "RegDeleteKey failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegDeleteKey failed: %ld\n", res);
RegCloseKey(domains); IInternetSecurityManager_Release(secmgr); @@ -738,7 +738,7 @@ static BOOL register_zone_domains(void)
/* Some Windows versions don't seem to have a "Domains" key in their HKLM. */ res = RegOpenKeyA(HKEY_LOCAL_MACHINE, szZoneMapDomainsKey, &domains); - ok(res == ERROR_SUCCESS || broken(res == ERROR_FILE_NOT_FOUND), "RegOpenKey failed: %d\n", res); + ok(res == ERROR_SUCCESS || broken(res == ERROR_FILE_NOT_FOUND), "RegOpenKey failed: %ld\n", res); if(res == ERROR_SUCCESS) { HKEY domain; DWORD zone = URLZONE_CUSTOM; @@ -750,37 +750,37 @@ static BOOL register_zone_domains(void) RegCloseKey(domains); return FALSE; } - ok(res == ERROR_SUCCESS, "RegCreateKey failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegCreateKey failed: %ld\n", res);
res = RegSetValueExA(domain, "http", 0, REG_DWORD, (BYTE*)&zone, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "RegSetValueEx failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegSetValueEx failed: %ld\n", res);
RegCloseKey(domain); RegCloseKey(domains); }
res = RegOpenKeyA(HKEY_CURRENT_USER, szZoneMapDomainsKey, &domains); - ok(res == ERROR_SUCCESS, "RegOpenKey failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegOpenKey failed: %ld\n", res);
for(i = 0; i < ARRAY_SIZE(zone_domain_mappings); ++i) { const zone_domain_mapping *test = zone_domain_mappings+i; HKEY domain;
res = RegCreateKeyA(domains, test->domain, &domain); - ok(res == ERROR_SUCCESS, "RegCreateKey failed with %d on test %d\n", res, i); + ok(res == ERROR_SUCCESS, "RegCreateKey failed with %ld on test %ld\n", res, i);
/* Only set the value if there's no subdomain. */ if(!test->subdomain) { res = RegSetValueExA(domain, test->scheme, 0, REG_DWORD, (BYTE*)&test->zone, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "RegSetValueEx failed with %d on test %d\n", res, i); + ok(res == ERROR_SUCCESS, "RegSetValueEx failed with %ld on test %ld\n", res, i); } else { HKEY subdomain;
res = RegCreateKeyA(domain, test->subdomain, &subdomain); - ok(res == ERROR_SUCCESS, "RegCreateKey failed with %d on test %d\n", res, i); + ok(res == ERROR_SUCCESS, "RegCreateKey failed with %ld on test %ld\n", res, i);
res = RegSetValueExA(subdomain, test->scheme, 0, REG_DWORD, (BYTE*)&test->zone, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "RegSetValueEx failed with %d on test %d\n", res, i); + ok(res == ERROR_SUCCESS, "RegSetValueEx failed with %ld on test %ld\n", res, i);
RegCloseKey(subdomain); } @@ -798,14 +798,14 @@ static void unregister_zone_domains(void) DWORD res, i;
res = RegOpenKeyA(HKEY_LOCAL_MACHINE, szZoneMapDomainsKey, &domains); - ok(res == ERROR_SUCCESS || broken(res == ERROR_FILE_NOT_FOUND), "RegOpenKey failed: %d\n", res); + ok(res == ERROR_SUCCESS || broken(res == ERROR_FILE_NOT_FOUND), "RegOpenKey failed: %ld\n", res); if(res == ERROR_SUCCESS) { RegDeleteKeyA(domains, "local.machine"); RegCloseKey(domains); }
res = RegOpenKeyA(HKEY_CURRENT_USER, szZoneMapDomainsKey, &domains); - ok(res == ERROR_SUCCESS, "RegOpenKey failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegOpenKey failed: %ld\n", res);
for(i = 0; i < ARRAY_SIZE(zone_domain_mappings); ++i) { const zone_domain_mapping *test = zone_domain_mappings+i; @@ -844,7 +844,7 @@ static void run_child_process(void) winetest_get_mainargs(&argv); sprintf(cmdline, ""%s" %s domain_tests", argv[0], argv[1]); ret = CreateProcessA(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "Failed to spawn child process: %u\n", GetLastError()); + ok(ret, "Failed to spawn child process: %lu\n", GetLastError()); wait_child_process(pi.hProcess); CloseHandle(pi.hThread); CloseHandle(pi.hProcess); @@ -899,7 +899,7 @@ static void test_zone_domain_mappings(void) trace("testing zone domain mappings...\n");
hres = pCoInternetCreateSecurityManager(NULL, &secmgr, 0); - ok(hres == S_OK, "CoInternetCreateSecurityManager failed: %08x\n", hres); + ok(hres == S_OK, "CoInternetCreateSecurityManager failed: %08lx\n", hres);
res = RegOpenKeyA(HKEY_LOCAL_MACHINE, szZoneMapDomainsKey, &domains); if(res == ERROR_SUCCESS) { @@ -907,8 +907,8 @@ static void test_zone_domain_mappings(void) '.','m','a','c','h','i','n','e','/',0};
hres = IInternetSecurityManager_MapUrlToZone(secmgr, local_machineW, &zone, 0); - ok(hres == S_OK, "MapUrlToZone failed: %08x\n", hres); - ok(zone == URLZONE_CUSTOM, "Expected URLZONE_CUSTOM, but got %d\n", zone); + ok(hres == S_OK, "MapUrlToZone failed: %08lx\n", hres); + ok(zone == URLZONE_CUSTOM, "Expected URLZONE_CUSTOM, but got %ld\n", zone);
RegCloseKey(domains); } @@ -918,10 +918,10 @@ static void test_zone_domain_mappings(void) zone = URLZONE_INVALID;
hres = IInternetSecurityManager_MapUrlToZone(secmgr, test->url, &zone, 0); - ok(hres == S_OK, "MapUrlToZone failed: %08x\n", hres); + ok(hres == S_OK, "MapUrlToZone failed: %08lx\n", hres); todo_wine_if (test->todo) ok(zone == test->zone || broken(test->broken_zone == zone), - "Expected %d, but got %d on test %d\n", test->zone, zone, i); + "Expected %ld, but got %ld on test %ld\n", test->zone, zone, i); }
IInternetSecurityManager_Release(secmgr); @@ -955,17 +955,17 @@ static void test_CoInternetCreateZoneManager(void) trace("simple zone manager tests...\n");
hr = pCoInternetCreateZoneManager(NULL, &zonemgr, 0); - ok(hr == S_OK, "CoInternetCreateZoneManager result: 0x%x\n", hr); + ok(hr == S_OK, "CoInternetCreateZoneManager result: 0x%lx\n", hr); if (FAILED(hr)) return;
hr = IInternetZoneManager_QueryInterface(zonemgr, &IID_IUnknown, (void **) &punk); - ok(SUCCEEDED(hr), "got 0x%x with %p (expected Success)\n", hr, punk); + ok(SUCCEEDED(hr), "got 0x%lx with %p (expected Success)\n", hr, punk); if (punk) IUnknown_Release(punk);
hr = IInternetZoneManager_QueryInterface(zonemgr, &IID_IInternetZoneManager, (void **) &punk); - ok(SUCCEEDED(hr), "got 0x%x with %p (expected Success)\n", hr, punk); + ok(SUCCEEDED(hr), "got 0x%lx with %p (expected Success)\n", hr, punk); if (punk) IUnknown_Release(punk);
@@ -976,7 +976,7 @@ static void test_CoInternetCreateZoneManager(void)
hr = IInternetZoneManager_QueryInterface(zonemgr, &IID_IInternetZoneManagerEx2, (void **) &punk); ok(hr == S_OK || broken(hr == E_NOINTERFACE /* some W2K3 */), - "got 0x%x (expected S_OK)\n", hr); + "got 0x%lx (expected S_OK)\n", hr); if (punk) IUnknown_Release(punk); else @@ -987,7 +987,7 @@ static void test_CoInternetCreateZoneManager(void) win_skip("InternetZoneManagerEx not supported\n");
hr = IInternetZoneManager_Release(zonemgr); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr);
}
@@ -1003,62 +1003,62 @@ static void test_CreateZoneEnumerator(void) trace("testing zone enumerator...\n");
hr = pCoInternetCreateZoneManager(NULL, &zonemgr, 0); - ok(hr == S_OK, "CoInternetCreateZoneManager result: 0x%x\n", hr); + ok(hr == S_OK, "CoInternetCreateZoneManager result: 0x%lx\n", hr); if (FAILED(hr)) return;
dwEnum=0xdeadbeef; hr = IInternetZoneManager_CreateZoneEnumerator(zonemgr, &dwEnum, NULL, 0); ok((hr == E_INVALIDARG) && (dwEnum == 0xdeadbeef), - "got 0x%x with 0x%x (expected E_INVALIDARG with 0xdeadbeef)\n", hr, dwEnum); + "got 0x%lx with 0x%lx (expected E_INVALIDARG with 0xdeadbeef)\n", hr, dwEnum);
dwCount=0xdeadbeef; hr = IInternetZoneManager_CreateZoneEnumerator(zonemgr, NULL, &dwCount, 0); ok((hr == E_INVALIDARG) && (dwCount == 0xdeadbeef), - "got 0x%x and 0x%x (expected E_INVALIDARG and 0xdeadbeef)\n", hr, dwCount); + "got 0x%lx and 0x%lx (expected E_INVALIDARG and 0xdeadbeef)\n", hr, dwCount);
dwEnum=0xdeadbeef; dwCount=0xdeadbeef; hr = IInternetZoneManager_CreateZoneEnumerator(zonemgr, &dwEnum, &dwCount, 0xffffffff); ok((hr == E_INVALIDARG) && (dwEnum == 0xdeadbeef) && (dwCount == 0xdeadbeef), - "got 0x%x with 0x%x and 0x%x (expected E_INVALIDARG with 0xdeadbeef and 0xdeadbeef)\n", + "got 0x%lx with 0x%lx and 0x%lx (expected E_INVALIDARG with 0xdeadbeef and 0xdeadbeef)\n", hr, dwEnum, dwCount);
dwEnum=0xdeadbeef; dwCount=0xdeadbeef; hr = IInternetZoneManager_CreateZoneEnumerator(zonemgr, &dwEnum, &dwCount, 1); ok((hr == E_INVALIDARG) && (dwEnum == 0xdeadbeef) && (dwCount == 0xdeadbeef), - "got 0x%x with 0x%x and 0x%x (expected E_INVALIDARG with 0xdeadbeef and 0xdeadbeef)\n", + "got 0x%lx with 0x%lx and 0x%lx (expected E_INVALIDARG with 0xdeadbeef and 0xdeadbeef)\n", hr, dwEnum, dwCount);
dwEnum=0xdeadbeef; dwCount=0xdeadbeef; /* Normal use */ hr = IInternetZoneManager_CreateZoneEnumerator(zonemgr, &dwEnum, &dwCount, 0); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr);
if (SUCCEEDED(hr)) { dwEnum2=0xdeadbeef; dwCount2=0xdeadbeef; hr = IInternetZoneManager_CreateZoneEnumerator(zonemgr, &dwEnum2, &dwCount2, 0); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr); if (SUCCEEDED(hr)) { /* native urlmon has an incrementing counter for dwEnum */ hr = IInternetZoneManager_DestroyZoneEnumerator(zonemgr, dwEnum2); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr); }
hr = IInternetZoneManager_DestroyZoneEnumerator(zonemgr, dwEnum); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr);
/* Destroy the Enumerator twice is detected and handled in native urlmon */ hr = IInternetZoneManager_DestroyZoneEnumerator(zonemgr, dwEnum); - ok((hr == E_INVALIDARG), "got 0x%x (expected E_INVALIDARG)\n", hr); + ok((hr == E_INVALIDARG), "got 0x%lx (expected E_INVALIDARG)\n", hr); }
/* ::Release succeed also, when a ::DestroyZoneEnumerator is missing */ hr = IInternetZoneManager_Release(zonemgr); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr); }
static void test_GetZoneActionPolicy(void) @@ -1071,35 +1071,35 @@ static void test_GetZoneActionPolicy(void) trace("testing GetZoneActionPolixy...\n");
hres = pCoInternetCreateZoneManager(NULL, &zonemgr, 0); - ok(hres == S_OK, "CoInternetCreateZoneManager failed: %08x\n", hres); + ok(hres == S_OK, "CoInternetCreateZoneManager failed: %08lx\n", hres); if(FAILED(hres)) return;
hres = IInternetZoneManager_GetZoneActionPolicy(zonemgr, 3, action, buf, sizeof(DWORD), URLZONEREG_DEFAULT); - ok(hres == S_OK, "GetZoneActionPolicy failed: %08x\n", hres); + ok(hres == S_OK, "GetZoneActionPolicy failed: %08lx\n", hres); ok(*(DWORD*)buf == URLPOLICY_CREDENTIALS_SILENT_LOGON_OK || *(DWORD*)buf == URLPOLICY_CREDENTIALS_MUST_PROMPT_USER || *(DWORD*)buf == URLPOLICY_CREDENTIALS_CONDITIONAL_PROMPT || *(DWORD*)buf == URLPOLICY_CREDENTIALS_ANONYMOUS_ONLY, - "unexpected policy=%d\n", *(DWORD*)buf); + "unexpected policy=%ld\n", *(DWORD*)buf);
hres = IInternetZoneManager_GetZoneActionPolicy(zonemgr, 3, action, NULL, sizeof(DWORD), URLZONEREG_DEFAULT); - ok(hres == E_INVALIDARG, "GetZoneActionPolicy failed: %08x, expected E_INVALIDARG\n", hres); + ok(hres == E_INVALIDARG, "GetZoneActionPolicy failed: %08lx, expected E_INVALIDARG\n", hres);
hres = IInternetZoneManager_GetZoneActionPolicy(zonemgr, 3, action, buf, 2, URLZONEREG_DEFAULT); - ok(hres == E_INVALIDARG, "GetZoneActionPolicy failed: %08x, expected E_INVALIDARG\n", hres); + ok(hres == E_INVALIDARG, "GetZoneActionPolicy failed: %08lx, expected E_INVALIDARG\n", hres);
hres = IInternetZoneManager_GetZoneActionPolicy(zonemgr, 3, 0x1fff, buf, sizeof(DWORD), URLZONEREG_DEFAULT); ok(hres == E_FAIL || broken(hres == HRESULT_FROM_WIN32(ERROR_NOT_FOUND)), - "(0x%x) got 0x%x (expected E_FAIL)\n", action, hres); + "(0x%lx) got 0x%lx (expected E_FAIL)\n", action, hres);
hres = IInternetZoneManager_GetZoneActionPolicy(zonemgr, 13, action, buf, sizeof(DWORD), URLZONEREG_DEFAULT); - ok(hres == E_INVALIDARG, "GetZoneActionPolicy failed: %08x, expected E_INVALIDARG\n", hres); + ok(hres == E_INVALIDARG, "GetZoneActionPolicy failed: %08lx, expected E_INVALIDARG\n", hres);
IInternetZoneManager_Release(zonemgr); } @@ -1116,7 +1116,7 @@ static void test_GetZoneAt(void) trace("testing GetZoneAt...\n");
hr = pCoInternetCreateZoneManager(NULL, &zonemgr, 0); - ok(hr == S_OK, "CoInternetCreateZoneManager result: 0x%x\n", hr); + ok(hr == S_OK, "CoInternetCreateZoneManager result: 0x%lx\n", hr); if (FAILED(hr)) return;
@@ -1132,27 +1132,27 @@ static void test_GetZoneAt(void) dwZone = 0xdeadbeef; hr = IInternetZoneManager_GetZoneAt(zonemgr, 0xdeadbeef, 0, &dwZone); ok(hr == E_INVALIDARG, - "got 0x%x with 0x%x (expected E_INVALIDARG)\n", hr, dwZone); + "got 0x%lx with 0x%lx (expected E_INVALIDARG)\n", hr, dwZone);
for (i = 0; i < dwCount; i++) { dwZone = 0xdeadbeef; hr = IInternetZoneManager_GetZoneAt(zonemgr, dwEnum, i, &dwZone); - ok(hr == S_OK, "#%d: got x%x with %d (expected S_OK)\n", i, hr, dwZone); + ok(hr == S_OK, "#%ld: got x%lx with %ld (expected S_OK)\n", i, hr, dwZone); }
dwZone = 0xdeadbeef; /* MSDN (index .. must be .. less than or equal to) is wrong */ hr = IInternetZoneManager_GetZoneAt(zonemgr, dwEnum, dwCount, &dwZone); ok(hr == E_INVALIDARG, - "got 0x%x with 0x%x (expected E_INVALIDARG)\n", hr, dwZone); + "got 0x%lx with 0x%lx (expected E_INVALIDARG)\n", hr, dwZone);
hr = IInternetZoneManager_DestroyZoneEnumerator(zonemgr, dwEnum); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr);
cleanup: hr = IInternetZoneManager_Release(zonemgr); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr); }
static void test_GetZoneAttributes(void) @@ -1166,7 +1166,7 @@ static void test_GetZoneAttributes(void) trace("testing GetZoneAttributes...\n");
hr = pCoInternetCreateZoneManager(NULL, &zonemgr, 0); - ok(hr == S_OK, "CoInternetCreateZoneManager result: 0x%x\n", hr); + ok(hr == S_OK, "CoInternetCreateZoneManager result: 0x%lx\n", hr); if (FAILED(hr)) return;
@@ -1174,41 +1174,41 @@ static void test_GetZoneAttributes(void) for (i = 0; i < 5; i++) { memset(buffer, -1, sizeof(buffer)); hr = IInternetZoneManager_GetZoneAttributes(zonemgr, i, pZA); - ok(hr == S_OK, "#%d: got 0x%x (expected S_OK)\n", i, hr); + ok(hr == S_OK, "#%ld: got 0x%lx (expected S_OK)\n", i, hr); }
/* IE8 no longer set cbSize */ memset(buffer, -1, sizeof(buffer)); pZA->cbSize = 0; hr = IInternetZoneManager_GetZoneAttributes(zonemgr, 0, pZA); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr); ok((pZA->cbSize == 0) || (pZA->cbSize == sizeof(ZONEATTRIBUTES)), - "got cbSize = %d (expected 0)\n", pZA->cbSize); + "got cbSize = %ld (expected 0)\n", pZA->cbSize);
memset(buffer, -1, sizeof(buffer)); pZA->cbSize = 64; hr = IInternetZoneManager_GetZoneAttributes(zonemgr, 0, pZA); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr); ok((pZA->cbSize == 64) || (pZA->cbSize == sizeof(ZONEATTRIBUTES)), - "got cbSize = %d (expected 64)\n", pZA->cbSize); + "got cbSize = %ld (expected 64)\n", pZA->cbSize);
memset(buffer, -1, sizeof(buffer)); hr = IInternetZoneManager_GetZoneAttributes(zonemgr, 0, pZA); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr); ok((pZA->cbSize == 0xffffffff) || (pZA->cbSize == sizeof(ZONEATTRIBUTES)), - "got cbSize = 0x%x (expected 0xffffffff)\n", pZA->cbSize); + "got cbSize = 0x%lx (expected 0xffffffff)\n", pZA->cbSize);
/* IE8 up to IE10 don't fail on invalid zones */ memset(buffer, -1, sizeof(buffer)); hr = IInternetZoneManager_GetZoneAttributes(zonemgr, 0xdeadbeef, pZA); ok(hr == S_OK || hr == E_FAIL || hr == E_POINTER, - "got 0x%x (expected S_OK or E_FAIL)\n", hr); + "got 0x%lx (expected S_OK or E_FAIL)\n", hr);
hr = IInternetZoneManager_GetZoneAttributes(zonemgr, 0, NULL); - ok(hr == E_INVALIDARG, "got 0x%x (expected E_INVALIDARG)\n", hr); + ok(hr == E_INVALIDARG, "got 0x%lx (expected E_INVALIDARG)\n", hr);
hr = IInternetZoneManager_Release(zonemgr); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr); }
static void test_SetZoneAttributes(void) @@ -1223,25 +1223,25 @@ static void test_SetZoneAttributes(void)
trace("testing SetZoneAttributes...\n"); hr = pCoInternetCreateZoneManager(NULL, &zonemgr, 0); - ok(hr == S_OK, "CoInternetCreateZoneManager result: 0x%x\n", hr); + ok(hr == S_OK, "CoInternetCreateZoneManager result: 0x%lx\n", hr); if (FAILED(hr)) return;
memset(buffer, -1, sizeof(buffer)); hr = IInternetZoneManager_GetZoneAttributes(zonemgr, URLZONE_LOCAL_MACHINE, pZA); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr);
sprintf(regpath, "%s\Zones\%d", szInternetSettingsKey, URLZONE_CUSTOM); res = RegCreateKeyA(HKEY_CURRENT_USER, regpath, &hkey); RegCloseKey(hkey);
- ok(res == ERROR_SUCCESS, "got %d (expected ERROR_SUCCESS)\n", res); + ok(res == ERROR_SUCCESS, "got %ld (expected ERROR_SUCCESS)\n", res); if (res != ERROR_SUCCESS) goto cleanup;
pZA->cbSize = sizeof(ZONEATTRIBUTES); hr = IInternetZoneManager_SetZoneAttributes(zonemgr, URLZONE_CUSTOM, NULL); - ok(hr == E_INVALIDARG, "got 0x%x (expected E_INVALIDARG)\n", hr); + ok(hr == E_INVALIDARG, "got 0x%lx (expected E_INVALIDARG)\n", hr);
/* normal use */ hr = IInternetZoneManager_SetZoneAttributes(zonemgr, URLZONE_CUSTOM, pZA); @@ -1249,20 +1249,20 @@ static void test_SetZoneAttributes(void) win_skip("SetZoneAttributes not supported: IE too old\n"); goto cleanup; } - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr);
/* native urlmon ignores cbSize */ pZA->cbSize = sizeof(ZONEATTRIBUTES) + sizeof(DWORD); hr = IInternetZoneManager_SetZoneAttributes(zonemgr, URLZONE_CUSTOM, pZA); - ok(hr == S_OK, "got 0x%x for sizeof(ZONEATTRIBUTES) + sizeof(DWORD) (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx for sizeof(ZONEATTRIBUTES) + sizeof(DWORD) (expected S_OK)\n", hr);
pZA->cbSize = sizeof(ZONEATTRIBUTES) - sizeof(DWORD); hr = IInternetZoneManager_SetZoneAttributes(zonemgr, URLZONE_CUSTOM, pZA); - ok(hr == S_OK, "got 0x%x for sizeof(ZONEATTRIBUTES) - sizeof(DWORD) (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx for sizeof(ZONEATTRIBUTES) - sizeof(DWORD) (expected S_OK)\n", hr);
pZA->cbSize = 0; hr = IInternetZoneManager_SetZoneAttributes(zonemgr, URLZONE_CUSTOM, pZA); - ok(hr == S_OK, "got 0x%x for size 0 (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx for size 0 (expected S_OK)\n", hr);
/* The key for the zone must be present, when calling SetZoneAttributes */ myRegDeleteTreeA(HKEY_CURRENT_USER, regpath); @@ -1270,12 +1270,12 @@ static void test_SetZoneAttributes(void) All newer IE return S_OK without saving the zone attributes to the registry. This is a Windows bug, but we have to accept that as standard */ hr = IInternetZoneManager_SetZoneAttributes(zonemgr, URLZONE_CUSTOM, pZA); - ok((hr == S_OK) || broken(hr == E_FAIL), "got 0x%x (expected S_OK)\n", hr); + ok((hr == S_OK) || broken(hr == E_FAIL), "got 0x%lx (expected S_OK)\n", hr);
/* SetZoneAttributes did not create the directory */ res = RegOpenKeyA(HKEY_CURRENT_USER, regpath, &hkey); ok((res == ERROR_FILE_NOT_FOUND) && (hkey == NULL), - "got %u with %p (expected ERROR_FILE_NOT_FOUND with NULL)\n", res, hkey); + "got %lu with %p (expected ERROR_FILE_NOT_FOUND with NULL)\n", res, hkey);
if (hkey) RegCloseKey(hkey);
@@ -1284,7 +1284,7 @@ cleanup: myRegDeleteTreeA(HKEY_CURRENT_USER, regpath);
hr = IInternetZoneManager_Release(zonemgr); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr); }
@@ -1298,20 +1298,20 @@ static void test_InternetSecurityMarshalling(void) trace("testing marshalling...\n");
hres = pCoInternetCreateSecurityManager(NULL, &secmgr, 0); - ok(hres == S_OK, "CoInternetCreateSecurityManager failed: %08x\n", hres); + ok(hres == S_OK, "CoInternetCreateSecurityManager failed: %08lx\n", hres); if(FAILED(hres)) return;
hres = IInternetSecurityManager_QueryInterface(secmgr, &IID_IUnknown, (void**)&unk); - ok(hres == S_OK, "QueryInterface returned: %08x\n", hres); + ok(hres == S_OK, "QueryInterface returned: %08lx\n", hres);
hres = CreateStreamOnHGlobal(NULL, TRUE, &stream); - ok(hres == S_OK, "CreateStreamOnHGlobal returned: %08x\n", hres); + ok(hres == S_OK, "CreateStreamOnHGlobal returned: %08lx\n", hres);
hres = CoMarshalInterface(stream, &IID_IInternetSecurityManager, unk, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); /* Not supported in W98 */ ok(hres == S_OK || broken(hres == REGDB_E_IIDNOTREG), - "CoMarshalInterface returned: %08x\n", hres); + "CoMarshalInterface returned: %08lx\n", hres);
IStream_Release(stream); IUnknown_Release(unk); @@ -1336,17 +1336,17 @@ static void test_InternetGetSecurityUrl(void)
for(i = 0; i < ARRAY_SIZE(in); i++) { hres = pCoInternetGetSecurityUrl(in[i], &sec, PSU_DEFAULT, 0); - ok(hres == S_OK, "(%d) CoInternetGetSecurityUrl returned: %08x\n", i, hres); + ok(hres == S_OK, "(%ld) CoInternetGetSecurityUrl returned: %08lx\n", i, hres); if(hres == S_OK) { - ok(!strcmp_w(sec, out_default[i]), "(%d) Got %s, expected %s\n", + ok(!strcmp_w(sec, out_default[i]), "(%ld) Got %s, expected %s\n", i, wine_dbgstr_w(sec), wine_dbgstr_w(out_default[i])); CoTaskMemFree(sec); }
hres = pCoInternetGetSecurityUrl(in[i], &sec, PSU_SECURITY_URL_ONLY, 0); - ok(hres == S_OK, "(%d) CoInternetGetSecurityUrl returned: %08x\n", i, hres); + ok(hres == S_OK, "(%ld) CoInternetGetSecurityUrl returned: %08lx\n", i, hres); if(hres == S_OK) { - ok(!strcmp_w(sec, out_securl[i]), "(%d) Got %s, expected %s\n", + ok(!strcmp_w(sec, out_securl[i]), "(%ld) Got %s, expected %s\n", i, wine_dbgstr_w(sec), wine_dbgstr_w(out_securl[i])); CoTaskMemFree(sec); } @@ -1357,7 +1357,7 @@ static void test_InternetGetSecurityUrl(void) SET_EXPECT(ParseUrl_SECURITY_DOMAIN_expected);
hres = pCoInternetGetSecurityUrl(security_url2W, &sec, PSU_DEFAULT, 0); - ok(hres == S_OK, "CoInternetGetSecurityUrl returned 0x%08x, expected S_OK\n", hres); + ok(hres == S_OK, "CoInternetGetSecurityUrl returned 0x%08lx, expected S_OK\n", hres);
CHECK_CALLED(ParseUrl_SECURITY_URL_input2); CHECK_CALLED(ParseUrl_SECURITY_URL_expected); @@ -1393,30 +1393,30 @@ static HRESULT WINAPI InternetProtocolInfo_ParseUrl(IInternetProtocolInfo *iface
ok(pwzResult != NULL, "pwzResult == NULL\n"); ok(pcchResult != NULL, "pcchResult == NULL\n"); - ok(!dwParseFlags, "Expected 0, but got 0x%08x\n", dwParseFlags); + ok(!dwParseFlags, "Expected 0, but got 0x%08lx\n", dwParseFlags);
switch(ParseAction) { case PARSE_SECURITY_URL: if(!strcmp_w(pwzUrl, security_urlW)) { CHECK_EXPECT(ParseUrl_SECURITY_URL_input); - ok(cchResult == lstrlenW(pwzUrl)+1, "Got %d\n", cchResult); + ok(cchResult == lstrlenW(pwzUrl)+1, "Got %ld\n", cchResult); ret = security_expectedW; } else if(!strcmp_w(pwzUrl, security_url2W)) { CHECK_EXPECT(ParseUrl_SECURITY_URL_input2); - ok(cchResult == lstrlenW(pwzUrl)+1, "Got %d\n", cchResult); + ok(cchResult == lstrlenW(pwzUrl)+1, "Got %ld\n", cchResult); ret = security_expectedW; } else if(!strcmp_w(pwzUrl, security_expectedW)) { CHECK_EXPECT(ParseUrl_SECURITY_URL_expected); - ok(cchResult == lstrlenW(pwzUrl)+1, "Got %d\n", cchResult); + ok(cchResult == lstrlenW(pwzUrl)+1, "Got %ld\n", cchResult); ret = security_expectedW; } else if(!strcmp_w(pwzUrl, winetest_to_httpW)) { switch(++called_securl_http) { case 1: - ok(cchResult == lstrlenW(pwzUrl)+1, "Got %d\n", cchResult); + ok(cchResult == lstrlenW(pwzUrl)+1, "Got %ld\n", cchResult); break; case 2: CHECK_EXPECT(ParseUrl_SECURITY_URL_http); - ok(cchResult == lstrlenW(url9)+1, "Got %d\n", cchResult); + ok(cchResult == lstrlenW(url9)+1, "Got %ld\n", cchResult); break; default: todo_wine CHECK_EXPECT(ParseUrl_SECURITY_URL_http); @@ -1432,7 +1432,7 @@ static HRESULT WINAPI InternetProtocolInfo_ParseUrl(IInternetProtocolInfo *iface
ok(!strcmp_w(pwzUrl, security_expectedW), "Expected %s but got %s\n", wine_dbgstr_w(security_expectedW), wine_dbgstr_w(pwzUrl)); - ok(cchResult == lstrlenW(pwzUrl)+1, "Got %d\n", cchResult); + ok(cchResult == lstrlenW(pwzUrl)+1, "Got %ld\n", cchResult); ret = security_expectedW; break; default: @@ -1535,13 +1535,13 @@ static void register_protocols(void) HRESULT hres;
hres = pCoInternetGetSession(0, &session, 0); - ok(hres == S_OK, "CoInternetGetSession failed: %08x\n", hres); + ok(hres == S_OK, "CoInternetGetSession failed: %08lx\n", hres); if(FAILED(hres)) return;
hres = IInternetSession_RegisterNameSpace(session, &protocol_cf, &IID_NULL, winetestW, 0, NULL, 0); - ok(hres == S_OK, "RegisterNameSpace failed: %08x\n", hres); + ok(hres == S_OK, "RegisterNameSpace failed: %08lx\n", hres);
IInternetSession_Release(session); } @@ -1551,12 +1551,12 @@ static void unregister_protocols(void) { HRESULT hr;
hr = pCoInternetGetSession(0, &session, 0); - ok(hr == S_OK, "CoInternetGetSession failed: 0x%08x\n", hr); + ok(hr == S_OK, "CoInternetGetSession failed: 0x%08lx\n", hr); if(FAILED(hr)) return;
hr = IInternetSession_UnregisterNameSpace(session, &protocol_cf, winetestW); - ok(hr == S_OK, "UnregisterNameSpace failed: 0x%08x\n", hr); + ok(hr == S_OK, "UnregisterNameSpace failed: 0x%08lx\n", hr);
IInternetSession_Release(session); } @@ -1592,36 +1592,36 @@ static void test_InternetGetSecurityUrlEx(void) trace("testing CoInternetGetSecurityUrlEx...\n");
hr = pCoInternetGetSecurityUrlEx(NULL, NULL, PSU_DEFAULT, 0); - ok(hr == E_INVALIDARG, "CoInternetGetSecurityUrlEx returned 0x%08x, expected E_INVALIDARG\n", hr); + ok(hr == E_INVALIDARG, "CoInternetGetSecurityUrlEx returned 0x%08lx, expected E_INVALIDARG\n", hr);
result = (void*) 0xdeadbeef; hr = pCoInternetGetSecurityUrlEx(NULL, &result, PSU_DEFAULT, 0); - ok(hr == E_INVALIDARG, "CoInternetGetSecurityUrlEx returned 0x%08x, expected E_INVALIDARG\n", hr); + ok(hr == E_INVALIDARG, "CoInternetGetSecurityUrlEx returned 0x%08lx, expected E_INVALIDARG\n", hr); ok(result == (void*) 0xdeadbeef, "'result' was %p\n", result);
for(i = 0; i < ARRAY_SIZE(sec_url_ex_tests); ++i) { uri = NULL;
hr = pCreateUri(sec_url_ex_tests[i].uri, sec_url_ex_tests[i].create_flags, 0, &uri); - ok(hr == S_OK, "CreateUri returned 0x%08x on test %d\n", hr, i); + ok(hr == S_OK, "CreateUri returned 0x%08lx on test %ld\n", hr, i); if(hr == S_OK) { result = NULL;
hr = pCoInternetGetSecurityUrlEx(uri, &result, PSU_DEFAULT, 0); todo_wine_if (sec_url_ex_tests[i].todo) { ok(hr == sec_url_ex_tests[i].default_hres, - "CoInternetGetSecurityUrlEx returned 0x%08x, expected 0x%08x on test %d\n", + "CoInternetGetSecurityUrlEx returned 0x%08lx, expected 0x%08lx on test %ld\n", hr, sec_url_ex_tests[i].default_hres, i); } if(SUCCEEDED(hr)) { BSTR received;
hr = IUri_GetDisplayUri(result, &received); - ok(hr == S_OK, "GetDisplayUri returned 0x%08x on test %d\n", hr, i); + ok(hr == S_OK, "GetDisplayUri returned 0x%08lx on test %ld\n", hr, i); if(hr == S_OK) { todo_wine_if (sec_url_ex_tests[i].todo) { ok(!lstrcmpW(sec_url_ex_tests[i].default_uri, received), - "Expected %s but got %s on test %d\n", + "Expected %s but got %s on test %ld\n", wine_dbgstr_w(sec_url_ex_tests[i].default_uri), wine_dbgstr_w(received), i); } } @@ -1633,18 +1633,18 @@ static void test_InternetGetSecurityUrlEx(void) hr = pCoInternetGetSecurityUrlEx(uri, &result, PSU_SECURITY_URL_ONLY, 0); todo_wine_if (sec_url_ex_tests[i].todo) { ok(hr == sec_url_ex_tests[i].default_hres, - "CoInternetGetSecurityUrlEx returned 0x%08x, expected 0x%08x on test %d\n", + "CoInternetGetSecurityUrlEx returned 0x%08lx, expected 0x%08lx on test %ld\n", hr, sec_url_ex_tests[i].default_hres, i); } if(SUCCEEDED(hr)) { BSTR received;
hr = IUri_GetDisplayUri(result, &received); - ok(hr == S_OK, "GetDisplayUri returned 0x%08x on test %d\n", hr, i); + ok(hr == S_OK, "GetDisplayUri returned 0x%08lx on test %ld\n", hr, i); if(hr == S_OK) { todo_wine_if (sec_url_ex_tests[i].todo) { ok(!lstrcmpW(sec_url_ex_tests[i].default_uri, received), - "Expected %s but got %s on test %d\n", + "Expected %s but got %s on test %ld\n", wine_dbgstr_w(sec_url_ex_tests[i].default_uri), wine_dbgstr_w(received), i); } } @@ -1665,14 +1665,14 @@ static void test_InternetGetSecurityUrlEx_Pluggable(void) trace("testing CoInternetGetSecurityUrlEx for pluggable protocols...\n");
hr = pCreateUri(security_urlW, 0, 0, &uri); - ok(hr == S_OK, "CreateUri returned 0x%08x\n", hr); + ok(hr == S_OK, "CreateUri returned 0x%08lx\n", hr); if(hr == S_OK) { SET_EXPECT(ParseUrl_SECURITY_URL_input); SET_EXPECT(ParseUrl_SECURITY_URL_expected); SET_EXPECT(ParseUrl_SECURITY_DOMAIN_expected);
hr = pCoInternetGetSecurityUrlEx(uri, &result, PSU_DEFAULT, 0); - ok(hr == S_OK, "CoInternetGetSecurityUrlEx returned 0x%08x, expected S_OK\n", hr); + ok(hr == S_OK, "CoInternetGetSecurityUrlEx returned 0x%08lx, expected S_OK\n", hr);
CHECK_CALLED(ParseUrl_SECURITY_URL_input); CHECK_CALLED(ParseUrl_SECURITY_URL_expected); @@ -1682,7 +1682,7 @@ static void test_InternetGetSecurityUrlEx_Pluggable(void) BSTR received = NULL;
hr = IUri_GetAbsoluteUri(result, &received); - ok(hr == S_OK, "GetAbsoluteUri returned 0x%08x\n", hr); + ok(hr == S_OK, "GetAbsoluteUri returned 0x%08lx\n", hr); if(hr == S_OK) { ok(!strcmp_w(security_expectedW, received), "Expected %s but got %s\n", wine_dbgstr_w(security_expectedW), wine_dbgstr_w(received)); @@ -1697,7 +1697,7 @@ static void test_InternetGetSecurityUrlEx_Pluggable(void) SET_EXPECT(ParseUrl_SECURITY_URL_expected);
hr = pCoInternetGetSecurityUrlEx(uri, &result, PSU_SECURITY_URL_ONLY, 0); - ok(hr == S_OK, "CoInternetGetSecurityUrlEx returned 0x%08x, expected S_OK\n", hr); + ok(hr == S_OK, "CoInternetGetSecurityUrlEx returned 0x%08lx, expected S_OK\n", hr);
CHECK_CALLED(ParseUrl_SECURITY_URL_input); CHECK_CALLED(ParseUrl_SECURITY_URL_expected); @@ -1706,7 +1706,7 @@ static void test_InternetGetSecurityUrlEx_Pluggable(void) BSTR received = NULL;
hr = IUri_GetAbsoluteUri(result, &received); - ok(hr == S_OK, "GetAbsoluteUri returned 0x%08x\n", hr); + ok(hr == S_OK, "GetAbsoluteUri returned 0x%08lx\n", hr); if(hr == S_OK) { ok(!strcmp_w(security_expectedW, received), "Expected %s but got %s\n", wine_dbgstr_w(security_expectedW), wine_dbgstr_w(received)); @@ -1768,34 +1768,34 @@ static void test_SecurityManagerEx2(void) trace("Testing SecurityManagerEx2...\n");
hres = pCoInternetCreateSecurityManager(NULL, &sec_mgr, 0); - ok(hres == S_OK, "CoInternetCreateSecurityManager failed: %08x\n", hres); + ok(hres == S_OK, "CoInternetCreateSecurityManager failed: %08lx\n", hres);
hres = IInternetSecurityManager_QueryInterface(sec_mgr, &IID_IInternetSecurityManagerEx2, (void**)&sec_mgr2); - ok(hres == S_OK, "QueryInterface(IID_IInternetSecurityManagerEx2) failed: %08x\n", hres); + ok(hres == S_OK, "QueryInterface(IID_IInternetSecurityManagerEx2) failed: %08lx\n", hres);
zone = 0xdeadbeef;
hres = IInternetSecurityManagerEx2_MapUrlToZoneEx2(sec_mgr2, NULL, &zone, 0, NULL, NULL); - ok(hres == E_INVALIDARG, "MapUrlToZoneEx2 returned %08x, expected E_INVALIDARG\n", hres); - ok(zone == URLZONE_INVALID, "zone was %d\n", zone); + ok(hres == E_INVALIDARG, "MapUrlToZoneEx2 returned %08lx, expected E_INVALIDARG\n", hres); + ok(zone == URLZONE_INVALID, "zone was %ld\n", zone);
hres = IInternetSecurityManagerEx2_GetSecurityIdEx2(sec_mgr2, NULL, buf, &buf_size, 0); - ok(hres == E_INVALIDARG, "GetSecurityIdEx2 returned %08x, expected E_INVALIDARG\n", hres); - ok(buf_size == sizeof(buf), "buf_size was %d\n", buf_size); + ok(hres == E_INVALIDARG, "GetSecurityIdEx2 returned %08lx, expected E_INVALIDARG\n", hres); + ok(buf_size == sizeof(buf), "buf_size was %ld\n", buf_size);
hres = pCreateUri(url5, 0, 0, &uri); - ok(hres == S_OK, "CreateUri failed: %08x\n", hres); + ok(hres == S_OK, "CreateUri failed: %08lx\n", hres);
hres = IInternetSecurityManagerEx2_MapUrlToZoneEx2(sec_mgr2, uri, NULL, 0, NULL, NULL); - ok(hres == E_INVALIDARG, "MapToUrlZoneEx2 returned %08x, expected E_INVALIDARG\n", hres); + ok(hres == E_INVALIDARG, "MapToUrlZoneEx2 returned %08lx, expected E_INVALIDARG\n", hres);
buf_size = sizeof(buf); hres = IInternetSecurityManagerEx2_GetSecurityIdEx2(sec_mgr2, uri, NULL, &buf_size, 0); - ok(hres == E_INVALIDARG || broken(hres == S_OK), "GetSecurityIdEx2 failed: %08x\n", hres); - ok(buf_size == sizeof(buf), "bug_size was %d\n", buf_size); + ok(hres == E_INVALIDARG || broken(hres == S_OK), "GetSecurityIdEx2 failed: %08lx\n", hres); + ok(buf_size == sizeof(buf), "bug_size was %ld\n", buf_size);
hres = IInternetSecurityManagerEx2_GetSecurityIdEx2(sec_mgr2, uri, buf, NULL, 0); - ok(hres == E_INVALIDARG, "GetSecurityIdEx2 returned %08x, expected E_INVALIDARG\n", hres); + ok(hres == E_INVALIDARG, "GetSecurityIdEx2 returned %08lx, expected E_INVALIDARG\n", hres);
IUri_Release(uri);
@@ -1804,13 +1804,13 @@ static void test_SecurityManagerEx2(void) zone = URLZONE_INVALID;
hres = pCreateUri(sec_mgr_ex2_tests[i].uri, sec_mgr_ex2_tests[i].create_flags, 0, &uri); - ok(hres == S_OK, "CreateUri returned %08x for '%s'\n", hres, wine_dbgstr_w(sec_mgr_ex2_tests[i].uri)); + ok(hres == S_OK, "CreateUri returned %08lx for '%s'\n", hres, wine_dbgstr_w(sec_mgr_ex2_tests[i].uri));
hres = IInternetSecurityManagerEx2_MapUrlToZoneEx2(sec_mgr2, uri, &zone, 0, NULL, NULL); todo_wine_if (sec_mgr_ex2_tests[i].map_todo) { - ok(hres == sec_mgr_ex2_tests[i].map_hres, "MapUrlToZoneEx2 returned %08x, expected %08x for '%s'\n", + ok(hres == sec_mgr_ex2_tests[i].map_hres, "MapUrlToZoneEx2 returned %08lx, expected %08lx for '%s'\n", hres, sec_mgr_ex2_tests[i].map_hres, wine_dbgstr_w(sec_mgr_ex2_tests[i].uri)); - ok(zone == sec_mgr_ex2_tests[i].zone, "Expected zone %d, but got %d for '%s'\n", sec_mgr_ex2_tests[i].zone, + ok(zone == sec_mgr_ex2_tests[i].zone, "Expected zone %ld, but got %ld for '%s'\n", sec_mgr_ex2_tests[i].zone, zone, wine_dbgstr_w(sec_mgr_ex2_tests[i].uri)); }
@@ -1819,10 +1819,10 @@ static void test_SecurityManagerEx2(void)
hres = IInternetSecurityManagerEx2_GetSecurityIdEx2(sec_mgr2, uri, buf, &buf_size, 0); todo_wine_if (sec_mgr_ex2_tests[i].secid_todo) { - ok(hres == sec_mgr_ex2_tests[i].secid_hres, "GetSecurityIdEx2 returned %08x, expected %08x on test '%s'\n", + ok(hres == sec_mgr_ex2_tests[i].secid_hres, "GetSecurityIdEx2 returned %08lx, expected %08lx on test '%s'\n", hres, sec_mgr_ex2_tests[i].secid_hres, wine_dbgstr_w(sec_mgr_ex2_tests[i].uri)); if(sec_mgr_ex2_tests[i].secid) { - ok(buf_size == sec_mgr_ex2_tests[i].secid_size, "Got wrong security id size=%d, expected %d on test '%s'\n", + ok(buf_size == sec_mgr_ex2_tests[i].secid_size, "Got wrong security id size=%ld, expected %ld on test '%s'\n", buf_size, sec_mgr_ex2_tests[i].secid_size, wine_dbgstr_w(sec_mgr_ex2_tests[i].uri)); ok(!memcmp(buf, sec_mgr_ex2_tests[i].secid, sec_mgr_ex2_tests[i].secid_size), "Got wrong security id on test '%s'\n", wine_dbgstr_w(sec_mgr_ex2_tests[i].uri)); @@ -1833,22 +1833,22 @@ static void test_SecurityManagerEx2(void) }
hres = pCreateUri(url15, 0, 0, &uri); - ok(hres == S_OK, "CreateUri failed: %08x\n", hres); + ok(hres == S_OK, "CreateUri failed: %08lx\n", hres);
buf_size = sizeof(buf); memset(buf, 0xf0, buf_size);
hres = IInternetSecurityManagerEx2_GetSecurityIdEx2(sec_mgr2, uri, buf, &buf_size, (DWORD_PTR)domainW); - ok(hres == S_OK, "GetSecurityIdEx2 failed: %08x\n", hres); - todo_wine ok(buf_size == sizeof(secid13), "buf_size was %d\n", buf_size); + ok(hres == S_OK, "GetSecurityIdEx2 failed: %08lx\n", hres); + todo_wine ok(buf_size == sizeof(secid13), "buf_size was %ld\n", buf_size); todo_wine ok(!memcmp(buf, secid13, sizeof(secid13)), "Got wrong secid\n");
buf_size = sizeof(buf); memset(buf, 0xf0, buf_size);
hres = IInternetSecurityManagerEx2_GetSecurityIdEx2(sec_mgr2, uri, buf, &buf_size, 0); - ok(hres == S_OK, "GetSecurityIdEx2 failed: %08x\n", hres); - ok(buf_size == sizeof(secid13_2), "buf_size was %d\n", buf_size); + ok(hres == S_OK, "GetSecurityIdEx2 failed: %08lx\n", hres); + ok(buf_size == sizeof(secid13_2), "buf_size was %ld\n", buf_size); ok(!memcmp(buf, secid13_2, sizeof(secid13_2)), "Got wrong secid\n");
IUri_Release(uri); @@ -1889,9 +1889,9 @@ static void test_CoInternetIsFeatureZoneElevationEnabled(void)
hres = pCoInternetIsFeatureEnabled(FEATURE_ZONE_ELEVATION, GET_FEATURE_FROM_PROCESS); - ok(SUCCEEDED(hres), "CoInternetIsFeatureEnabled returned %x\n", hres); + ok(SUCCEEDED(hres), "CoInternetIsFeatureEnabled returned %lx\n", hres);
- trace("Testing CoInternetIsFeatureZoneElevationEnabled... (%x)\n", hres); + trace("Testing CoInternetIsFeatureZoneElevationEnabled... (%lx)\n", hres);
for(i = 0; i < ARRAY_SIZE(testcases); i++) { if(hres==S_OK && testcases[i].flags == GET_FEATURE_FROM_PROCESS) @@ -1915,7 +1915,7 @@ static void test_CoInternetIsFeatureZoneElevationEnabled(void) } hres = pCoInternetIsFeatureZoneElevationEnabled(testcases[i].url_from, testcases[i].url_to, &security_manager, testcases[i].flags); - ok(hres == testcases[i].hres, "%d) CoInternetIsFeatureZoneElevationEnabled returned %x\n", i, hres); + ok(hres == testcases[i].hres, "%d) CoInternetIsFeatureZoneElevationEnabled returned %lx\n", i, hres); if(testcases[i].policy_flags != -1) CHECK_CALLED(ProcessUrlAction);
@@ -1923,7 +1923,7 @@ static void test_CoInternetIsFeatureZoneElevationEnabled(void) SET_EXPECT(ProcessUrlAction); hres = pCoInternetIsFeatureEnabledForUrl(FEATURE_ZONE_ELEVATION, testcases[i].flags, testcases[i].url_to, &security_manager); - ok(hres == testcases[i].hres, "%d) CoInternetIsFeatureEnabledForUrl returned %x\n", i, hres); + ok(hres == testcases[i].hres, "%d) CoInternetIsFeatureEnabledForUrl returned %lx\n", i, hres); if(testcases[i].policy_flags != -1) CHECK_CALLED(ProcessUrlAction); } diff --git a/dlls/urlmon/tests/stream.c b/dlls/urlmon/tests/stream.c index ef96eb6ea15..a30236386ac 100644 --- a/dlls/urlmon/tests/stream.c +++ b/dlls/urlmon/tests/stream.c @@ -167,7 +167,7 @@ static HRESULT WINAPI statusclb_OnProgress(IBindStatusCallback *iface, ULONG ulP ok(szStatusText != NULL, "szStatusText == NULL\n"); break; default: - todo_wine { ok(0, "unexpected code %d\n", ulStatusCode); } + todo_wine { ok(0, "unexpected code %ld\n", ulStatusCode); } }; return S_OK; } @@ -179,7 +179,7 @@ static HRESULT WINAPI statusclb_OnStopBinding(IBindStatusCallback *iface, HRESUL /* ignore DNS failure */ if (hresult != HRESULT_FROM_WIN32(ERROR_INTERNET_NAME_NOT_RESOLVED)) { - ok(SUCCEEDED(hresult), "Download failed: %08x\n", hresult); + ok(SUCCEEDED(hresult), "Download failed: %08lx\n", hresult); ok(szError == NULL, "szError should be NULL\n"); }
@@ -216,14 +216,14 @@ static HRESULT WINAPI statusclb_OnDataAvailable(IBindStatusCallback *iface, DWOR if(pformatetc) { ok(pformatetc->cfFormat == 0xc02d, "clipformat=%x\n", pformatetc->cfFormat); ok(pformatetc->ptd == NULL, "ptd = %p\n", pformatetc->ptd); - ok(pformatetc->dwAspect == 1, "dwAspect=%u\n", pformatetc->dwAspect); - ok(pformatetc->lindex == -1, "lindex=%d\n", pformatetc->lindex); - ok(pformatetc->tymed == TYMED_ISTREAM, "tymed=%u\n", pformatetc->tymed); + ok(pformatetc->dwAspect == 1, "dwAspect=%lu\n", pformatetc->dwAspect); + ok(pformatetc->lindex == -1, "lindex=%ld\n", pformatetc->lindex); + ok(pformatetc->tymed == TYMED_ISTREAM, "tymed=%lu\n", pformatetc->tymed); }
ok(pstgmed != NULL, "stgmeg == NULL\n"); if(pstgmed) { - ok(pstgmed->tymed == TYMED_ISTREAM, "tymed=%u\n", pstgmed->tymed); + ok(pstgmed->tymed == TYMED_ISTREAM, "tymed=%lu\n", pstgmed->tymed); ok(U(*pstgmed).pstm != NULL, "pstm == NULL\n"); ok(pstgmed->pUnkForRelease != NULL, "pUnkForRelease == NULL\n"); } @@ -232,7 +232,7 @@ static HRESULT WINAPI statusclb_OnDataAvailable(IBindStatusCallback *iface, DWOR if(U(*pstgmed).pstm) { do hres = IStream_Read(U(*pstgmed).pstm, buf, 512, &read); while(hres == S_OK); - ok(hres == S_FALSE || hres == E_PENDING, "IStream_Read returned %08x\n", hres); + ok(hres == S_FALSE || hres == E_PENDING, "IStream_Read returned %08lx\n", hres); }
return S_OK; @@ -297,11 +297,11 @@ static void test_URLOpenBlockingStreamW(void) char buffer[256];
hr = URLOpenBlockingStreamW(NULL, NULL, &pStream, 0, &BindStatusCallback); - ok(hr == E_INVALIDARG, "URLOpenBlockingStreamW should have failed with E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "URLOpenBlockingStreamW should have failed with E_INVALIDARG instead of 0x%08lx\n", hr); if (0) /* crashes on Win2k */ { hr = URLOpenBlockingStreamW(NULL, INDEX_HTML, NULL, 0, &BindStatusCallback); - ok(hr == E_INVALIDARG, "URLOpenBlockingStreamW should have failed with E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "URLOpenBlockingStreamW should have failed with E_INVALIDARG instead of 0x%08lx\n", hr); }
SET_EXPECT(GetBindInfo); @@ -314,7 +314,7 @@ static void test_URLOpenBlockingStreamW(void) SET_EXPECT(OnStopBinding);
hr = URLOpenBlockingStreamW(NULL, INDEX_HTML, &pStream, 0, &BindStatusCallback); - ok(hr == S_OK, "URLOpenBlockingStreamW failed with error 0x%08x\n", hr); + ok(hr == S_OK, "URLOpenBlockingStreamW failed with error 0x%08lx\n", hr);
CHECK_CALLED(GetBindInfo); todo_wine CHECK_CALLED(QueryInterface_IServiceProvider); @@ -330,21 +330,21 @@ static void test_URLOpenBlockingStreamW(void) { buffer[0] = 0; hr = IStream_Read(pStream, buffer, sizeof(buffer), NULL); - ok(hr == S_OK, "IStream_Read failed with error 0x%08x\n", hr); + ok(hr == S_OK, "IStream_Read failed with error 0x%08lx\n", hr); ok(!memcmp(buffer, szHtmlDoc, sizeof(szHtmlDoc)-1), "read data differs from file\n");
IStream_Release(pStream); }
hr = URLOpenBlockingStreamW(NULL, INDEX_HTML, &pStream, 0, NULL); - ok(hr == S_OK, "URLOpenBlockingStreamW failed with error 0x%08x\n", hr); + ok(hr == S_OK, "URLOpenBlockingStreamW failed with error 0x%08lx\n", hr);
ok(pStream != NULL, "pStream is NULL\n"); if(pStream) { buffer[0] = 0; hr = IStream_Read(pStream, buffer, sizeof(buffer), NULL); - ok(hr == S_OK, "IStream_Read failed with error 0x%08x\n", hr); + ok(hr == S_OK, "IStream_Read failed with error 0x%08lx\n", hr); ok(!memcmp(buffer, szHtmlDoc, sizeof(szHtmlDoc)-1), "read data differs from file\n");
IStream_Release(pStream); @@ -356,7 +356,7 @@ static void test_URLOpenStreamW(void) HRESULT hr;
hr = URLOpenStreamW(NULL, NULL, 0, &BindStatusCallback); - ok(hr == E_INVALIDARG, "URLOpenStreamW should have failed with E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "URLOpenStreamW should have failed with E_INVALIDARG instead of 0x%08lx\n", hr);
SET_EXPECT(GetBindInfo); SET_EXPECT(QueryInterface_IServiceProvider); @@ -369,7 +369,7 @@ static void test_URLOpenStreamW(void) SET_EXPECT(OnStopBinding);
hr = URLOpenStreamW(NULL, INDEX_HTML, 0, &BindStatusCallback); - ok(hr == S_OK, "URLOpenStreamW failed with error 0x%08x\n", hr); + ok(hr == S_OK, "URLOpenStreamW failed with error 0x%08lx\n", hr);
CHECK_CALLED(GetBindInfo); todo_wine CHECK_CALLED(QueryInterface_IServiceProvider); @@ -382,7 +382,7 @@ static void test_URLOpenStreamW(void) CHECK_CALLED(OnStopBinding);
hr = URLOpenStreamW(NULL, INDEX_HTML, 0, NULL); - ok(hr == S_OK, "URLOpenStreamW failed with error 0x%08x\n", hr); + ok(hr == S_OK, "URLOpenStreamW failed with error 0x%08lx\n", hr); }
START_TEST(stream) diff --git a/dlls/urlmon/tests/uri.c b/dlls/urlmon/tests/uri.c index b161d1f3eec..a3161b8e401 100644 --- a/dlls/urlmon/tests/uri.c +++ b/dlls/urlmon/tests/uri.c @@ -7772,7 +7772,7 @@ static void change_property(IUriBuilder *builder, const uri_builder_property *pr hr = IUriBuilder_SetFragment(builder, valueW); todo_wine_if(prop->todo) { ok(hr == prop->expected, - "Error: IUriBuilder_SetFragment returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_SetFragment returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, prop->expected, test_index); } break; @@ -7780,7 +7780,7 @@ static void change_property(IUriBuilder *builder, const uri_builder_property *pr hr = IUriBuilder_SetHost(builder, valueW); todo_wine_if(prop->todo) { ok(hr == prop->expected, - "Error: IUriBuilder_SetHost returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_SetHost returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, prop->expected, test_index); } break; @@ -7788,7 +7788,7 @@ static void change_property(IUriBuilder *builder, const uri_builder_property *pr hr = IUriBuilder_SetPassword(builder, valueW); todo_wine_if(prop->todo) { ok(hr == prop->expected, - "Error: IUriBuilder_SetPassword returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_SetPassword returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, prop->expected, test_index); } break; @@ -7796,7 +7796,7 @@ static void change_property(IUriBuilder *builder, const uri_builder_property *pr hr = IUriBuilder_SetPath(builder, valueW); todo_wine_if(prop->todo) { ok(hr == prop->expected, - "Error: IUriBuilder_SetPath returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_SetPath returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, prop->expected, test_index); } break; @@ -7804,7 +7804,7 @@ static void change_property(IUriBuilder *builder, const uri_builder_property *pr hr = IUriBuilder_SetQuery(builder, valueW); todo_wine_if(prop->todo) { ok(hr == prop->expected, - "Error: IUriBuilder_SetQuery returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_SetQuery returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, prop->expected, test_index); } break; @@ -7812,7 +7812,7 @@ static void change_property(IUriBuilder *builder, const uri_builder_property *pr hr = IUriBuilder_SetSchemeName(builder, valueW); todo_wine_if(prop->todo) { ok(hr == prop->expected, - "Error: IUriBuilder_SetSchemeName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_SetSchemeName returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, prop->expected, test_index); } break; @@ -7820,12 +7820,12 @@ static void change_property(IUriBuilder *builder, const uri_builder_property *pr hr = IUriBuilder_SetUserName(builder, valueW); todo_wine_if(prop->todo) { ok(hr == prop->expected, - "Error: IUriBuilder_SetUserName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_SetUserName returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, prop->expected, test_index); } break; default: - trace("Unsupported operation for %d on uri_builder_tests[%d].\n", prop->property, test_index); + trace("Unsupported operation for %d on uri_builder_tests[%ld].\n", prop->property, test_index); }
heap_free(valueW); @@ -7843,7 +7843,7 @@ static void test_CreateUri_InvalidFlags(void) { IUri *uri = (void*) 0xdeadbeef;
hr = pCreateUri(http_urlW, invalid_flag_tests[i].flags, 0, &uri); - ok(hr == invalid_flag_tests[i].expected, "Error: CreateUri returned 0x%08x, expected 0x%08x, flags=0x%08x\n", + ok(hr == invalid_flag_tests[i].expected, "Error: CreateUri returned 0x%08lx, expected 0x%08lx, flags=0x%08lx\n", hr, invalid_flag_tests[i].expected, invalid_flag_tests[i].flags); ok(uri == NULL, "Error: expected the IUri to be NULL, but it was %p instead\n", uri); } @@ -7857,20 +7857,20 @@ static void test_CreateUri_InvalidArgs(void) { static const WCHAR emptyW[] = {0};
hr = pCreateUri(http_urlW, 0, 0, NULL); - ok(hr == E_INVALIDARG, "Error: CreateUri returned 0x%08x, expected 0x%08x\n", hr, E_INVALIDARG); + ok(hr == E_INVALIDARG, "Error: CreateUri returned 0x%08lx, expected 0x%08lx\n", hr, E_INVALIDARG);
hr = pCreateUri(NULL, 0, 0, &uri); - ok(hr == E_INVALIDARG, "Error: CreateUri returned 0x%08x, expected 0x%08x\n", hr, E_INVALIDARG); + ok(hr == E_INVALIDARG, "Error: CreateUri returned 0x%08lx, expected 0x%08lx\n", hr, E_INVALIDARG); ok(uri == NULL, "Error: Expected the IUri to be NULL, but it was %p instead\n", uri);
uri = (void*) 0xdeadbeef; hr = pCreateUri(invalidW, 0, 0, &uri); - ok(hr == E_INVALIDARG, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); + ok(hr == E_INVALIDARG, "Error: CreateUri returned 0x%08lx, expected 0x%08lx.\n", hr, E_INVALIDARG); ok(uri == NULL, "Error: Expected the IUri to be NULL, but it was %p instead\n", uri);
uri = (void*) 0xdeadbeef; hr = pCreateUri(emptyW, 0, 0, &uri); - ok(hr == E_INVALIDARG, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); + ok(hr == E_INVALIDARG, "Error: CreateUri returned 0x%08lx, expected 0x%08lx.\n", hr, E_INVALIDARG); ok(uri == NULL, "Error: Expected the IUri to be NULL, but it was %p instead\n", uri); }
@@ -7886,7 +7886,7 @@ static void test_CreateUri_InvalidUri(void) { uriW = a2w(test.uri); hr = pCreateUri(uriW, test.flags, 0, &uri); todo_wine_if(test.todo) - ok(hr == E_INVALIDARG, "Error: CreateUri returned 0x%08x, expected 0x%08x on invalid_uri_tests[%d].\n", + ok(hr == E_INVALIDARG, "Error: CreateUri returned 0x%08lx, expected 0x%08lx on invalid_uri_tests[%ld].\n", hr, E_INVALIDARG, i); if(uri) IUri_Release(uri);
@@ -7901,16 +7901,16 @@ static void test_IUri_GetPropertyBSTR(void) {
/* Make sure GetPropertyBSTR handles invalid args correctly. */ hr = pCreateUri(http_urlW, 0, 0, &uri); - ok(hr == S_OK, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: CreateUri returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) { BSTR received = NULL;
hr = IUri_GetPropertyBSTR(uri, Uri_PROPERTY_RAW_URI, NULL, 0); - ok(hr == E_POINTER, "Error: GetPropertyBSTR returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); + ok(hr == E_POINTER, "Error: GetPropertyBSTR returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER);
/* Make sure it handles an invalid Uri_PROPERTY correctly. */ hr = IUri_GetPropertyBSTR(uri, Uri_PROPERTY_PORT, &received, 0); - ok(hr == E_INVALIDARG /* IE10 */ || broken(hr == S_OK), "Error: GetPropertyBSTR returned 0x%08x, expected E_INVALIDARG or S_OK.\n", hr); + ok(hr == E_INVALIDARG /* IE10 */ || broken(hr == S_OK), "Error: GetPropertyBSTR returned 0x%08lx, expected E_INVALIDARG or S_OK.\n", hr); if(SUCCEEDED(hr)) { ok(received != NULL, "Error: Expected the string not to be NULL.\n"); ok(!SysStringLen(received), "Error: Expected the string to be of len=0 but it was %d instead.\n", SysStringLen(received)); @@ -7922,7 +7922,7 @@ static void test_IUri_GetPropertyBSTR(void) { /* Make sure it handles the ZONE property correctly. */ received = NULL; hr = IUri_GetPropertyBSTR(uri, Uri_PROPERTY_ZONE, &received, 0); - ok(hr == S_FALSE, "Error: GetPropertyBSTR returned 0x%08x, expected 0x%08x.\n", hr, S_FALSE); + ok(hr == S_FALSE, "Error: GetPropertyBSTR returned 0x%08lx, expected 0x%08lx.\n", hr, S_FALSE); ok(received != NULL, "Error: Expected the string not to be NULL.\n"); ok(!SysStringLen(received), "Error: Expected the string to be of len=0 but it was %d instead.\n", SysStringLen(received)); SysFreeString(received); @@ -7937,7 +7937,7 @@ static void test_IUri_GetPropertyBSTR(void) { uriW = a2w(test.uri); hr = pCreateUri(uriW, test.create_flags, 0, &uri); todo_wine_if(test.create_todo) - ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x. Failed on uri_tests[%d].\n", + ok(hr == test.create_expected, "Error: CreateUri returned 0x%08lx, expected 0x%08lx. Failed on uri_tests[%ld].\n", hr, test.create_expected, i);
if(SUCCEEDED(hr)) { @@ -7952,11 +7952,11 @@ static void test_IUri_GetPropertyBSTR(void) { todo_wine_if(prop.todo) { ok(hr == prop.expected || (prop.value2 && hr == prop.expected2), - "GetPropertyBSTR returned 0x%08x, expected 0x%08x. On uri_tests[%d].str_props[%d].\n", + "GetPropertyBSTR returned 0x%08lx, expected 0x%08lx. On uri_tests[%ld].str_props[%ld].\n", hr, prop.expected, i, j); ok(!strcmp_aw(prop.value, received) || (prop.value2 && !strcmp_aw(prop.value2, received)) || broken(prop.broken_value && !strcmp_aw(prop.broken_value, received)), - "Expected %s but got %s on uri_tests[%d].str_props[%d].\n", + "Expected %s but got %s on uri_tests[%ld].str_props[%ld].\n", prop.value, wine_dbgstr_w(received), i, j); }
@@ -7976,16 +7976,16 @@ static void test_IUri_GetPropertyDWORD(void) { DWORD i;
hr = pCreateUri(http_urlW, 0, 0, &uri); - ok(hr == S_OK, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: CreateUri returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) { DWORD received = 0xdeadbeef;
hr = IUri_GetPropertyDWORD(uri, Uri_PROPERTY_DWORD_START, NULL, 0); - ok(hr == E_INVALIDARG, "Error: GetPropertyDWORD returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); + ok(hr == E_INVALIDARG, "Error: GetPropertyDWORD returned 0x%08lx, expected 0x%08lx.\n", hr, E_INVALIDARG);
hr = IUri_GetPropertyDWORD(uri, Uri_PROPERTY_ABSOLUTE_URI, &received, 0); - ok(hr == E_INVALIDARG, "Error: GetPropertyDWORD returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); - ok(received == 0, "Error: Expected received=%d but instead received=%d.\n", 0, received); + ok(hr == E_INVALIDARG, "Error: GetPropertyDWORD returned 0x%08lx, expected 0x%08lx.\n", hr, E_INVALIDARG); + ok(received == 0, "Error: Expected received=%d but instead received=%ld.\n", 0, received); } if(uri) IUri_Release(uri);
@@ -7997,7 +7997,7 @@ static void test_IUri_GetPropertyDWORD(void) { uriW = a2w(test.uri); hr = pCreateUri(uriW, test.create_flags, 0, &uri); todo_wine_if(test.create_todo) - ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x. Failed on uri_tests[%d].\n", + ok(hr == test.create_expected, "Error: CreateUri returned 0x%08lx, expected 0x%08lx. Failed on uri_tests[%ld].\n", hr, test.create_expected, i);
if(SUCCEEDED(hr)) { @@ -8010,9 +8010,9 @@ static void test_IUri_GetPropertyDWORD(void) {
hr = IUri_GetPropertyDWORD(uri, j+Uri_PROPERTY_DWORD_START, &received, 0); todo_wine_if(prop.todo) { - ok(hr == prop.expected, "GetPropertyDWORD returned 0x%08x, expected 0x%08x. On uri_tests[%d].dword_props[%d].\n", + ok(hr == prop.expected, "GetPropertyDWORD returned 0x%08lx, expected 0x%08lx. On uri_tests[%ld].dword_props[%ld].\n", hr, prop.expected, i, j); - ok(prop.value == received, "Expected %d but got %d on uri_tests[%d].dword_props[%d].\n", + ok(prop.value == received, "Expected %ld but got %ld on uri_tests[%ld].dword_props[%ld].\n", prop.value, received, i, j); } } @@ -8032,52 +8032,52 @@ static void test_IUri_GetStrProperties(void) {
/* Make sure all the 'Get*' string property functions handle invalid args correctly. */ hr = pCreateUri(http_urlW, 0, 0, &uri); - ok(hr == S_OK, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: CreateUri returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) { hr = IUri_GetAbsoluteUri(uri, NULL); - ok(hr == E_POINTER, "Error: GetAbsoluteUri returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); + ok(hr == E_POINTER, "Error: GetAbsoluteUri returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER);
hr = IUri_GetAuthority(uri, NULL); - ok(hr == E_POINTER, "Error: GetAuthority returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); + ok(hr == E_POINTER, "Error: GetAuthority returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER);
hr = IUri_GetDisplayUri(uri, NULL); - ok(hr == E_POINTER, "Error: GetDisplayUri returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); + ok(hr == E_POINTER, "Error: GetDisplayUri returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER);
hr = IUri_GetDomain(uri, NULL); - ok(hr == E_POINTER, "Error: GetDomain returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); + ok(hr == E_POINTER, "Error: GetDomain returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER);
hr = IUri_GetExtension(uri, NULL); - ok(hr == E_POINTER, "Error: GetExtension returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); + ok(hr == E_POINTER, "Error: GetExtension returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER);
hr = IUri_GetFragment(uri, NULL); - ok(hr == E_POINTER, "Error: GetFragment returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); + ok(hr == E_POINTER, "Error: GetFragment returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER);
hr = IUri_GetHost(uri, NULL); - ok(hr == E_POINTER, "Error: GetHost returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); + ok(hr == E_POINTER, "Error: GetHost returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER);
hr = IUri_GetPassword(uri, NULL); - ok(hr == E_POINTER, "Error: GetPassword returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); + ok(hr == E_POINTER, "Error: GetPassword returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER);
hr = IUri_GetPath(uri, NULL); - ok(hr == E_POINTER, "Error: GetPath returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); + ok(hr == E_POINTER, "Error: GetPath returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER);
hr = IUri_GetPathAndQuery(uri, NULL); - ok(hr == E_POINTER, "Error: GetPathAndQuery returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); + ok(hr == E_POINTER, "Error: GetPathAndQuery returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER);
hr = IUri_GetQuery(uri, NULL); - ok(hr == E_POINTER, "Error: GetQuery returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); + ok(hr == E_POINTER, "Error: GetQuery returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER);
hr = IUri_GetRawUri(uri, NULL); - ok(hr == E_POINTER, "Error: GetRawUri returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); + ok(hr == E_POINTER, "Error: GetRawUri returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER);
hr = IUri_GetSchemeName(uri, NULL); - ok(hr == E_POINTER, "Error: GetSchemeName returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); + ok(hr == E_POINTER, "Error: GetSchemeName returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER);
hr = IUri_GetUserInfo(uri, NULL); - ok(hr == E_POINTER, "Error: GetUserInfo returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); + ok(hr == E_POINTER, "Error: GetUserInfo returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER);
hr = IUri_GetUserName(uri, NULL); - ok(hr == E_POINTER, "Error: GetUserName returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); + ok(hr == E_POINTER, "Error: GetUserName returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER); } if(uri) IUri_Release(uri);
@@ -8089,7 +8089,7 @@ static void test_IUri_GetStrProperties(void) { uriW = a2w(test.uri); hr = pCreateUri(uriW, test.create_flags, 0, &uri); todo_wine_if(test.create_todo) - ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", + ok(hr == test.create_expected, "Error: CreateUri returned 0x%08lx, expected 0x%08lx on uri_tests[%ld].\n", hr, test.create_expected, i);
if(SUCCEEDED(hr)) { @@ -8100,10 +8100,10 @@ static void test_IUri_GetStrProperties(void) { prop = test.str_props[Uri_PROPERTY_ABSOLUTE_URI]; hr = IUri_GetAbsoluteUri(uri, &received); todo_wine_if(prop.todo) { - ok(hr == prop.expected, "Error: GetAbsoluteUri returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", + ok(hr == prop.expected, "Error: GetAbsoluteUri returned 0x%08lx, expected 0x%08lx on uri_tests[%ld].\n", hr, prop.expected, i); ok(!strcmp_aw(prop.value, received) || broken(prop.broken_value && !strcmp_aw(prop.broken_value, received)), - "Error: Expected %s but got %s on uri_tests[%d].\n", + "Error: Expected %s but got %s on uri_tests[%ld].\n", prop.value, wine_dbgstr_w(received), i); } SysFreeString(received); @@ -8113,9 +8113,9 @@ static void test_IUri_GetStrProperties(void) { prop = test.str_props[Uri_PROPERTY_AUTHORITY]; hr = IUri_GetAuthority(uri, &received); todo_wine_if(prop.todo) { - ok(hr == prop.expected, "Error: GetAuthority returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", + ok(hr == prop.expected, "Error: GetAuthority returned 0x%08lx, expected 0x%08lx on uri_tests[%ld].\n", hr, prop.expected, i); - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", + ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%ld].\n", prop.value, wine_dbgstr_w(received), i); } SysFreeString(received); @@ -8125,10 +8125,10 @@ static void test_IUri_GetStrProperties(void) { prop = test.str_props[Uri_PROPERTY_DISPLAY_URI]; hr = IUri_GetDisplayUri(uri, &received); todo_wine_if(prop.todo) { - ok(hr == prop.expected, "Error: GetDisplayUri returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", + ok(hr == prop.expected, "Error: GetDisplayUri returned 0x%08lx, expected 0x%08lx on uri_tests[%ld].\n", hr, prop.expected, i); ok(!strcmp_aw(prop.value, received) || broken(prop.broken_value && !strcmp_aw(prop.broken_value, received)), - "Error: Expected %s but got %s on uri_tests[%d].\n", + "Error: Expected %s but got %s on uri_tests[%ld].\n", prop.value, wine_dbgstr_w(received), i); } SysFreeString(received); @@ -8139,10 +8139,10 @@ static void test_IUri_GetStrProperties(void) { hr = IUri_GetDomain(uri, &received); todo_wine_if(prop.todo) { ok(hr == prop.expected || (prop.value2 && hr == prop.expected2), - "Error: GetDomain returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", + "Error: GetDomain returned 0x%08lx, expected 0x%08lx on uri_tests[%ld].\n", hr, prop.expected, i); ok(!strcmp_aw(prop.value, received) || (prop.value2 && !strcmp_aw(prop.value2, received)), - "Error: Expected %s but got %s on uri_tests[%d].\n", + "Error: Expected %s but got %s on uri_tests[%ld].\n", prop.value, wine_dbgstr_w(received), i); } SysFreeString(received); @@ -8152,9 +8152,9 @@ static void test_IUri_GetStrProperties(void) { prop = test.str_props[Uri_PROPERTY_EXTENSION]; hr = IUri_GetExtension(uri, &received); todo_wine_if(prop.todo) { - ok(hr == prop.expected, "Error: GetExtension returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", + ok(hr == prop.expected, "Error: GetExtension returned 0x%08lx, expected 0x%08lx on uri_tests[%ld].\n", hr, prop.expected, i); - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", + ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%ld].\n", prop.value, wine_dbgstr_w(received), i); } SysFreeString(received); @@ -8164,9 +8164,9 @@ static void test_IUri_GetStrProperties(void) { prop = test.str_props[Uri_PROPERTY_FRAGMENT]; hr = IUri_GetFragment(uri, &received); todo_wine_if(prop.todo) { - ok(hr == prop.expected, "Error: GetFragment returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", + ok(hr == prop.expected, "Error: GetFragment returned 0x%08lx, expected 0x%08lx on uri_tests[%ld].\n", hr, prop.expected, i); - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", + ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%ld].\n", prop.value, wine_dbgstr_w(received), i); } SysFreeString(received); @@ -8176,9 +8176,9 @@ static void test_IUri_GetStrProperties(void) { prop = test.str_props[Uri_PROPERTY_HOST]; hr = IUri_GetHost(uri, &received); todo_wine_if(prop.todo) { - ok(hr == prop.expected, "Error: GetHost returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", + ok(hr == prop.expected, "Error: GetHost returned 0x%08lx, expected 0x%08lx on uri_tests[%ld].\n", hr, prop.expected, i); - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", + ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%ld].\n", prop.value, wine_dbgstr_w(received), i); } SysFreeString(received); @@ -8188,9 +8188,9 @@ static void test_IUri_GetStrProperties(void) { prop = test.str_props[Uri_PROPERTY_PASSWORD]; hr = IUri_GetPassword(uri, &received); todo_wine_if(prop.todo) { - ok(hr == prop.expected, "Error: GetPassword returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", + ok(hr == prop.expected, "Error: GetPassword returned 0x%08lx, expected 0x%08lx on uri_tests[%ld].\n", hr, prop.expected, i); - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", + ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%ld].\n", prop.value, wine_dbgstr_w(received), i); } SysFreeString(received); @@ -8200,9 +8200,9 @@ static void test_IUri_GetStrProperties(void) { prop = test.str_props[Uri_PROPERTY_PATH]; hr = IUri_GetPath(uri, &received); todo_wine_if(prop.todo) { - ok(hr == prop.expected, "Error: GetPath returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", + ok(hr == prop.expected, "Error: GetPath returned 0x%08lx, expected 0x%08lx on uri_tests[%ld].\n", hr, prop.expected, i); - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", + ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%ld].\n", prop.value, wine_dbgstr_w(received), i); } SysFreeString(received); @@ -8212,9 +8212,9 @@ static void test_IUri_GetStrProperties(void) { prop = test.str_props[Uri_PROPERTY_PATH_AND_QUERY]; hr = IUri_GetPathAndQuery(uri, &received); todo_wine_if(prop.todo) { - ok(hr == prop.expected, "Error: GetPathAndQuery returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", + ok(hr == prop.expected, "Error: GetPathAndQuery returned 0x%08lx, expected 0x%08lx on uri_tests[%ld].\n", hr, prop.expected, i); - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", + ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%ld].\n", prop.value, wine_dbgstr_w(received), i); } SysFreeString(received); @@ -8224,9 +8224,9 @@ static void test_IUri_GetStrProperties(void) { prop = test.str_props[Uri_PROPERTY_QUERY]; hr = IUri_GetQuery(uri, &received); todo_wine_if(prop.todo) { - ok(hr == prop.expected, "Error: GetQuery returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", + ok(hr == prop.expected, "Error: GetQuery returned 0x%08lx, expected 0x%08lx on uri_tests[%ld].\n", hr, prop.expected, i); - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", + ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%ld].\n", prop.value, wine_dbgstr_w(received), i); } SysFreeString(received); @@ -8236,9 +8236,9 @@ static void test_IUri_GetStrProperties(void) { prop = test.str_props[Uri_PROPERTY_RAW_URI]; hr = IUri_GetRawUri(uri, &received); todo_wine_if(prop.todo) { - ok(hr == prop.expected, "Error: GetRawUri returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", + ok(hr == prop.expected, "Error: GetRawUri returned 0x%08lx, expected 0x%08lx on uri_tests[%ld].\n", hr, prop.expected, i); - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", + ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%ld].\n", prop.value, wine_dbgstr_w(received), i); } SysFreeString(received); @@ -8248,9 +8248,9 @@ static void test_IUri_GetStrProperties(void) { prop = test.str_props[Uri_PROPERTY_SCHEME_NAME]; hr = IUri_GetSchemeName(uri, &received); todo_wine_if(prop.todo) { - ok(hr == prop.expected, "Error: GetSchemeName returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", + ok(hr == prop.expected, "Error: GetSchemeName returned 0x%08lx, expected 0x%08lx on uri_tests[%ld].\n", hr, prop.expected, i); - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", + ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%ld].\n", prop.value, wine_dbgstr_w(received), i); } SysFreeString(received); @@ -8260,9 +8260,9 @@ static void test_IUri_GetStrProperties(void) { prop = test.str_props[Uri_PROPERTY_USER_INFO]; hr = IUri_GetUserInfo(uri, &received); todo_wine_if(prop.todo) { - ok(hr == prop.expected, "Error: GetUserInfo returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", + ok(hr == prop.expected, "Error: GetUserInfo returned 0x%08lx, expected 0x%08lx on uri_tests[%ld].\n", hr, prop.expected, i); - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", + ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%ld].\n", prop.value, wine_dbgstr_w(received), i); } SysFreeString(received); @@ -8272,9 +8272,9 @@ static void test_IUri_GetStrProperties(void) { prop = test.str_props[Uri_PROPERTY_USER_NAME]; hr = IUri_GetUserName(uri, &received); todo_wine_if(prop.todo) { - ok(hr == prop.expected, "Error: GetUserName returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", + ok(hr == prop.expected, "Error: GetUserName returned 0x%08lx, expected 0x%08lx on uri_tests[%ld].\n", hr, prop.expected, i); - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", + ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%ld].\n", prop.value, wine_dbgstr_w(received), i); } SysFreeString(received); @@ -8293,19 +8293,19 @@ static void test_IUri_GetDwordProperties(void) {
/* Make sure all the 'Get*' dword property functions handle invalid args correctly. */ hr = pCreateUri(http_urlW, 0, 0, &uri); - ok(hr == S_OK, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: CreateUri returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) { hr = IUri_GetHostType(uri, NULL); - ok(hr == E_INVALIDARG, "Error: GetHostType returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); + ok(hr == E_INVALIDARG, "Error: GetHostType returned 0x%08lx, expected 0x%08lx.\n", hr, E_INVALIDARG);
hr = IUri_GetPort(uri, NULL); - ok(hr == E_INVALIDARG, "Error: GetPort returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); + ok(hr == E_INVALIDARG, "Error: GetPort returned 0x%08lx, expected 0x%08lx.\n", hr, E_INVALIDARG);
hr = IUri_GetScheme(uri, NULL); - ok(hr == E_INVALIDARG, "Error: GetScheme returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); + ok(hr == E_INVALIDARG, "Error: GetScheme returned 0x%08lx, expected 0x%08lx.\n", hr, E_INVALIDARG);
hr = IUri_GetZone(uri, NULL); - ok(hr == E_INVALIDARG, "Error: GetZone returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); + ok(hr == E_INVALIDARG, "Error: GetZone returned 0x%08lx, expected 0x%08lx.\n", hr, E_INVALIDARG); } if(uri) IUri_Release(uri);
@@ -8317,7 +8317,7 @@ static void test_IUri_GetDwordProperties(void) { uriW = a2w(test.uri); hr = pCreateUri(uriW, test.create_flags, 0, &uri); todo_wine_if(test.create_todo) - ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", + ok(hr == test.create_expected, "Error: CreateUri returned 0x%08lx, expected 0x%08lx on uri_tests[%ld].\n", hr, test.create_expected, i);
if(SUCCEEDED(hr)) { @@ -8333,9 +8333,9 @@ static void test_IUri_GetDwordProperties(void) { prop = test.dword_props[Uri_PROPERTY_HOST_TYPE-Uri_PROPERTY_DWORD_START]; hr = IUri_GetHostType(uri, &received); todo_wine_if(prop.todo) { - ok(hr == prop.expected, "Error: GetHostType returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", + ok(hr == prop.expected, "Error: GetHostType returned 0x%08lx, expected 0x%08lx on uri_tests[%ld].\n", hr, prop.expected, i); - ok(received == prop.value, "Error: Expected %d but got %d on uri_tests[%d].\n", prop.value, received, i); + ok(received == prop.value, "Error: Expected %ld but got %ld on uri_tests[%ld].\n", prop.value, received, i); } received = -9999999;
@@ -8343,9 +8343,9 @@ static void test_IUri_GetDwordProperties(void) { prop = test.dword_props[Uri_PROPERTY_PORT-Uri_PROPERTY_DWORD_START]; hr = IUri_GetPort(uri, &received); todo_wine_if(prop.todo) { - ok(hr == prop.expected, "Error: GetPort returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", + ok(hr == prop.expected, "Error: GetPort returned 0x%08lx, expected 0x%08lx on uri_tests[%ld].\n", hr, prop.expected, i); - ok(received == prop.value, "Error: Expected %d but got %d on uri_tests[%d].\n", prop.value, received, i); + ok(received == prop.value, "Error: Expected %ld but got %ld on uri_tests[%ld].\n", prop.value, received, i); } received = -9999999;
@@ -8353,9 +8353,9 @@ static void test_IUri_GetDwordProperties(void) { prop = test.dword_props[Uri_PROPERTY_SCHEME-Uri_PROPERTY_DWORD_START]; hr = IUri_GetScheme(uri, &received); todo_wine_if(prop.todo) { - ok(hr == prop.expected, "Error: GetScheme returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", + ok(hr == prop.expected, "Error: GetScheme returned 0x%08lx, expected 0x%08lx on uri_tests[%ld].\n", hr, prop.expected, i); - ok(received == prop.value, "Error: Expected %d but got %d on uri_tests[%d].\n", prop.value, received, i); + ok(received == prop.value, "Error: Expected %ld but got %ld on uri_tests[%ld].\n", prop.value, received, i); } received = -9999999;
@@ -8363,9 +8363,9 @@ static void test_IUri_GetDwordProperties(void) { prop = test.dword_props[Uri_PROPERTY_ZONE-Uri_PROPERTY_DWORD_START]; hr = IUri_GetZone(uri, &received); todo_wine_if(prop.todo) { - ok(hr == prop.expected, "Error: GetZone returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", + ok(hr == prop.expected, "Error: GetZone returned 0x%08lx, expected 0x%08lx on uri_tests[%ld].\n", hr, prop.expected, i); - ok(received == prop.value, "Error: Expected %d but got %d on uri_tests[%d].\n", prop.value, received, i); + ok(received == prop.value, "Error: Expected %ld but got %ld on uri_tests[%ld].\n", prop.value, received, i); } }
@@ -8382,16 +8382,16 @@ static void test_IUri_GetPropertyLength(void) {
/* Make sure it handles invalid args correctly. */ hr = pCreateUri(http_urlW, 0, 0, &uri); - ok(hr == S_OK, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: CreateUri returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) { DWORD received = 0xdeadbeef;
hr = IUri_GetPropertyLength(uri, Uri_PROPERTY_STRING_START, NULL, 0); - ok(hr == E_INVALIDARG, "Error: GetPropertyLength returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); + ok(hr == E_INVALIDARG, "Error: GetPropertyLength returned 0x%08lx, expected 0x%08lx.\n", hr, E_INVALIDARG);
hr = IUri_GetPropertyLength(uri, Uri_PROPERTY_DWORD_START, &received, 0); - ok(hr == E_INVALIDARG, "Error: GetPropertyLength return 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); - ok(received == 0xdeadbeef, "Error: Expected 0xdeadbeef but got 0x%08x.\n", received); + ok(hr == E_INVALIDARG, "Error: GetPropertyLength return 0x%08lx, expected 0x%08lx.\n", hr, E_INVALIDARG); + ok(received == 0xdeadbeef, "Error: Expected 0xdeadbeef but got 0x%08lx.\n", received); } if(uri) IUri_Release(uri);
@@ -8403,7 +8403,7 @@ static void test_IUri_GetPropertyLength(void) { uriW = a2w(test.uri); hr = pCreateUri(uriW, test.create_flags, 0, &uri); todo_wine_if(test.create_todo) - ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x on uri_test[%d].\n", + ok(hr == test.create_expected, "Error: CreateUri returned 0x%08lx, expected 0x%08lx on uri_test[%ld].\n", hr, test.create_expected, i);
if(SUCCEEDED(hr)) { @@ -8426,11 +8426,11 @@ static void test_IUri_GetPropertyLength(void) { hr = IUri_GetPropertyLength(uri, j, &receivedLen, 0); todo_wine_if(prop.todo) { ok(hr == prop.expected || (prop.value2 && hr == prop.expected2), - "Error: GetPropertyLength returned 0x%08x, expected 0x%08x on uri_tests[%d].str_props[%d].\n", + "Error: GetPropertyLength returned 0x%08lx, expected 0x%08lx on uri_tests[%ld].str_props[%ld].\n", hr, prop.expected, i, j); ok(receivedLen == expectedLen || (prop.value2 && receivedLen == lstrlenA(prop.value2)) || broken(prop.broken_value && receivedLen == lstrlenA(prop.broken_value)), - "Error: Expected a length of %d but got %d on uri_tests[%d].str_props[%d].\n", + "Error: Expected a length of %ld but got %ld on uri_tests[%ld].str_props[%ld].\n", expectedLen, receivedLen, i, j); } } @@ -8472,10 +8472,10 @@ static void test_IUri_GetProperties(void) { DWORD i;
hr = pCreateUri(http_urlW, 0, 0, &uri); - ok(hr == S_OK, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: CreateUri returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) { hr = IUri_GetProperties(uri, NULL); - ok(hr == E_INVALIDARG, "Error: GetProperties returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); + ok(hr == E_INVALIDARG, "Error: GetProperties returned 0x%08lx, expected 0x%08lx.\n", hr, E_INVALIDARG); } if(uri) IUri_Release(uri);
@@ -8487,14 +8487,14 @@ static void test_IUri_GetProperties(void) { uriW = a2w(test.uri); hr = pCreateUri(uriW, test.create_flags, 0, &uri); todo_wine_if(test.create_todo) - ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr, test.create_expected); + ok(hr == test.create_expected, "Error: CreateUri returned 0x%08lx, expected 0x%08lx.\n", hr, test.create_expected);
if(SUCCEEDED(hr)) { DWORD received = 0, expected_props, mask; DWORD j;
hr = IUri_GetProperties(uri, &received); - ok(hr == S_OK, "Error: GetProperties returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: GetProperties returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK);
expected_props = compute_expected_props(&test, &mask);
@@ -8502,9 +8502,9 @@ static void test_IUri_GetProperties(void) { /* (1 << j) converts a Uri_PROPERTY to its corresponding Uri_HAS_* flag mask. */ if(mask & (1 << j)) { if(expected_props & (1 << j)) - ok(received & (1 << j), "Error: Expected flag for property %d on uri_tests[%d].\n", j, i); + ok(received & (1 << j), "Error: Expected flag for property %ld on uri_tests[%ld].\n", j, i); else - ok(!(received & (1 << j)), "Error: Received flag for property %d when not expected on uri_tests[%d].\n", j, i); + ok(!(received & (1 << j)), "Error: Received flag for property %ld when not expected on uri_tests[%ld].\n", j, i); } } } @@ -8521,10 +8521,10 @@ static void test_IUri_HasProperty(void) { DWORD i;
hr = pCreateUri(http_urlW, 0, 0, &uri); - ok(hr == S_OK, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: CreateUri returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) { hr = IUri_HasProperty(uri, Uri_PROPERTY_RAW_URI, NULL); - ok(hr == E_INVALIDARG, "Error: HasProperty returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); + ok(hr == E_INVALIDARG, "Error: HasProperty returned 0x%08lx, expected 0x%08lx.\n", hr, E_INVALIDARG); } if(uri) IUri_Release(uri);
@@ -8537,7 +8537,7 @@ static void test_IUri_HasProperty(void) {
hr = pCreateUri(uriW, test.create_flags, 0, &uri); todo_wine_if(test.create_todo) - ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr, test.create_expected); + ok(hr == test.create_expected, "Error: CreateUri returned 0x%08lx, expected 0x%08lx.\n", hr, test.create_expected);
if(SUCCEEDED(hr)) { DWORD expected_props, j, mask; @@ -8549,14 +8549,14 @@ static void test_IUri_HasProperty(void) { BOOL received = -1;
hr = IUri_HasProperty(uri, j, &received); - ok(hr == S_OK, "Error: HasProperty returned 0x%08x, expected 0x%08x for property %d on uri_tests[%d].\n", + ok(hr == S_OK, "Error: HasProperty returned 0x%08lx, expected 0x%08lx for property %ld on uri_tests[%ld].\n", hr, S_OK, j, i);
if(mask & (1 << j)) { if(expected_props & (1 << j)) { - ok(received == TRUE, "Error: Expected to have property %d on uri_tests[%d].\n", j, i); + ok(received == TRUE, "Error: Expected to have property %ld on uri_tests[%ld].\n", j, i); } else { - ok(received == FALSE, "Error: Wasn't expecting to have property %d on uri_tests[%d].\n", j, i); + ok(received == FALSE, "Error: Wasn't expecting to have property %ld on uri_tests[%ld].\n", j, i); } } } @@ -8796,26 +8796,26 @@ static void test_IUri_IsEqual(void) {
/* Make sure IsEqual handles invalid args correctly. */ hres = pCreateUri(http_urlW, 0, 0, &uriA); - ok(hres == S_OK, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hres, S_OK); + ok(hres == S_OK, "Error: CreateUri returned 0x%08lx, expected 0x%08lx.\n", hres, S_OK); hres = pCreateUri(http_urlW, 0, 0, &uriB); - ok(hres == S_OK, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hres, S_OK); + ok(hres == S_OK, "Error: CreateUri returned 0x%08lx, expected 0x%08lx.\n", hres, S_OK);
equal = -1; hres = IUri_IsEqual(uriA, NULL, &equal); - ok(hres == S_OK, "Error: IsEqual returned 0x%08x, expected 0x%08x.\n", hres, S_OK); + ok(hres == S_OK, "Error: IsEqual returned 0x%08lx, expected 0x%08lx.\n", hres, S_OK); ok(!equal, "Error: Expected equal to be FALSE, but was %d instead.\n", equal);
hres = IUri_IsEqual(uriA, uriB, NULL); - ok(hres == E_POINTER, "Error: IsEqual returned 0x%08x, expected 0x%08x.\n", hres, E_POINTER); + ok(hres == E_POINTER, "Error: IsEqual returned 0x%08lx, expected 0x%08lx.\n", hres, E_POINTER);
equal = FALSE; hres = IUri_IsEqual(uriA, uriA, &equal); - ok(hres == S_OK, "Error: IsEqual returned 0x%08x, expected 0x%08x.\n", hres, S_OK); + ok(hres == S_OK, "Error: IsEqual returned 0x%08lx, expected 0x%08lx.\n", hres, S_OK); ok(equal, "Error: Expected equal URIs.\n");
equal = FALSE; hres = IUri_IsEqual(uriA, uriB, &equal); - ok(hres == S_OK, "Error: IsEqual returned 0x%08x, expected 0x%08x.\n", hres, S_OK); + ok(hres == S_OK, "Error: IsEqual returned 0x%08lx, expected 0x%08lx.\n", hres, S_OK); ok(equal, "Error: Expected equal URIs.\n");
IUri_Release(uriA); @@ -8833,16 +8833,16 @@ static void test_IUri_IsEqual(void) { uriB_W = a2w(test.b);
hres = pCreateUri(uriA_W, test.create_flags_a, 0, &uriA); - ok(hres == S_OK, "Error: CreateUri returned 0x%08x, expected 0x%08x on equality_tests[%d].a\n", hres, S_OK, i); + ok(hres == S_OK, "Error: CreateUri returned 0x%08lx, expected 0x%08lx on equality_tests[%ld].a\n", hres, S_OK, i);
hres = pCreateUri(uriB_W, test.create_flags_b, 0, &uriB); - ok(hres == S_OK, "Error: CreateUri returned 0x%08x, expected 0x%08x on equality_tests[%d].b\n", hres, S_OK, i); + ok(hres == S_OK, "Error: CreateUri returned 0x%08lx, expected 0x%08lx on equality_tests[%ld].b\n", hres, S_OK, i);
equal = -1; hres = IUri_IsEqual(uriA, uriB, &equal); todo_wine_if(test.todo) { - ok(hres == S_OK, "Error: IsEqual returned 0x%08x, expected 0x%08x on equality_tests[%d].\n", hres, S_OK, i); - ok(equal == test.equal, "Error: Expected the comparison to be %d on equality_tests[%d].\n", test.equal, i); + ok(hres == S_OK, "Error: IsEqual returned 0x%08lx, expected 0x%08lx on equality_tests[%ld].\n", hres, S_OK, i); + ok(equal == test.equal, "Error: Expected the comparison to be %d on equality_tests[%ld].\n", test.equal, i); }
custom_uri.uri = uriB; @@ -8850,8 +8850,8 @@ static void test_IUri_IsEqual(void) { equal = -1; hres = IUri_IsEqual(uriA, &custom_uri.IUri_iface, &equal); todo_wine { - ok(hres == S_OK, "Error: IsEqual returned 0x%08x, expected 0x%08x on equality_tests[%d].\n", hres, S_OK, i); - ok(equal == test.equal, "Error: Expected the comparison to be %d on equality_tests[%d].\n", test.equal, i); + ok(hres == S_OK, "Error: IsEqual returned 0x%08lx, expected 0x%08lx on equality_tests[%ld].\n", hres, S_OK, i); + ok(equal == test.equal, "Error: Expected the comparison to be %d on equality_tests[%ld].\n", test.equal, i); }
if(uriA) IUri_Release(uriA); @@ -8868,16 +8868,16 @@ static void test_CreateUriWithFragment_InvalidArgs(void) { const WCHAR fragmentW[] = {'#','f','r','a','g','m','e','n','t',0};
hr = pCreateUriWithFragment(NULL, fragmentW, 0, 0, &uri); - ok(hr == E_INVALIDARG, "Error: CreateUriWithFragment returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); + ok(hr == E_INVALIDARG, "Error: CreateUriWithFragment returned 0x%08lx, expected 0x%08lx.\n", hr, E_INVALIDARG); ok(uri == NULL, "Error: Expected uri to be NULL, but was %p instead.\n", uri);
hr = pCreateUriWithFragment(http_urlW, fragmentW, 0, 0, NULL); - ok(hr == E_INVALIDARG, "Error: CreateUriWithFragment returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); + ok(hr == E_INVALIDARG, "Error: CreateUriWithFragment returned 0x%08lx, expected 0x%08lx.\n", hr, E_INVALIDARG);
/* Original URI can't already contain a fragment component. */ uri = (void*) 0xdeadbeef; hr = pCreateUriWithFragment(http_url_fragW, fragmentW, 0, 0, &uri); - ok(hr == E_INVALIDARG, "Error: CreateUriWithFragment returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); + ok(hr == E_INVALIDARG, "Error: CreateUriWithFragment returned 0x%08lx, expected 0x%08lx.\n", hr, E_INVALIDARG); ok(uri == NULL, "Error: Expected uri to be NULL, but was %p instead.\n", uri); }
@@ -8890,7 +8890,7 @@ static void test_CreateUriWithFragment_InvalidFlags(void) { IUri *uri = (void*) 0xdeadbeef;
hr = pCreateUriWithFragment(http_urlW, NULL, invalid_flag_tests[i].flags, 0, &uri); - ok(hr == invalid_flag_tests[i].expected, "Error: CreateUriWithFragment returned 0x%08x, expected 0x%08x. flags=0x%08x.\n", + ok(hr == invalid_flag_tests[i].expected, "Error: CreateUriWithFragment returned 0x%08lx, expected 0x%08lx. flags=0x%08lx.\n", hr, invalid_flag_tests[i].expected, invalid_flag_tests[i].flags); ok(uri == NULL, "Error: Expected uri to be NULL, but was %p instead.\n", uri); } @@ -8911,7 +8911,7 @@ static void test_CreateUriWithFragment(void) { hr = pCreateUriWithFragment(uriW, fragW, test.create_flags, 0, &uri); todo_wine_if(test.expected_todo) ok(hr == test.create_expected, - "Error: CreateUriWithFragment returned 0x%08x, expected 0x%08x on uri_fragment_tests[%d].\n", + "Error: CreateUriWithFragment returned 0x%08lx, expected 0x%08lx on uri_fragment_tests[%ld].\n", hr, test.create_expected, i);
if(SUCCEEDED(hr)) { @@ -8919,9 +8919,9 @@ static void test_CreateUriWithFragment(void) {
hr = IUri_GetAbsoluteUri(uri, &received); todo_wine_if(test.expected_todo) { - ok(hr == S_OK, "Error: GetAbsoluteUri returned 0x%08x, expected 0x%08x on uri_fragment_tests[%d].\n", + ok(hr == S_OK, "Error: GetAbsoluteUri returned 0x%08lx, expected 0x%08lx on uri_fragment_tests[%ld].\n", hr, S_OK, i); - ok(!strcmp_aw(test.expected_uri, received), "Error: Expected %s but got %s on uri_fragment_tests[%d].\n", + ok(!strcmp_aw(test.expected_uri, received), "Error: Expected %s but got %s on uri_fragment_tests[%ld].\n", test.expected_uri, wine_dbgstr_w(received), i); }
@@ -8940,26 +8940,26 @@ static void test_CreateIUriBuilder(void) { IUri *uri;
hr = pCreateIUriBuilder(NULL, 0, 0, NULL); - ok(hr == E_POINTER, "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x\n", + ok(hr == E_POINTER, "Error: CreateIUriBuilder returned 0x%08lx, expected 0x%08lx\n", hr, E_POINTER);
/* CreateIUriBuilder increases the ref count of the IUri it receives. */ hr = pCreateUri(http_urlW, 0, 0, &uri); - ok(hr == S_OK, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: CreateUri returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) { ULONG cur_count, orig_count;
orig_count = get_refcnt(uri); hr = pCreateIUriBuilder(uri, 0, 0, &builder); - ok(hr == S_OK, "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: CreateIUriBuilder returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); ok(builder != NULL, "Error: Expecting builder not to be NULL\n");
cur_count = get_refcnt(uri); - ok(cur_count == orig_count+1, "Error: Expected the ref count to be %u, but was %u instead.\n", orig_count+1, cur_count); + ok(cur_count == orig_count+1, "Error: Expected the ref count to be %lu, but was %lu instead.\n", orig_count+1, cur_count);
if(builder) IUriBuilder_Release(builder); cur_count = get_refcnt(uri); - ok(cur_count == orig_count, "Error: Expected the ref count to be %u, but was %u instead.\n", orig_count, cur_count); + ok(cur_count == orig_count, "Error: Expected the ref count to be %lu, but was %lu instead.\n", orig_count, cur_count); } if(uri) IUri_Release(uri); } @@ -8972,7 +8972,7 @@ static void test_IUriBuilder_CreateUri(IUriBuilder *builder, const uri_builder_t hr = IUriBuilder_CreateUri(builder, test->uri_flags, 0, 0, &uri); todo_wine_if(test->uri_todo) ok(hr == test->uri_hres, - "Error: IUriBuilder_CreateUri returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_CreateUri returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, test->uri_hres, test_index);
if(SUCCEEDED(hr)) { @@ -8985,12 +8985,12 @@ static void test_IUriBuilder_CreateUri(IUriBuilder *builder, const uri_builder_t hr = IUri_GetPropertyBSTR(uri, i, &received, 0); todo_wine_if(prop.todo) ok(hr == prop.result, - "Error: IUri_GetPropertyBSTR returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].expected_str_props[%d].\n", + "Error: IUri_GetPropertyBSTR returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].expected_str_props[%ld].\n", hr, prop.result, test_index, i); if(SUCCEEDED(hr)) { todo_wine_if(prop.todo) ok(!strcmp_aw(prop.expected, received), - "Error: Expected %s but got %s instead on uri_builder_tests[%d].expected_str_props[%d].\n", + "Error: Expected %s but got %s instead on uri_builder_tests[%ld].expected_str_props[%ld].\n", prop.expected, wine_dbgstr_w(received), test_index, i); } SysFreeString(received); @@ -9003,12 +9003,12 @@ static void test_IUriBuilder_CreateUri(IUriBuilder *builder, const uri_builder_t hr = IUri_GetPropertyDWORD(uri, i+Uri_PROPERTY_DWORD_START, &received, 0); todo_wine_if(prop.todo) ok(hr == prop.result, - "Error: IUri_GetPropertyDWORD returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].expected_dword_props[%d].\n", + "Error: IUri_GetPropertyDWORD returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].expected_dword_props[%ld].\n", hr, prop.result, test_index, i); if(SUCCEEDED(hr)) { todo_wine_if(prop.todo) ok(received == prop.expected, - "Error: Expected %d but got %d instead on uri_builder_tests[%d].expected_dword_props[%d].\n", + "Error: Expected %ld but got %ld instead on uri_builder_tests[%ld].expected_dword_props[%ld].\n", prop.expected, received, test_index, i); } } @@ -9024,7 +9024,7 @@ static void test_IUriBuilder_CreateUriSimple(IUriBuilder *builder, const uri_bui hr = IUriBuilder_CreateUriSimple(builder, test->uri_simple_encode_flags, 0, &uri); todo_wine_if(test->uri_simple_todo) ok(hr == test->uri_simple_hres, - "Error: IUriBuilder_CreateUriSimple returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_CreateUriSimple returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, test->uri_simple_hres, test_index);
if(SUCCEEDED(hr)) { @@ -9037,12 +9037,12 @@ static void test_IUriBuilder_CreateUriSimple(IUriBuilder *builder, const uri_bui hr = IUri_GetPropertyBSTR(uri, i, &received, 0); todo_wine_if(prop.todo) ok(hr == prop.result, - "Error: IUri_GetPropertyBSTR returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].expected_str_props[%d].\n", + "Error: IUri_GetPropertyBSTR returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].expected_str_props[%ld].\n", hr, prop.result, test_index, i); if(SUCCEEDED(hr)) { todo_wine_if(prop.todo) ok(!strcmp_aw(prop.expected, received), - "Error: Expected %s but got %s instead on uri_builder_tests[%d].expected_str_props[%d].\n", + "Error: Expected %s but got %s instead on uri_builder_tests[%ld].expected_str_props[%ld].\n", prop.expected, wine_dbgstr_w(received), test_index, i); } SysFreeString(received); @@ -9055,12 +9055,12 @@ static void test_IUriBuilder_CreateUriSimple(IUriBuilder *builder, const uri_bui hr = IUri_GetPropertyDWORD(uri, i+Uri_PROPERTY_DWORD_START, &received, 0); todo_wine_if(prop.todo) ok(hr == prop.result, - "Error: IUri_GetPropertyDWORD returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].expected_dword_props[%d].\n", + "Error: IUri_GetPropertyDWORD returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].expected_dword_props[%ld].\n", hr, prop.result, test_index, i); if(SUCCEEDED(hr)) { todo_wine_if(prop.todo) ok(received == prop.expected, - "Error: Expected %d but got %d instead on uri_builder_tests[%d].expected_dword_props[%d].\n", + "Error: Expected %ld but got %ld instead on uri_builder_tests[%ld].expected_dword_props[%ld].\n", prop.expected, received, test_index, i); } } @@ -9077,7 +9077,7 @@ static void test_IUriBuilder_CreateUriWithFlags(IUriBuilder *builder, const uri_ test->uri_with_encode_flags, 0, &uri); todo_wine_if(test->uri_with_todo) ok(hr == test->uri_with_hres, - "Error: IUriBuilder_CreateUriWithFlags returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_CreateUriWithFlags returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, test->uri_with_hres, test_index);
if(SUCCEEDED(hr)) { @@ -9090,12 +9090,12 @@ static void test_IUriBuilder_CreateUriWithFlags(IUriBuilder *builder, const uri_ hr = IUri_GetPropertyBSTR(uri, i, &received, 0); todo_wine_if(prop.todo) ok(hr == prop.result, - "Error: IUri_GetPropertyBSTR returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].expected_str_props[%d].\n", + "Error: IUri_GetPropertyBSTR returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].expected_str_props[%ld].\n", hr, prop.result, test_index, i); if(SUCCEEDED(hr)) { todo_wine_if(prop.todo) ok(!strcmp_aw(prop.expected, received), - "Error: Expected %s but got %s instead on uri_builder_tests[%d].expected_str_props[%d].\n", + "Error: Expected %s but got %s instead on uri_builder_tests[%ld].expected_str_props[%ld].\n", prop.expected, wine_dbgstr_w(received), test_index, i); } SysFreeString(received); @@ -9108,12 +9108,12 @@ static void test_IUriBuilder_CreateUriWithFlags(IUriBuilder *builder, const uri_ hr = IUri_GetPropertyDWORD(uri, i+Uri_PROPERTY_DWORD_START, &received, 0); todo_wine_if(prop.todo) ok(hr == prop.result, - "Error: IUri_GetPropertyDWORD returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].expected_dword_props[%d].\n", + "Error: IUri_GetPropertyDWORD returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].expected_dword_props[%ld].\n", hr, prop.result, test_index, i); if(SUCCEEDED(hr)) { todo_wine_if(prop.todo) ok(received == prop.expected, - "Error: Expected %d but got %d instead on uri_builder_tests[%d].expected_dword_props[%d].\n", + "Error: Expected %ld but got %ld instead on uri_builder_tests[%ld].expected_dword_props[%ld].\n", prop.expected, received, test_index, i); } } @@ -9126,84 +9126,84 @@ static void test_IUriBuilder_CreateInvalidArgs(void) { HRESULT hr;
hr = pCreateIUriBuilder(NULL, 0, 0, &builder); - ok(hr == S_OK, "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: CreateIUriBuilder returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) { IUri *test = NULL, *uri = (void*) 0xdeadbeef;
/* Test what happens if the IUriBuilder doesn't have a IUri set. */ hr = IUriBuilder_CreateUri(builder, 0, 0, 0, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_CreateUri returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); + ok(hr == E_POINTER, "Error: IUriBuilder_CreateUri returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER);
uri = (void*) 0xdeadbeef; hr = IUriBuilder_CreateUri(builder, 0, Uri_HAS_USER_NAME, 0, &uri); - ok(hr == E_NOTIMPL, "Error: IUriBuilder_CreateUri returned 0x%08x, expected 0x%08x.\n", hr, E_NOTIMPL); + ok(hr == E_NOTIMPL, "Error: IUriBuilder_CreateUri returned 0x%08lx, expected 0x%08lx.\n", hr, E_NOTIMPL); ok(uri == NULL, "Error: expected uri to be NULL, but was %p instead.\n", uri);
hr = IUriBuilder_CreateUriSimple(builder, 0, 0, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_CreateUriSimple returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: IUriBuilder_CreateUriSimple returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER);
uri = (void*) 0xdeadbeef; hr = IUriBuilder_CreateUriSimple(builder, Uri_HAS_USER_NAME, 0, &uri); - ok(hr == E_NOTIMPL, "Error: IUriBuilder_CreateUriSimple returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_NOTIMPL, "Error: IUriBuilder_CreateUriSimple returned 0x%08lx, expected 0x%08lx.\n", hr, E_NOTIMPL); ok(!uri, "Error: Expected uri to NULL, but was %p instead.\n", uri);
hr = IUriBuilder_CreateUriWithFlags(builder, 0, 0, 0, 0, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_CreateUriWithFlags returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: IUriBuilder_CreateUriWithFlags returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER);
uri = (void*) 0xdeadbeef; hr = IUriBuilder_CreateUriWithFlags(builder, 0, 0, Uri_HAS_USER_NAME, 0, &uri); - ok(hr == E_NOTIMPL, "Error: IUriBuilder_CreateUriWithFlags returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_NOTIMPL, "Error: IUriBuilder_CreateUriWithFlags returned 0x%08lx, expected 0x%08lx.\n", hr, E_NOTIMPL); ok(!uri, "Error: Expected uri to be NULL, but was %p instead.\n", uri);
hr = pCreateUri(http_urlW, 0, 0, &test); - ok(hr == S_OK, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: CreateUri returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) { hr = IUriBuilder_SetIUri(builder, test); - ok(hr == S_OK, "Error: IUriBuilder_SetIUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: IUriBuilder_SetIUri returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK);
/* No longer returns E_NOTIMPL, since a IUri has been set and hasn't been modified. */ uri = NULL; hr = IUriBuilder_CreateUri(builder, 0, Uri_HAS_USER_NAME, 0, &uri); - ok(hr == S_OK, "Error: IUriBuilder_CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: IUriBuilder_CreateUri returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); ok(uri != NULL, "Error: The uri was NULL.\n"); if(uri) IUri_Release(uri);
uri = NULL; hr = IUriBuilder_CreateUriSimple(builder, Uri_HAS_USER_NAME, 0, &uri); - ok(hr == S_OK, "Error: IUriBuilder_CreateUriSimple returned 0x%08x, expected 0x%08x.\n", + ok(hr == S_OK, "Error: IUriBuilder_CreateUriSimple returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); ok(uri != NULL, "Error: uri was NULL.\n"); if(uri) IUri_Release(uri);
uri = NULL; hr = IUriBuilder_CreateUriWithFlags(builder, 0, 0, 0, 0, &uri); - ok(hr == S_OK, "Error: IUriBuilder_CreateUriWithFlags returned 0x%08x, expected 0x%08x.\n", + ok(hr == S_OK, "Error: IUriBuilder_CreateUriWithFlags returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); ok(uri != NULL, "Error: uri was NULL.\n"); if(uri) IUri_Release(uri);
hr = IUriBuilder_SetFragment(builder, NULL); - ok(hr == S_OK, "Error: IUriBuilder_SetFragment returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: IUriBuilder_SetFragment returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK);
/* The IUriBuilder is changed, so it returns E_NOTIMPL again. */ uri = (void*) 0xdeadbeef; hr = IUriBuilder_CreateUri(builder, 0, Uri_HAS_USER_NAME, 0, &uri); - ok(hr == E_NOTIMPL, "Error: IUriBuilder_CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == E_NOTIMPL, "Error: IUriBuilder_CreateUri returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); ok(!uri, "Error: Expected uri to be NULL but was %p instead.\n", uri);
uri = (void*) 0xdeadbeef; hr = IUriBuilder_CreateUriSimple(builder, Uri_HAS_USER_NAME, 0, &uri); - ok(hr == E_NOTIMPL, "Error: IUriBuilder_CreateUriSimple returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_NOTIMPL, "Error: IUriBuilder_CreateUriSimple returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); ok(!uri, "Error: Expected uri to be NULL, but was %p instead.\n", uri);
uri = (void*) 0xdeadbeef; hr = IUriBuilder_CreateUriWithFlags(builder, 0, 0, Uri_HAS_USER_NAME, 0, &uri); - ok(hr == E_NOTIMPL, "Error: IUriBuilder_CreateUriWithFlags returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_NOTIMPL, "Error: IUriBuilder_CreateUriWithFlags returned 0x%08lx, expected 0x%08lx.\n", hr, E_NOTIMPL); ok(!uri, "Error: Expected uri to be NULL, but was %p instead.\n", uri); } @@ -9218,119 +9218,119 @@ static void test_IUriBuilder_GetInvalidArgs(void) { HRESULT hr;
hr = pCreateIUriBuilder(NULL, 0, 0, &builder); - ok(hr == S_OK, "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: CreateIUriBuilder returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) { LPCWSTR received = (void*) 0xdeadbeef; DWORD len = -1, port = -1; BOOL set = -1;
hr = IUriBuilder_GetFragment(builder, NULL, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetFragment returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: IUriBuilder_GetFragment returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER); hr = IUriBuilder_GetFragment(builder, NULL, &received); - ok(hr == E_POINTER, "Error: IUriBuilder_GetFragment returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: IUriBuilder_GetFragment returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER); ok(!received, "Error: Expected received to be NULL, but was %p instead.\n", received); hr = IUriBuilder_GetFragment(builder, &len, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetFragment returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: IUriBuilder_GetFragment returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER); - ok(!len, "Error: Expected len to be 0, but was %d instead.\n", len); + ok(!len, "Error: Expected len to be 0, but was %ld instead.\n", len);
hr = IUriBuilder_GetHost(builder, NULL, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetHost returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: IUriBuilder_GetHost returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER); received = (void*) 0xdeadbeef; hr = IUriBuilder_GetHost(builder, NULL, &received); - ok(hr == E_POINTER, "Error: IUriBuilder_GetHost returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: IUriBuilder_GetHost returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER); ok(!received, "Error: Expected received to be NULL, but was %p instead.\n", received); len = -1; hr = IUriBuilder_GetHost(builder, &len, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetHost returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: IUriBuilder_GetHost returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER); - ok(!len, "Error: Expected len to be 0, but was %d instead.\n", len); + ok(!len, "Error: Expected len to be 0, but was %ld instead.\n", len);
hr = IUriBuilder_GetPassword(builder, NULL, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetPassword returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: IUriBuilder_GetPassword returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER); received = (void*) 0xdeadbeef; hr = IUriBuilder_GetPassword(builder, NULL, &received); - ok(hr == E_POINTER, "Error: IUriBuilder_GetPassword returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: IUriBuilder_GetPassword returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER); ok(!received, "Error: Expected received to be NULL, but was %p instead.\n", received); len = -1; hr = IUriBuilder_GetPassword(builder, &len, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetPassword returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: IUriBuilder_GetPassword returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER); - ok(!len, "Error: Expected len to be 0, but was %d instead.\n", len); + ok(!len, "Error: Expected len to be 0, but was %ld instead.\n", len);
hr = IUriBuilder_GetPath(builder, NULL, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetPath returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: IUriBuilder_GetPath returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER); received = (void*) 0xdeadbeef; hr = IUriBuilder_GetPath(builder, NULL, &received); - ok(hr == E_POINTER, "Error: IUriBuilder_GetPath returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: IUriBuilder_GetPath returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER); ok(!received, "Error: Expected received to be NULL, but was %p instead.\n", received); len = -1; hr = IUriBuilder_GetPath(builder, &len, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetPath returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: IUriBuilder_GetPath returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER); - ok(!len, "Error: Expected len to be 0, but was %d instead.\n", len); + ok(!len, "Error: Expected len to be 0, but was %ld instead.\n", len);
hr = IUriBuilder_GetPort(builder, NULL, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetPort returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: IUriBuilder_GetPort returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER); hr = IUriBuilder_GetPort(builder, NULL, &port); - ok(hr == E_POINTER, "Error: IUriBuilder_GetPort returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: IUriBuilder_GetPort returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER); - ok(!port, "Error: Expected port to be 0, but was %d instead.\n", port); + ok(!port, "Error: Expected port to be 0, but was %ld instead.\n", port); hr = IUriBuilder_GetPort(builder, &set, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetPort returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: IUriBuilder_GetPort returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER); ok(!set, "Error: Expected set to be FALSE, but was %d instead.\n", set);
hr = IUriBuilder_GetQuery(builder, NULL, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetQuery returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: IUriBuilder_GetQuery returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER); received = (void*) 0xdeadbeef; hr = IUriBuilder_GetQuery(builder, NULL, &received); - ok(hr == E_POINTER, "Error: IUriBuilder_GetQuery returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: IUriBuilder_GetQuery returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER); ok(!received, "Error: Expected received to be NULL, but was %p instead.\n", received); len = -1; hr = IUriBuilder_GetQuery(builder, &len, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetQuery returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: IUriBuilder_GetQuery returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER); - ok(!len, "Error: Expected len to be 0, but was %d instead.\n", len); + ok(!len, "Error: Expected len to be 0, but was %ld instead.\n", len);
hr = IUriBuilder_GetSchemeName(builder, NULL, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetSchemeName returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: IUriBuilder_GetSchemeName returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER); received = (void*) 0xdeadbeef; hr = IUriBuilder_GetSchemeName(builder, NULL, &received); - ok(hr == E_POINTER, "Error: IUriBuilder_GetSchemeName returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: IUriBuilder_GetSchemeName returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER); ok(!received, "Error: Expected received to be NULL, but was %p instead.\n", received); len = -1; hr = IUriBuilder_GetSchemeName(builder, &len, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetSchemeName returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: IUriBuilder_GetSchemeName returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER); - ok(!len, "Error: Expected len to be 0, but was %d instead.\n", len); + ok(!len, "Error: Expected len to be 0, but was %ld instead.\n", len);
hr = IUriBuilder_GetUserName(builder, NULL, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetUserName returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: IUriBuilder_GetUserName returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER); received = (void*) 0xdeadbeef; hr = IUriBuilder_GetUserName(builder, NULL, &received); - ok(hr == E_POINTER, "Error: IUriBuilder_GetUserName returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: IUriBuilder_GetUserName returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER); ok(!received, "Error: Expected received to be NULL, but was %p instead.\n", received); len = -1; hr = IUriBuilder_GetUserName(builder, &len, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetUserName returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: IUriBuilder_GetUserName returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER); - ok(!len, "Error: Expected len to be 0, but was %d instead.\n", len); + ok(!len, "Error: Expected len to be 0, but was %ld instead.\n", len); } if(builder) IUriBuilder_Release(builder); } @@ -9356,13 +9356,13 @@ static void test_IUriBuilder_GetFragment(IUriBuilder *builder, const uri_builder hr = IUriBuilder_GetFragment(builder, &len, &received); todo_wine_if(prop->todo) { ok(hr == (expected ? S_OK : S_FALSE), - "Error: IUriBuilder_GetFragment returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetFragment returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, (expected ? S_OK : S_FALSE), test_index); if(SUCCEEDED(hr)) { - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", + ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%ld].\n", expected, wine_dbgstr_w(received), test_index); ok(expected_len == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", + "Error: Expected the length to be %ld, but was %ld instead on uri_builder_tests[%ld].\n", expected_len, len, test_index); } } @@ -9373,7 +9373,7 @@ static void test_IUriBuilder_GetFragment(IUriBuilder *builder, const uri_builder IUri *uri = NULL; hr = IUriBuilder_GetIUri(builder, &uri); ok(hr == S_OK, - "Error: IUriBuilder_GetIUri returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetIUri returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_OK, test_index); if(SUCCEEDED(hr)) { if(!uri) { @@ -9382,12 +9382,12 @@ static void test_IUriBuilder_GetFragment(IUriBuilder *builder, const uri_builder
hr = IUriBuilder_GetFragment(builder, &len, &received); ok(hr == S_FALSE, - "Error: IUriBuilder_GetFragment returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetFragment returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_FALSE, test_index); if(SUCCEEDED(hr)) { - ok(!len, "Error: Expected len to be 0, but was %d instead on uri_builder_tests[%d].\n", + ok(!len, "Error: Expected len to be 0, but was %ld instead on uri_builder_tests[%ld].\n", len, test_index); - ok(!received, "Error: Expected received to be NULL, but was %p instead on uri_builder_tests[%d].\n", + ok(!received, "Error: Expected received to be NULL, but was %p instead on uri_builder_tests[%ld].\n", received, test_index); } } else { @@ -9396,30 +9396,30 @@ static void test_IUriBuilder_GetFragment(IUriBuilder *builder, const uri_builder
hr = IUri_GetFragment(uri, &expected); ok(SUCCEEDED(hr), - "Error: Expected IUri_GetFragment to succeed, but got 0x%08x instead on uri_builder_tests[%d].\n", + "Error: Expected IUri_GetFragment to succeed, but got 0x%08lx instead on uri_builder_tests[%ld].\n", hr, test_index); has_prop = hr == S_OK;
hr = IUriBuilder_GetFragment(builder, &len, &received); if(has_prop) { ok(hr == S_OK, - "Error: IUriBuilder_GetFragment returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetFragment returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_OK, test_index); if(SUCCEEDED(hr)) { ok(!lstrcmpW(expected, received), - "Error: Expected %s but got %s instead on uri_builder_tests[%d].\n", + "Error: Expected %s but got %s instead on uri_builder_tests[%ld].\n", wine_dbgstr_w(expected), wine_dbgstr_w(received), test_index); ok(lstrlenW(expected) == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", + "Error: Expected the length to be %d, but was %ld instead on uri_builder_tests[%ld].\n", lstrlenW(expected), len, test_index); } } else { ok(hr == S_FALSE, - "Error: IUriBuilder_GetFragment returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetFragment returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_FALSE, test_index); if(SUCCEEDED(hr)) { - ok(!received, "Error: Expected received to be NULL on uri_builder_tests[%d].\n", test_index); - ok(!len, "Error: Expected the length to be 0, but was %d instead on uri_builder_tests[%d].\n", + ok(!received, "Error: Expected received to be NULL on uri_builder_tests[%ld].\n", test_index); + ok(!len, "Error: Expected the length to be 0, but was %ld instead on uri_builder_tests[%ld].\n", len, test_index); } } @@ -9451,13 +9451,13 @@ static void test_IUriBuilder_GetHost(IUriBuilder *builder, const uri_builder_tes hr = IUriBuilder_GetHost(builder, &len, &received); todo_wine_if(prop->todo) { ok(hr == (expected ? S_OK : S_FALSE), - "Error: IUriBuilder_GetHost returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetHost returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, (expected ? S_OK : S_FALSE), test_index); if(SUCCEEDED(hr)) { - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", + ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%ld].\n", expected, wine_dbgstr_w(received), test_index); ok(expected_len == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", + "Error: Expected the length to be %ld, but was %ld instead on uri_builder_tests[%ld].\n", expected_len, len, test_index); } } @@ -9468,7 +9468,7 @@ static void test_IUriBuilder_GetHost(IUriBuilder *builder, const uri_builder_tes IUri *uri = NULL; hr = IUriBuilder_GetIUri(builder, &uri); ok(hr == S_OK, - "Error: IUriBuilder_GetIUri returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetIUri returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_OK, test_index); if(SUCCEEDED(hr)) { if(!uri) { @@ -9477,12 +9477,12 @@ static void test_IUriBuilder_GetHost(IUriBuilder *builder, const uri_builder_tes
hr = IUriBuilder_GetHost(builder, &len, &received); ok(hr == S_FALSE, - "Error: IUriBuilder_GetHost returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetHost returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_FALSE, test_index); if(SUCCEEDED(hr)) { - ok(!len, "Error: Expected len to be 0, but was %d instead on uri_builder_tests[%d].\n", + ok(!len, "Error: Expected len to be 0, but was %ld instead on uri_builder_tests[%ld].\n", len, test_index); - ok(!received, "Error: Expected received to be NULL, but was %p instead on uri_builder_tests[%d].\n", + ok(!received, "Error: Expected received to be NULL, but was %p instead on uri_builder_tests[%ld].\n", received, test_index); } } else { @@ -9491,30 +9491,30 @@ static void test_IUriBuilder_GetHost(IUriBuilder *builder, const uri_builder_tes
hr = IUri_GetHost(uri, &expected); ok(SUCCEEDED(hr), - "Error: Expected IUri_GetHost to succeed, but got 0x%08x instead on uri_builder_tests[%d].\n", + "Error: Expected IUri_GetHost to succeed, but got 0x%08lx instead on uri_builder_tests[%ld].\n", hr, test_index); has_prop = hr == S_OK;
hr = IUriBuilder_GetHost(builder, &len, &received); if(has_prop) { ok(hr == S_OK, - "Error: IUriBuilder_GetHost returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetHost returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_OK, test_index); if(SUCCEEDED(hr)) { ok(!lstrcmpW(expected, received), - "Error: Expected %s but got %s instead on uri_builder_tests[%d].\n", + "Error: Expected %s but got %s instead on uri_builder_tests[%ld].\n", wine_dbgstr_w(expected), wine_dbgstr_w(received), test_index); ok(lstrlenW(expected) == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", + "Error: Expected the length to be %d, but was %ld instead on uri_builder_tests[%ld].\n", lstrlenW(expected), len, test_index); } } else { ok(hr == S_FALSE, - "Error: IUriBuilder_GetHost returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetHost returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_FALSE, test_index); if(SUCCEEDED(hr)) { - ok(!received, "Error: Expected received to be NULL on uri_builder_tests[%d].\n", test_index); - ok(!len, "Error: Expected the length to be 0, but was %d instead on uri_builder_tests[%d].\n", + ok(!received, "Error: Expected received to be NULL on uri_builder_tests[%ld].\n", test_index); + ok(!len, "Error: Expected the length to be 0, but was %ld instead on uri_builder_tests[%ld].\n", len, test_index); } } @@ -9546,13 +9546,13 @@ static void test_IUriBuilder_GetPassword(IUriBuilder *builder, const uri_builder hr = IUriBuilder_GetPassword(builder, &len, &received); todo_wine_if(prop->todo) { ok(hr == (expected ? S_OK : S_FALSE), - "Error: IUriBuilder_GetPassword returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetPassword returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, (expected ? S_OK : S_FALSE), test_index); if(SUCCEEDED(hr)) { - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", + ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%ld].\n", expected, wine_dbgstr_w(received), test_index); ok(expected_len == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", + "Error: Expected the length to be %ld, but was %ld instead on uri_builder_tests[%ld].\n", expected_len, len, test_index); } } @@ -9563,7 +9563,7 @@ static void test_IUriBuilder_GetPassword(IUriBuilder *builder, const uri_builder IUri *uri = NULL; hr = IUriBuilder_GetIUri(builder, &uri); ok(hr == S_OK, - "Error: IUriBuilder_GetIUri returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetIUri returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_OK, test_index); if(SUCCEEDED(hr)) { if(!uri) { @@ -9572,12 +9572,12 @@ static void test_IUriBuilder_GetPassword(IUriBuilder *builder, const uri_builder
hr = IUriBuilder_GetPassword(builder, &len, &received); ok(hr == S_FALSE, - "Error: IUriBuilder_GetPassword returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetPassword returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_FALSE, test_index); if(SUCCEEDED(hr)) { - ok(!len, "Error: Expected len to be 0, but was %d instead on uri_builder_tests[%d].\n", + ok(!len, "Error: Expected len to be 0, but was %ld instead on uri_builder_tests[%ld].\n", len, test_index); - ok(!received, "Error: Expected received to be NULL, but was %p instead on uri_builder_tests[%d].\n", + ok(!received, "Error: Expected received to be NULL, but was %p instead on uri_builder_tests[%ld].\n", received, test_index); } } else { @@ -9586,30 +9586,30 @@ static void test_IUriBuilder_GetPassword(IUriBuilder *builder, const uri_builder
hr = IUri_GetPassword(uri, &expected); ok(SUCCEEDED(hr), - "Error: Expected IUri_GetPassword to succeed, but got 0x%08x instead on uri_builder_tests[%d].\n", + "Error: Expected IUri_GetPassword to succeed, but got 0x%08lx instead on uri_builder_tests[%ld].\n", hr, test_index); has_prop = hr == S_OK;
hr = IUriBuilder_GetPassword(builder, &len, &received); if(has_prop) { ok(hr == S_OK, - "Error: IUriBuilder_GetPassword returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetPassword returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_OK, test_index); if(SUCCEEDED(hr)) { ok(!lstrcmpW(expected, received), - "Error: Expected %s but got %s instead on uri_builder_tests[%d].\n", + "Error: Expected %s but got %s instead on uri_builder_tests[%ld].\n", wine_dbgstr_w(expected), wine_dbgstr_w(received), test_index); ok(lstrlenW(expected) == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", + "Error: Expected the length to be %d, but was %ld instead on uri_builder_tests[%ld].\n", lstrlenW(expected), len, test_index); } } else { ok(hr == S_FALSE, - "Error: IUriBuilder_GetPassword returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetPassword returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_FALSE, test_index); if(SUCCEEDED(hr)) { - ok(!received, "Error: Expected received to be NULL on uri_builder_tests[%d].\n", test_index); - ok(!len, "Error: Expected the length to be 0, but was %d instead on uri_builder_tests[%d].\n", + ok(!received, "Error: Expected received to be NULL on uri_builder_tests[%ld].\n", test_index); + ok(!len, "Error: Expected the length to be 0, but was %ld instead on uri_builder_tests[%ld].\n", len, test_index); } } @@ -9641,13 +9641,13 @@ static void test_IUriBuilder_GetPath(IUriBuilder *builder, const uri_builder_tes hr = IUriBuilder_GetPath(builder, &len, &received); todo_wine_if(prop->todo) { ok(hr == (expected ? S_OK : S_FALSE), - "Error: IUriBuilder_GetPath returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetPath returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, (expected ? S_OK : S_FALSE), test_index); if(SUCCEEDED(hr)) { - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", + ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%ld].\n", expected, wine_dbgstr_w(received), test_index); ok(expected_len == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", + "Error: Expected the length to be %ld, but was %ld instead on uri_builder_tests[%ld].\n", expected_len, len, test_index); } } @@ -9658,7 +9658,7 @@ static void test_IUriBuilder_GetPath(IUriBuilder *builder, const uri_builder_tes IUri *uri = NULL; hr = IUriBuilder_GetIUri(builder, &uri); ok(hr == S_OK, - "Error: IUriBuilder_GetIUri returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetIUri returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_OK, test_index); if(SUCCEEDED(hr)) { if(!uri) { @@ -9667,12 +9667,12 @@ static void test_IUriBuilder_GetPath(IUriBuilder *builder, const uri_builder_tes
hr = IUriBuilder_GetPath(builder, &len, &received); ok(hr == S_FALSE, - "Error: IUriBuilder_GetPath returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetPath returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_FALSE, test_index); if(SUCCEEDED(hr)) { - ok(!len, "Error: Expected len to be 0, but was %d instead on uri_builder_tests[%d].\n", + ok(!len, "Error: Expected len to be 0, but was %ld instead on uri_builder_tests[%ld].\n", len, test_index); - ok(!received, "Error: Expected received to be NULL, but was %p instead on uri_builder_tests[%d].\n", + ok(!received, "Error: Expected received to be NULL, but was %p instead on uri_builder_tests[%ld].\n", received, test_index); } } else { @@ -9681,30 +9681,30 @@ static void test_IUriBuilder_GetPath(IUriBuilder *builder, const uri_builder_tes
hr = IUri_GetPath(uri, &expected); ok(SUCCEEDED(hr), - "Error: Expected IUri_GetPath to succeed, but got 0x%08x instead on uri_builder_tests[%d].\n", + "Error: Expected IUri_GetPath to succeed, but got 0x%08lx instead on uri_builder_tests[%ld].\n", hr, test_index); has_prop = hr == S_OK;
hr = IUriBuilder_GetPath(builder, &len, &received); if(has_prop) { ok(hr == S_OK, - "Error: IUriBuilder_GetPath returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetPath returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_OK, test_index); if(SUCCEEDED(hr)) { ok(!lstrcmpW(expected, received), - "Error: Expected %s but got %s instead on uri_builder_tests[%d].\n", + "Error: Expected %s but got %s instead on uri_builder_tests[%ld].\n", wine_dbgstr_w(expected), wine_dbgstr_w(received), test_index); ok(lstrlenW(expected) == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", + "Error: Expected the length to be %d, but was %ld instead on uri_builder_tests[%ld].\n", lstrlenW(expected), len, test_index); } } else { ok(hr == S_FALSE, - "Error: IUriBuilder_GetPath returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetPath returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_FALSE, test_index); if(SUCCEEDED(hr)) { - ok(!received, "Error: Expected received to be NULL on uri_builder_tests[%d].\n", test_index); - ok(!len, "Error: Expected the length to be 0, but was %d instead on uri_builder_tests[%d].\n", + ok(!received, "Error: Expected received to be NULL on uri_builder_tests[%ld].\n", test_index); + ok(!len, "Error: Expected the length to be 0, but was %ld instead on uri_builder_tests[%ld].\n", len, test_index); } } @@ -9725,14 +9725,14 @@ static void test_IUriBuilder_GetPort(IUriBuilder *builder, const uri_builder_tes hr = IUriBuilder_GetPort(builder, &has_port, &received); todo_wine_if(test->port_prop.todo) { ok(hr == S_OK, - "Error: IUriBuilder_GetPort returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetPort returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_OK, test_index); if(SUCCEEDED(hr)) { ok(has_port == test->port_prop.set, - "Error: Expected has_port to be %d, but was %d instead on uri_builder_tests[%d].\n", + "Error: Expected has_port to be %d, but was %d instead on uri_builder_tests[%ld].\n", test->port_prop.set, has_port, test_index); ok(received == test->port_prop.value, - "Error: Expected port to be %d, but was %d instead on uri_builder_tests[%d].\n", + "Error: Expected port to be %ld, but was %ld instead on uri_builder_tests[%ld].\n", test->port_prop.value, received, test_index); } } @@ -9741,19 +9741,19 @@ static void test_IUriBuilder_GetPort(IUriBuilder *builder, const uri_builder_tes
hr = IUriBuilder_GetIUri(builder, &uri); ok(hr == S_OK, - "Error: IUriBuilder_GetIUri returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetIUri returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_OK, test_index); if(SUCCEEDED(hr)) { if(!uri) { hr = IUriBuilder_GetPort(builder, &has_port, &received); ok(hr == S_OK, - "Error: IUriBuilder_GetPort returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetPort returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_OK, test_index); if(SUCCEEDED(hr)) { ok(has_port == FALSE, - "Error: Expected has_port to be FALSE, but was %d instead on uri_builder_tests[%d].\n", + "Error: Expected has_port to be FALSE, but was %d instead on uri_builder_tests[%ld].\n", has_port, test_index); - ok(!received, "Error: Expected received to be 0, but was %d instead on uri_builder_tests[%d].\n", + ok(!received, "Error: Expected received to be 0, but was %ld instead on uri_builder_tests[%ld].\n", received, test_index); } } else { @@ -9761,19 +9761,19 @@ static void test_IUriBuilder_GetPort(IUriBuilder *builder, const uri_builder_tes
hr = IUri_GetPort(uri, &expected); ok(SUCCEEDED(hr), - "Error: Expected IUri_Port to succeed, but got 0x%08x instead on uri_builder_tests[%d].\n", + "Error: Expected IUri_Port to succeed, but got 0x%08lx instead on uri_builder_tests[%ld].\n", hr, test_index);
hr = IUriBuilder_GetPort(builder, &has_port, &received); ok(hr == S_OK, - "Error: IUriBuilder_GetPort returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetPort returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_OK, test_index); if(SUCCEEDED(hr)) { ok(!has_port, - "Error: Expected has_port to be FALSE but was TRUE instead on uri_builder_tests[%d].\n", + "Error: Expected has_port to be FALSE but was TRUE instead on uri_builder_tests[%ld].\n", test_index); ok(received == expected, - "Error: Expected received to be %d, but was %d instead on uri_builder_tests[%d].\n", + "Error: Expected received to be %ld, but was %ld instead on uri_builder_tests[%ld].\n", expected, received, test_index); } } @@ -9803,13 +9803,13 @@ static void test_IUriBuilder_GetQuery(IUriBuilder *builder, const uri_builder_te hr = IUriBuilder_GetQuery(builder, &len, &received); todo_wine_if(prop->todo) { ok(hr == (expected ? S_OK : S_FALSE), - "Error: IUriBuilder_GetQuery returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetQuery returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, (expected ? S_OK : S_FALSE), test_index); if(SUCCEEDED(hr)) { - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", + ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%ld].\n", expected, wine_dbgstr_w(received), test_index); ok(expected_len == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", + "Error: Expected the length to be %ld, but was %ld instead on uri_builder_tests[%ld].\n", expected_len, len, test_index); } } @@ -9820,7 +9820,7 @@ static void test_IUriBuilder_GetQuery(IUriBuilder *builder, const uri_builder_te IUri *uri = NULL; hr = IUriBuilder_GetIUri(builder, &uri); ok(hr == S_OK, - "Error: IUriBuilder_GetIUri returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetIUri returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_OK, test_index); if(SUCCEEDED(hr)) { if(!uri) { @@ -9829,12 +9829,12 @@ static void test_IUriBuilder_GetQuery(IUriBuilder *builder, const uri_builder_te
hr = IUriBuilder_GetQuery(builder, &len, &received); ok(hr == S_FALSE, - "Error: IUriBuilder_GetQuery returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetQuery returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_FALSE, test_index); if(SUCCEEDED(hr)) { - ok(!len, "Error: Expected len to be 0, but was %d instead on uri_builder_tests[%d].\n", + ok(!len, "Error: Expected len to be 0, but was %ld instead on uri_builder_tests[%ld].\n", len, test_index); - ok(!received, "Error: Expected received to be NULL, but was %p instead on uri_builder_tests[%d].\n", + ok(!received, "Error: Expected received to be NULL, but was %p instead on uri_builder_tests[%ld].\n", received, test_index); } } else { @@ -9843,30 +9843,30 @@ static void test_IUriBuilder_GetQuery(IUriBuilder *builder, const uri_builder_te
hr = IUri_GetQuery(uri, &expected); ok(SUCCEEDED(hr), - "Error: Expected IUri_GetQuery to succeed, but got 0x%08x instead on uri_builder_tests[%d].\n", + "Error: Expected IUri_GetQuery to succeed, but got 0x%08lx instead on uri_builder_tests[%ld].\n", hr, test_index); has_prop = hr == S_OK;
hr = IUriBuilder_GetQuery(builder, &len, &received); if(has_prop) { ok(hr == S_OK, - "Error: IUriBuilder_GetQuery returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetQuery returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_OK, test_index); if(SUCCEEDED(hr)) { ok(!lstrcmpW(expected, received), - "Error: Expected %s but got %s instead on uri_builder_tests[%d].\n", + "Error: Expected %s but got %s instead on uri_builder_tests[%ld].\n", wine_dbgstr_w(expected), wine_dbgstr_w(received), test_index); ok(lstrlenW(expected) == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", + "Error: Expected the length to be %d, but was %ld instead on uri_builder_tests[%ld].\n", lstrlenW(expected), len, test_index); } } else { ok(hr == S_FALSE, - "Error: IUriBuilder_GetQuery returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetQuery returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_FALSE, test_index); if(SUCCEEDED(hr)) { - ok(!received, "Error: Expected received to be NULL on uri_builder_tests[%d].\n", test_index); - ok(!len, "Error: Expected the length to be 0, but was %d instead on uri_builder_tests[%d].\n", + ok(!received, "Error: Expected received to be NULL on uri_builder_tests[%ld].\n", test_index); + ok(!len, "Error: Expected the length to be 0, but was %ld instead on uri_builder_tests[%ld].\n", len, test_index); } } @@ -9898,13 +9898,13 @@ static void test_IUriBuilder_GetSchemeName(IUriBuilder *builder, const uri_build hr = IUriBuilder_GetSchemeName(builder, &len, &received); todo_wine_if(prop->todo) { ok(hr == (expected ? S_OK : S_FALSE), - "Error: IUriBuilder_GetSchemeName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetSchemeName returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, (expected ? S_OK : S_FALSE), test_index); if(SUCCEEDED(hr)) { - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", + ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%ld].\n", expected, wine_dbgstr_w(received), test_index); ok(expected_len == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", + "Error: Expected the length to be %ld, but was %ld instead on uri_builder_tests[%ld].\n", expected_len, len, test_index); } } @@ -9915,7 +9915,7 @@ static void test_IUriBuilder_GetSchemeName(IUriBuilder *builder, const uri_build IUri *uri = NULL; hr = IUriBuilder_GetIUri(builder, &uri); ok(hr == S_OK, - "Error: IUriBuilder_GetIUri returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetIUri returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_OK, test_index); if(SUCCEEDED(hr)) { if(!uri) { @@ -9924,12 +9924,12 @@ static void test_IUriBuilder_GetSchemeName(IUriBuilder *builder, const uri_build
hr = IUriBuilder_GetSchemeName(builder, &len, &received); ok(hr == S_FALSE, - "Error: IUriBuilder_GetSchemeName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetSchemeName returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_FALSE, test_index); if(SUCCEEDED(hr)) { - ok(!len, "Error: Expected len to be 0, but was %d instead on uri_builder_tests[%d].\n", + ok(!len, "Error: Expected len to be 0, but was %ld instead on uri_builder_tests[%ld].\n", len, test_index); - ok(!received, "Error: Expected received to be NULL, but was %p instead on uri_builder_tests[%d].\n", + ok(!received, "Error: Expected received to be NULL, but was %p instead on uri_builder_tests[%ld].\n", received, test_index); } } else { @@ -9938,30 +9938,30 @@ static void test_IUriBuilder_GetSchemeName(IUriBuilder *builder, const uri_build
hr = IUri_GetSchemeName(uri, &expected); ok(SUCCEEDED(hr), - "Error: Expected IUri_GetSchemeName to succeed, but got 0x%08x instead on uri_builder_tests[%d].\n", + "Error: Expected IUri_GetSchemeName to succeed, but got 0x%08lx instead on uri_builder_tests[%ld].\n", hr, test_index); has_prop = hr == S_OK;
hr = IUriBuilder_GetSchemeName(builder, &len, &received); if(has_prop) { ok(hr == S_OK, - "Error: IUriBuilder_GetSchemeName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetSchemeName returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_OK, test_index); if(SUCCEEDED(hr)) { ok(!lstrcmpW(expected, received), - "Error: Expected %s but got %s instead on uri_builder_tests[%d].\n", + "Error: Expected %s but got %s instead on uri_builder_tests[%ld].\n", wine_dbgstr_w(expected), wine_dbgstr_w(received), test_index); ok(lstrlenW(expected) == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", + "Error: Expected the length to be %d, but was %ld instead on uri_builder_tests[%ld].\n", lstrlenW(expected), len, test_index); } } else { ok(hr == S_FALSE, - "Error: IUriBuilder_GetSchemeName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetSchemeName returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_FALSE, test_index); if(SUCCEEDED(hr)) { - ok(!received, "Error: Expected received to be NULL on uri_builder_tests[%d].\n", test_index); - ok(!len, "Error: Expected the length to be 0, but was %d instead on uri_builder_tests[%d].\n", + ok(!received, "Error: Expected received to be NULL on uri_builder_tests[%ld].\n", test_index); + ok(!len, "Error: Expected the length to be 0, but was %ld instead on uri_builder_tests[%ld].\n", len, test_index); } } @@ -9993,13 +9993,13 @@ static void test_IUriBuilder_GetUserName(IUriBuilder *builder, const uri_builder hr = IUriBuilder_GetUserName(builder, &len, &received); todo_wine_if(prop->todo) { ok(hr == (expected ? S_OK : S_FALSE), - "Error: IUriBuilder_GetUserName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetUserName returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, (expected ? S_OK : S_FALSE), test_index); if(SUCCEEDED(hr)) { - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", + ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%ld].\n", expected, wine_dbgstr_w(received), test_index); ok(expected_len == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", + "Error: Expected the length to be %ld, but was %ld instead on uri_builder_tests[%ld].\n", expected_len, len, test_index); } } @@ -10010,7 +10010,7 @@ static void test_IUriBuilder_GetUserName(IUriBuilder *builder, const uri_builder IUri *uri = NULL; hr = IUriBuilder_GetIUri(builder, &uri); ok(hr == S_OK, - "Error: IUriBuilder_GetIUri returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetIUri returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_OK, test_index); if(SUCCEEDED(hr)) { if(!uri) { @@ -10019,12 +10019,12 @@ static void test_IUriBuilder_GetUserName(IUriBuilder *builder, const uri_builder
hr = IUriBuilder_GetUserName(builder, &len, &received); ok(hr == S_FALSE, - "Error: IUriBuilder_GetUserName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetUserName returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_FALSE, test_index); if(SUCCEEDED(hr)) { - ok(!len, "Error: Expected len to be 0, but was %d instead on uri_builder_tests[%d].\n", + ok(!len, "Error: Expected len to be 0, but was %ld instead on uri_builder_tests[%ld].\n", len, test_index); - ok(!received, "Error: Expected received to be NULL, but was %p instead on uri_builder_tests[%d].\n", + ok(!received, "Error: Expected received to be NULL, but was %p instead on uri_builder_tests[%ld].\n", received, test_index); } } else { @@ -10033,30 +10033,30 @@ static void test_IUriBuilder_GetUserName(IUriBuilder *builder, const uri_builder
hr = IUri_GetUserName(uri, &expected); ok(SUCCEEDED(hr), - "Error: Expected IUri_GetUserName to succeed, but got 0x%08x instead on uri_builder_tests[%d].\n", + "Error: Expected IUri_GetUserName to succeed, but got 0x%08lx instead on uri_builder_tests[%ld].\n", hr, test_index); has_prop = hr == S_OK;
hr = IUriBuilder_GetUserName(builder, &len, &received); if(has_prop) { ok(hr == S_OK, - "Error: IUriBuilder_GetUserName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetUserName returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_OK, test_index); if(SUCCEEDED(hr)) { ok(!lstrcmpW(expected, received), - "Error: Expected %s but got %s instead on uri_builder_tests[%d].\n", + "Error: Expected %s but got %s instead on uri_builder_tests[%ld].\n", wine_dbgstr_w(expected), wine_dbgstr_w(received), test_index); ok(lstrlenW(expected) == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", + "Error: Expected the length to be %d, but was %ld instead on uri_builder_tests[%ld].\n", lstrlenW(expected), len, test_index); } } else { ok(hr == S_FALSE, - "Error: IUriBuilder_GetUserName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_GetUserName returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_FALSE, test_index); if(SUCCEEDED(hr)) { - ok(!received, "Error: Expected received to be NULL on uri_builder_tests[%d].\n", test_index); - ok(!len, "Error: Expected the length to be 0, but was %d instead on uri_builder_tests[%d].\n", + ok(!received, "Error: Expected received to be NULL on uri_builder_tests[%ld].\n", test_index); + ok(!len, "Error: Expected the length to be 0, but was %ld instead on uri_builder_tests[%ld].\n", len, test_index); } } @@ -10081,14 +10081,14 @@ static void test_IUriBuilder(void) { if(test.uri) { uriW = a2w(test.uri); hr = pCreateUri(uriW, test.create_flags, 0, &uri); - ok(hr == S_OK, "Error: CreateUri returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + ok(hr == S_OK, "Error: CreateUri returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_OK, i); if(FAILED(hr)) continue; } hr = pCreateIUriBuilder(uri, 0, 0, &builder); todo_wine_if(test.create_builder_todo) ok(hr == test.create_builder_expected, - "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: CreateIUriBuilder returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, test.create_builder_expected, i); if(SUCCEEDED(hr)) { DWORD j; @@ -10115,17 +10115,17 @@ static void test_IUriBuilder(void) { modified = TRUE; todo_wine_if(test.port_prop.todo) ok(hr == test.port_prop.expected, - "Error: IUriBuilder_SetPort returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error: IUriBuilder_SetPort returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, test.port_prop.expected, i); }
hr = IUriBuilder_HasBeenModified(builder, &received); ok(hr == S_OK, - "Error IUriBuilder_HasBeenModified returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", + "Error IUriBuilder_HasBeenModified returned 0x%08lx, expected 0x%08lx on uri_builder_tests[%ld].\n", hr, S_OK, i); if(SUCCEEDED(hr)) ok(received == modified, - "Error: Expected received to be %d but was %d instead on uri_builder_tests[%d].\n", + "Error: Expected received to be %d but was %d instead on uri_builder_tests[%ld].\n", modified, received, i);
/* Test the "Get*" functions. */ @@ -10153,98 +10153,98 @@ static void test_IUriBuilder_HasBeenModified(void) { IUriBuilder *builder = NULL;
hr = pCreateIUriBuilder(NULL, 0, 0, &builder); - ok(hr == S_OK, "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: CreateIUriBuilder returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) { static const WCHAR hostW[] = {'g','o','o','g','l','e','.','c','o','m',0}; IUri *uri = NULL; BOOL received;
hr = IUriBuilder_HasBeenModified(builder, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_HasBeenModified returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: IUriBuilder_HasBeenModified returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER);
hr = IUriBuilder_SetHost(builder, hostW); - ok(hr == S_OK, "Error: IUriBuilder_SetHost returned 0x%08x, expected 0x%08x.\n", + ok(hr == S_OK, "Error: IUriBuilder_SetHost returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK);
hr = IUriBuilder_HasBeenModified(builder, &received); - ok(hr == S_OK, "Error: IUriBuilder_HasBeenModified returned 0x%08x, expected 0x%08x.\n", + ok(hr == S_OK, "Error: IUriBuilder_HasBeenModified returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) ok(received == TRUE, "Error: Expected received to be TRUE.\n");
hr = pCreateUri(http_urlW, 0, 0, &uri); - ok(hr == S_OK, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: CreateUri returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) { LPCWSTR prop; DWORD len = -1;
hr = IUriBuilder_SetIUri(builder, uri); - ok(hr == S_OK, "Error: IUriBuilder_SetIUri returned 0x%08x, expected 0x%08x.\n", + ok(hr == S_OK, "Error: IUriBuilder_SetIUri returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK);
hr = IUriBuilder_HasBeenModified(builder, &received); - ok(hr == S_OK, "Error: IUriBuilder_HasBeenModified returned 0x%08x, expected 0x%08x.\n", + ok(hr == S_OK, "Error: IUriBuilder_HasBeenModified returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) ok(received == FALSE, "Error: Expected received to be FALSE.\n");
/* Test what happens with you call SetIUri with the same IUri again. */ hr = IUriBuilder_SetHost(builder, hostW); - ok(hr == S_OK, "Error: IUriBuilder_SetHost returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: IUriBuilder_SetHost returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK);
hr = IUriBuilder_HasBeenModified(builder, &received); - ok(hr == S_OK, "Error: IUriBuilder_HasBeenModified returned 0x%08x, expected 0x%08x.\n", + ok(hr == S_OK, "Error: IUriBuilder_HasBeenModified returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) ok(received == TRUE, "Error: Expected received to be TRUE.\n");
hr = IUriBuilder_SetIUri(builder, uri); - ok(hr == S_OK, "Error: IUriBuilder_SetIUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: IUriBuilder_SetIUri returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK);
/* IUriBuilder already had 'uri' as its IUri property and so Windows doesn't * reset any of the changes that were made to the IUriBuilder. */ hr = IUriBuilder_HasBeenModified(builder, &received); - ok(hr == S_OK, "Error: IUriBuilder_HasBeenModified returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: IUriBuilder_HasBeenModified returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) ok(received == TRUE, "Error: Expected received to be TRUE.\n");
hr = IUriBuilder_GetHost(builder, &len, &prop); - ok(hr == S_OK, "Error: IUriBuilder_GetHost returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: IUriBuilder_GetHost returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) { ok(!lstrcmpW(prop, hostW), "Error: Expected %s but got %s instead.\n", wine_dbgstr_w(hostW), wine_dbgstr_w(prop)); - ok(len == lstrlenW(hostW), "Error: Expected len to be %d, but was %d instead.\n", + ok(len == lstrlenW(hostW), "Error: Expected len to be %d, but was %ld instead.\n", lstrlenW(hostW), len); }
hr = IUriBuilder_SetIUri(builder, NULL); - ok(hr == S_OK, "Error: IUriBuilder_SetIUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: IUriBuilder_SetIUri returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK);
hr = IUriBuilder_SetHost(builder, hostW); - ok(hr == S_OK, "Error: IUriBuilder_SetHost returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: IUriBuilder_SetHost returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); hr = IUriBuilder_HasBeenModified(builder, &received); - ok(hr == S_OK, "Error: IUriBuilder_HasBeenModified returned 0x%08x, expected 0x%08x.\n", + ok(hr == S_OK, "Error: IUriBuilder_HasBeenModified returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) ok(received == TRUE, "Error: Expected received to be TRUE.\n");
hr = IUriBuilder_SetIUri(builder, NULL); - ok(hr == S_OK, "Error: IUriBuilder_SetIUri returned 0x%08x, expected 0x%09x.\n", hr, S_OK); + ok(hr == S_OK, "Error: IUriBuilder_SetIUri returned 0x%08lx, expected 0x%09lx.\n", hr, S_OK);
hr = IUriBuilder_HasBeenModified(builder, &received); - ok(hr == S_OK, "Error: IUriBuilder_HasBeenModified returned 0x%08x, expected 0x%08x.\n", + ok(hr == S_OK, "Error: IUriBuilder_HasBeenModified returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) ok(received == TRUE, "Error: Expected received to be TRUE.\n");
hr = IUriBuilder_GetHost(builder, &len, &prop); - ok(hr == S_OK, "Error: IUriBuilder_GetHost returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: IUriBuilder_GetHost returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) { ok(!lstrcmpW(prop, hostW), "Error: Expected %s but got %s instead.\n", wine_dbgstr_w(hostW), wine_dbgstr_w(prop)); - ok(len == lstrlenW(hostW), "Error: Expected len to %d, but was %d instead.\n", + ok(len == lstrlenW(hostW), "Error: Expected len to %d, but was %ld instead.\n", lstrlenW(hostW), len); } } @@ -10259,12 +10259,12 @@ static void test_IUriBuilder_IUriProperty(void) { HRESULT hr;
hr = pCreateIUriBuilder(NULL, 0, 0, &builder); - ok(hr == S_OK, "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: CreateIUriBuilder returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) { IUri *uri = NULL;
hr = IUriBuilder_GetIUri(builder, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetIUri returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: IUriBuilder_GetIUri returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER);
hr = pCreateUri(http_urlW, 0, 0, &uri); @@ -10277,25 +10277,25 @@ static void test_IUriBuilder_IUriProperty(void) { hr = IUriBuilder_SetIUri(builder, uri); cur_count = get_refcnt(uri); if(SUCCEEDED(hr)) - ok(cur_count == orig_count+1, "Error: Expected uri ref count to be %d, but was %d instead.\n", + ok(cur_count == orig_count+1, "Error: Expected uri ref count to be %ld, but was %ld instead.\n", orig_count+1, cur_count);
hr = IUriBuilder_SetIUri(builder, NULL); cur_count = get_refcnt(uri); if(SUCCEEDED(hr)) - ok(cur_count == orig_count, "Error: Expected uri ref count to be %d, but was %d instead.\n", + ok(cur_count == orig_count, "Error: Expected uri ref count to be %ld, but was %ld instead.\n", orig_count, cur_count);
/* CreateUri* functions will return back the same IUri if nothing has changed. */ hr = IUriBuilder_SetIUri(builder, uri); - ok(hr == S_OK, "Error: IUriBuilder_SetIUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: IUriBuilder_SetIUri returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); orig_count = get_refcnt(uri);
hr = IUriBuilder_CreateUri(builder, 0, 0, 0, &test); - ok(hr == S_OK, "Error: IUriBuilder_CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: IUriBuilder_CreateUri returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) { cur_count = get_refcnt(uri); - ok(cur_count == orig_count+1, "Error: Expected uri ref count to be %d, but was %d instead.\n", + ok(cur_count == orig_count+1, "Error: Expected uri ref count to be %ld, but was %ld instead.\n", orig_count+1, cur_count); ok(test == uri, "Error: Expected test to be %p, but was %p instead.\n", uri, test); @@ -10304,10 +10304,10 @@ static void test_IUriBuilder_IUriProperty(void) {
test = NULL; hr = IUriBuilder_CreateUri(builder, -1, 0, 0, &test); - ok(hr == S_OK, "Error: IUriBuilder_CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: IUriBuilder_CreateUri returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) { cur_count = get_refcnt(uri); - ok(cur_count == orig_count+1, "Error: Expected uri ref count to be %d, but was %d instead.\n", + ok(cur_count == orig_count+1, "Error: Expected uri ref count to be %ld, but was %ld instead.\n", orig_count+1, cur_count); ok(test == uri, "Error: Expected test to be %p, but was %p instead.\n", uri, test); } @@ -10318,7 +10318,7 @@ static void test_IUriBuilder_IUriProperty(void) { */ test = NULL; hr = IUriBuilder_CreateUri(builder, Uri_CREATE_ALLOW_RELATIVE, 0, 0, &test); - ok(hr == S_OK, "Error: IUriBuilder_CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: IUriBuilder_CreateUri returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) ok(test != uri, "Error: Wasn't expecting 'test' to be 'uri'\n");
@@ -10329,10 +10329,10 @@ static void test_IUriBuilder_IUriProperty(void) { */ test = NULL; hr = IUriBuilder_CreateUri(builder, Uri_CREATE_CANONICALIZE, 0, 0, &test); - ok(hr == S_OK, "Error: IUriBuilder_CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: IUriBuilder_CreateUri returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) { cur_count = get_refcnt(uri); - ok(cur_count == orig_count+1, "Error: Expected uri ref count to be %d, but was %d instead.\n", + ok(cur_count == orig_count+1, "Error: Expected uri ref count to be %ld, but was %ld instead.\n", orig_count+1, cur_count); ok(test == uri, "Error: Expected 'test' to be %p, but was %p instead.\n", uri, test); } @@ -10340,10 +10340,10 @@ static void test_IUriBuilder_IUriProperty(void) {
test = NULL; hr = IUriBuilder_CreateUriSimple(builder, 0, 0, &test); - ok(hr == S_OK, "Error: IUriBuilder_CreateUriSimple returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: IUriBuilder_CreateUriSimple returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) { cur_count = get_refcnt(uri); - ok(cur_count == orig_count+1, "Error: Expected uri ref count to be %d, but was %d instead.\n", + ok(cur_count == orig_count+1, "Error: Expected uri ref count to be %ld, but was %ld instead.\n", orig_count+1, cur_count); ok(test == uri, "Error: Expected test to be %p, but was %p instead.\n", uri, test); } @@ -10351,11 +10351,11 @@ static void test_IUriBuilder_IUriProperty(void) {
test = NULL; hr = IUriBuilder_CreateUriWithFlags(builder, 0, 0, 0, 0, &test); - ok(hr == S_OK, "Error: IUriBuilder_CreateUriWithFlags returned 0x%08x, expected 0x%08x.\n", + ok(hr == S_OK, "Error: IUriBuilder_CreateUriWithFlags returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) { cur_count = get_refcnt(uri); - ok(cur_count == orig_count+1, "Error: Expected uri ref count to be %d, but was %d instead.\n", + ok(cur_count == orig_count+1, "Error: Expected uri ref count to be %ld, but was %ld instead.\n", orig_count+1, cur_count); ok(test == uri, "Error: Expected test to be %p, but was %p instead.\n", uri, test); } @@ -10366,7 +10366,7 @@ static void test_IUriBuilder_IUriProperty(void) { */ test = NULL; hr = IUriBuilder_CreateUriWithFlags(builder, Uri_CREATE_ALLOW_RELATIVE, 0, 0, 0, &test); - ok(hr == S_OK, "Error: IUriBuilder_CreateUriWithFlags returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: IUriBuilder_CreateUriWithFlags returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) ok(test != uri, "Error: Wasn't expecting 'test' to be 'uri'\n");
@@ -10377,10 +10377,10 @@ static void test_IUriBuilder_IUriProperty(void) { */ test = NULL; hr = IUriBuilder_CreateUriWithFlags(builder, Uri_CREATE_CANONICALIZE, 0, 0, 0, &test); - ok(hr == S_OK, "Error: IUriBuilder_CreateUriWithFlags returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: IUriBuilder_CreateUriWithFlags returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) { cur_count = get_refcnt(uri); - ok(cur_count == orig_count+1, "Error: Expected uri ref count to be %d, but was %d instead.\n", + ok(cur_count == orig_count+1, "Error: Expected uri ref count to be %ld, but was %ld instead.\n", orig_count+1, cur_count); ok(test == uri, "Error: Expected 'test' to be %p, but was %p instead.\n", uri, test); } @@ -10397,7 +10397,7 @@ static void test_IUriBuilder_RemoveProperties(void) { DWORD i;
hr = pCreateIUriBuilder(NULL, 0, 0, &builder); - ok(hr == S_OK, "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: CreateIUriBuilder returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) { /* Properties that can't be removed. */ const DWORD invalid = Uri_HAS_ABSOLUTE_URI|Uri_HAS_DISPLAY_URI|Uri_HAS_RAW_URI|Uri_HAS_HOST_TYPE| @@ -10407,11 +10407,11 @@ static void test_IUriBuilder_RemoveProperties(void) { hr = IUriBuilder_RemoveProperties(builder, i << 1); if((i << 1) & invalid) { ok(hr == E_INVALIDARG, - "Error: IUriBuilder_RemoveProperties returned 0x%08x, expected 0x%08x with prop=%d.\n", + "Error: IUriBuilder_RemoveProperties returned 0x%08lx, expected 0x%08lx with prop=%ld.\n", hr, E_INVALIDARG, i); } else { ok(hr == S_OK, - "Error: IUriBuilder_RemoveProperties returned 0x%08x, expected 0x%08x with prop=%d.\n", + "Error: IUriBuilder_RemoveProperties returned 0x%08lx, expected 0x%08lx with prop=%ld.\n", hr, S_OK, i); } } @@ -10420,7 +10420,7 @@ static void test_IUriBuilder_RemoveProperties(void) { * Uri_HAS flags. */ hr = IUriBuilder_RemoveProperties(builder, (Uri_PROPERTY_DWORD_LAST+1) << 1); - ok(hr == E_INVALIDARG, "Error: IUriBuilder_RemoveProperties returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_INVALIDARG, "Error: IUriBuilder_RemoveProperties returned 0x%08lx, expected 0x%08lx.\n", hr, E_INVALIDARG); } if(builder) IUriBuilder_Release(builder); @@ -10438,14 +10438,14 @@ static void test_IUriBuilder_RemoveProperties(void) { hr = pCreateIUriBuilder(uri, 0, 0, &builder); todo_wine_if(test.create_builder_todo) ok(hr == test.create_builder_expected, - "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x on test %d.\n", + "Error: CreateIUriBuilder returned 0x%08lx, expected 0x%08lx on test %ld.\n", hr, test.create_builder_expected, i);
if(SUCCEEDED(hr)) { hr = IUriBuilder_RemoveProperties(builder, test.remove_properties); todo_wine_if(test.remove_todo) ok(hr == test.remove_expected, - "Error: IUriBuilder returned 0x%08x, expected 0x%08x on test %d.\n", + "Error: IUriBuilder returned 0x%08lx, expected 0x%08lx on test %ld.\n", hr, test.remove_expected, i); if(SUCCEEDED(hr)) { IUri *result = NULL; @@ -10453,15 +10453,15 @@ static void test_IUriBuilder_RemoveProperties(void) { hr = IUriBuilder_CreateUri(builder, test.expected_flags, 0, 0, &result); todo_wine_if(test.expected_todo) ok(hr == test.expected_hres, - "Error: IUriBuilder_CreateUri returned 0x%08x, expected 0x%08x on test %d.\n", + "Error: IUriBuilder_CreateUri returned 0x%08lx, expected 0x%08lx on test %ld.\n", hr, test.expected_hres, i); if(SUCCEEDED(hr)) { BSTR received = NULL;
hr = IUri_GetAbsoluteUri(result, &received); - ok(hr == S_OK, "Error: Expected S_OK, but got 0x%08x instead.\n", hr); + ok(hr == S_OK, "Error: Expected S_OK, but got 0x%08lx instead.\n", hr); ok(!strcmp_aw(test.expected_uri, received), - "Error: Expected %s but got %s instead on test %d.\n", + "Error: Expected %s but got %s instead on test %ld.\n", test.expected_uri, wine_dbgstr_w(received), i); SysFreeString(received); } @@ -10484,18 +10484,18 @@ static void test_IUriBuilder_Misc(void) { IUriBuilder *builder;
hr = pCreateIUriBuilder(uri, 0, 0, &builder); - ok(hr == S_OK, "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: CreateIUriBuilder returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) { BOOL has = -1; DWORD port = -1;
hr = IUriBuilder_GetPort(builder, &has, &port); - ok(hr == S_OK, "Error: IUriBuilder_GetPort returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: IUriBuilder_GetPort returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) { /* 'has' will be set to FALSE, even though uri had a port. */ ok(has == FALSE, "Error: Expected 'has' to be FALSE, was %d instead.\n", has); /* Still sets 'port' to 80. */ - ok(port == 80, "Error: Expected the port to be 80, but, was %d instead.\n", port); + ok(port == 80, "Error: Expected the port to be 80, but, was %ld instead.\n", port); } } if(builder) IUriBuilder_Release(builder); @@ -10510,33 +10510,33 @@ static void test_IUriBuilderFactory(void) { IUriBuilder *builder;
hr = pCreateUri(http_urlW, 0, 0, &uri); - ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08x.\n", hr); + ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08lx.\n", hr); if(SUCCEEDED(hr)) { factory = NULL; hr = IUri_QueryInterface(uri, &IID_IUriBuilderFactory, (void**)&factory); - ok(hr == S_OK, "Error: Expected S_OK, but got 0x%08x.\n", hr); + ok(hr == S_OK, "Error: Expected S_OK, but got 0x%08lx.\n", hr); ok(factory != NULL, "Error: Expected 'factory' to not be NULL.\n");
if(SUCCEEDED(hr)) { builder = (void*) 0xdeadbeef; hr = IUriBuilderFactory_CreateIUriBuilder(factory, 10, 0, &builder); - ok(hr == E_INVALIDARG, "Error: CreateInitializedIUriBuilder returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_INVALIDARG, "Error: CreateInitializedIUriBuilder returned 0x%08lx, expected 0x%08lx.\n", hr, E_INVALIDARG); ok(!builder, "Error: Expected 'builder' to be NULL, but was %p.\n", builder);
builder = (void*) 0xdeadbeef; hr = IUriBuilderFactory_CreateIUriBuilder(factory, 0, 10, &builder); - ok(hr == E_INVALIDARG, "Error: CreateInitializedIUriBuilder returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_INVALIDARG, "Error: CreateInitializedIUriBuilder returned 0x%08lx, expected 0x%08lx.\n", hr, E_INVALIDARG); ok(!builder, "Error: Expected 'builder' to be NULL, but was %p.\n", builder);
hr = IUriBuilderFactory_CreateIUriBuilder(factory, 0, 0, NULL); - ok(hr == E_POINTER, "Error: CreateInitializedIUriBuilder returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: CreateInitializedIUriBuilder returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER);
builder = NULL; hr = IUriBuilderFactory_CreateIUriBuilder(factory, 0, 0, &builder); - ok(hr == S_OK, "Error: CreateInitializedIUriBuilder returned 0x%08x, expected 0x%08x.\n", + ok(hr == S_OK, "Error: CreateInitializedIUriBuilder returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) { IUri *tmp = (void*) 0xdeadbeef; @@ -10544,41 +10544,41 @@ static void test_IUriBuilderFactory(void) { DWORD result_len;
hr = IUriBuilder_GetIUri(builder, &tmp); - ok(hr == S_OK, "Error: GetIUri returned 0x%08x, expected 0x%08x.\n", + ok(hr == S_OK, "Error: GetIUri returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); ok(!tmp, "Error: Expected 'tmp' to be NULL, but was %p instead.\n", tmp);
hr = IUriBuilder_GetHost(builder, &result_len, &result); - ok(hr == S_FALSE, "Error: GetHost returned 0x%08x, expected 0x%08x.\n", + ok(hr == S_FALSE, "Error: GetHost returned 0x%08lx, expected 0x%08lx.\n", hr, S_FALSE); } if(builder) IUriBuilder_Release(builder);
builder = (void*) 0xdeadbeef; hr = IUriBuilderFactory_CreateInitializedIUriBuilder(factory, 10, 0, &builder); - ok(hr == E_INVALIDARG, "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_INVALIDARG, "Error: CreateIUriBuilder returned 0x%08lx, expected 0x%08lx.\n", hr, E_INVALIDARG); ok(!builder, "Error: Expected 'builder' to be NULL, but was %p.\n", builder);
builder = (void*) 0xdeadbeef; hr = IUriBuilderFactory_CreateInitializedIUriBuilder(factory, 0, 10, &builder); - ok(hr == E_INVALIDARG, "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_INVALIDARG, "Error: CreateIUriBuilder returned 0x%08lx, expected 0x%08lx.\n", hr, E_INVALIDARG); ok(!builder, "Error: Expected 'builder' to be NULL, but was %p.\n", builder);
hr = IUriBuilderFactory_CreateInitializedIUriBuilder(factory, 0, 0, NULL); - ok(hr == E_POINTER, "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: CreateIUriBuilder returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER);
builder = NULL; hr = IUriBuilderFactory_CreateInitializedIUriBuilder(factory, 0, 0, &builder); - ok(hr == S_OK, "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x.\n", + ok(hr == S_OK, "Error: CreateIUriBuilder returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK); if(SUCCEEDED(hr)) { IUri *tmp = NULL;
hr = IUriBuilder_GetIUri(builder, &tmp); - ok(hr == S_OK, "Error: GetIUri return 0x%08x, expected 0x%08x.\n", + ok(hr == S_OK, "Error: GetIUri return 0x%08lx, expected 0x%08lx.\n", hr, S_OK); ok(tmp == uri, "Error: Expected tmp to be %p, but was %p.\n", uri, tmp); if(tmp) IUri_Release(tmp); @@ -10597,26 +10597,26 @@ static void test_CoInternetCombineIUri(void) {
base = NULL; hr = pCreateUri(http_urlW, 0, 0, &base); - ok(SUCCEEDED(hr), "Error: Expected CreateUri to succeed, got 0x%08x.\n", hr); + ok(SUCCEEDED(hr), "Error: Expected CreateUri to succeed, got 0x%08lx.\n", hr); if(SUCCEEDED(hr)) { result = (void*) 0xdeadbeef; hr = pCoInternetCombineIUri(base, NULL, 0, &result, 0); - ok(hr == E_INVALIDARG, "Error: CoInternetCombineIUri returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); + ok(hr == E_INVALIDARG, "Error: CoInternetCombineIUri returned 0x%08lx, expected 0x%08lx.\n", hr, E_INVALIDARG); ok(!result, "Error: Expected 'result' to be NULL, was %p.\n", result); }
relative = NULL; hr = pCreateUri(http_urlW, 0, 0, &relative); - ok(SUCCEEDED(hr), "Error: Expected CreateUri to succeed, got 0x%08x.\n", hr); + ok(SUCCEEDED(hr), "Error: Expected CreateUri to succeed, got 0x%08lx.\n", hr); if(SUCCEEDED(hr)) { result = (void*) 0xdeadbeef; hr = pCoInternetCombineIUri(NULL, relative, 0, &result, 0); - ok(hr == E_INVALIDARG, "Error: CoInternetCombineIUri returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); + ok(hr == E_INVALIDARG, "Error: CoInternetCombineIUri returned 0x%08lx, expected 0x%08lx.\n", hr, E_INVALIDARG); ok(!result, "Error: Expected 'result' to be NULL, was %p.\n", result); }
hr = pCoInternetCombineIUri(base, relative, 0, NULL, 0); - ok(hr == E_INVALIDARG, "Error: CoInternetCombineIUri returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); + ok(hr == E_INVALIDARG, "Error: CoInternetCombineIUri returned 0x%08lx, expected 0x%08lx.\n", hr, E_INVALIDARG);
if(base) IUri_Release(base); if(relative) IUri_Release(relative); @@ -10625,12 +10625,12 @@ static void test_CoInternetCombineIUri(void) { LPWSTR baseW = a2w(uri_combine_tests[i].base_uri);
hr = pCreateUri(baseW, uri_combine_tests[i].base_create_flags, 0, &base); - ok(SUCCEEDED(hr), "Error: Expected CreateUri to succeed, got 0x%08x on uri_combine_tests[%d].\n", hr, i); + ok(SUCCEEDED(hr), "Error: Expected CreateUri to succeed, got 0x%08lx on uri_combine_tests[%ld].\n", hr, i); if(SUCCEEDED(hr)) { LPWSTR relativeW = a2w(uri_combine_tests[i].relative_uri);
hr = pCreateUri(relativeW, uri_combine_tests[i].relative_create_flags, 0, &relative); - ok(SUCCEEDED(hr), "Error: Expected CreateUri to succeed, got 0x%08x on uri_combine_tests[%d].\n", hr, i); + ok(SUCCEEDED(hr), "Error: Expected CreateUri to succeed, got 0x%08lx on uri_combine_tests[%ld].\n", hr, i); if(SUCCEEDED(hr)) { result = NULL;
@@ -10638,7 +10638,7 @@ static void test_CoInternetCombineIUri(void) { todo_wine_if(uri_combine_tests[i].todo) ok(hr == uri_combine_tests[i].expected || broken(hr == S_OK && uri_combine_tests[i].expected == E_INVALIDARG) /* win10 1607 to 1709 */, - "Error: CoInternetCombineIUri returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].\n", + "Error: CoInternetCombineIUri returned 0x%08lx, expected 0x%08lx on uri_combine_tests[%ld].\n", hr, uri_combine_tests[i]. expected, i); if(SUCCEEDED(hr) && SUCCEEDED(uri_combine_tests[i].expected)) { DWORD j; @@ -10650,11 +10650,11 @@ static void test_CoInternetCombineIUri(void) { hr = IUri_GetPropertyBSTR(result, j, &received, 0); todo_wine_if(prop.todo) { ok(hr == prop.expected, - "Error: IUri_GetPropertyBSTR returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].str_props[%d].\n", + "Error: IUri_GetPropertyBSTR returned 0x%08lx, expected 0x%08lx on uri_combine_tests[%ld].str_props[%ld].\n", hr, prop.expected, i, j); ok(!strcmp_aw(prop.value, received) || broken(prop.broken_value && !strcmp_aw(prop.broken_value, received)), - "Error: Expected "%s" but got %s instead on uri_combine_tests[%d].str_props[%d].\n", + "Error: Expected "%s" but got %s instead on uri_combine_tests[%ld].str_props[%ld].\n", prop.value, wine_dbgstr_w(received), i, j); } SysFreeString(received); @@ -10667,10 +10667,10 @@ static void test_CoInternetCombineIUri(void) { hr = IUri_GetPropertyDWORD(result, j+Uri_PROPERTY_DWORD_START, &received, 0); todo_wine_if(prop.todo) { ok(hr == prop.expected || broken(prop.broken_combine_hres && hr == S_FALSE), - "Error: IUri_GetPropertyDWORD returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].dword_props[%d].\n", + "Error: IUri_GetPropertyDWORD returned 0x%08lx, expected 0x%08lx on uri_combine_tests[%ld].dword_props[%ld].\n", hr, prop.expected, i, j); if(!prop.broken_combine_hres || hr != S_FALSE) - ok(prop.value == received, "Error: Expected %d, but got %d instead on uri_combine_tests[%d].dword_props[%d].\n", + ok(prop.value == received, "Error: Expected %ld, but got %ld instead on uri_combine_tests[%ld].dword_props[%ld].\n", prop.value, received, i, j); } } @@ -10710,8 +10710,8 @@ static HRESULT WINAPI InternetProtocolInfo_ParseUrl(IInternetProtocolInfo *iface ok(!lstrcmpW(pwzUrl, parse_urlW), "Error: Expected %s, but got %s instead.\n", wine_dbgstr_w(parse_urlW), wine_dbgstr_w(pwzUrl)); ok(ParseAction == parse_action, "Error: Expected %d, but got %d.\n", parse_action, ParseAction); - ok(dwParseFlags == parse_flags, "Error: Expected 0x%08x, but got 0x%08x.\n", parse_flags, dwParseFlags); - ok(cchResult == 200, "Error: Got %d.\n", cchResult); + ok(dwParseFlags == parse_flags, "Error: Expected 0x%08lx, but got 0x%08lx.\n", parse_flags, dwParseFlags); + ok(cchResult == 200, "Error: Got %ld.\n", cchResult);
memcpy(pwzResult, parse_resultW, sizeof(parse_resultW)); *pcchResult = lstrlenW(parse_resultW); @@ -10729,8 +10729,8 @@ static HRESULT WINAPI InternetProtocolInfo_CombineUrl(IInternetProtocolInfo *ifa ok(!lstrcmpW(pwzRelativeUrl, combine_relativeW), "Error: Expected %s, but got %s instead.\n", wine_dbgstr_w(combine_relativeW), wine_dbgstr_w(pwzRelativeUrl)); ok(dwCombineFlags == (URL_DONT_SIMPLIFY|URL_FILE_USE_PATHURL|URL_DONT_UNESCAPE_EXTRA_INFO), - "Error: Expected 0, but got 0x%08x.\n", dwCombineFlags); - ok(cchResult == INTERNET_MAX_URL_LENGTH+1, "Error: Got %d.\n", cchResult); + "Error: Expected 0, but got 0x%08lx.\n", dwCombineFlags); + ok(cchResult == INTERNET_MAX_URL_LENGTH+1, "Error: Got %ld.\n", cchResult);
memcpy(pwzResult, combine_resultW, sizeof(combine_resultW)); *pcchResult = lstrlenW(combine_resultW); @@ -10815,13 +10815,13 @@ static void register_protocols(void) HRESULT hres;
hres = pCoInternetGetSession(0, &session, 0); - ok(hres == S_OK, "CoInternetGetSession failed: %08x\n", hres); + ok(hres == S_OK, "CoInternetGetSession failed: %08lx\n", hres); if(FAILED(hres)) return;
hres = IInternetSession_RegisterNameSpace(session, &protocol_cf, &IID_NULL, winetestW, 0, NULL, 0); - ok(hres == S_OK, "RegisterNameSpace failed: %08x\n", hres); + ok(hres == S_OK, "RegisterNameSpace failed: %08lx\n", hres);
IInternetSession_Release(session); } @@ -10831,12 +10831,12 @@ static void unregister_protocols(void) { HRESULT hr;
hr = pCoInternetGetSession(0, &session, 0); - ok(hr == S_OK, "CoInternetGetSession failed: 0x%08x\n", hr); + ok(hr == S_OK, "CoInternetGetSession failed: 0x%08lx\n", hr); if(FAILED(hr)) return;
hr = IInternetSession_UnregisterNameSpace(session, &protocol_cf, winetestW); - ok(hr == S_OK, "UnregisterNameSpace failed: 0x%08x\n", hr); + ok(hr == S_OK, "UnregisterNameSpace failed: 0x%08lx\n", hr);
IInternetSession_Release(session); } @@ -10846,12 +10846,12 @@ static void test_CoInternetCombineIUri_Pluggable(void) { IUri *base = NULL;
hr = pCreateUri(combine_baseW, 0, 0, &base); - ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08x.\n", hr); + ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08lx.\n", hr); if(SUCCEEDED(hr)) { IUri *relative = NULL;
hr = pCreateUri(combine_relativeW, Uri_CREATE_ALLOW_RELATIVE, 0, &relative); - ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08x.\n", hr); + ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08lx.\n", hr); if(SUCCEEDED(hr)) { IUri *result = NULL;
@@ -10859,14 +10859,14 @@ static void test_CoInternetCombineIUri_Pluggable(void) {
hr = pCoInternetCombineIUri(base, relative, URL_DONT_SIMPLIFY|URL_FILE_USE_PATHURL|URL_DONT_UNESCAPE_EXTRA_INFO, &result, 0); - ok(hr == S_OK, "Error: CoInternetCombineIUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: CoInternetCombineIUri returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK);
CHECK_CALLED(CombineUrl);
if(SUCCEEDED(hr)) { BSTR received = NULL; hr = IUri_GetAbsoluteUri(result, &received); - ok(hr == S_OK, "Error: Expected S_OK, but got 0x%08x instead.\n", hr); + ok(hr == S_OK, "Error: Expected S_OK, but got 0x%08lx instead.\n", hr); if(SUCCEEDED(hr)) { ok(!lstrcmpW(combine_resultW, received), "Error: Expected %s, but got %s.\n", wine_dbgstr_w(combine_resultW), wine_dbgstr_w(received)); @@ -10887,29 +10887,29 @@ static void test_CoInternetCombineUrlEx(void) {
base = NULL; hr = pCreateUri(http_urlW, 0, 0, &base); - ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08x.\n", hr); + ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08lx.\n", hr); if(SUCCEEDED(hr)) { result = (void*) 0xdeadbeef; hr = pCoInternetCombineUrlEx(base, NULL, 0, &result, 0); - ok(hr == E_UNEXPECTED, "Error: CoInternetCombineUrlEx returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_UNEXPECTED, "Error: CoInternetCombineUrlEx returned 0x%08lx, expected 0x%08lx.\n", hr, E_UNEXPECTED); ok(!result, "Error: Expected 'result' to be NULL was %p instead.\n", result); }
result = (void*) 0xdeadbeef; hr = pCoInternetCombineUrlEx(NULL, http_urlW, 0, &result, 0); - ok(hr == E_INVALIDARG, "Error: CoInternetCombineUrlEx returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_INVALIDARG, "Error: CoInternetCombineUrlEx returned 0x%08lx, expected 0x%08lx.\n", hr, E_INVALIDARG); ok(!result, "Error: Expected 'result' to be NULL, but was %p instead.\n", result);
result = (void*) 0xdeadbeef; hr = pCoInternetCombineUrlEx(NULL, NULL, 0, &result, 0); - ok(hr == E_UNEXPECTED, "Error: CoInternetCombineUrlEx returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_UNEXPECTED, "Error: CoInternetCombineUrlEx returned 0x%08lx, expected 0x%08lx.\n", hr, E_UNEXPECTED); ok(!result, "Error: Expected 'result' to be NULL, but was %p instead.\n", result);
hr = pCoInternetCombineUrlEx(base, http_urlW, 0, NULL, 0); - ok(hr == E_POINTER, "Error: CoInternetCombineUrlEx returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: CoInternetCombineUrlEx returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER); if(base) IUri_Release(base);
@@ -10917,7 +10917,7 @@ static void test_CoInternetCombineUrlEx(void) { LPWSTR baseW = a2w(uri_combine_tests[i].base_uri);
hr = pCreateUri(baseW, uri_combine_tests[i].base_create_flags, 0, &base); - ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08x on uri_combine_tests[%d].\n", hr, i); + ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08lx on uri_combine_tests[%ld].\n", hr, i); if(SUCCEEDED(hr)) { LPWSTR relativeW = a2w(uri_combine_tests[i].relative_uri);
@@ -10926,7 +10926,7 @@ static void test_CoInternetCombineUrlEx(void) { todo_wine_if(uri_combine_tests[i].todo) ok(hr == uri_combine_tests[i].expected || broken(hr == S_OK && uri_combine_tests[i].expected == E_INVALIDARG) /* win10 1607 to 1709 */, - "Error: CoInternetCombineUrlEx returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].\n", + "Error: CoInternetCombineUrlEx returned 0x%08lx, expected 0x%08lx on uri_combine_tests[%ld].\n", hr, uri_combine_tests[i]. expected, i); if(SUCCEEDED(hr) && SUCCEEDED(uri_combine_tests[i].expected)) { DWORD j; @@ -10939,11 +10939,11 @@ static void test_CoInternetCombineUrlEx(void) { hr = IUri_GetPropertyBSTR(result, j, &received, 0); todo_wine_if(prop.todo) { ok(hr == prop.expected, - "Error: IUri_GetPropertyBSTR returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].str_props[%d].\n", + "Error: IUri_GetPropertyBSTR returned 0x%08lx, expected 0x%08lx on uri_combine_tests[%ld].str_props[%ld].\n", hr, prop.expected, i, j); ok(!strcmp_aw(value, received) || broken(prop.broken_value && !strcmp_aw(prop.broken_value, received)), - "Error: Expected "%s" but got %s instead on uri_combine_tests[%d].str_props[%d].\n", + "Error: Expected "%s" but got %s instead on uri_combine_tests[%ld].str_props[%ld].\n", value, wine_dbgstr_w(received), i, j); } SysFreeString(received); @@ -10956,10 +10956,10 @@ static void test_CoInternetCombineUrlEx(void) { hr = IUri_GetPropertyDWORD(result, j+Uri_PROPERTY_DWORD_START, &received, 0); todo_wine_if(prop.todo) { ok(hr == prop.expected || broken(prop.broken_combine_hres && hr == S_FALSE), - "Error: IUri_GetPropertyDWORD returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].dword_props[%d].\n", + "Error: IUri_GetPropertyDWORD returned 0x%08lx, expected 0x%08lx on uri_combine_tests[%ld].dword_props[%ld].\n", hr, prop.expected, i, j); if(!prop.broken_combine_hres || hr != S_FALSE) - ok(prop.value == received, "Error: Expected %d, but got %d instead on uri_combine_tests[%d].dword_props[%d].\n", + ok(prop.value == received, "Error: Expected %ld, but got %ld instead on uri_combine_tests[%ld].dword_props[%ld].\n", prop.value, received, i, j); } } @@ -10977,7 +10977,7 @@ static void test_CoInternetCombineUrlEx_Pluggable(void) { IUri *base = NULL;
hr = pCreateUri(combine_baseW, 0, 0, &base); - ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08x.\n", hr); + ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08lx.\n", hr); if(SUCCEEDED(hr)) { IUri *result = NULL;
@@ -10985,14 +10985,14 @@ static void test_CoInternetCombineUrlEx_Pluggable(void) {
hr = pCoInternetCombineUrlEx(base, combine_relativeW, URL_DONT_SIMPLIFY|URL_FILE_USE_PATHURL|URL_DONT_UNESCAPE_EXTRA_INFO, &result, 0); - ok(hr == S_OK, "Error: CoInternetCombineUrlEx returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: CoInternetCombineUrlEx returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK);
CHECK_CALLED(CombineUrl);
if(SUCCEEDED(hr)) { BSTR received = NULL; hr = IUri_GetAbsoluteUri(result, &received); - ok(hr == S_OK, "Error: Expected S_OK, but got 0x%08x instead.\n", hr); + ok(hr == S_OK, "Error: Expected S_OK, but got 0x%08lx instead.\n", hr); if(SUCCEEDED(hr)) { ok(!lstrcmpW(combine_resultW, received), "Error: Expected %s, but got %s.\n", wine_dbgstr_w(combine_resultW), wine_dbgstr_w(received)); @@ -11013,56 +11013,56 @@ static void test_CoInternetParseIUri_InvalidArgs(void) { DWORD i, len;
hr = pCoInternetParseIUri(NULL, PARSE_CANONICALIZE, 0, tmp, 3, &result, 0); - ok(hr == E_INVALIDARG, "Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_INVALIDARG, "Error: CoInternetParseIUri returned 0x%08lx, expected 0x%08lx.\n", hr, E_INVALIDARG); - ok(!result, "Error: Expected 'result' to be 0, but was %d.\n", result); + ok(!result, "Error: Expected 'result' to be 0, but was %ld.\n", result);
hr = pCreateUri(http_urlW, 0, 0, &uri); - ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08x.\n", hr); + ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08lx.\n", hr); if(SUCCEEDED(hr)) { DWORD expected_len;
result = -1; hr = pCoInternetParseIUri(uri, PARSE_CANONICALIZE, 0, NULL, 0, &result, 0); - ok(hr == E_INVALIDARG, "Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_INVALIDARG, "Error: CoInternetParseIUri returned 0x%08lx, expected 0x%08lx.\n", hr, E_INVALIDARG); - ok(!result, "Error: Expected 'result' to be 0, but was %d.\n", result); + ok(!result, "Error: Expected 'result' to be 0, but was %ld.\n", result);
hr = pCoInternetParseIUri(uri, PARSE_CANONICALIZE, 0, tmp, 3, NULL, 0); - ok(hr == E_POINTER, "Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_POINTER, "Error: CoInternetParseIUri returned 0x%08lx, expected 0x%08lx.\n", hr, E_POINTER);
result = -1; hr = pCoInternetParseIUri(uri, PARSE_SECURITY_URL, 0, tmp, 3, &result, 0); - ok(hr == E_FAIL, "Error: CoInternetParseIUri returned 0x%08x expected 0x%08x.\n", + ok(hr == E_FAIL, "Error: CoInternetParseIUri returned 0x%08lx expected 0x%08lx.\n", hr, E_FAIL); - ok(!result, "Error: Expected 'result' to be 0, but was %d.\n", result); + ok(!result, "Error: Expected 'result' to be 0, but was %ld.\n", result);
result = -1; hr = pCoInternetParseIUri(uri, PARSE_MIME, 0, tmp, 3, &result, 0); - ok(hr == E_FAIL, "Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_FAIL, "Error: CoInternetParseIUri returned 0x%08lx, expected 0x%08lx.\n", hr, E_FAIL); - ok(!result, "Error: Expected 'result' to be 0, but was %d.\n", result); + ok(!result, "Error: Expected 'result' to be 0, but was %ld.\n", result);
result = -1; hr = pCoInternetParseIUri(uri, PARSE_SERVER, 0, tmp, 3, &result, 0); - ok(hr == E_FAIL, "Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_FAIL, "Error: CoInternetParseIUri returned 0x%08lx, expected 0x%08lx.\n", hr, E_FAIL); - ok(!result, "Error: Expected 'result' to be 0, but was %d.\n", result); + ok(!result, "Error: Expected 'result' to be 0, but was %ld.\n", result);
result = -1; hr = pCoInternetParseIUri(uri, PARSE_SECURITY_DOMAIN, 0, tmp, 3, &result, 0); - ok(hr == E_FAIL, "Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x.\n", + ok(hr == E_FAIL, "Error: CoInternetParseIUri returned 0x%08lx, expected 0x%08lx.\n", hr, E_FAIL); - ok(!result, "Error: Expected 'result' to be 0, but was %d.\n", result); + ok(!result, "Error: Expected 'result' to be 0, but was %ld.\n", result);
expected_len = lstrlenW(http_urlW); result = -1; hr = pCoInternetParseIUri(uri, PARSE_CANONICALIZE, 0, tmp, 3, &result, 0); ok(hr == STRSAFE_E_INSUFFICIENT_BUFFER, - "Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x.\n", + "Error: CoInternetParseIUri returned 0x%08lx, expected 0x%08lx.\n", hr, STRSAFE_E_INSUFFICIENT_BUFFER); - ok(result == expected_len, "Error: Expected 'result' to be %d, but was %d instead.\n", + ok(result == expected_len, "Error: Expected 'result' to be %ld, but was %ld instead.\n", expected_len, result); } if(uri) IUri_Release(uri); @@ -11079,15 +11079,15 @@ static void test_CoInternetParseIUri_InvalidArgs(void) { memcpy(copy, longurl, (len+1)*sizeof(WCHAR));
hr = pCreateUri(longurl, 0, 0, &uri); - ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08x.\n", hr); + ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08lx.\n", hr); if(SUCCEEDED(hr)) { result = -1; memset(longurl, 0xcc, len*sizeof(WCHAR)); hr = pCoInternetParseIUri(uri, PARSE_CANONICALIZE, 0, longurl, len+1, &result, 0); - ok(SUCCEEDED(hr), "Error: CoInternetParseIUri returned 0x%08x.\n", hr); + ok(SUCCEEDED(hr), "Error: CoInternetParseIUri returned 0x%08lx.\n", hr); ok(!lstrcmpW(longurl, copy), "Error: expected long url '%s' but was '%s'.\n", wine_dbgstr_w(copy), wine_dbgstr_w(longurl)); - ok(result == len, "Error: Expected 'result' to be %d, but was %d instead.\n", + ok(result == len, "Error: Expected 'result' to be %ld, but was %ld instead.\n", len, result); } heap_free(longurl); @@ -11106,7 +11106,7 @@ static void test_CoInternetParseIUri(void) {
uriW = a2w(test.uri); hr = pCreateUri(uriW, test.uri_flags, 0, &uri); - ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08x on uri_parse_tests[%d].\n", hr, i); + ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08lx on uri_parse_tests[%ld].\n", hr, i); if(SUCCEEDED(hr)) { WCHAR result[INTERNET_MAX_URL_LENGTH+1]; DWORD result_len = -1; @@ -11114,19 +11114,19 @@ static void test_CoInternetParseIUri(void) { hr = pCoInternetParseIUri(uri, test.action, test.flags, result, INTERNET_MAX_URL_LENGTH+1, &result_len, 0); todo_wine_if(test.todo) ok(hr == test.expected, - "Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x on uri_parse_tests[%d].\n", + "Error: CoInternetParseIUri returned 0x%08lx, expected 0x%08lx on uri_parse_tests[%ld].\n", hr, test.expected, i); if(SUCCEEDED(hr)) { DWORD len = lstrlenA(test.property); ok(!strcmp_aw(test.property, result) || (test.property2 && !strcmp_aw(test.property2, result)), - "Error: Expected %s but got %s instead on uri_parse_tests[%d] - %s.\n", + "Error: Expected %s but got %s instead on uri_parse_tests[%ld] - %s.\n", test.property, wine_dbgstr_w(result), i, wine_dbgstr_w(uriW)); ok(len == result_len || (test.property2 && lstrlenA(test.property2) == result_len), - "Error: Expected %d, but got %d instead on uri_parse_tests[%d] - %s.\n", + "Error: Expected %ld, but got %ld instead on uri_parse_tests[%ld] - %s.\n", len, result_len, i, wine_dbgstr_w(uriW)); } else { ok(!result_len, - "Error: Expected 'result_len' to be 0, but was %d on uri_parse_tests[%d].\n", + "Error: Expected 'result_len' to be 0, but was %ld on uri_parse_tests[%ld].\n", result_len, i); } } @@ -11140,7 +11140,7 @@ static void test_CoInternetParseIUri_Pluggable(void) { IUri *uri = NULL;
hr = pCreateUri(parse_urlW, 0, 0, &uri); - ok(SUCCEEDED(hr), "Error: Expected CreateUri to succeed, but got 0x%08x.\n", hr); + ok(SUCCEEDED(hr), "Error: Expected CreateUri to succeed, but got 0x%08lx.\n", hr); if(SUCCEEDED(hr)) { WCHAR result[200]; DWORD result_len; @@ -11151,12 +11151,12 @@ static void test_CoInternetParseIUri_Pluggable(void) { parse_flags = URL_UNESCAPE|URL_ESCAPE_UNSAFE;
hr = pCoInternetParseIUri(uri, parse_action, parse_flags, result, 200, &result_len, 0); - ok(hr == S_OK, "Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); + ok(hr == S_OK, "Error: CoInternetParseIUri returned 0x%08lx, expected 0x%08lx.\n", hr, S_OK);
CHECK_CALLED(ParseUrl);
if(SUCCEEDED(hr)) { - ok(result_len == lstrlenW(parse_resultW), "Error: Expected %d, but got %d.\n", + ok(result_len == lstrlenW(parse_resultW), "Error: Expected %d, but got %ld.\n", lstrlenW(parse_resultW), result_len); ok(!lstrcmpW(result, parse_resultW), "Error: Expected %s, but got %s.\n", wine_dbgstr_w(parse_resultW), wine_dbgstr_w(result)); @@ -11256,7 +11256,7 @@ static void _test_urlmon_display_name(unsigned line, IMoniker *mon, const char * HRESULT hres;
hres = IMoniker_GetDisplayName(mon, NULL, NULL, &display_name); - ok_(__FILE__,line)(hres == S_OK, "GetDisplayName failed: %08x\n", hres); + ok_(__FILE__,line)(hres == S_OK, "GetDisplayName failed: %08lx\n", hres); ok_(__FILE__,line)(!strcmp_aw(exurl, display_name), "unexpected display name: %s, expected %s\n", wine_dbgstr_w(display_name), exurl);
@@ -11272,17 +11272,17 @@ static void _test_display_uri(unsigned line, IMoniker *mon, const char *exurl) HRESULT hres;
hres = IMoniker_QueryInterface(mon, &IID_IUriContainer, (void**)&uri_container); - ok(hres == S_OK, "Could not get IUriContainer iface: %08x\n", hres); + ok(hres == S_OK, "Could not get IUriContainer iface: %08lx\n", hres);
uri = NULL; hres = IUriContainer_GetIUri(uri_container, &uri); IUriContainer_Release(uri_container); - ok(hres == S_OK, "GetIUri failed: %08x\n", hres); + ok(hres == S_OK, "GetIUri failed: %08lx\n", hres); ok(uri != NULL, "uri == NULL\n");
hres = IUri_GetDisplayUri(uri, &display_uri); IUri_Release(uri); - ok(hres == S_OK, "GetDisplayUri failed: %08x\n", hres); + ok(hres == S_OK, "GetDisplayUri failed: %08lx\n", hres); ok_(__FILE__,line)(!strcmp_aw(exurl, display_uri), "unexpected display uri: %s, expected %s\n", wine_dbgstr_w(display_uri), exurl); SysFreeString(display_uri); @@ -11302,56 +11302,56 @@ static void test_CreateURLMoniker(void)
if(base_url) { hres = pCreateUri(base_url, test->base_uri_flags, 0, &base_uri); - ok(hres == S_OK, "CreateUri failed: %08x\n", hres); + ok(hres == S_OK, "CreateUri failed: %08lx\n", hres);
hres = pCreateURLMonikerEx2(NULL, base_uri, &base_mon, URL_MK_NO_CANONICALIZE); - ok(hres == S_OK, "CreateURLMonikerEx2 failed: %08x\n", hres); + ok(hres == S_OK, "CreateURLMonikerEx2 failed: %08lx\n", hres); }else { base_uri = NULL; base_mon = NULL; }
hres = CreateURLMoniker(base_mon, url, &mon); - ok(hres == S_OK, "CreateURLMoniker failed: %08x\n", hres); + ok(hres == S_OK, "CreateURLMoniker failed: %08lx\n", hres); test_urlmon_display_name(mon, test->legacy_url); test_display_uri(mon, test->legacy_url); IMoniker_Release(mon);
hres = pCreateURLMonikerEx(base_mon, url, &mon, URL_MK_LEGACY); - ok(hres == S_OK, "CreateURLMoniker failed: %08x\n", hres); + ok(hres == S_OK, "CreateURLMoniker failed: %08lx\n", hres); test_urlmon_display_name(mon, test->legacy_url); test_display_uri(mon, test->legacy_url); IMoniker_Release(mon);
hres = pCreateURLMonikerEx(base_mon, url, &mon, URL_MK_UNIFORM); - ok(hres == S_OK, "CreateURLMoniker failed: %08x\n", hres); + ok(hres == S_OK, "CreateURLMoniker failed: %08lx\n", hres); test_urlmon_display_name(mon, test->uniform_url); test_display_uri(mon, test->uniform_url); IMoniker_Release(mon);
hres = pCreateURLMonikerEx(base_mon, url, &mon, URL_MK_NO_CANONICALIZE); - ok(hres == S_OK, "CreateURLMoniker failed: %08x\n", hres); + ok(hres == S_OK, "CreateURLMoniker failed: %08lx\n", hres); test_urlmon_display_name(mon, test->no_canon_url); test_display_uri(mon, test->no_canon_url); IMoniker_Release(mon);
hres = pCreateUri(url, test->uri_flags, 0, &uri); - ok(hres == S_OK, "CreateUri failed: %08x\n", hres); + ok(hres == S_OK, "CreateUri failed: %08lx\n", hres);
hres = pCreateURLMonikerEx2(base_mon, uri, &mon, URL_MK_LEGACY); - ok(hres == S_OK, "CreateURLMonikerEx2 failed: %08x\n", hres); + ok(hres == S_OK, "CreateURLMonikerEx2 failed: %08lx\n", hres); test_urlmon_display_name(mon, base_url ? test->legacy_url : test->uri_url); test_display_uri(mon, base_url ? test->legacy_url : test->uri_url); IMoniker_Release(mon);
hres = pCreateURLMonikerEx2(base_mon, uri, &mon, URL_MK_UNIFORM); - ok(hres == S_OK, "CreateURLMonikerEx2 failed: %08x\n", hres); + ok(hres == S_OK, "CreateURLMonikerEx2 failed: %08lx\n", hres); test_urlmon_display_name(mon, base_url ? test->uniform_url : test->uri_url); test_display_uri(mon, base_url ? test->uniform_url : test->uri_url); IMoniker_Release(mon);
hres = pCreateURLMonikerEx2(base_mon, uri, &mon, URL_MK_NO_CANONICALIZE); - ok(hres == S_OK, "CreateURLMonikerEx2 failed: %08x\n", hres); + ok(hres == S_OK, "CreateURLMonikerEx2 failed: %08lx\n", hres); test_urlmon_display_name(mon, base_url ? test->no_canon_url : test->uri_url); test_display_uri(mon, base_url ? test->no_canon_url : test->uri_url); IMoniker_Release(mon); @@ -11415,44 +11415,44 @@ static void test_IPersistStream(void)
uriW = a2w(test->uri); hr = pCreateUri(uriW, test->create_flags, 0, &uri); - ok(hr == S_OK, "%d) CreateUri failed 0x%08x, expected S_OK..\n", i, hr); + ok(hr == S_OK, "%d) CreateUri failed 0x%08lx, expected S_OK..\n", i, hr);
hr = IUri_QueryInterface(uri, &IID_IPersistStream, (void**)&persist_stream); - ok(hr == S_OK, "%d) QueryInterface failed 0x%08x, expected S_OK.\n", i, hr); + ok(hr == S_OK, "%d) QueryInterface failed 0x%08lx, expected S_OK.\n", i, hr);
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); - ok(hr == S_OK, "CreateStreamOnHGlobal failed 0x%08x.\n", hr); + ok(hr == S_OK, "CreateStreamOnHGlobal failed 0x%08lx.\n", hr); hr = IPersistStream_IsDirty(persist_stream); - ok(hr == S_FALSE, "%d) IsDirty returned 0x%08x, expected S_FALSE.\n", i, hr); + ok(hr == S_FALSE, "%d) IsDirty returned 0x%08lx, expected S_FALSE.\n", i, hr); hr = IPersistStream_Save(persist_stream, stream, FALSE); - ok(hr == S_OK, "%d) Save failed 0x%08x, expected S_OK.\n", i, hr); + ok(hr == S_OK, "%d) Save failed 0x%08lx, expected S_OK.\n", i, hr); hr = IPersistStream_IsDirty(persist_stream); - ok(hr == S_FALSE, "%d) IsDirty returned 0x%08x, expected S_FALSE.\n", i, hr); + ok(hr == S_FALSE, "%d) IsDirty returned 0x%08lx, expected S_FALSE.\n", i, hr); no_off.QuadPart = 0; hr = IStream_Seek(stream, no_off, STREAM_SEEK_CUR, &size); - ok(hr == S_OK, "%d) Seek failed 0x%08x, expected S_OK.\n", i, hr); + ok(hr == S_OK, "%d) Seek failed 0x%08lx, expected S_OK.\n", i, hr); hr = IStream_Seek(stream, no_off, STREAM_SEEK_SET, NULL); - ok(hr == S_OK, "%d) Seek failed 0x%08x, expected S_OK.\n", i, hr); + ok(hr == S_OK, "%d) Seek failed 0x%08lx, expected S_OK.\n", i, hr); hr = IPersistStream_GetSizeMax(persist_stream, &max_size); - ok(hr == S_OK, "%d) GetSizeMax failed 0x%08x, expected S_OK.\n", i, hr); + ok(hr == S_OK, "%d) GetSizeMax failed 0x%08lx, expected S_OK.\n", i, hr); ok(U(size).LowPart+2 == U(max_size).LowPart, - "%d) Written data size is %d, max_size %d.\n", + "%d) Written data size is %ld, max_size %ld.\n", i, U(size).LowPart, U(max_size).LowPart);
hr = IStream_Read(stream, (void*)dw_data, sizeof(DWORD), NULL); - ok(hr == S_OK, "%d) Read failed 0x%08x, expected S_OK.\n", i, hr); - ok(dw_data[0]-2 == U(size).LowPart, "%d) Structure size is %d, expected %d\n", + ok(hr == S_OK, "%d) Read failed 0x%08lx, expected S_OK.\n", i, hr); + ok(dw_data[0]-2 == U(size).LowPart, "%d) Structure size is %ld, expected %ld\n", i, dw_data[0]-2, U(size).LowPart); hr = IStream_Read(stream, (void*)dw_data, 6*sizeof(DWORD), NULL); - ok(hr == S_OK, "%d) Read failed 0x%08x, expected S_OK.\n", i, hr); - ok(dw_data[0] == 0, "%d) Incorrect value %x, expected 0 (unknown).\n", i, dw_data[0]); - ok(dw_data[1] == 0, "%d) Incorrect value %x, expected 0 (unknown).\n", i, dw_data[1]); + ok(hr == S_OK, "%d) Read failed 0x%08lx, expected S_OK.\n", i, hr); + ok(dw_data[0] == 0, "%d) Incorrect value %lx, expected 0 (unknown).\n", i, dw_data[0]); + ok(dw_data[1] == 0, "%d) Incorrect value %lx, expected 0 (unknown).\n", i, dw_data[1]); ok(dw_data[2] == add_default_flags(test->create_flags), - "%d) Incorrect value %x, expected %x (creation flags).\n", + "%d) Incorrect value %lx, expected %x (creation flags).\n", i, dw_data[2], add_default_flags(test->create_flags)); - ok(dw_data[3] == 0, "%d) Incorrect value %x, expected 0 (unknown).\n", i, dw_data[3]); - ok(dw_data[4] == 0, "%d) Incorrect value %x, expected 0 (unknown).\n", i, dw_data[4]); - ok(dw_data[5] == 0, "%d) Incorrect value %x, expected 0 (unknown).\n", i, dw_data[5]); + ok(dw_data[3] == 0, "%d) Incorrect value %lx, expected 0 (unknown).\n", i, dw_data[3]); + ok(dw_data[4] == 0, "%d) Incorrect value %lx, expected 0 (unknown).\n", i, dw_data[4]); + ok(dw_data[5] == 0, "%d) Incorrect value %lx, expected 0 (unknown).\n", i, dw_data[5]);
props_no = 0; for(props=0; props<=Uri_PROPERTY_DWORD_LAST; props++) { @@ -11473,17 +11473,17 @@ static void test_IPersistStream(void) props_no = 1;
hr = IStream_Read(stream, (void*)&props, sizeof(DWORD), NULL); - ok(hr == S_OK, "%d) Read failed 0x%08x, expected S_OK.\n", i, hr); - ok(props == props_no, "%d) Properties no is %d, expected %d.\n", i, props, props_no); + ok(hr == S_OK, "%d) Read failed 0x%08lx, expected S_OK.\n", i, hr); + ok(props == props_no, "%d) Properties no is %ld, expected %ld.\n", i, props, props_no);
dw_data[2] = 0; dw_data[3] = -1; while(props) { hr = IStream_Read(stream, (void*)dw_data, 2*sizeof(DWORD), NULL); - ok(hr == S_OK, "%d) Read failed 0x%08x, expected S_OK.\n", i, hr); + ok(hr == S_OK, "%d) Read failed 0x%08lx, expected S_OK.\n", i, hr); props--; ok(dw_data[2]<props_order[dw_data[0]], - "%d) Incorrect properties order (%d, %d)\n", + "%d) Incorrect properties order (%ld, %ld)\n", i, dw_data[0], dw_data[3]); dw_data[2] = props_order[dw_data[0]]; dw_data[3] = dw_data[0]; @@ -11491,41 +11491,41 @@ static void test_IPersistStream(void) if(dw_data[0]<=Uri_PROPERTY_STRING_LAST) { const uri_str_property *prop = test->str_props+dw_data[0]; hr = IStream_Read(stream, (void*)str_data, dw_data[1], NULL); - ok(hr == S_OK, "%d) Read failed 0x%08x, expected S_OK.\n", i, hr); + ok(hr == S_OK, "%d) Read failed 0x%08lx, expected S_OK.\n", i, hr); ok(!strcmp_aw(prop->value, str_data) || broken(prop->broken_value && !strcmp_aw(prop->broken_value, str_data)), - "%d) Expected %s but got %s (%d).\n", i, prop->value, wine_dbgstr_w(str_data), dw_data[0]); + "%d) Expected %s but got %s (%ld).\n", i, prop->value, wine_dbgstr_w(str_data), dw_data[0]); } else if(dw_data[0]>=Uri_PROPERTY_DWORD_START && dw_data[0]<=Uri_PROPERTY_DWORD_LAST) { const uri_dword_property *prop = test->dword_props+dw_data[0]-Uri_PROPERTY_DWORD_START; - ok(dw_data[1] == sizeof(DWORD), "%d) Size of dword property is %d (%d)\n", i, dw_data[1], dw_data[0]); + ok(dw_data[1] == sizeof(DWORD), "%d) Size of dword property is %ld (%ld)\n", i, dw_data[1], dw_data[0]); hr = IStream_Read(stream, (void*)&dw_data[1], sizeof(DWORD), NULL); - ok(hr == S_OK, "%d) Read failed 0x%08x, expected S_OK.\n", i, hr); - ok(prop->value == dw_data[1], "%d) Expected %d but got %d (%d).\n", i, prop->value, dw_data[1], dw_data[0]); + ok(hr == S_OK, "%d) Read failed 0x%08lx, expected S_OK.\n", i, hr); + ok(prop->value == dw_data[1], "%d) Expected %ld but got %ld (%ld).\n", i, prop->value, dw_data[1], dw_data[0]); } else { - ok(FALSE, "%d) Incorrect property type (%d)\n", i, dw_data[0]); + ok(FALSE, "%d) Incorrect property type (%ld)\n", i, dw_data[0]); break; } } - ok(props == 0, "%d) Not all properties were processed %d. Next property type: %d\n", + ok(props == 0, "%d) Not all properties were processed %ld. Next property type: %ld\n", i, props, dw_data[0]);
IUri_Release(uri);
hr = IStream_Seek(stream, no_off, STREAM_SEEK_SET, NULL); - ok(hr == S_OK, "%d) Seek failed 0x%08x, expected S_OK.\n", i, hr); + ok(hr == S_OK, "%d) Seek failed 0x%08lx, expected S_OK.\n", i, hr); hr = IPersistStream_GetClassID(persist_stream, &curi); - ok(hr == S_OK, "%d) GetClassID failed 0x%08x, expected S_OK.\n", i, hr); + ok(hr == S_OK, "%d) GetClassID failed 0x%08lx, expected S_OK.\n", i, hr); ok(IsEqualCLSID(&curi, &CLSID_CUri), "%d) GetClassID returned incorrect CLSID.\n", i); IPersistStream_Release(persist_stream);
hr = CoCreateInstance(&curi, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, &IID_IUri, (void**)&uri); - ok(hr == S_OK, "%d) Error creating uninitialized Uri: 0x%08x.\n", i, hr); + ok(hr == S_OK, "%d) Error creating uninitialized Uri: 0x%08lx.\n", i, hr); hr = IUri_QueryInterface(uri, &IID_IPersistStream, (void**)&persist_stream); - ok(hr == S_OK, "%d) QueryInterface failed 0x%08x, expected S_OK.\n", i, hr); + ok(hr == S_OK, "%d) QueryInterface failed 0x%08lx, expected S_OK.\n", i, hr); hr = IPersistStream_Load(persist_stream, stream); - ok(hr == S_OK, "%d) Load failed 0x%08x, expected S_OK.\n", i, hr); + ok(hr == S_OK, "%d) Load failed 0x%08lx, expected S_OK.\n", i, hr); hr = IUri_GetRawUri(uri, &raw_uri); - ok(hr == S_OK, "%d) GetRawUri failed 0x%08x, expected S_OK.\n", i, hr); + ok(hr == S_OK, "%d) GetRawUri failed 0x%08lx, expected S_OK.\n", i, hr); ok(!strcmp_aw(test->str_props[Uri_PROPERTY_RAW_URI].value, raw_uri) || broken(test->str_props[Uri_PROPERTY_RAW_URI].broken_value && !strcmp_aw(test->str_props[Uri_PROPERTY_RAW_URI].broken_value, raw_uri)), @@ -11535,69 +11535,69 @@ static void test_IPersistStream(void) IPersistStream_Release(persist_stream);
hr = IUri_QueryInterface(uri, &IID_IMarshal, (void**)&marshal); - ok(hr == S_OK, "%d) QueryInterface(IID_IMarshal) failed 0x%08x, expected S_OK.\n", i, hr); + ok(hr == S_OK, "%d) QueryInterface(IID_IMarshal) failed 0x%08lx, expected S_OK.\n", i, hr); hr = IStream_Seek(stream, no_off, STREAM_SEEK_SET, NULL); - ok(hr == S_OK, "%d) Seek failed 0x%08x, expected S_OK.\n", i, hr); + ok(hr == S_OK, "%d) Seek failed 0x%08lx, expected S_OK.\n", i, hr); hr = IMarshal_MarshalInterface(marshal, stream, &IID_IUri, (void*)uri, MSHCTX_DIFFERENTMACHINE, NULL, MSHLFLAGS_NORMAL); - ok(hr == E_INVALIDARG, "%d) MarshalInterface returned 0x%08x, expected E_INVALIDARG.\n", i, hr); + ok(hr == E_INVALIDARG, "%d) MarshalInterface returned 0x%08lx, expected E_INVALIDARG.\n", i, hr); hr = IMarshal_MarshalInterface(marshal, stream, &IID_IUri, (void*)uri, MSHCTX_CROSSCTX, NULL, MSHLFLAGS_NORMAL); - ok(hr == E_INVALIDARG, "%d) MarshalInterface returned 0x%08x, expected E_INVALIDARG.\n", i, hr); + ok(hr == E_INVALIDARG, "%d) MarshalInterface returned 0x%08lx, expected E_INVALIDARG.\n", i, hr); hr = IMarshal_MarshalInterface(marshal, stream, &IID_IUri, (void*)uri, MSHCTX_LOCAL, NULL, MSHLFLAGS_TABLESTRONG); - ok(hr == E_INVALIDARG, "%d) MarshalInterface returned 0x%08x, expected E_INVALIDARG.\n", i, hr); + ok(hr == E_INVALIDARG, "%d) MarshalInterface returned 0x%08lx, expected E_INVALIDARG.\n", i, hr); hr = IMarshal_MarshalInterface(marshal, stream, &IID_IUri, (void*)uri, MSHCTX_LOCAL, NULL, MSHLFLAGS_TABLEWEAK); - ok(hr == E_INVALIDARG, "%d) MarshalInterface returned 0x%08x, expected E_INVALIDARG.\n", i, hr); + ok(hr == E_INVALIDARG, "%d) MarshalInterface returned 0x%08lx, expected E_INVALIDARG.\n", i, hr); hr = IMarshal_MarshalInterface(marshal, stream, &IID_IUri, (void*)uri, MSHCTX_LOCAL, NULL, MSHLFLAGS_NOPING); - ok(hr == E_INVALIDARG, "%d) MarshalInterface returned 0x%08x, expected E_INVALIDARG.\n", i, hr); + ok(hr == E_INVALIDARG, "%d) MarshalInterface returned 0x%08lx, expected E_INVALIDARG.\n", i, hr); hr = IMarshal_MarshalInterface(marshal, stream, &IID_IUri, (void*)uri, MSHCTX_LOCAL, NULL, MSHLFLAGS_NORMAL); - ok(hr == S_OK, "%d) MarshalInterface failed 0x%08x, expected S_OK.\n", i, hr); + ok(hr == S_OK, "%d) MarshalInterface failed 0x%08lx, expected S_OK.\n", i, hr); hr = IMarshal_GetUnmarshalClass(marshal, &IID_IUri, (void*)uri, MSHCTX_CROSSCTX, NULL, MSHLFLAGS_NORMAL, &curi); - ok(hr == E_INVALIDARG, "%d) GetUnmarshalClass returned 0x%08x, expected E_INVALIDARG.\n", i, hr); + ok(hr == E_INVALIDARG, "%d) GetUnmarshalClass returned 0x%08lx, expected E_INVALIDARG.\n", i, hr); hr = IMarshal_GetUnmarshalClass(marshal, &IID_IUri, (void*)uri, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL, &curi); - ok(hr == S_OK, "%d) GetUnmarshalClass failed 0x%08x, expected S_OK.\n", i, hr); + ok(hr == S_OK, "%d) GetUnmarshalClass failed 0x%08lx, expected S_OK.\n", i, hr); ok(IsEqualCLSID(&curi, &CLSID_CUri), "%d) GetUnmarshalClass returned incorrect CLSID.\n", i);
hr = IStream_Seek(stream, no_off, STREAM_SEEK_CUR, &size); - ok(hr == S_OK, "%d) Seek failed 0x%08x, expected S_OK.\n", i, hr); + ok(hr == S_OK, "%d) Seek failed 0x%08lx, expected S_OK.\n", i, hr); hr = IStream_Seek(stream, no_off, STREAM_SEEK_SET, NULL); - ok(hr == S_OK, "%d) Seek failed 0x%08x, expected S_OK.\n", i, hr); + ok(hr == S_OK, "%d) Seek failed 0x%08lx, expected S_OK.\n", i, hr); hr = IStream_Read(stream, (void*)dw_data, 3*sizeof(DWORD), NULL); - ok(hr == S_OK, "%d) Read failed 0x%08x, expected S_OK.\n", i, hr); - ok(dw_data[0]-2 == U(size).LowPart, "%d) Structure size is %d, expected %d\n", + ok(hr == S_OK, "%d) Read failed 0x%08lx, expected S_OK.\n", i, hr); + ok(dw_data[0]-2 == U(size).LowPart, "%d) Structure size is %ld, expected %ld\n", i, dw_data[0]-2, U(size).LowPart); - ok(dw_data[1] == MSHCTX_LOCAL, "%d) Incorrect value %d, expected MSHCTX_LOCAL.\n", + ok(dw_data[1] == MSHCTX_LOCAL, "%d) Incorrect value %ld, expected MSHCTX_LOCAL.\n", i, dw_data[1]); - ok(dw_data[2] == dw_data[0]-8, "%d) Incorrect value %d, expected %d (PersistStream size).\n", + ok(dw_data[2] == dw_data[0]-8, "%d) Incorrect value %ld, expected %ld (PersistStream size).\n", i, dw_data[2], dw_data[0]-8); if(!test->str_props[Uri_PROPERTY_PATH].value[0] && (test->dword_props[Uri_PROPERTY_SCHEME-Uri_PROPERTY_DWORD_START].value == URL_SCHEME_HTTP || test->dword_props[Uri_PROPERTY_SCHEME-Uri_PROPERTY_DWORD_START].value == URL_SCHEME_FTP || test->dword_props[Uri_PROPERTY_SCHEME-Uri_PROPERTY_DWORD_START].value == URL_SCHEME_HTTPS)) U(max_size).LowPart += 3*sizeof(DWORD); - ok(dw_data[2] == U(max_size).LowPart, "%d) Incorrect value %d, expected %d (PersistStream size).\n", + ok(dw_data[2] == U(max_size).LowPart, "%d) Incorrect value %ld, expected %ld (PersistStream size).\n", i, dw_data[2], U(max_size).LowPart); IMarshal_Release(marshal); IUri_Release(uri);
hr = IStream_Seek(stream, no_off, STREAM_SEEK_SET, NULL); - ok(hr == S_OK, "%d) Seek failed 0x%08x, expected S_OK.\n", i, hr); + ok(hr == S_OK, "%d) Seek failed 0x%08lx, expected S_OK.\n", i, hr); hr = CoCreateInstance(&curi, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, &IID_IUri, (void**)&uri); - ok(hr == S_OK, "%d) Error creating uninitialized Uri: 0x%08x.\n", i, hr); + ok(hr == S_OK, "%d) Error creating uninitialized Uri: 0x%08lx.\n", i, hr); hr = IUri_QueryInterface(uri, &IID_IMarshal, (void**)&marshal); - ok(hr == S_OK, "%d) QueryInterface failed 0x%08x, expected S_OK.\n", i, hr); + ok(hr == S_OK, "%d) QueryInterface failed 0x%08lx, expected S_OK.\n", i, hr); IUri_Release(uri); hr = IMarshal_UnmarshalInterface(marshal, stream, &IID_IUri, (void**)&uri); - ok(hr == S_OK, "%d) UnmarshalInterface failed 0x%08x, expected S_OK.\n", i, hr); + ok(hr == S_OK, "%d) UnmarshalInterface failed 0x%08lx, expected S_OK.\n", i, hr); hr = IUri_GetRawUri(uri, &raw_uri); - ok(hr == S_OK, "%d) GetRawUri failed 0x%08x, expected S_OK.\n", i, hr); + ok(hr == S_OK, "%d) GetRawUri failed 0x%08lx, expected S_OK.\n", i, hr); ok(!strcmp_aw(test->str_props[Uri_PROPERTY_RAW_URI].value, raw_uri) || broken(test->str_props[Uri_PROPERTY_RAW_URI].broken_value && !strcmp_aw(test->str_props[Uri_PROPERTY_RAW_URI].broken_value, raw_uri)), @@ -11632,72 +11632,72 @@ static void test_UninitializedUri(void) }
hr = IUri_QueryInterface(uri, &IID_IUriBuilderFactory, (void**)&ubf); - ok(hr == S_OK, "QueryInterface(IID_IUriBuillderFactory) failed: %x.\n", hr); + ok(hr == S_OK, "QueryInterface(IID_IUriBuillderFactory) failed: %lx.\n", hr); hr = IUri_QueryInterface(uri, &IID_IPersistStream, (void**)&ps); - ok(hr == S_OK, "QueryInterface(IID_IPersistStream) failed: %x.\n", hr); + ok(hr == S_OK, "QueryInterface(IID_IPersistStream) failed: %lx.\n", hr);
hr = IUri_GetAbsoluteUri(uri, NULL); - ok(hr == E_UNEXPECTED, "GetAbsoluteUri returned %x, expected E_UNEXPECTED.\n", hr); + ok(hr == E_UNEXPECTED, "GetAbsoluteUri returned %lx, expected E_UNEXPECTED.\n", hr); hr = IUri_GetAbsoluteUri(uri, &bstr); - ok(hr == E_UNEXPECTED, "GetAbsoluteUri returned %x, expected E_UNEXPECTED.\n", hr); + ok(hr == E_UNEXPECTED, "GetAbsoluteUri returned %lx, expected E_UNEXPECTED.\n", hr); hr = IUri_GetAuthority(uri, &bstr); - ok(hr == E_UNEXPECTED, "GetAuthority returned %x, expected E_UNEXPECTED.\n", hr); + ok(hr == E_UNEXPECTED, "GetAuthority returned %lx, expected E_UNEXPECTED.\n", hr); hr = IUri_GetDisplayUri(uri, &bstr); - ok(hr == E_UNEXPECTED, "GetDisplayUri returned %x, expected E_UNEXPECTED.\n", hr); + ok(hr == E_UNEXPECTED, "GetDisplayUri returned %lx, expected E_UNEXPECTED.\n", hr); hr = IUri_GetDomain(uri, &bstr); - ok(hr == E_UNEXPECTED, "GetDomain returned %x, expected E_UNEXPECTED.\n", hr); + ok(hr == E_UNEXPECTED, "GetDomain returned %lx, expected E_UNEXPECTED.\n", hr); hr = IUri_GetExtension(uri, &bstr); - ok(hr == E_UNEXPECTED, "GetExtension returned %x, expected E_UNEXPECTED.\n", hr); + ok(hr == E_UNEXPECTED, "GetExtension returned %lx, expected E_UNEXPECTED.\n", hr); hr = IUri_GetFragment(uri, &bstr); - ok(hr == E_UNEXPECTED, "GetFragment returned %x, expected E_UNEXPECTED.\n", hr); + ok(hr == E_UNEXPECTED, "GetFragment returned %lx, expected E_UNEXPECTED.\n", hr); hr = IUri_GetHost(uri, &bstr); - ok(hr == E_UNEXPECTED, "GetHost returned %x, expected E_UNEXPECTED.\n", hr); + ok(hr == E_UNEXPECTED, "GetHost returned %lx, expected E_UNEXPECTED.\n", hr); hr = IUri_GetHostType(uri, &dword); - ok(hr == E_UNEXPECTED, "GetHostType returned %x, expected E_UNEXPECTED.\n", hr); + ok(hr == E_UNEXPECTED, "GetHostType returned %lx, expected E_UNEXPECTED.\n", hr); hr = IUri_GetPassword(uri, &bstr); - ok(hr == E_UNEXPECTED, "GetPassword returned %x, expected E_UNEXPECTED.\n", hr); + ok(hr == E_UNEXPECTED, "GetPassword returned %lx, expected E_UNEXPECTED.\n", hr); hr = IUri_GetPassword(uri, &bstr); - ok(hr == E_UNEXPECTED, "GetPassword returned %x, expected E_UNEXPECTED.\n", hr); + ok(hr == E_UNEXPECTED, "GetPassword returned %lx, expected E_UNEXPECTED.\n", hr); hr = IUri_GetPathAndQuery(uri, &bstr); - ok(hr == E_UNEXPECTED, "GetPathAndQuery returned %x, expected E_UNEXPECTED.\n", hr); + ok(hr == E_UNEXPECTED, "GetPathAndQuery returned %lx, expected E_UNEXPECTED.\n", hr); hr = IUri_GetPort(uri, &dword); - ok(hr == E_UNEXPECTED, "GetPort returned %x, expected E_UNEXPECTED.\n", hr); + ok(hr == E_UNEXPECTED, "GetPort returned %lx, expected E_UNEXPECTED.\n", hr); hr = IUri_GetProperties(uri, &dword); - ok(hr == E_UNEXPECTED, "GetProperties returned %x, expected E_UNEXPECTED.\n", hr); + ok(hr == E_UNEXPECTED, "GetProperties returned %lx, expected E_UNEXPECTED.\n", hr); hr = IUri_GetPropertyBSTR(uri, Uri_PROPERTY_RAW_URI, &bstr, 0); - ok(hr == E_UNEXPECTED, "GetPropertyBSTR returned %x, expected E_UNEXPECTED.\n", hr); + ok(hr == E_UNEXPECTED, "GetPropertyBSTR returned %lx, expected E_UNEXPECTED.\n", hr); hr = IUri_GetPropertyDWORD(uri, Uri_PROPERTY_PORT, &dword, 0); - ok(hr == E_UNEXPECTED, "GetPropertyDWORD returned %x, expected E_UNEXPECTED.\n", hr); + ok(hr == E_UNEXPECTED, "GetPropertyDWORD returned %lx, expected E_UNEXPECTED.\n", hr); hr = IUri_GetPropertyLength(uri, Uri_PROPERTY_RAW_URI, &dword, 0); - ok(hr == E_UNEXPECTED, "GetPropertyLength returned %x, expected E_UNEXPECTED.\n", hr); + ok(hr == E_UNEXPECTED, "GetPropertyLength returned %lx, expected E_UNEXPECTED.\n", hr); hr = IUri_GetQuery(uri, &bstr); - ok(hr == E_UNEXPECTED, "GetQuery returned %x, expected E_UNEXPECTED.\n", hr); + ok(hr == E_UNEXPECTED, "GetQuery returned %lx, expected E_UNEXPECTED.\n", hr); hr = IUri_GetRawUri(uri, &bstr); - ok(hr == E_UNEXPECTED, "GetRawUri returned %x, expected E_UNEXPECTED.\n", hr); + ok(hr == E_UNEXPECTED, "GetRawUri returned %lx, expected E_UNEXPECTED.\n", hr); hr = IUri_GetScheme(uri, &dword); - ok(hr == E_UNEXPECTED, "GetScheme returned %x, expected E_UNEXPECTED.\n", hr); + ok(hr == E_UNEXPECTED, "GetScheme returned %lx, expected E_UNEXPECTED.\n", hr); hr = IUri_GetSchemeName(uri, &bstr); - ok(hr == E_UNEXPECTED, "GetSchemeName returned %x, expected E_UNEXPECTED.\n", hr); + ok(hr == E_UNEXPECTED, "GetSchemeName returned %lx, expected E_UNEXPECTED.\n", hr); hr = IUri_GetUserInfo(uri, &bstr); - ok(hr == E_UNEXPECTED, "GetUserInfo returned %x, expected E_UNEXPECTED.\n", hr); + ok(hr == E_UNEXPECTED, "GetUserInfo returned %lx, expected E_UNEXPECTED.\n", hr); hr = IUri_GetUserName(uri, &bstr); - ok(hr == E_UNEXPECTED, "GetUserName returned %x, expected E_UNEXPECTED.\n", hr); + ok(hr == E_UNEXPECTED, "GetUserName returned %lx, expected E_UNEXPECTED.\n", hr); hr = IUri_GetZone(uri, &dword); - ok(hr == E_UNEXPECTED, "GetZone returned %x, expected E_UNEXPECTED.\n", hr); + ok(hr == E_UNEXPECTED, "GetZone returned %lx, expected E_UNEXPECTED.\n", hr); hr = IUri_IsEqual(uri, uri, &eq); - ok(hr == E_UNEXPECTED, "IsEqual returned %x, expected E_UNEXPECTED.\n", hr); + ok(hr == E_UNEXPECTED, "IsEqual returned %lx, expected E_UNEXPECTED.\n", hr);
hr = IUriBuilderFactory_CreateInitializedIUriBuilder(ubf, 0, 0, &ub); - ok(hr == E_UNEXPECTED, "CreateInitializedIUriBuilder returned %x, expected E_UNEXPECTED.\n", hr); + ok(hr == E_UNEXPECTED, "CreateInitializedIUriBuilder returned %lx, expected E_UNEXPECTED.\n", hr); hr = IUriBuilderFactory_CreateIUriBuilder(ubf, 0, 0, &ub); - ok(hr == S_OK, "CreateIUriBuilder returned %x, expected S_OK.\n", hr); + ok(hr == S_OK, "CreateIUriBuilder returned %lx, expected S_OK.\n", hr); IUriBuilder_Release(ub);
hr = IPersistStream_GetSizeMax(ps, &ui); - ok(hr == S_OK, "GetSizeMax returned %x, expected S_OK.\n", hr); - ok(ui.u.LowPart == 34, "ui.LowPart = %d, expected 34.\n", ui.u.LowPart); + ok(hr == S_OK, "GetSizeMax returned %lx, expected S_OK.\n", hr); + ok(ui.u.LowPart == 34, "ui.LowPart = %ld, expected 34.\n", ui.u.LowPart); hr = IPersistStream_IsDirty(ps); - ok(hr == S_FALSE, "IsDirty returned %x, expected S_FALSE.\n", hr); + ok(hr == S_FALSE, "IsDirty returned %lx, expected S_FALSE.\n", hr);
IPersistStream_Release(ps); IUriBuilderFactory_Release(ubf); diff --git a/dlls/urlmon/tests/url.c b/dlls/urlmon/tests/url.c index 2f2667cea2d..cfd29910f35 100644 --- a/dlls/urlmon/tests/url.c +++ b/dlls/urlmon/tests/url.c @@ -244,29 +244,29 @@ static void test_CreateURLMoniker(LPCWSTR url1, LPCWSTR url2)
hr = CreateURLMoniker(NULL, NULL, NULL); ok(hr == E_INVALIDARG, - "Expected CreateURLMoniker to return E_INVALIDARG, got 0x%08x\n", hr); + "Expected CreateURLMoniker to return E_INVALIDARG, got 0x%08lx\n", hr);
mon1 = (IMoniker *)0xdeadbeef; hr = CreateURLMoniker(NULL, NULL, &mon1); ok(hr == E_INVALIDARG, - "Expected CreateURLMoniker to return E_INVALIDARG, got 0x%08x\n", hr); + "Expected CreateURLMoniker to return E_INVALIDARG, got 0x%08lx\n", hr); ok(mon1 == NULL, "Expected the output pointer to be NULL, got %p\n", mon1);
hr = CreateURLMoniker(NULL, emptyW, NULL); ok(hr == E_INVALIDARG, - "Expected CreateURLMoniker to return E_INVALIDARG, got 0x%08x\n", hr); + "Expected CreateURLMoniker to return E_INVALIDARG, got 0x%08lx\n", hr);
hr = CreateURLMoniker(NULL, emptyW, &mon1); ok(hr == S_OK || broken(hr == MK_E_SYNTAX), /* IE5/IE5.01/IE6 SP2 */ - "Expected CreateURLMoniker to return S_OK, got 0x%08x\n", hr); + "Expected CreateURLMoniker to return S_OK, got 0x%08lx\n", hr); if(mon1) IMoniker_Release(mon1);
hr = CreateURLMoniker(NULL, url1, &mon1); - ok(hr == S_OK, "failed to create moniker: 0x%08x\n", hr); + ok(hr == S_OK, "failed to create moniker: 0x%08lx\n", hr); if(hr == S_OK) { hr = CreateURLMoniker(mon1, url2, &mon2); - ok(hr == S_OK, "failed to create moniker: 0x%08x\n", hr); + ok(hr == S_OK, "failed to create moniker: 0x%08lx\n", hr); } if(mon1) IMoniker_Release(mon1); if(mon2) IMoniker_Release(mon2); @@ -286,22 +286,22 @@ static void test_create(void)
mon = (void*)0xdeadbeef; hr = CreateURLMoniker(NULL, relativeW, &mon); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = CreateBindCtx(0, &bctx); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
stream = (void*)0xdeadbeef; hr = IMoniker_BindToStorage(mon, bctx, NULL, &IID_IStream, (void**)&stream); - todo_wine ok(hr == INET_E_UNKNOWN_PROTOCOL, "got 0x%08x\n", hr); + todo_wine ok(hr == INET_E_UNKNOWN_PROTOCOL, "got 0x%08lx\n", hr); ok(stream == NULL, "got %p\n", stream);
hr = IMoniker_BindToStorage(mon, bctx, NULL, &IID_IStream, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
stream = (void*)0xdeadbeef; hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IStream, (void**)&stream); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(stream == NULL || broken(stream == (void*)0xdeadbeef) /* starting XP SP3 it's set to null */, "got %p\n", stream);
@@ -309,16 +309,16 @@ static void test_create(void)
mon = (void*)0xdaedbeef; hr = CreateURLMoniker(NULL, winetest_data_urlW, &mon); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
stream = (void*)0xdeadbeef; hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IStream, (void**)&stream); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(stream == NULL || broken(stream == (void*)0xdeadbeef) /* starting XP SP3 it's set to null */, "got %p\n", stream);
hr = IMoniker_BindToStorage(mon, bctx, NULL, &IID_IStream, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
IMoniker_Release(mon); IBindCtx_Release(bctx); @@ -343,7 +343,7 @@ static ULONG WINAPI Priority_Release(IInternetPriority *iface) static HRESULT WINAPI Priority_SetPriority(IInternetPriority *iface, LONG nPriority) { CHECK_EXPECT(SetPriority); - ok(!nPriority, "nPriority = %d\n", nPriority); + ok(!nPriority, "nPriority = %ld\n", nPriority); return S_OK; }
@@ -409,10 +409,10 @@ static void test_switch_fail(void) tested_switch_fail = TRUE;
hres = IBinding_QueryInterface(current_binding, &IID_IInternetProtocolSink, (void**)&binding_sink); - ok(hres == S_OK, "Could not get IInternetProtocolSink iface: %08x\n", hres); + ok(hres == S_OK, "Could not get IInternetProtocolSink iface: %08lx\n", hres); if(SUCCEEDED(hres)) { hres = IInternetProtocolSink_Switch(binding_sink, &protocoldata); - ok(hres == E_FAIL, "Switch failed: %08x, expected E_FAIL\n", hres); + ok(hres == E_FAIL, "Switch failed: %08lx, expected E_FAIL\n", hres); IInternetProtocolSink_Release(binding_sink); } } @@ -430,7 +430,7 @@ static DWORD WINAPI thread_proc(PVOID arg) } hres = IInternetProtocolSink_ReportProgress(protocol_sink, BINDSTATUS_FINDINGRESOURCE, wszWineHQSite); - ok(hres == S_OK, "ReportProgress failed: %08x\n", hres); + ok(hres == S_OK, "ReportProgress failed: %08lx\n", hres); if(!no_callback) { ok( WaitForSingleObject(complete_event, 90000) == WAIT_OBJECT_0, "wait timed out\n" ); if(bind_to_object) @@ -447,7 +447,7 @@ static DWORD WINAPI thread_proc(PVOID arg) } hres = IInternetProtocolSink_ReportProgress(protocol_sink, BINDSTATUS_CONNECTING, wszWineHQIP); - ok(hres == S_OK, "ReportProgress failed: %08x\n", hres); + ok(hres == S_OK, "ReportProgress failed: %08lx\n", hres); if(!no_callback) { ok( WaitForSingleObject(complete_event, 90000) == WAIT_OBJECT_0, "wait timed out\n" ); if(bind_to_object) @@ -464,7 +464,7 @@ static DWORD WINAPI thread_proc(PVOID arg) } hres = IInternetProtocolSink_ReportProgress(protocol_sink, BINDSTATUS_SENDINGREQUEST, NULL); - ok(hres == S_OK, "ReportProgress failed: %08x\n", hres); + ok(hres == S_OK, "ReportProgress failed: %08lx\n", hres); if(!no_callback) { ok( WaitForSingleObject(complete_event, 90000) == WAIT_OBJECT_0, "wait timed out\n" ); if(bind_to_object) @@ -479,7 +479,7 @@ static DWORD WINAPI thread_proc(PVOID arg) else SET_EXPECT(OnProgress_REDIRECTING); hres = IInternetProtocolSink_ReportProgress(protocol_sink, BINDSTATUS_REDIRECTING, winetest_data_urlW); - ok(hres == S_OK, "ReportProgress(BINDSTATUS_REFIRECTING) failed: %08x\n", hres); + ok(hres == S_OK, "ReportProgress(BINDSTATUS_REFIRECTING) failed: %08lx\n", hres); ok( WaitForSingleObject(complete_event, 90000) == WAIT_OBJECT_0, "wait timed out\n" ); if(bind_to_object) CHECK_CALLED(Obj_OnProgress_REDIRECTING); @@ -492,7 +492,7 @@ static DWORD WINAPI thread_proc(PVOID arg) SET_EXPECT(Continue); prot_state = 1; hres = IInternetProtocolSink_Switch(protocol_sink, &protocoldata); - ok(hres == S_OK, "Switch failed: %08x\n", hres); + ok(hres == S_OK, "Switch failed: %08lx\n", hres); ok( WaitForSingleObject(complete_event, 90000) == WAIT_OBJECT_0, "wait timed out\n" );
CHECK_CALLED(Continue); @@ -520,7 +520,7 @@ static DWORD WINAPI thread_proc(PVOID arg) SET_EXPECT(Continue); prot_state = 2; hres = IInternetProtocolSink_Switch(protocol_sink, &protocoldata); - ok(hres == S_OK, "Switch failed: %08x\n", hres); + ok(hres == S_OK, "Switch failed: %08lx\n", hres); ok( WaitForSingleObject(complete_event, 90000) == WAIT_OBJECT_0, "wait timed out\n" ); CHECK_CALLED(Continue); if(test_abort) { @@ -539,7 +539,7 @@ static DWORD WINAPI thread_proc(PVOID arg) SET_EXPECT(Continue); prot_state = 2; hres = IInternetProtocolSink_Switch(protocol_sink, &protocoldata); - ok(hres == S_OK, "Switch failed: %08x\n", hres); + ok(hres == S_OK, "Switch failed: %08lx\n", hres); ok( WaitForSingleObject(complete_event, 90000) == WAIT_OBJECT_0, "wait timed out\n" ); CHECK_CALLED(Continue); CHECK_CALLED(Read); @@ -551,7 +551,7 @@ static DWORD WINAPI thread_proc(PVOID arg) SET_EXPECT(Continue); prot_state = 3; hres = IInternetProtocolSink_Switch(protocol_sink, &protocoldata); - ok(hres == S_OK, "Switch failed: %08x\n", hres); + ok(hres == S_OK, "Switch failed: %08lx\n", hres); ok( WaitForSingleObject(complete_event, 90000) == WAIT_OBJECT_0, "wait timed out\n" ); CHECK_CALLED(Continue); CHECK_CALLED(Read); @@ -587,14 +587,14 @@ static HRESULT WINAPI Protocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, ok(szUrl && !lstrcmpW(szUrl, current_url), "wrong url %s\n", wine_dbgstr_w(szUrl)); ok(pOIProtSink != NULL, "pOIProtSink == NULL\n"); ok(pOIBindInfo != NULL, "pOIBindInfo == NULL\n"); - ok(grfPI == 0, "grfPI=%d, expected 0\n", grfPI); - ok(dwReserved == 0, "dwReserved=%lx, expected 0\n", dwReserved); + ok(grfPI == 0, "grfPI=%ld, expected 0\n", grfPI); + ok(dwReserved == 0, "dwReserved=%Ix, expected 0\n", dwReserved);
if(!filedwl_api && binding_hres != S_OK) { SET_EXPECT(OnStopBinding); SET_EXPECT(Terminate); hres = IInternetProtocolSink_ReportResult(pOIProtSink, binding_hres, 0, NULL); - ok(hres == S_OK, "ReportResult failed: %08x\n", hres); + ok(hres == S_OK, "ReportResult failed: %08lx\n", hres); CHECK_CALLED(OnStopBinding); CHECK_CALLED(Terminate);
@@ -604,12 +604,12 @@ static HRESULT WINAPI Protocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, memset(&bindinfo, 0, sizeof(bindinfo)); bindinfo.cbSize = 0; hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &bind_info, &bindinfo); - ok(hres == E_INVALIDARG, "GetBindInfo returned: %08x, expected E_INVALIDARG\n", hres); + ok(hres == E_INVALIDARG, "GetBindInfo returned: %08lx, expected E_INVALIDARG\n", hres);
memset(&bindinfo, 0, sizeof(bindinfo)); bindinfo.cbSize = sizeof(bindinfo); hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &bind_info, &bindinfo); - ok(hres == S_OK, "GetBindInfo failed: %08x\n", hres); + ok(hres == S_OK, "GetBindInfo failed: %08lx\n", hres);
ok(bind_info & BINDF_FROMURLMON, "BINDF_FROMURLMON is not set\n");
@@ -621,25 +621,25 @@ static HRESULT WINAPI Protocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
bind_info &= ~(BINDF_NEEDFILE|BINDF_FROMURLMON); if(filedwl_api || no_callback) - ok(bind_info == BINDF_PULLDATA, "bind_info = %x, expected BINDF_PULLDATA\n", bind_info); + ok(bind_info == BINDF_PULLDATA, "bind_info = %lx, expected BINDF_PULLDATA\n", bind_info); else - ok(bind_info == (bindf & ~(BINDF_NEEDFILE|BINDF_FROMURLMON)), "bind_info = %x, expected %x\n", + ok(bind_info == (bindf & ~(BINDF_NEEDFILE|BINDF_FROMURLMON)), "bind_info = %lx, expected %lx\n", bind_info, (bindf & ~(BINDF_NEEDFILE|BINDF_FROMURLMON)));
- ok(bindinfo.cbSize == sizeof(bindinfo), "bindinfo.cbSize = %d\n", bindinfo.cbSize); + ok(bindinfo.cbSize == sizeof(bindinfo), "bindinfo.cbSize = %ld\n", bindinfo.cbSize); ok(!bindinfo.szExtraInfo, "bindinfo.szExtraInfo = %p\n", bindinfo.szExtraInfo); ok(!memcmp(&bindinfo.stgmedData, &stgmed_zero, sizeof(STGMEDIUM)), "wrong stgmedData\n"); - ok(!bindinfo.grfBindInfoF, "bindinfo.grfBindInfoF = %d\n", bindinfo.grfBindInfoF); - ok(!bindinfo.dwBindVerb, "bindinfo.dwBindVerb = %d\n", bindinfo.dwBindVerb); + ok(!bindinfo.grfBindInfoF, "bindinfo.grfBindInfoF = %ld\n", bindinfo.grfBindInfoF); + ok(!bindinfo.dwBindVerb, "bindinfo.dwBindVerb = %ld\n", bindinfo.dwBindVerb); ok(!bindinfo.szCustomVerb, "bindinfo.szCustomVerb = %p\n", bindinfo.szCustomVerb); - ok(!bindinfo.cbstgmedData, "bindinfo.cbstgmedData = %d\n", bindinfo.cbstgmedData); - ok(bindinfo.dwOptions == (bind_to_object ? 0x100000 : 0), "bindinfo.dwOptions = %x\n", bindinfo.dwOptions); - ok(!bindinfo.dwOptionsFlags, "bindinfo.dwOptionsFlags = %d\n", bindinfo.dwOptionsFlags); - ok(!bindinfo.dwCodePage, "bindinfo.dwCodePage = %d\n", bindinfo.dwCodePage); + ok(!bindinfo.cbstgmedData, "bindinfo.cbstgmedData = %ld\n", bindinfo.cbstgmedData); + ok(bindinfo.dwOptions == (bind_to_object ? 0x100000 : 0), "bindinfo.dwOptions = %lx\n", bindinfo.dwOptions); + ok(!bindinfo.dwOptionsFlags, "bindinfo.dwOptionsFlags = %ld\n", bindinfo.dwOptionsFlags); + ok(!bindinfo.dwCodePage, "bindinfo.dwCodePage = %ld\n", bindinfo.dwCodePage); ok(!memcmp(&bindinfo.securityAttributes, &sa_zero, sizeof(sa_zero)), "wrong bindinfo.securityAttributes\n"); ok(IsEqualGUID(&bindinfo.iid, &IID_NULL), "wrong bindinfo.iid\n"); ok(!bindinfo.pUnk, "bindinfo.pUnk = %p\n", bindinfo.pUnk); - ok(!bindinfo.dwReserved, "bindinfo.dwReserved = %d\n", bindinfo.dwReserved); + ok(!bindinfo.dwReserved, "bindinfo.dwReserved = %ld\n", bindinfo.dwReserved);
if(only_check_prot_args) return E_FAIL; @@ -649,7 +649,7 @@ static HRESULT WINAPI Protocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_DIRECTBIND, NULL); ok(hres == S_OK, - "ReportProgress(BINDSTATUS_SENDINGREQUEST) failed: %08x\n", hres); + "ReportProgress(BINDSTATUS_SENDINGREQUEST) failed: %08lx\n", hres);
case FILE_TEST: case ITS_TEST: @@ -660,7 +660,7 @@ static HRESULT WINAPI Protocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_SENDINGREQUEST, emptyW); ok(hres == S_OK, - "ReportProgress(BINDSTATUS_SENDINGREQUEST) failed: %08x\n", hres); + "ReportProgress(BINDSTATUS_SENDINGREQUEST) failed: %08lx\n", hres); if(bind_to_object) CHECK_CALLED(Obj_OnProgress_SENDINGREQUEST); else @@ -691,37 +691,37 @@ static HRESULT WINAPI Protocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, CLEAR_CALLED(QueryService_IInternetBindInfo); /* IE <8 */
ok(hres == E_NOINTERFACE, - "GetBindString(BINDSTRING_USER_AGETNT) failed: %08x\n", hres); - ok(fetched == 256, "fetched = %d, expected 254\n", fetched); + "GetBindString(BINDSTRING_USER_AGETNT) failed: %08lx\n", hres); + ok(fetched == 256, "fetched = %ld, expected 254\n", fetched); ok(ua == (LPWSTR)0xdeadbeef, "ua = %p\n", ua);
hres = IInternetBindInfo_GetBindString(pOIBindInfo, BINDSTRING_ACCEPT_MIMES, accept_mimes, 256, &fetched); ok(hres == S_OK, - "GetBindString(BINDSTRING_ACCEPT_MIMES) failed: %08x\n", hres); - ok(fetched == 1, "fetched = %d, expected 1\n", fetched); + "GetBindString(BINDSTRING_ACCEPT_MIMES) failed: %08lx\n", hres); + ok(fetched == 1, "fetched = %ld, expected 1\n", fetched); ok(!lstrcmpW(wszMimes, accept_mimes[0]), "unexpected mimes\n"); CoTaskMemFree(accept_mimes[0]);
hres = IInternetBindInfo_GetBindString(pOIBindInfo, BINDSTRING_ACCEPT_MIMES, NULL, 256, &fetched); ok(hres == E_INVALIDARG, - "GetBindString(BINDSTRING_ACCEPT_MIMES) failed: %08x\n", hres); + "GetBindString(BINDSTRING_ACCEPT_MIMES) failed: %08lx\n", hres);
hres = IInternetBindInfo_GetBindString(pOIBindInfo, BINDSTRING_ACCEPT_MIMES, accept_mimes, 256, NULL); ok(hres == E_INVALIDARG, - "GetBindString(BINDSTRING_ACCEPT_MIMES) failed: %08x\n", hres); + "GetBindString(BINDSTRING_ACCEPT_MIMES) failed: %08lx\n", hres);
hres = IInternetBindInfo_QueryInterface(pOIBindInfo, &IID_IServiceProvider, (void**)&service_provider); - ok(hres == S_OK, "QueryInterface failed: %08x\n", hres); + ok(hres == S_OK, "QueryInterface failed: %08lx\n", hres);
SET_EXPECT(QueryInterface_IHttpNegotiate); hres = IServiceProvider_QueryService(service_provider, &IID_IHttpNegotiate, &IID_IHttpNegotiate, (void**)&http_negotiate); CLEAR_CALLED(QueryInterface_IHttpNegotiate); /* IE <8 */ - ok(hres == S_OK, "QueryService failed: %08x\n", hres); + ok(hres == S_OK, "QueryService failed: %08lx\n", hres);
if(!no_callback) { SET_EXPECT(BeginningTransaction); @@ -734,14 +734,14 @@ static HRESULT WINAPI Protocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, CHECK_CALLED(BeginningTransaction); } IHttpNegotiate_Release(http_negotiate); - ok(hres == S_OK, "BeginningTransction failed: %08x\n", hres); + ok(hres == S_OK, "BeginningTransction failed: %08lx\n", hres); ok(additional_headers == NULL, "additional_headers=%p\n", additional_headers);
SET_EXPECT(QueryInterface_IHttpNegotiate2); hres = IServiceProvider_QueryService(service_provider, &IID_IHttpNegotiate2, &IID_IHttpNegotiate2, (void**)&http_negotiate2); CLEAR_CALLED(QueryInterface_IHttpNegotiate2); /* IE <8 */ - ok(hres == S_OK, "QueryService failed: %08x\n", hres); + ok(hres == S_OK, "QueryService failed: %08lx\n", hres);
size = 512; if(!no_callback) { @@ -754,8 +754,8 @@ static HRESULT WINAPI Protocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, CHECK_CALLED(GetRootSecurityId); } IHttpNegotiate2_Release(http_negotiate2); - ok(hres == E_FAIL, "GetRootSecurityId failed: %08x, expected E_FAIL\n", hres); - ok(size == (no_callback ? 512 : 13), "size=%d\n", size); + ok(hres == E_FAIL, "GetRootSecurityId failed: %08lx, expected E_FAIL\n", hres); + ok(size == (no_callback ? 512 : 13), "size=%ld\n", size);
if(!no_callback) { SET_EXPECT(QueryService_IHttpSecurity); @@ -763,7 +763,7 @@ static HRESULT WINAPI Protocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, } hres = IServiceProvider_QueryService(service_provider, &IID_IHttpSecurity, &IID_IHttpSecurity, (void**)&http_security); - ok(hres == (no_callback ? E_NOINTERFACE : S_OK), "QueryService failed: 0x%08x\n", hres); + ok(hres == (no_callback ? E_NOINTERFACE : S_OK), "QueryService failed: 0x%08lx\n", hres); if(!no_callback) { CHECK_CALLED(QueryService_IHttpSecurity); CHECK_CALLED(QueryInterface_IHttpSecurity); @@ -781,7 +781,7 @@ static HRESULT WINAPI Protocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, data.grfFlags = PI_FORCE_ASYNC; prot_state = 0; hres = IInternetProtocolSink_Switch(pOIProtSink, &data); - ok(hres == S_OK, "Switch failed: %08x\n", hres); + ok(hres == S_OK, "Switch failed: %08lx\n", hres); SET_EXPECT(Continue); SetEvent(complete_event2); return E_PENDING; @@ -795,7 +795,7 @@ static HRESULT WINAPI Protocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_CACHEFILENAMEAVAILABLE, file_url+7); ok(hres == S_OK, - "ReportProgress(BINDSTATUS_CACHEFILENAMEAVAILABLE) failed: %08x\n", hres); + "ReportProgress(BINDSTATUS_CACHEFILENAMEAVAILABLE) failed: %08lx\n", hres);
if(bind_to_object) SET_EXPECT(Obj_OnProgress_MIMETYPEAVAILABLE); @@ -804,7 +804,7 @@ static HRESULT WINAPI Protocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE, wszTextHtml); ok(hres == S_OK, - "ReportProgress(BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE) failed: %08x\n", hres); + "ReportProgress(BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE) failed: %08lx\n", hres); if(bind_to_object) CHECK_CALLED(Obj_OnProgress_MIMETYPEAVAILABLE); else @@ -813,12 +813,12 @@ static HRESULT WINAPI Protocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, SET_EXPECT(OnProgress_MIMETYPEAVAILABLE); hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE, wszTextHtml); ok(hres == S_OK, - "ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE) failed: %08x\n", hres); + "ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE) failed: %08lx\n", hres); CHECK_CALLED(OnProgress_MIMETYPEAVAILABLE); }else { hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_MIMETYPEAVAILABLE, wszTextHtml); ok(hres == S_OK, - "ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE) failed: %08x\n", hres); + "ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE) failed: %08lx\n", hres); }
if(test_protocol == ABOUT_TEST) @@ -858,7 +858,7 @@ static HRESULT WINAPI Protocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, }
hres = IInternetProtocolSink_ReportData(pOIProtSink, bscf, 13, 13); - ok(hres == S_OK, "ReportData failed: %08x\n", hres); + ok(hres == S_OK, "ReportData failed: %08lx\n", hres);
CHECK_CALLED(Read); if(bind_to_object) { @@ -893,19 +893,19 @@ static HRESULT WINAPI Protocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, if(test_protocol == ITS_TEST) { SET_EXPECT(Read); hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_BEGINDOWNLOADDATA, NULL); - ok(hres == S_OK, "ReportProgress(BINDSTATUS_BEGINDOWNLOADDATA) failed: %08x\n", hres); + ok(hres == S_OK, "ReportProgress(BINDSTATUS_BEGINDOWNLOADDATA) failed: %08lx\n", hres); CHECK_CALLED(Read); }else if(!bind_to_object && test_protocol == FILE_TEST) { SET_EXPECT(Read); hres = IInternetProtocolSink_ReportData(pOIProtSink, bscf, 13, 13); - ok(hres == S_OK, "ReportData failed: %08x\n", hres); + ok(hres == S_OK, "ReportData failed: %08lx\n", hres); CHECK_CALLED(Read); }
if(test_protocol != WINETEST_SYNC_TEST) { SET_EXPECT(Terminate); hres = IInternetProtocolSink_ReportResult(pOIProtSink, S_OK, 0, NULL); - ok(hres == S_OK, "ReportResult failed: %08x\n", hres); + ok(hres == S_OK, "ReportResult failed: %08lx\n", hres); CHECK_CALLED(Terminate); }
@@ -920,7 +920,7 @@ static HRESULT WINAPI Protocol_Continue(IInternetProtocol *iface,
CHECK_EXPECT(Continue);
- ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId()); + ok(GetCurrentThreadId() == thread_id, "wrong thread %ld\n", GetCurrentThreadId());
if(!bind_to_object) ok(reported_url && !lstrcmpW(reported_url, current_url), "wrong url %s\n", wine_dbgstr_w(reported_url)); @@ -933,12 +933,12 @@ static HRESULT WINAPI Protocol_Continue(IInternetProtocol *iface, case 0: hres = IInternetProtocolSink_ReportProgress(protocol_sink, BINDSTATUS_SENDINGREQUEST, NULL); - ok(hres == S_OK, "ReportProgress failed: %08x\n", hres); + ok(hres == S_OK, "ReportProgress failed: %08lx\n", hres);
hres = IInternetProtocolSink_ReportProgress(protocol_sink, BINDSTATUS_MIMETYPEAVAILABLE, wszTextHtml); ok(hres == S_OK, - "ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE) failed: %08x\n", hres); + "ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE) failed: %08lx\n", hres);
bscf |= BSCF_FIRSTDATANOTIFICATION|BSCF_INTERMEDIATEDATANOTIFICATION; break; @@ -965,21 +965,21 @@ static HRESULT WINAPI Protocol_Continue(IInternetProtocol *iface, CHECK_CALLED(OnResponse); } IHttpNegotiate_Release(http_negotiate); - ok(hres == S_OK, "OnResponse failed: %08x\n", hres); + ok(hres == S_OK, "OnResponse failed: %08lx\n", hres);
if(test_protocol == HTTPS_TEST || test_redirect) { hres = IInternetProtocolSink_ReportProgress(protocol_sink, BINDSTATUS_ACCEPTRANGES, NULL); - ok(hres == S_OK, "ReportProgress(BINDSTATUS_ACCEPTRANGES) failed: %08x\n", hres); + ok(hres == S_OK, "ReportProgress(BINDSTATUS_ACCEPTRANGES) failed: %08lx\n", hres); }
hres = IInternetProtocolSink_ReportProgress(protocol_sink, BINDSTATUS_MIMETYPEAVAILABLE, wszTextHtml); ok(hres == S_OK, - "ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE) failed: %08x\n", hres); + "ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE) failed: %08lx\n", hres);
hres = IInternetProtocolSink_ReportProgress(protocol_sink, BINDSTATUS_CACHEFILENAMEAVAILABLE, use_cache_file ? cache_file_name : cache_fileW); - ok(hres == S_OK, "ReportProgress(BINDSTATUS_CACHEFILENAMEAVAILABLE) failed: %08x\n", hres); + ok(hres == S_OK, "ReportProgress(BINDSTATUS_CACHEFILENAMEAVAILABLE) failed: %08lx\n", hres);
bscf |= BSCF_FIRSTDATANOTIFICATION; break; @@ -991,14 +991,14 @@ static HRESULT WINAPI Protocol_Continue(IInternetProtocol *iface, }
hres = IInternetProtocolSink_ReportData(protocol_sink, bscf, 100, 400); - ok(hres == S_OK, "ReportData failed: %08x\n", hres); + ok(hres == S_OK, "ReportData failed: %08lx\n", hres);
if(prot_state != 2 || !test_abort) SET_EXPECT(Read); switch(prot_state) { case 0: hres = IInternetProtocolSink_ReportResult(protocol_sink, S_OK, 0, NULL); - ok(hres == S_OK, "ReportResult failed: %08x\n", hres); + ok(hres == S_OK, "ReportResult failed: %08lx\n", hres); SET_EXPECT(OnProgress_SENDINGREQUEST); SET_EXPECT(OnProgress_MIMETYPEAVAILABLE); SET_EXPECT(OnProgress_BEGINDOWNLOADDATA); @@ -1050,11 +1050,11 @@ static HRESULT WINAPI Protocol_Abort(IInternetProtocol *iface, HRESULT hrReason,
CHECK_EXPECT(Abort);
- ok(hrReason == E_ABORT, "hrReason = %08x\n", hrReason); - ok(!dwOptions, "dwOptions = %x\n", dwOptions); + ok(hrReason == E_ABORT, "hrReason = %08lx\n", hrReason); + ok(!dwOptions, "dwOptions = %lx\n", dwOptions);
hres = IInternetProtocolSink_ReportResult(protocol_sink, E_ABORT, ERROR_SUCCESS, NULL); - ok(hres == S_OK, "ReportResult failed: %08x\n", hres); + ok(hres == S_OK, "ReportResult failed: %08lx\n", hres);
return S_OK; } @@ -1063,7 +1063,7 @@ static HRESULT WINAPI Protocol_Terminate(IInternetProtocol *iface, DWORD dwOptio { CHECK_EXPECT(Terminate);
- ok(dwOptions == 0, "dwOptions=%d, expected 0\n", dwOptions); + ok(dwOptions == 0, "dwOptions=%ld, expected 0\n", dwOptions);
if(protocol_sink) { IInternetProtocolSink_Release(protocol_sink); @@ -1138,10 +1138,10 @@ static HRESULT WINAPI Protocol_Read(IInternetProtocol *iface, void *pv,
hres = IInternetProtocolSink_ReportData(protocol_sink, BSCF_LASTDATANOTIFICATION|BSCF_INTERMEDIATEDATANOTIFICATION, 2000, 2000); - ok(hres == S_OK, "ReportData failed: %08x\n", hres); + ok(hres == S_OK, "ReportData failed: %08lx\n", hres);
hres = IInternetProtocolSink_ReportResult(protocol_sink, S_OK, 0, NULL); - ok(hres == S_OK, "ReportResult failed: %08x\n", hres); + ok(hres == S_OK, "ReportResult failed: %08lx\n", hres);
return S_FALSE; case 4: @@ -1157,12 +1157,12 @@ static HRESULT WINAPI Protocol_Read(IInternetProtocol *iface, void *pv,
if(test_protocol == WINETEST_SYNC_TEST) { hres = IInternetProtocolSink_ReportResult(protocol_sink, S_OK, 0, NULL); - ok(hres == S_OK, "ReportResult failed: %08x\n", hres); + ok(hres == S_OK, "ReportResult failed: %08lx\n", hres);
SET_EXPECT(OnStopBinding); }
- ok(*pcbRead == 0, "*pcbRead=%d, expected 0\n", *pcbRead); + ok(*pcbRead == 0, "*pcbRead=%ld, expected 0\n", *pcbRead); read += *pcbRead = sizeof(data)-1; memcpy(pv, data, sizeof(data)); return S_OK; @@ -1238,10 +1238,10 @@ static HRESULT WINAPI HttpNegotiate_BeginningTransaction(IHttpNegotiate2 *iface, else CHECK_EXPECT(BeginningTransaction);
- ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId()); + ok(GetCurrentThreadId() == thread_id, "wrong thread %ld\n", GetCurrentThreadId());
ok(!lstrcmpW(szURL, current_url), "szURL != current_url\n"); - ok(!dwReserved, "dwReserved=%d, expected 0\n", dwReserved); + ok(!dwReserved, "dwReserved=%ld, expected 0\n", dwReserved); ok(pszAdditionalHeaders != NULL, "pszAdditionalHeaders == NULL\n"); if(pszAdditionalHeaders) ok(*pszAdditionalHeaders == NULL, "*pszAdditionalHeaders != NULL\n"); @@ -1254,9 +1254,9 @@ static HRESULT WINAPI HttpNegotiate_OnResponse(IHttpNegotiate2 *iface, DWORD dwR { CHECK_EXPECT(OnResponse);
- ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId()); + ok(GetCurrentThreadId() == thread_id, "wrong thread %ld\n", GetCurrentThreadId());
- ok(dwResponseCode == 200, "dwResponseCode=%d, expected 200\n", dwResponseCode); + ok(dwResponseCode == 200, "dwResponseCode=%ld, expected 200\n", dwResponseCode); ok(szResponseHeaders != NULL, "szResponseHeaders == NULL\n"); ok(szRequestHeaders == NULL, "szRequestHeaders != NULL\n"); /* Note: in protocol.c tests, OnResponse pszAdditionalRequestHeaders _is_ NULL */ @@ -1274,9 +1274,9 @@ static HRESULT WINAPI HttpNegotiate_GetRootSecurityId(IHttpNegotiate2 *iface,
CHECK_EXPECT(GetRootSecurityId);
- ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId()); + ok(GetCurrentThreadId() == thread_id, "wrong thread %ld\n", GetCurrentThreadId());
- ok(!dwReserved, "dwReserved=%ld, expected 0\n", dwReserved); + ok(!dwReserved, "dwReserved=%Id, expected 0\n", dwReserved); ok(pbSecurityId != NULL, "pbSecurityId == NULL\n"); ok(pcbSecurityId != NULL, "pcbSecurityId == NULL\n");
@@ -1284,7 +1284,7 @@ static HRESULT WINAPI HttpNegotiate_GetRootSecurityId(IHttpNegotiate2 *iface, return E_NOTIMPL;
if(pcbSecurityId) { - ok(*pcbSecurityId == 512, "*pcbSecurityId=%d, expected 512\n", *pcbSecurityId); + ok(*pcbSecurityId == 512, "*pcbSecurityId=%ld, expected 512\n", *pcbSecurityId); *pcbSecurityId = sizeof(sec_id); }
@@ -1353,13 +1353,13 @@ static HRESULT WINAPI HttpSecurity_OnSecurityProblem(IHttpSecurity *iface, DWORD if(!security_problem) { ok(dwProblem == ERROR_INTERNET_SEC_CERT_CN_INVALID || broken(dwProblem == ERROR_INTERNET_SEC_CERT_ERRORS) /* Some versions of IE6 */, - "Got problem: %d\n", dwProblem); + "Got problem: %ld\n", dwProblem); security_problem = dwProblem;
if(dwProblem == ERROR_INTERNET_SEC_CERT_ERRORS) binding_hres = INET_E_SECURITY_PROBLEM; }else - ok(dwProblem == security_problem, "Got problem: %d\n", dwProblem); + ok(dwProblem == security_problem, "Got problem: %ld\n", dwProblem);
return onsecurityproblem_hres; } @@ -1460,28 +1460,28 @@ static void test_WinInetHttpInfo(IWinInetHttpInfo *http_info, DWORD progress) hres = IWinInetHttpInfo_QueryInfo(http_info, HTTP_QUERY_STATUS_CODE|HTTP_QUERY_FLAG_NUMBER, &status, &size, NULL, NULL); ok(hres == expect || ((progress == BINDSTATUS_COOKIE_SENT || progress == BINDSTATUS_PROXYDETECTING) && hres == S_FALSE), - "progress %u: hres = %x, expected %x\n", progress, hres, expect); + "progress %lu: hres = %lx, expected %lx\n", progress, hres, expect); if(hres == S_OK) { if(download_state == BEFORE_DOWNLOAD && progress != BINDSTATUS_MIMETYPEAVAILABLE && progress != BINDSTATUS_DECODING) - ok(status == 0, "progress %u: status = %d\n", progress, status); + ok(status == 0, "progress %lu: status = %ld\n", progress, status); else - ok(status == HTTP_STATUS_OK, "progress %u: status = %d\n", progress, status); - ok(size == sizeof(DWORD), "size = %d\n", size); + ok(status == HTTP_STATUS_OK, "progress %lu: status = %ld\n", progress, status); + ok(size == sizeof(DWORD), "size = %ld\n", size); }
size = sizeof(DWORD); hres = IWinInetHttpInfo_QueryOption(http_info, INTERNET_OPTION_HANDLE_TYPE, &status, &size); if(test_protocol == FTP_TEST) { if(download_state==BEFORE_DOWNLOAD && progress!=BINDSTATUS_MIMETYPEAVAILABLE) - ok(hres == E_FAIL, "hres = %x\n", hres); + ok(hres == E_FAIL, "hres = %lx\n", hres); else - ok(hres == S_OK, "hres = %x\n", hres); + ok(hres == S_OK, "hres = %lx\n", hres);
if(hres == S_OK) - ok(status == INTERNET_HANDLE_TYPE_FTP_FILE, "status = %d\n", status); + ok(status == INTERNET_HANDLE_TYPE_FTP_FILE, "status = %ld\n", status); } else { - ok(hres == S_OK, "hres = %x\n", hres); - ok(status == INTERNET_HANDLE_TYPE_HTTP_REQUEST, "status = %d\n", status); + ok(hres == S_OK, "hres = %lx\n", hres); + ok(status == INTERNET_HANDLE_TYPE_HTTP_REQUEST, "status = %ld\n", status); } }
@@ -1489,7 +1489,7 @@ static HRESULT WINAPI statusclb_QueryInterface(IBindStatusCallbackEx *iface, REF { if (winetest_debug > 1) trace("IBindStatusCallback::QueryInterface(%s)\n", debugstr_guid(riid));
- ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId()); + ok(GetCurrentThreadId() == thread_id, "wrong thread %ld\n", GetCurrentThreadId());
if(IsEqualGUID(&IID_IInternetProtocol, riid)) { CHECK_EXPECT2(QueryInterface_IInternetProtocol); @@ -1566,10 +1566,10 @@ static HRESULT WINAPI statusclb_OnStartBinding(IBindStatusCallbackEx *iface, DWO else CHECK_EXPECT(OnStartBinding);
- ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId()); + ok(GetCurrentThreadId() == thread_id, "wrong thread %ld\n", GetCurrentThreadId());
ok(pib != NULL, "pib should not be NULL\n"); - ok(dwReserved == 0xff, "dwReserved=%x\n", dwReserved); + ok(dwReserved == 0xff, "dwReserved=%lx\n", dwReserved);
if(pib == (void*)0xdeadbeef) return S_OK; @@ -1582,23 +1582,23 @@ static HRESULT WINAPI statusclb_OnStartBinding(IBindStatusCallbackEx *iface, DWO IMoniker_Release(mon);
hres = IBinding_QueryInterface(pib, &IID_IWinInetHttpInfo, (void**)&http_info); - ok(hres == E_NOINTERFACE, "Could not get IID_IWinInetHttpInfo: %08x\n", hres); + ok(hres == E_NOINTERFACE, "Could not get IID_IWinInetHttpInfo: %08lx\n", hres);
if(0) { /* crashes with native urlmon */ hres = IBinding_GetBindResult(pib, NULL, &res, &res_str, NULL); - ok(hres == E_INVALIDARG, "GetBindResult failed: %08x\n", hres); + ok(hres == E_INVALIDARG, "GetBindResult failed: %08lx\n", hres); } hres = IBinding_GetBindResult(pib, &clsid, NULL, &res_str, NULL); - ok(hres == E_INVALIDARG, "GetBindResult failed: %08x\n", hres); + ok(hres == E_INVALIDARG, "GetBindResult failed: %08lx\n", hres); hres = IBinding_GetBindResult(pib, &clsid, &res, NULL, NULL); - ok(hres == E_INVALIDARG, "GetBindResult failed: %08x\n", hres); + ok(hres == E_INVALIDARG, "GetBindResult failed: %08lx\n", hres); hres = IBinding_GetBindResult(pib, &clsid, &res, &res_str, (void*)0xdeadbeef); - ok(hres == E_INVALIDARG, "GetBindResult failed: %08x\n", hres); + ok(hres == E_INVALIDARG, "GetBindResult failed: %08lx\n", hres);
hres = IBinding_GetBindResult(pib, &clsid, &res, &res_str, NULL); - ok(hres == S_OK, "GetBindResult failed: %08x, expected S_OK\n", hres); + ok(hres == S_OK, "GetBindResult failed: %08lx, expected S_OK\n", hres); ok(IsEqualCLSID(&clsid, &CLSID_NULL), "incorrect clsid: %s\n", wine_dbgstr_guid(&clsid)); - ok(!res, "incorrect res: %x\n", res); + ok(!res, "incorrect res: %lx\n", res); ok(!res_str, "incorrect res_str: %s\n", wine_dbgstr_w(res_str));
if(abort_start) { @@ -1624,10 +1624,10 @@ static HRESULT WINAPI statusclb_OnLowResource(IBindStatusCallbackEx *iface, DWOR static HRESULT WINAPI statusclb_OnProgress(IBindStatusCallbackEx *iface, ULONG ulProgress, ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText) { - ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId()); + ok(GetCurrentThreadId() == thread_id, "wrong thread %ld\n", GetCurrentThreadId());
if (winetest_debug > 1) - trace("IBindStatusCallbackEx::OnProgress(progress %u/%u, code %u, text %s)\n", + trace("IBindStatusCallbackEx::OnProgress(progress %lu/%lu, code %lu, text %s)\n", ulProgress, ulProgressMax, ulStatusCode, debugstr_w(szStatusText));
switch(ulStatusCode) { @@ -1721,11 +1721,11 @@ static HRESULT WINAPI statusclb_OnProgress(IBindStatusCallbackEx *iface, ULONG u
SET_EXPECT(Abort); hres = IBinding_Abort(current_binding); - ok(hres == S_OK, "Abort failed: %08x\n", hres); + ok(hres == S_OK, "Abort failed: %08lx\n", hres); CHECK_CALLED(Abort);
hres = IBinding_Abort(current_binding); - ok(hres == E_FAIL, "Abort failed: %08x\n", hres); + ok(hres == E_FAIL, "Abort failed: %08lx\n", hres);
binding_hres = E_ABORT; } @@ -1771,7 +1771,7 @@ static HRESULT WINAPI statusclb_OnProgress(IBindStatusCallbackEx *iface, ULONG u else CHECK_EXPECT(Obj_OnProgress_CLASSIDAVAILABLE); hr = CLSIDFromString((LPCOLESTR)szStatusText, &clsid); - ok(hr == S_OK, "CLSIDFromString failed with error 0x%08x\n", hr); + ok(hr == S_OK, "CLSIDFromString failed with error 0x%08lx\n", hr); ok(IsEqualCLSID(&clsid, &CLSID_HTMLDocument), "Expected clsid to be CLSID_HTMLDocument instead of %s\n", wine_dbgstr_guid(&clsid)); break; @@ -1793,7 +1793,7 @@ static HRESULT WINAPI statusclb_OnProgress(IBindStatusCallbackEx *iface, ULONG u case BINDSTATUS_DECODING: break; default: - ok(0, "unexpected code %d\n", ulStatusCode); + ok(0, "unexpected code %ld\n", ulStatusCode); };
if(current_binding) { @@ -1802,11 +1802,11 @@ static HRESULT WINAPI statusclb_OnProgress(IBindStatusCallbackEx *iface, ULONG u
hres = IBinding_QueryInterface(current_binding, &IID_IWinInetHttpInfo, (void**)&http_info); if(!emulate_protocol && test_protocol != FILE_TEST && is_urlmon_protocol(test_protocol)) { - ok(hres == S_OK, "Could not get IWinInetHttpInfo iface: %08x\n", hres); + ok(hres == S_OK, "Could not get IWinInetHttpInfo iface: %08lx\n", hres); test_WinInetHttpInfo(http_info, ulStatusCode); } else ok(hres == E_NOINTERFACE, - "QueryInterface(IID_IWinInetHttpInfo) returned: %08x, expected E_NOINTERFACE\n", hres); + "QueryInterface(IID_IWinInetHttpInfo) returned: %08lx, expected E_NOINTERFACE\n", hres); if(SUCCEEDED(hres)) IWinInetHttpInfo_Release(http_info); } @@ -1824,10 +1824,10 @@ static HRESULT WINAPI statusclb_OnStopBinding(IBindStatusCallbackEx *iface, HRES stopped_binding = TRUE; }
- ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId()); + ok(GetCurrentThreadId() == thread_id, "wrong thread %ld\n", GetCurrentThreadId());
if(only_check_prot_args) { - todo_wine ok(hresult == S_OK, "Got %08x\n", hresult); + todo_wine ok(hresult == S_OK, "Got %08lx\n", hresult); return S_OK; }
@@ -1837,13 +1837,13 @@ static HRESULT WINAPI statusclb_OnStopBinding(IBindStatusCallbackEx *iface, HRES
if(filedwl_api) { if(!abort_progress && !abort_start) - ok(SUCCEEDED(hresult), "binding failed: %08x\n", hresult); + ok(SUCCEEDED(hresult), "binding failed: %08lx\n", hresult); else if(abort_start && abort_hres == E_NOTIMPL) - todo_wine ok(hresult == S_FALSE, "binding failed: %08x, expected S_FALSE\n", hresult); + todo_wine ok(hresult == S_FALSE, "binding failed: %08lx, expected S_FALSE\n", hresult); else - ok(hresult == E_ABORT, "binding failed: %08x, expected E_ABORT\n", hresult); + ok(hresult == E_ABORT, "binding failed: %08lx, expected E_ABORT\n", hresult); } else - ok(hresult == binding_hres, "binding failed: %08x, expected %08x\n", hresult, binding_hres); + ok(hresult == binding_hres, "binding failed: %08lx, expected %08lx\n", hresult, binding_hres); ok(szError == NULL, "szError should be NULL\n");
if(current_binding) { @@ -1853,8 +1853,8 @@ static HRESULT WINAPI statusclb_OnStopBinding(IBindStatusCallbackEx *iface, HRES HRESULT hres;
hres = IBinding_GetBindResult(current_binding, &clsid, &res, &res_str, NULL); - ok(hres == S_OK, "GetBindResult failed: %08x, expected S_OK\n", hres); - ok(res == hresult, "res = %08x, expected %08x\n", res, binding_hres); + ok(hres == S_OK, "GetBindResult failed: %08lx, expected S_OK\n", hres); + ok(res == hresult, "res = %08lx, expected %08lx\n", res, binding_hres); ok(!res_str, "incorrect res_str = %s\n", wine_dbgstr_w(res_str));
if(hresult==S_OK || (abort_start && hresult!=S_FALSE) || hresult == REGDB_E_CLASSNOTREG) { @@ -1900,7 +1900,7 @@ static HRESULT WINAPI statusclb_OnStopBinding(IBindStatusCallbackEx *iface, HRES HANDLE file = CreateFileW(http_cache_file, DELETE, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); ok(file == INVALID_HANDLE_VALUE, "expected INVALID_HANDLE_VALUE, got %p\n", file); - ok(GetLastError() == ERROR_SHARING_VIOLATION, "expected ERROR_SHARING_VIOLATION, got %u\n", GetLastError()); + ok(GetLastError() == ERROR_SHARING_VIOLATION, "expected ERROR_SHARING_VIOLATION, got %lu\n", GetLastError()); http_cache_file[0] = 0; }
@@ -1916,7 +1916,7 @@ static HRESULT WINAPI statusclb_GetBindInfo(IBindStatusCallbackEx *iface, DWORD else CHECK_EXPECT(GetBindInfo);
- ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId()); + ok(GetCurrentThreadId() == thread_id, "wrong thread %ld\n", GetCurrentThreadId());
*grfBINDF = bindf; cbSize = pbindinfo->cbSize; @@ -1935,19 +1935,19 @@ static void test_stream_seek(IStream *stream) pos.QuadPart = 0; new_pos.QuadPart = 0xdeadbeef; hres = IStream_Seek(stream, pos, STREAM_SEEK_SET, &new_pos); - ok(hres == S_OK, "Seek failed: %08x\n", hres); + ok(hres == S_OK, "Seek failed: %08lx\n", hres); ok(!new_pos.QuadPart, "new_pos.QuadPart != 0\n");
pos.QuadPart = 0; new_pos.QuadPart = 0xdeadbeef; hres = IStream_Seek(stream, pos, STREAM_SEEK_END, &new_pos); - ok(hres == S_OK, "Seek failed: %08x\n", hres); + ok(hres == S_OK, "Seek failed: %08lx\n", hres); ok(new_pos.QuadPart, "new_pos.QuadPart = 0\n");
pos.QuadPart = 0; new_pos.QuadPart = 0xdeadbeef; hres = IStream_Seek(stream, pos, 100, &new_pos); - ok(hres == E_FAIL, "Seek failed: %08x\n", hres); + ok(hres == E_FAIL, "Seek failed: %08lx\n", hres); ok(new_pos.QuadPart == 0xdeadbeef, "unexpected new_pos.QuadPart\n"); }
@@ -1964,7 +1964,7 @@ static HRESULT WINAPI statusclb_OnDataAvailable(IBindStatusCallbackEx *iface, DW
CHECK_EXPECT2(OnDataAvailable);
- ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId()); + ok(GetCurrentThreadId() == thread_id, "wrong thread %ld\n", GetCurrentThreadId());
ok(download_state == DOWNLOADING || download_state == END_DOWNLOAD, "Download state was %d, expected DOWNLOADING or END_DOWNLOAD\n", @@ -1972,7 +1972,7 @@ static HRESULT WINAPI statusclb_OnDataAvailable(IBindStatusCallbackEx *iface, DW data_available = TRUE;
if(bind_to_object && !is_async_prot) - ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION|BSCF_LASTDATANOTIFICATION), "grfBSCF = %x\n", grfBSCF); + ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION|BSCF_LASTDATANOTIFICATION), "grfBSCF = %lx\n", grfBSCF);
ok(pformatetc != NULL, "pformatetc == NULL\n"); if(pformatetc) { @@ -1980,20 +1980,20 @@ static HRESULT WINAPI statusclb_OnDataAvailable(IBindStatusCallbackEx *iface, DW INT ret; clipfmt[0] = 0; ret = GetClipboardFormatNameA(pformatetc->cfFormat, clipfmt, sizeof(clipfmt)-1); - ok(ret, "GetClipboardFormatName failed, error %d\n", GetLastError()); + ok(ret, "GetClipboardFormatName failed, error %ld\n", GetLastError()); ok(!strcmp(clipfmt, mime_type), "clipformat %x != mime_type, "%s" != "%s"\n", pformatetc->cfFormat, clipfmt, mime_type); } else { ok(pformatetc->cfFormat == 0, "clipformat=%x\n", pformatetc->cfFormat); } ok(pformatetc->ptd == NULL, "ptd = %p\n", pformatetc->ptd); - ok(pformatetc->dwAspect == 1, "dwAspect=%u\n", pformatetc->dwAspect); - ok(pformatetc->lindex == -1, "lindex=%d\n", pformatetc->lindex); - ok(pformatetc->tymed == tymed, "tymed=%u, expected %u\n", pformatetc->tymed, tymed); + ok(pformatetc->dwAspect == 1, "dwAspect=%lu\n", pformatetc->dwAspect); + ok(pformatetc->lindex == -1, "lindex=%ld\n", pformatetc->lindex); + ok(pformatetc->tymed == tymed, "tymed=%lu, expected %lu\n", pformatetc->tymed, tymed); }
ok(pstgmed != NULL, "stgmeg == NULL\n"); - ok(pstgmed->tymed == tymed, "tymed=%u, expected %u\n", pstgmed->tymed, tymed); + ok(pstgmed->tymed == tymed, "tymed=%lu, expected %lu\n", pstgmed->tymed, tymed); ok(pstgmed->pUnkForRelease != NULL, "pUnkForRelease == NULL\n");
switch(pstgmed->tymed) { @@ -2007,37 +2007,37 @@ static HRESULT WINAPI statusclb_OnDataAvailable(IBindStatusCallbackEx *iface, DW
hres = IStream_Write(stream, buf, 10, NULL); ok(hres == STG_E_ACCESSDENIED, - "Write failed: %08x, expected STG_E_ACCESSDENIED\n", hres); + "Write failed: %08lx, expected STG_E_ACCESSDENIED\n", hres);
hres = IStream_Commit(stream, 0); - ok(hres == E_NOTIMPL, "Commit failed: %08x, expected E_NOTIMPL\n", hres); + ok(hres == E_NOTIMPL, "Commit failed: %08lx, expected E_NOTIMPL\n", hres);
hres = IStream_Revert(stream); - ok(hres == E_NOTIMPL, "Revert failed: %08x, expected E_NOTIMPL\n", hres); + ok(hres == E_NOTIMPL, "Revert failed: %08lx, expected E_NOTIMPL\n", hres);
hres = IStream_Stat(stream, NULL, STATFLAG_NONAME); - ok(hres == E_FAIL, "hres = %x\n", hres); + ok(hres == E_FAIL, "hres = %lx\n", hres); if(use_cache_file && emulate_protocol) { hres = IStream_Stat(stream, &stat, STATFLAG_DEFAULT); - ok(hres == S_OK, "hres = %x\n", hres); + ok(hres == S_OK, "hres = %lx\n", hres); ok(!lstrcmpW(stat.pwcsName, cache_file_name), "stat.pwcsName = %s, cache_file_name = %s\n", wine_dbgstr_w(stat.pwcsName), wine_dbgstr_w(cache_file_name)); CoTaskMemFree(stat.pwcsName); ok(U(stat.cbSize).LowPart == (bindf&BINDF_ASYNCHRONOUS?0:6500), - "stat.cbSize.LowPart = %u\n", U(stat.cbSize).LowPart); + "stat.cbSize.LowPart = %lu\n", U(stat.cbSize).LowPart); } else { hres = IStream_Stat(stream, &stat, STATFLAG_NONAME); - ok(hres == S_OK, "hres = %x\n", hres); + ok(hres == S_OK, "hres = %lx\n", hres); ok(!stat.pwcsName || broken(stat.pwcsName!=NULL), "stat.pwcsName = %s\n", wine_dbgstr_w(stat.pwcsName)); } - ok(stat.type == STGTY_STREAM, "stat.type = %x\n", stat.type); + ok(stat.type == STGTY_STREAM, "stat.type = %lx\n", stat.type); ok(U(stat.cbSize).HighPart == 0, "stat.cbSize.HighPart != 0\n"); - ok(stat.grfMode == (U(stat.cbSize).LowPart?GENERIC_READ:0), "stat.grfMode = %x\n", stat.grfMode); - ok(stat.grfLocksSupported == 0, "stat.grfLocksSupported = %x\n", stat.grfLocksSupported); - ok(stat.grfStateBits == 0, "stat.grfStateBits = %x\n", stat.grfStateBits); - ok(stat.reserved == 0, "stat.reserved = %x\n", stat.reserved); + ok(stat.grfMode == (U(stat.cbSize).LowPart?GENERIC_READ:0), "stat.grfMode = %lx\n", stat.grfMode); + ok(stat.grfLocksSupported == 0, "stat.grfLocksSupported = %lx\n", stat.grfLocksSupported); + ok(stat.grfStateBits == 0, "stat.grfStateBits = %lx\n", stat.grfStateBits); + ok(stat.reserved == 0, "stat.reserved = %lx\n", stat.reserved); }
if(callback_read) { @@ -2046,7 +2046,7 @@ static HRESULT WINAPI statusclb_OnDataAvailable(IBindStatusCallbackEx *iface, DW if(test_protocol == HTTP_TEST && emulate_protocol && read) ok(buf[0] == (use_cache_file && !(bindf&BINDF_ASYNCHRONOUS) ? 'X' : '?'), "buf[0] = '%c'\n", buf[0]); }while(hres == S_OK); - ok(hres == S_FALSE || hres == E_PENDING, "IStream_Read returned %08x\n", hres); + ok(hres == S_FALSE || hres == E_PENDING, "IStream_Read returned %08lx\n", hres); }
if(use_cache_file && (grfBSCF & BSCF_FIRSTDATANOTIFICATION) && !(bindf & BINDF_PULLDATA)) @@ -2209,7 +2209,7 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva {'C','B','i','n','d','i','n','g',' ','C','o','n','t','e','x','t',0};
CHECK_EXPECT(Load); - ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId()); + ok(GetCurrentThreadId() == thread_id, "wrong thread %ld\n", GetCurrentThreadId());
if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST) ok(!fFullyAvailable, "fFullyAvailable = %x\n", fFullyAvailable); @@ -2217,15 +2217,15 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva ok(fFullyAvailable, "fFullyAvailable = %x\n", fFullyAvailable); ok(pimkName != NULL, "pimkName == NULL\n"); ok(pibc != NULL, "pibc == NULL\n"); - ok(grfMode == 0x12, "grfMode = %x\n", grfMode); + ok(grfMode == 0x12, "grfMode = %lx\n", grfMode);
hres = IBindCtx_GetObjectParam(pibc, cbinding_contextW, &unk); - ok(hres == S_OK, "GetObjectParam(CBinding Context) failed: %08x\n", hres); + ok(hres == S_OK, "GetObjectParam(CBinding Context) failed: %08lx\n", hres); if(SUCCEEDED(hres)) { IBinding *binding;
hres = IUnknown_QueryInterface(unk, &IID_IBinding, (void**)&binding); - ok(hres == S_OK, "Could not get IBinding: %08x\n", hres); + ok(hres == S_OK, "Could not get IBinding: %08lx\n", hres);
IBinding_Release(binding); IUnknown_Release(unk); @@ -2233,7 +2233,7 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva
SET_EXPECT(QueryInterface_IServiceProvider); hres = RegisterBindStatusCallback(pibc, (IBindStatusCallback*)&bsc, NULL, 0); - ok(hres == S_OK, "RegisterBindStatusCallback failed: %08x\n", hres); + ok(hres == S_OK, "RegisterBindStatusCallback failed: %08lx\n", hres); CHECK_CALLED(QueryInterface_IServiceProvider);
SET_EXPECT(QueryInterface_IBindStatusCallbackEx); @@ -2252,7 +2252,7 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva SET_EXPECT(OnStopBinding);
hres = IMoniker_BindToStorage(pimkName, pibc, NULL, &IID_IStream, (void**)&unk); - ok(hres == S_OK, "Load failed: %08x\n", hres); + ok(hres == S_OK, "Load failed: %08lx\n", hres);
CLEAR_CALLED(QueryInterface_IBindStatusCallbackEx); /* IE 8 */ CHECK_CALLED(GetBindInfo); @@ -2406,30 +2406,30 @@ static void test_CreateAsyncBindCtx(void) BIND_OPTS bindopts;
hres = CreateAsyncBindCtx(0, NULL, NULL, &bctx); - ok(hres == E_INVALIDARG, "CreateAsyncBindCtx failed. expected: E_INVALIDARG, got: %08x\n", hres); + ok(hres == E_INVALIDARG, "CreateAsyncBindCtx failed. expected: E_INVALIDARG, got: %08lx\n", hres); ok(bctx == (IBindCtx*)0x0ff00ff0, "bctx should not be changed\n");
hres = CreateAsyncBindCtx(0, NULL, NULL, NULL); - ok(hres == E_INVALIDARG, "CreateAsyncBindCtx failed. expected: E_INVALIDARG, got: %08x\n", hres); + ok(hres == E_INVALIDARG, "CreateAsyncBindCtx failed. expected: E_INVALIDARG, got: %08lx\n", hres);
SET_EXPECT(QueryInterface_IServiceProvider); hres = CreateAsyncBindCtx(0, (IBindStatusCallback*)&bsc, NULL, &bctx); - ok(hres == S_OK, "CreateAsyncBindCtx failed: %08x\n", hres); + ok(hres == S_OK, "CreateAsyncBindCtx failed: %08lx\n", hres); CHECK_CALLED(QueryInterface_IServiceProvider);
bindopts.cbStruct = sizeof(bindopts); hres = IBindCtx_GetBindOptions(bctx, &bindopts); - ok(hres == S_OK, "IBindCtx_GetBindOptions failed: %08x\n", hres); + ok(hres == S_OK, "IBindCtx_GetBindOptions failed: %08lx\n", hres); ok(bindopts.grfFlags == BIND_MAYBOTHERUSER, - "bindopts.grfFlags = %08x, expected: BIND_MAYBOTHERUSER\n", bindopts.grfFlags); + "bindopts.grfFlags = %08lx, expected: BIND_MAYBOTHERUSER\n", bindopts.grfFlags); ok(bindopts.grfMode == (STGM_READWRITE | STGM_SHARE_EXCLUSIVE), - "bindopts.grfMode = %08x, expected: STGM_READWRITE | STGM_SHARE_EXCLUSIVE\n", + "bindopts.grfMode = %08lx, expected: STGM_READWRITE | STGM_SHARE_EXCLUSIVE\n", bindopts.grfMode); ok(bindopts.dwTickCountDeadline == 0, - "bindopts.dwTickCountDeadline = %08x, expected: 0\n", bindopts.dwTickCountDeadline); + "bindopts.dwTickCountDeadline = %08lx, expected: 0\n", bindopts.dwTickCountDeadline);
hres = IBindCtx_QueryInterface(bctx, &IID_IAsyncBindCtx, (void**)&unk); - ok(hres == E_NOINTERFACE, "QueryInterface(IID_IAsyncBindCtx) failed: %08x, expected E_NOINTERFACE\n", hres); + ok(hres == E_NOINTERFACE, "QueryInterface(IID_IAsyncBindCtx) failed: %08lx, expected E_NOINTERFACE\n", hres); if(SUCCEEDED(hres)) IUnknown_Release(unk);
@@ -2452,41 +2452,41 @@ static void test_CreateAsyncBindCtxEx(void) }
hres = pCreateAsyncBindCtxEx(NULL, 0, NULL, NULL, NULL, 0); - ok(hres == E_INVALIDARG, "CreateAsyncBindCtx failed: %08x, expected E_INVALIDARG\n", hres); + ok(hres == E_INVALIDARG, "CreateAsyncBindCtx failed: %08lx, expected E_INVALIDARG\n", hres);
hres = pCreateAsyncBindCtxEx(NULL, 0, NULL, NULL, &bctx, 0); - ok(hres == S_OK, "CreateAsyncBindCtxEx failed: %08x\n", hres); + ok(hres == S_OK, "CreateAsyncBindCtxEx failed: %08lx\n", hres);
if(SUCCEEDED(hres)) { bindopts.cbStruct = sizeof(bindopts); hres = IBindCtx_GetBindOptions(bctx, &bindopts); - ok(hres == S_OK, "IBindCtx_GetBindOptions failed: %08x\n", hres); + ok(hres == S_OK, "IBindCtx_GetBindOptions failed: %08lx\n", hres); ok(bindopts.grfFlags == BIND_MAYBOTHERUSER, - "bindopts.grfFlags = %08x, expected: BIND_MAYBOTHERUSER\n", bindopts.grfFlags); + "bindopts.grfFlags = %08lx, expected: BIND_MAYBOTHERUSER\n", bindopts.grfFlags); ok(bindopts.grfMode == (STGM_READWRITE | STGM_SHARE_EXCLUSIVE), - "bindopts.grfMode = %08x, expected: STGM_READWRITE | STGM_SHARE_EXCLUSIVE\n", + "bindopts.grfMode = %08lx, expected: STGM_READWRITE | STGM_SHARE_EXCLUSIVE\n", bindopts.grfMode); ok(bindopts.dwTickCountDeadline == 0, - "bindopts.dwTickCountDeadline = %08x, expected: 0\n", bindopts.dwTickCountDeadline); + "bindopts.dwTickCountDeadline = %08lx, expected: 0\n", bindopts.dwTickCountDeadline);
IBindCtx_Release(bctx); }
CreateBindCtx(0, &bctx_arg); hres = pCreateAsyncBindCtxEx(NULL, 0, NULL, NULL, &bctx, 0); - ok(hres == S_OK, "CreateAsyncBindCtxEx failed: %08x\n", hres); + ok(hres == S_OK, "CreateAsyncBindCtxEx failed: %08lx\n", hres);
if(SUCCEEDED(hres)) { bindopts.cbStruct = sizeof(bindopts); hres = IBindCtx_GetBindOptions(bctx, &bindopts); - ok(hres == S_OK, "IBindCtx_GetBindOptions failed: %08x\n", hres); + ok(hres == S_OK, "IBindCtx_GetBindOptions failed: %08lx\n", hres); ok(bindopts.grfFlags == BIND_MAYBOTHERUSER, - "bindopts.grfFlags = %08x, expected: BIND_MAYBOTHERUSER\n", bindopts.grfFlags); + "bindopts.grfFlags = %08lx, expected: BIND_MAYBOTHERUSER\n", bindopts.grfFlags); ok(bindopts.grfMode == (STGM_READWRITE | STGM_SHARE_EXCLUSIVE), - "bindopts.grfMode = %08x, expected: STGM_READWRITE | STGM_SHARE_EXCLUSIVE\n", + "bindopts.grfMode = %08lx, expected: STGM_READWRITE | STGM_SHARE_EXCLUSIVE\n", bindopts.grfMode); ok(bindopts.dwTickCountDeadline == 0, - "bindopts.dwTickCountDeadline = %08x, expected: 0\n", bindopts.dwTickCountDeadline); + "bindopts.dwTickCountDeadline = %08lx, expected: 0\n", bindopts.dwTickCountDeadline);
IBindCtx_Release(bctx); } @@ -2495,27 +2495,27 @@ static void test_CreateAsyncBindCtxEx(void)
SET_EXPECT(QueryInterface_IServiceProvider); hres = pCreateAsyncBindCtxEx(NULL, 0, (IBindStatusCallback*)&bsc, NULL, &bctx, 0); - ok(hres == S_OK, "CreateAsyncBindCtxEx failed: %08x\n", hres); + ok(hres == S_OK, "CreateAsyncBindCtxEx failed: %08lx\n", hres); CHECK_CALLED(QueryInterface_IServiceProvider);
hres = IBindCtx_QueryInterface(bctx, &IID_IAsyncBindCtx, (void**)&unk); - ok(hres == S_OK, "QueryInterface(IID_IAsyncBindCtx) failed: %08x\n", hres); + ok(hres == S_OK, "QueryInterface(IID_IAsyncBindCtx) failed: %08lx\n", hres); if(SUCCEEDED(hres)) IUnknown_Release(unk);
IBindCtx_Release(bctx);
hres = CreateBindCtx(0, &bctx2); - ok(hres == S_OK, "CreateBindCtx failed: %08x\n", hres); + ok(hres == S_OK, "CreateBindCtx failed: %08lx\n", hres);
hres = pCreateAsyncBindCtxEx(bctx2, 0, NULL, NULL, &bctx, 0); - ok(hres == S_OK, "CreateAsyncBindCtxEx failed: %08x\n", hres); + ok(hres == S_OK, "CreateAsyncBindCtxEx failed: %08lx\n", hres);
hres = IBindCtx_RegisterObjectParam(bctx2, testW, (IUnknown*)&Protocol); - ok(hres == S_OK, "RegisterObjectParam failed: %08x\n", hres); + ok(hres == S_OK, "RegisterObjectParam failed: %08lx\n", hres);
hres = IBindCtx_GetObjectParam(bctx, testW, &unk); - ok(hres == S_OK, "GetObjectParam failed: %08x\n", hres); + ok(hres == S_OK, "GetObjectParam failed: %08lx\n", hres); ok(unk == (IUnknown*)&Protocol, "unexpected unk %p\n", unk);
IBindCtx_Release(bctx); @@ -2541,7 +2541,7 @@ static void test_GetBindInfoEx(IBindStatusCallback *holder) SET_EXPECT(QueryInterface_IBindStatusCallbackEx); SET_EXPECT(GetBindInfoEx); hres = IBindStatusCallback_GetBindInfo(holder, &bindf, &bindinfo); - ok(hres == S_OK, "GetBindInfo failed: %08x\n", hres); + ok(hres == S_OK, "GetBindInfo failed: %08lx\n", hres); CHECK_CALLED(QueryInterface_IBindStatusCallbackEx); CHECK_CALLED(GetBindInfoEx);
@@ -2549,7 +2549,7 @@ static void test_GetBindInfoEx(IBindStatusCallback *holder) SET_EXPECT(QueryInterface_IBindStatusCallbackEx); SET_EXPECT(GetBindInfoEx); hres = IBindStatusCallbackEx_GetBindInfoEx(bscex, &bindf, &bindinfo, &bindf2, &dw); - ok(hres == S_OK, "GetBindInfo failed: %08x\n", hres); + ok(hres == S_OK, "GetBindInfo failed: %08lx\n", hres); CHECK_CALLED(QueryInterface_IBindStatusCallbackEx); CHECK_CALLED(GetBindInfoEx);
@@ -2559,11 +2559,11 @@ static void test_GetBindInfoEx(IBindStatusCallback *holder) SET_EXPECT(QueryInterface_IBindStatusCallbackEx); SET_EXPECT(GetBindInfo); hres = IBindStatusCallbackEx_GetBindInfoEx(bscex, &bindf, &bindinfo, &bindf2, &dw); - ok(hres == S_OK, "GetBindInfo failed: %08x\n", hres); + ok(hres == S_OK, "GetBindInfo failed: %08lx\n", hres); CHECK_CALLED(QueryInterface_IBindStatusCallbackEx); CHECK_CALLED(GetBindInfo); - ok(bindf2 == 0xdeadbeef, "bindf2 = %x\n", bindf2); - ok(dw == 0xdeadbeef, "dw = %x\n", dw); + ok(bindf2 == 0xdeadbeef, "bindf2 = %lx\n", bindf2); + ok(dw == 0xdeadbeef, "dw = %lx\n", dw);
IBindStatusCallbackEx_Release(bscex); } @@ -2583,13 +2583,13 @@ static BOOL test_bscholder(IBindStatusCallback *holder) HRESULT hres;
hres = IBindStatusCallback_QueryInterface(holder, &IID_IServiceProvider, (void**)&serv_prov); - ok(hres == S_OK, "Could not get IServiceProvider interface: %08x\n", hres); + ok(hres == S_OK, "Could not get IServiceProvider interface: %08lx\n", hres);
dw = 0xdeadbeef; SET_EXPECT(QueryInterface_IBindStatusCallbackEx); SET_EXPECT(GetBindInfo); hres = IBindStatusCallback_GetBindInfo(holder, &dw, &bindinfo); - ok(hres == S_OK, "GetBindInfo failed: %08x\n", hres); + ok(hres == S_OK, "GetBindInfo failed: %08lx\n", hres); CLEAR_CALLED(QueryInterface_IBindStatusCallbackEx); /* IE 8 */ CHECK_CALLED(GetBindInfo);
@@ -2597,16 +2597,16 @@ static BOOL test_bscholder(IBindStatusCallback *holder)
SET_EXPECT(OnStartBinding); hres = IBindStatusCallback_OnStartBinding(holder, 0, (void*)0xdeadbeef); - ok(hres == S_OK, "OnStartBinding failed: %08x\n", hres); + ok(hres == S_OK, "OnStartBinding failed: %08lx\n", hres); CHECK_CALLED(OnStartBinding);
hres = IBindStatusCallback_QueryInterface(holder, &IID_IHttpNegotiate, (void**)&http_negotiate); - ok(hres == S_OK, "Could not get IHttpNegotiate interface: %08x\n", hres); + ok(hres == S_OK, "Could not get IHttpNegotiate interface: %08lx\n", hres);
SET_EXPECT(QueryInterface_IHttpNegotiate); hres = IServiceProvider_QueryService(serv_prov, &IID_IHttpNegotiate, &IID_IHttpNegotiate, (void**)&http_negotiate_serv); - ok(hres == S_OK, "Could not get IHttpNegotiate service: %08x\n", hres); + ok(hres == S_OK, "Could not get IHttpNegotiate service: %08lx\n", hres); CLEAR_CALLED(QueryInterface_IHttpNegotiate); /* IE <8 */
ok(http_negotiate == http_negotiate_serv, "http_negotiate != http_negotiate_serv\n"); @@ -2617,14 +2617,14 @@ static BOOL test_bscholder(IBindStatusCallback *holder) hres = IHttpNegotiate_BeginningTransaction(http_negotiate_serv, current_url, emptyW, 0, &wstr); CHECK_CALLED_BROKEN(QueryInterface_IHttpNegotiate); /* IE8 */ CHECK_CALLED(BeginningTransaction); - ok(hres == S_OK, "BeginningTransaction failed: %08x\n", hres); + ok(hres == S_OK, "BeginningTransaction failed: %08lx\n", hres); ok(wstr == NULL, "wstr = %p\n", wstr);
IHttpNegotiate_Release(http_negotiate_serv);
hres = IServiceProvider_QueryService(serv_prov, &IID_IHttpNegotiate, &IID_IHttpNegotiate, (void**)&http_negotiate_serv); - ok(hres == S_OK, "Could not get IHttpNegotiate service: %08x\n", hres); + ok(hres == S_OK, "Could not get IHttpNegotiate service: %08lx\n", hres); ok(http_negotiate == http_negotiate_serv, "http_negotiate != http_negotiate_serv\n"); IHttpNegotiate_Release(http_negotiate_serv);
@@ -2635,14 +2635,14 @@ static BOOL test_bscholder(IBindStatusCallback *holder) SET_EXPECT(QueryInterface_IHttpNegotiate2); hres = IServiceProvider_QueryService(serv_prov, &IID_IHttpNegotiate2, &IID_IHttpNegotiate2, (void**)&http_negotiate2_serv); - ok(hres == S_OK, "Could not get IHttpNegotiate2 service: %08x\n", hres); + ok(hres == S_OK, "Could not get IHttpNegotiate2 service: %08lx\n", hres); CLEAR_CALLED(QueryInterface_IHttpNegotiate2); /* IE <8 */ ok(http_negotiate2 == http_negotiate2_serv, "http_negotiate != http_negotiate_serv\n");
SET_EXPECT(QueryInterface_IHttpNegotiate2); SET_EXPECT(GetRootSecurityId); hres = IHttpNegotiate2_GetRootSecurityId(http_negotiate2, (void*)0xdeadbeef, (void*)0xdeadbeef, 0); - ok(hres == E_NOTIMPL, "GetRootSecurityId failed: %08x\n", hres); + ok(hres == E_NOTIMPL, "GetRootSecurityId failed: %08lx\n", hres); CHECK_CALLED_BROKEN(QueryInterface_IHttpNegotiate2); /* IE8 */ CHECK_CALLED(GetRootSecurityId);
@@ -2655,27 +2655,27 @@ static BOOL test_bscholder(IBindStatusCallback *holder)
SET_EXPECT(OnProgress_FINDINGRESOURCE); hres = IBindStatusCallback_OnProgress(holder, 0, 0, BINDSTATUS_FINDINGRESOURCE, NULL); - ok(hres == S_OK, "OnProgress failed: %08x\n", hres); + ok(hres == S_OK, "OnProgress failed: %08lx\n", hres); CHECK_CALLED(OnProgress_FINDINGRESOURCE);
SET_EXPECT(QueryInterface_IHttpNegotiate); SET_EXPECT(OnResponse); wstr = (void*)0xdeadbeef; hres = IHttpNegotiate_OnResponse(http_negotiate, 200, emptyW, NULL, NULL); - ok(hres == S_OK, "OnResponse failed: %08x\n", hres); + ok(hres == S_OK, "OnResponse failed: %08lx\n", hres); CHECK_CALLED_BROKEN(QueryInterface_IHttpNegotiate); /* IE8 */ CHECK_CALLED(OnResponse);
IHttpNegotiate_Release(http_negotiate);
hres = IBindStatusCallback_QueryInterface(holder, &IID_IAuthenticate, (void**)&authenticate); - ok(hres == S_OK, "Could not get IAuthenticate interface: %08x\n", hres); + ok(hres == S_OK, "Could not get IAuthenticate interface: %08lx\n", hres);
SET_EXPECT(QueryInterface_IAuthenticate); SET_EXPECT(QueryService_IAuthenticate); hres = IServiceProvider_QueryService(serv_prov, &IID_IAuthenticate, &IID_IAuthenticate, (void**)&authenticate_serv); - ok(hres == S_OK, "Could not get IAuthenticate service: %08x\n", hres); + ok(hres == S_OK, "Could not get IAuthenticate service: %08lx\n", hres); CLEAR_CALLED(QueryInterface_IAuthenticate); /* IE <8 */ CLEAR_CALLED(QueryService_IAuthenticate); /* IE <8 */ ok(authenticate == authenticate_serv, "authenticate != authenticate_serv\n"); @@ -2683,32 +2683,32 @@ static BOOL test_bscholder(IBindStatusCallback *holder)
hres = IServiceProvider_QueryService(serv_prov, &IID_IAuthenticate, &IID_IAuthenticate, (void**)&authenticate_serv); - ok(hres == S_OK, "Could not get IAuthenticate service: %08x\n", hres); + ok(hres == S_OK, "Could not get IAuthenticate service: %08lx\n", hres); ok(authenticate == authenticate_serv, "authenticate != authenticate_serv\n");
IAuthenticate_Release(authenticate); IAuthenticate_Release(authenticate_serv);
hres = IBindStatusCallback_QueryInterface(holder, &IID_IInternetBindInfo, (void**)&bind_info); - ok(hres == S_OK || broken(hres == E_NOINTERFACE /* win2k */), "Could not get IInternetBindInfo interface: %08x\n", hres); + ok(hres == S_OK || broken(hres == E_NOINTERFACE /* win2k */), "Could not get IInternetBindInfo interface: %08lx\n", hres);
if(SUCCEEDED(hres)) { hres = IInternetBindInfo_GetBindString(bind_info, BINDSTRING_USER_AGENT, &wstr, 1, &dw); - ok(hres == E_NOINTERFACE, "GetBindString(BINDSTRING_USER_AGENT) failed: %08x\n", hres); + ok(hres == E_NOINTERFACE, "GetBindString(BINDSTRING_USER_AGENT) failed: %08lx\n", hres);
IInternetBindInfo_Release(bind_info); }
SET_EXPECT(OnStopBinding); hres = IBindStatusCallback_OnStopBinding(holder, S_OK, NULL); - ok(hres == S_OK, "OnStopBinding failed: %08x\n", hres); + ok(hres == S_OK, "OnStopBinding failed: %08lx\n", hres); CHECK_CALLED(OnStopBinding);
SET_EXPECT(QueryInterface_IInternetProtocol); SET_EXPECT(QueryService_IInternetProtocol); hres = IServiceProvider_QueryService(serv_prov, &IID_IInternetProtocol, &IID_IInternetProtocol, (void**)&protocol); - ok(hres == E_NOINTERFACE, "QueryService(IInternetProtocol) failed: %08x\n", hres); + ok(hres == E_NOINTERFACE, "QueryService(IInternetProtocol) failed: %08lx\n", hres); CHECK_CALLED(QueryInterface_IInternetProtocol); CHECK_CALLED(QueryService_IInternetProtocol);
@@ -2727,18 +2727,18 @@ static BOOL test_RegisterBindStatusCallback(void) strict_bsc_qi = TRUE;
hres = CreateBindCtx(0, &bindctx); - ok(hres == S_OK, "BindCtx failed: %08x\n", hres); + ok(hres == S_OK, "BindCtx failed: %08lx\n", hres);
SET_EXPECT(QueryInterface_IServiceProvider);
hres = IBindCtx_RegisterObjectParam(bindctx, BSCBHolder, (IUnknown*)&bsc); - ok(hres == S_OK, "RegisterObjectParam failed: %08x\n", hres); + ok(hres == S_OK, "RegisterObjectParam failed: %08lx\n", hres);
SET_EXPECT(QueryInterface_IBindStatusCallback); SET_EXPECT(QueryInterface_IBindStatusCallbackHolder); prevbsc = (void*)0xdeadbeef; hres = RegisterBindStatusCallback(bindctx, (IBindStatusCallback*)&bsc, &prevbsc, 0); - ok(hres == S_OK, "RegisterBindStatusCallback failed: %08x\n", hres); + ok(hres == S_OK, "RegisterBindStatusCallback failed: %08lx\n", hres); ok(prevbsc == (IBindStatusCallback*)&bsc, "prevbsc=%p\n", prevbsc); CHECK_CALLED(QueryInterface_IBindStatusCallback); CHECK_CALLED(QueryInterface_IBindStatusCallbackHolder); @@ -2746,11 +2746,11 @@ static BOOL test_RegisterBindStatusCallback(void) CHECK_CALLED(QueryInterface_IServiceProvider);
hres = IBindCtx_GetObjectParam(bindctx, BSCBHolder, &unk); - ok(hres == S_OK, "GetObjectParam failed: %08x\n", hres); + ok(hres == S_OK, "GetObjectParam failed: %08lx\n", hres);
hres = IUnknown_QueryInterface(unk, &IID_IBindStatusCallback, (void**)&clb); IUnknown_Release(unk); - ok(hres == S_OK, "QueryInterface(IID_IBindStatusCallback) failed: %08x\n", hres); + ok(hres == S_OK, "QueryInterface(IID_IBindStatusCallback) failed: %08lx\n", hres); ok(clb != (IBindStatusCallback*)&bsc, "bsc == clb\n");
if(!test_bscholder(clb)) @@ -2759,53 +2759,53 @@ static BOOL test_RegisterBindStatusCallback(void) IBindStatusCallback_Release(clb);
hres = RevokeBindStatusCallback(bindctx, (IBindStatusCallback*)&bsc); - ok(hres == S_OK, "RevokeBindStatusCallback failed: %08x\n", hres); + ok(hres == S_OK, "RevokeBindStatusCallback failed: %08lx\n", hres);
unk = (void*)0xdeadbeef; hres = IBindCtx_GetObjectParam(bindctx, BSCBHolder, &unk); - ok(hres == E_FAIL, "GetObjectParam failed: %08x\n", hres); + ok(hres == E_FAIL, "GetObjectParam failed: %08lx\n", hres); ok(unk == NULL, "unk != NULL\n");
if(unk) IUnknown_Release(unk);
hres = RevokeBindStatusCallback(bindctx, (void*)0xdeadbeef); - ok(hres == S_OK, "RevokeBindStatusCallback failed: %08x\n", hres); + ok(hres == S_OK, "RevokeBindStatusCallback failed: %08lx\n", hres);
hres = RevokeBindStatusCallback(NULL, (void*)0xdeadbeef); - ok(hres == E_INVALIDARG, "RevokeBindStatusCallback failed: %08x\n", hres); + ok(hres == E_INVALIDARG, "RevokeBindStatusCallback failed: %08lx\n", hres);
hres = RevokeBindStatusCallback(bindctx, NULL); - ok(hres == E_INVALIDARG, "RevokeBindStatusCallback failed: %08x\n", hres); + ok(hres == E_INVALIDARG, "RevokeBindStatusCallback failed: %08lx\n", hres);
SET_EXPECT(QueryInterface_IServiceProvider); prevbsc = (void*)0xdeadbeef; hres = RegisterBindStatusCallback(bindctx, (IBindStatusCallback*)&bsc, &prevbsc, 0); - ok(hres == S_OK, "RegisterBindStatusCallback failed: %08x\n", hres); + ok(hres == S_OK, "RegisterBindStatusCallback failed: %08lx\n", hres); ok(!prevbsc, "prevbsc=%p\n", prevbsc); CHECK_CALLED(QueryInterface_IServiceProvider);
hres = IBindCtx_GetObjectParam(bindctx, BSCBHolder, &unk); - ok(hres == S_OK, "GetObjectParam failed: %08x\n", hres); + ok(hres == S_OK, "GetObjectParam failed: %08lx\n", hres);
hres = IUnknown_QueryInterface(unk, &IID_IBindStatusCallback, (void**)&prev_clb); IUnknown_Release(unk); - ok(hres == S_OK, "QueryInterface(IID_IBindStatusCallback) failed: %08x\n", hres); + ok(hres == S_OK, "QueryInterface(IID_IBindStatusCallback) failed: %08lx\n", hres); ok(prev_clb != (IBindStatusCallback*)&bsc, "bsc == clb\n");
SET_EXPECT(QueryInterface_IServiceProvider); prevbsc = (void*)0xdeadbeef; hres = RegisterBindStatusCallback(bindctx, (IBindStatusCallback*)&bsc2, &prevbsc, 0); - ok(hres == S_OK, "RegisterBindStatusCallback failed: %08x\n", hres); + ok(hres == S_OK, "RegisterBindStatusCallback failed: %08lx\n", hres); ok(prevbsc == (IBindStatusCallback*)&bsc, "prevbsc != bsc\n"); CHECK_CALLED(QueryInterface_IServiceProvider);
hres = IBindCtx_GetObjectParam(bindctx, BSCBHolder, &unk); - ok(hres == S_OK, "GetObjectParam failed: %08x\n", hres); + ok(hres == S_OK, "GetObjectParam failed: %08lx\n", hres);
hres = IUnknown_QueryInterface(unk, &IID_IBindStatusCallback, (void**)&clb); IUnknown_Release(unk); - ok(hres == S_OK, "QueryInterface(IID_IBindStatusCallback) failed: %08x\n", hres); + ok(hres == S_OK, "QueryInterface(IID_IBindStatusCallback) failed: %08lx\n", hres); ok(prev_clb == clb, "bsc != clb\n");
IBindStatusCallback_Release(clb); @@ -2955,13 +2955,13 @@ static void test_MonikerComposeWith(void) CreateBindCtx(0, &bind); for(i = 0; i < ARRAY_SIZE( data ); i++){ hres = CreateURLMoniker(NULL, data[i].l, &lmon); - ok(hres == S_OK, "failed to create moniker: %08x\n", hres); + ok(hres == S_OK, "failed to create moniker: %08lx\n", hres); hres = CreateURLMoniker(NULL, data[i].r, &rmon); - ok(hres == S_OK, "failed to create moniker: %08x\n", hres); + ok(hres == S_OK, "failed to create moniker: %08lx\n", hres);
hres = IMoniker_ComposeWith(lmon, rmon, FALSE, &outmon); ok(hres == S_OK, - "ComposeWith failed: l: %s, r: %s, ret: %08x\n", wine_dbgstr_w(data[i].l), wine_dbgstr_w(data[i].r), hres); + "ComposeWith failed: l: %s, r: %s, ret: %08lx\n", wine_dbgstr_w(data[i].l), wine_dbgstr_w(data[i].r), hres);
IMoniker_GetClassID(outmon, &clsid); ok(IsEqualCLSID(&clsid, &CLSID_StdURLMoniker), @@ -2978,22 +2978,22 @@ static void test_MonikerComposeWith(void) IBindCtx_Release(bind);
hres = CreateURLMoniker(NULL, data[0].l, &lmon); - ok(hres == S_OK, "failed to create moniker: %08x\n", hres); + ok(hres == S_OK, "failed to create moniker: %08lx\n", hres); hres = CreateURLMoniker(NULL, data[0].r, &rmon); - ok(hres == S_OK, "failed to create moniker: %08x\n", hres); + ok(hres == S_OK, "failed to create moniker: %08lx\n", hres); hres = CreateFileMoniker(L"/a/b", &filemon); - ok(hres == S_OK, "failed to create moniker: %08x\n", hres); + ok(hres == S_OK, "failed to create moniker: %08lx\n", hres);
hres = IMoniker_ComposeWith(lmon, NULL, FALSE, &outmon); - ok(hres == E_INVALIDARG, "ComposeWith error: %08x\n", hres); + ok(hres == E_INVALIDARG, "ComposeWith error: %08lx\n", hres);
hres = IMoniker_ComposeWith(lmon, rmon, FALSE, NULL); - ok(hres == E_INVALIDARG, "ComposeWith error: %08x\n", hres); + ok(hres == E_INVALIDARG, "ComposeWith error: %08lx\n", hres);
hres = IMoniker_ComposeWith(lmon, filemon, TRUE, &outmon); - ok(hres == MK_E_NEEDGENERIC, "ComposeWith error: %08x\n", hres); + ok(hres == MK_E_NEEDGENERIC, "ComposeWith error: %08lx\n", hres); hres = IMoniker_ComposeWith(lmon, filemon, FALSE, &outmon); - ok(hres == S_OK, "ComposeWith error: %08x\n", hres); + ok(hres == S_OK, "ComposeWith error: %08lx\n", hres);
IMoniker_GetClassID(outmon, &clsid); ok(IsEqualCLSID(&clsid, &CLSID_CompositeMoniker), @@ -3022,18 +3022,18 @@ static void test_BindToStorage(int protocol, DWORD flags, DWORD t)
if(no_callback) { hres = CreateBindCtx(0, &bctx); - ok(hres == S_OK, "CreateBindCtx failed: %08x\n", hres); + ok(hres == S_OK, "CreateBindCtx failed: %08lx\n", hres); }else { SET_EXPECT(QueryInterface_IServiceProvider); hres = CreateAsyncBindCtx(0, (IBindStatusCallback*)&bsc, NULL, &bctx); - ok(hres == S_OK, "CreateAsyncBindCtx failed: %08x\n\n", hres); + ok(hres == S_OK, "CreateAsyncBindCtx failed: %08lx\n\n", hres); CHECK_CALLED(QueryInterface_IServiceProvider); if(FAILED(hres)) return;
SET_EXPECT(QueryInterface_IServiceProvider); hres = RegisterBindStatusCallback(bctx, (IBindStatusCallback*)&bsc, &previousclb, 0); - ok(hres == S_OK, "RegisterBindStatusCallback failed: %08x\n", hres); + ok(hres == S_OK, "RegisterBindStatusCallback failed: %08lx\n", hres); ok(previousclb == (IBindStatusCallback*)&bsc, "previousclb(%p) != sclb(%p)\n", previousclb, &bsc); CHECK_CALLED(QueryInterface_IServiceProvider); if(previousclb) @@ -3041,7 +3041,7 @@ static void test_BindToStorage(int protocol, DWORD flags, DWORD t) }
hres = CreateURLMoniker(NULL, current_url, &mon); - ok(hres == S_OK, "failed to create moniker: %08x\n", hres); + ok(hres == S_OK, "failed to create moniker: %08lx\n", hres); if(FAILED(hres)) return;
@@ -3058,7 +3058,7 @@ static void test_BindToStorage(int protocol, DWORD flags, DWORD t) IBinding_Release(bind);
hres = IMoniker_GetDisplayName(mon, bctx, NULL, &display_name); - ok(hres == S_OK, "GetDisplayName failed %08x\n", hres); + ok(hres == S_OK, "GetDisplayName failed %08lx\n", hres); ok(!lstrcmpW(display_name, current_url), "GetDisplayName got wrong name %s, expected %s\n", wine_dbgstr_w(display_name), wine_dbgstr_w(current_url)); CoTaskMemFree(display_name); @@ -3150,33 +3150,33 @@ static void test_BindToStorage(int protocol, DWORD flags, DWORD t) }
if(only_check_prot_args) { - ok(hres == E_FAIL, "Got %08x\n", hres); + ok(hres == E_FAIL, "Got %08lx\n", hres); CHECK_CALLED(OnStopBinding); } else if(abort_start) - ok(hres == abort_hres, "IMoniker_BindToStorage failed: %08x, expected %08x\n", hres, abort_hres); + ok(hres == abort_hres, "IMoniker_BindToStorage failed: %08lx, expected %08lx\n", hres, abort_hres); else if(abort_progress) - ok(hres == MK_S_ASYNCHRONOUS, "IMoniker_BindToStorage failed: %08x\n", hres); + ok(hres == MK_S_ASYNCHRONOUS, "IMoniker_BindToStorage failed: %08lx\n", hres); else if(no_callback) { if(emulate_protocol) ok( WaitForSingleObject(complete_event2, 90000) == WAIT_OBJECT_0, "wait timed out\n" ); - ok(hres == S_OK, "IMoniker_BindToStorage failed: %08x\n", hres); + ok(hres == S_OK, "IMoniker_BindToStorage failed: %08lx\n", hres); ok(unk != NULL, "unk == NULL\n"); }else if(!(bindf & BINDF_ASYNCHRONOUS) && tymed == TYMED_FILE) { - ok(hres == S_OK, "IMoniker_BindToStorage failed: %08x\n", hres); + ok(hres == S_OK, "IMoniker_BindToStorage failed: %08lx\n", hres); ok(unk == NULL, "unk != NULL\n"); }else if(((bindf & BINDF_ASYNCHRONOUS) && !data_available) || (tymed == TYMED_FILE && test_protocol == FILE_TEST)) { - ok(hres == MK_S_ASYNCHRONOUS, "IMoniker_BindToStorage failed: %08x\n", hres); + ok(hres == MK_S_ASYNCHRONOUS, "IMoniker_BindToStorage failed: %08lx\n", hres); ok(unk == NULL, "istr should be NULL\n"); }else if(tymed == TYMED_FILE && test_protocol == ABOUT_TEST) { ok(hres == INET_E_DATA_NOT_AVAILABLE, - "IMoniker_BindToStorage failed: %08x, expected INET_E_DATA_NOT_AVAILABLE\n", hres); + "IMoniker_BindToStorage failed: %08lx, expected INET_E_DATA_NOT_AVAILABLE\n", hres); ok(unk == NULL, "istr should be NULL\n"); }else if((flags & BINDTEST_INVALID_CN) && binding_hres != S_OK) { - ok(hres == binding_hres, "Got %08x\n", hres); + ok(hres == binding_hres, "Got %08lx\n", hres); ok(unk == NULL, "Got %p\n", unk); }else if((flags & BINDTEST_INVALID_CN) && invalid_cn_accepted) { - ok(hres == S_OK, "IMoniker_BindToStorage failed: %08x\n", hres); + ok(hres == S_OK, "IMoniker_BindToStorage failed: %08lx\n", hres); ok(unk != NULL, "unk == NULL\n"); if(unk == NULL) { ok(0, "Expected security problem to be ignored.\n"); @@ -3184,7 +3184,7 @@ static void test_BindToStorage(int protocol, DWORD flags, DWORD t) binding_hres = INET_E_INVALID_CERTIFICATE; } }else { - ok(hres == S_OK, "IMoniker_BindToStorage failed: %08x\n", hres); + ok(hres == S_OK, "IMoniker_BindToStorage failed: %08lx\n", hres); ok(unk != NULL, "unk == NULL\n"); } if(unk && callback_read && !no_callback) { @@ -3324,7 +3324,7 @@ static void test_BindToStorage(int protocol, DWORD flags, DWORD t) IStream *stream;
hres = IUnknown_QueryInterface(unk, &IID_IStream, (void**)&stream); - ok(hres == S_OK, "Could not get IStream iface: %08x\n", hres); + ok(hres == S_OK, "Could not get IStream iface: %08lx\n", hres); IUnknown_Release(unk);
do { @@ -3334,8 +3334,8 @@ static void test_BindToStorage(int protocol, DWORD flags, DWORD t) if(emulate_protocol && test_protocol == HTTP_TEST && read) ok(buf[0] == (use_cache_file && !(bindf&BINDF_ASYNCHRONOUS) ? 'X' : '?'), "buf[0] = '%c'\n", buf[0]); }while(hres == S_OK); - ok(hres == S_FALSE, "IStream_Read returned %08x\n", hres); - ok(!read, "read = %d\n", read); + ok(hres == S_FALSE, "IStream_Read returned %08lx\n", hres); + ok(!read, "read = %ld\n", read);
IStream_Release(stream); } @@ -3361,13 +3361,13 @@ static void test_BindToObject(int protocol, DWORD flags, HRESULT exhres)
SET_EXPECT(QueryInterface_IServiceProvider); hres = CreateAsyncBindCtx(0, (IBindStatusCallback*)&objbsc, NULL, &bctx); - ok(hres == S_OK, "CreateAsyncBindCtx failed: %08x\n\n", hres); + ok(hres == S_OK, "CreateAsyncBindCtx failed: %08lx\n\n", hres); CHECK_CALLED(QueryInterface_IServiceProvider); if(FAILED(hres)) return;
hres = CreateURLMoniker(NULL, current_url, &mon); - ok(hres == S_OK, "failed to create moniker: %08x\n", hres); + ok(hres == S_OK, "failed to create moniker: %08lx\n", hres); if(FAILED(hres)) { IBindCtx_Release(bctx); return; @@ -3379,7 +3379,7 @@ static void test_BindToObject(int protocol, DWORD flags, HRESULT exhres) IBinding_Release(bind);
hres = IMoniker_GetDisplayName(mon, bctx, NULL, &display_name); - ok(hres == S_OK, "GetDisplayName failed %08x\n", hres); + ok(hres == S_OK, "GetDisplayName failed %08lx\n", hres); ok(!lstrcmpW(display_name, current_url), "GetDisplayName got wrong name\n"); CoTaskMemFree(display_name);
@@ -3448,13 +3448,13 @@ static void test_BindToObject(int protocol, DWORD flags, HRESULT exhres) }
if(FAILED(exhres)) { - ok(hres == exhres, "BindToObject failed: %08x, expected %08x\n", hres, exhres); + ok(hres == exhres, "BindToObject failed: %08lx, expected %08lx\n", hres, exhres); ok(!unk, "unk = %p, expected NULL\n", unk); }else if(bindf & BINDF_ASYNCHRONOUS) { - ok(hres == MK_S_ASYNCHRONOUS, "IMoniker_BindToObject failed: %08x\n", hres); + ok(hres == MK_S_ASYNCHRONOUS, "IMoniker_BindToObject failed: %08lx\n", hres); ok(unk == NULL, "istr should be NULL\n"); }else { - ok(hres == S_OK, "IMoniker_BindToStorage failed: %08x\n", hres); + ok(hres == S_OK, "IMoniker_BindToStorage failed: %08lx\n", hres); ok(unk != NULL, "unk == NULL\n"); if(emulate_protocol) ok(unk == (IUnknown*)&PersistMoniker, "unk != PersistMoniker\n"); @@ -3588,7 +3588,7 @@ static void test_URLDownloadToFile(DWORD prot, BOOL emul) }
hres = URLDownloadToFileW(NULL, current_url, dwl_htmlW, 0, (IBindStatusCallback*)&bsc); - ok(hres == S_OK, "URLDownloadToFile failed: %08x\n", hres); + ok(hres == S_OK, "URLDownloadToFile failed: %08lx\n", hres);
CHECK_CALLED(GetBindInfo); CHECK_CALLED(QueryInterface_IInternetProtocol); @@ -3635,16 +3635,16 @@ static void test_URLDownloadToFile(DWORD prot, BOOL emul) }
res = DeleteFileA(dwl_htmlA); - ok(res, "DeleteFile failed: %u\n", GetLastError()); + ok(res, "DeleteFile failed: %lu\n", GetLastError());
if(prot != FILE_TEST || emul) return;
hres = URLDownloadToFileW(NULL, current_url, dwl_htmlW, 0, NULL); - ok(hres == S_OK, "URLDownloadToFile failed: %08x\n", hres); + ok(hres == S_OK, "URLDownloadToFile failed: %08lx\n", hres);
res = DeleteFileA(dwl_htmlA); - ok(res, "DeleteFile failed: %u\n", GetLastError()); + ok(res, "DeleteFile failed: %lu\n", GetLastError()); }
static void test_URLDownloadToFile_abort(void) @@ -3668,7 +3668,7 @@ static void test_URLDownloadToFile_abort(void) SET_EXPECT(OnStopBinding);
hres = URLDownloadToFileW(NULL, current_url, dwl_htmlW, 0, (IBindStatusCallback*)&bsc); - ok(hres == E_ABORT, "URLDownloadToFile failed: %08x, expected E_ABORT\n", hres); + ok(hres == E_ABORT, "URLDownloadToFile failed: %08lx, expected E_ABORT\n", hres);
CHECK_CALLED(GetBindInfo); CHECK_CALLED(QueryInterface_IInternetProtocol); @@ -3695,7 +3695,7 @@ static void test_URLDownloadToFile_abort(void)
abort_hres = E_ABORT; hres = URLDownloadToFileW(NULL, current_url, dwl_htmlW, 0, (IBindStatusCallback*)&bsc); - ok(hres == E_ABORT, "URLDownloadToFile failed: %08x, expected E_ABORT\n", hres); + ok(hres == E_ABORT, "URLDownloadToFile failed: %08lx, expected E_ABORT\n", hres);
CHECK_CALLED(GetBindInfo); todo_wine CHECK_CALLED(QueryInterface_IInternetProtocol); @@ -3730,7 +3730,7 @@ static void test_URLDownloadToFile_abort(void) */ abort_hres = E_NOTIMPL; hres = URLDownloadToFileW(NULL, current_url, dwl_htmlW, 0, (IBindStatusCallback*)&bsc); - ok(hres == S_OK, "URLDownloadToFile failed: %08x\n", hres); + ok(hres == S_OK, "URLDownloadToFile failed: %08lx\n", hres);
CHECK_CALLED(GetBindInfo); CHECK_CALLED(QueryInterface_IInternetProtocol); @@ -3827,11 +3827,11 @@ static void test_ReportResult(HRESULT exhres) binding_hres = exhres;
hres = CreateURLMoniker(NULL, about_blankW, &mon); - ok(hres == S_OK, "CreateURLMoniker failed: %08x\n", hres); + ok(hres == S_OK, "CreateURLMoniker failed: %08lx\n", hres);
SET_EXPECT(QueryInterface_IServiceProvider); hres = CreateAsyncBindCtx(0, (IBindStatusCallback*)&bsc, NULL, &bctx); - ok(hres == S_OK, "CreateAsyncBindCtx failed: %08x\n\n", hres); + ok(hres == S_OK, "CreateAsyncBindCtx failed: %08lx\n\n", hres); CHECK_CALLED(QueryInterface_IServiceProvider);
SET_EXPECT(QueryInterface_IBindStatusCallbackEx); @@ -3844,10 +3844,10 @@ static void test_ReportResult(HRESULT exhres)
hres = IMoniker_BindToStorage(mon, bctx, NULL, &IID_IStream, (void**)&unk); if(SUCCEEDED(exhres)) - ok(hres == S_OK || hres == MK_S_ASYNCHRONOUS, "BindToStorage failed: %08x\n", hres); + ok(hres == S_OK || hres == MK_S_ASYNCHRONOUS, "BindToStorage failed: %08lx\n", hres); else ok(hres == exhres || hres == MK_S_ASYNCHRONOUS, - "BindToStorage failed: %08x, expected %08x or MK_S_ASYNCHRONOUS\n", hres, exhres); + "BindToStorage failed: %08lx, expected %08lx or MK_S_ASYNCHRONOUS\n", hres, exhres);
CLEAR_CALLED(QueryInterface_IBindStatusCallbackEx); /* IE 8 */ CHECK_CALLED(GetBindInfo); @@ -3871,17 +3871,17 @@ static void test_BindToStorage_fail(void) HRESULT hres;
hres = CreateURLMoniker(NULL, about_blankW, &mon); - ok(hres == S_OK, "CreateURLMoniker failed: %08x\n", hres); + ok(hres == S_OK, "CreateURLMoniker failed: %08lx\n", hres); if(FAILED(hres)) return;
hres = pCreateAsyncBindCtxEx(NULL, 0, NULL, NULL, &bctx, 0); - ok(hres == S_OK, "CreateAsyncBindCtxEx failed: %08x\n", hres); + ok(hres == S_OK, "CreateAsyncBindCtxEx failed: %08lx\n", hres);
unk = (void*)0xdeadbeef; hres = IMoniker_BindToStorage(mon, bctx, NULL, &IID_IStream, (void**)&unk); ok(hres == MK_E_SYNTAX || hres == INET_E_DATA_NOT_AVAILABLE, - "hres=%08x, expected MK_E_SYNTAX or INET_E_DATA_NOT_AVAILABLE\n", hres); + "hres=%08lx, expected MK_E_SYNTAX or INET_E_DATA_NOT_AVAILABLE\n", hres); ok(unk == NULL, "got %p\n", unk);
IBindCtx_Release(bctx); @@ -3902,29 +3902,29 @@ static void test_StdURLMoniker(void)
hres = CoCreateInstance(&IID_IInternet, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, &IID_IMoniker, (void**)&mon); - ok(hres == S_OK, "Could not create IInternet instance: %08x\n", hres); + ok(hres == S_OK, "Could not create IInternet instance: %08lx\n", hres); if(FAILED(hres)) return;
hres = IMoniker_QueryInterface(mon, &IID_IAsyncMoniker, (void**)&async_mon); - ok(hres == S_OK, "Could not get IAsyncMoniker iface: %08x\n", hres); + ok(hres == S_OK, "Could not get IAsyncMoniker iface: %08lx\n", hres); ok(mon == async_mon, "mon != async_mon\n"); IMoniker_Release(async_mon);
hres = IMoniker_GetDisplayName(mon, NULL, NULL, &display_name); - ok(hres == E_OUTOFMEMORY, "GetDisplayName failed: %08x, expected E_OUTOFMEMORY\n", hres); + ok(hres == E_OUTOFMEMORY, "GetDisplayName failed: %08lx, expected E_OUTOFMEMORY\n", hres);
if(pCreateUri) { IUriContainer *uri_container; IUri *uri;
hres = IMoniker_QueryInterface(mon, &IID_IUriContainer, (void**)&uri_container); - ok(hres == S_OK, "Could not get IUriMoniker iface: %08x\n", hres); + ok(hres == S_OK, "Could not get IUriMoniker iface: %08lx\n", hres);
uri = (void*)0xdeadbeef; hres = IUriContainer_GetIUri(uri_container, &uri); - ok(hres == S_FALSE, "GetIUri failed: %08x\n", hres); + ok(hres == S_FALSE, "GetIUri failed: %08lx\n", hres); ok(!uri, "uri = %p, expected NULL\n", uri);
IUriContainer_Release(uri_container); @@ -3932,18 +3932,18 @@ static void test_StdURLMoniker(void)
SET_EXPECT(QueryInterface_IServiceProvider); hres = CreateAsyncBindCtx(0, (IBindStatusCallback*)&bsc, NULL, &bctx); - ok(hres == S_OK, "CreateAsyncBindCtx failed: %08x\n\n", hres); + ok(hres == S_OK, "CreateAsyncBindCtx failed: %08lx\n\n", hres); CHECK_CALLED(QueryInterface_IServiceProvider);
if(pCreateUri) { /* Skip these tests on old IEs */ unk = (void*)0xdeadbeef; hres = IMoniker_BindToStorage(mon, bctx, NULL, &IID_IStream, (void**)&unk); - ok(hres == MK_E_SYNTAX, "BindToStorage failed: %08x, expected MK_E_SYNTAX\n", hres); + ok(hres == MK_E_SYNTAX, "BindToStorage failed: %08lx, expected MK_E_SYNTAX\n", hres); ok(!unk, "unk = %p\n", unk);
unk = (void*)0xdeadbeef; hres = IMoniker_BindToObject(mon, bctx, NULL, &IID_IUnknown, (void**)&unk); - ok(hres == MK_E_SYNTAX, "BindToStorage failed: %08x, expected MK_E_SYNTAX\n", hres); + ok(hres == MK_E_SYNTAX, "BindToStorage failed: %08lx, expected MK_E_SYNTAX\n", hres); ok(!unk, "unk = %p\n", unk); }
@@ -3958,13 +3958,13 @@ static void register_protocols(void) static const WCHAR winetestW[] = {'w','i','n','e','t','e','s','t',0};
hres = CoInternetGetSession(0, &session, 0); - ok(hres == S_OK, "CoInternetGetSession failed: %08x\n", hres); + ok(hres == S_OK, "CoInternetGetSession failed: %08lx\n", hres); if(FAILED(hres)) return;
hres = IInternetSession_RegisterNameSpace(session, &protocol_cf, &IID_NULL, winetestW, 0, NULL, 0); - ok(hres == S_OK, "RegisterNameSpace failed: %08x\n", hres); + ok(hres == S_OK, "RegisterNameSpace failed: %08lx\n", hres);
IInternetSession_Release(session); } @@ -3988,7 +3988,7 @@ static BOOL can_do_https(void) ret = HttpSendRequestA(req, NULL, 0, NULL, 0); ok(ret || broken(GetLastError() == ERROR_INTERNET_CANNOT_CONNECT) || broken(GetLastError() == ERROR_INTERNET_SECURITY_CHANNEL_ERROR) /* WinXP */, - "request failed: %u\n", GetLastError()); + "request failed: %lu\n", GetLastError());
InternetCloseHandle(req); InternetCloseHandle(con);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=110021
Your paranoid android.
=== w8 (32 bit report) ===
urlmon: protocol.c:732: Test failed: unexpected call Switch
=== w8adm (32 bit report) ===
urlmon: protocol.c:1196: Test failed: hrResult = 800c0005, expected: 00000000 protocol.c:3464: Test failed: expected ReportData
=== w8adm (32 bit report) ===
urlmon: url.c:1846: Test failed: binding failed: 800c0005, expected 00000000 url.c:1857: Test failed: res = 00002ee7, expected 00000000 url.c:3187: Test failed: IMoniker_BindToStorage failed: 800c0005 url.c:3188: Test failed: unk == NULL
=== w1064v1507 (32 bit report) ===
urlmon: url.c:3750: Test failed: expected OnProgress_DOWNLOADINGDATA
=== w1064v1809 (32 bit report) ===
urlmon: url.c:3750: Test failed: expected OnProgress_DOWNLOADINGDATA
=== w864 (64 bit report) ===
urlmon: url.c:3750: Test failed: expected OnProgress_DOWNLOADINGDATA
=== w1064v1507 (64 bit report) ===
urlmon: url.c:3750: Test failed: expected OnProgress_DOWNLOADINGDATA
=== w1064_tsign (64 bit report) ===
urlmon: url.c:3750: Test failed: expected OnProgress_DOWNLOADINGDATA
Signed-off-by: Jacek Caban jacek@codeweavers.com
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/userenv/tests/Makefile.in | 1 - dlls/userenv/tests/userenv.c | 46 ++++++++++++++++++++-------------------- 2 files changed, 23 insertions(+), 24 deletions(-)
diff --git a/dlls/userenv/tests/Makefile.in b/dlls/userenv/tests/Makefile.in index 4eca08ed851..c4aa8d0db4a 100644 --- a/dlls/userenv/tests/Makefile.in +++ b/dlls/userenv/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = userenv.dll IMPORTS = userenv advapi32
diff --git a/dlls/userenv/tests/userenv.c b/dlls/userenv/tests/userenv.c index c7a6791e2be..3f2b3442832 100644 --- a/dlls/userenv/tests/userenv.c +++ b/dlls/userenv/tests/userenv.c @@ -33,7 +33,7 @@
#define expect(EXPECTED,GOT) ok((GOT)==(EXPECTED), "Expected %d, got %d\n", (EXPECTED), (GOT)) #define expect_env(EXPECTED,GOT,VAR) ok((GOT)==(EXPECTED), "Expected %d, got %d for %s (%d)\n", (EXPECTED), (GOT), (VAR), j) -#define expect_gle(EXPECTED) ok(GetLastError() == (EXPECTED), "Expected %d, got %d\n", (EXPECTED), GetLastError()) +#define expect_gle(EXPECTED) ok(GetLastError() == (EXPECTED), "Expected %d, got %ld\n", (EXPECTED), GetLastError())
static BOOL (WINAPI *pIsWow64Process)(HANDLE,PBOOL);
@@ -115,13 +115,13 @@ static void test_create_env(void) expect(TRUE, r);
r = GetEnvironmentVariableA("SystemRoot", systemroot, sizeof(systemroot)); - ok(r != 0, "GetEnvironmentVariable failed (%d)\n", GetLastError()); + ok(r != 0, "GetEnvironmentVariable failed (%ld)\n", GetLastError());
r = SetEnvironmentVariableA("SystemRoot", "overwrite"); expect(TRUE, r);
r = GetEnvironmentVariableA("ProgramData", programdata, sizeof(programdata)); - ok(r != 0, "GetEnvironmentVariable failed (%d)\n", GetLastError()); + ok(r != 0, "GetEnvironmentVariable failed (%ld)\n", GetLastError());
r = SetEnvironmentVariableA("ProgramData", "overwrite"); expect(TRUE, r); @@ -250,7 +250,7 @@ static void test_get_profiles_dir(void) char *profiles_dir, *buf, small_buf[1];
l = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ProfileListA, 0, KEY_READ, &key); - ok(!l, "RegOpenKeyExA failed: %d\n", GetLastError()); + ok(!l, "RegOpenKeyExA failed: %ld\n", GetLastError());
l = RegQueryValueExA(key, ProfilesDirectory, NULL, NULL, NULL, &cch); if (l) @@ -282,7 +282,7 @@ static void test_get_profiles_dir(void) /* MSDN claims the returned character count includes the NULL terminator * when the buffer is too small, but that's not in fact what gets returned. */ - ok(cch == profiles_len - 1, "expected %d, got %d\n", profiles_len - 1, cch); + ok(cch == profiles_len - 1, "expected %ld, got %ld\n", profiles_len - 1, cch); /* Allocate one more character than the return value to prevent a buffer * overrun. */ @@ -291,7 +291,7 @@ static void test_get_profiles_dir(void) /* Rather than a BOOL, the return value is also the number of characters * stored in the buffer. */ - expect(profiles_len - 1, r); + ok(profiles_len - 1 == r, "expected %ld, got %d\n", profiles_len - 1, r); ok(!strcmp(buf, profiles_dir), "expected %s, got %s\n", profiles_dir, buf);
HeapFree(GetProcessHeap(), 0, buf); @@ -330,26 +330,26 @@ static void test_get_user_profile_dir(void) }
ret = OpenProcessToken( GetCurrentProcess(), TOKEN_QUERY, &token ); - ok(ret, "expected success %u\n", GetLastError()); + ok(ret, "expected success %lu\n", GetLastError());
SetLastError( 0xdeadbeef ); ret = GetUserProfileDirectoryA( NULL, NULL, NULL ); error = GetLastError(); ok(!ret, "expected failure\n"); - ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", error); + ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %lu\n", error);
SetLastError( 0xdeadbeef ); ret = GetUserProfileDirectoryA( token, NULL, NULL ); error = GetLastError(); ok(!ret, "expected failure\n"); - ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", error); + ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %lu\n", error);
dirA = HeapAlloc( GetProcessHeap(), 0, 32 ); SetLastError( 0xdeadbeef ); ret = GetUserProfileDirectoryA( token, dirA, NULL ); error = GetLastError(); ok(!ret, "expected failure\n"); - ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", error); + ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %lu\n", error); HeapFree( GetProcessHeap(), 0, dirA );
len = 0; @@ -357,8 +357,8 @@ static void test_get_user_profile_dir(void) ret = GetUserProfileDirectoryA( token, NULL, &len ); error = GetLastError(); ok(!ret, "expected failure\n"); - ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", error); - ok(!len, "expected 0, got %u\n", len); + ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %lu\n", error); + ok(!len, "expected 0, got %lu\n", len);
len = 0; dirA = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, 32 ); @@ -374,34 +374,34 @@ static void test_get_user_profile_dir(void) dirA = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, len ); SetLastError( 0xdeadbeef ); ret = GetUserProfileDirectoryA( token, dirA, &len ); - ok(ret, "expected success %u\n", GetLastError()); + ok(ret, "expected success %lu\n", GetLastError()); ok(len, "expected len > 0\n"); - ok(lstrlenA( dirA ) == len - 1, "length mismatch %d != %d - 1\n", lstrlenA( dirA ), len ); + ok(lstrlenA( dirA ) == len - 1, "length mismatch %d != %ld - 1\n", lstrlenA( dirA ), len ); trace("%s\n", dirA); HeapFree( GetProcessHeap(), 0, dirA ); } else ok(broken(error == ERROR_INVALID_PARAMETER) /* win10 1809+ */, - "unexpected error %u\n", error); + "unexpected error %lu\n", error);
SetLastError( 0xdeadbeef ); ret = GetUserProfileDirectoryW( NULL, NULL, NULL ); error = GetLastError(); ok(!ret, "expected failure\n"); - todo_wine ok(error == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %u\n", error); + todo_wine ok(error == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %lu\n", error);
SetLastError( 0xdeadbeef ); ret = GetUserProfileDirectoryW( token, NULL, NULL ); error = GetLastError(); ok(!ret, "expected failure\n"); - ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", error); + ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %lu\n", error);
dirW = HeapAlloc( GetProcessHeap(), 0, 32 ); SetLastError( 0xdeadbeef ); ret = GetUserProfileDirectoryW( token, dirW, NULL ); error = GetLastError(); ok(!ret, "expected failure\n"); - ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", error); + ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %lu\n", error); HeapFree( GetProcessHeap(), 0, dirW );
len = 0; @@ -409,15 +409,15 @@ static void test_get_user_profile_dir(void) ret = GetUserProfileDirectoryW( token, NULL, &len ); error = GetLastError(); ok(!ret, "expected failure\n"); - ok(error == ERROR_INSUFFICIENT_BUFFER, "expected ERROR_INSUFFICIENT_BUFFER, got %u\n", error); + ok(error == ERROR_INSUFFICIENT_BUFFER, "expected ERROR_INSUFFICIENT_BUFFER, got %lu\n", error); ok(len, "expected len > 0\n");
dirW = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, len * sizeof(WCHAR) ); SetLastError( 0xdeadbeef ); ret = GetUserProfileDirectoryW( token, dirW, &len ); - ok(ret, "expected success %u\n", GetLastError()); + ok(ret, "expected success %lu\n", GetLastError()); ok(len, "expected len > 0\n"); - ok(lstrlenW( dirW ) == len - 1, "length mismatch %d != %d - 1\n", lstrlenW( dirW ), len ); + ok(lstrlenW( dirW ) == len - 1, "length mismatch %d != %ld - 1\n", lstrlenW( dirW ), len ); HeapFree( GetProcessHeap(), 0, dirW );
len2 = 0; @@ -428,10 +428,10 @@ static void test_get_user_profile_dir(void) ok(!ret, "expected failure\n"); HeapFree( GetProcessHeap(), 0, dirW ); if (error == ERROR_INSUFFICIENT_BUFFER) - ok(len2 == len, "expected %d, got %d\n", len, len2); + ok(len2 == len, "expected %ld, got %ld\n", len, len2); else ok(broken(error == ERROR_INVALID_PARAMETER) /* win10 1809+ */, - "unexpected error %u\n", error); + "unexpected error %lu\n", error);
CloseHandle( token ); }
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/uxtheme/tests/Makefile.in | 1 dlls/uxtheme/tests/msg.h | 16 +- dlls/uxtheme/tests/system.c | 404 ++++++++++++++++++++-------------------- dlls/uxtheme/tests/v6util.h | 4 4 files changed, 212 insertions(+), 213 deletions(-)
diff --git a/dlls/uxtheme/tests/Makefile.in b/dlls/uxtheme/tests/Makefile.in index 876cd1d7815..3fd3c23f5d8 100644 --- a/dlls/uxtheme/tests/Makefile.in +++ b/dlls/uxtheme/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = uxtheme.dll IMPORTS = advapi32 user32 gdi32 uxtheme
diff --git a/dlls/uxtheme/tests/msg.h b/dlls/uxtheme/tests/msg.h index 1be05499fd4..37699a12213 100644 --- a/dlls/uxtheme/tests/msg.h +++ b/dlls/uxtheme/tests/msg.h @@ -114,7 +114,7 @@ static void dump_sequence( struct msg_sequence **seq, int sequence_index, trace_(file, line)("Failed sequence %s:\n", context ); while (expected->message && actual->message) { - trace_(file, line)( " %u: expected: %04x - actual: %04x wp %08lx lp %08lx\n", + trace_(file, line)( " %u: expected: %04x - actual: %04x wp %08Ix lp %08Ix\n", count, expected->message, actual->message, actual->wParam, actual->lParam );
if (expected->message == actual->message) @@ -155,7 +155,7 @@ static void dump_sequence( struct msg_sequence **seq, int sequence_index,
while (actual->message) { - trace_(file, line)( " %u: expected: nothing - actual: %04x wp %08lx lp %08lx\n", + trace_(file, line)( " %u: expected: nothing - actual: %04x wp %08Ix lp %08Ix\n", count, actual->message, actual->wParam, actual->lParam ); actual++; count++; @@ -190,14 +190,14 @@ static void ok_sequence_(struct msg_sequence **seq, int sequence_index, failcount++; dump++; ok_(file, line) (FALSE, - "%s: in msg 0x%04x expecting wParam 0x%lx got 0x%lx\n", + "%s: in msg 0x%04x expecting wParam 0x%Ix got 0x%Ix\n", context, expected->message, expected->wParam, actual->wParam); } } else { ok_(file, line) (expected->wParam == actual->wParam, - "%s: in msg 0x%04x expecting wParam 0x%lx got 0x%lx\n", + "%s: in msg 0x%04x expecting wParam 0x%Ix got 0x%Ix\n", context, expected->message, expected->wParam, actual->wParam); if (expected->wParam != actual->wParam) dump++; } @@ -212,14 +212,14 @@ static void ok_sequence_(struct msg_sequence **seq, int sequence_index, failcount++; dump++; ok_(file, line) (FALSE, - "%s: in msg 0x%04x expecting lParam 0x%lx got 0x%lx\n", + "%s: in msg 0x%04x expecting lParam 0x%Ix got 0x%Ix\n", context, expected->message, expected->lParam, actual->lParam); } } else { ok_(file, line) (expected->lParam == actual->lParam, - "%s: in msg 0x%04x expecting lParam 0x%lx got 0x%lx\n", + "%s: in msg 0x%04x expecting lParam 0x%Ix got 0x%Ix\n", context, expected->message, expected->lParam, actual->lParam); if (expected->lParam != actual->lParam) dump++; } @@ -234,14 +234,14 @@ static void ok_sequence_(struct msg_sequence **seq, int sequence_index, failcount++; dump++; ok_(file, line) (FALSE, - "%s: in msg 0x%04x expecting cd stage 0x%08x got 0x%08x\n", + "%s: in msg 0x%04x expecting cd stage 0x%08lx got 0x%08lx\n", context, expected->message, expected->stage, actual->stage); } } else { ok_(file, line) (expected->stage == actual->stage, - "%s: in msg 0x%04x expecting cd stage 0x%08x got 0x%08x\n", + "%s: in msg 0x%04x expecting cd stage 0x%08lx got 0x%08lx\n", context, expected->message, expected->stage, actual->stage); if (expected->stage != actual->stage) dump++; } diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c index dd118f5ab37..93b6f1aa8f7 100644 --- a/dlls/uxtheme/tests/system.c +++ b/dlls/uxtheme/tests/system.c @@ -190,7 +190,7 @@ static BOOL set_primary_monitor_effective_dpi(unsigned int primary_dpi) error = pDisplayConfigGetDeviceInfo(&get_scale_req.header); if (error != NO_ERROR) { - skip("DisplayConfigGetDeviceInfo failed, returned %d.\n", error); + skip("DisplayConfigGetDeviceInfo failed, returned %ld.\n", error); goto failed; }
@@ -317,7 +317,7 @@ static void test_IsThemePartDefined(void)
is_theme_active = IsThemeActive(); hwnd = CreateWindowA(WC_STATICA, "", WS_POPUP, 0, 0, 1, 1, 0, 0, 0, NULL); - ok(hwnd != NULL, "CreateWindowA failed, error %#x.\n", GetLastError()); + ok(hwnd != NULL, "CreateWindowA failed, error %#lx.\n", GetLastError());
for (i = 0; i < ARRAY_SIZE(tests); ++i) { @@ -330,14 +330,14 @@ static void test_IsThemePartDefined(void) if (tests[i].class_name) { theme = OpenThemeData(hwnd, tests[i].class_name); - ok(theme != NULL, "OpenThemeData failed, error %#x.\n", GetLastError()); + ok(theme != NULL, "OpenThemeData failed, error %#lx.\n", GetLastError()); }
SetLastError(0xdeadbeef); ret = IsThemePartDefined(theme, tests[i].part, tests[i].state); error = GetLastError(); ok(ret == tests[i].defined, "Expected %d.\n", tests[i].defined); - ok(error == tests[i].error, "Expected %#x, got %#x.\n", tests[i].error, error); + ok(error == tests[i].error, "Expected %#lx, got %#lx.\n", tests[i].error, error);
if (theme) { @@ -358,7 +358,7 @@ static void test_GetWindowTheme(void) SetLastError(0xdeadbeef); hTheme = GetWindowTheme(NULL); ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); - ok( GetLastError() == E_HANDLE, "Expected E_HANDLE, got 0x%08x\n", GetLastError() ); + ok( GetLastError() == E_HANDLE, "Expected E_HANDLE, got 0x%08lx\n", GetLastError() );
/* Only do the bare minimum to get a valid hwnd */ hWnd = CreateWindowExA(0, "static", "", WS_POPUP, 0,0,100,100,0, 0, 0, NULL); @@ -368,7 +368,7 @@ static void test_GetWindowTheme(void) hTheme = GetWindowTheme(hWnd); ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); ok( GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got 0x%08x\n", + "Expected 0xdeadbeef, got 0x%08lx\n", GetLastError());
DestroyWindow(hWnd); @@ -394,7 +394,7 @@ static void test_SetWindowTheme(void) MSG msg;
hRes = SetWindowTheme(NULL, NULL, NULL); - ok( hRes == E_HANDLE, "Expected E_HANDLE, got 0x%08x\n", hRes); + ok( hRes == E_HANDLE, "Expected E_HANDLE, got 0x%08lx\n", hRes);
/* Test that WM_THEMECHANGED is sent and not posted to windows */ cls.hInstance = GetModuleHandleA(0); @@ -418,7 +418,7 @@ static void test_SetWindowTheme(void) flush_sequences(sequences, NUM_MSG_SEQUENCES);
hRes = SetWindowTheme(hWnd, NULL, NULL); - ok(hRes == S_OK, "Expected %#x, got %#x.\n", S_OK, hRes); + ok(hRes == S_OK, "Expected %#lx, got %#lx.\n", S_OK, hRes); while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) { struct message recv_msg = {0}; @@ -444,7 +444,7 @@ static void test_SetWindowTheme(void) ok(hWnd != NULL, "Failed to create a test window.\n");
hRes = SetWindowTheme(hWnd, NULL, NULL); - ok( hRes == S_OK, "Expected S_OK, got 0x%08x\n", hRes); + ok( hRes == S_OK, "Expected S_OK, got 0x%08lx\n", hRes);
if (IsThemeActive()) { @@ -453,7 +453,7 @@ static void test_SetWindowTheme(void) CloseThemeData(hTheme);
hRes = SetWindowTheme(hWnd, L"deadbeef", NULL); - ok(hRes == S_OK, "Expected S_OK, got 0x%08x.\n", hRes); + ok(hRes == S_OK, "Expected S_OK, got 0x%08lx.\n", hRes);
hTheme = OpenThemeData(hWnd, L"Button"); ok(!!hTheme, "OpenThemeData failed.\n"); @@ -487,14 +487,14 @@ static void test_OpenThemeData(void) hTheme = OpenThemeData(NULL, NULL); ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); ok( GetLastError() == E_POINTER, - "Expected GLE() to be E_POINTER, got 0x%08x\n", + "Expected GLE() to be E_POINTER, got 0x%08lx\n", GetLastError());
/* A NULL hWnd and an invalid classlist */ SetLastError(0xdeadbeef); hTheme = OpenThemeData(NULL, szInvalidClassList); ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); - ok( GetLastError() == E_PROP_ID_UNSUPPORTED, "Expected 0x%08x, got 0x%08x\n", + ok( GetLastError() == E_PROP_ID_UNSUPPORTED, "Expected 0x%08lx, got 0x%08lx\n", E_PROP_ID_UNSUPPORTED, GetLastError() );
SetLastError(0xdeadbeef); @@ -502,12 +502,12 @@ static void test_OpenThemeData(void) if (bThemeActive) { ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); - ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08x\n", GetLastError() ); + ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08lx\n", GetLastError() ); } else { ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); - ok( GetLastError() == E_PROP_ID_UNSUPPORTED, "Expected 0x%08x, got 0x%08x\n", + ok( GetLastError() == E_PROP_ID_UNSUPPORTED, "Expected 0x%08lx, got 0x%08lx\n", E_PROP_ID_UNSUPPORTED, GetLastError() ); }
@@ -519,13 +519,13 @@ static void test_OpenThemeData(void) hTheme = OpenThemeData(hWnd, NULL); ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); ok( GetLastError() == E_POINTER, - "Expected GLE() to be E_POINTER, got 0x%08x\n", + "Expected GLE() to be E_POINTER, got 0x%08lx\n", GetLastError());
SetLastError(0xdeadbeef); hTheme = OpenThemeData(hWnd, szInvalidClassList); ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); - ok( GetLastError() == E_PROP_ID_UNSUPPORTED, "Expected 0x%08x, got 0x%08x\n", + ok( GetLastError() == E_PROP_ID_UNSUPPORTED, "Expected 0x%08lx, got 0x%08lx\n", E_PROP_ID_UNSUPPORTED, GetLastError() );
if (!bThemeActive) @@ -533,7 +533,7 @@ static void test_OpenThemeData(void) SetLastError(0xdeadbeef); hTheme = OpenThemeData(hWnd, szButtonClassList); ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); - ok( GetLastError() == E_PROP_ID_UNSUPPORTED, "Expected 0x%08x, got 0x%08x\n", + ok( GetLastError() == E_PROP_ID_UNSUPPORTED, "Expected 0x%08lx, got 0x%08lx\n", E_PROP_ID_UNSUPPORTED, GetLastError() ); skip("No active theme, skipping rest of OpenThemeData tests\n"); return; @@ -544,18 +544,18 @@ static void test_OpenThemeData(void) SetLastError(0xdeadbeef); hTheme = OpenThemeData(hWnd, szButtonClassList); ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); - ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08x\n", GetLastError() ); + ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08lx\n", GetLastError() );
/* Test with bUtToN instead of Button */ SetLastError(0xdeadbeef); hTheme = OpenThemeData(hWnd, szButtonClassList2); ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); - ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08x\n", GetLastError() ); + ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08lx\n", GetLastError() );
SetLastError(0xdeadbeef); hTheme = OpenThemeData(hWnd, szClassList); ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); - ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08x\n", GetLastError() ); + ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08lx\n", GetLastError() );
/* GetWindowTheme should return the last handle opened by OpenThemeData */ SetLastError(0xdeadbeef); @@ -563,15 +563,15 @@ static void test_OpenThemeData(void) ok( hTheme == hTheme2, "Expected the same HTHEME handle (%p<->%p)\n", hTheme, hTheme2); ok( GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got 0x%08x\n", + "Expected 0xdeadbeef, got 0x%08lx\n", GetLastError());
hRes = CloseThemeData(hTheme); - ok( hRes == S_OK, "Expected S_OK, got 0x%08x\n", hRes); + ok( hRes == S_OK, "Expected S_OK, got 0x%08lx\n", hRes);
/* Close a second time */ hRes = CloseThemeData(hTheme); - ok( hRes == S_OK, "Expected S_OK, got 0x%08x\n", hRes); + ok( hRes == S_OK, "Expected S_OK, got 0x%08lx\n", hRes);
/* See if closing makes a difference for GetWindowTheme */ SetLastError(0xdeadbeef); @@ -580,14 +580,14 @@ static void test_OpenThemeData(void) ok( hTheme == hTheme2, "Expected the same HTHEME handle (%p<->%p)\n", hTheme, hTheme2); ok( GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got 0x%08x\n", + "Expected 0xdeadbeef, got 0x%08lx\n", GetLastError());
SetLastError(0xdeadbeef); bTPDefined = IsThemePartDefined(hTheme, 0 , 0); todo_wine ok( bTPDefined == FALSE, "Expected FALSE\n" ); - ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08x\n", GetLastError() ); + ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08lx\n", GetLastError() );
DestroyWindow(hWnd); } @@ -616,14 +616,14 @@ static void test_OpenThemeDataEx(void) hTheme = pOpenThemeDataEx(NULL, NULL, 0); ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); ok( GetLastError() == E_POINTER, - "Expected GLE() to be E_POINTER, got 0x%08x\n", + "Expected GLE() to be E_POINTER, got 0x%08lx\n", GetLastError());
/* A NULL hWnd and an invalid classlist without flags */ SetLastError(0xdeadbeef); hTheme = pOpenThemeDataEx(NULL, szInvalidClassList, 0); ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); - ok( GetLastError() == E_PROP_ID_UNSUPPORTED, "Expected 0x%08x, got 0x%08x\n", + ok( GetLastError() == E_PROP_ID_UNSUPPORTED, "Expected 0x%08lx, got 0x%08lx\n", E_PROP_ID_UNSUPPORTED, GetLastError() );
SetLastError(0xdeadbeef); @@ -631,12 +631,12 @@ static void test_OpenThemeDataEx(void) if (bThemeActive) { ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); - ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08x\n", GetLastError() ); + ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08lx\n", GetLastError() ); } else { ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); - ok( GetLastError() == E_PROP_ID_UNSUPPORTED, "Expected 0x%08x, got 0x%08x\n", + ok( GetLastError() == E_PROP_ID_UNSUPPORTED, "Expected 0x%08lx, got 0x%08lx\n", E_PROP_ID_UNSUPPORTED, GetLastError() ); }
@@ -648,13 +648,13 @@ static void test_OpenThemeDataEx(void) hTheme = pOpenThemeDataEx(hWnd, NULL, 0); ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); ok( GetLastError() == E_POINTER, - "Expected GLE() to be E_POINTER, got 0x%08x\n", + "Expected GLE() to be E_POINTER, got 0x%08lx\n", GetLastError());
SetLastError(0xdeadbeef); hTheme = pOpenThemeDataEx(hWnd, szInvalidClassList, 0); ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); - ok( GetLastError() == E_PROP_ID_UNSUPPORTED, "Expected 0x%08x, got 0x%08x\n", + ok( GetLastError() == E_PROP_ID_UNSUPPORTED, "Expected 0x%08lx, got 0x%08lx\n", E_PROP_ID_UNSUPPORTED, GetLastError() );
if (!bThemeActive) @@ -662,7 +662,7 @@ static void test_OpenThemeDataEx(void) SetLastError(0xdeadbeef); hTheme = pOpenThemeDataEx(hWnd, szButtonClassList, 0); ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); - ok( GetLastError() == E_PROP_ID_UNSUPPORTED, "Expected 0x%08x, got 0x%08x\n", + ok( GetLastError() == E_PROP_ID_UNSUPPORTED, "Expected 0x%08lx, got 0x%08lx\n", E_PROP_ID_UNSUPPORTED, GetLastError() ); skip("No active theme, skipping rest of OpenThemeDataEx tests\n"); return; @@ -673,33 +673,33 @@ static void test_OpenThemeDataEx(void) SetLastError(0xdeadbeef); hTheme = pOpenThemeDataEx(hWnd, szButtonClassList, 0); ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); - ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08x\n", GetLastError() ); + ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08lx\n", GetLastError() );
SetLastError(0xdeadbeef); hTheme = pOpenThemeDataEx(hWnd, szButtonClassList, OTD_FORCE_RECT_SIZING); ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); - ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08x\n", GetLastError() ); + ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08lx\n", GetLastError() );
SetLastError(0xdeadbeef); hTheme = pOpenThemeDataEx(hWnd, szButtonClassList, OTD_NONCLIENT); ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); - ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08x\n", GetLastError() ); + ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08lx\n", GetLastError() );
SetLastError(0xdeadbeef); hTheme = pOpenThemeDataEx(hWnd, szButtonClassList, 0x3); ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); - ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08x\n", GetLastError() ); + ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08lx\n", GetLastError() );
/* Test with bUtToN instead of Button */ SetLastError(0xdeadbeef); hTheme = pOpenThemeDataEx(hWnd, szButtonClassList2, 0); ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); - ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08x\n", GetLastError() ); + ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08lx\n", GetLastError() );
SetLastError(0xdeadbeef); hTheme = pOpenThemeDataEx(hWnd, szClassList, 0); ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); - ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08x\n", GetLastError() ); + ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08lx\n", GetLastError() );
DestroyWindow(hWnd); } @@ -721,13 +721,13 @@ static void test_OpenThemeDataForDpi(void) if (is_theme_active) { ok(!!htheme, "Got a NULL handle.\n"); - ok(GetLastError() == NO_ERROR, "Expected error %u, got %u.\n", NO_ERROR, GetLastError()); + ok(GetLastError() == NO_ERROR, "Expected error %u, got %lu.\n", NO_ERROR, GetLastError()); CloseThemeData(htheme); } else { ok(!htheme, "Got a non-NULL handle.\n"); - ok(GetLastError() == E_PROP_ID_UNSUPPORTED, "Expected error %u, got %u.\n", + ok(GetLastError() == E_PROP_ID_UNSUPPORTED, "Expected error %lu, got %lu.\n", E_PROP_ID_UNSUPPORTED, GetLastError()); } } @@ -745,25 +745,25 @@ static void test_GetCurrentThemeName(void) /* All NULLs */ hRes = GetCurrentThemeName(NULL, 0, NULL, 0, NULL, 0); if (bThemeActive) - ok( hRes == S_OK, "Expected S_OK, got 0x%08x\n", hRes); + ok( hRes == S_OK, "Expected S_OK, got 0x%08lx\n", hRes); else - ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes); + ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08lx\n", hRes);
/* Number of characters given is 0 */ hRes = GetCurrentThemeName(currentTheme, 0, NULL, 0, NULL, 0); if (bThemeActive) - ok( hRes == S_OK || broken(hRes == E_FAIL /* WinXP SP1 */), "Expected S_OK, got 0x%08x\n", hRes); + ok( hRes == S_OK || broken(hRes == E_FAIL /* WinXP SP1 */), "Expected S_OK, got 0x%08lx\n", hRes); else - ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes); + ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08lx\n", hRes);
hRes = GetCurrentThemeName(currentTheme, 2, NULL, 0, NULL, 0); if (bThemeActive) todo_wine ok(hRes == E_NOT_SUFFICIENT_BUFFER || broken(hRes == E_FAIL /* WinXP SP1 */), - "Expected E_NOT_SUFFICIENT_BUFFER, got 0x%08x\n", hRes); + "Expected E_NOT_SUFFICIENT_BUFFER, got 0x%08lx\n", hRes); else - ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes); + ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08lx\n", hRes);
/* The same is true if the number of characters is too small for Color and/or Size */ hRes = GetCurrentThemeName(currentTheme, ARRAY_SIZE(currentTheme), currentColor, 2, @@ -772,48 +772,48 @@ static void test_GetCurrentThemeName(void) todo_wine ok(hRes == E_NOT_SUFFICIENT_BUFFER || broken(hRes == E_FAIL /* WinXP SP1 */), - "Expected E_NOT_SUFFICIENT_BUFFER, got 0x%08x\n", hRes); + "Expected E_NOT_SUFFICIENT_BUFFER, got 0x%08lx\n", hRes); else - ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes); + ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08lx\n", hRes);
/* Given number of characters is correct */ hRes = GetCurrentThemeName(currentTheme, ARRAY_SIZE(currentTheme), NULL, 0, NULL, 0); if (bThemeActive) - ok( hRes == S_OK, "Expected S_OK, got 0x%08x\n", hRes); + ok( hRes == S_OK, "Expected S_OK, got 0x%08lx\n", hRes); else - ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes); + ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08lx\n", hRes);
/* Given number of characters for the theme name is too large */ hRes = GetCurrentThemeName(currentTheme, sizeof(currentTheme), NULL, 0, NULL, 0); if (bThemeActive) - ok( hRes == E_POINTER || hRes == S_OK, "Expected E_POINTER or S_OK, got 0x%08x\n", hRes); + ok( hRes == E_POINTER || hRes == S_OK, "Expected E_POINTER or S_OK, got 0x%08lx\n", hRes); else ok( hRes == E_PROP_ID_UNSUPPORTED || hRes == E_POINTER, /* win2k3 */ - "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes); + "Expected E_PROP_ID_UNSUPPORTED, got 0x%08lx\n", hRes);
/* The too large case is only for the theme name, not for color name or size name */ hRes = GetCurrentThemeName(currentTheme, ARRAY_SIZE(currentTheme), currentColor, sizeof(currentTheme), currentSize, ARRAY_SIZE(currentSize)); if (bThemeActive) - ok( hRes == S_OK, "Expected S_OK, got 0x%08x\n", hRes); + ok( hRes == S_OK, "Expected S_OK, got 0x%08lx\n", hRes); else - ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes); + ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08lx\n", hRes);
hRes = GetCurrentThemeName(currentTheme, ARRAY_SIZE(currentTheme), currentColor, ARRAY_SIZE(currentTheme), currentSize, sizeof(currentSize)); if (bThemeActive) - ok( hRes == S_OK, "Expected S_OK, got 0x%08x\n", hRes); + ok( hRes == S_OK, "Expected S_OK, got 0x%08lx\n", hRes); else - ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes); + ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08lx\n", hRes);
/* Correct call */ hRes = GetCurrentThemeName(currentTheme, ARRAY_SIZE(currentTheme), currentColor, ARRAY_SIZE(currentColor), currentSize, ARRAY_SIZE(currentSize)); if (bThemeActive) - ok( hRes == S_OK, "Expected S_OK, got 0x%08x\n", hRes); + ok( hRes == S_OK, "Expected S_OK, got 0x%08lx\n", hRes); else - ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes); + ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08lx\n", hRes); }
static void test_CloseThemeData(void) @@ -821,9 +821,9 @@ static void test_CloseThemeData(void) HRESULT hRes;
hRes = CloseThemeData(NULL); - ok( hRes == E_HANDLE, "Expected E_HANDLE, got 0x%08x\n", hRes); + ok( hRes == E_HANDLE, "Expected E_HANDLE, got 0x%08lx\n", hRes); hRes = CloseThemeData(INVALID_HANDLE_VALUE); - ok( hRes == E_HANDLE, "Expected E_HANDLE, got 0x%08x\n", hRes); + ok( hRes == E_HANDLE, "Expected E_HANDLE, got 0x%08lx\n", hRes); }
static void test_buffer_dc_props(HDC hdc, const RECT *rect) @@ -929,7 +929,7 @@ static void test_buffered_paint(void) ok(buffer != NULL, "Unexpected buffer %p\n", buffer); ok(src != NULL, "Expected buffered dc\n"); hr = pEndBufferedPaint(buffer, FALSE); - ok(hr == S_OK, "Unexpected return code %#x\n", hr); + ok(hr == S_OK, "Unexpected return code %#lx\n", hr);
SetRect(&rect, 0, 0, 5, 5); buffer = pBeginBufferedPaint(target, &rect, BPBF_COMPATIBLEBITMAP, @@ -939,11 +939,11 @@ static void test_buffered_paint(void) /* clearing */ hr = pBufferedPaintClear(NULL, NULL); todo_wine - ok(hr == E_FAIL, "Unexpected return code %#x\n", hr); + ok(hr == E_FAIL, "Unexpected return code %#lx\n", hr);
hr = pBufferedPaintClear(buffer, NULL); todo_wine - ok(hr == S_OK, "Unexpected return code %#x\n", hr); + ok(hr == S_OK, "Unexpected return code %#lx\n", hr);
/* access buffer attributes */ hdc = pGetBufferedPaintDC(buffer); @@ -953,25 +953,25 @@ static void test_buffered_paint(void) ok(hdc == target, "Unexpected target hdc %p, original %p\n", hdc, target);
hr = pGetBufferedPaintTargetRect(NULL, NULL); - ok(hr == E_POINTER, "Unexpected return code %#x\n", hr); + ok(hr == E_POINTER, "Unexpected return code %#lx\n", hr);
hr = pGetBufferedPaintTargetRect(buffer, NULL); - ok(hr == E_POINTER, "Unexpected return code %#x\n", hr); + ok(hr == E_POINTER, "Unexpected return code %#lx\n", hr);
hr = pGetBufferedPaintTargetRect(NULL, &rect2); - ok(hr == E_FAIL, "Unexpected return code %#x\n", hr); + ok(hr == E_FAIL, "Unexpected return code %#lx\n", hr);
SetRectEmpty(&rect2); hr = pGetBufferedPaintTargetRect(buffer, &rect2); - ok(hr == S_OK, "Unexpected return code %#x\n", hr); + ok(hr == S_OK, "Unexpected return code %#lx\n", hr); ok(EqualRect(&rect, &rect2), "Wrong target rect\n");
hr = pEndBufferedPaint(buffer, FALSE); - ok(hr == S_OK, "Unexpected return code %#x\n", hr); + ok(hr == S_OK, "Unexpected return code %#lx\n", hr);
/* invalid buffer handle */ hr = pEndBufferedPaint(NULL, FALSE); - ok(hr == E_INVALIDARG, "Unexpected return code %#x\n", hr); + ok(hr == E_INVALIDARG, "Unexpected return code %#lx\n", hr);
hdc = pGetBufferedPaintDC(NULL); ok(hdc == NULL, "Unexpected hdc %p\n", hdc); @@ -980,26 +980,26 @@ static void test_buffered_paint(void) ok(hdc == NULL, "Unexpected target hdc %p\n", hdc);
hr = pGetBufferedPaintTargetRect(NULL, &rect2); - ok(hr == E_FAIL, "Unexpected return code %#x\n", hr); + ok(hr == E_FAIL, "Unexpected return code %#lx\n", hr);
hr = pGetBufferedPaintTargetRect(NULL, NULL); - ok(hr == E_POINTER, "Unexpected return code %#x\n", hr); + ok(hr == E_POINTER, "Unexpected return code %#lx\n", hr);
bits = (void *)0xdeadbeef; row = 10; hr = pGetBufferedPaintBits(NULL, &bits, &row); - ok(hr == E_FAIL, "Unexpected return code %#x\n", hr); + ok(hr == E_FAIL, "Unexpected return code %#lx\n", hr); ok(row == 10, "Unexpected row count %d\n", row); ok(bits == (void *)0xdeadbeef, "Unexpected data pointer %p\n", bits);
hr = pGetBufferedPaintBits(NULL, NULL, NULL); - ok(hr == E_POINTER, "Unexpected return code %#x\n", hr); + ok(hr == E_POINTER, "Unexpected return code %#lx\n", hr);
hr = pGetBufferedPaintBits(NULL, &bits, NULL); - ok(hr == E_POINTER, "Unexpected return code %#x\n", hr); + ok(hr == E_POINTER, "Unexpected return code %#lx\n", hr);
hr = pGetBufferedPaintBits(NULL, NULL, &row); - ok(hr == E_POINTER, "Unexpected return code %#x\n", hr); + ok(hr == E_POINTER, "Unexpected return code %#lx\n", hr);
screen_dc = GetDC(0);
@@ -1016,7 +1016,7 @@ static void test_buffered_paint(void) buffer = pBeginBufferedPaint(hdc, &rect, BPBF_COMPATIBLEBITMAP, NULL, &src); test_buffer_dc_props(src, &rect); hr = pEndBufferedPaint(buffer, FALSE); - ok(hr == S_OK, "Unexpected return code %#x\n", hr); + ok(hr == S_OK, "Unexpected return code %#lx\n", hr);
DeleteObject(hbm); DeleteDC(hdc); @@ -1024,7 +1024,7 @@ static void test_buffered_paint(void) buffer = pBeginBufferedPaint(target, &rect, BPBF_COMPATIBLEBITMAP, NULL, &src); test_buffer_dc_props(src, &rect); hr = pEndBufferedPaint(buffer, FALSE); - ok(hr == S_OK, "Unexpected return code %#x\n", hr); + ok(hr == S_OK, "Unexpected return code %#lx\n", hr);
/* access buffer bits */ for (format = BPBF_COMPATIBLEBITMAP; format <= BPBF_TOPDOWNMONODIB; format++) @@ -1036,16 +1036,16 @@ static void test_buffered_paint(void) row = 0; hr = pGetBufferedPaintBits(buffer, &bits, &row); if (format == BPBF_COMPATIBLEBITMAP) - ok(hr == E_FAIL, "Unexpected return code %#x\n", hr); + ok(hr == E_FAIL, "Unexpected return code %#lx\n", hr); else { - ok(hr == S_OK, "Unexpected return code %#x\n", hr); + ok(hr == S_OK, "Unexpected return code %#lx\n", hr); ok(bits != NULL, "Bitmap bits %p\n", bits); ok(row >= (rect.right - rect.left), "format %d: bitmap width %d\n", format, row); }
hr = pEndBufferedPaint(buffer, FALSE); - ok(hr == S_OK, "Unexpected return code %#x\n", hr); + ok(hr == S_OK, "Unexpected return code %#lx\n", hr); }
DeleteDC(target); @@ -1095,10 +1095,10 @@ static void test_GetThemePartSize(void)
hdc = GetDC(hwnd); hr = GetThemePartSize(htheme, hdc, BP_CHECKBOX, CBS_CHECKEDNORMAL, NULL, TS_DRAW, &size); - ok(hr == S_OK, "GetThemePartSize failed, hr %#x.\n", hr); + ok(hr == S_OK, "GetThemePartSize failed, hr %#lx.\n", hr); hr = GetThemePartSize(htheme, NULL, BP_CHECKBOX, CBS_CHECKEDNORMAL, NULL, TS_DRAW, &size2); - ok(hr == S_OK, "GetThemePartSize failed, hr %#x.\n", hr); - ok(size2.cx == size.cx && size2.cy == size.cy, "Expected size %dx%d, got %dx%d.\n", + ok(hr == S_OK, "GetThemePartSize failed, hr %#lx.\n", hr); + ok(size2.cx == size.cx && size2.cy == size.cy, "Expected size %ldx%ld, got %ldx%ld.\n", size.cx, size.cy, size2.cx, size2.cy); ReleaseDC(hwnd, hdc);
@@ -1111,12 +1111,12 @@ static void test_GetThemePartSize(void)
hdc = GetDC(hwnd); hr = GetThemePartSize(htheme, hdc, BP_CHECKBOX, CBS_CHECKEDNORMAL, NULL, TS_DRAW, &size2); - ok(hr == S_OK, "GetThemePartSize failed, hr %#x.\n", hr); - ok(size2.cx == size.cx && size2.cy == size.cy, "Expected size %dx%d, got %dx%d.\n", size.cx, + ok(hr == S_OK, "GetThemePartSize failed, hr %#lx.\n", hr); + ok(size2.cx == size.cx && size2.cy == size.cy, "Expected size %ldx%ld, got %ldx%ld.\n", size.cx, size.cy, size2.cx, size2.cy); hr = GetThemePartSize(htheme, NULL, BP_CHECKBOX, CBS_CHECKEDNORMAL, NULL, TS_DRAW, &size2); - ok(hr == S_OK, "GetThemePartSize failed, hr %#x.\n", hr); - ok(size2.cx == size.cx && size2.cy == size.cy, "Expected size %dx%d, got %dx%d.\n", size.cx, + ok(hr == S_OK, "GetThemePartSize failed, hr %#lx.\n", hr); + ok(size2.cx == size.cx && size2.cy == size.cy, "Expected size %ldx%ld, got %ldx%ld.\n", size.cx, size.cy, size2.cx, size2.cy);
/* Test that theme part size changes after DPI is changed and theme handle is reopened. @@ -1126,12 +1126,12 @@ static void test_GetThemePartSize(void) htheme = OpenThemeData(hwnd, WC_BUTTONW);
hr = GetThemePartSize(htheme, hdc, BP_CHECKBOX, CBS_CHECKEDNORMAL, NULL, TS_DRAW, &size2); - ok(hr == S_OK, "GetThemePartSize failed, hr %#x.\n", hr); - ok(size2.cx != size.cx || size2.cy != size.cy, "Expected size not equal to %dx%d.\n", size.cx, + ok(hr == S_OK, "GetThemePartSize failed, hr %#lx.\n", hr); + ok(size2.cx != size.cx || size2.cy != size.cy, "Expected size not equal to %ldx%ld.\n", size.cx, size.cy); hr = GetThemePartSize(htheme, NULL, BP_CHECKBOX, CBS_CHECKEDNORMAL, NULL, TS_DRAW, &size2); - ok(hr == S_OK, "GetThemePartSize failed, hr %#x.\n", hr); - ok(size2.cx != size.cx || size2.cy != size.cy, "Expected size not equal to %dx%d.\n", size.cx, + ok(hr == S_OK, "GetThemePartSize failed, hr %#lx.\n", hr); + ok(size2.cx != size.cx || size2.cy != size.cy, "Expected size not equal to %ldx%ld.\n", size.cx, size.cy); ReleaseDC(hwnd, hdc);
@@ -1148,12 +1148,12 @@ static void test_GetThemePartSize(void)
hdc = GetDC(hwnd); hr = GetThemePartSize(htheme, hdc, BP_CHECKBOX, CBS_CHECKEDNORMAL, NULL, TS_DRAW, &size2); - ok(hr == S_OK, "GetThemePartSize failed, hr %#x.\n", hr); - ok(size2.cx == size.cx && size2.cy == size.cy, "Expected size %dx%d, got %dx%d.\n", size.cx, + ok(hr == S_OK, "GetThemePartSize failed, hr %#lx.\n", hr); + ok(size2.cx == size.cx && size2.cy == size.cy, "Expected size %ldx%ld, got %ldx%ld.\n", size.cx, size.cy, size2.cx, size2.cy); hr = GetThemePartSize(htheme, NULL, BP_CHECKBOX, CBS_CHECKEDNORMAL, NULL, TS_DRAW, &size2); - ok(hr == S_OK, "GetThemePartSize failed, hr %#x.\n", hr); - ok(size2.cx == size.cx && size2.cy == size.cy, "Expected size %dx%d, got %dx%d.\n", size.cx, + ok(hr == S_OK, "GetThemePartSize failed, hr %#lx.\n", hr); + ok(size2.cx == size.cx && size2.cy == size.cy, "Expected size %ldx%ld, got %ldx%ld.\n", size.cx, size.cy, size2.cx, size2.cy); ReleaseDC(hwnd, hdc);
@@ -1190,7 +1190,7 @@ static void test_EnableTheming(void) if (IsThemeActive()) { hr = EnableTheming(TRUE); - ok(hr == S_OK, "EnableTheming failed, hr %#x.\n", hr); + ok(hr == S_OK, "EnableTheming failed, hr %#lx.\n", hr); ok(IsThemeActive(), "Expected theming active.\n");
/* Only run in interactive mode because once theming is disabled, it can't be turned back on @@ -1215,15 +1215,15 @@ static void test_EnableTheming(void) memset(&old_ncm, 0, sizeof(old_ncm)); old_ncm.cbSize = FIELD_OFFSET(NONCLIENTMETRICSW, iPaddedBorderWidth); ret = SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, sizeof(old_ncm), &old_ncm, 0); - ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + ok(ret, "SystemParametersInfoW failed, error %lu.\n", GetLastError());
memset(&old_logfont, 0, sizeof(old_logfont)); ret = SystemParametersInfoW(SPI_GETICONTITLELOGFONT, sizeof(old_logfont), &old_logfont, 0); - ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + ok(ret, "SystemParametersInfoW failed, error %lu.\n", GetLastError()); ret = SystemParametersInfoW(SPI_GETFLATMENU, 0, &old_flat_menu, 0); - ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + ok(ret, "SystemParametersInfoW failed, error %lu.\n", GetLastError()); ret = SystemParametersInfoW(SPI_GETGRADIENTCAPTIONS, 0, &old_gradient_caption, 0); - ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + ok(ret, "SystemParametersInfoW failed, error %lu.\n", GetLastError());
/* Write new system metrics to the registry */ new_color = ~old_color; @@ -1236,30 +1236,30 @@ static void test_EnableTheming(void)
ls = RegOpenKeyExW(HKEY_CURRENT_USER, L"Control Panel\Colors", 0, KEY_ALL_ACCESS, &hkey); - ok(!ls, "RegOpenKeyExW failed, ls %#x.\n", ls); + ok(!ls, "RegOpenKeyExW failed, ls %#lx.\n", ls);
length = swprintf(new_color_string, ARRAY_SIZE(new_color_string), L"%d %d %d", GetRValue(new_color), GetGValue(new_color), GetBValue(new_color)); ls = RegSetValueExW(hkey, L"Scrollbar", 0, REG_SZ, (BYTE *)new_color_string, (length + 1) * sizeof(WCHAR)); - ok(!ls, "RegSetValueExW failed, ls %#x.\n", ls); + ok(!ls, "RegSetValueExW failed, ls %#lx.\n", ls);
ret = SystemParametersInfoW(SPI_SETNONCLIENTMETRICS, sizeof(new_ncm), &new_ncm, SPIF_UPDATEINIFILE); - ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + ok(ret, "SystemParametersInfoW failed, error %lu.\n", GetLastError()); ret = SystemParametersInfoW(SPI_SETICONTITLELOGFONT, sizeof(new_logfont), &new_logfont, SPIF_UPDATEINIFILE); - ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + ok(ret, "SystemParametersInfoW failed, error %lu.\n", GetLastError()); ret = SystemParametersInfoW(SPI_SETFLATMENU, 0, (void *)(INT_PTR)new_flat_menu, SPIF_UPDATEINIFILE); - ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + ok(ret, "SystemParametersInfoW failed, error %lu.\n", GetLastError()); ret = SystemParametersInfoW(SPI_SETGRADIENTCAPTIONS, 0, (void *)(INT_PTR)new_gradient_caption, SPIF_UPDATEINIFILE); - ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + ok(ret, "SystemParametersInfoW failed, error %lu.\n", GetLastError());
/* Change theming state */ hr = EnableTheming(FALSE); - ok(hr == S_OK, "EnableTheming failed, hr %#x.\n", hr); + ok(hr == S_OK, "EnableTheming failed, hr %#lx.\n", hr); is_theme_active = IsThemeActive(); ok(!is_theme_active || broken(is_theme_active), /* Win8+ can no longer disable theming */ "Expected theming inactive.\n"); @@ -1267,33 +1267,33 @@ static void test_EnableTheming(void) /* Test that system metrics are unchanged */ size = sizeof(color_string); ls = RegQueryValueExW(hkey, L"Scrollbar", NULL, NULL, (BYTE *)color_string, &size); - ok(!ls, "RegQueryValueExW failed, ls %#x.\n", ls); + ok(!ls, "RegQueryValueExW failed, ls %#lx.\n", ls); ok(!lstrcmpW(color_string, new_color_string), "Expected %s, got %s.\n", wine_dbgstr_w(new_color_string), wine_dbgstr_w(color_string));
ret = SystemParametersInfoW(SPI_GETFLATMENU, 0, &flat_menu, 0); - ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + ok(ret, "SystemParametersInfoW failed, error %lu.\n", GetLastError()); ok(flat_menu == new_flat_menu, "Expected %d, got %d.\n", new_flat_menu, flat_menu); ret = SystemParametersInfoW(SPI_GETGRADIENTCAPTIONS, 0, &gradient_caption, 0); - ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + ok(ret, "SystemParametersInfoW failed, error %lu.\n", GetLastError()); ok(gradient_caption == new_gradient_caption, "Expected %d, got %d.\n", new_gradient_caption, gradient_caption);
memset(&ncm, 0, sizeof(ncm)); ncm.cbSize = FIELD_OFFSET(NONCLIENTMETRICSW, iPaddedBorderWidth); ret = SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0); - ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + ok(ret, "SystemParametersInfoW failed, error %lu.\n", GetLastError()); ok(!memcmp(&ncm, &new_ncm, sizeof(ncm)), "Expected non-client metrics unchanged.\n");
memset(&logfont, 0, sizeof(logfont)); ret = SystemParametersInfoW(SPI_GETICONTITLELOGFONT, sizeof(logfont), &logfont, 0); - ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + ok(ret, "SystemParametersInfoW failed, error %lu.\n", GetLastError()); ok(!memcmp(&logfont, &new_logfont, sizeof(logfont)), "Expected icon title font unchanged.\n");
/* Test that theming cannot be turned on via EnableTheming() */ hr = EnableTheming(TRUE); - ok(hr == S_OK, "EnableTheming failed, hr %#x.\n", hr); + ok(hr == S_OK, "EnableTheming failed, hr %#lx.\n", hr); is_theme_active = IsThemeActive(); ok(!is_theme_active || broken(is_theme_active), /* Win8+ can no longer disable theming */ "Expected theming inactive.\n"); @@ -1301,19 +1301,19 @@ static void test_EnableTheming(void) /* Restore system metrics */ ls = RegSetValueExW(hkey, L"Scrollbar", 0, REG_SZ, (BYTE *)old_color_string, (lstrlenW(old_color_string) + 1) * sizeof(WCHAR)); - ok(!ls, "RegSetValueExW failed, ls %#x.\n", ls); + ok(!ls, "RegSetValueExW failed, ls %#lx.\n", ls); ret = SystemParametersInfoW(SPI_SETFLATMENU, 0, (void *)(INT_PTR)old_flat_menu, SPIF_UPDATEINIFILE); - ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + ok(ret, "SystemParametersInfoW failed, error %lu.\n", GetLastError()); ret = SystemParametersInfoW(SPI_SETGRADIENTCAPTIONS, 0, (void *)(INT_PTR)old_gradient_caption, SPIF_UPDATEINIFILE); - ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + ok(ret, "SystemParametersInfoW failed, error %lu.\n", GetLastError()); ret = SystemParametersInfoW(SPI_SETNONCLIENTMETRICS, sizeof(old_ncm), &old_ncm, SPIF_UPDATEINIFILE); - ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + ok(ret, "SystemParametersInfoW failed, error %lu.\n", GetLastError()); ret = SystemParametersInfoW(SPI_SETICONTITLELOGFONT, sizeof(old_logfont), &old_logfont, SPIF_UPDATEINIFILE); - ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + ok(ret, "SystemParametersInfoW failed, error %lu.\n", GetLastError());
RegCloseKey(hkey); if (pSetThreadDpiAwarenessContext) @@ -1323,15 +1323,15 @@ static void test_EnableTheming(void) else { hr = EnableTheming(FALSE); - ok(hr == S_OK, "EnableTheming failed, hr %#x.\n", hr); + ok(hr == S_OK, "EnableTheming failed, hr %#lx.\n", hr); ok(!IsThemeActive(), "Expected theming inactive.\n");
hr = EnableTheming(TRUE); - ok(hr == S_OK, "EnableTheming failed, hr %#x.\n", hr); + ok(hr == S_OK, "EnableTheming failed, hr %#lx.\n", hr); ok(!IsThemeActive(), "Expected theming inactive.\n");
hr = EnableTheming(FALSE); - ok(hr == S_OK, "EnableTheming failed, hr %#x.\n", hr); + ok(hr == S_OK, "EnableTheming failed, hr %#lx.\n", hr); ok(!IsThemeActive(), "Expected theming inactive.\n"); } } @@ -1362,9 +1362,9 @@ static void test_GetThemeIntList(void) /* TMT_TRANSITIONDURATIONS is a vista+ property */ hr = pGetThemeIntList(theme, BP_PUSHBUTTON, PBS_NORMAL, TMT_TRANSITIONDURATIONS, &intlist); if (LOBYTE(LOWORD(GetVersion())) < 6) - ok(hr == E_PROP_ID_UNSUPPORTED, "Expected %#x, got %#x.\n", E_PROP_ID_UNSUPPORTED, hr); + ok(hr == E_PROP_ID_UNSUPPORTED, "Expected %#lx, got %#lx.\n", E_PROP_ID_UNSUPPORTED, hr); else - ok(hr == S_OK, "GetThemeIntList failed, hr %#x.\n", hr); + ok(hr == S_OK, "GetThemeIntList failed, hr %#lx.\n", hr);
CloseThemeData(theme); DestroyWindow(hwnd); @@ -1398,8 +1398,8 @@ static void test_GetThemeTransitionDuration(void) duration = 0xdeadbeef; hr = pGetThemeTransitionDuration(NULL, BP_PUSHBUTTON, PBS_NORMAL, PBS_DEFAULTED_ANIMATING, TMT_TRANSITIONDURATIONS, &duration); - ok(hr == E_HANDLE, "GetThemeTransitionDuration failed, hr %#x.\n", hr); - ok(duration == 0xdeadbeef, "Expected duration %#x, got %#x.\n", 0xdeadbeef, duration); + ok(hr == E_HANDLE, "GetThemeTransitionDuration failed, hr %#lx.\n", hr); + ok(duration == 0xdeadbeef, "Expected duration %#x, got %#lx.\n", 0xdeadbeef, duration);
/* Crash on Wine. HTHEME is not a pointer that can be directly referenced. */ if (strcmp(winetest_platform, "wine")) @@ -1408,72 +1408,72 @@ static void test_GetThemeTransitionDuration(void) hr = pGetThemeTransitionDuration((HTHEME)0xdeadbeef, BP_PUSHBUTTON, PBS_NORMAL, PBS_DEFAULTED_ANIMATING, TMT_TRANSITIONDURATIONS, &duration); todo_wine - ok(hr == E_HANDLE, "GetThemeTransitionDuration failed, hr %#x.\n", hr); - ok(duration == 0xdeadbeef, "Expected duration %#x, got %#x.\n", 0xdeadbeef, duration); + ok(hr == E_HANDLE, "GetThemeTransitionDuration failed, hr %#lx.\n", hr); + ok(duration == 0xdeadbeef, "Expected duration %#x, got %#lx.\n", 0xdeadbeef, duration); }
duration = 0xdeadbeef; hr = pGetThemeTransitionDuration(theme, 0xdeadbeef, PBS_NORMAL, PBS_DEFAULTED_ANIMATING, TMT_TRANSITIONDURATIONS, &duration); - ok(hr == E_PROP_ID_UNSUPPORTED, "GetThemeTransitionDuration failed, hr %#x.\n", hr); - ok(duration == 0, "Expected duration %#x, got %#x.\n", 0, duration); + ok(hr == E_PROP_ID_UNSUPPORTED, "GetThemeTransitionDuration failed, hr %#lx.\n", hr); + ok(duration == 0, "Expected duration %#x, got %#lx.\n", 0, duration);
duration = 0xdeadbeef; hr = pGetThemeTransitionDuration(theme, BP_PUSHBUTTON, PBS_NORMAL - 1, PBS_DEFAULTED_ANIMATING, TMT_TRANSITIONDURATIONS, &duration); - ok(hr == E_INVALIDARG, "GetThemeTransitionDuration failed, hr %#x.\n", hr); - ok(duration == 0xdeadbeef, "Expected duration %#x, got %#x.\n", 0xdeadbeef, duration); + ok(hr == E_INVALIDARG, "GetThemeTransitionDuration failed, hr %#lx.\n", hr); + ok(duration == 0xdeadbeef, "Expected duration %#x, got %#lx.\n", 0xdeadbeef, duration);
duration = 0xdeadbeef; hr = pGetThemeTransitionDuration(theme, BP_PUSHBUTTON, PBS_DEFAULTED_ANIMATING + 1, PBS_DEFAULTED_ANIMATING, TMT_TRANSITIONDURATIONS, &duration); - ok(hr == E_INVALIDARG, "GetThemeTransitionDuration failed, hr %#x.\n", hr); - ok(duration == 0, "Expected duration %#x, got %#x.\n", 0, duration); + ok(hr == E_INVALIDARG, "GetThemeTransitionDuration failed, hr %#lx.\n", hr); + ok(duration == 0, "Expected duration %#x, got %#lx.\n", 0, duration);
duration = 0xdeadbeef; hr = pGetThemeTransitionDuration(theme, BP_PUSHBUTTON, PBS_NORMAL, PBS_NORMAL - 1, TMT_TRANSITIONDURATIONS, &duration); - ok(hr == E_INVALIDARG, "GetThemeTransitionDuration failed, hr %#x.\n", hr); - ok(duration == 0xdeadbeef, "Expected duration %#x, got %#x.\n", 0xdeadbeef, duration); + ok(hr == E_INVALIDARG, "GetThemeTransitionDuration failed, hr %#lx.\n", hr); + ok(duration == 0xdeadbeef, "Expected duration %#x, got %#lx.\n", 0xdeadbeef, duration);
duration = 0xdeadbeef; hr = pGetThemeTransitionDuration(theme, BP_PUSHBUTTON, PBS_NORMAL, PBS_DEFAULTED_ANIMATING + 1, TMT_TRANSITIONDURATIONS, &duration); - ok(hr == E_INVALIDARG, "GetThemeTransitionDuration failed, hr %#x.\n", hr); - ok(duration == 0, "Expected duration %#x, got %#x.\n", 0, duration); + ok(hr == E_INVALIDARG, "GetThemeTransitionDuration failed, hr %#lx.\n", hr); + ok(duration == 0, "Expected duration %#x, got %#lx.\n", 0, duration);
duration = 0xdeadbeef; hr = pGetThemeTransitionDuration(theme, BP_PUSHBUTTON, PBS_NORMAL, PBS_DEFAULTED_ANIMATING, TMT_BACKGROUND, &duration); - ok(hr == E_PROP_ID_UNSUPPORTED, "GetThemeTransitionDuration failed, hr %#x.\n", hr); - ok(duration == 0, "Expected duration %#x, got %#x.\n", 0, duration); + ok(hr == E_PROP_ID_UNSUPPORTED, "GetThemeTransitionDuration failed, hr %#lx.\n", hr); + ok(duration == 0, "Expected duration %#x, got %#lx.\n", 0, duration);
duration = 0xdeadbeef; hr = pGetThemeTransitionDuration(theme, BP_PUSHBUTTON, PBS_NORMAL, PBS_DEFAULTED_ANIMATING, 0xdeadbeef, &duration); - ok(hr == E_PROP_ID_UNSUPPORTED, "GetThemeTransitionDuration failed, hr %#x.\n", hr); - ok(duration == 0, "Expected duration %#x, got %#x.\n", 0, duration); + ok(hr == E_PROP_ID_UNSUPPORTED, "GetThemeTransitionDuration failed, hr %#lx.\n", hr); + ok(duration == 0, "Expected duration %#x, got %#lx.\n", 0, duration);
hr = pGetThemeTransitionDuration(theme, BP_PUSHBUTTON, PBS_NORMAL, PBS_DEFAULTED_ANIMATING, TMT_TRANSITIONDURATIONS, NULL); - ok(hr == E_INVALIDARG, "GetThemeTransitionDuration failed, hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "GetThemeTransitionDuration failed, hr %#lx.\n", hr);
/* Parts that don't have TMT_TRANSITIONDURATIONS */ hr = GetThemeIntList(theme, BP_GROUPBOX, GBS_NORMAL, TMT_TRANSITIONDURATIONS, &intlist); - ok(hr == E_PROP_ID_UNSUPPORTED, "GetThemeIntList failed, hr %#x.\n", hr); + ok(hr == E_PROP_ID_UNSUPPORTED, "GetThemeIntList failed, hr %#lx.\n", hr);
duration = 0xdeadbeef; hr = pGetThemeTransitionDuration(theme, BP_GROUPBOX, GBS_NORMAL, GBS_DISABLED, TMT_TRANSITIONDURATIONS, &duration); - ok(hr == E_PROP_ID_UNSUPPORTED, "GetThemeTransitionDuration failed, hr %#x.\n", hr); - ok(duration == 0, "Expected duration %#x, got %#x.\n", 0, duration); + ok(hr == E_PROP_ID_UNSUPPORTED, "GetThemeTransitionDuration failed, hr %#lx.\n", hr); + ok(duration == 0, "Expected duration %#x, got %#lx.\n", 0, duration);
/* Test parsing TMT_TRANSITIONDURATIONS property. TMT_TRANSITIONDURATIONS is a vista+ property */ if (LOBYTE(LOWORD(GetVersion())) < 6) goto done;
hr = pGetThemeIntList(theme, BP_PUSHBUTTON, PBS_NORMAL, TMT_TRANSITIONDURATIONS, &intlist); - ok(hr == S_OK, "GetThemeIntList failed, hr %#x.\n", hr); + ok(hr == S_OK, "GetThemeIntList failed, hr %#lx.\n", hr); /* The first value is the theme part state count. The following are the values from every state * to every state. So the total value count should be 1 + state ^ 2 */ expected = PBS_DEFAULTED_ANIMATING - PBS_NORMAL + 1; @@ -1493,9 +1493,9 @@ static void test_GetThemeTransitionDuration(void) duration = 0xdeadbeef; hr = pGetThemeTransitionDuration(theme, BP_PUSHBUTTON, from_state, to_state, TMT_TRANSITIONDURATIONS, &duration); - ok(hr == S_OK, "GetThemeTransitionDuration failed, hr %#x.\n", hr); + ok(hr == S_OK, "GetThemeTransitionDuration failed, hr %#lx.\n", hr); expected = intlist.iValues[1 + intlist.iValues[0] * (from_state - 1) + (to_state - 1)]; - ok(duration == expected, "Expected duration %d, got %d.\n", expected, duration); + ok(duration == expected, "Expected duration %d, got %ld.\n", expected, duration);
winetest_pop_context(); } @@ -1529,7 +1529,7 @@ static LRESULT WINAPI test_DrawThemeParentBackground_proc(HWND hwnd, UINT messag case WM_ERASEBKGND: case WM_PRINTCLIENT: ret = GetBrushOrgEx((HDC)wp, &org); - ok(ret, "GetBrushOrgEx failed, error %d.\n", GetLastError()); + ok(ret, "GetBrushOrgEx failed, error %ld.\n", GetLastError()); ok(org.x == 0 && org.y == 0, "Expected (0,0), got %s.\n", wine_dbgstr_point(&org)); break;
@@ -1571,27 +1571,27 @@ static void test_DrawThemeParentBackground(void)
parent = CreateWindowA("TestDrawThemeParentBackgroundClass", "parent", WS_POPUP | WS_VISIBLE, 0, 0, 100, 100, 0, 0, 0, 0); - ok(parent != NULL, "CreateWindowA failed, error %d.\n", GetLastError()); + ok(parent != NULL, "CreateWindowA failed, error %ld.\n", GetLastError()); child = CreateWindowA(WC_STATICA, "child", WS_CHILD | WS_VISIBLE, 1, 2, 50, 50, parent, 0, 0, NULL); - ok(child != NULL, "CreateWindowA failed, error %d.\n", GetLastError()); + ok(child != NULL, "CreateWindowA failed, error %ld.\n", GetLastError()); flush_events(); flush_sequences(sequences, NUM_MSG_SEQUENCES);
hdc = GetDC(child); ret = GetBrushOrgEx(hdc, &org); - ok(ret, "GetBrushOrgEx failed, error %d.\n", GetLastError()); + ok(ret, "GetBrushOrgEx failed, error %ld.\n", GetLastError()); ok(org.x == 0 && org.y == 0, "Expected (0,0), got %s.\n", wine_dbgstr_point(&org));
hr = DrawThemeParentBackground(child, hdc, NULL); - ok(SUCCEEDED(hr), "DrawThemeParentBackground failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "DrawThemeParentBackground failed, hr %#lx.\n", hr); ok_sequence(sequences, PARENT_SEQ_INDEX, DrawThemeParentBackground_seq, "DrawThemeParentBackground parent", FALSE); flush_sequences(sequences, NUM_MSG_SEQUENCES);
GetClientRect(child, &rect); hr = DrawThemeParentBackground(child, hdc, &rect); - ok(SUCCEEDED(hr), "DrawThemeParentBackground failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "DrawThemeParentBackground failed, hr %#lx.\n", hr); ok_sequence(sequences, PARENT_SEQ_INDEX, DrawThemeParentBackground_seq, "DrawThemeParentBackground parent", FALSE); flush_sequences(sequences, NUM_MSG_SEQUENCES); @@ -1634,7 +1634,7 @@ static INT_PTR CALLBACK test_EnableThemeDialogTexture_proc(HWND hwnd, UINT msg, dialog_child = CreateWindowA(param->class_name, "child", param->style | WS_CHILD | WS_VISIBLE, 1, 2, 50, 50, hwnd, (HMENU)100, 0, NULL); - ok(dialog_child != NULL, "CreateWindowA failed, error %d.\n", GetLastError()); + ok(dialog_child != NULL, "CreateWindowA failed, error %ld.\n", GetLastError()); if (dialog_init_flag) EnableThemeDialogTexture(hwnd, dialog_init_flag); return TRUE; @@ -1788,14 +1788,14 @@ static void test_EnableThemeDialogTexture(void) param.style = 0; dialog = CreateDialogIndirectParamA(NULL, &temp.template, GetDesktopWindow(), test_EnableThemeDialogTexture_proc, (LPARAM)¶m); - ok(dialog != NULL, "CreateDialogIndirectParamA failed, error %d.\n", GetLastError()); + ok(dialog != NULL, "CreateDialogIndirectParamA failed, error %ld.\n", GetLastError()); child = GetDlgItem(dialog, 100); - ok(child != NULL, "Failed to get child control, error %d.\n", GetLastError()); + ok(child != NULL, "Failed to get child control, error %ld.\n", GetLastError()); child_hdc = GetDC(child);
/* Test that dialog procedure is unchanged */ proc = GetWindowLongPtrA(dialog, DWLP_DLGPROC); - ok(proc == (ULONG_PTR)test_EnableThemeDialogTexture_proc, "Unexpected proc %#lx.\n", proc); + ok(proc == (ULONG_PTR)test_EnableThemeDialogTexture_proc, "Unexpected proc %#Ix.\n", proc);
/* Test dialog texture is disabled by default. EnableThemeDialogTexture() needs to be called */ ret = IsThemeDialogTextureEnabled(dialog); @@ -1804,7 +1804,7 @@ static void test_EnableThemeDialogTexture(void)
/* Test ETDT_ENABLE | ETDT_USETABTEXTURE doesn't take effect immediately */ hr = EnableThemeDialogTexture(dialog, ETDT_ENABLE | ETDT_USETABTEXTURE); - ok(hr == S_OK, "EnableThemeDialogTexture failed, hr %#x.\n", hr); + ok(hr == S_OK, "EnableThemeDialogTexture failed, hr %#lx.\n", hr); ret = IsThemeDialogTextureEnabled(dialog); ok(ret, "Expected theme dialog texture enabled.\n");
@@ -1812,7 +1812,7 @@ static void test_EnableThemeDialogTexture(void) ok(brush == GetSysColorBrush(COLOR_BTNFACE), "Expected brush %p, got %p.\n", GetSysColorBrush(COLOR_BTNFACE), brush); ret = GetBrushOrgEx(child_hdc, &org); - ok(ret, "GetBrushOrgEx failed, error %u.\n", GetLastError()); + ok(ret, "GetBrushOrgEx failed, error %lu.\n", GetLastError()); ok(org.x == 0 && org.y == 0, "Expected (0,0), got %s.\n", wine_dbgstr_point(&org));
/* Test WM_THEMECHANGED doesn't make ETDT_ENABLE | ETDT_USETABTEXTURE take effect */ @@ -1831,7 +1831,7 @@ static void test_EnableThemeDialogTexture(void) /* Test disabling theme dialog texture should change the brush immediately */ brush = (HBRUSH)SendMessageW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child); hr = EnableThemeDialogTexture(dialog, ETDT_DISABLE); - ok(hr == S_OK, "EnableThemeDialogTexture failed, hr %#x.\n", hr); + ok(hr == S_OK, "EnableThemeDialogTexture failed, hr %#lx.\n", hr); brush2 = (HBRUSH)SendMessageW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child); ok(brush2 != brush, "Expected a different brush.\n"); ok(brush2 == GetSysColorBrush(COLOR_BTNFACE), "Expected brush %p, got %p.\n", @@ -1840,7 +1840,7 @@ static void test_EnableThemeDialogTexture(void) /* Test re-enabling theme dialog texture with ETDT_ENABLE doesn't change the brush */ brush = (HBRUSH)SendMessageW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child); hr = EnableThemeDialogTexture(dialog, ETDT_ENABLE); - ok(hr == S_OK, "EnableThemeDialogTexture failed, hr %#x.\n", hr); + ok(hr == S_OK, "EnableThemeDialogTexture failed, hr %#lx.\n", hr); brush2 = (HBRUSH)SendMessageW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child); ok(brush2 == brush, "Expected the same brush.\n"); ok(brush2 == GetSysColorBrush(COLOR_BTNFACE), "Expected brush %p, got %p.\n", @@ -1849,14 +1849,14 @@ static void test_EnableThemeDialogTexture(void) /* Test adding ETDT_USETABTEXTURE should change the brush immediately */ brush = (HBRUSH)SendMessageW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child); hr = EnableThemeDialogTexture(dialog, ETDT_USETABTEXTURE); - ok(hr == S_OK, "EnableThemeDialogTexture failed, hr %#x.\n", hr); + ok(hr == S_OK, "EnableThemeDialogTexture failed, hr %#lx.\n", hr); brush2 = (HBRUSH)SendMessageW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child); ok(brush2 != brush, "Expected a different brush.\n");
/* Test ETDT_ENABLE | ETDT_USEAEROWIZARDTABTEXTURE should change the brush immediately */ brush = (HBRUSH)SendMessageW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child); hr = EnableThemeDialogTexture(dialog, ETDT_ENABLE | ETDT_USEAEROWIZARDTABTEXTURE); - ok(hr == S_OK, "EnableThemeDialogTexture failed, hr %#x.\n", hr); + ok(hr == S_OK, "EnableThemeDialogTexture failed, hr %#lx.\n", hr); brush2 = (HBRUSH)SendMessageW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child); /* ETDT_USEAEROWIZARDTABTEXTURE is supported only on Vista+ */ if (LOBYTE(LOWORD(GetVersion())) < 6) @@ -1865,9 +1865,9 @@ static void test_EnableThemeDialogTexture(void) ok(brush2 != brush, "Expected a different brush.\n");
hr = EnableThemeDialogTexture(dialog, ETDT_DISABLE); - ok(hr == S_OK, "EnableThemeDialogTexture failed, hr %#x.\n", hr); + ok(hr == S_OK, "EnableThemeDialogTexture failed, hr %#lx.\n", hr); hr = EnableThemeDialogTexture(dialog, ETDT_ENABLE | ETDT_USETABTEXTURE); - ok(hr == S_OK, "EnableThemeDialogTexture failed, hr %#x.\n", hr); + ok(hr == S_OK, "EnableThemeDialogTexture failed, hr %#lx.\n", hr);
/* Test that the dialog procedure should take precedence over DefDlgProc() for WM_CTLCOLORSTATIC */ handle_WM_CTLCOLORSTATIC = TRUE; @@ -1884,7 +1884,7 @@ static void test_EnableThemeDialogTexture(void) size.cx = 0; size.cy = 0; hr = GetThemePartSize(theme, NULL, TABP_BODY, 0, NULL, TS_TRUE, &size); - ok(hr == S_OK, "GetThemePartSize failed, hr %#x.\n", hr); + ok(hr == S_OK, "GetThemePartSize failed, hr %#lx.\n", hr); CloseThemeData(theme);
/* Test which WM_CTLCOLOR* message uses tab background as dialog texture */ @@ -1894,10 +1894,10 @@ static void test_EnableThemeDialogTexture(void)
/* Test that some WM_CTLCOLOR* messages change brush origin when dialog texture is on */ ret = SetBrushOrgEx(child_hdc, 0, 0, NULL); - ok(ret, "SetBrushOrgEx failed, error %u.\n", GetLastError()); + ok(ret, "SetBrushOrgEx failed, error %lu.\n", GetLastError()); SendMessageW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child); ret = GetBrushOrgEx(child_hdc, &org); - ok(ret, "GetBrushOrgEx failed, error %u.\n", GetLastError()); + ok(ret, "GetBrushOrgEx failed, error %lu.\n", GetLastError()); /* WM_CTLCOLOREDIT, WM_CTLCOLORLISTBOX and WM_CTLCOLORSCROLLBAR don't use tab background */ if (msg == WM_CTLCOLOREDIT || msg == WM_CTLCOLORLISTBOX || msg == WM_CTLCOLORSCROLLBAR) { @@ -1922,23 +1922,23 @@ static void test_EnableThemeDialogTexture(void) ok(old_color != CLR_INVALID, "SetBkColor failed.\n"); SendMessageW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child); color = SetBkColor(child_hdc, old_color); - ok(color == GetSysColor(COLOR_BTNFACE), "Expected background color %#x, got %#x.\n", + ok(color == GetSysColor(COLOR_BTNFACE), "Expected background color %#lx, got %#lx.\n", GetSysColor(COLOR_BTNFACE), color);
/* Test that the returned brush is a pattern brush created from the tab body */ brush = (HBRUSH)SendMessageW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child); memset(&log_brush, 0, sizeof(log_brush)); count = GetObjectA(brush, sizeof(log_brush), &log_brush); - ok(count == sizeof(log_brush), "GetObjectA failed, error %u.\n", GetLastError()); - ok(log_brush.lbColor == 0, "Expected brush color %#x, got %#x.\n", 0, log_brush.lbColor); + ok(count == sizeof(log_brush), "GetObjectA failed, error %lu.\n", GetLastError()); + ok(log_brush.lbColor == 0, "Expected brush color %#x, got %#lx.\n", 0, log_brush.lbColor); ok(log_brush.lbStyle == BS_PATTERN, "Expected brush style %#x, got %#x.\n", BS_PATTERN, log_brush.lbStyle);
memset(&bmp, 0, sizeof(bmp)); count = GetObjectA((HBITMAP)log_brush.lbHatch, sizeof(bmp), &bmp); - ok(count == sizeof(bmp), "GetObjectA failed, error %u.\n", GetLastError()); - ok(bmp.bmWidth == size.cx, "Expected width %d, got %d.\n", size.cx, bmp.bmWidth); - ok(bmp.bmHeight == size.cy, "Expected height %d, got %d.\n", size.cy, bmp.bmHeight); + ok(count == sizeof(bmp), "GetObjectA failed, error %lu.\n", GetLastError()); + ok(bmp.bmWidth == size.cx, "Expected width %ld, got %d.\n", size.cx, bmp.bmWidth); + ok(bmp.bmHeight == size.cy, "Expected height %ld, got %d.\n", size.cy, bmp.bmHeight);
/* Test that DefDlgProcA/W() are hooked for some WM_CTLCOLOR* messages */ brush = (HBRUSH)SendMessageW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child); @@ -1984,11 +1984,11 @@ static void test_EnableThemeDialogTexture(void) * WM_CTLCOLORSTATIC */ hwnd = CreateWindowA(cls.lpszClassName, "parent", WS_POPUP | WS_VISIBLE, 0, 0, 100, 100, 0, 0, 0, NULL); - ok(hwnd != NULL, "CreateWindowA failed, error %d.\n", GetLastError()); + ok(hwnd != NULL, "CreateWindowA failed, error %ld.\n", GetLastError()); hwnd2 = CreateWindowA(WC_STATICA, "child", WS_CHILD | WS_VISIBLE, 10, 10, 20, 20, hwnd, NULL, 0, NULL); hr = EnableThemeDialogTexture(hwnd, ETDT_ENABLETAB); - ok(hr == S_OK, "EnableThemeDialogTexture failed, hr %#x.\n", hr); + ok(hr == S_OK, "EnableThemeDialogTexture failed, hr %#lx.\n", hr); ret = IsThemeDialogTextureEnabled(hwnd); ok(ret, "Wrong dialog texture status.\n"); flush_events(); @@ -1996,13 +1996,13 @@ static void test_EnableThemeDialogTexture(void) hdc = GetDC(hwnd); color = GetPixel(hdc, 0, 0); ok(color == 0x808080 || broken(color == 0xffffffff), /* Win 7 may report 0xffffffff */ - "Expected color %#x, got %#x.\n", 0x808080, color); + "Expected color %#x, got %#lx.\n", 0x808080, color); color = GetPixel(hdc, 50, 50); ok(color == 0x808080 || broken(color == 0xffffffff), /* Win 7 may report 0xffffffff */ - "Expected color %#x, got %#x.\n", 0x808080, color); + "Expected color %#x, got %#lx.\n", 0x808080, color); color = GetPixel(hdc, 99, 99); ok(color == 0x808080 || broken(color == 0xffffffff), /* Win 7 may report 0xffffffff */ - "Expected color %#x, got %#x.\n", 0x808080, color); + "Expected color %#x, got %#lx.\n", 0x808080, color); ReleaseDC(hwnd, hdc);
/* Test EnableThemeDialogTexture() doesn't work for non-dialog windows */ @@ -2016,14 +2016,14 @@ static void test_EnableThemeDialogTexture(void) /* Test that the brush is not a system object and has only one reference and shouldn't be freed */ brush = (HBRUSH)SendMessageW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child); ret = DeleteObject(brush); - ok(ret, "DeleteObject failed, error %u.\n", GetLastError()); + ok(ret, "DeleteObject failed, error %lu.\n", GetLastError()); SetLastError(0xdeadbeef); ret = GetObjectA(brush, sizeof(log_brush), &log_brush); error = GetLastError(); ok(!ret || broken(ret) /* XP */, "GetObjectA succeeded.\n"); todo_wine ok(error == ERROR_INVALID_PARAMETER || broken(error == 0xdeadbeef) /* XP */, - "Expected error %u, got %u.\n", ERROR_INVALID_PARAMETER, error); + "Expected error %u, got %lu.\n", ERROR_INVALID_PARAMETER, error); ret = DeleteObject(brush); ok(!ret || broken(ret) /* XP */, "DeleteObject succeeded.\n");
@@ -2046,13 +2046,13 @@ static void test_EnableThemeDialogTexture(void) /* Test invalid flags */ for (i = 0; i < ARRAY_SIZE(invalid_flag_tests); ++i) { - winetest_push_context("%d flag %#x", i, invalid_flag_tests[i].flag); + winetest_push_context("%d flag %#lx", i, invalid_flag_tests[i].flag);
dialog = CreateDialogIndirectParamA(NULL, &temp.template, GetDesktopWindow(), test_EnableThemeDialogTexture_proc, (LPARAM)¶m); - ok(dialog != NULL, "CreateDialogIndirectParamA failed, error %d.\n", GetLastError()); + ok(dialog != NULL, "CreateDialogIndirectParamA failed, error %ld.\n", GetLastError()); hr = EnableThemeDialogTexture(dialog, invalid_flag_tests[i].flag); - ok(hr == S_OK, "EnableThemeDialogTexture failed, hr %#x.\n", hr); + ok(hr == S_OK, "EnableThemeDialogTexture failed, hr %#lx.\n", hr); ret = IsThemeDialogTextureEnabled(dialog); ok(ret == invalid_flag_tests[i].enabled, "Wrong dialog texture status.\n"); EndDialog(dialog, 0); @@ -2070,16 +2070,16 @@ static void test_EnableThemeDialogTexture(void) && ((flags[i] | flags[j]) & ETDT_USEAEROWIZARDTABTEXTURE)) continue;
- winetest_push_context("%#x to %#x", flags[i], flags[j]); + winetest_push_context("%#lx to %#lx", flags[i], flags[j]);
dialog = CreateDialogIndirectParamA(NULL, &temp.template, GetDesktopWindow(), test_EnableThemeDialogTexture_proc, (LPARAM)¶m); - ok(dialog != NULL, "CreateDialogIndirectParamA failed, error %d.\n", GetLastError()); + ok(dialog != NULL, "CreateDialogIndirectParamA failed, error %ld.\n", GetLastError()); flush_events(); flush_sequences(sequences, NUM_MSG_SEQUENCES);
hr = EnableThemeDialogTexture(dialog, flags[i]); - ok(hr == S_OK, "EnableThemeDialogTexture failed, hr %#x.\n", hr); + ok(hr == S_OK, "EnableThemeDialogTexture failed, hr %#lx.\n", hr); ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, "EnableThemeDialogTexture first flag", FALSE); ret = IsThemeDialogTextureEnabled(dialog); @@ -2087,7 +2087,7 @@ static void test_EnableThemeDialogTexture(void) ok(ret == (!(flags[i] & ETDT_DISABLE) && flags[i]), "Wrong dialog texture status.\n");
child = GetDlgItem(dialog, 100); - ok(child != NULL, "Failed to get child control, error %d.\n", GetLastError()); + ok(child != NULL, "Failed to get child control, error %ld.\n", GetLastError()); child_hdc = GetDC(child); lr = SendMessageA(dialog, WM_ERASEBKGND, (WPARAM)child_hdc, 0); ok(lr != 0, "WM_ERASEBKGND failed.\n"); @@ -2099,7 +2099,7 @@ static void test_EnableThemeDialogTexture(void) flush_sequences(sequences, NUM_MSG_SEQUENCES);
hr = EnableThemeDialogTexture(dialog, flags[j]); - ok(hr == S_OK, "EnableThemeDialogTexture failed, hr %#x.\n", hr); + ok(hr == S_OK, "EnableThemeDialogTexture failed, hr %#lx.\n", hr); ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, "EnableThemeDialogTexture second flag", FALSE); ret = IsThemeDialogTextureEnabled(dialog); @@ -2134,16 +2134,16 @@ static void test_EnableThemeDialogTexture(void) * find out which comctl32 class should set ETDT_ENABLE to turn on dialog texture */ for (i = 0; i < ARRAY_SIZE(class_tests); ++i) { - winetest_push_context("%s %#x", wine_dbgstr_a(class_tests[i].param.class_name), + winetest_push_context("%s %#lx", wine_dbgstr_a(class_tests[i].param.class_name), class_tests[i].param.style);
dialog = CreateDialogIndirectParamA(NULL, &temp.template, GetDesktopWindow(), test_EnableThemeDialogTexture_proc, (LPARAM)&class_tests[i].param); - ok(dialog != NULL, "CreateDialogIndirectParamA failed, error %d.\n", GetLastError()); + ok(dialog != NULL, "CreateDialogIndirectParamA failed, error %ld.\n", GetLastError()); /* GetDlgItem() fails to get the child control if the child is a tooltip */ child = dialog_child; - ok(child != NULL, "Failed to get child control, error %d.\n", GetLastError()); + ok(child != NULL, "Failed to get child control, error %ld.\n", GetLastError()); child_hdc = GetDC(child);
brush = (HBRUSH)SendMessageW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child); @@ -2156,9 +2156,9 @@ static void test_EnableThemeDialogTexture(void) dialog = CreateDialogIndirectParamA(NULL, &temp.template, GetDesktopWindow(), test_EnableThemeDialogTexture_proc, (LPARAM)&class_tests[i].param); - ok(dialog != NULL, "CreateDialogIndirectParamA failed, error %d.\n", GetLastError()); + ok(dialog != NULL, "CreateDialogIndirectParamA failed, error %ld.\n", GetLastError()); child = dialog_child; - ok(child != NULL, "Failed to get child control, error %d.\n", GetLastError()); + ok(child != NULL, "Failed to get child control, error %ld.\n", GetLastError()); child_hdc = GetDC(child);
brush = (HBRUSH)SendMessageW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child); @@ -2171,9 +2171,9 @@ static void test_EnableThemeDialogTexture(void) dialog = CreateDialogIndirectParamA(NULL, &temp.template, GetDesktopWindow(), test_EnableThemeDialogTexture_proc, (LPARAM)&class_tests[i].param); - ok(dialog != NULL, "CreateDialogIndirectParamA failed, error %d.\n", GetLastError()); + ok(dialog != NULL, "CreateDialogIndirectParamA failed, error %ld.\n", GetLastError()); child = dialog_child; - ok(child != NULL, "Failed to get child control, error %d.\n", GetLastError()); + ok(child != NULL, "Failed to get child control, error %ld.\n", GetLastError()); child_hdc = GetDC(child); brush = (HBRUSH)SendMessageW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child); if (class_tests[i].texture_enabled) @@ -2194,9 +2194,9 @@ static void test_EnableThemeDialogTexture(void) dialog = CreateDialogIndirectParamA(NULL, &temp.template, GetDesktopWindow(), test_EnableThemeDialogTexture_proc, (LPARAM)&class_tests[i].param); - ok(dialog != NULL, "CreateDialogIndirectParamA failed, error %d.\n", GetLastError()); + ok(dialog != NULL, "CreateDialogIndirectParamA failed, error %ld.\n", GetLastError()); child = dialog_child; - ok(child != NULL, "Failed to get child control, error %d.\n", GetLastError()); + ok(child != NULL, "Failed to get child control, error %ld.\n", GetLastError()); child_hdc = GetDC(child); brush = (HBRUSH)SendMessageW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child); if (class_tests[i].texture_enabled) @@ -2213,12 +2213,12 @@ static void test_EnableThemeDialogTexture(void) /* Test that EnableThemeDialogTexture() is called from child controls for its parent */ hwnd = CreateWindowA(cls.lpszClassName, "parent", WS_POPUP | WS_VISIBLE, 100, 100, 200, 200, 0, 0, 0, NULL); - ok(hwnd != NULL, "CreateWindowA failed, error %d.\n", GetLastError()); + ok(hwnd != NULL, "CreateWindowA failed, error %ld.\n", GetLastError()); ret = IsThemeDialogTextureEnabled(hwnd); ok(!ret, "Wrong dialog texture status.\n"); child = CreateWindowA(WC_STATICA, "child", WS_CHILD | WS_VISIBLE, 0, 0, 50, 50, hwnd, 0, 0, NULL); - ok(child != NULL, "CreateWindowA failed, error %d.\n", GetLastError()); + ok(child != NULL, "CreateWindowA failed, error %ld.\n", GetLastError()); ret = IsThemeDialogTextureEnabled(hwnd); ok(ret, "Wrong dialog texture status.\n");
@@ -2226,7 +2226,7 @@ static void test_EnableThemeDialogTexture(void) * the new parent */ hwnd2 = CreateWindowA(cls.lpszClassName, "parent", WS_POPUP | WS_VISIBLE, 100, 100, 200, 200, 0, 0, 0, NULL); - ok(hwnd2 != NULL, "CreateWindowA failed, error %d.\n", GetLastError()); + ok(hwnd2 != NULL, "CreateWindowA failed, error %ld.\n", GetLastError()); ret = IsThemeDialogTextureEnabled(hwnd2); ok(!ret, "Wrong dialog texture status.\n");
diff --git a/dlls/uxtheme/tests/v6util.h b/dlls/uxtheme/tests/v6util.h index 626f6e61255..fc32616d777 100644 --- a/dlls/uxtheme/tests/v6util.h +++ b/dlls/uxtheme/tests/v6util.h @@ -107,7 +107,7 @@ static BOOL load_v6_module(ULONG_PTR *pcookie, HANDLE *hCtx) hmod = GetModuleHandleA("comctl32.dll");
ret = ActivateActCtx(*hCtx, pcookie); - ok(ret, "Failed to activate context, error %d.\n", GetLastError()); + ok(ret, "Failed to activate context, error %ld.\n", GetLastError());
if (!ret) { @@ -118,7 +118,7 @@ static BOOL load_v6_module(ULONG_PTR *pcookie, HANDLE *hCtx) data.cbSize = sizeof(data); ret = FindActCtxSectionStringA(0, NULL, ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, "comctl32.dll", &data); - ok(ret, "failed to find comctl32.dll in active context, %u\n", GetLastError()); + ok(ret, "failed to find comctl32.dll in active context, %lu\n", GetLastError()); if (ret) { FreeLibrary(hmod);
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/user32/tests/dde.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/tests/dde.c b/dlls/user32/tests/dde.c index c7d3a99b228..e2e27480645 100644 --- a/dlls/user32/tests/dde.c +++ b/dlls/user32/tests/dde.c @@ -816,6 +816,7 @@ static void test_ddeml_server(void) HANDLE client; MSG msg; UINT res; + DWORD exit_code; BOOL ret; HSZ server; HDDEDATA hdata; @@ -839,8 +840,8 @@ static void test_ddeml_server(void) } ret = DdeUninitialize(server_pid); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - GetExitCodeProcess(client, &res); - ok( !res, "client failed with %u error(s)\n", res ); + GetExitCodeProcess(client, &exit_code); + ok( !res, "client failed with %u error(s)\n", exit_code ); CloseHandle(client); }
this lets the compiler do the int => long conversions
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/user32/tests/edit.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/tests/edit.c b/dlls/user32/tests/edit.c index 6edec12e03b..777c50be337 100644 --- a/dlls/user32/tests/edit.c +++ b/dlls/user32/tests/edit.c @@ -2018,8 +2018,11 @@ static void test_margins_font_change(void)
}
-#define edit_pos_ok(exp, got, txt) \ - ok(exp == got, "wrong " #txt " expected %d got %d\n", exp, got); +#define edit_pos_ok(exp, got, txt) edit_pos_ok_(__LINE__, exp, got, #txt) +static inline void edit_pos_ok_(unsigned line, DWORD exp, DWORD got, const char* txt) +{ + ok_(__FILE__, line)(exp == got, "wrong %s expected %ld got %ld\n", txt, exp, got); +}
#define check_pos(hwEdit, set_height, test_top, test_height, test_left) \ do { \
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/user32/tests/broadcast.c | 61 +++-- dlls/user32/tests/class.c | 85 ++++--- dlls/user32/tests/clipboard.c | 401 +++++++++++++++++---------------- dlls/user32/tests/combo.c | 59 +++-- dlls/user32/tests/cursoricon.c | 301 +++++++++++++------------ dlls/user32/tests/dce.c | 25 +- dlls/user32/tests/dde.c | 479 ++++++++++++++++++++-------------------- dlls/user32/tests/dialog.c | 109 +++++---- dlls/user32/tests/edit.c | 201 ++++++++--------- dlls/user32/tests/generated.c | 1 dlls/user32/tests/input.c | 445 +++++++++++++++++++------------------ 11 files changed, 1089 insertions(+), 1078 deletions(-)
diff --git a/dlls/user32/tests/broadcast.c b/dlls/user32/tests/broadcast.c index f80d455cba3..86f7ec2f26b 100644 --- a/dlls/user32/tests/broadcast.c +++ b/dlls/user32/tests/broadcast.c @@ -1,3 +1,4 @@ +#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* * Unit tests for BroadcastSystemMessage * @@ -37,13 +38,13 @@ static LRESULT WINAPI main_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR { if (msg == WM_NULL) { - trace("main_window_procA: Sleeping for %lu ms\n", wparam); + trace("main_window_procA: Sleeping for %Iu ms\n", wparam); if (wparam) { if (WaitForSingleObject(hevent, wparam) == WAIT_TIMEOUT) SetEvent(hevent); } - trace("main_window_procA: Returning WM_NULL with parameter %08lx\n", lparam); + trace("main_window_procA: Returning WM_NULL with parameter %08Ix\n", lparam); return lparam; }
@@ -90,52 +91,52 @@ static void test_parameters(PBROADCAST broadcast, const char *functionname) win_skip("%s is not implemented\n", functionname); return; } - ok(!ret || broken(ret), "Returned: %d\n", ret); - if (!ret) ok(GetLastError() == ERROR_INVALID_PARAMETER, "Last error: %08x\n", GetLastError()); + ok(!ret || broken(ret), "Returned: %ld\n", ret); + if (!ret) ok(GetLastError() == ERROR_INVALID_PARAMETER, "Last error: %08lx\n", GetLastError());
SetLastError(0xcafebabe); recips = BSM_APPLICATIONS; ret = broadcast( 0x80000000, &recips, WM_NULL, 0, 0 ); - ok(!ret || broken(ret), "Returned: %d\n", ret); - if (!ret) ok(GetLastError() == ERROR_INVALID_PARAMETER, "Last error: %08x\n", GetLastError()); + ok(!ret || broken(ret), "Returned: %ld\n", ret); + if (!ret) ok(GetLastError() == ERROR_INVALID_PARAMETER, "Last error: %08lx\n", GetLastError());
if (0) /* TODO: Check the hang flags */ { SetLastError(0xcafebabe); recips = BSM_APPLICATIONS; ret = broadcast( BSF_QUERY|(BSF_NOHANG|BSF_FORCEIFHUNG), &recips, WM_NULL, 30000, 0 ); - ok(0, "Last error: %08x\n", GetLastError()); - ok(0, "Returned: %d\n", ret); + ok(0, "Last error: %08lx\n", GetLastError()); + ok(0, "Returned: %ld\n", ret);
SetLastError(0xcafebabe); recips = BSM_APPLICATIONS; ret = broadcast( BSF_QUERY|(BSF_NOHANG|BSF_NOTIMEOUTIFNOTHUNG), &recips, WM_NULL, 30000, 0 ); - ok(0, "Last error: %08x\n", GetLastError()); - ok(0, "Returned: %d\n", ret); + ok(0, "Last error: %08lx\n", GetLastError()); + ok(0, "Returned: %ld\n", ret);
SetLastError(0xcafebabe); recips = BSM_APPLICATIONS; ret = broadcast( BSF_QUERY|(BSF_NOTIMEOUTIFNOTHUNG|BSF_FORCEIFHUNG), &recips, WM_NULL, 30000, 0 ); - ok(0, "Last error: %08x\n", GetLastError()); - ok(0, "Returned: %d\n", ret); + ok(0, "Last error: %08lx\n", GetLastError()); + ok(0, "Returned: %ld\n", ret);
SetLastError(0xcafebabe); recips = BSM_APPLICATIONS; ret = broadcast( BSF_POSTMESSAGE|(BSF_NOTIMEOUTIFNOTHUNG|BSF_FORCEIFHUNG), &recips, WM_NULL, 30000, 0 ); - ok(0, "Last error: %08x\n", GetLastError()); - ok(0, "Returned: %d\n", ret); + ok(0, "Last error: %08lx\n", GetLastError()); + ok(0, "Returned: %ld\n", ret); }
SetLastError( 0xdeadbeef ); recips = BSM_APPLICATIONS; ret = broadcast( BSF_POSTMESSAGE|BSF_SENDNOTIFYMESSAGE, &recips, WM_NULL, 100, 0 ); - ok(ret==1, "Returned: %d\n", ret); + ok(ret==1, "Returned: %ld\n", ret); ok(WaitForSingleObject(hevent, 0) != WAIT_OBJECT_0, "Synchronous message sent instead\n"); PulseEvent(hevent);
recips = BSM_APPLICATIONS; ret = broadcast( BSF_SENDNOTIFYMESSAGE, &recips, WM_NULL, 100, BROADCAST_QUERY_DENY ); - ok(ret==1, "Returned: %d\n", ret); + ok(ret==1, "Returned: %ld\n", ret); ok(WaitForSingleObject(hevent, 0) != WAIT_TIMEOUT, "Asynchronous message sent instead\n"); PulseEvent(hevent); } @@ -152,51 +153,51 @@ static void test_parametersEx(PBROADCASTEX broadcastex) SetLastError(0xcafebabe); recips = BSM_APPLICATIONS; ret = broadcastex( 0x80000000, &recips, WM_NULL, 0, 0, NULL ); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Last error: %08x\n", GetLastError()); - ok(!ret, "Returned: %d\n", ret); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Last error: %08lx\n", GetLastError()); + ok(!ret, "Returned: %ld\n", ret);
SetLastError(0xcafebabe); recips = BSM_APPLICATIONS; ret = broadcastex( 0x80000000, &recips, WM_NULL, 0, 0, NULL ); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Last error: %08x\n", GetLastError()); - ok(!ret, "Returned: %d\n", ret); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Last error: %08lx\n", GetLastError()); + ok(!ret, "Returned: %ld\n", ret);
if (0) /* TODO: Check the hang flags */ { SetLastError(0xcafebabe); recips = BSM_APPLICATIONS; ret = broadcastex( BSF_QUERY|(BSF_NOHANG|BSF_FORCEIFHUNG), &recips, WM_NULL, 30000, 0, NULL ); - ok(0, "Last error: %08x\n", GetLastError()); - ok(0, "Returned: %d\n", ret); + ok(0, "Last error: %08lx\n", GetLastError()); + ok(0, "Returned: %ld\n", ret);
SetLastError(0xcafebabe); recips = BSM_APPLICATIONS; ret = broadcastex( BSF_QUERY|(BSF_NOHANG|BSF_NOTIMEOUTIFNOTHUNG), &recips, WM_NULL, 30000, 0, NULL ); - ok(0, "Last error: %08x\n", GetLastError()); - ok(0, "Returned: %d\n", ret); + ok(0, "Last error: %08lx\n", GetLastError()); + ok(0, "Returned: %ld\n", ret);
SetLastError(0xcafebabe); recips = BSM_APPLICATIONS; ret = broadcastex( BSF_QUERY|(BSF_NOTIMEOUTIFNOTHUNG|BSF_FORCEIFHUNG), &recips, WM_NULL, 30000, 0, NULL ); - ok(0, "Last error: %08x\n", GetLastError()); - ok(0, "Returned: %d\n", ret); + ok(0, "Last error: %08lx\n", GetLastError()); + ok(0, "Returned: %ld\n", ret);
SetLastError(0xcafebabe); recips = BSM_APPLICATIONS; ret = broadcastex( BSF_POSTMESSAGE|(BSF_NOTIMEOUTIFNOTHUNG|BSF_FORCEIFHUNG), &recips, WM_NULL, 30000, 0, NULL ); - ok(0, "Last error: %08x\n", GetLastError()); - ok(0, "Returned: %d\n", ret); + ok(0, "Last error: %08lx\n", GetLastError()); + ok(0, "Returned: %ld\n", ret); }
recips = BSM_APPLICATIONS; ret = broadcastex( BSF_POSTMESSAGE|BSF_SENDNOTIFYMESSAGE, &recips, WM_NULL, 100, 0, NULL ); - ok(ret==1, "Returned: %d\n", ret); + ok(ret==1, "Returned: %ld\n", ret); ok(WaitForSingleObject(hevent, 0) != WAIT_OBJECT_0, "Synchronous message sent instead\n"); PulseEvent(hevent);
recips = BSM_APPLICATIONS; ret = broadcastex( BSF_SENDNOTIFYMESSAGE, &recips, WM_NULL, 100, BROADCAST_QUERY_DENY, NULL ); - ok(ret==1, "Returned: %d\n", ret); + ok(ret==1, "Returned: %ld\n", ret); ok(WaitForSingleObject(hevent, 0) != WAIT_TIMEOUT, "Asynchronous message sent instead\n"); PulseEvent(hevent); } diff --git a/dlls/user32/tests/class.c b/dlls/user32/tests/class.c index c13893ae9d3..083aeb80b45 100644 --- a/dlls/user32/tests/class.c +++ b/dlls/user32/tests/class.c @@ -1,3 +1,4 @@ +#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* Unit test suite for window classes. * * Copyright 2002 Mike McCormack @@ -139,7 +140,7 @@ static void ClassTest(HINSTANCE hInstance, BOOL global) DestroyWindow(hTestWnd);
ret = GetClassInfoW(hInstance2, className, &info); - ok(ret, "GetClassInfoW failed: %u\n", GetLastError()); + ok(ret, "GetClassInfoW failed: %lu\n", GetLastError());
hTestWnd = CreateWindowW (className, winName, WS_OVERLAPPEDWINDOW + WS_HSCROLL + WS_VSCROLL, @@ -183,9 +184,9 @@ static void ClassTest(HINSTANCE hInstance, BOOL global) { SetLastError(0); ok(!SetClassLongW(hTestWnd,i*sizeof(DWORD),i+1), - "GetClassLongW(%d) initial value nonzero!\n",i); + "GetClassLongW(%ld) initial value nonzero!\n",i); ok(!GetLastError(), - "SetClassLongW(%d) failed!\n",i); + "SetClassLongW(%ld) failed!\n",i); }
/* test values of valid classwords that we set */ @@ -339,7 +340,7 @@ static void check_instance_( int line, const char *name, HINSTANCE inst, ok_(__FILE__,line)(!UnregisterClassA(name, inst), "UnregisterClassA should fail while exists a class window\n"); ok_(__FILE__,line)(GetLastError() == ERROR_CLASS_HAS_WINDOWS, - "GetLastError() should be set to ERROR_CLASS_HAS_WINDOWS not %d\n", GetLastError()); + "GetLastError() should be set to ERROR_CLASS_HAS_WINDOWS not %ld\n", GetLastError()); DestroyWindow(hwnd); } #define check_instance(name,inst,info_inst,gcl_inst) check_instance_(__LINE__,name,inst,info_inst,gcl_inst) @@ -371,7 +372,7 @@ static void check_thread_instance( const char *name, HINSTANCE inst, HINSTANCE i class_info.gcl_inst = gcl_inst;
hThread = CreateThread(NULL, 0, thread_proc, &class_info, 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); } @@ -458,7 +459,7 @@ static void test_instances(void)
/* setting global flag doesn't change status of class */ hwnd = CreateWindowExA( 0, name, "test", 0, 0, 0, 0, 0, 0, 0, main_module, 0 ); - ok( hwnd != 0, "CreateWindow failed error %u\n", GetLastError()); + ok( hwnd != 0, "CreateWindow failed error %lu\n", GetLastError()); SetClassLongA( hwnd, GCL_STYLE, CS_GLOBALCLASS ); cls.lpszMenuName = "kernel32"; cls.hInstance = kernel32; @@ -525,7 +526,7 @@ static void test_instances(void) DestroyWindow( hwnd2 );
r = GetClassNameA( hwnd, buffer, 4 ); - ok( r == 3, "expected 3, got %d\n", r ); + ok( r == 3, "expected 3, got %ld\n", r ); ok( !strcmp( buffer, "__t"), "name wrong: %s\n", buffer );
ok( UnregisterClassA( name, kernel32 ), "Unregister failed for kernel32\n" ); @@ -542,7 +543,7 @@ static void test_instances(void) cls.lpszMenuName = "null"; cls.hInstance = 0; ok( !RegisterClassA( &cls ), "Succeeded registering local class for null instance\n" ); - ok( GetLastError() == ERROR_CLASS_ALREADY_EXISTS, "Wrong error code %d\n", GetLastError() ); + ok( GetLastError() == ERROR_CLASS_ALREADY_EXISTS, "Wrong error code %ld\n", GetLastError() ); ok( UnregisterClassA( name, main_module ), "Unregister failed for main module\n" );
ok( RegisterClassA( &cls ), "Failed to register local class for null instance\n" ); @@ -551,17 +552,17 @@ static void test_instances(void) check_instance( name, main_module, main_module, main_module ); check_thread_instance( name, main_module, main_module, main_module ); ok( !GetClassInfoA( 0, name, &wc ), "Class found with null instance\n" ); - ok( GetLastError() == ERROR_CLASS_DOES_NOT_EXIST, "Wrong error code %d\n", GetLastError() ); + ok( GetLastError() == ERROR_CLASS_DOES_NOT_EXIST, "Wrong error code %ld\n", GetLastError() ); ok( UnregisterClassA( name, 0 ), "Unregister failed for null instance\n" );
/* registering for user32 always fails */ cls.lpszMenuName = "user32"; cls.hInstance = user32; ok( !RegisterClassA( &cls ), "Succeeded registering local class for user32\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "Wrong error code %d\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "Wrong error code %ld\n", GetLastError() ); cls.style |= CS_GLOBALCLASS; ok( !RegisterClassA( &cls ), "Succeeded registering global class for user32\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "Wrong error code %d\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "Wrong error code %ld\n", GetLastError() );
/* unregister is OK though */ cls.hInstance = main_module; @@ -576,12 +577,12 @@ static void test_instances(void) cls.lpszMenuName = "kernel32"; cls.hInstance = kernel32; ok( !RegisterClassA( &cls ), "Succeeded registering local class for kernel32\n" ); - ok( GetLastError() == ERROR_CLASS_ALREADY_EXISTS, "Wrong error code %d\n", GetLastError() ); + ok( GetLastError() == ERROR_CLASS_ALREADY_EXISTS, "Wrong error code %ld\n", GetLastError() ); /* even if global flag is cleared */ hwnd = CreateWindowExA( 0, name, "test", 0, 0, 0, 0, 0, 0, 0, main_module, 0 ); SetClassLongA( hwnd, GCL_STYLE, 0 ); ok( !RegisterClassA( &cls ), "Succeeded registering local class for kernel32\n" ); - ok( GetLastError() == ERROR_CLASS_ALREADY_EXISTS, "Wrong error code %d\n", GetLastError() ); + ok( GetLastError() == ERROR_CLASS_ALREADY_EXISTS, "Wrong error code %ld\n", GetLastError() );
check_class( main_module, name, "main_module" ); check_class( kernel32, name, "main_module" ); @@ -602,7 +603,7 @@ static void test_instances(void) DestroyWindow( hwnd ); ok( UnregisterClassA( name, (HINSTANCE)0x87654321 ), "Unregister failed for main module global\n" ); ok( !UnregisterClassA( name, (HINSTANCE)0x87654321 ), "Unregister succeeded the second time\n" ); - ok( GetLastError() == ERROR_CLASS_DOES_NOT_EXIST, "Wrong error code %d\n", GetLastError() ); + ok( GetLastError() == ERROR_CLASS_DOES_NOT_EXIST, "Wrong error code %ld\n", GetLastError() );
cls.hInstance = (HINSTANCE)0x12345678; ok( RegisterClassA( &cls ), "Failed to register global class for dummy instance\n" ); @@ -620,10 +621,10 @@ static void test_instances(void) cls.lpszClassName = "BUTTON"; cls.hInstance = main_module; ok( !RegisterClassA( &cls ), "Succeeded registering global button class for main module\n" ); - ok( GetLastError() == ERROR_CLASS_ALREADY_EXISTS, "Wrong error code %d\n", GetLastError() ); + ok( GetLastError() == ERROR_CLASS_ALREADY_EXISTS, "Wrong error code %ld\n", GetLastError() ); cls.hInstance = kernel32; ok( !RegisterClassA( &cls ), "Succeeded registering global button class for kernel32\n" ); - ok( GetLastError() == ERROR_CLASS_ALREADY_EXISTS, "Wrong error code %d\n", GetLastError() ); + ok( GetLastError() == ERROR_CLASS_ALREADY_EXISTS, "Wrong error code %ld\n", GetLastError() );
/* local class is OK however */ cls.style &= ~CS_GLOBALCLASS; @@ -651,7 +652,7 @@ static void test_instances(void) ok( GetClassInfoA( kernel32, "BUTTON", &wc ), "Button class not found with kernel32\n" ); ok( UnregisterClassA( "BUTTON", (HINSTANCE)0x12345678 ), "Failed to unregister button\n" ); ok( !UnregisterClassA( "BUTTON", (HINSTANCE)0x87654321 ), "Unregistered button a second time\n" ); - ok( GetLastError() == ERROR_CLASS_DOES_NOT_EXIST, "Wrong error code %d\n", GetLastError() ); + ok( GetLastError() == ERROR_CLASS_DOES_NOT_EXIST, "Wrong error code %ld\n", GetLastError() ); ok( !GetClassInfoA( 0, "BUTTON", &wc ), "Button still exists\n" ); /* last error not set reliably */
@@ -723,7 +724,7 @@ static void test_builtinproc(void) cls.lpszClassName = (LPCSTR)classW; atom = RegisterClassExW((WNDCLASSEXW *)&cls); } - ok(atom != 0, "Couldn't register class, i=%d, %d\n", i, GetLastError()); + ok(atom != 0, "Couldn't register class, i=%d, %ld\n", i, GetLastError());
hwnd = CreateWindowA(classA, NULL, 0, 0, 0, 100, 100, NULL, NULL, GetModuleHandleA(NULL), NULL); ok(hwnd != NULL, "Couldn't create window i=%d\n", i); @@ -992,29 +993,29 @@ static void test_GetClassInfo(void)
SetLastError(0xdeadbeef); ret = GetClassInfoA(0, "static", &wc); - ok(ret, "GetClassInfoA() error %d\n", GetLastError()); + ok(ret, "GetClassInfoA() error %ld\n", GetLastError());
if (0) { /* crashes under XP */ SetLastError(0xdeadbeef); ret = GetClassInfoA(0, "static", NULL); - ok(ret, "GetClassInfoA() error %d\n", GetLastError()); + ok(ret, "GetClassInfoA() error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetClassInfoW(0, staticW, NULL); - ok(ret, "GetClassInfoW() error %d\n", GetLastError()); + ok(ret, "GetClassInfoW() error %ld\n", GetLastError()); }
wcx.cbSize = sizeof(wcx); SetLastError(0xdeadbeef); ret = GetClassInfoExA(0, "static", &wcx); - ok(ret, "GetClassInfoExA() error %d\n", GetLastError()); + ok(ret, "GetClassInfoExA() error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetClassInfoExA(0, "static", NULL); ok(!ret, "GetClassInfoExA() should fail\n"); ok(GetLastError() == ERROR_NOACCESS || broken(GetLastError() == 0xdeadbeef), /* win9x */ - "expected ERROR_NOACCESS, got %d\n", GetLastError()); + "expected ERROR_NOACCESS, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetClassInfoExW(0, staticW, NULL); @@ -1022,14 +1023,14 @@ if (0) { /* crashes under XP */ ok(GetLastError() == ERROR_NOACCESS || broken(GetLastError() == 0xdeadbeef) /* NT4 */ || broken(GetLastError() == ERROR_CALL_NOT_IMPLEMENTED), /* win9x */ - "expected ERROR_NOACCESS, got %d\n", GetLastError()); + "expected ERROR_NOACCESS, got %ld\n", GetLastError());
wcx.cbSize = 0; wcx.lpfnWndProc = NULL; SetLastError(0xdeadbeef); ret = GetClassInfoExA(0, "static", &wcx); - ok(ret, "GetClassInfoExA() error %d\n", GetLastError()); - ok(GetLastError() == 0xdeadbeef, "Unexpected error code %d\n", GetLastError()); + ok(ret, "GetClassInfoExA() error %ld\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Unexpected error code %ld\n", GetLastError()); ok(wcx.cbSize == 0, "expected 0, got %u\n", wcx.cbSize); ok(wcx.lpfnWndProc != NULL, "got null proc\n");
@@ -1037,7 +1038,7 @@ if (0) { /* crashes under XP */ wcx.lpfnWndProc = NULL; SetLastError(0xdeadbeef); ret = GetClassInfoExA(0, "static", &wcx); - ok(ret, "GetClassInfoExA() error %d\n", GetLastError()); + ok(ret, "GetClassInfoExA() error %ld\n", GetLastError()); ok(wcx.cbSize == sizeof(wcx) - 1, "expected sizeof(wcx)-1, got %u\n", wcx.cbSize); ok(wcx.lpfnWndProc != NULL, "got null proc\n");
@@ -1045,7 +1046,7 @@ if (0) { /* crashes under XP */ wcx.lpfnWndProc = NULL; SetLastError(0xdeadbeef); ret = GetClassInfoExA(0, "static", &wcx); - ok(ret, "GetClassInfoExA() error %d\n", GetLastError()); + ok(ret, "GetClassInfoExA() error %ld\n", GetLastError()); ok(wcx.cbSize == sizeof(wcx) + 1, "expected sizeof(wcx)+1, got %u\n", wcx.cbSize); ok(wcx.lpfnWndProc != NULL, "got null proc\n"); } @@ -1117,7 +1118,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); } @@ -1134,10 +1135,10 @@ static HANDLE create_test_actctx(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); @@ -1171,7 +1172,7 @@ static void test_comctl32_class( const char *name ) create_manifest_file(path, comctl32_manifest); context = create_test_actctx(path); ret = DeleteFileA(path); - ok(ret, "Failed to delete manifest file, error %d.\n", GetLastError()); + ok(ret, "Failed to delete manifest file, error %ld.\n", GetLastError());
module = GetModuleHandleA( "comctl32" ); ok( !module, "comctl32 already loaded\n" ); @@ -1308,10 +1309,10 @@ static void test_IME(void) ok(GetModuleHandleA("imm32") != 0, "imm32.dll is not loaded\n");
ret = GetClassInfoA(NULL, "IME", &wnd_class); - ok(ret, "GetClassInfo failed: %d\n", GetLastError()); + ok(ret, "GetClassInfo failed: %ld\n", GetLastError());
size = VirtualQuery(wnd_class.lpfnWndProc, &mbi, sizeof(mbi)); - ok(size == sizeof(mbi), "VirtualQuery returned %ld\n", size); + ok(size == sizeof(mbi), "VirtualQuery returned %Id\n", size); if (size == sizeof(mbi)) { size = GetModuleFileNameA(mbi.AllocationBase, module_name, sizeof(module_name)); ok(size, "GetModuleFileName failed\n"); @@ -1322,10 +1323,10 @@ static void test_IME(void) }
ret = GetClassInfoW(NULL, ime_classW, &wnd_classw); - ok(ret, "GetClassInfo failed: %d\n", GetLastError()); + ok(ret, "GetClassInfo failed: %ld\n", GetLastError());
size = VirtualQuery(wnd_classw.lpfnWndProc, &mbi, sizeof(mbi)); - ok(size == sizeof(mbi), "VirtualQuery returned %ld\n", size); + ok(size == sizeof(mbi), "VirtualQuery returned %Id\n", size); size = GetModuleFileNameA(mbi.AllocationBase, module_name, sizeof(module_name)); ok(size, "GetModuleFileName failed\n"); for (ptr = module_name+size-1; ptr > module_name; ptr--) @@ -1360,7 +1361,7 @@ static void test_actctx_classes(void) create_manifest_file(path, main_manifest); context = create_test_actctx(path); ret = DeleteFileA(path); - ok(ret, "Failed to delete manifest file, error %d.\n", GetLastError()); + ok(ret, "Failed to delete manifest file, error %ld.\n", GetLastError());
ret = ActivateActCtx(context, &cookie); ok(ret, "Failed to activate context.\n"); @@ -1511,7 +1512,7 @@ static void test_uxtheme(void) class.hInstance = GetModuleHandleA(NULL); class.lpszClassName = class_name; atom = RegisterClassExA(&class); - ok(atom, "RegisterClassExA failed, error %u.\n", GetLastError()); + ok(atom, "RegisterClassExA failed, error %lu.\n", GetLastError());
dll_loaded = !!GetModuleHandleA("comctl32.dll"); ok(!dll_loaded, "Expected comctl32.dll not loaded.\n"); @@ -1522,7 +1523,7 @@ static void test_uxtheme(void) /* Creating a window triggers uxtheme load when theming is active */ hwnd = CreateWindowA(class_name, "Test", WS_POPUP, 0, 0, 1, 1, NULL, NULL, GetModuleHandleA(NULL), NULL); - ok(!!hwnd, "Failed to create a test window, error %u.\n", GetLastError()); + ok(!!hwnd, "Failed to create a test window, error %lu.\n", GetLastError());
dll_loaded = !!GetModuleHandleA("comctl32.dll"); ok(!dll_loaded, "Expected comctl32.dll not loaded.\n"); @@ -1531,9 +1532,9 @@ static void test_uxtheme(void) dll_loaded = !!GetModuleHandleA("uxtheme.dll");
uxtheme = LoadLibraryA("uxtheme.dll"); - ok(!!uxtheme, "Failed to load uxtheme.dll, error %u.\n", GetLastError()); + ok(!!uxtheme, "Failed to load uxtheme.dll, error %lu.\n", GetLastError()); pIsThemeActive = (void *)GetProcAddress(uxtheme, "IsThemeActive"); - ok(!!pIsThemeActive, "Failed to load IsThemeActive, error %u.\n", GetLastError()); + ok(!!pIsThemeActive, "Failed to load IsThemeActive, error %lu.\n", GetLastError()); is_theme_active = pIsThemeActive(); FreeLibrary(uxtheme);
diff --git a/dlls/user32/tests/clipboard.c b/dlls/user32/tests/clipboard.c index b673fc1add5..8ddebfd1c1e 100644 --- a/dlls/user32/tests/clipboard.c +++ b/dlls/user32/tests/clipboard.c @@ -1,3 +1,4 @@ +#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* * Unit test suite for clipboard functions. * @@ -98,7 +99,7 @@ static DWORD WINAPI empty_clipboard_thread(LPVOID arg) { SetLastError( 0xdeadbeef ); ok(!EmptyClipboard(), "%u: EmptyClipboard succeeded\n", thread_from_line ); - ok( GetLastError() == ERROR_CLIPBOARD_NOT_OPEN, "%u: wrong error %u\n", + ok( GetLastError() == ERROR_CLIPBOARD_NOT_OPEN, "%u: wrong error %lu\n", thread_from_line, GetLastError()); return 0; } @@ -130,22 +131,22 @@ static DWORD WINAPI set_clipboard_data_thread(LPVOID arg) SetClipboardData( CF_WAVE, 0 ); ok( IsClipboardFormatAvailable( CF_WAVE ), "%u: SetClipboardData failed\n", thread_from_line ); ret = SetClipboardData( CF_WAVE, GlobalAlloc( GMEM_DDESHARE | GMEM_ZEROINIT, 100 )); - ok( ret != 0, "%u: SetClipboardData failed err %u\n", thread_from_line, GetLastError() ); + ok( ret != 0, "%u: SetClipboardData failed err %lu\n", thread_from_line, GetLastError() ); SetLastError( 0xdeadbeef ); ret = GetClipboardData( CF_WAVE ); ok( !ret, "%u: GetClipboardData succeeded\n", thread_from_line ); - ok( GetLastError() == ERROR_CLIPBOARD_NOT_OPEN, "%u: wrong error %u\n", + ok( GetLastError() == ERROR_CLIPBOARD_NOT_OPEN, "%u: wrong error %lu\n", thread_from_line, GetLastError()); } else { SetClipboardData( CF_WAVE, 0 ); - ok( GetLastError() == ERROR_CLIPBOARD_NOT_OPEN, "%u: wrong error %u\n", + ok( GetLastError() == ERROR_CLIPBOARD_NOT_OPEN, "%u: wrong error %lu\n", thread_from_line, GetLastError()); ok( !IsClipboardFormatAvailable( CF_WAVE ), "%u: SetClipboardData succeeded\n", thread_from_line ); ret = SetClipboardData( CF_WAVE, GlobalAlloc( GMEM_DDESHARE | GMEM_ZEROINIT, 100 )); ok( !ret, "%u: SetClipboardData succeeded\n", thread_from_line ); - ok( GetLastError() == ERROR_CLIPBOARD_NOT_OPEN, "%u: wrong error %u\n", + ok( GetLastError() == ERROR_CLIPBOARD_NOT_OPEN, "%u: wrong error %lu\n", thread_from_line, GetLastError()); } return 0; @@ -161,17 +162,17 @@ static void set_clipboard_data_process( int arg ) { ok( IsClipboardFormatAvailable( CF_WAVE ), "CF_WAVE not available\n" ); ret = SetClipboardData( CF_WAVE, GlobalAlloc( GMEM_DDESHARE | GMEM_ZEROINIT, 100 )); - ok( ret != 0, "SetClipboardData failed err %u\n", GetLastError() ); + ok( ret != 0, "SetClipboardData failed err %lu\n", GetLastError() ); } else { SetClipboardData( CF_WAVE, 0 ); - ok( GetLastError() == ERROR_CLIPBOARD_NOT_OPEN, "wrong error %u\n", + ok( GetLastError() == ERROR_CLIPBOARD_NOT_OPEN, "wrong error %lu\n", GetLastError()); ok( !IsClipboardFormatAvailable( CF_WAVE ), "SetClipboardData succeeded\n" ); ret = SetClipboardData( CF_WAVE, GlobalAlloc( GMEM_DDESHARE | GMEM_ZEROINIT, 100 )); ok( !ret, "SetClipboardData succeeded\n" ); - ok( GetLastError() == ERROR_CLIPBOARD_NOT_OPEN, "wrong error %u\n", + ok( GetLastError() == ERROR_CLIPBOARD_NOT_OPEN, "wrong error %lu\n", GetLastError()); } winetest_pop_context(); @@ -189,7 +190,7 @@ static void grab_clipboard_process( int arg ) if (arg) { HANDLE ret = SetClipboardData( CF_WAVE, GlobalAlloc( GMEM_DDESHARE | GMEM_ZEROINIT, 100 )); - ok( ret != 0, "process %u: SetClipboardData failed err %u\n", arg, GetLastError() ); + ok( ret != 0, "process %u: SetClipboardData failed err %lu\n", arg, GetLastError() ); } }
@@ -200,7 +201,7 @@ static void run_thread( LPTHREAD_START_ROUTINE func, void *arg, int line )
thread_from_line = line; thread = CreateThread(NULL, 0, func, arg, 0, NULL); - ok(thread != NULL, "%u: CreateThread failed with error %d\n", line, GetLastError()); + ok(thread != NULL, "%u: CreateThread failed with error %ld\n", line, GetLastError()); for (;;) { ret = MsgWaitForMultipleObjectsEx( 1, &thread, 1000, QS_ALLINPUT, 0 ); @@ -211,7 +212,7 @@ static void run_thread( LPTHREAD_START_ROUTINE func, void *arg, int line ) } else break; } - ok(ret == WAIT_OBJECT_0, "%u: expected WAIT_OBJECT_0, got %u\n", line, ret); + ok(ret == WAIT_OBJECT_0, "%u: expected WAIT_OBJECT_0, got %lu\n", line, ret); CloseHandle(thread); }
@@ -264,11 +265,11 @@ static LRESULT CALLBACK winproc_wrapper( HWND hwnd, UINT msg, WPARAM wp, LPARAM ok( wm_drawclipboard, "didn't receive WM_DRAWCLIPBOARD before WM_DESTROY\n" ); break; case WM_DRAWCLIPBOARD: - ok( msg_flags == ISMEX_NOSEND, "WM_DRAWCLIPBOARD wrong flags %x\n", msg_flags ); + ok( msg_flags == ISMEX_NOSEND, "WM_DRAWCLIPBOARD wrong flags %lx\n", msg_flags ); wm_drawclipboard++; break; case WM_RENDERALLFORMATS: - ok( msg_flags == ISMEX_NOSEND, "WM_RENDERALLFORMATS wrong flags %x\n", msg_flags ); + ok( msg_flags == ISMEX_NOSEND, "WM_RENDERALLFORMATS wrong flags %lx\n", msg_flags ); wm_renderallformats++; break; } @@ -286,25 +287,25 @@ static void test_ClipboardOwner(void)
hWnd1 = CreateWindowExA(0, "static", NULL, WS_POPUP, 0, 0, 10, 10, 0, 0, 0, NULL); - ok(hWnd1 != 0, "CreateWindowExA error %d\n", GetLastError()); + ok(hWnd1 != 0, "CreateWindowExA error %ld\n", GetLastError()); trace("hWnd1 = %p\n", hWnd1);
hWnd2 = CreateWindowExA(0, "static", NULL, WS_POPUP, 0, 0, 10, 10, 0, 0, 0, NULL); - ok(hWnd2 != 0, "CreateWindowExA error %d\n", GetLastError()); + ok(hWnd2 != 0, "CreateWindowExA error %ld\n", GetLastError()); trace("hWnd2 = %p\n", hWnd2);
SetLastError(0xdeadbeef); ok(!CloseClipboard(), "CloseClipboard should fail if clipboard wasn't open\n"); ok(GetLastError() == ERROR_CLIPBOARD_NOT_OPEN || broken(GetLastError() == 0xdeadbeef), /* wow64 */ - "wrong error %u\n", GetLastError()); + "wrong error %lu\n", GetLastError());
ok(open_clipboard(0), "OpenClipboard failed\n"); ok(!GetClipboardOwner(), "clipboard should still be not owned\n"); ok(!OpenClipboard(hWnd1), "OpenClipboard should fail since clipboard already opened\n"); ok(open_clipboard(0), "OpenClipboard again failed\n"); ret = CloseClipboard(); - ok( ret, "CloseClipboard error %d\n", GetLastError()); + ok( ret, "CloseClipboard error %ld\n", GetLastError());
ok(open_clipboard(hWnd1), "OpenClipboard failed\n"); run_thread( open_clipboard_thread, hWnd1, __LINE__ ); @@ -319,12 +320,12 @@ static void test_ClipboardOwner(void) SetLastError(0xdeadbeef); ret = OpenClipboard(hWnd2); ok(!ret && (GetLastError() == 0xdeadbeef || GetLastError() == ERROR_ACCESS_DENIED), - "OpenClipboard should fail without setting last error value, or with ERROR_ACCESS_DENIED, got error %d\n", GetLastError()); + "OpenClipboard should fail without setting last error value, or with ERROR_ACCESS_DENIED, got error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ok(!GetClipboardOwner() && GetLastError() == 0xdeadbeef, "clipboard should still be not owned\n"); ret = EmptyClipboard(); - ok( ret, "EmptyClipboard error %d\n", GetLastError()); + ok( ret, "EmptyClipboard error %ld\n", GetLastError()); ok(GetClipboardOwner() == hWnd1, "clipboard should be owned by %p, not by %p\n", hWnd1, GetClipboardOwner()); run_thread( empty_clipboard_thread, 0, __LINE__ ); run_thread( set_clipboard_data_thread, hWnd1, __LINE__ ); @@ -335,17 +336,17 @@ static void test_ClipboardOwner(void) SetLastError(0xdeadbeef); ret = OpenClipboard(hWnd2); ok(!ret && (GetLastError() == 0xdeadbeef || GetLastError() == ERROR_ACCESS_DENIED), - "OpenClipboard should fail without setting last error value, or with ERROR_ACCESS_DENIED, got error %d\n", GetLastError()); + "OpenClipboard should fail without setting last error value, or with ERROR_ACCESS_DENIED, got error %ld\n", GetLastError());
ret = CloseClipboard(); - ok( ret, "CloseClipboard error %d\n", GetLastError()); + ok( ret, "CloseClipboard error %ld\n", GetLastError()); ok(GetClipboardOwner() == hWnd1, "clipboard should still be owned\n");
/* any window will do, even from a different process */ ret = open_clipboard( GetDesktopWindow() ); - ok( ret, "OpenClipboard error %d\n", GetLastError()); + ok( ret, "OpenClipboard error %ld\n", GetLastError()); ret = EmptyClipboard(); - ok( ret, "EmptyClipboard error %d\n", GetLastError()); + ok( ret, "EmptyClipboard error %ld\n", GetLastError()); ok( GetClipboardOwner() == GetDesktopWindow(), "wrong owner %p/%p\n", GetClipboardOwner(), GetDesktopWindow() ); run_thread( set_clipboard_data_thread, GetDesktopWindow(), __LINE__ ); @@ -353,12 +354,12 @@ static void test_ClipboardOwner(void) ok( GetClipboardData( CF_WAVE ) != 0, "CF_WAVE data not available\n" ); run_process( "set_clipboard_data 2" ); ret = CloseClipboard(); - ok( ret, "CloseClipboard error %d\n", GetLastError()); + ok( ret, "CloseClipboard error %ld\n", GetLastError());
ret = open_clipboard( hWnd1 ); - ok( ret, "OpenClipboard error %d\n", GetLastError()); + ok( ret, "OpenClipboard error %ld\n", GetLastError()); ret = EmptyClipboard(); - ok( ret, "EmptyClipboard error %d\n", GetLastError()); + ok( ret, "EmptyClipboard error %ld\n", GetLastError()); SetClipboardData( CF_WAVE, 0 ); SetClipboardViewer( hWnd1 ); ok( GetClipboardOwner() == hWnd1, "wrong owner %p/%p\n", GetClipboardOwner(), hWnd1 ); @@ -368,9 +369,9 @@ static void test_ClipboardOwner(void)
old_proc = (WNDPROC)SetWindowLongPtrA( hWnd1, GWLP_WNDPROC, (LONG_PTR)winproc_wrapper ); ret = DestroyWindow(hWnd1); - ok( ret, "DestroyWindow error %d\n", GetLastError()); + ok( ret, "DestroyWindow error %ld\n", GetLastError()); ret = DestroyWindow(hWnd2); - ok( ret, "DestroyWindow error %d\n", GetLastError()); + ok( ret, "DestroyWindow error %ld\n", GetLastError()); SetLastError(0xdeadbeef); ok(!GetClipboardOwner() && GetLastError() == 0xdeadbeef, "clipboard should not be owned\n"); ok(!GetClipboardViewer() && GetLastError() == 0xdeadbeef, "viewer still exists\n"); @@ -380,36 +381,36 @@ static void test_ClipboardOwner(void) SetLastError( 0xdeadbeef ); ret = CloseClipboard(); ok( !ret, "CloseClipboard succeeded\n" ); - ok( GetLastError() == ERROR_CLIPBOARD_NOT_OPEN, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_CLIPBOARD_NOT_OPEN, "wrong error %lu\n", GetLastError() );
ret = open_clipboard( 0 ); - ok( ret, "OpenClipboard error %d\n", GetLastError()); + ok( ret, "OpenClipboard error %ld\n", GetLastError()); run_thread( set_clipboard_data_thread, 0, __LINE__ ); ok( IsClipboardFormatAvailable( CF_WAVE ), "CF_WAVE not available\n" ); ok( GetClipboardData( CF_WAVE ) != 0, "CF_WAVE data not available\n" ); run_process( "set_clipboard_data 3" ); ret = CloseClipboard(); - ok( ret, "CloseClipboard error %d\n", GetLastError()); + ok( ret, "CloseClipboard error %ld\n", GetLastError());
run_thread( open_and_empty_clipboard_thread, 0, __LINE__ ); ok( has_no_open_wnd(), "wrong open window\n" ); ok( !GetClipboardOwner(), "wrong owner window %p\n", GetClipboardOwner() );
ret = open_clipboard( 0 ); - ok( ret, "OpenClipboard error %d\n", GetLastError()); + ok( ret, "OpenClipboard error %ld\n", GetLastError()); run_thread( set_clipboard_data_thread, 0, __LINE__ ); ok( IsClipboardFormatAvailable( CF_WAVE ), "CF_WAVE not available\n" ); ok( GetClipboardData( CF_WAVE ) != 0, "CF_WAVE data not available\n" ); run_process( "set_clipboard_data 4" ); ret = EmptyClipboard(); - ok( ret, "EmptyClipboard error %d\n", GetLastError()); + ok( ret, "EmptyClipboard error %ld\n", GetLastError()); ret = CloseClipboard(); - ok( ret, "CloseClipboard error %d\n", GetLastError()); + ok( ret, "CloseClipboard error %ld\n", GetLastError());
SetLastError( 0xdeadbeef ); ok( !SetClipboardData( CF_WAVE, GlobalAlloc( GMEM_DDESHARE | GMEM_ZEROINIT, 100 )), "SetClipboardData succeeded\n" ); - ok( GetLastError() == ERROR_CLIPBOARD_NOT_OPEN, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_CLIPBOARD_NOT_OPEN, "wrong error %lu\n", GetLastError() ); ok( !IsClipboardFormatAvailable( CF_WAVE ), "SetClipboardData succeeded\n" );
run_thread( open_and_empty_clipboard_thread, GetDesktopWindow(), __LINE__ ); @@ -450,7 +451,7 @@ static void test_RegisterClipboardFormatA(void) ok(len == 0 || lstrcmpA(buf, "my_cool_clipboard_format") != 0, "format_id should not be a valid local atom\n"); ok(len != 0 || GetLastError() == ERROR_INVALID_HANDLE, - "err %d\n", GetLastError()); + "err %ld\n", GetLastError());
lstrcpyA(buf, "foo"); SetLastError(0xdeadbeef); @@ -458,12 +459,12 @@ static void test_RegisterClipboardFormatA(void) todo_wine ok(len == 0 || lstrcmpA(buf, "my_cool_clipboard_format") != 0, "format_id should not be a valid global atom\n"); ok(len != 0 || GetLastError() == ERROR_INVALID_HANDLE, - "err %d\n", GetLastError()); + "err %ld\n", GetLastError());
SetLastError(0xdeadbeef); atom_id = FindAtomA("my_cool_clipboard_format"); ok(atom_id == 0, "FindAtomA should fail, but it returned %x (format_id=%x)\n", atom_id, format_id); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "err %d\n", GetLastError()); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "err %ld\n", GetLastError());
todo_wine { @@ -471,7 +472,7 @@ static void test_RegisterClipboardFormatA(void) SetLastError(0xdeadbeef); atom_id = GlobalFindAtomA("my_cool_clipboard_format"); ok(atom_id == 0, "GlobalFindAtomA should fail, but it returned %x (format_id=%x)\n", atom_id, format_id); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "err %d\n", GetLastError()); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "err %ld\n", GetLastError()); }
for (format_id = 0; format_id < 0x10fff; format_id++) @@ -486,19 +487,19 @@ static void test_RegisterClipboardFormatA(void) }
ret = open_clipboard(0); - ok( ret, "OpenClipboard error %d\n", GetLastError()); + ok( ret, "OpenClipboard error %ld\n", GetLastError());
/* try some invalid/unregistered formats */ SetLastError( 0xdeadbeef ); handle = SetClipboardData( 0, GlobalAlloc( GMEM_DDESHARE | GMEM_MOVEABLE, 1 )); ok( !handle, "SetClipboardData succeeded\n" ); - ok( GetLastError() == ERROR_CLIPBOARD_NOT_OPEN, "wrong error %u\n", GetLastError()); + ok( GetLastError() == ERROR_CLIPBOARD_NOT_OPEN, "wrong error %lu\n", GetLastError()); handle = SetClipboardData( 0x1234, GlobalAlloc( GMEM_DDESHARE | GMEM_MOVEABLE, 1 )); - ok( handle != 0, "SetClipboardData failed err %d\n", GetLastError()); + ok( handle != 0, "SetClipboardData failed err %ld\n", GetLastError()); handle = SetClipboardData( 0x123456, GlobalAlloc( GMEM_DDESHARE | GMEM_MOVEABLE, 1 )); - ok( handle != 0, "SetClipboardData failed err %d\n", GetLastError()); + ok( handle != 0, "SetClipboardData failed err %ld\n", GetLastError()); handle = SetClipboardData( 0xffff8765, GlobalAlloc( GMEM_DDESHARE | GMEM_MOVEABLE, 1 )); - ok( handle != 0, "SetClipboardData failed err %d\n", GetLastError()); + ok( handle != 0, "SetClipboardData failed err %ld\n", GetLastError());
ok( IsClipboardFormatAvailable( 0x1234 ), "format missing\n" ); ok( IsClipboardFormatAvailable( 0x123456 ), "format missing\n" ); @@ -518,22 +519,22 @@ static void test_RegisterClipboardFormatA(void) }
ret = EmptyClipboard(); - ok( ret, "EmptyClipboard error %d\n", GetLastError()); + ok( ret, "EmptyClipboard error %ld\n", GetLastError()); ret =CloseClipboard(); - ok( ret, "CloseClipboard error %d\n", GetLastError()); + ok( ret, "CloseClipboard error %ld\n", GetLastError());
if (CountClipboardFormats()) { SetLastError(0xdeadbeef); ok(!EnumClipboardFormats(0), "EnumClipboardFormats should fail if clipboard wasn't open\n"); ok(GetLastError() == ERROR_CLIPBOARD_NOT_OPEN, - "Last error should be set to ERROR_CLIPBOARD_NOT_OPEN, not %d\n", GetLastError()); + "Last error should be set to ERROR_CLIPBOARD_NOT_OPEN, not %ld\n", GetLastError()); }
SetLastError(0xdeadbeef); ok(!EmptyClipboard(), "EmptyClipboard should fail if clipboard wasn't open\n"); ok(GetLastError() == ERROR_CLIPBOARD_NOT_OPEN || broken(GetLastError() == 0xdeadbeef), /* wow64 */ - "Wrong error %u\n", GetLastError()); + "Wrong error %lu\n", GetLastError());
format_id = RegisterClipboardFormatA("#1234"); ok(format_id == 1234, "invalid clipboard format id %04x\n", format_id); @@ -668,33 +669,33 @@ static void test_synthesized(void) emf = create_emf();
r = open_clipboard(NULL); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError()); r = EmptyClipboard(); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError()); h = SetClipboardData(CF_TEXT, htext); ok(h == htext, "got %p\n", h); h = SetClipboardData(CF_ENHMETAFILE, emf); ok(h == emf, "got %p\n", h); r = CloseClipboard(); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError());
count = CountClipboardFormats(); ok( count == 6, "count %u\n", count ); r = IsClipboardFormatAvailable( CF_TEXT ); - ok( r, "CF_TEXT not available err %d\n", GetLastError()); + ok( r, "CF_TEXT not available err %ld\n", GetLastError()); r = IsClipboardFormatAvailable( CF_LOCALE ); - ok( r, "CF_LOCALE not available err %d\n", GetLastError()); + ok( r, "CF_LOCALE not available err %ld\n", GetLastError()); r = IsClipboardFormatAvailable( CF_OEMTEXT ); - ok( r, "CF_OEMTEXT not available err %d\n", GetLastError()); + ok( r, "CF_OEMTEXT not available err %ld\n", GetLastError()); r = IsClipboardFormatAvailable( CF_UNICODETEXT ); - ok( r, "CF_UNICODETEXT not available err %d\n", GetLastError()); + ok( r, "CF_UNICODETEXT not available err %ld\n", GetLastError()); r = IsClipboardFormatAvailable( CF_ENHMETAFILE ); - ok( r, "CF_ENHMETAFILE not available err %d\n", GetLastError()); + ok( r, "CF_ENHMETAFILE not available err %ld\n", GetLastError()); r = IsClipboardFormatAvailable( CF_METAFILEPICT ); - ok( r, "CF_METAFILEPICT not available err %d\n", GetLastError()); + ok( r, "CF_METAFILEPICT not available err %ld\n", GetLastError());
r = open_clipboard(NULL); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError()); cf = EnumClipboardFormats(0); ok(cf == CF_TEXT, "cf %08x\n", cf); data = GetClipboardData(cf); @@ -727,54 +728,54 @@ static void test_synthesized(void) ok(cf == 0, "cf %08x\n", cf);
r = EmptyClipboard(); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError());
SetClipboardData( CF_UNICODETEXT, create_textW() ); SetClipboardData( CF_TEXT, create_textA() ); SetClipboardData( CF_OEMTEXT, create_textA() ); r = CloseClipboard(); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError());
r = open_clipboard( NULL ); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError()); SetLastError( 0xdeadbeef ); cf = EnumClipboardFormats(0); ok( cf == CF_UNICODETEXT, "cf %08x\n", cf ); - ok( GetLastError() == ERROR_SUCCESS, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_SUCCESS, "wrong error %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); cf = EnumClipboardFormats(cf); ok( cf == CF_TEXT, "cf %08x\n", cf ); - ok( GetLastError() == ERROR_SUCCESS, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_SUCCESS, "wrong error %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); cf = EnumClipboardFormats(cf); ok( cf == CF_OEMTEXT, "cf %08x\n", cf ); - ok( GetLastError() == ERROR_SUCCESS, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_SUCCESS, "wrong error %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); cf = EnumClipboardFormats(cf); ok( cf == CF_LOCALE, "cf %08x\n", cf ); - ok( GetLastError() == ERROR_SUCCESS, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_SUCCESS, "wrong error %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); cf = EnumClipboardFormats( cf ); ok( cf == 0, "cf %08x\n", cf ); - ok( GetLastError() == ERROR_SUCCESS, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_SUCCESS, "wrong error %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); cf = EnumClipboardFormats( 0xdead ); ok( cf == 0, "cf %08x\n", cf ); - ok( GetLastError() == ERROR_SUCCESS, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_SUCCESS, "wrong error %lu\n", GetLastError() );
r = EmptyClipboard(); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError());
r = CloseClipboard(); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError());
for (i = 0; i < ARRAY_SIZE(tests); i++) { winetest_push_context("%d", i); r = open_clipboard(NULL); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError()); r = EmptyClipboard(); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError());
switch (tests[i].format) { @@ -804,7 +805,7 @@ static void test_synthesized(void) ok( count == 1, "count %u\n", count );
r = CloseClipboard(); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError());
count = CountClipboardFormats(); for (j = 0; tests[i].expected[j]; j++) @@ -815,7 +816,7 @@ static void test_synthesized(void) ok( count == j, "count %u instead of %u\n", count, j );
r = open_clipboard( hwnd ); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError()); cf = 0; for (j = 0; tests[i].expected[j]; j++) { @@ -832,7 +833,7 @@ static void test_synthesized(void) data = GetClipboardData( cf ); ok(data != NULL || broken( tests[i].format == CF_DIBV5 && cf == CF_DIB ), /* >= Vista */ - "couldn't get data, cf %04x err %d\n", cf, GetLastError()); + "couldn't get data, cf %04x err %ld\n", cf, GetLastError()); seq = GetClipboardSequenceNumber(); ok(seq == old_seq, "sequence changed (test %d)\n", cf); switch (cf) @@ -841,19 +842,19 @@ static void test_synthesized(void) { UINT *ptr = GlobalLock( data ); DWORD layout = LOWORD( GetKeyboardLayout(0) ); - ok( GlobalSize( data ) == sizeof(*ptr), "size %lu\n", GlobalSize( data )); + ok( GlobalSize( data ) == sizeof(*ptr), "size %Iu\n", GlobalSize( data )); ok( *ptr == layout || broken( *ptr == MAKELANGID( LANG_ENGLISH, SUBLANG_DEFAULT )), - "CF_LOCALE %04x/%04x\n", *ptr, layout ); + "CF_LOCALE %04x/%04lx\n", *ptr, layout ); GlobalUnlock( data ); break; } case CF_TEXT: case CF_OEMTEXT: - ok( GlobalSize( data ) == 10, "wrong len %ld\n", GlobalSize( data )); + ok( GlobalSize( data ) == 10, "wrong len %Id\n", GlobalSize( data )); break; case CF_UNICODETEXT: - ok( GlobalSize( data ) == 10 * sizeof(WCHAR), "wrong len %ld\n", GlobalSize( data )); + ok( GlobalSize( data ) == 10 * sizeof(WCHAR), "wrong len %Id\n", GlobalSize( data )); break; } winetest_pop_context(); @@ -867,7 +868,7 @@ static void test_synthesized(void) /* now with delayed rendering */
r = EmptyClipboard(); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError());
rendered = SendMessageA( hwnd, WM_USER, 0, 0 ); ok( !rendered, "formats %08x have been rendered\n", rendered ); @@ -880,7 +881,7 @@ static void test_synthesized(void) ok( count == 1, "count %u\n", count );
r = CloseClipboard(); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError()); rendered = SendMessageA( hwnd, WM_USER, 0, 0 ); ok( !rendered, "formats %08x have been rendered\n", rendered );
@@ -895,7 +896,7 @@ static void test_synthesized(void) ok( !rendered, "formats %08x have been rendered\n", rendered );
r = open_clipboard(NULL); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError()); cf = 0; for (j = 0; tests[i].expected[j]; j++) { @@ -936,18 +937,18 @@ static void test_synthesized(void) ok(cf == 0, "cf %04x\n", cf); } r = CloseClipboard(); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError()); rendered = SendMessageA( hwnd, WM_USER, 0, 0 ); ok( !rendered, "formats %08x have been rendered\n", rendered ); winetest_pop_context(); }
r = open_clipboard(NULL); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError()); r = EmptyClipboard(); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError()); r = CloseClipboard(); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError()); DestroyWindow( hwnd );
/* Check what happens to the delayed rendering clipboard formats when the @@ -957,15 +958,15 @@ static void test_synthesized(void) SetWindowLongPtrA( hwnd, GWLP_WNDPROC, (LONG_PTR)renderer_winproc );
r = open_clipboard(hwnd); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError()); r = EmptyClipboard(); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError()); SetClipboardData( CF_UNICODETEXT, NULL ); r = CloseClipboard(); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError());
r = open_clipboard(NULL); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError()); count = CountClipboardFormats(); ok(count == 4, "count %u\n", count );
@@ -978,24 +979,24 @@ static void test_synthesized(void) ok(cf == CF_LOCALE, "unexpected clipboard format %u\n", cf);
r = CloseClipboard(); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError());
r = open_clipboard(NULL); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError());
SetLastError(0xdeadbeef); data = GetClipboardData( CF_TEXT ); - ok(GetLastError() == 0xdeadbeef, "bad last error %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "bad last error %ld\n", GetLastError()); ok(!data, "GetClipboardData() should have returned NULL\n");
r = CloseClipboard(); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError()); }
static DWORD WINAPI clipboard_render_data_thread(void *param) { HANDLE handle = SetClipboardData( CF_UNICODETEXT, create_textW() ); - ok( handle != 0, "SetClipboardData failed: %d\n", GetLastError() ); + ok( handle != 0, "SetClipboardData failed: %ld\n", GetLastError() ); return 0; }
@@ -1018,14 +1019,14 @@ static LRESULT CALLBACK clipboard_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPARA switch(msg) { case WM_DRAWCLIPBOARD: ok( msg_flags == (cross_thread ? ISMEX_NOTIFY : ISMEX_NOSEND), - "WM_DRAWCLIPBOARD wrong flags %x\n", msg_flags ); + "WM_DRAWCLIPBOARD wrong flags %lx\n", msg_flags ); EnterCriticalSection(&clipboard_cs); wm_drawclipboard++; LeaveCriticalSection(&clipboard_cs); break; case WM_CHANGECBCHAIN: ok( msg_flags == (cross_thread ? ISMEX_SEND : ISMEX_NOSEND), - "WM_CHANGECBCHAIN wrong flags %x\n", msg_flags ); + "WM_CHANGECBCHAIN wrong flags %lx\n", msg_flags ); if (next_wnd == (HWND)wp) next_wnd = (HWND)lp; else if (next_wnd) @@ -1033,13 +1034,13 @@ static LRESULT CALLBACK clipboard_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPARA break; case WM_DESTROYCLIPBOARD: ok( msg_flags == (cross_thread ? ISMEX_SEND : ISMEX_NOSEND), - "WM_DESTROYCLIPBOARD wrong flags %x\n", msg_flags ); + "WM_DESTROYCLIPBOARD wrong flags %lx\n", msg_flags ); wm_destroyclipboard++; ok( GetClipboardOwner() == hwnd, "WM_DESTROYCLIPBOARD owner %p\n", GetClipboardOwner() ); nb_formats = CountClipboardFormats(); break; case WM_RENDERFORMAT: - ok( !wm_renderformat, "multiple WM_RENDERFORMAT %04x / %04lx\n", wm_renderformat, wp ); + ok( !wm_renderformat, "multiple WM_RENDERFORMAT %04x / %04Ix\n", wm_renderformat, wp ); wm_renderformat = wp;
if (do_render_format) @@ -1049,13 +1050,13 @@ static LRESULT CALLBACK clipboard_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPARA
old_seq = GetClipboardSequenceNumber(); handle = SetClipboardData( CF_TEXT, create_textA() ); - ok( handle != 0, "SetClipboardData failed: %d\n", GetLastError() ); + ok( handle != 0, "SetClipboardData failed: %ld\n", GetLastError() ); seq = GetClipboardSequenceNumber(); ok( seq == old_seq, "sequence changed\n" ); old_seq = seq;
handle = CreateThread( NULL, 0, clipboard_render_data_thread, NULL, 0, NULL ); - ok( handle != NULL, "CreateThread failed: %d\n", GetLastError() ); + ok( handle != NULL, "CreateThread failed: %ld\n", GetLastError() ); ok( WaitForSingleObject(handle, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n" ); CloseHandle( handle ); seq = GetClipboardSequenceNumber(); @@ -1064,7 +1065,7 @@ static LRESULT CALLBACK clipboard_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPARA
break; case WM_CLIPBOARDUPDATE: - ok( msg_flags == ISMEX_NOSEND, "WM_CLIPBOARDUPDATE wrong flags %x\n", msg_flags ); + ok( msg_flags == ISMEX_NOSEND, "WM_CLIPBOARDUPDATE wrong flags %lx\n", msg_flags ); EnterCriticalSection(&clipboard_cs); wm_clipboardupdate++; SetEvent(update_event); @@ -1103,11 +1104,11 @@ static void get_clipboard_data_process(void) BOOL r;
r = open_clipboard(0); - ok(r, "OpenClipboard failed: %d\n", GetLastError()); + ok(r, "OpenClipboard failed: %ld\n", GetLastError()); data = GetClipboardData( CF_UNICODETEXT ); - ok( data != NULL, "GetClipboardData failed: %d\n", GetLastError()); + ok( data != NULL, "GetClipboardData failed: %ld\n", GetLastError()); r = CloseClipboard(); - ok(r, "CloseClipboard failed: %d\n", GetLastError()); + ok(r, "CloseClipboard failed: %ld\n", GetLastError()); }
static UINT old_seq; @@ -1157,38 +1158,38 @@ static DWORD WINAPI clipboard_thread(void *param) EnterCriticalSection(&clipboard_cs); SetLastError(0xdeadbeef); next_wnd = SetClipboardViewer(win); - ok(GetLastError() == 0xdeadbeef, "GetLastError = %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "GetLastError = %ld\n", GetLastError()); LeaveCriticalSection(&clipboard_cs);
SetLastError( 0xdeadbeef ); ret = SetClipboardViewer( (HWND)0xdead ); ok( !ret, "SetClipboardViewer succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); r = ChangeClipboardChain( win, (HWND)0xdead ); ok( !r, "ChangeClipboardChain succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); r = ChangeClipboardChain( (HWND)0xdead, next_wnd ); ok( !r, "ChangeClipboardChain succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error %lu\n", GetLastError() );
if (pAddClipboardFormatListener) { r = pAddClipboardFormatListener(win); - ok( r, "AddClipboardFormatListener failed err %d\n", GetLastError()); + ok( r, "AddClipboardFormatListener failed err %ld\n", GetLastError()); SetLastError( 0xdeadbeef ); r = pAddClipboardFormatListener( win ); ok( !r, "AddClipboardFormatListener succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); r = pAddClipboardFormatListener( (HWND)0xdead ); ok( !r, "AddClipboardFormatListener succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error %lu\n", GetLastError() ); r = pAddClipboardFormatListener( GetDesktopWindow() ); - ok( r, "AddClipboardFormatListener failed err %d\n", GetLastError()); + ok( r, "AddClipboardFormatListener failed err %ld\n", GetLastError()); r = pRemoveClipboardFormatListener( GetDesktopWindow() ); - ok( r, "RemoveClipboardFormatListener failed err %d\n", GetLastError()); + ok( r, "RemoveClipboardFormatListener failed err %ld\n", GetLastError()); }
check_messages(win, 0, 1, 0, 0, 0); @@ -1196,27 +1197,27 @@ static DWORD WINAPI clipboard_thread(void *param) SetLastError( 0xdeadbeef ); r = OpenClipboard( (HWND)0xdead ); ok( !r, "OpenClipboard succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error %lu\n", GetLastError() );
r = open_clipboard(win); - ok(r, "OpenClipboard failed: %d\n", GetLastError()); + ok(r, "OpenClipboard failed: %ld\n", GetLastError());
check_messages(win, 0, 0, 0, 0, 0);
r = EmptyClipboard(); - ok(r, "EmptyClipboard failed: %d\n", GetLastError()); + ok(r, "EmptyClipboard failed: %ld\n", GetLastError());
check_messages(win, 1, 0, 0, 0, 0);
r = EmptyClipboard(); - ok(r, "EmptyClipboard failed: %d\n", GetLastError()); + ok(r, "EmptyClipboard failed: %ld\n", GetLastError()); /* sequence changes again, even though it was already empty */ check_messages(win, 1, 0, 0, 1, 0); count = SendMessageA( win, WM_USER+5, 0, 0 ); ok( !count, "wrong format count %u on WM_DESTROYCLIPBOARD\n", count );
handle = SetClipboardData( CF_TEXT, create_textA() ); - ok(handle != 0, "SetClipboardData failed: %d\n", GetLastError()); + ok(handle != 0, "SetClipboardData failed: %ld\n", GetLastError());
check_messages(win, 1, 0, 0, 0, 0);
@@ -1234,13 +1235,13 @@ static DWORD WINAPI clipboard_thread(void *param)
EnterCriticalSection(&clipboard_cs); r = CloseClipboard(); - ok(r, "CloseClipboard failed: %d\n", GetLastError()); + ok(r, "CloseClipboard failed: %ld\n", GetLastError()); LeaveCriticalSection(&clipboard_cs);
check_messages(win, 2, 1, 1, 0, 0);
r = open_clipboard(win); - ok(r, "OpenClipboard failed: %d\n", GetLastError()); + ok(r, "OpenClipboard failed: %ld\n", GetLastError());
check_messages(win, 0, 0, 0, 0, 0);
@@ -1265,37 +1266,37 @@ static DWORD WINAPI clipboard_thread(void *param) check_messages(win, 1, 0, 0, 0, 0);
r = CloseClipboard(); - ok(r, "CloseClipboard failed: %d\n", GetLastError()); + ok(r, "CloseClipboard failed: %ld\n", GetLastError()); /* no synthesized format, so CloseClipboard doesn't change the sequence */ check_messages(win, 0, 1, 1, 0, 0);
r = open_clipboard(win); - ok(r, "OpenClipboard failed: %d\n", GetLastError()); + ok(r, "OpenClipboard failed: %ld\n", GetLastError()); r = CloseClipboard(); - ok(r, "CloseClipboard failed: %d\n", GetLastError()); + ok(r, "CloseClipboard failed: %ld\n", GetLastError()); /* nothing changed */ check_messages(win, 0, 0, 0, 0, 0);
formats = CountClipboardFormats(); r = open_clipboard(0); - ok(r, "OpenClipboard failed: %d\n", GetLastError()); + ok(r, "OpenClipboard failed: %ld\n", GetLastError()); r = EmptyClipboard(); - ok(r, "EmptyClipboard failed: %d\n", GetLastError()); + ok(r, "EmptyClipboard failed: %ld\n", GetLastError()); r = CloseClipboard(); - ok(r, "CloseClipboard failed: %d\n", GetLastError()); + ok(r, "CloseClipboard failed: %ld\n", GetLastError());
check_messages(win, 1, 1, 1, 1, 0); count = SendMessageA( win, WM_USER+5, 0, 0 ); ok( count == formats, "wrong format count %u on WM_DESTROYCLIPBOARD\n", count );
r = open_clipboard(win); - ok(r, "OpenClipboard failed: %d\n", GetLastError()); + ok(r, "OpenClipboard failed: %ld\n", GetLastError()); SetClipboardData( CF_WAVE, GlobalAlloc( GMEM_FIXED, 1 )); check_messages(win, 1, 0, 0, 0, 0);
EnterCriticalSection(&clipboard_cs); r = CloseClipboard(); - ok(r, "CloseClipboard failed: %d\n", GetLastError()); + ok(r, "CloseClipboard failed: %ld\n", GetLastError()); LeaveCriticalSection(&clipboard_cs);
check_messages(win, 0, 1, 1, 0, 0); @@ -1312,13 +1313,13 @@ static DWORD WINAPI clipboard_thread(void *param) check_messages(win, 1, 1, 1, 0, 0);
r = open_clipboard(0); - ok(r, "OpenClipboard failed: %d\n", GetLastError()); + ok(r, "OpenClipboard failed: %ld\n", GetLastError()); SetClipboardData( CF_WAVE, GlobalAlloc( GMEM_FIXED, 1 )); check_messages(win, 1, 0, 0, 0, 0);
EnterCriticalSection(&clipboard_cs); r = CloseClipboard(); - ok(r, "CloseClipboard failed: %d\n", GetLastError()); + ok(r, "CloseClipboard failed: %ld\n", GetLastError()); LeaveCriticalSection(&clipboard_cs);
check_messages(win, 0, 1, 1, 0, 0); @@ -1335,13 +1336,13 @@ static DWORD WINAPI clipboard_thread(void *param) check_messages(win, 2, 1, 1, 0, 0);
r = open_clipboard(0); - ok(r, "OpenClipboard failed: %d\n", GetLastError()); + ok(r, "OpenClipboard failed: %ld\n", GetLastError()); SetClipboardData( CF_WAVE, GlobalAlloc( GMEM_FIXED, 1 )); check_messages(win, 1, 0, 0, 0, 0);
EnterCriticalSection(&clipboard_cs); r = CloseClipboard(); - ok(r, "CloseClipboard failed: %d\n", GetLastError()); + ok(r, "CloseClipboard failed: %ld\n", GetLastError()); LeaveCriticalSection(&clipboard_cs);
check_messages(win, 0, 1, 1, 0, 0); @@ -1349,12 +1350,12 @@ static DWORD WINAPI clipboard_thread(void *param) if (cross_thread) { r = open_clipboard( win ); - ok(r, "OpenClipboard failed: %d\n", GetLastError()); + ok(r, "OpenClipboard failed: %ld\n", GetLastError()); r = EmptyClipboard(); - ok(r, "EmptyClipboard failed: %d\n", GetLastError()); + ok(r, "EmptyClipboard failed: %ld\n", GetLastError()); SetClipboardData( CF_TEXT, 0 ); r = CloseClipboard(); - ok(r, "CloseClipboard failed: %d\n", GetLastError()); + ok(r, "CloseClipboard failed: %ld\n", GetLastError());
do_render_format = TRUE; old_seq = GetClipboardSequenceNumber(); @@ -1365,20 +1366,20 @@ static DWORD WINAPI clipboard_thread(void *param) }
r = PostMessageA(win, WM_USER, 0, 0); - ok(r, "PostMessage failed: %d\n", GetLastError()); + ok(r, "PostMessage failed: %ld\n", GetLastError());
if (pRemoveClipboardFormatListener) { r = pRemoveClipboardFormatListener(win); - ok( r, "RemoveClipboardFormatListener failed err %d\n", GetLastError()); + ok( r, "RemoveClipboardFormatListener failed err %ld\n", GetLastError()); SetLastError( 0xdeadbeef ); r = pRemoveClipboardFormatListener(win); ok( !r, "RemoveClipboardFormatListener succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); r = pRemoveClipboardFormatListener( (HWND)0xdead ); ok( !r, "RemoveClipboardFormatListener succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error %lu\n", GetLastError() ); } return 0; } @@ -1401,10 +1402,10 @@ static void test_messages(void) RegisterClassA(&cls);
win = CreateWindowA("clipboard_test", NULL, 0, 0, 0, 0, 0, NULL, 0, NULL, 0); - ok(win != NULL, "CreateWindow failed: %d\n", GetLastError()); + ok(win != NULL, "CreateWindow failed: %ld\n", GetLastError());
thread = CreateThread(NULL, 0, clipboard_thread, (void*)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)) { @@ -1421,7 +1422,7 @@ static void test_messages(void) /* same tests again but inside a single thread */
win = CreateWindowA( "clipboard_test", NULL, 0, 0, 0, 0, 0, NULL, 0, NULL, 0 ); - ok( win != NULL, "CreateWindow failed: %d\n", GetLastError() ); + ok( win != NULL, "CreateWindow failed: %ld\n", GetLastError() );
clipboard_thread( win ); DestroyWindow( win ); @@ -1479,11 +1480,11 @@ static void test_handles( HWND hwnd ) hfixed = GlobalAlloc( GMEM_FIXED, 17 ); hfixed2 = GlobalAlloc( GMEM_FIXED, 17 ); ok( is_fixed( hfixed ), "expected fixed mem %p\n", hfixed ); - ok( GlobalSize( hfixed ) == 17, "wrong size %lu\n", GlobalSize( hfixed )); + ok( GlobalSize( hfixed ) == 17, "wrong size %Iu\n", GlobalSize( hfixed ));
hmoveable = GlobalAlloc( GMEM_MOVEABLE, 23 ); ok( is_moveable( hmoveable ), "expected moveable mem %p\n", hmoveable ); - ok( GlobalSize( hmoveable ) == 23, "wrong size %lu\n", GlobalSize( hmoveable )); + ok( GlobalSize( hmoveable ) == 23, "wrong size %Iu\n", GlobalSize( hmoveable ));
empty_fixed = GlobalAlloc( GMEM_FIXED, 0 ); ok( is_fixed( empty_fixed ), "expected fixed mem %p\n", empty_fixed ); @@ -1493,9 +1494,9 @@ static void test_handles( HWND hwnd ) ok( is_freed( empty_moveable ), "expected free mem %p\n", empty_moveable );
r = open_clipboard( hwnd ); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() ); r = EmptyClipboard(); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() );
h = SetClipboardData( CF_TEXT, htext ); ok( h == htext, "got %p\n", h ); @@ -1586,7 +1587,7 @@ static void test_handles( HWND hwnd )
SetLastError( 0xdeadbeef ); data = GetClipboardData( CF_RIFF ); - ok( GetLastError() == 0xdeadbeef, "unexpected last error %d\n", GetLastError() ); + ok( GetLastError() == 0xdeadbeef, "unexpected last error %ld\n", GetLastError() ); ok( !data, "wrong data %p\n", data );
h = SetClipboardData( CF_PRIVATEFIRST + 7, htext4 ); @@ -1601,7 +1602,7 @@ static void test_handles( HWND hwnd ) ok( is_freed( hfixed2 ), "expected freed mem %p\n", hfixed2 );
r = CloseClipboard(); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() );
/* data handles are still valid */ ok( is_moveable( htext ), "expected moveable mem %p\n", htext ); @@ -1616,7 +1617,7 @@ static void test_handles( HWND hwnd ) ok( is_fixed( empty_fixed ), "expected fixed mem %p\n", empty_fixed );
r = open_clipboard( hwnd ); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() );
/* and now they are freed, unless we are the owner */ if (!is_owner) @@ -1641,19 +1642,19 @@ static void test_handles( HWND hwnd )
data = GetClipboardData( format_id2 ); ok( is_fixed( data ), "expected fixed mem %p\n", data ); - ok( GlobalSize( data ) == 1, "wrong size %lu\n", GlobalSize( data )); + ok( GlobalSize( data ) == 1, "wrong size %Iu\n", GlobalSize( data ));
data = GetClipboardData( 0xdeadbeef ); ok( is_fixed( data ), "expected fixed mem %p\n", data ); - ok( GlobalSize( data ) == 17, "wrong size %lu\n", GlobalSize( data )); + ok( GlobalSize( data ) == 17, "wrong size %Iu\n", GlobalSize( data ));
data = GetClipboardData( 0xdeadbabe ); ok( is_fixed( data ), "expected fixed mem %p\n", data ); - ok( GlobalSize( data ) == 23, "wrong size %lu\n", GlobalSize( data )); + ok( GlobalSize( data ) == 23, "wrong size %Iu\n", GlobalSize( data ));
data = GetClipboardData( 0xdeadfade ); ok( is_fixed( data ) || !ptr, "expected fixed mem %p\n", data ); - if (ptr) ok( GlobalSize( data ) == 37, "wrong size %lu\n", GlobalSize( data )); + if (ptr) ok( GlobalSize( data ) == 37, "wrong size %Iu\n", GlobalSize( data )); } else { @@ -1712,7 +1713,7 @@ static void test_handles( HWND hwnd ) ok( is_fixed( empty_fixed ), "expected fixed mem %p\n", empty_fixed );
r = EmptyClipboard(); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() );
/* w2003, w2008 don't seem to free the data here */ ok( is_freed( htext ) || broken( !is_freed( htext )), "expected freed mem %p\n", htext ); @@ -1724,7 +1725,7 @@ static void test_handles( HWND hwnd ) ok( is_fixed( hfixed ), "expected fixed mem %p\n", hfixed );
r = CloseClipboard(); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() ); }
static DWORD WINAPI test_handles_thread( void *arg ) @@ -1741,7 +1742,7 @@ static DWORD WINAPI test_handles_thread2( void *arg ) char *ptr;
r = open_clipboard( 0 ); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() ); h = GetClipboardData( CF_TEXT ); ok( is_moveable( h ), "expected moveable mem %p\n", h ); ptr = GlobalLock( h ); @@ -1781,7 +1782,7 @@ static DWORD WINAPI test_handles_thread2( void *arg ) h = GetClipboardData( CF_DIBV5 ); ok( is_fixed( h ), "expected fixed mem %p\n", h ); r = CloseClipboard(); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() ); return 0; }
@@ -1796,7 +1797,7 @@ static void test_handles_process( const char *str )
format_id = RegisterClipboardFormatA( "my_cool_clipboard_format" ); r = open_clipboard( 0 ); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() ); h = GetClipboardData( CF_TEXT ); ok( is_fixed( h ), "expected fixed mem %p\n", h ); ptr = GlobalLock( h ); @@ -1848,21 +1849,21 @@ static void test_handles_process( const char *str ) ok( GetEnhMetaFileBits( h, sizeof(buffer), buffer ) > sizeof(ENHMETAHEADER), "GetEnhMetaFileBits failed on %p\n", h ); ok( ((ENHMETAHEADER *)buffer)->nRecords == 3, - "wrong records %u\n", ((ENHMETAHEADER *)buffer)->nRecords ); + "wrong records %lu\n", ((ENHMETAHEADER *)buffer)->nRecords ); trace( "enhmetafile %p\n", h ); h = GetClipboardData( CF_DSPENHMETAFILE ); ok( GetObjectType( h ) == OBJ_ENHMETAFILE, "expected enhmetafile %p\n", h ); ok( GetEnhMetaFileBits( h, sizeof(buffer), buffer ) > sizeof(ENHMETAHEADER), "GetEnhMetaFileBits failed on %p\n", h ); ok( ((ENHMETAHEADER *)buffer)->nRecords == 3, - "wrong records %u\n", ((ENHMETAHEADER *)buffer)->nRecords ); + "wrong records %lu\n", ((ENHMETAHEADER *)buffer)->nRecords ); trace( "enhmetafile2 %p\n", h ); h = GetClipboardData( CF_DIB ); ok( is_fixed( h ), "expected fixed mem %p\n", h ); h = GetClipboardData( CF_DIBV5 ); ok( is_fixed( h ), "expected fixed mem %p\n", h ); r = CloseClipboard(); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() ); }
static void test_handles_process_open( const char *str ) @@ -1885,12 +1886,12 @@ static void test_handles_process_dib( const char *str ) HANDLE h;
r = open_clipboard( 0 ); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() ); h = GetClipboardData( CF_BITMAP ); ok( !GetObjectType( h ), "expected invalid object %p\n", h ); trace( "dibsection %p\n", h ); r = CloseClipboard(); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() ); }
static void test_data_handles(void) @@ -1914,9 +1915,9 @@ static void test_data_handles(void) palette = CreatePalette( &logpalette );
r = open_clipboard( hwnd ); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() ); r = EmptyClipboard(); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() ); h = SetClipboardData( CF_TEXT, create_textA() ); ok( is_moveable( h ), "expected moveable mem %p\n", h ); h = SetClipboardData( format_id, create_textA() ); @@ -1944,13 +1945,13 @@ static void test_data_handles(void) h = SetClipboardData( CF_PRIVATEFIRST + 7, create_textA() ); ok( is_moveable( h ), "expected moveable mem %p\n", h ); r = CloseClipboard(); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() );
run_thread( test_handles_thread2, 0, __LINE__ ); run_process( "handles test" );
r = open_clipboard( hwnd ); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() ); h = GetClipboardData( CF_TEXT ); ok( is_moveable( h ), "expected moveable mem %p\n", h ); h = GetClipboardData( format_id ); @@ -1961,7 +1962,7 @@ static void test_data_handles(void) ok( is_moveable( h ), "expected moveable mem %p\n", h );
r = EmptyClipboard(); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() ); text = create_textA(); h = SetClipboardData( CF_TEXT, text ); ok( is_moveable( h ), "expected moveable mem %p\n", h ); @@ -1977,12 +1978,12 @@ static void test_data_handles(void) GlobalUnlock( h );
r = EmptyClipboard(); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() ); ok( is_fixed( h ), "expected free mem %p\n", h ); ok( is_freed( text ) || broken( is_moveable(text) ), /* w2003, w2008 */ "expected free mem %p\n", text ); r = CloseClipboard(); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() );
/* test CF_BITMAP with a DIB section */ memset( &bmi, 0, sizeof(bmi) ); @@ -1994,24 +1995,24 @@ static void test_data_handles(void) bitmap = CreateDIBSection( 0, &bmi, DIB_RGB_COLORS, &bits, 0, 0 );
r = open_clipboard( hwnd ); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() ); r = EmptyClipboard(); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() ); h = SetClipboardData( CF_BITMAP, bitmap ); ok( GetObjectType( h ) == OBJ_BITMAP, "expected bitmap %p\n", h ); trace( "dibsection %p\n", h ); r = CloseClipboard(); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() );
run_process( "handles_dib dummy" );
r = open_clipboard( hwnd ); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() ); ok( GetObjectType( bitmap ) == OBJ_BITMAP, "expected bitmap %p\n", bitmap ); r = EmptyClipboard(); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() ); r = CloseClipboard(); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() );
DestroyWindow( hwnd ); } @@ -2029,32 +2030,32 @@ static void test_GetUpdatedClipboardFormats(void)
count = 0xdeadbeef; r = pGetUpdatedClipboardFormats( NULL, 0, &count ); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() ); ok( !count, "wrong count %u\n", count );
count = 0xdeadbeef; r = pGetUpdatedClipboardFormats( NULL, 256, &count ); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() ); ok( !count, "wrong count %u\n", count );
SetLastError( 0xdeadbeef ); r = pGetUpdatedClipboardFormats( formats, ARRAY_SIZE(formats), NULL ); ok( !r, "succeeded\n" ); - ok( GetLastError() == ERROR_NOACCESS, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_NOACCESS, "wrong error %lu\n", GetLastError() );
count = 0xdeadbeef; r = pGetUpdatedClipboardFormats( formats, ARRAY_SIZE(formats), &count ); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() ); ok( !count, "wrong count %u\n", count );
r = open_clipboard( 0 ); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() ); r = EmptyClipboard(); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() );
count = 0xdeadbeef; r = pGetUpdatedClipboardFormats( formats, ARRAY_SIZE(formats), &count ); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() ); ok( !count, "wrong count %u\n", count );
SetClipboardData( CF_UNICODETEXT, 0 ); @@ -2062,7 +2063,7 @@ static void test_GetUpdatedClipboardFormats(void) count = 0xdeadbeef; memset( formats, 0xcc, sizeof(formats) ); r = pGetUpdatedClipboardFormats( formats, ARRAY_SIZE(formats), &count ); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() ); ok( count == 1, "wrong count %u\n", count ); ok( formats[0] == CF_UNICODETEXT, "wrong format %u\n", formats[0] ); ok( formats[1] == 0xcccccccc, "wrong format %u\n", formats[1] ); @@ -2071,7 +2072,7 @@ static void test_GetUpdatedClipboardFormats(void) count = 0xdeadbeef; memset( formats, 0xcc, sizeof(formats) ); r = pGetUpdatedClipboardFormats( formats, ARRAY_SIZE(formats), &count ); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() ); ok( count == 2, "wrong count %u\n", count ); ok( formats[0] == CF_UNICODETEXT, "wrong format %u\n", formats[0] ); ok( formats[1] == CF_TEXT, "wrong format %u\n", formats[1] ); @@ -2081,23 +2082,23 @@ static void test_GetUpdatedClipboardFormats(void) count = 0xdeadbeef; r = pGetUpdatedClipboardFormats( formats, 0, &count ); ok( !r, "succeeded\n" ); - ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, "wrong error %lu\n", GetLastError() ); ok( count == 2, "wrong count %u\n", count );
SetLastError( 0xdeadbeef ); count = 0xdeadbeef; r = pGetUpdatedClipboardFormats( formats, 1, &count ); ok( !r, "succeeded\n" ); - ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, "wrong error %lu\n", GetLastError() ); ok( count == 2, "wrong count %u\n", count );
r = CloseClipboard(); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() );
count = 0xdeadbeef; memset( formats, 0xcc, sizeof(formats) ); r = pGetUpdatedClipboardFormats( formats, ARRAY_SIZE(formats), &count ); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() ); ok( count == 4, "wrong count %u\n", count ); ok( formats[0] == CF_UNICODETEXT, "wrong format %u\n", formats[0] ); ok( formats[1] == CF_TEXT, "wrong format %u\n", formats[1] ); @@ -2108,21 +2109,21 @@ static void test_GetUpdatedClipboardFormats(void) count = 0xdeadbeef; memset( formats, 0xcc, sizeof(formats) ); r = pGetUpdatedClipboardFormats( formats, 2, &count ); - ok( !r, "gle %d\n", GetLastError() ); - ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, "wrong error %u\n", GetLastError() ); + ok( !r, "gle %ld\n", GetLastError() ); + ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, "wrong error %lu\n", GetLastError() ); ok( count == 4, "wrong count %u\n", count ); ok( formats[0] == 0xcccccccc, "wrong format %u\n", formats[0] );
count = 0xdeadbeef; r = pGetUpdatedClipboardFormats( NULL, 256, &count ); - ok( !r, "gle %d\n", GetLastError() ); - ok( GetLastError() == ERROR_NOACCESS, "wrong error %u\n", GetLastError() ); + ok( !r, "gle %ld\n", GetLastError() ); + ok( GetLastError() == ERROR_NOACCESS, "wrong error %lu\n", GetLastError() ); ok( count == 4, "wrong count %u\n", count );
count = 0xdeadbeef; r = pGetUpdatedClipboardFormats( NULL, 256, &count ); - ok( !r, "gle %d\n", GetLastError() ); - ok( GetLastError() == ERROR_NOACCESS, "wrong error %u\n", GetLastError() ); + ok( !r, "gle %ld\n", GetLastError() ); + ok( GetLastError() == ERROR_NOACCESS, "wrong error %lu\n", GetLastError() ); ok( count == 4, "wrong count %u\n", count ); }
@@ -2165,9 +2166,9 @@ static void test_string_data(void) #endif winetest_push_context("%d", i); r = open_clipboard( 0 ); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() ); r = EmptyClipboard(); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() ); data = GlobalAlloc( GMEM_FIXED, test_data[i].len ); if (test_data[i].strA[0]) { @@ -2188,7 +2189,7 @@ static void test_string_data(void) "wrong data %s\n", wine_dbgstr_wn( data, (test_data[i].len + 1) / sizeof(WCHAR) )); } r = CloseClipboard(); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() ); sprintf( cmd, "string_data %u", i ); run_process( cmd ); winetest_pop_context(); @@ -2205,7 +2206,7 @@ static void test_string_data_process( int i )
winetest_push_context("%d", i); r = open_clipboard( 0 ); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() ); if (test_data[i].strA[0]) { data = GetClipboardData( CF_TEXT ); @@ -2250,7 +2251,7 @@ static void test_string_data_process( int i ) } } r = CloseClipboard(); - ok( r, "gle %d\n", GetLastError() ); + ok( r, "gle %ld\n", GetLastError() ); winetest_pop_context(); }
diff --git a/dlls/user32/tests/combo.c b/dlls/user32/tests/combo.c index 82401f75a01..be4a2b4b044 100644 --- a/dlls/user32/tests/combo.c +++ b/dlls/user32/tests/combo.c @@ -1,3 +1,4 @@ +#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* Unit test suite for combo boxes. * * Copyright 2007 Mikolaj Zalewski @@ -78,7 +79,7 @@ static void test_setitemheight(DWORD style) HFONT hFont; RECT r;
- trace("Style %x\n", style); + trace("Style %lx\n", style); GetClientRect(hCombo, &r); expect_rect(r, 0, 0, 100, get_font_height(GetStockObject(SYSTEM_FONT)) + 8); SendMessageA(hCombo, CB_GETDROPPEDCONTROLRECT, 0, (LPARAM)&r); @@ -124,7 +125,7 @@ static void test_setfont(DWORD style) return; }
- trace("Style %x\n", style); + trace("Style %lx\n", style);
hCombo = build_combo(style); hFont1 = CreateFontA(10, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, SYMBOL_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH|FF_DONTCARE, "Marlett"); @@ -334,7 +335,7 @@ static void test_WM_LBUTTONDOWN(void) cbInfo.cbSize = sizeof(COMBOBOXINFO); SetLastError(0xdeadbeef); ret = GetComboBoxInfo(hCombo, &cbInfo); - ok(ret, "Failed to get combobox info structure. LastError=%d\n", + ok(ret, "Failed to get combobox info structure. LastError=%ld\n", GetLastError()); hEdit = cbInfo.hwndItem; hList = cbInfo.hwndList; @@ -346,7 +347,7 @@ static void test_WM_LBUTTONDOWN(void) x = cbInfo.rcButton.left + (cbInfo.rcButton.right-cbInfo.rcButton.left)/2; y = cbInfo.rcButton.top + (cbInfo.rcButton.bottom-cbInfo.rcButton.top)/2; result = SendMessageA(hCombo, WM_LBUTTONDOWN, 0, MAKELPARAM(x, y)); - ok(result, "WM_LBUTTONDOWN was not processed. LastError=%d\n", + ok(result, "WM_LBUTTONDOWN was not processed. LastError=%ld\n", GetLastError()); ok(SendMessageA(hCombo, CB_GETDROPPEDSTATE, 0, 0), "The dropdown list should have appeared after clicking the button.\n"); @@ -354,7 +355,7 @@ static void test_WM_LBUTTONDOWN(void) ok(GetFocus() == hEdit, "Focus not on ComboBox's Edit Control, instead on %p\n", GetFocus()); result = SendMessageA(hCombo, WM_LBUTTONUP, 0, MAKELPARAM(x, y)); - ok(result, "WM_LBUTTONUP was not processed. LastError=%d\n", + ok(result, "WM_LBUTTONUP was not processed. LastError=%ld\n", GetLastError()); ok(GetFocus() == hEdit, "Focus not on ComboBox's Edit Control, instead on %p\n", GetFocus()); @@ -365,13 +366,13 @@ static void test_WM_LBUTTONDOWN(void) x = rect.left + (rect.right-rect.left)/2; y = item_height/2 + item_height*4; result = SendMessageA(hList, WM_LBUTTONDOWN, 0, MAKELPARAM(x, y)); - ok(!result, "WM_LBUTTONDOWN was not processed. LastError=%d\n", + ok(!result, "WM_LBUTTONDOWN was not processed. LastError=%ld\n", GetLastError()); ok(GetFocus() == hEdit, "Focus not on ComboBox's Edit Control, instead on %p\n", GetFocus());
result = SendMessageA(hList, WM_MOUSEMOVE, 0, MAKELPARAM(x, y)); - ok(!result, "WM_MOUSEMOVE was not processed. LastError=%d\n", + ok(!result, "WM_MOUSEMOVE was not processed. LastError=%ld\n", GetLastError()); ok(GetFocus() == hEdit, "Focus not on ComboBox's Edit Control, instead on %p\n", GetFocus()); @@ -379,7 +380,7 @@ static void test_WM_LBUTTONDOWN(void) "The dropdown list should still be visible.\n");
result = SendMessageA(hList, WM_LBUTTONUP, 0, MAKELPARAM(x, y)); - ok(!result, "WM_LBUTTONUP was not processed. LastError=%d\n", + ok(!result, "WM_LBUTTONUP was not processed. LastError=%ld\n", GetLastError()); ok(GetFocus() == hEdit, "Focus not on ComboBox's Edit Control, instead on %p\n", GetFocus()); @@ -407,29 +408,29 @@ static void test_changesize( DWORD style) /* first make it slightly smaller */ MoveWindow( hCombo, 10, 10, clwidth - 2, clheight - 2, TRUE); GetClientRect( hCombo, &rc); - ok( rc.right - rc.left == clwidth - 2, "clientrect width is %d vs %d\n", + ok( rc.right - rc.left == clwidth - 2, "clientrect width is %ld vs %d\n", rc.right - rc.left, clwidth - 2); - ok( rc.bottom - rc.top == clheight, "clientrect height is %d vs %d\n", + ok( rc.bottom - rc.top == clheight, "clientrect height is %ld vs %d\n", rc.bottom - rc.top, clheight); SendMessageA(hCombo, CB_GETDROPPEDCONTROLRECT, 0, (LPARAM)&rc); - ok( rc.right - rc.left == clwidth - 2, "drop-down rect width is %d vs %d\n", + ok( rc.right - rc.left == clwidth - 2, "drop-down rect width is %ld vs %d\n", rc.right - rc.left, clwidth - 2); - ok( rc.bottom - rc.top == ddheight, "drop-down rect height is %d vs %d\n", + ok( rc.bottom - rc.top == ddheight, "drop-down rect height is %ld vs %d\n", rc.bottom - rc.top, ddheight); - ok( rc.right - rc.left == ddwidth -2, "drop-down rect width is %d vs %d\n", + ok( rc.right - rc.left == ddwidth -2, "drop-down rect width is %ld vs %d\n", rc.right - rc.left, ddwidth - 2); /* new cx, cy is slightly bigger than the initial values */ MoveWindow( hCombo, 10, 10, clwidth + 2, clheight + 2, TRUE); GetClientRect( hCombo, &rc); - ok( rc.right - rc.left == clwidth + 2, "clientrect width is %d vs %d\n", + ok( rc.right - rc.left == clwidth + 2, "clientrect width is %ld vs %d\n", rc.right - rc.left, clwidth + 2); - ok( rc.bottom - rc.top == clheight, "clientrect height is %d vs %d\n", + ok( rc.bottom - rc.top == clheight, "clientrect height is %ld vs %d\n", rc.bottom - rc.top, clheight); SendMessageA(hCombo, CB_GETDROPPEDCONTROLRECT, 0, (LPARAM)&rc); - ok( rc.right - rc.left == clwidth + 2, "drop-down rect width is %d vs %d\n", + ok( rc.right - rc.left == clwidth + 2, "drop-down rect width is %ld vs %d\n", rc.right - rc.left, clwidth + 2); todo_wine { - ok( rc.bottom - rc.top == clheight + 2, "drop-down rect height is %d vs %d\n", + ok( rc.bottom - rc.top == clheight + 2, "drop-down rect height is %ld vs %d\n", rc.bottom - rc.top, clheight + 2); }
@@ -481,7 +482,7 @@ static void test_editselection(void) cbInfo.cbSize = sizeof(COMBOBOXINFO); SetLastError(0xdeadbeef); ret = GetComboBoxInfo(hCombo, &cbInfo); - ok(ret, "Failed to get combobox info structure. LastError=%d\n", + ok(ret, "Failed to get combobox info structure. LastError=%ld\n", GetLastError()); hEdit = cbInfo.hwndItem;
@@ -535,7 +536,7 @@ static void test_editselection(void) cbInfo.cbSize = sizeof(COMBOBOXINFO); SetLastError(0xdeadbeef); ret = GetComboBoxInfo(hCombo, &cbInfo); - ok(ret, "Failed to get combobox info structure. LastError=%d\n", + ok(ret, "Failed to get combobox info structure. LastError=%ld\n", GetLastError()); hEdit = cbInfo.hwndItem;
@@ -614,7 +615,7 @@ static void test_editselection_focus(DWORD style) cbInfo.cbSize = sizeof(COMBOBOXINFO); SetLastError(0xdeadbeef); ret = GetComboBoxInfo(hCombo, &cbInfo); - ok(ret, "Failed to get COMBOBOXINFO structure; LastError: %u\n", GetLastError()); + ok(ret, "Failed to get COMBOBOXINFO structure; LastError: %lu\n", GetLastError()); hEdit = cbInfo.hwndItem;
hButton = CreateWindowA("Button", "OK", WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON, @@ -685,8 +686,8 @@ static void test_listbox_styles(DWORD cb_style)
style = GetWindowLongW( info.hwndList, GWL_STYLE ); exstyle = GetWindowLongW( info.hwndList, GWL_EXSTYLE ); - ok(style == expect_style, "%08x: got %08x\n", cb_style, style); - ok(exstyle == expect_exstyle, "%08x: got %08x\n", cb_style, exstyle); + ok(style == expect_style, "%08lx: got %08lx\n", cb_style, style); + ok(exstyle == expect_exstyle, "%08lx: got %08lx\n", cb_style, exstyle);
if (cb_style != CBS_SIMPLE) expect_exstyle |= WS_EX_TOPMOST; @@ -694,14 +695,14 @@ static void test_listbox_styles(DWORD cb_style) SendMessageW(combo, CB_SHOWDROPDOWN, TRUE, 0 ); style = GetWindowLongW( info.hwndList, GWL_STYLE ); exstyle = GetWindowLongW( info.hwndList, GWL_EXSTYLE ); - ok(style == (expect_style | WS_VISIBLE), "%08x: got %08x\n", cb_style, style); - ok(exstyle == expect_exstyle, "%08x: got %08x\n", cb_style, exstyle); + ok(style == (expect_style | WS_VISIBLE), "%08lx: got %08lx\n", cb_style, style); + ok(exstyle == expect_exstyle, "%08lx: got %08lx\n", cb_style, exstyle);
SendMessageW(combo, CB_SHOWDROPDOWN, FALSE, 0 ); style = GetWindowLongW( info.hwndList, GWL_STYLE ); exstyle = GetWindowLongW( info.hwndList, GWL_EXSTYLE ); - ok(style == expect_style, "%08x: got %08x\n", cb_style, style); - ok(exstyle == expect_exstyle, "%08x: got %08x\n", cb_style, exstyle); + ok(style == expect_style, "%08lx: got %08lx\n", cb_style, style); + ok(exstyle == expect_exstyle, "%08lx: got %08lx\n", cb_style, exstyle);
DestroyWindow(combo); } @@ -759,7 +760,7 @@ static void test_listbox_size(DWORD style) cbInfo.cbSize = sizeof(COMBOBOXINFO); SetLastError(0xdeadbeef); ret = GetComboBoxInfo(hCombo, &cbInfo); - ok(ret, "Failed to get COMBOBOXINFO structure; LastError: %u\n", GetLastError()); + ok(ret, "Failed to get COMBOBOXINFO structure; LastError: %lu\n", GetLastError());
hList = cbInfo.hwndList; for (i = 0; i < info_test->num_items; i++) @@ -769,7 +770,7 @@ static void test_listbox_size(DWORD style) x = cbInfo.rcButton.left + (cbInfo.rcButton.right-cbInfo.rcButton.left)/2; y = cbInfo.rcButton.top + (cbInfo.rcButton.bottom-cbInfo.rcButton.top)/2; ret = SendMessageA(hCombo, WM_LBUTTONDOWN, 0, MAKELPARAM(x, y)); - ok(ret, "WM_LBUTTONDOWN was not processed. LastError=%d\n", + ok(ret, "WM_LBUTTONDOWN was not processed. LastError=%ld\n", GetLastError()); ok(SendMessageA(hCombo, CB_GETDROPPEDSTATE, 0, 0), "The dropdown list should have appeared after clicking the button.\n"); @@ -815,7 +816,7 @@ static void test_WS_VSCROLL(void)
SetLastError(0xdeadbeef); ret = GetComboBoxInfo(hCombo, &info); - ok(ret, "Failed to get COMBOBOXINFO structure; LastError: %u\n", GetLastError()); + ok(ret, "Failed to get COMBOBOXINFO structure; LastError: %lu\n", GetLastError()); hList = info.hwndList;
for(i = 0; i < 3; i++) diff --git a/dlls/user32/tests/cursoricon.c b/dlls/user32/tests/cursoricon.c index 3e8d7c1707f..d6aee461a5d 100644 --- a/dlls/user32/tests/cursoricon.c +++ b/dlls/user32/tests/cursoricon.c @@ -1,3 +1,4 @@ +#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* * Unit test suite for cursors and icons. * @@ -321,7 +322,7 @@ static LRESULT CALLBACK callback_child(HWND hwnd, UINT msg, WPARAM wParam, LPARA
memset(&info, 0, sizeof(info)); ret = GetIconInfo(cursor, &info); - todo_wine ok(ret, "GetIconInfoEx failed with error %u\n", GetLastError()); + todo_wine ok(ret, "GetIconInfoEx failed with error %lu\n", GetLastError()); todo_wine ok(info.hbmColor != NULL, "info.hmbColor was not set\n"); todo_wine ok(info.hbmMask != NULL, "info.hmbColor was not set\n"); DeleteObject(info.hbmColor); @@ -333,7 +334,7 @@ static LRESULT CALLBACK callback_child(HWND hwnd, UINT msg, WPARAM wParam, LPARA ok(!ret || broken(ret) /* win9x */, "DestroyCursor on the active cursor succeeded.\n"); ok(error == ERROR_DESTROY_OBJECT_OF_OTHER_THREAD || error == 0xdeadbeef, /* vista */ - "Last error: %u\n", error); + "Last error: %lu\n", error); return TRUE; } case WM_DESTROY: @@ -375,12 +376,12 @@ static void do_child(void)
SetLastError(0xdeadbeef); ret = RegisterClassA(&class); - ok(ret, "Failed to register window class. Error: %u\n", GetLastError()); + ok(ret, "Failed to register window class. Error: %lu\n", GetLastError());
/* Create a window. */ child = CreateWindowA("cursor_child", "cursor_child", WS_POPUP | WS_VISIBLE, 0, 0, 200, 200, 0, 0, 0, NULL); - ok(child != 0, "CreateWindowA failed. Error: %u\n", GetLastError()); + ok(child != 0, "CreateWindowA failed. Error: %lu\n", GetLastError());
/* Let the parent know our HWND. */ PostMessageA(parent, PROC_INIT, (WPARAM) child, 0); @@ -388,7 +389,7 @@ static void do_child(void) /* Receive messages. */ while ((ret = GetMessageA(&msg, 0, 0, 0))) { - ok(ret != -1, "GetMessage failed. Error: %u\n", GetLastError()); + ok(ret != -1, "GetMessage failed. Error: %lu\n", GetLastError()); TranslateMessage(&msg); DispatchMessageA(&msg); } @@ -417,12 +418,12 @@ static void do_parent(void)
SetLastError(0xdeadbeef); ret = RegisterClassA(&class); - ok(ret, "Failed to register window class. Error: %u\n", GetLastError()); + ok(ret, "Failed to register window class. Error: %lu\n", GetLastError());
/* Create a window. */ parent = CreateWindowA("cursor_parent", "cursor_parent", WS_POPUP | WS_VISIBLE, 0, 0, 200, 200, 0, 0, 0, NULL); - ok(parent != 0, "CreateWindowA failed. Error: %u\n", GetLastError()); + ok(parent != 0, "CreateWindowA failed. Error: %lu\n", GetLastError());
/* Start child process. */ memset(&startup, 0, sizeof(startup)); @@ -430,14 +431,14 @@ static void do_parent(void) startup.dwFlags = STARTF_USESHOWWINDOW; startup.wShowWindow = SW_SHOWNORMAL;
- sprintf(path_name, "%s cursoricon %lx", test_argv[0], (INT_PTR)parent); + sprintf(path_name, "%s cursoricon %Ix", test_argv[0], (INT_PTR)parent); ok(CreateProcessA(NULL, path_name, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info), "CreateProcess failed.\n"); child_process = info.hProcess;
/* Wait for child window handle. */ while ((child == 0) && (ret = GetMessageA(&msg, parent, 0, 0))) { - ok(ret != -1, "GetMessage failed. Error: %u\n", GetLastError()); + ok(ret != -1, "GetMessage failed. Error: %lu\n", GetLastError()); TranslateMessage(&msg); DispatchMessageA(&msg); } @@ -513,10 +514,10 @@ static void check_copy_image(HBITMAP bitmap, UINT type, UINT flags, INT copyWidt .hbmMask = bitmap, }; HICON icon = CreateIconIndirect(&info); - ok(!!icon, "Failed to create icon, error %u\n", GetLastError()); + ok(!!icon, "Failed to create icon, error %lu\n", GetLastError()); copy = CopyImage(icon, type, copyWidth, copyHeight, flags); ret = DestroyIcon(icon); - ok(ret, "Failed to destroy icon, error %u\n", GetLastError()); + ok(ret, "Failed to destroy icon, error %lu\n", GetLastError()); } ok(copy != NULL, "CopyImage() failed\n"); if (copy != NULL) @@ -530,7 +531,7 @@ static void check_copy_image(HBITMAP bitmap, UINT type, UINT flags, INT copyWidt ICONINFO info;
ret = GetIconInfo((HICON)copy, &info); - ok(ret, "Failed to get icon info, error %u\n", GetLastError()); + ok(ret, "Failed to get icon info, error %lu\n", GetLastError()); GetObjectA(info.hbmColor, sizeof(copyBitmap), ©Bitmap); } copy_is_dib = (copyBitmap.bmBits != NULL); @@ -576,7 +577,7 @@ static void check_copy_image(HBITMAP bitmap, UINT type, UINT flags, INT copyWidt ICONINFO info;
ret = GetIconInfo((HICON)copy, &info); - ok(ret, "Failed to get icon info, error %u\n", GetLastError()); + ok(ret, "Failed to get icon info, error %lu\n", GetLastError()); GetObjectA(info.hbmMask, sizeof(copyBitmap), ©Bitmap);
ok(!copyBitmap.bmBits, "Expected DDB\n"); @@ -765,7 +766,7 @@ static void test_initial_cursor(void) ok(cursor == cursor2, "cursor (%p) is not IDC_WAIT (%p).\n", cursor, cursor2); } error = GetLastError(); - ok(error == 0xdeadbeef, "Last error: 0x%08x\n", error); + ok(error == 0xdeadbeef, "Last error: 0x%08lx\n", error); }
static void test_icon_info_(HICON hIcon, UINT exp_cx, UINT exp_cy, @@ -780,8 +781,8 @@ static void test_icon_info_(HICON hIcon, UINT exp_cx, UINT exp_cy, ok_(__FILE__, line)(ret, "GetIconInfo failed\n");
/* CreateIcon under XP causes info.fIcon to be 0 */ - ok_(__FILE__, line)(info.xHotspot == exp_cx/2, "info.xHotspot = %u\n", info.xHotspot); - ok_(__FILE__, line)(info.yHotspot == exp_cy/2, "info.yHotspot = %u\n", info.yHotspot); + ok_(__FILE__, line)(info.xHotspot == exp_cx/2, "info.xHotspot = %lu\n", info.xHotspot); + ok_(__FILE__, line)(info.yHotspot == exp_cy/2, "info.yHotspot = %lu\n", info.yHotspot); ok_(__FILE__, line)(info.hbmMask != 0, "info.hbmMask is NULL\n");
if (mask_bits) @@ -789,12 +790,12 @@ static void test_icon_info_(HICON hIcon, UINT exp_cx, UINT exp_cy, unsigned int exp_stride = (exp_cx + 7) / 8; exp_stride = (exp_stride + 1) & ~1; ret = GetBitmapBits(info.hbmMask, sizeof(ret_bits), ret_bits); - ok_(__FILE__, line)(ret == exp_stride * exp_mask_cy, "GetBitmapBits returned %u\n", ret); + ok_(__FILE__, line)(ret == exp_stride * exp_mask_cy, "GetBitmapBits returned %lu\n", ret); ok_(__FILE__, line)(!memcmp(ret_bits, mask_bits, ret), "mask bitmap didn't match\n"); }
ret = GetObjectA(info.hbmMask, sizeof(bmMask), &bmMask); - ok_(__FILE__, line)(ret == sizeof(bmMask), "GetObject(info.hbmMask) failed, ret %u\n", ret); + ok_(__FILE__, line)(ret == sizeof(bmMask), "GetObject(info.hbmMask) failed, ret %lu\n", ret);
ok_(__FILE__, line)(!!info.hbmColor == has_color, "got hbmColor %p\n", info.hbmColor);
@@ -808,7 +809,7 @@ static void test_icon_info_(HICON hIcon, UINT exp_cx, UINT exp_cy, ReleaseDC(0, hdc);
ret = GetObjectA(info.hbmColor, sizeof(bmColor), &bmColor); - ok_(__FILE__, line)(ret == sizeof(bmColor), "GetObject(info.hbmColor) failed, ret %u\n", ret); + ok_(__FILE__, line)(ret == sizeof(bmColor), "GetObject(info.hbmColor) failed, ret %lu\n", ret);
ok_(__FILE__, line)(bmColor.bmBitsPixel == display_bpp /* XP */ || bmColor.bmBitsPixel == exp_bpp /* Win98 */, @@ -835,24 +836,24 @@ static void test_icon_info_(HICON hIcon, UINT exp_cx, UINT exp_cy, infoex.cbSize = sizeof(infoex) - 1; ret = pGetIconInfoExA( hIcon, &infoex ); ok_(__FILE__, line)(!ret, "GetIconInfoEx succeeded\n"); - ok_(__FILE__, line)(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %d\n", GetLastError()); + ok_(__FILE__, line)(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %ld\n", GetLastError());
SetLastError( 0xdeadbeef ); infoex.cbSize = sizeof(infoex) + 1; ret = pGetIconInfoExA( hIcon, &infoex ); ok_(__FILE__, line)(!ret, "GetIconInfoEx succeeded\n"); - ok_(__FILE__, line)(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %d\n", GetLastError()); + ok_(__FILE__, line)(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %ld\n", GetLastError());
SetLastError( 0xdeadbeef ); infoex.cbSize = sizeof(infoex); ret = pGetIconInfoExA( (HICON)0xdeadbabe, &infoex ); ok_(__FILE__, line)(!ret, "GetIconInfoEx succeeded\n"); ok_(__FILE__, line)(GetLastError() == ERROR_INVALID_CURSOR_HANDLE, - "wrong error %d\n", GetLastError()); + "wrong error %ld\n", GetLastError());
infoex.cbSize = sizeof(infoex); ret = pGetIconInfoExA( hIcon, &infoex ); - ok_(__FILE__, line)(ret, "GetIconInfoEx failed err %d\n", GetLastError()); + ok_(__FILE__, line)(ret, "GetIconInfoEx failed err %ld\n", GetLastError()); ok_(__FILE__, line)(infoex.wResID == 0, "GetIconInfoEx wrong resid %x\n", infoex.wResID); ok_(__FILE__, line)(infoex.szModName[0] == 0, "GetIconInfoEx wrong module %s\n", infoex.szModName); ok_(__FILE__, line)(infoex.szResName[0] == 0, "GetIconInfoEx wrong name %s\n", infoex.szResName); @@ -912,7 +913,7 @@ static void test_CreateIcon(void) SetLastError(0xdeadbeaf); hIcon = CreateIconIndirect(&info); ok(!hIcon, "CreateIconIndirect should fail\n"); - ok(GetLastError() == 0xdeadbeaf, "wrong error %u\n", GetLastError()); + ok(GetLastError() == 0xdeadbeaf, "wrong error %lu\n", GetLastError());
info.fIcon = TRUE; info.xHotspot = 8; @@ -922,7 +923,7 @@ static void test_CreateIcon(void) SetLastError(0xdeadbeaf); hIcon = CreateIconIndirect(&info); ok(!hIcon, "CreateIconIndirect should fail\n"); - ok(GetLastError() == 0xdeadbeaf, "wrong error %u\n", GetLastError()); + ok(GetLastError() == 0xdeadbeaf, "wrong error %lu\n", GetLastError());
info.fIcon = TRUE; info.xHotspot = 8; @@ -1160,7 +1161,7 @@ static void test_LoadImageBitmap(HBITMAP hbm) HDC hdc = GetDC(NULL);
ret = GetObjectA(hbm, sizeof(bm), &bm); - ok(ret == sizeof(bm), "GetObject returned %d\n", ret); + ok(ret == sizeof(bm), "GetObject returned %ld\n", ret);
memset(&bmi, 0, sizeof(bmi)); bmi.bmiHeader.biSize = sizeof(bmi.bmiHeader); @@ -1170,9 +1171,9 @@ static void test_LoadImageBitmap(HBITMAP hbm) bmi.bmiHeader.biBitCount= 24; bmi.bmiHeader.biCompression= BI_RGB; ret = GetDIBits(hdc, hbm, 0, bm.bmHeight, &pixel, &bmi, DIB_RGB_COLORS); - ok(ret == bm.bmHeight, "%d lines were converted, not %d\n", ret, bm.bmHeight); + ok(ret == bm.bmHeight, "%ld lines were converted, not %d\n", ret, bm.bmHeight);
- ok(color_match(pixel, 0x00ffffff), "Pixel is 0x%08x\n", pixel); + ok(color_match(pixel, 0x00ffffff), "Pixel is 0x%08lx\n", pixel);
ReleaseDC(NULL, hdc); } @@ -1192,7 +1193,7 @@ static void test_LoadImageFile(const char * test_desc, const unsigned char * ima /* Create the test image. */ handle = CreateFileA(filename, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL); - ok(handle != INVALID_HANDLE_VALUE, "CreateFileA failed. %u\n", GetLastError()); + ok(handle != INVALID_HANDLE_VALUE, "CreateFileA failed. %lu\n", GetLastError()); ret = WriteFile(handle, image_data, image_size, &bytes_written, NULL); ok(ret && bytes_written == image_size, "test file created improperly.\n"); CloseHandle(handle); @@ -1205,7 +1206,7 @@ static void test_LoadImageFile(const char * test_desc, const unsigned char * ima ok(error == 0 || broken(error == 0xdeadbeef) || /* Win9x */ broken(error == ERROR_BAD_PATHNAME), /* Win98, WinMe */ - "Last error: %u\n", error); + "Last error: %lu\n", error); if (handle != NULL) DestroyCursor(handle);
/* Load as icon. For all tested formats, this should fail */ @@ -1216,7 +1217,7 @@ static void test_LoadImageFile(const char * test_desc, const unsigned char * ima ok(error == 0 || broken(error == 0xdeadbeef) || /* Win9x */ broken(error == ERROR_BAD_PATHNAME), /* Win98, WinMe */ - "Last error: %u\n", error); + "Last error: %lu\n", error); if (handle != NULL) DestroyIcon(handle);
/* Load as bitmap. Should succeed for correct bmp, fail for everything else */ @@ -1225,7 +1226,7 @@ static void test_LoadImageFile(const char * test_desc, const unsigned char * ima error = GetLastError(); ok(error == 0 || error == 0xdeadbeef, /* Win9x, WinMe */ - "Last error: %u\n", error); + "Last error: %lu\n", error);
if (expect_success) { ok(handle != NULL, "IMAGE_BITMAP failed\n"); @@ -1296,7 +1297,7 @@ static void create_ico_file(const char *filename, const test_icon_entries_t *tes
/* Create the icon. */ file = CreateFileA(filename, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL); - ok(file != INVALID_HANDLE_VALUE, "CreateFileA failed. %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "CreateFileA failed. %lu\n", GetLastError()); ret = WriteFile(file, buf, icon_size, &bytes_written, NULL); ok(ret && bytes_written == icon_size, "icon.ico created improperly.\n"); CloseHandle(file); @@ -1325,15 +1326,15 @@ static void create_bitmap_file(const char *filename, const BITMAPINFO *bmi, cons hdr.bfReserved2 = 0;
file = CreateFileA(filename, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL); - ok(file != INVALID_HANDLE_VALUE, "CreateFileA failed, result %u.\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "CreateFileA failed, result %lu.\n", GetLastError()); ret = WriteFile(file, &hdr, sizeof(hdr), &bytes_written, NULL); - ok(ret && bytes_written == sizeof(hdr), "Unexpected WriteFile() result, ret %#x, bytes_written %u.\n", + ok(ret && bytes_written == sizeof(hdr), "Unexpected WriteFile() result, ret %#x, bytes_written %lu.\n", ret, bytes_written); ret = WriteFile(file, bmi, bmi_size, &bytes_written, NULL); - ok(ret && bytes_written == bmi_size, "Unexpected WriteFile() result, ret %#x, bytes_written %u.\n", + ok(ret && bytes_written == bmi_size, "Unexpected WriteFile() result, ret %#x, bytes_written %lu.\n", ret, bytes_written); ret = WriteFile(file, bits, bits_size, &bytes_written, NULL); - ok(ret && bytes_written == bits_size, "Unexpected WriteFile() result, ret %#x, bytes_written %u.\n", + ok(ret && bytes_written == bits_size, "Unexpected WriteFile() result, ret %#x, bytes_written %lu.\n", ret, bytes_written); CloseHandle(file); } @@ -1354,7 +1355,7 @@ static void test_LoadImage_working_directory_run(char *path) create_ico_file(path_icon, &icon_desc, 1);
handle = CreateFileA(path_image, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL); - ok(handle != INVALID_HANDLE_VALUE, "run %s: CreateFileA failed. %u\n", path, GetLastError()); + ok(handle != INVALID_HANDLE_VALUE, "run %s: CreateFileA failed. %lu\n", path, GetLastError()); ret = WriteFile(handle, bmpimage, sizeof(bmpimage), &bytes_written, NULL); ok(ret && bytes_written == sizeof(bmpimage), "run %s: Test file created improperly.\n", path); CloseHandle(handle); @@ -1364,20 +1365,20 @@ static void test_LoadImage_working_directory_run(char *path) ok(handle != NULL, "run %s: LoadImage() failed.\n", path);
ret = DestroyIcon(handle); - ok(ret, "run %s: DestroyIcon failed: %d\n", path, GetLastError()); + ok(ret, "run %s: DestroyIcon failed: %ld\n", path, GetLastError());
/* Test image */ handle = LoadImageA(NULL, "test.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE); ok(handle != NULL, "run %s: LoadImageA failed.\n", path);
ret = DeleteObject(handle); - ok(ret, "run %s: DeleteObject failed: %d\n", path, GetLastError()); + ok(ret, "run %s: DeleteObject failed: %ld\n", path, GetLastError());
/* Cleanup */ ret = DeleteFileA(path_image); - ok(ret, "run %s: DeleteFileA failed: %d\n", path, GetLastError()); + ok(ret, "run %s: DeleteFileA failed: %ld\n", path, GetLastError()); ret = DeleteFileA(path_icon); - ok(ret, "run %s: DeleteFileA failed: %d\n", path, GetLastError()); + ok(ret, "run %s: DeleteFileA failed: %ld\n", path, GetLastError()); }
static void test_LoadImage_working_directory(void) @@ -1419,9 +1420,9 @@ static void test_LoadImage_working_directory(void) SetEnvironmentVariableA("PATH", old_PATH);
ret = RemoveDirectoryA(temp_dir_current); - ok(ret, "RemoveDirectoryA failed: %d\n", GetLastError()); + ok(ret, "RemoveDirectoryA failed: %ld\n", GetLastError()); ret = RemoveDirectoryA(temp_dir_PATH); - ok(ret, "RemoveDirectoryA failed: %d\n", GetLastError()); + ok(ret, "RemoveDirectoryA failed: %ld\n", GetLastError()); }
static void test_LoadImage(void) @@ -1453,20 +1454,20 @@ static void test_LoadImage(void) ok(error == 0 || broken(error == 0xdeadbeef) || /* Win9x */ broken(error == ERROR_BAD_PATHNAME), /* Win98, WinMe */ - "Last error: %u\n", error); + "Last error: %lu\n", error);
/* Test the icon information. */ SetLastError(0xdeadbeef); ret = GetIconInfo(handle, &icon_info); ok(ret, "GetIconInfo() failed.\n"); error = GetLastError(); - ok(error == 0xdeadbeef, "Last error: %u\n", error); + ok(error == 0xdeadbeef, "Last error: %lu\n", error);
if (ret) { ok(icon_info.fIcon == FALSE, "fIcon != FALSE.\n"); - ok(icon_info.xHotspot == 1, "xHotspot is %u.\n", icon_info.xHotspot); - ok(icon_info.yHotspot == 1, "yHotspot is %u.\n", icon_info.yHotspot); + ok(icon_info.xHotspot == 1, "xHotspot is %lu.\n", icon_info.xHotspot); + ok(icon_info.yHotspot == 1, "yHotspot is %lu.\n", icon_info.yHotspot); ok(icon_info.hbmColor != NULL || broken(!icon_info.hbmColor) /* no color cursor support */, "No hbmColor!\n"); ok(icon_info.hbmMask != NULL, "No hbmMask!\n"); @@ -1477,7 +1478,7 @@ static void test_LoadImage(void) ICONINFOEXA infoex; infoex.cbSize = sizeof(infoex); ret = pGetIconInfoExA( handle, &infoex ); - ok( ret, "GetIconInfoEx failed err %d\n", GetLastError() ); + ok( ret, "GetIconInfoEx failed err %ld\n", GetLastError() ); ok( infoex.wResID == 0, "GetIconInfoEx wrong resid %x\n", infoex.wResID ); ok( infoex.szModName[0] == 0, "GetIconInfoEx wrong module %s\n", infoex.szModName ); ok( infoex.szResName[0] == 0, "GetIconInfoEx wrong name %s\n", infoex.szResName ); @@ -1489,7 +1490,7 @@ static void test_LoadImage(void) ret = DestroyCursor(handle); ok(ret, "DestroyCursor() failed.\n"); error = GetLastError(); - ok(error == 0xdeadbeef, "Last error: %u\n", error); + ok(error == 0xdeadbeef, "Last error: %lu\n", error);
DeleteFileA("icon.ico");
@@ -1502,7 +1503,7 @@ static void test_LoadImage(void) ICONINFOEXW infoexW; infoexA.cbSize = sizeof(infoexA); ret = pGetIconInfoExA( handle, &infoexA ); - ok( ret, "GetIconInfoEx failed err %d\n", GetLastError() ); + ok( ret, "GetIconInfoEx failed err %ld\n", GetLastError() ); ok( infoexA.wResID == (UINT_PTR)IDI_HAND, "GetIconInfoEx wrong resid %x\n", infoexA.wResID ); /* the A version is broken on 64-bit, it truncates the string after the first char */ if (is_win64 && infoexA.szModName[0] && infoexA.szModName[1] == 0) @@ -1513,7 +1514,7 @@ static void test_LoadImage(void) ok( infoexA.szResName[0] == 0, "GetIconInfoEx wrong name %s\n", infoexA.szResName ); infoexW.cbSize = sizeof(infoexW); ret = pGetIconInfoExW( handle, &infoexW ); - ok( ret, "GetIconInfoEx failed err %d\n", GetLastError() ); + ok( ret, "GetIconInfoEx failed err %ld\n", GetLastError() ); ok( infoexW.wResID == (UINT_PTR)IDI_HAND, "GetIconInfoEx wrong resid %x\n", infoexW.wResID ); ok( GetModuleHandleW(infoexW.szModName) == GetModuleHandleA("user32.dll"), "GetIconInfoEx wrong module %s\n", wine_dbgstr_w(infoexW.szModName) ); @@ -1603,20 +1604,20 @@ static void test_CreateIconFromResource(void) handle = CreateIconFromResource((PBYTE) hotspot, CRSR_RES_SIZE, FALSE, 0x00030000); ok(handle != NULL, "Create cursor failed.\n"); ret = DestroyCursor(handle); - ok(ret, "Destroy cursor failed, error %u.\n", GetLastError()); + ok(ret, "Destroy cursor failed, error %lu.\n", GetLastError());
/* Test the icon information. */ SetLastError(0xdeadbeef); ret = GetIconInfo(handle, &icon_info); ok(ret, "GetIconInfo() failed.\n"); error = GetLastError(); - ok(error == 0xdeadbeef, "Last error: %u\n", error); + ok(error == 0xdeadbeef, "Last error: %lu\n", error);
if (ret) { ok(icon_info.fIcon == FALSE, "fIcon != FALSE.\n"); - ok(icon_info.xHotspot == 3, "xHotspot is %u.\n", icon_info.xHotspot); - ok(icon_info.yHotspot == 3, "yHotspot is %u.\n", icon_info.yHotspot); + ok(icon_info.xHotspot == 3, "xHotspot is %lu.\n", icon_info.xHotspot); + ok(icon_info.yHotspot == 3, "yHotspot is %lu.\n", icon_info.yHotspot); ok(icon_info.hbmColor != NULL || broken(!icon_info.hbmColor) /* no color cursor support */, "No hbmColor!\n"); ok(icon_info.hbmMask != NULL, "No hbmMask!\n"); @@ -1627,7 +1628,7 @@ static void test_CreateIconFromResource(void) ICONINFOEXA infoex; infoex.cbSize = sizeof(infoex); ret = pGetIconInfoExA( handle, &infoex ); - ok( ret, "GetIconInfoEx failed err %d\n", GetLastError() ); + ok( ret, "GetIconInfoEx failed err %ld\n", GetLastError() ); ok( infoex.wResID == 0, "GetIconInfoEx wrong resid %x\n", infoex.wResID ); ok( infoex.szModName[0] == 0, "GetIconInfoEx wrong module %s\n", infoex.szModName ); ok( infoex.szResName[0] == 0, "GetIconInfoEx wrong name %s\n", infoex.szResName ); @@ -1639,21 +1640,21 @@ static void test_CreateIconFromResource(void) 0x00030000); ok(handle != NULL, "Create icon failed.\n"); ret = DestroyIcon(handle); - ok(ret, "Destroy icon failed, error %u.\n", GetLastError()); + ok(ret, "Destroy icon failed, error %lu.\n", GetLastError());
/* Test the icon information. */ SetLastError(0xdeadbeef); ret = GetIconInfo(handle, &icon_info); ok(ret, "GetIconInfo() failed.\n"); error = GetLastError(); - ok(error == 0xdeadbeef, "Last error: %u\n", error); + ok(error == 0xdeadbeef, "Last error: %lu\n", error);
if (ret) { ok(icon_info.fIcon == TRUE, "fIcon != TRUE.\n"); /* Icons always have hotspot in the middle */ - ok(icon_info.xHotspot == ICON_WIDTH/2, "xHotspot is %u.\n", icon_info.xHotspot); - ok(icon_info.yHotspot == ICON_HEIGHT/2, "yHotspot is %u.\n", icon_info.yHotspot); + ok(icon_info.xHotspot == ICON_WIDTH/2, "xHotspot is %lu.\n", icon_info.xHotspot); + ok(icon_info.yHotspot == ICON_HEIGHT/2, "yHotspot is %lu.\n", icon_info.yHotspot); ok(icon_info.hbmColor != NULL, "No hbmColor!\n"); ok(icon_info.hbmMask != NULL, "No hbmMask!\n"); } @@ -1671,7 +1672,7 @@ static void test_CreateIconFromResource(void) handle = CreateIconFromResource((PBYTE) &empty_anicursor, sizeof(empty_anicursor), FALSE, 0x00030000); ok(handle != NULL, "Create cursor failed.\n"); ret = DestroyCursor(handle); - ok(ret, "Destroy cursor failed, error %u.\n", GetLastError()); + ok(ret, "Destroy cursor failed, error %lu.\n", GetLastError());
/* Test the animated cursor's information. */ SetLastError(0xdeadbeef); @@ -1680,13 +1681,13 @@ static void test_CreateIconFromResource(void) ok(ret, "GetIconInfo() failed.\n"); error = GetLastError(); todo_wine - ok(error == 0xdeadbeef, "Last error: %u\n", error); + ok(error == 0xdeadbeef, "Last error: %lu\n", error);
if (ret) { ok(icon_info.fIcon == FALSE, "fIcon != FALSE.\n"); - ok(icon_info.xHotspot == 3, "xHotspot is %u.\n", icon_info.xHotspot); - ok(icon_info.yHotspot == 3, "yHotspot is %u.\n", icon_info.yHotspot); + ok(icon_info.xHotspot == 3, "xHotspot is %lu.\n", icon_info.xHotspot); + ok(icon_info.yHotspot == 3, "yHotspot is %lu.\n", icon_info.yHotspot); ok(icon_info.hbmColor != NULL || broken(!icon_info.hbmColor) /* no color cursor support */, "No hbmColor!\n"); ok(icon_info.hbmMask != NULL, "No hbmMask!\n"); @@ -1695,27 +1696,27 @@ static void test_CreateIconFromResource(void) /* Test creating and destroying a non-shared icon. */ handle = CreateIconFromResourceEx((BYTE *)icon_header, ICON_RES_SIZE, TRUE, 0x00030000, 0, 0, LR_DEFAULTSIZE); - ok(handle != NULL, "Create icon failed, error %u.\n", GetLastError()); + ok(handle != NULL, "Create icon failed, error %lu.\n", GetLastError()); ret = DestroyIcon(handle); - ok(ret, "Destroy icon failed, error %u.\n", GetLastError()); + ok(ret, "Destroy icon failed, error %lu.\n", GetLastError()); ret = GetIconInfo(handle, &icon_info); ok(!ret, "Get info succeeded.\n"); - ok(GetLastError() == ERROR_INVALID_CURSOR_HANDLE, "Got unexpected error %u.\n", error); + ok(GetLastError() == ERROR_INVALID_CURSOR_HANDLE, "Got unexpected error %lu.\n", error);
/* Test creating and destroying a shared icon from heap bits. */ handle = CreateIconFromResourceEx((BYTE *)icon_header, ICON_RES_SIZE, TRUE, 0x00030000, 0, 0, LR_DEFAULTSIZE | LR_SHARED); - ok(handle != NULL, "Create icon failed, error %u.\n", GetLastError()); + ok(handle != NULL, "Create icon failed, error %lu.\n", GetLastError()); ret = DestroyIcon(handle); - ok(ret, "Destroy icon failed, error %u.\n", GetLastError()); + ok(ret, "Destroy icon failed, error %lu.\n", GetLastError()); ret = GetIconInfo(handle, &icon_info); - ok(ret, "Get info failed, error %u.\n", GetLastError()); + ok(ret, "Get info failed, error %lu.\n", GetLastError());
/* Test creating a shared icon from heap bits that has been created before. */ old_handle = handle; handle = CreateIconFromResourceEx((BYTE *)icon_header, ICON_RES_SIZE, TRUE, 0x00030000, 0, 0, LR_DEFAULTSIZE | LR_SHARED); - ok(handle != NULL, "Create icon failed, error %u.\n", GetLastError()); + ok(handle != NULL, "Create icon failed, error %lu.\n", GetLastError()); ok(handle != old_handle, "Expect a different handle.\n");
HeapFree(GetProcessHeap(), 0, hotspot); @@ -1724,34 +1725,34 @@ static void test_CreateIconFromResource(void) user32 = GetModuleHandleA("user32.dll"); EnumResourceNamesA(user32, (const char *)RT_GROUP_ICON, find_res_proc, (LONG_PTR)&res_name); rsrc = FindResourceA(user32, res_name, (const char *)RT_GROUP_ICON); - ok(rsrc != NULL, "Find resource failed, error %u.\n", GetLastError()); + ok(rsrc != NULL, "Find resource failed, error %lu.\n", GetLastError()); res = LoadResource(user32, rsrc); - ok(res != NULL, "Load resource failed, error %u.\n", GetLastError()); + ok(res != NULL, "Load resource failed, error %lu.\n", GetLastError()); bits = LockResource(res); - ok(bits != NULL, "Lock resource failed, error %u.\n", GetLastError()); + ok(bits != NULL, "Lock resource failed, error %lu.\n", GetLastError());
res_name = MAKEINTRESOURCEA(LookupIconIdFromDirectory(bits, TRUE)); rsrc = FindResourceA(user32, res_name, (const char *)RT_ICON); - ok(rsrc != NULL, "Find resource failed, error %u.\n", GetLastError()); + ok(rsrc != NULL, "Find resource failed, error %lu.\n", GetLastError()); size = SizeofResource(user32, rsrc); - ok(size != 0, "Get resource size failed, error %u.\n", GetLastError()); + ok(size != 0, "Get resource size failed, error %lu.\n", GetLastError()); res = LoadResource(user32, rsrc); - ok(res != NULL, "Load resource failed, error %u.\n", GetLastError()); + ok(res != NULL, "Load resource failed, error %lu.\n", GetLastError()); bits = LockResource(res); - ok(bits != NULL, "Lock resource failed, error %u.\n", GetLastError()); + ok(bits != NULL, "Lock resource failed, error %lu.\n", GetLastError());
/* Test creating and destroying a shared icon from resource bits. */ handle = CreateIconFromResourceEx(bits, size, TRUE, 0x00030000, 0, 0, LR_DEFAULTSIZE | LR_SHARED); - ok(handle != NULL, "Create icon failed, error %u\n", GetLastError()); + ok(handle != NULL, "Create icon failed, error %lu\n", GetLastError()); ret = DestroyIcon(handle); - ok(ret, "Destroy icon failed, error %u.\n", GetLastError()); + ok(ret, "Destroy icon failed, error %lu.\n", GetLastError()); ret = GetIconInfo(handle, &icon_info); - ok(ret, "Get info failed, error %u.\n", GetLastError()); + ok(ret, "Get info failed, error %lu.\n", GetLastError());
/* Test creating a shared icon from resource bits that has been created before. */ old_handle = handle; handle = CreateIconFromResourceEx(bits, size, TRUE, 0x00030000, 0, 0, LR_DEFAULTSIZE | LR_SHARED); - ok(handle != NULL, "Create icon failed, error %u.\n", GetLastError()); + ok(handle != NULL, "Create icon failed, error %lu.\n", GetLastError()); ok(handle != old_handle, "Expect a different handle.\n"); }
@@ -1790,7 +1791,7 @@ static int check_cursor_data( HDC hdc, HCURSOR hCursor, void *data, int length) for (i = 0; ret && i < length / sizeof(COLORREF); i++) { ret = color_match( ((COLORREF *)data)[i], ((COLORREF *)image)[i] ); - ok(ret, "%04x: Expected 0x%x, actually 0x%x\n", i, ((COLORREF *)data)[i], ((COLORREF *)image)[i] ); + ok(ret, "%04x: Expected 0x%lx, actually 0x%lx\n", i, ((COLORREF *)data)[i], ((COLORREF *)image)[i] ); } cleanup: HeapFree( GetProcessHeap(), 0, image ); @@ -1864,19 +1865,19 @@ static void test_GetCursorFrameInfo(void) /* Creating a static cursor. */ SetLastError(0xdeadbeef); h1 = CreateIconFromResource((PBYTE) hotspot, CRSR_RES_SIZE, FALSE, 0x00030000); - ok(h1 != NULL, "Create cursor failed (error = %d).\n", GetLastError()); + ok(h1 != NULL, "Create cursor failed (error = %ld).\n", GetLastError());
/* Check GetCursorFrameInfo behavior on a static cursor */ rate = steps = 0xdead; h2 = pGetCursorFrameInfo(h1, 0xdead, 0xdead, &rate, &steps); ok(h1 == h2, "GetCursorFrameInfo() failed: (%p != %p).\n", h1, h2); - ok(rate == 0, "GetCursorFrameInfo() unexpected param 4 value (0x%x != 0x0).\n", rate); - ok(steps == 1, "GetCursorFrameInfo() unexpected param 5 value (%d != 1).\n", steps); + ok(rate == 0, "GetCursorFrameInfo() unexpected param 4 value (0x%lx != 0x0).\n", rate); + ok(steps == 1, "GetCursorFrameInfo() unexpected param 5 value (%ld != 1).\n", steps);
/* Clean up static cursor. */ SetLastError(0xdeadbeef); ret = DestroyCursor(h1); - ok(ret, "DestroyCursor() failed (error = %d).\n", GetLastError()); + ok(ret, "DestroyCursor() failed (error = %ld).\n", GetLastError());
/* Creating a single-frame animated cursor. */ empty_anicursor.frames[0].data.icon_info.idType = 2; /* type: cursor */ @@ -1885,7 +1886,7 @@ static void test_GetCursorFrameInfo(void) memcpy( &empty_anicursor.frames[0].data.bmi_data.data[0], &frame_identifier[0], sizeof(DWORD) ); SetLastError(0xdeadbeef); h1 = CreateIconFromResource((PBYTE) &empty_anicursor, sizeof(empty_anicursor), FALSE, 0x00030000); - ok(h1 != NULL, "Create cursor failed (error = %d).\n", GetLastError()); + ok(h1 != NULL, "Create cursor failed (error = %ld).\n", GetLastError());
/* Check GetCursorFrameInfo behavior on a single-frame animated cursor */ rate = steps = 0xdead; @@ -1893,14 +1894,14 @@ static void test_GetCursorFrameInfo(void) ok(h1 == h2, "GetCursorFrameInfo() failed: (%p != %p).\n", h1, h2); ret = check_cursor_data( hdc, h2, &frame_identifier[0], sizeof(DWORD) ); ok(ret, "GetCursorFrameInfo() returned wrong cursor data for frame 0.\n"); - ok(rate == 0x0, "GetCursorFrameInfo() unexpected param 4 value (0x%x != 0x0).\n", rate); + ok(rate == 0x0, "GetCursorFrameInfo() unexpected param 4 value (0x%lx != 0x0).\n", rate); ok(steps == empty_anicursor.header.header.num_steps, - "GetCursorFrameInfo() unexpected param 5 value (%d != 1).\n", steps); + "GetCursorFrameInfo() unexpected param 5 value (%ld != 1).\n", steps);
/* Clean up single-frame animated cursor. */ SetLastError(0xdeadbeef); ret = DestroyCursor(h1); - ok(ret, "DestroyCursor() failed (error = %d).\n", GetLastError()); + ok(ret, "DestroyCursor() failed (error = %ld).\n", GetLastError());
/* Creating a multi-frame animated cursor. */ for (i=0; i<empty_anicursor3.header.header.num_frames; i++) @@ -1912,14 +1913,14 @@ static void test_GetCursorFrameInfo(void) } SetLastError(0xdeadbeef); h1 = CreateIconFromResource((PBYTE) &empty_anicursor3, sizeof(empty_anicursor3), FALSE, 0x00030000); - ok(h1 != NULL, "Create cursor failed (error = %d).\n", GetLastError()); + ok(h1 != NULL, "Create cursor failed (error = %ld).\n", GetLastError());
/* Check number of steps in multi-frame animated cursor */ i=0; while (DrawIconEx(hdc, 0, 0, h1, 32, 32, i, NULL, DI_NORMAL)) i++; ok(i == empty_anicursor3.header.header.num_steps, - "Unexpected number of steps in cursor (%d != %d)\n", + "Unexpected number of steps in cursor (%d != %ld)\n", i, empty_anicursor3.header.header.num_steps);
/* Check GetCursorFrameInfo behavior on a multi-frame animated cursor */ @@ -1931,10 +1932,10 @@ static void test_GetCursorFrameInfo(void) ret = check_cursor_data( hdc, h2, &frame_identifier[i], sizeof(DWORD) ); ok(ret, "GetCursorFrameInfo() returned wrong cursor data for frame %d.\n", i); ok(rate == empty_anicursor3.header.header.display_rate, - "GetCursorFrameInfo() unexpected param 4 value (0x%x != 0x%x).\n", + "GetCursorFrameInfo() unexpected param 4 value (0x%lx != 0x%lx).\n", rate, empty_anicursor3.header.header.display_rate); ok(steps == empty_anicursor3.header.header.num_steps, - "GetCursorFrameInfo() unexpected param 5 value (%d != %d).\n", + "GetCursorFrameInfo() unexpected param 5 value (%ld != %ld).\n", steps, empty_anicursor3.header.header.num_steps); }
@@ -1944,28 +1945,28 @@ static void test_GetCursorFrameInfo(void) ok(h2 == 0, "GetCursorFrameInfo() failed for cursor %p: (%p != 0).\n", h1, h2); ok(rate == 0xdead || broken(rate == empty_anicursor3.header.header.display_rate) /*win2k*/ || broken(rate == ~0) /*win2k (sporadic)*/, - "GetCursorFrameInfo() unexpected param 4 value (0x%x != 0xdead).\n", rate); + "GetCursorFrameInfo() unexpected param 4 value (0x%lx != 0xdead).\n", rate); ok(steps == 0xdead || broken(steps == empty_anicursor3.header.header.num_steps) /*win2k*/ || broken(steps == 0) /*win2k (sporadic)*/, - "GetCursorFrameInfo() unexpected param 5 value (0x%x != 0xdead).\n", steps); + "GetCursorFrameInfo() unexpected param 5 value (0x%lx != 0xdead).\n", steps);
/* Clean up multi-frame animated cursor. */ SetLastError(0xdeadbeef); ret = DestroyCursor(h1); - ok(ret, "DestroyCursor() failed (error = %d).\n", GetLastError()); + ok(ret, "DestroyCursor() failed (error = %ld).\n", GetLastError());
/* Create a multi-frame animated cursor with num_steps == 1 */ empty_anicursor3.header.header.num_steps = 1; SetLastError(0xdeadbeef); h1 = CreateIconFromResource((PBYTE) &empty_anicursor3, sizeof(empty_anicursor3), FALSE, 0x00030000); - ok(h1 != NULL, "Create cursor failed (error = %d).\n", GetLastError()); + ok(h1 != NULL, "Create cursor failed (error = %ld).\n", GetLastError());
/* Check number of steps in multi-frame animated cursor (mismatch between steps and frames) */ i=0; while (DrawIconEx(hdc, 0, 0, h1, 32, 32, i, NULL, DI_NORMAL)) i++; ok(i == empty_anicursor3.header.header.num_steps, - "Unexpected number of steps in cursor (%d != %d)\n", + "Unexpected number of steps in cursor (%d != %ld)\n", i, empty_anicursor3.header.header.num_steps);
/* Check GetCursorFrameInfo behavior on rate 0 for a multi-frame animated cursor (with num_steps == 1) */ @@ -1975,10 +1976,10 @@ static void test_GetCursorFrameInfo(void) ret = check_cursor_data( hdc, h2, &frame_identifier[0], sizeof(DWORD) ); ok(ret, "GetCursorFrameInfo() returned wrong cursor data for frame 0.\n"); ok(rate == empty_anicursor3.header.header.display_rate, - "GetCursorFrameInfo() unexpected param 4 value (0x%x != 0x%x).\n", + "GetCursorFrameInfo() unexpected param 4 value (0x%lx != 0x%lx).\n", rate, empty_anicursor3.header.header.display_rate); ok(steps == ~0 || broken(steps == empty_anicursor3.header.header.num_steps) /*win2k*/, - "GetCursorFrameInfo() unexpected param 5 value (%d != ~0).\n", steps); + "GetCursorFrameInfo() unexpected param 5 value (%ld != ~0).\n", steps);
/* Check GetCursorFrameInfo behavior on rate 1 for a multi-frame animated cursor (with num_steps == 1) */ rate = steps = 0xdead; @@ -1986,15 +1987,15 @@ static void test_GetCursorFrameInfo(void) ok(h2 == 0, "GetCursorFrameInfo() failed for cursor %p: (%p != 0).\n", h1, h2); ok(rate == 0xdead || broken(rate == empty_anicursor3.header.header.display_rate) /*win2k*/ || broken(rate == ~0) /*win2k (sporadic)*/, - "GetCursorFrameInfo() unexpected param 4 value (0x%x != 0xdead).\n", rate); + "GetCursorFrameInfo() unexpected param 4 value (0x%lx != 0xdead).\n", rate); ok(steps == 0xdead || broken(steps == empty_anicursor3.header.header.num_steps) /*win2k*/ || broken(steps == 0) /*win2k (sporadic)*/, - "GetCursorFrameInfo() unexpected param 5 value (%d != 0xdead).\n", steps); + "GetCursorFrameInfo() unexpected param 5 value (%ld != 0xdead).\n", steps);
/* Clean up multi-frame animated cursor. */ SetLastError(0xdeadbeef); ret = DestroyCursor(h1); - ok(ret, "DestroyCursor() failed (error = %d).\n", GetLastError()); + ok(ret, "DestroyCursor() failed (error = %ld).\n", GetLastError());
/* Creating a multi-frame animated cursor with rate data. */ for (i=0; i<empty_anicursor3_seq.header.header.num_frames; i++) @@ -2006,14 +2007,14 @@ static void test_GetCursorFrameInfo(void) } SetLastError(0xdeadbeef); h1 = CreateIconFromResource((PBYTE) &empty_anicursor3_seq, sizeof(empty_anicursor3_seq), FALSE, 0x00030000); - ok(h1 != NULL, "Create cursor failed (error = %x).\n", GetLastError()); + ok(h1 != NULL, "Create cursor failed (error = %lx).\n", GetLastError());
/* Check number of steps in multi-frame animated cursor with rate data */ i=0; while (DrawIconEx(hdc, 0, 0, h1, 32, 32, i, NULL, DI_NORMAL)) i++; ok(i == empty_anicursor3_seq.header.header.num_steps, - "Unexpected number of steps in cursor (%d != %d)\n", + "Unexpected number of steps in cursor (%d != %ld)\n", i, empty_anicursor3_seq.header.header.num_steps);
/* Check GetCursorFrameInfo behavior on a multi-frame animated cursor with rate data */ @@ -2027,17 +2028,17 @@ static void test_GetCursorFrameInfo(void) ret = check_cursor_data( hdc, h2, &frame_identifier[frame_id], sizeof(DWORD) ); ok(ret, "GetCursorFrameInfo() returned wrong cursor data for frame %d.\n", i); ok(rate == empty_anicursor3_seq.rates.rate[i], - "GetCursorFrameInfo() unexpected param 4 value (0x%x != 0x%x).\n", + "GetCursorFrameInfo() unexpected param 4 value (0x%lx != 0x%lx).\n", rate, empty_anicursor3_seq.rates.rate[i]); ok(steps == empty_anicursor3_seq.header.header.num_steps, - "GetCursorFrameInfo() unexpected param 5 value (%d != %d).\n", + "GetCursorFrameInfo() unexpected param 5 value (%ld != %ld).\n", steps, empty_anicursor3_seq.header.header.num_steps); }
/* Clean up multi-frame animated cursor with rate data. */ SetLastError(0xdeadbeef); ret = DestroyCursor(h1); - ok(ret, "DestroyCursor() failed (error = %d).\n", GetLastError()); + ok(ret, "DestroyCursor() failed (error = %ld).\n", GetLastError());
HeapFree(GetProcessHeap(), 0, hotspot); cleanup: @@ -2106,8 +2107,8 @@ static void check_alpha_draw(HDC hdc, BOOL drawiconex, BOOL alpha, int bpp, int result = GetPixel(hdc, 0, 0); ok (color_match(result, modern_expected) || /* Windows 2000 and up */ broken(color_match(result, legacy_expected)), /* Windows NT 4.0, 9X and below */ - "%s. Expected a close match to %06X (modern) or %06X (legacy) with %s. " - "Got %06X from line %d\n", + "%s. Expected a close match to %06lX (modern) or %06lX (legacy) with %s. " + "Got %06lX from line %d\n", alpha ? "Alpha blending" : "Not alpha blending", modern_expected, legacy_expected, drawiconex ? "DrawIconEx" : "DrawIcon", result, line); } @@ -2127,7 +2128,7 @@ static void check_DrawIcon(HDC hdc, BOOL maskvalue, UINT32 color, int bpp, COLOR ok (color_match(result, modern_expected) || /* Windows 2000 and up */ broken(color_match(result, legacy_expected)), /* Windows NT 4.0, 9X and below */ "Overlaying Mask %d on Color %06X with DrawIcon. " - "Expected a close match to %06X (modern), or %06X (legacy). Got %06X from line %d\n", + "Expected a close match to %06lX (modern), or %06lX (legacy). Got %06lX from line %d\n", maskvalue, color, modern_expected, legacy_expected, result, line);
result = GetPixel(hdc, GetSystemMetrics(SM_CXICON)-1, GetSystemMetrics(SM_CYICON)-1); @@ -2135,14 +2136,14 @@ static void check_DrawIcon(HDC hdc, BOOL maskvalue, UINT32 color, int bpp, COLOR ok (color_match(result, modern_expected) || /* Windows 2000 and up */ broken(color_match(result, legacy_expected)), /* Windows NT 4.0, 9X and below */ "Overlaying Mask %d on Color %06X with DrawIcon. " - "Expected a close match to %06X (modern), or %06X (legacy). Got %06X from line %d\n", + "Expected a close match to %06lX (modern), or %06lX (legacy). Got %06lX from line %d\n", maskvalue, color, modern_expected, legacy_expected, result, line);
result = GetPixel(hdc, GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON));
ok (color_match(result, background), "Overlaying Mask %d on Color %06X with DrawIcon. " - "Expected unchanged background color %06X. Got %06X from line %d\n", + "Expected unchanged background color %06lX. Got %06lX from line %d\n", maskvalue, color, background, result, line); }
@@ -2226,7 +2227,7 @@ static void check_DrawIconEx(HDC hdc, BOOL maskvalue, UINT32 color, int bpp, UIN ok (color_match(result, modern_expected) || /* Windows 2000 and up */ broken(color_match(result, legacy_expected)), /* Windows NT 4.0, 9X and below */ "Overlaying Mask %d on Color %06X with DrawIconEx flags %08X. " - "Expected a close match to %06X (modern) or %06X (legacy). Got %06X from line %d\n", + "Expected a close match to %06lX (modern) or %06lX (legacy). Got %06lX from line %d\n", maskvalue, color, flags, modern_expected, legacy_expected, result, line); }
@@ -2375,7 +2376,7 @@ static void check_DrawState_Color(HDC hdc, BOOL maskvalue, UINT32 color, int bpp ok (color_match(result, modern_expected) || /* Windows 2000 and up */ broken(color_match(result, legacy_expected)), /* Windows NT 4.0, 9X and below */ "DrawState drawing Icon with Overlaying Mask %d on Color %06X with flags %08X. " - "Expected a close match to %06X (modern) or %06X (legacy). Got %06X from line %d\n", + "Expected a close match to %06lX (modern) or %06lX (legacy). Got %06lX from line %d\n", maskvalue, color, (DST_ICON | flags), modern_expected, legacy_expected, result, line); }
@@ -2473,7 +2474,7 @@ static void test_SetCursor(void) thread = CreateThread( NULL, 0, set_cursor_thread, 0, 0, &id ); WaitForSingleObject( thread, 1000 ); GetExitCodeThread( thread, &result ); - ok( result == (DWORD_PTR)cursor, "wrong thread cursor %x/%p\n", result, cursor ); + ok( result == (DWORD_PTR)cursor, "wrong thread cursor %lx/%p\n", result, cursor );
hdc = GetDC(0); display_bpp = GetDeviceCaps(hdc, BITSPIXEL); @@ -2500,26 +2501,26 @@ static void test_SetCursor(void) thread = CreateThread( NULL, 0, set_cursor_thread, 0, 0, &id ); WaitForSingleObject( thread, 1000 ); GetExitCodeThread( thread, &result ); - ok( result == (DWORD_PTR)old_cursor, "wrong thread cursor %x/%p\n", result, old_cursor ); + ok( result == (DWORD_PTR)old_cursor, "wrong thread cursor %lx/%p\n", result, old_cursor );
SetCursor( 0 ); ok( GetCursor() == 0, "wrong cursor %p\n", GetCursor() ); thread = CreateThread( NULL, 0, set_cursor_thread, 0, 0, &id ); WaitForSingleObject( thread, 1000 ); GetExitCodeThread( thread, &result ); - ok( result == (DWORD_PTR)old_cursor, "wrong thread cursor %x/%p\n", result, old_cursor ); + ok( result == (DWORD_PTR)old_cursor, "wrong thread cursor %lx/%p\n", result, old_cursor );
thread = CreateThread( NULL, 0, set_cursor_thread, cursor, 0, &id ); WaitForSingleObject( thread, 1000 ); GetExitCodeThread( thread, &result ); - ok( result == (DWORD_PTR)old_cursor, "wrong thread cursor %x/%p\n", result, old_cursor ); + ok( result == (DWORD_PTR)old_cursor, "wrong thread cursor %lx/%p\n", result, old_cursor ); ok( GetCursor() == 0, "wrong cursor %p/0\n", GetCursor() );
parent_id = GetCurrentThreadId(); thread = CreateThread( NULL, 0, set_cursor_thread, cursor, 0, &id ); WaitForSingleObject( thread, 1000 ); GetExitCodeThread( thread, &result ); - ok( result == (DWORD_PTR)old_cursor, "wrong thread cursor %x/%p\n", result, old_cursor ); + ok( result == (DWORD_PTR)old_cursor, "wrong thread cursor %lx/%p\n", result, old_cursor ); ok( GetCursor() == cursor, "wrong cursor %p/0\n", cursor );
if (pGetCursorInfo) @@ -2537,7 +2538,7 @@ static void test_SetCursor(void) error = GetLastError(); ok( cursor == 0, "wrong cursor %p/0\n", cursor ); ok( error == ERROR_INVALID_CURSOR_HANDLE || broken( error == 0xdeadbeef ), /* win9x */ - "wrong error %u\n", error ); + "wrong error %lu\n", error );
if (pGetCursorInfo) { @@ -2615,7 +2616,7 @@ static void test_ShowCursor(void) SetEvent( event_next ); WaitForSingleObject( thread, 1000 ); GetExitCodeThread( thread, &result ); - ok( result == -1, "wrong thread count %d\n", result ); + ok( result == -1, "wrong thread count %ld\n", result ); count = ShowCursor( FALSE ); ok( count == -4, "wrong count %d\n", count );
@@ -2626,7 +2627,7 @@ static void test_ShowCursor(void) SetEvent( event_next ); WaitForSingleObject( thread, 1000 ); GetExitCodeThread( thread, &result ); - ok( result == 1, "wrong thread count %d\n", result ); + ok( result == 1, "wrong thread count %ld\n", result ); count = ShowCursor( TRUE ); ok( count == -2, "wrong count %d\n", count );
@@ -2638,7 +2639,7 @@ static void test_ShowCursor(void) SetEvent( event_next ); WaitForSingleObject( thread, 1000 ); GetExitCodeThread( thread, &result ); - ok( result == -3, "wrong thread count %d\n", result ); + ok( result == -3, "wrong thread count %ld\n", result ); count = ShowCursor( FALSE ); ok( count == -2, "wrong count %d\n", count );
@@ -2649,7 +2650,7 @@ static void test_ShowCursor(void) SetEvent( event_next ); WaitForSingleObject( thread, 1000 ); GetExitCodeThread( thread, &result ); - ok( result == 1, "wrong thread count %d\n", result ); + ok( result == 1, "wrong thread count %ld\n", result ); count = ShowCursor( FALSE ); ok( count == -2, "wrong count %d\n", count );
@@ -2705,7 +2706,7 @@ static void test_DestroyCursor(void) ret = DestroyCursor(cursor); ok(!ret || broken(ret) /* succeeds on win9x */, "DestroyCursor on the active cursor succeeded\n"); error = GetLastError(); - ok(error == 0xdeadbeef, "Last error: %u\n", error); + ok(error == 0xdeadbeef, "Last error: %lu\n", error);
new_cursor = GetCursor(); if (ret) /* win9x replaces cursor by another one on destroy */ @@ -2718,7 +2719,7 @@ static void test_DestroyCursor(void) ok( !ret || broken(ret), /* nt4 */ "GetIconInfo succeeded\n" ); ok( GetLastError() == ERROR_INVALID_CURSOR_HANDLE || broken(GetLastError() == 0xdeadbeef), /* win9x */ - "wrong error %u\n", GetLastError() ); + "wrong error %lu\n", GetLastError() );
if (ret) /* nt4 delays destruction until cursor changes */ { @@ -2729,13 +2730,13 @@ static void test_DestroyCursor(void) ret = DestroyCursor( cursor ); ok( !ret, "DestroyCursor succeeded\n" ); ok( GetLastError() == ERROR_INVALID_CURSOR_HANDLE || GetLastError() == 0xdeadbeef, - "wrong error %u\n", GetLastError() ); + "wrong error %lu\n", GetLastError() );
SetLastError(0xdeadbeef); cursor2 = SetCursor( cursor ); ok( cursor2 == cursor, "SetCursor returned %p/%p\n", cursor2, cursor); ok( GetLastError() == ERROR_INVALID_CURSOR_HANDLE || GetLastError() == 0xdeadbeef, - "wrong error %u\n", GetLastError() ); + "wrong error %lu\n", GetLastError() ); } else { @@ -2744,7 +2745,7 @@ static void test_DestroyCursor(void) ok(!cursor2, "CopyCursor succeeded\n" ); ok( GetLastError() == ERROR_INVALID_CURSOR_HANDLE || broken(GetLastError() == 0xdeadbeef), /* win9x */ - "wrong error %u\n", GetLastError() ); + "wrong error %lu\n", GetLastError() );
SetLastError(0xdeadbeef); ret = DestroyCursor( cursor ); @@ -2753,13 +2754,13 @@ static void test_DestroyCursor(void) else ok( !ret, "DestroyCursor succeeded\n" ); ok( GetLastError() == ERROR_INVALID_CURSOR_HANDLE || GetLastError() == 0xdeadbeef, - "wrong error %u\n", GetLastError() ); + "wrong error %lu\n", GetLastError() );
SetLastError(0xdeadbeef); cursor2 = SetCursor( cursor ); ok(!cursor2, "SetCursor returned %p/%p\n", cursor2, cursor); ok( GetLastError() == ERROR_INVALID_CURSOR_HANDLE || GetLastError() == 0xdeadbeef, - "wrong error %u\n", GetLastError() ); + "wrong error %lu\n", GetLastError() ); }
cursor2 = GetCursor(); @@ -2771,7 +2772,7 @@ static void test_DestroyCursor(void) ok(cursor2 == new_cursor, "SetCursor returned %p/%p\n", cursor2, cursor); else ok(!cursor2, "SetCursor returned %p/%p\n", cursor2, cursor); - ok( GetLastError() == 0xdeadbeef, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == 0xdeadbeef, "wrong error %lu\n", GetLastError() );
cursor2 = GetCursor(); ok(!cursor2, "GetCursor returned %p/%p\n", cursor2, cursor); @@ -2783,7 +2784,7 @@ static void test_DestroyCursor(void) else ok( !ret, "DestroyCursor succeeded\n" ); ok( GetLastError() == ERROR_INVALID_CURSOR_HANDLE || GetLastError() == 0xdeadbeef, - "wrong error %u\n", GetLastError() ); + "wrong error %lu\n", GetLastError() );
DeleteObject(cursorInfo.hbmMask); DeleteObject(cursorInfo.hbmColor); @@ -2795,13 +2796,13 @@ static void test_DestroyCursor(void) ret = DestroyCursor(cursor); ok(ret || broken(!ret) /* fails on win9x */, "DestroyCursor on the active cursor failed.\n"); error = GetLastError(); - ok(error == 0xdeadbeef, "Last error: 0x%08x\n", error); + ok(error == 0xdeadbeef, "Last error: 0x%08lx\n", error);
/* Try setting the cursor to a destroyed OEM cursor. */ SetLastError(0xdeadbeef); SetCursor(cursor); error = GetLastError(); - ok(error == 0xdeadbeef, "Last error: 0x%08x\n", error); + ok(error == 0xdeadbeef, "Last error: 0x%08lx\n", error);
/* Check if LoadCursor() returns the same handle with the same icon. */ cursor2 = LoadCursorA(NULL, (LPCSTR)IDC_ARROW); @@ -2908,7 +2909,7 @@ static void test_monochrome_icon(void)
handle = CreateFileA("icon.ico", GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL); - ok(handle != INVALID_HANDLE_VALUE, "CreateFileA failed. %u\n", GetLastError()); + ok(handle != INVALID_HANDLE_VALUE, "CreateFileA failed. %lu\n", GetLastError()); ret = WriteFile(handle, icon_data, icon_size, &bytes_written, NULL); ok(ret && bytes_written == icon_size, "icon.ico created improperly.\n"); CloseHandle(handle); @@ -2916,7 +2917,7 @@ static void test_monochrome_icon(void) handle = LoadImageA(NULL, "icon.ico", IMAGE_ICON, 0, 0, LR_LOADFROMFILE); ok(handle != NULL || broken(use_core_info && handle == NULL), /* Win 8, 10 */ - "LoadImage() failed with %u.\n", GetLastError()); + "LoadImage() failed with %lu.\n", GetLastError()); if (handle == NULL) { skip("Icon failed to load: %s, %s\n", @@ -2927,12 +2928,12 @@ static void test_monochrome_icon(void) }
ret = GetIconInfo(handle, &icon_info); - ok(ret, "GetIconInfo() failed with %u.\n", GetLastError()); + ok(ret, "GetIconInfo() failed with %lu.\n", GetLastError()); if (ret) { ok(icon_info.fIcon == TRUE, "fIcon is %u.\n", icon_info.fIcon); - ok(icon_info.xHotspot == 0, "xHotspot is %u.\n", icon_info.xHotspot); - ok(icon_info.yHotspot == 0, "yHotspot is %u.\n", icon_info.yHotspot); + ok(icon_info.xHotspot == 0, "xHotspot is %lu.\n", icon_info.xHotspot); + ok(icon_info.yHotspot == 0, "yHotspot is %lu.\n", icon_info.yHotspot); if (monochrome) ok(icon_info.hbmColor == NULL, "Got hbmColor %p!\n", icon_info.hbmColor); else @@ -2941,7 +2942,7 @@ static void test_monochrome_icon(void) }
ret = DestroyIcon(handle); - ok(ret, "DestroyIcon() failed with %u.\n", GetLastError()); + ok(ret, "DestroyIcon() failed with %lu.\n", GetLastError()); DeleteFileA("icon.ico"); }
@@ -2986,7 +2987,7 @@ static void compare_bitmap_bits_(unsigned int line, HDC hdc, HBITMAP bitmap, BIT result_bits = HeapAlloc(GetProcessHeap(), 0, result_bits_size); ret = GetDIBits(hdc, bitmap, 0, bmi->bmiHeader.biHeight, result_bits, bmi, DIB_RGB_COLORS); - ok(ret == bmi->bmiHeader.biHeight, "Unexpected GetDIBits result %d, GetLastError() %u.\n", + ok(ret == bmi->bmiHeader.biHeight, "Unexpected GetDIBits result %d, GetLastError() %lu.\n", ret, GetLastError()); for (row = 0; row < bmi->bmiHeader.biHeight; ++row) for (column = 0; column < bmi->bmiHeader.biWidth; ++column) @@ -2999,7 +3000,7 @@ static void compare_bitmap_bits_(unsigned int line, HDC hdc, HBITMAP bitmap, BIT todo_wine_if(allow_todo && result != expected) ok_(__FILE__, line)(result == expected || broken(expected_broken_bits && result == get_color_from_bits(expected_broken_bits, bmi, row, column)), - "Colors do not match, got 0x%06x, expected 0x%06x, test_index %u, row %u, column %u.\n", + "Colors do not match, got 0x%06lx, expected 0x%06lx, test_index %u, row %u, column %u.\n", result, expected, test_index, row, column); } HeapFree(GetProcessHeap(), 0, result_bits); @@ -3130,12 +3131,12 @@ static void test_Image_StretchMode(void) bmi_output->bmiHeader.biHeight = tests[test_index].output_height;
bitmap = CreateDIBSection(hdc, bmi, DIB_RGB_COLORS, (void **)&bits, NULL, 0); - ok(bitmap && bits, "CreateDIBSection() failed, result %u.\n", GetLastError()); + ok(bitmap && bits, "CreateDIBSection() failed, result %lu.\n", GetLastError()); memcpy(bits, tests[test_index].test_bits, tests[test_index].test_bits_size);
bitmap_copy = CopyImage(bitmap, IMAGE_BITMAP, tests[test_index].output_width, tests[test_index].output_height, LR_CREATEDIBSECTION); - ok(!!bitmap_copy, "CopyImage() failed, result %u.\n", GetLastError()); + ok(!!bitmap_copy, "CopyImage() failed, result %lu.\n", GetLastError());
compare_bitmap_bits(hdc, bitmap_copy, bmi_output, tests[test_index].result_bits_size, tests[test_index].expected_bits, test_index, tests[test_index].allow_todo, @@ -3146,7 +3147,7 @@ static void test_Image_StretchMode(void) create_bitmap_file(filename, bmi, tests[test_index].test_bits); bitmap = LoadImageA(NULL, filename, IMAGE_BITMAP, tests[test_index].output_width, tests[test_index].output_height, LR_CREATEDIBSECTION | LR_LOADFROMFILE); - ok(!!bitmap, "LoadImageA() failed, result %u.\n", GetLastError()); + ok(!!bitmap, "LoadImageA() failed, result %lu.\n", GetLastError()); DeleteFileA(filename); compare_bitmap_bits(hdc, bitmap, bmi_output, tests[test_index].result_bits_size, tests[test_index].expected_bits, test_index, tests[test_index].allow_todo, diff --git a/dlls/user32/tests/dce.c b/dlls/user32/tests/dce.c index 861150f9a88..5f0eb928f53 100644 --- a/dlls/user32/tests/dce.c +++ b/dlls/user32/tests/dce.c @@ -1,3 +1,4 @@ +#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* * Unit tests for DCE support * @@ -513,10 +514,10 @@ static void test_begin_paint(void) EndPaint( hwnd_parentdc, &ps ); GetClientRect( hwnd_parent, &parent_rect );
- ok( rect.left == parent_rect.left, "rect.left = %d, expected %d\n", rect.left, parent_rect.left ); - ok( rect.top == parent_rect.top, "rect.top = %d, expected %d\n", rect.top, parent_rect.top ); - todo_wine ok( rect.right == parent_rect.right, "rect.right = %d, expected %d\n", rect.right, parent_rect.right ); - todo_wine ok( rect.bottom == parent_rect.bottom, "rect.bottom = %d, expected %d\n", rect.bottom, parent_rect.bottom ); + ok( rect.left == parent_rect.left, "rect.left = %ld, expected %ld\n", rect.left, parent_rect.left ); + ok( rect.top == parent_rect.top, "rect.top = %ld, expected %ld\n", rect.top, parent_rect.top ); + todo_wine ok( rect.right == parent_rect.right, "rect.right = %ld, expected %ld\n", rect.right, parent_rect.right ); + todo_wine ok( rect.bottom == parent_rect.bottom, "rect.bottom = %ld, expected %ld\n", rect.bottom, parent_rect.bottom );
hdc = GetDC( hwnd_parent ); todo_wine ok( GetPixel( hdc, 10, 10 ) == cr, "error drawing outside of window client area\n" ); @@ -617,41 +618,41 @@ static void test_dc_layout(void) hdc = GetDC( hwnd_cache_rtl ); layout = GetLayout( hdc );
- ok( layout == LAYOUT_RTL, "wrong layout %x\n", layout ); + ok( layout == LAYOUT_RTL, "wrong layout %lx\n", layout ); SetLayout( hdc, 0 ); ReleaseDC( hwnd_cache_rtl, hdc ); hdc = GetDC( hwnd_owndc_rtl ); layout = GetLayout( hdc ); - ok( layout == LAYOUT_RTL, "wrong layout %x\n", layout ); + ok( layout == LAYOUT_RTL, "wrong layout %lx\n", layout ); ReleaseDC( hwnd_cache_rtl, hdc );
hdc = GetDC( hwnd_cache ); layout = GetLayout( hdc ); - ok( layout == 0, "wrong layout %x\n", layout ); + ok( layout == 0, "wrong layout %lx\n", layout ); ReleaseDC( hwnd_cache, hdc );
hdc = GetDC( hwnd_owndc_rtl ); layout = GetLayout( hdc ); - ok( layout == LAYOUT_RTL, "wrong layout %x\n", layout ); + ok( layout == LAYOUT_RTL, "wrong layout %lx\n", layout ); SetLayout( hdc, 0 ); ReleaseDC( hwnd_owndc_rtl, hdc ); hdc = GetDC( hwnd_owndc_rtl ); layout = GetLayout( hdc ); - ok( layout == LAYOUT_RTL, "wrong layout %x\n", layout ); + ok( layout == LAYOUT_RTL, "wrong layout %lx\n", layout ); ReleaseDC( hwnd_owndc_rtl, hdc );
hdc = GetDC( hwnd_classdc_rtl ); layout = GetLayout( hdc ); - ok( layout == LAYOUT_RTL, "wrong layout %x\n", layout ); + ok( layout == LAYOUT_RTL, "wrong layout %lx\n", layout ); SetLayout( hdc, 0 ); ReleaseDC( hwnd_classdc_rtl, hdc ); hdc = GetDC( hwnd_classdc2_rtl ); layout = GetLayout( hdc ); - ok( layout == LAYOUT_RTL, "wrong layout %x\n", layout ); + ok( layout == LAYOUT_RTL, "wrong layout %lx\n", layout ); ReleaseDC( hwnd_classdc2_rtl, hdc ); hdc = GetDC( hwnd_classdc ); layout = GetLayout( hdc ); - ok( layout == LAYOUT_RTL, "wrong layout %x\n", layout ); + ok( layout == LAYOUT_RTL, "wrong layout %lx\n", layout ); ReleaseDC( hwnd_classdc_rtl, hdc );
DestroyWindow(hwnd_classdc2_rtl); diff --git a/dlls/user32/tests/dde.c b/dlls/user32/tests/dde.c index e2e27480645..c41d93a987b 100644 --- a/dlls/user32/tests/dde.c +++ b/dlls/user32/tests/dde.c @@ -1,3 +1,4 @@ +#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* * Unit tests for DDE functions * @@ -54,7 +55,7 @@ static HANDLE create_process(const char *arg) winetest_get_mainargs(&argv); sprintf(cmdline, ""%s" %s %s", argv[0], argv[1], arg); ret = CreateProcessA(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "CreateProcess failed: %u\n", GetLastError()); + ok(ret, "CreateProcess failed: %lu\n", GetLastError()); CloseHandle(pi.hThread); return pi.hProcess; } @@ -149,7 +150,7 @@ static LRESULT WINAPI dde_server_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPA ok((msg_index >= 2 && msg_index <= 4) || (msg_index >= 7 && msg_index <= 8), "Expected 2, 3, 4, 7 or 8, got %d\n", msg_index); - ok(wparam == (WPARAM)client, "Expected client hwnd, got %08lx\n", wparam); + ok(wparam == (WPARAM)client, "Expected client hwnd, got %08Ix\n", wparam); ok(LOWORD(lparam) == CF_TEXT, "Expected CF_TEXT, got %d\n", LOWORD(lparam));
GlobalGetAtomNameA(HIWORD(lparam), str, MAX_PATH); @@ -198,7 +199,7 @@ static LRESULT WINAPI dde_server_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPA case WM_DDE_POKE: { ok(msg_index == 5 || msg_index == 6, "Expected 5 or 6, got %d\n", msg_index); - ok(wparam == (WPARAM)client, "Expected client hwnd, got %08lx\n", wparam); + ok(wparam == (WPARAM)client, "Expected client hwnd, got %08Ix\n", wparam);
UnpackDDElParam(WM_DDE_POKE, lparam, &lo, &hi);
@@ -215,7 +216,7 @@ static LRESULT WINAPI dde_server_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPA if (msg_index == 5) { size = GlobalSize((HGLOBAL)lo); - ok(size == 4, "got %d\n", size); + ok(size == 4, "got %ld\n", size); } else ok(!lstrcmpA((LPSTR)poke->Value, "poke data\r\n"), @@ -232,7 +233,7 @@ static LRESULT WINAPI dde_server_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPA case WM_DDE_EXECUTE: { ok(msg_index == 7, "Expected 7, got %d\n", msg_index); - ok(wparam == (WPARAM)client, "Expected client hwnd, got %08lx\n", wparam); + ok(wparam == (WPARAM)client, "Expected client hwnd, got %08Ix\n", wparam);
ptr = GlobalLock((HGLOBAL)lparam); ok(!lstrcmpA(ptr, "[Command(Var)]"), "Expected [Command(Var)], got %s\n", ptr); @@ -249,8 +250,8 @@ static LRESULT WINAPI dde_server_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPA case WM_DDE_TERMINATE: { ok(msg_index == 9, "Expected 9, got %d\n", msg_index); - ok(wparam == (WPARAM)client, "Expected client hwnd, got %08lx\n", wparam); - ok(lparam == 0, "Expected 0, got %08lx\n", lparam); + ok(wparam == (WPARAM)client, "Expected client hwnd, got %08Ix\n", wparam); + ok(lparam == 0, "Expected 0, got %08Ix\n", lparam);
PostMessageA(client, WM_DDE_TERMINATE, (WPARAM)hwnd, 0);
@@ -281,7 +282,7 @@ static void test_msg_server(void)
destroy_dde_window(&hwnd, "dde_server"); GetExitCodeProcess(client, &res); - ok( !res, "client failed with %u error(s)\n", res ); + ok( !res, "client failed with %lu error(s)\n", res ); CloseHandle(client); }
@@ -334,13 +335,13 @@ static void test_ddeml_client(void) hdata = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_REQUEST, default_timeout, &res); ret = DdeGetLastError(client_pid); ok(ret == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %d\n", ret); - ok(res == DDE_FNOTPROCESSED, "Expected DDE_FNOTPROCESSED, got %08x\n", res); + ok(res == DDE_FNOTPROCESSED, "Expected DDE_FNOTPROCESSED, got %08lx\n", res); ok( hdata != NULL, "hdata is NULL\n" ); if (hdata) { str = (LPSTR)DdeAccessData(hdata, &size); ok(!lstrcmpA(str, "requested data\r\n"), "Expected 'requested data\r\n', got %s\n", str); - ok(size == 17, "Expected 17, got %d\n", size); + ok(size == 17, "Expected 17, got %ld\n", size);
ret = DdeUnaccessData(hdata); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); @@ -351,7 +352,7 @@ static void test_ddeml_client(void) DdeGetLastError(client_pid); hdata = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_REQUEST, default_timeout, &res); ret = DdeGetLastError(client_pid); - ok(res == DDE_FNOTPROCESSED, "Expected DDE_FNOTPROCESSED, got %x\n", res); + ok(res == DDE_FNOTPROCESSED, "Expected DDE_FNOTPROCESSED, got %lx\n", res); todo_wine ok(ret == DMLERR_MEMORY_ERROR, "Expected DMLERR_MEMORY_ERROR, got %d\n", ret); ok( hdata != NULL, "hdata is NULL\n" ); @@ -359,7 +360,7 @@ static void test_ddeml_client(void) { str = (LPSTR)DdeAccessData(hdata, &size); ok(!lstrcmpA(str, "requested data\r\n"), "Expected 'requested data\r\n', got %s\n", str); - ok(size == 17, "Expected 17, got %d\n", size); + ok(size == 17, "Expected 17, got %ld\n", size);
ret = DdeUnaccessData(hdata); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); @@ -371,14 +372,14 @@ static void test_ddeml_client(void) hdata = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_REQUEST, default_timeout, &res); ret = DdeGetLastError(client_pid); ok(ret == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %d\n", ret); - ok(res == DDE_FNOTPROCESSED, "Expected DDE_FNOTPROCESSED, got %x\n", res); + ok(res == DDE_FNOTPROCESSED, "Expected DDE_FNOTPROCESSED, got %lx\n", res); if (hdata == NULL) ok(FALSE, "hdata is NULL\n"); else { str = (LPSTR)DdeAccessData(hdata, &size); ok(!lstrcmpA(str, "requested data\r\n"), "Expected 'requested data\r\n', got %s\n", str); - ok(size == 17, "Expected 17, got %d\n", size); + ok(size == 17, "Expected 17, got %ld\n", size);
ret = DdeUnaccessData(hdata); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); @@ -390,7 +391,7 @@ static void test_ddeml_client(void) hdata = DdeClientTransaction(NULL, 0, conversation, 0, CF_TEXT, XTYP_REQUEST, default_timeout, &res); ret = DdeGetLastError(client_pid); ok(hdata == NULL, "Expected NULL hdata, got %p\n", hdata); - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %08x\n", res); + ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %08lx\n", res); ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret);
DdeFreeStringHandle(client_pid, item); @@ -408,7 +409,7 @@ static void test_ddeml_client(void) op = DdeClientTransaction((LPBYTE)hdata, -1, conversation, 0, CF_TEXT, XTYP_POKE, default_timeout, &res); ret = DdeGetLastError(client_pid); ok(op == NULL, "Expected NULL, got %p\n", op); - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res); + ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", res); ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret);
/* XTYP_POKE, no data */ @@ -417,7 +418,7 @@ static void test_ddeml_client(void) op = DdeClientTransaction(NULL, 0, conversation, 0, CF_TEXT, XTYP_POKE, default_timeout, &res); ret = DdeGetLastError(client_pid); ok(op == NULL, "Expected NULL, got %p\n", op); - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res); + ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", res); ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret);
/* XTYP_POKE, wrong size */ @@ -426,7 +427,7 @@ static void test_ddeml_client(void) op = DdeClientTransaction((LPBYTE)hdata, 0, conversation, item, CF_TEXT, XTYP_POKE, default_timeout, &res); ret = DdeGetLastError(client_pid); ok(op == (HDDEDATA)TRUE, "Expected TRUE, got %p\n", op); - ok(res == DDE_FACK, "Expected DDE_FACK, got %x\n", res); + ok(res == DDE_FACK, "Expected DDE_FACK, got %lx\n", res); ok(ret == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %d\n", ret);
/* XTYP_POKE, correct params */ @@ -435,7 +436,7 @@ static void test_ddeml_client(void) op = DdeClientTransaction((LPBYTE)hdata, -1, conversation, item, CF_TEXT, XTYP_POKE, default_timeout, &res); ret = DdeGetLastError(client_pid); ok(op == (HDDEDATA)TRUE, "Expected TRUE, got %p\n", op); - ok(res == DDE_FACK, "Expected DDE_FACK, got %x\n", res); + ok(res == DDE_FACK, "Expected DDE_FACK, got %lx\n", res); ok(ret == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %d\n", ret);
DdeFreeDataHandle(hdata); @@ -452,7 +453,7 @@ static void test_ddeml_client(void) ret = DdeGetLastError(client_pid); ok(ret == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %d\n", ret); ok(op == (HDDEDATA)TRUE, "Expected TRUE, got %p\n", op); - ok(res == DDE_FACK, "Expected DDE_FACK, got %x\n", res); + ok(res == DDE_FACK, "Expected DDE_FACK, got %lx\n", res);
/* XTYP_EXECUTE, no data */ res = 0xdeadbeef; @@ -460,7 +461,7 @@ static void test_ddeml_client(void) op = DdeClientTransaction(NULL, 0, conversation, NULL, 0, XTYP_EXECUTE, default_timeout, &res); ret = DdeGetLastError(client_pid); ok(op == NULL, "Expected NULL, got %p\n", op); - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res); + ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", res); ok(ret == DMLERR_MEMORY_ERROR, "Expected DMLERR_MEMORY_ERROR, got %d\n", ret);
/* XTYP_EXECUTE, no data, -1 size */ @@ -469,7 +470,7 @@ static void test_ddeml_client(void) op = DdeClientTransaction(NULL, -1, conversation, NULL, 0, XTYP_EXECUTE, default_timeout, &res); ret = DdeGetLastError(client_pid); ok(op == NULL, "Expected NULL, got %p\n", op); - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res); + ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", res); ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret);
DdeFreeStringHandle(client_pid, topic); @@ -483,10 +484,10 @@ static void test_ddeml_client(void) hdata = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_REQUEST, default_timeout, &res); ret = DdeGetLastError(client_pid); ok(ret == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %d\n", ret); - ok(res == DDE_FNOTPROCESSED, "Expected DDE_FNOTPROCESSED, got %d\n", res); + ok(res == DDE_FNOTPROCESSED, "Expected DDE_FNOTPROCESSED, got %ld\n", res); str = (LPSTR)DdeAccessData(hdata, &size); ok(!strcmp(str, "command executed\r\n"), "Expected 'command executed\r\n', got %s\n", str); - ok(size == 19, "Expected 19, got %d\n", size); + ok(size == 19, "Expected 19, got %ld\n", size);
ret = DdeUnaccessData(hdata); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); @@ -497,7 +498,7 @@ static void test_ddeml_client(void) op = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_ADVREQ, default_timeout, &res); ret = DdeGetLastError(client_pid); ok(op == NULL, "Expected NULL, got %p\n", op); - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res); + ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", res); ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret);
res = 0xdeadbeef; @@ -505,7 +506,7 @@ static void test_ddeml_client(void) op = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_CONNECT, default_timeout, &res); ret = DdeGetLastError(client_pid); ok(op == NULL, "Expected NULL, got %p\n", op); - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res); + ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", res); ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret);
res = 0xdeadbeef; @@ -513,7 +514,7 @@ static void test_ddeml_client(void) op = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_CONNECT_CONFIRM, default_timeout, &res); ret = DdeGetLastError(client_pid); ok(op == NULL, "Expected NULL, got %p\n", op); - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res); + ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", res); ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret);
res = 0xdeadbeef; @@ -521,7 +522,7 @@ static void test_ddeml_client(void) op = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_DISCONNECT, default_timeout, &res); ret = DdeGetLastError(client_pid); ok(op == NULL, "Expected NULL, got %p\n", op); - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res); + ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", res); ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret);
res = 0xdeadbeef; @@ -529,7 +530,7 @@ static void test_ddeml_client(void) op = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_ERROR, default_timeout, &res); ret = DdeGetLastError(client_pid); ok(op == NULL, "Expected NULL, got %p\n", op); - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res); + ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", res); ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret);
res = 0xdeadbeef; @@ -537,7 +538,7 @@ static void test_ddeml_client(void) op = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_MONITOR, default_timeout, &res); ret = DdeGetLastError(client_pid); ok(op == NULL, "Expected NULL, got %p\n", op); - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res); + ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", res); ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret);
res = 0xdeadbeef; @@ -545,7 +546,7 @@ static void test_ddeml_client(void) op = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_REGISTER, default_timeout, &res); ret = DdeGetLastError(client_pid); ok(op == NULL, "Expected NULL, got %p\n", op); - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res); + ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", res); ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret);
res = 0xdeadbeef; @@ -553,7 +554,7 @@ static void test_ddeml_client(void) op = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_UNREGISTER, default_timeout, &res); ret = DdeGetLastError(client_pid); ok(op == NULL, "Expected NULL, got %p\n", op); - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res); + ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", res); ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret);
res = 0xdeadbeef; @@ -561,7 +562,7 @@ static void test_ddeml_client(void) op = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_WILDCONNECT, default_timeout, &res); ret = DdeGetLastError(client_pid); ok(op == NULL, "Expected NULL, got %p\n", op); - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res); + ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", res); ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret);
res = 0xdeadbeef; @@ -569,7 +570,7 @@ static void test_ddeml_client(void) op = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_XACT_COMPLETE, default_timeout, &res); ret = DdeGetLastError(client_pid); ok(op == NULL, "Expected NULL, got %p\n", op); - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res); + ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", res); ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret);
DdeFreeStringHandle(client_pid, item); @@ -604,16 +605,16 @@ static HDDEDATA CALLBACK server_ddeml_callback(UINT uType, UINT uFmt, HCONV hcon ok(uFmt == 0, "Expected 0, got %d\n", uFmt); ok(hconv == 0, "Expected 0, got %p\n", hconv); ok(hdata == 0, "Expected 0, got %p\n", hdata); - ok(dwData1 == 0, "Expected 0, got %08lx\n", dwData1); - ok(dwData2 == 0, "Expected 0, got %08lx\n", dwData2); + ok(dwData1 == 0, "Expected 0, got %08Ix\n", dwData1); + ok(dwData2 == 0, "Expected 0, got %08Ix\n", dwData2);
size = DdeQueryStringA(server_pid, hsz1, str, MAX_PATH, CP_WINANSI); ok(!lstrcmpA(str, "TestDDEServer"), "Expected TestDDEServer, got %s\n", str); - ok(size == 13, "Expected 13, got %d\n", size); + ok(size == 13, "Expected 13, got %ld\n", size);
size = DdeQueryStringA(server_pid, hsz2, str, MAX_PATH, CP_WINANSI); ok(!strncmp(str, "TestDDEServer(", 14), "Expected TestDDEServer(, got %s\n", str); - ok(size == 17 + 2*sizeof(ULONG_PTR), "Got size %d for %s\n", size, str); + ok(size == 17 + 2*sizeof(ULONG_PTR), "Got size %ld for %s\n", size, str); ok(str[size - 1] == ')', "Expected ')', got %c\n", str[size - 1]);
return (HDDEDATA)TRUE; @@ -625,16 +626,16 @@ static HDDEDATA CALLBACK server_ddeml_callback(UINT uType, UINT uFmt, HCONV hcon ok(uFmt == 0, "Expected 0, got %d\n", uFmt); ok(hconv == 0, "Expected 0, got %p\n", hconv); ok(hdata == 0, "Expected 0, got %p\n", hdata); - ok(dwData1 == 0, "Expected 0, got %08lx\n", dwData1); - ok(dwData2 == FALSE, "Expected FALSE, got %08lx\n", dwData2); + ok(dwData1 == 0, "Expected 0, got %08Ix\n", dwData1); + ok(dwData2 == FALSE, "Expected FALSE, got %08Ix\n", dwData2);
size = DdeQueryStringA(server_pid, hsz1, str, MAX_PATH, CP_WINANSI); ok(!lstrcmpA(str, "TestDDETopic"), "Expected TestDDETopic, got %s\n", str); - ok(size == 12, "Expected 12, got %d\n", size); + ok(size == 12, "Expected 12, got %ld\n", size);
size = DdeQueryStringA(server_pid, hsz2, str, MAX_PATH, CP_WINANSI); ok(!lstrcmpA(str, "TestDDEServer"), "Expected TestDDEServer, got %s\n", str); - ok(size == 13, "Expected 13, got %d\n", size); + ok(size == 13, "Expected 13, got %ld\n", size);
return (HDDEDATA)TRUE; } @@ -647,16 +648,16 @@ static HDDEDATA CALLBACK server_ddeml_callback(UINT uType, UINT uFmt, HCONV hcon ok(uFmt == 0, "Expected 0, got %d\n", uFmt); ok(hconv != NULL, "Expected non-NULL hconv\n"); ok(hdata == 0, "Expected 0, got %p\n", hdata); - ok(dwData1 == 0, "Expected 0, got %08lx\n", dwData1); - ok(dwData2 == FALSE, "Expected FALSE, got %08lx\n", dwData2); + ok(dwData1 == 0, "Expected 0, got %08Ix\n", dwData1); + ok(dwData2 == FALSE, "Expected FALSE, got %08Ix\n", dwData2);
size = DdeQueryStringA(server_pid, hsz1, str, MAX_PATH, CP_WINANSI); ok(!lstrcmpA(str, "TestDDETopic"), "Expected TestDDETopic, got %s\n", str); - ok(size == 12, "Expected 12, got %d\n", size); + ok(size == 12, "Expected 12, got %ld\n", size);
size = DdeQueryStringA(server_pid, hsz2, str, MAX_PATH, CP_WINANSI); ok(!lstrcmpA(str, "TestDDEServer"), "Expected TestDDEServer, got %s\n", str); - ok(size == 13, "Expected 13, got %d\n", size); + ok(size == 13, "Expected 13, got %ld\n", size);
return (HDDEDATA)TRUE; } @@ -667,8 +668,8 @@ static HDDEDATA CALLBACK server_ddeml_callback(UINT uType, UINT uFmt, HCONV hcon "Expected 4, 5 or 6, got %d\n", msg_index); ok(hconv == conversation, "Expected conversation handle, got %p\n", hconv); ok(hdata == 0, "Expected 0, got %p\n", hdata); - ok(dwData1 == 0, "Expected 0, got %08lx\n", dwData1); - ok(dwData2 == 0, "Expected 0, got %08lx\n", dwData2); + ok(dwData1 == 0, "Expected 0, got %08Ix\n", dwData1); + ok(dwData2 == 0, "Expected 0, got %08Ix\n", dwData2);
if (msg_index == 4) ok(uFmt == 0xbeef, "Expected 0xbeef, got %08x\n", uFmt); @@ -677,7 +678,7 @@ static HDDEDATA CALLBACK server_ddeml_callback(UINT uType, UINT uFmt, HCONV hcon
size = DdeQueryStringA(server_pid, hsz1, str, MAX_PATH, CP_WINANSI); ok(!lstrcmpA(str, "TestDDETopic"), "Expected TestDDETopic, got %s\n", str); - ok(size == 12, "Expected 12, got %d\n", size); + ok(size == 12, "Expected 12, got %ld\n", size);
size = DdeQueryStringA(server_pid, hsz2, str, MAX_PATH, CP_WINANSI);
@@ -685,13 +686,13 @@ static HDDEDATA CALLBACK server_ddeml_callback(UINT uType, UINT uFmt, HCONV hcon { { ok(!lstrcmpA(str, ""), "Expected empty string, got %s\n", str); - ok(size == 1, "Expected 1, got %d\n", size); + ok(size == 1, "Expected 1, got %ld\n", size); } } else if (msg_index == 6) { ok(!lstrcmpA(str, "request"), "Expected request, got %s\n", str); - ok(size == 7, "Expected 7, got %d\n", size); + ok(size == 7, "Expected 7, got %ld\n", size); }
if (msg_index == 6) @@ -709,16 +710,16 @@ static HDDEDATA CALLBACK server_ddeml_callback(UINT uType, UINT uFmt, HCONV hcon ok(msg_index == 7 || msg_index == 8, "Expected 7 or 8, got %d\n", msg_index); ok(uFmt == CF_TEXT, "Expected CF_TEXT, got %d\n", uFmt); ok(hconv == conversation, "Expected conversation handle, got %p\n", hconv); - ok(dwData1 == 0, "Expected 0, got %08lx\n", dwData1); - ok(dwData2 == 0, "Expected 0, got %08lx\n", dwData2); + ok(dwData1 == 0, "Expected 0, got %08Ix\n", dwData1); + ok(dwData2 == 0, "Expected 0, got %08Ix\n", dwData2);
size = DdeQueryStringA(server_pid, hsz1, str, MAX_PATH, CP_WINANSI); ok(!lstrcmpA(str, "TestDDETopic"), "Expected TestDDETopic, got %s\n", str); - ok(size == 12, "Expected 12, got %d\n", size); + ok(size == 12, "Expected 12, got %ld\n", size);
ptr = (LPSTR)DdeAccessData(hdata, &size); ok(!lstrcmpA(ptr, "poke data\r\n"), "Expected 'poke data\r\n', got %s\n", ptr); - ok(size == 12, "Expected 12, got %d\n", size); + ok(size == 12, "Expected 12, got %ld\n", size); DdeUnaccessData(hdata);
size = DdeQueryStringA(server_pid, hsz2, str, MAX_PATH, CP_WINANSI); @@ -726,13 +727,13 @@ static HDDEDATA CALLBACK server_ddeml_callback(UINT uType, UINT uFmt, HCONV hcon { { ok(!lstrcmpA(str, ""), "Expected empty string, got %s\n", str); - ok(size == 1, "Expected 1, got %d\n", size); + ok(size == 1, "Expected 1, got %ld\n", size); } } else { ok(!lstrcmpA(str, "poke"), "Expected poke, got %s\n", str); - ok(size == 4, "Expected 4, got %d\n", size); + ok(size == 4, "Expected 4, got %ld\n", size); }
return (HDDEDATA)DDE_FACK; @@ -743,13 +744,13 @@ static HDDEDATA CALLBACK server_ddeml_callback(UINT uType, UINT uFmt, HCONV hcon ok(msg_index >= 9 && msg_index <= 11, "Expected 9 or 11, got %d\n", msg_index); ok(uFmt == 0, "Expected 0, got %d\n", uFmt); ok(hconv == conversation, "Expected conversation handle, got %p\n", hconv); - ok(dwData1 == 0, "Expected 0, got %08lx\n", dwData1); - ok(dwData2 == 0, "Expected 0, got %08lx\n", dwData2); + ok(dwData1 == 0, "Expected 0, got %08Ix\n", dwData1); + ok(dwData2 == 0, "Expected 0, got %08Ix\n", dwData2); ok(hsz2 == 0, "Expected 0, got %p\n", hsz2);
size = DdeQueryStringA(server_pid, hsz1, str, MAX_PATH, CP_WINANSI); ok(!lstrcmpA(str, "TestDDETopic"), "Expected TestDDETopic, got %s\n", str); - ok(size == 12, "Expected 12, got %d\n", size); + ok(size == 12, "Expected 12, got %ld\n", size);
if (msg_index == 9 || msg_index == 11) { @@ -758,13 +759,13 @@ static HDDEDATA CALLBACK server_ddeml_callback(UINT uType, UINT uFmt, HCONV hcon if (msg_index == 9) { ok(!lstrcmpA(ptr, "[Command(Var)]"), "Expected '[Command(Var)]', got %s\n", ptr); - ok(size == 15, "Expected 15, got %d\n", size); + ok(size == 15, "Expected 15, got %ld\n", size); ret = (HDDEDATA)DDE_FACK; } else { ok(!lstrcmpA(ptr, "[BadCommand(Var)]"), "Expected '[BadCommand(Var)]', got %s\n", ptr); - ok(size == 18, "Expected 18, got %d\n", size); + ok(size == 18, "Expected 18, got %ld\n", size); ret = DDE_FNOTPROCESSED; }
@@ -775,14 +776,14 @@ static HDDEDATA CALLBACK server_ddeml_callback(UINT uType, UINT uFmt, HCONV hcon DWORD rsize = 0;
size = DdeGetData(hdata, NULL, 0, 0); - ok(size == 17, "DdeGetData should have returned 17 not %d\n", size); + ok(size == 17, "DdeGetData should have returned 17 not %ld\n", size); ptr = HeapAlloc(GetProcessHeap(), 0, size); ok(ptr != NULL,"HeapAlloc should have returned ptr not NULL\n"); rsize = DdeGetData(hdata, (LPBYTE)ptr, size, 0); - ok(rsize == size, "DdeGetData did not return %d bytes but %d\n", size, rsize); + ok(rsize == size, "DdeGetData did not return %ld bytes but %ld\n", size, rsize);
ok(!lstrcmpA(ptr, "[Command-2(Var)]"), "Expected '[Command-2(Var)]' got %s\n", ptr); - ok(size == 17, "Expected 17, got %d\n", size); + ok(size == 17, "Expected 17, got %ld\n", size); ret = (HDDEDATA)DDE_FACK;
HeapFree(GetProcessHeap(), 0, ptr); @@ -796,8 +797,8 @@ static HDDEDATA CALLBACK server_ddeml_callback(UINT uType, UINT uFmt, HCONV hcon ok(msg_index == 12, "Expected 12, got %d\n", msg_index); ok(uFmt == 0, "Expected 0, got %d\n", uFmt); ok(hconv == conversation, "Expected conversation handle, got %p\n", hconv); - ok(dwData1 == 0, "Expected 0, got %08lx\n", dwData1); - ok(dwData2 == 0, "Expected 0, got %08lx\n", dwData2); + ok(dwData1 == 0, "Expected 0, got %08Ix\n", dwData1); + ok(dwData2 == 0, "Expected 0, got %08Ix\n", dwData2); ok(hsz1 == 0, "Expected 0, got %p\n", hsz2); ok(hsz2 == 0, "Expected 0, got %p\n", hsz2);
@@ -841,7 +842,7 @@ static void test_ddeml_server(void) ret = DdeUninitialize(server_pid); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); GetExitCodeProcess(client, &exit_code); - ok( !res, "client failed with %u error(s)\n", exit_code ); + ok( !res, "client failed with %lu error(s)\n", exit_code ); CloseHandle(client); }
@@ -870,17 +871,17 @@ static LRESULT WINAPI dde_msg_client_wndproc(HWND hwnd, UINT msg, WPARAM wparam, case WM_DDE_INITIATE: { ok(msg_index == 1, "Expected 1, got %d\n", msg_index); - ok(wparam == (WPARAM)client_hwnd, "Expected client hwnd, got %08lx\n", wparam); + ok(wparam == (WPARAM)client_hwnd, "Expected client hwnd, got %08Ix\n", wparam);
size = GlobalGetAtomNameA(LOWORD(lparam), str, MAX_PATH); ok(LOWORD(lparam) == server, "Expected server atom, got %08x\n", LOWORD(lparam)); ok(!lstrcmpA(str, "TestDDEServer"), "Expected TestDDEServer, got %s\n", str); - ok(size == 13, "Expected 13, got %d\n", size); + ok(size == 13, "Expected 13, got %ld\n", size);
size = GlobalGetAtomNameA(HIWORD(lparam), str, MAX_PATH); ok(HIWORD(lparam) == topic, "Expected topic atom, got %08x\n", HIWORD(lparam)); ok(!lstrcmpA(str, "TestDDETopic"), "Expected TestDDETopic, got %s\n", str); - ok(size == 12, "Expected 12, got %d\n", size); + ok(size == 12, "Expected 12, got %ld\n", size);
break; } @@ -893,21 +894,21 @@ static LRESULT WINAPI dde_msg_client_wndproc(HWND hwnd, UINT msg, WPARAM wparam, if (msg_index == 2) { server_hwnd = (HWND)wparam; - ok(wparam != 0, "Expected non-NULL wparam, got %08lx\n", wparam); + ok(wparam != 0, "Expected non-NULL wparam, got %08Ix\n", wparam);
size = GlobalGetAtomNameA(LOWORD(lparam), str, MAX_PATH); ok(LOWORD(lparam) == server, "Expected server atom, got %08x\n", LOWORD(lparam)); ok(!lstrcmpA(str, "TestDDEServer"), "Expected TestDDEServer, got %s\n", str); - ok(size == 13, "Expected 13, got %d\n", size); + ok(size == 13, "Expected 13, got %ld\n", size);
size = GlobalGetAtomNameA(HIWORD(lparam), str, MAX_PATH); ok(HIWORD(lparam) == topic, "Expected topic atom, got %08x\n", HIWORD(lparam)); ok(!lstrcmpA(str, "TestDDETopic"), "Expected TestDDETopic, got %s\n", str); - ok(size == 12, "Expected 12, got %d\n", size); + ok(size == 12, "Expected 12, got %ld\n", size); } else if (msg_index >= 9 && msg_index <= 11) { - ok(wparam == (WPARAM)server_hwnd, "Expected server hwnd, got %08lx\n", wparam); + ok(wparam == (WPARAM)server_hwnd, "Expected server hwnd, got %08Ix\n", wparam);
UnpackDDElParam(WM_DDE_ACK, lparam, &lo, &hi);
@@ -916,7 +917,7 @@ static LRESULT WINAPI dde_msg_client_wndproc(HWND hwnd, UINT msg, WPARAM wparam, ok(ack->reserved == 0, "Expected 0, got %d\n", ack->reserved); ok(ack->fBusy == FALSE, "Expected FALSE, got %d\n", ack->fBusy);
- ok(hi == (UINT_PTR)execute_hglobal, "Expected execute hglobal, got %08lx\n", hi); + ok(hi == (UINT_PTR)execute_hglobal, "Expected execute hglobal, got %08Ix\n", hi); ptr = GlobalLock((HGLOBAL)hi);
if (msg_index == 9) @@ -938,7 +939,7 @@ static LRESULT WINAPI dde_msg_client_wndproc(HWND hwnd, UINT msg, WPARAM wparam, } else { - ok(wparam == (WPARAM)server_hwnd, "Expected server hwnd, got %08lx\n", wparam); + ok(wparam == (WPARAM)server_hwnd, "Expected server hwnd, got %08Ix\n", wparam);
UnpackDDElParam(WM_DDE_ACK, lparam, &lo, &hi);
@@ -958,22 +959,22 @@ static LRESULT WINAPI dde_msg_client_wndproc(HWND hwnd, UINT msg, WPARAM wparam, size = GlobalGetAtomNameA(hi, str, MAX_PATH); if (msg_index == 3) { - ok(hi == item, "Expected item atom, got %08lx\n", hi); + ok(hi == item, "Expected item atom, got %08Ix\n", hi); ok(!lstrcmpA(str, "request"), "Expected request, got %s\n", str); - ok(size == 7, "Expected 7, got %d\n", size); + ok(size == 7, "Expected 7, got %ld\n", size); } else if (msg_index == 4 || msg_index == 7) { - ok(hi == 0, "Expected 0, got %08lx\n", hi); - ok(size == 0, "Expected empty string, got %d\n", size); + ok(hi == 0, "Expected 0, got %08Ix\n", hi); + ok(size == 0, "Expected empty string, got %ld\n", size); } else { - ok(hi == item, "Expected item atom, got %08lx\n", hi); + ok(hi == item, "Expected item atom, got %08Ix\n", hi); if (msg_index == 6) todo_wine { ok(!lstrcmpA(str, "poke"), "Expected poke, got %s\n", str); - ok(size == 4, "Expected 4, got %d\n", size); + ok(size == 4, "Expected 4, got %ld\n", size); } } } @@ -984,7 +985,7 @@ static LRESULT WINAPI dde_msg_client_wndproc(HWND hwnd, UINT msg, WPARAM wparam, case WM_DDE_DATA: { ok(msg_index == 5, "Expected 5, got %d\n", msg_index); - ok(wparam == (WPARAM)server_hwnd, "Expected server hwnd, got %08lx\n", wparam); + ok(wparam == (WPARAM)server_hwnd, "Expected server hwnd, got %08Ix\n", wparam);
UnpackDDElParam(WM_DDE_DATA, lparam, &lo, &hi);
@@ -1004,7 +1005,7 @@ static LRESULT WINAPI dde_msg_client_wndproc(HWND hwnd, UINT msg, WPARAM wparam, size = GlobalGetAtomNameA(hi, str, MAX_PATH); ok(hi == item, "Expected item atom, got %08x\n", HIWORD(lparam)); ok(!lstrcmpA(str, "request"), "Expected request, got %s\n", str); - ok(size == 7, "Expected 7, got %d\n", size); + ok(size == 7, "Expected 7, got %ld\n", size);
GlobalFree((HGLOBAL)lo); GlobalDeleteAtom(hi); @@ -1183,13 +1184,13 @@ static LRESULT WINAPI hook_dde_client_wndprocA(HWND hwnd, UINT msg, WPARAM wpara { UINT_PTR lo, hi;
- if (winetest_debug > 1) trace("hook_dde_client_wndprocA: %p %04x %08lx %08lx\n", hwnd, msg, wparam, lparam); + if (winetest_debug > 1) trace("hook_dde_client_wndprocA: %p %04x %08Ix %08Ix\n", hwnd, msg, wparam, lparam);
switch (msg) { case WM_DDE_ACK: UnpackDDElParam(WM_DDE_ACK, lparam, &lo, &hi); - if (winetest_debug > 1) trace("WM_DDE_ACK: status %04lx hglobal %p\n", lo, (HGLOBAL)hi); + if (winetest_debug > 1) trace("WM_DDE_ACK: status %04Ix hglobal %p\n", lo, (HGLOBAL)hi); break;
default: @@ -1202,13 +1203,13 @@ static LRESULT WINAPI hook_dde_client_wndprocW(HWND hwnd, UINT msg, WPARAM wpara { UINT_PTR lo, hi;
- if (winetest_debug > 1) trace("hook_dde_client_wndprocW: %p %04x %08lx %08lx\n", hwnd, msg, wparam, lparam); + if (winetest_debug > 1) trace("hook_dde_client_wndprocW: %p %04x %08Ix %08Ix\n", hwnd, msg, wparam, lparam);
switch (msg) { case WM_DDE_ACK: UnpackDDElParam(WM_DDE_ACK, lparam, &lo, &hi); - if (winetest_debug > 1) trace("WM_DDE_ACK: status %04lx hglobal %p\n", lo, (HGLOBAL)hi); + if (winetest_debug > 1) trace("WM_DDE_ACK: status %04Ix hglobal %p\n", lo, (HGLOBAL)hi); break;
default: @@ -1228,7 +1229,7 @@ static LRESULT WINAPI dde_server_wndprocA(HWND hwnd, UINT msg, WPARAM wparam, LP { ATOM aService = GlobalAddAtomW(TEST_DDE_SERVICE);
- if (winetest_debug > 1) trace("server A: got WM_DDE_INITIATE from %p (%s) with %08lx\n", + if (winetest_debug > 1) trace("server A: got WM_DDE_INITIATE from %p (%s) with %08Ix\n", (HWND)wparam, client_unicode ? "Unicode" : "ANSI", lparam);
if (LOWORD(lparam) == aService) @@ -1257,10 +1258,10 @@ static LRESULT WINAPI dde_server_wndprocA(HWND hwnd, UINT msg, WPARAM wparam, LP LPCSTR cmd; UINT_PTR lo, hi;
- if (winetest_debug > 1) trace("server A: got WM_DDE_EXECUTE from %p with %08lx\n", (HWND)wparam, lparam); + if (winetest_debug > 1) trace("server A: got WM_DDE_EXECUTE from %p with %08Ix\n", (HWND)wparam, lparam);
UnpackDDElParam(WM_DDE_EXECUTE, lparam, &lo, &hi); - if (winetest_debug > 1) trace("%08lx => lo %04lx hi %04lx\n", lparam, lo, hi); + if (winetest_debug > 1) trace("%08Ix => lo %04Ix hi %04Ix\n", lparam, lo, hi);
ack.bAppReturnCode = 0; ack.reserved = 0; @@ -1311,7 +1312,7 @@ static LRESULT WINAPI dde_server_wndprocA(HWND hwnd, UINT msg, WPARAM wparam, LP } GlobalUnlock((HGLOBAL)hi); } - else ok( 0, "bad command data %lx\n", hi ); + else ok( 0, "bad command data %Ix\n", hi );
step++;
@@ -1327,7 +1328,7 @@ static LRESULT WINAPI dde_server_wndprocA(HWND hwnd, UINT msg, WPARAM wparam, LP DDEACK ack; WORD status;
- if (winetest_debug > 1) trace("server A: got WM_DDE_TERMINATE from %#lx with %08lx\n", wparam, lparam); + if (winetest_debug > 1) trace("server A: got WM_DDE_TERMINATE from %#Ix with %08Ix\n", wparam, lparam);
ack.bAppReturnCode = 0; ack.reserved = 0; @@ -1377,7 +1378,7 @@ static LRESULT WINAPI dde_server_wndprocW(HWND hwnd, UINT msg, WPARAM wparam, LP GlobalDeleteAtom(aService);
if (winetest_debug > 1) - trace("server W: got WM_DDE_INITIATE from %p with %08lx (client %s conv %s)\n", (HWND)wparam, + trace("server W: got WM_DDE_INITIATE from %p with %08Ix (client %s conv %s)\n", (HWND)wparam, lparam, client_unicode ? "Unicode" : "ANSI", conv_unicode ? "Unicode" : "ANSI" );
return 0; @@ -1390,10 +1391,10 @@ static LRESULT WINAPI dde_server_wndprocW(HWND hwnd, UINT msg, WPARAM wparam, LP LPCSTR cmd; UINT_PTR lo, hi;
- if (winetest_debug > 1) trace("server W: got WM_DDE_EXECUTE from %#lx with %08lx\n", wparam, lparam); + if (winetest_debug > 1) trace("server W: got WM_DDE_EXECUTE from %#Ix with %08Ix\n", wparam, lparam);
UnpackDDElParam(WM_DDE_EXECUTE, lparam, &lo, &hi); - if (winetest_debug > 1) trace("%08lx => lo %04lx hi %04lx\n", lparam, lo, hi); + if (winetest_debug > 1) trace("%08Ix => lo %04Ix hi %04Ix\n", lparam, lo, hi);
ack.bAppReturnCode = 0; ack.reserved = 0; @@ -1452,7 +1453,7 @@ static LRESULT WINAPI dde_server_wndprocW(HWND hwnd, UINT msg, WPARAM wparam, LP } GlobalUnlock((HGLOBAL)hi); } - else ok( 0, "bad command data %lx\n", hi ); + else ok( 0, "bad command data %Ix\n", hi );
step++;
@@ -1468,7 +1469,7 @@ static LRESULT WINAPI dde_server_wndprocW(HWND hwnd, UINT msg, WPARAM wparam, LP DDEACK ack; WORD status;
- if (winetest_debug > 1) trace("server W: got WM_DDE_TERMINATE from %#lx with %08lx\n", wparam, lparam); + if (winetest_debug > 1) trace("server W: got WM_DDE_TERMINATE from %#Ix with %08Ix\n", wparam, lparam);
ack.bAppReturnCode = 0; ack.reserved = 0; @@ -1541,7 +1542,7 @@ static HDDEDATA CALLBACK client_dde_callback(UINT uType, UINT uFmt, HCONV hconv, cmd_name = (type <= 14) ? cmd_type[type] : "unknown";
if (winetest_debug > 1) - trace("client_dde_callback: %04x (%s) %d %p %p %p %p %08lx %08lx\n", + trace("client_dde_callback: %04x (%s) %d %p %p %p %p %08Ix %08Ix\n", uType, cmd_name, uFmt, hconv, hsz1, hsz2, hdata, dwData1, dwData2); return 0; } @@ -1565,7 +1566,7 @@ static void test_dde_aw_transaction( BOOL client_unicode, BOOL server_unicode ) ret = DdeInitializeW(&dde_inst, client_dde_callback, APPCMD_CLIENTONLY, 0); else ret = DdeInitializeA(&dde_inst, client_dde_callback, APPCMD_CLIENTONLY, 0); - ok(ret == DMLERR_NO_ERROR, "DdeInitializeA failed with error %04x (%x)\n", + ok(ret == DMLERR_NO_ERROR, "DdeInitializeA failed with error %04lx (%x)\n", ret, DdeGetLastError(dde_inst));
hsz_server = DdeCreateStringHandleW(dde_inst, TEST_DDE_SERVICE, CP_WINUNICODE); @@ -1578,11 +1579,11 @@ static void test_dde_aw_transaction( BOOL client_unicode, BOOL server_unicode ) return; } err = DdeGetLastError(dde_inst); - ok(err == DMLERR_NO_ERROR, "wrong dde error %x\n", err); + ok(err == DMLERR_NO_ERROR, "wrong dde error %lx\n", err);
info.cb = sizeof(info); ret = DdeQueryConvInfo(hconv, QID_SYNC, &info); - ok(ret, "wrong info size %d, DdeQueryConvInfo error %x\n", ret, DdeGetLastError(dde_inst)); + ok(ret, "wrong info size %ld, DdeQueryConvInfo error %x\n", ret, DdeGetLastError(dde_inst)); ok(info.ConvCtxt.iCodePage == (client_unicode ? CP_WINUNICODE : CP_WINANSI), "wrong iCodePage %d\n", info.ConvCtxt.iCodePage); ok(!info.hConvPartner, "unexpected info.hConvPartner: %p\n", info.hConvPartner); @@ -1598,30 +1599,30 @@ todo_wine { ret = 0xdeadbeef; hdata = DdeClientTransaction((LPBYTE)test_cmd, strlen(test_cmd) + 1, hconv, (HSZ)0xdead, 0xbeef, XTYP_EXECUTE, 1000, &ret); ok(!hdata, "DdeClientTransaction succeeded\n"); - ok(ret == DDE_FNOTPROCESSED, "wrong status code %04x\n", ret); + ok(ret == DDE_FNOTPROCESSED, "wrong status code %04lx\n", ret); err = DdeGetLastError(dde_inst); - ok(err == DMLERR_NOTPROCESSED, "wrong dde error %x\n", err); + ok(err == DMLERR_NOTPROCESSED, "wrong dde error %lx\n", err);
ret = 0xdeadbeef; hdata = DdeClientTransaction((LPBYTE)exec_cmdA, lstrlenA(exec_cmdA) + 1, hconv, 0, 0, XTYP_EXECUTE, 1000, &ret); err = DdeGetLastError(dde_inst); if (conv_unicode && (!client_unicode || !server_unicode)) /* W->A mapping -> garbage */ { - ok(!hdata, "DdeClientTransaction returned %p, error %x\n", hdata, err); - ok(ret == DDE_FNOTPROCESSED, "wrong status code %04x\n", ret); - ok(err == DMLERR_NOTPROCESSED, "DdeClientTransaction returned error %x\n", err); + ok(!hdata, "DdeClientTransaction returned %p, error %lx\n", hdata, err); + ok(ret == DDE_FNOTPROCESSED, "wrong status code %04lx\n", ret); + ok(err == DMLERR_NOTPROCESSED, "DdeClientTransaction returned error %lx\n", err); } else if (!conv_unicode && client_unicode && server_unicode) /* A->W mapping -> wrong cmd */ { - ok(!hdata, "DdeClientTransaction returned %p, error %x\n", hdata, err); - ok(ret == DDE_FNOTPROCESSED, "wrong status code %04x\n", ret); - ok(err == DMLERR_NOTPROCESSED, "DdeClientTransaction returned error %x\n", err); + ok(!hdata, "DdeClientTransaction returned %p, error %lx\n", hdata, err); + ok(ret == DDE_FNOTPROCESSED, "wrong status code %04lx\n", ret); + ok(err == DMLERR_NOTPROCESSED, "DdeClientTransaction returned error %lx\n", err); } else /* no mapping */ { - ok(hdata != 0, "DdeClientTransaction returned %p, error %x\n", hdata, err); - ok(ret == DDE_FACK, "wrong status code %04x\n", ret); - ok(err == DMLERR_NO_ERROR, "wrong dde error %x\n", err); + ok(hdata != 0, "DdeClientTransaction returned %p, error %lx\n", hdata, err); + ok(ret == DDE_FACK, "wrong status code %04lx\n", ret); + ok(err == DMLERR_NO_ERROR, "wrong dde error %lx\n", err); }
ret = 0xdeadbeef; @@ -1630,21 +1631,21 @@ todo_wine { err = DdeGetLastError(dde_inst); if (conv_unicode && (!client_unicode || !server_unicode)) /* W->A mapping */ { - ok(hdata != 0, "DdeClientTransaction returned %p, error %x\n", hdata, err); - ok(ret == DDE_FACK, "wrong status code %04x\n", ret); - ok(err == DMLERR_NO_ERROR, "wrong dde error %x\n", err); + ok(hdata != 0, "DdeClientTransaction returned %p, error %lx\n", hdata, err); + ok(ret == DDE_FACK, "wrong status code %04lx\n", ret); + ok(err == DMLERR_NO_ERROR, "wrong dde error %lx\n", err); } else if (!conv_unicode && client_unicode && server_unicode) /* A->W mapping -> garbage */ { - ok(!hdata, "DdeClientTransaction returned %p, error %x\n", hdata, err); - ok(ret == DDE_FNOTPROCESSED, "wrong status code %04x\n", ret); - ok(err == DMLERR_NOTPROCESSED, "DdeClientTransaction returned error %x\n", err); + ok(!hdata, "DdeClientTransaction returned %p, error %lx\n", hdata, err); + ok(ret == DDE_FNOTPROCESSED, "wrong status code %04lx\n", ret); + ok(err == DMLERR_NOTPROCESSED, "DdeClientTransaction returned error %lx\n", err); } else /* no mapping */ { - ok(!hdata, "DdeClientTransaction returned %p, error %x\n", hdata, err); - ok(ret == DDE_FNOTPROCESSED, "wrong status code %04x\n", ret); - ok(err == DMLERR_NOTPROCESSED, "DdeClientTransaction returned error %x\n", err); + ok(!hdata, "DdeClientTransaction returned %p, error %lx\n", hdata, err); + ok(ret == DDE_FNOTPROCESSED, "wrong status code %04lx\n", ret); + ok(err == DMLERR_NOTPROCESSED, "DdeClientTransaction returned error %lx\n", err); }
ret = 0xdeadbeef; @@ -1652,21 +1653,21 @@ todo_wine { err = DdeGetLastError(dde_inst); if (conv_unicode && (!client_unicode || !server_unicode)) /* W->A mapping -> wrong cmd */ { - ok(!hdata, "DdeClientTransaction returned %p, error %x\n", hdata, err); - ok(ret == DDE_FNOTPROCESSED, "wrong status code %04x\n", ret); - ok(err == DMLERR_NOTPROCESSED, "DdeClientTransaction returned error %x\n", err); + ok(!hdata, "DdeClientTransaction returned %p, error %lx\n", hdata, err); + ok(ret == DDE_FNOTPROCESSED, "wrong status code %04lx\n", ret); + ok(err == DMLERR_NOTPROCESSED, "DdeClientTransaction returned error %lx\n", err); } else if (!conv_unicode && client_unicode && server_unicode) /* A->W mapping -> garbage */ { - ok(!hdata, "DdeClientTransaction returned %p, error %x\n", hdata, err); - ok(ret == DDE_FNOTPROCESSED, "wrong status code %04x\n", ret); - ok(err == DMLERR_NOTPROCESSED, "DdeClientTransaction returned error %x\n", err); + ok(!hdata, "DdeClientTransaction returned %p, error %lx\n", hdata, err); + ok(ret == DDE_FNOTPROCESSED, "wrong status code %04lx\n", ret); + ok(err == DMLERR_NOTPROCESSED, "DdeClientTransaction returned error %lx\n", err); } else /* no mapping */ { - ok(hdata != 0, "DdeClientTransaction returned %p, error %x\n", hdata, err); - ok(ret == DDE_FACK, "wrong status code %04x\n", ret); - ok(err == DMLERR_NO_ERROR, "wrong dde error %x\n", err); + ok(hdata != 0, "DdeClientTransaction returned %p, error %lx\n", hdata, err); + ok(ret == DDE_FACK, "wrong status code %04lx\n", ret); + ok(err == DMLERR_NO_ERROR, "wrong dde error %lx\n", err); }
ret = 0xdeadbeef; @@ -1674,21 +1675,21 @@ todo_wine { err = DdeGetLastError(dde_inst); if (conv_unicode && (!client_unicode || !server_unicode)) /* W->A mapping -> garbage */ { - ok(!hdata, "DdeClientTransaction returned %p, error %x\n", hdata, err); - ok(ret == DDE_FNOTPROCESSED, "wrong status code %04x\n", ret); - ok(err == DMLERR_NOTPROCESSED, "DdeClientTransaction returned error %x\n", err); + ok(!hdata, "DdeClientTransaction returned %p, error %lx\n", hdata, err); + ok(ret == DDE_FNOTPROCESSED, "wrong status code %04lx\n", ret); + ok(err == DMLERR_NOTPROCESSED, "DdeClientTransaction returned error %lx\n", err); } else if (!conv_unicode && client_unicode && server_unicode) /* A->W mapping */ { - ok(hdata != 0, "DdeClientTransaction returned %p, error %x\n", hdata, err); - ok(ret == DDE_FACK, "wrong status code %04x\n", ret); - ok(err == DMLERR_NO_ERROR, "wrong dde error %x\n", err); + ok(hdata != 0, "DdeClientTransaction returned %p, error %lx\n", hdata, err); + ok(ret == DDE_FACK, "wrong status code %04lx\n", ret); + ok(err == DMLERR_NO_ERROR, "wrong dde error %lx\n", err); } else /* no mapping */ { - ok(!hdata, "DdeClientTransaction returned %p, error %x\n", hdata, err); - ok(ret == DDE_FNOTPROCESSED, "wrong status code %04x\n", ret); - ok(err == DMLERR_NOTPROCESSED, "DdeClientTransaction returned error %x\n", err); + ok(!hdata, "DdeClientTransaction returned %p, error %lx\n", hdata, err); + ok(ret == DDE_FNOTPROCESSED, "wrong status code %04lx\n", ret); + ok(err == DMLERR_NOTPROCESSED, "DdeClientTransaction returned error %lx\n", err); }
got = DdeDisconnect(hconv); @@ -1699,7 +1700,7 @@ todo_wine { ok(!ret, "DdeQueryConvInfo should fail\n"); err = DdeGetLastError(dde_inst); todo_wine { - ok(err == DMLERR_INVALIDPARAMETER, "wrong dde error %x\n", err); + ok(err == DMLERR_INVALIDPARAMETER, "wrong dde error %lx\n", err); }
got = DdeFreeStringHandle(dde_inst, hsz_server); @@ -1749,7 +1750,7 @@ static void test_initialisation(void) ret = DdeGetLastError(client_pid); todo_wine ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret); - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %08x\n", res); + ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %08lx\n", res);
DdeFreeStringHandle(client_pid, server); ret = DdeDisconnect(conversation); @@ -1823,7 +1824,7 @@ static void test_DdeCreateStringHandleW(DWORD dde_inst, int codepage) atom = GlobalFindAtomA((LPSTR)dde_string); ok(atom == 0, "Expected 0, got %d\n", atom); ok(GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %ld\n", GetLastError()); } else { @@ -1834,7 +1835,7 @@ static void test_DdeCreateStringHandleW(DWORD dde_inst, int codepage) atom = GlobalFindAtomW(dde_string); ok(atom == 0, "Expected 0, got %d\n", atom); ok(GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %ld\n", GetLastError()); }
ok(DdeFreeStringHandle(dde_inst, str_handle), "DdeFreeStringHandle failed\n"); @@ -1913,7 +1914,7 @@ static void test_DdeCreateDataHandle(void)
ptr = DdeAccessData(hdata, &size); ok(ptr != NULL, "Expected non-NULL ptr\n"); - ok(size == 260, "Expected 260, got %d\n", size); + ok(size == 260, "Expected 260, got %ld\n", size);
ret = DdeUnaccessData(hdata); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); @@ -1930,7 +1931,7 @@ static void test_DdeCreateDataHandle(void)
ptr = DdeAccessData(hdata, &size); ok(ptr != NULL, "Expected non-NULL ptr\n"); - ok(size == 0, "Expected 0, got %d\n", size); + ok(size == 0, "Expected 0, got %ld\n", size);
ret = DdeUnaccessData(hdata); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); @@ -1947,7 +1948,7 @@ static void test_DdeCreateDataHandle(void)
ptr = DdeAccessData(hdata, &size); ok(ptr != NULL, "Expected non-NULL ptr\n"); - ok(size == 262, "Expected 262, got %d\n", size); + ok(size == 262, "Expected 262, got %ld\n", size); todo_wine { ok(ptr && !*ptr, "Expected 0, got %d\n", lstrlenA((LPSTR)ptr)); @@ -1969,7 +1970,7 @@ static void test_DdeCreateDataHandle(void) ptr = DdeAccessData(hdata, &size); ok(ptr != NULL, "Expected non-NULL ptr\n"); ok(!lstrcmpA((LPSTR)ptr, "data"), "Expected data, got %s\n", ptr); - ok(size == 260, "Expected 260, got %d\n", size); + ok(size == 260, "Expected 260, got %ld\n", size);
ret = DdeUnaccessData(hdata); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); @@ -1987,7 +1988,7 @@ static void test_DdeCreateDataHandle(void) ptr = DdeAccessData(hdata, &size); ok(ptr != NULL, "Expected non-NULL ptr\n"); ok(!lstrcmpA((LPSTR)ptr, "data"), "Expected data, got %s\n", ptr); - ok(size == 260, "Expected 260, got %d\n", size); + ok(size == 260, "Expected 260, got %ld\n", size);
ret = DdeUnaccessData(hdata); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); @@ -2005,7 +2006,7 @@ static void test_DdeCreateDataHandle(void) ptr = DdeAccessData(hdata, &size); ok(ptr != NULL, "Expected non-NULL ptr\n"); ok(!lstrcmpA((LPSTR)ptr, "data"), "Expected data, got %s\n", ptr); - ok(size == 260, "Expected 260, got %d\n", size); + ok(size == 260, "Expected 260, got %ld\n", size);
ret = DdeUnaccessData(hdata); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); @@ -2024,12 +2025,12 @@ static void test_DdeCreateStringHandle(void) dde_inst = 0xdeadbeef; SetLastError(0xdeadbeef); ret = DdeInitializeW(&dde_inst, client_ddeml_callback, APPCMD_CLIENTONLY, 0); - ok(ret == DMLERR_INVALIDPARAMETER, "DdeInitializeW should fail, but got %04x instead\n", ret); + ok(ret == DMLERR_INVALIDPARAMETER, "DdeInitializeW should fail, but got %04lx instead\n", ret); ok(DdeGetLastError(dde_inst) == DMLERR_INVALIDPARAMETER, "expected DMLERR_INVALIDPARAMETER\n");
dde_inst = 0; ret = DdeInitializeW(&dde_inst, client_ddeml_callback, APPCMD_CLIENTONLY, 0); - ok(ret == DMLERR_NO_ERROR, "DdeInitializeW failed with error %04x (%08x)\n", + ok(ret == DMLERR_NO_ERROR, "DdeInitializeW failed with error %04lx (%08x)\n", ret, DdeGetLastError(dde_inst));
test_DdeCreateStringHandleW(dde_inst, 0); @@ -2096,25 +2097,25 @@ static void test_PackDDElParam(void)
lparam = PackDDElParam(WM_DDE_INITIATE, 0xcafe, 0xbeef); /* value gets sign-extended despite being an LPARAM */ - ok(lparam == (int)0xbeefcafe, "Expected 0xbeefcafe, got %08lx\n", lparam); + ok(lparam == (int)0xbeefcafe, "Expected 0xbeefcafe, got %08Ix\n", lparam);
lo = hi = 0; ret = UnpackDDElParam(WM_DDE_INITIATE, lparam, &lo, &hi); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xcafe, "Expected 0xcafe, got %08lx\n", lo); - ok(hi == 0xbeef, "Expected 0xbeef, got %08lx\n", hi); + ok(lo == 0xcafe, "Expected 0xcafe, got %08Ix\n", lo); + ok(hi == 0xbeef, "Expected 0xbeef, got %08Ix\n", hi);
ret = FreeDDElParam(WM_DDE_INITIATE, lparam); ok(ret == TRUE, "Expected TRUE, got %d\n", ret);
lparam = PackDDElParam(WM_DDE_TERMINATE, 0xcafe, 0xbeef); - ok(lparam == (int)0xbeefcafe, "Expected 0xbeefcafe, got %08lx\n", lparam); + ok(lparam == (int)0xbeefcafe, "Expected 0xbeefcafe, got %08Ix\n", lparam);
lo = hi = 0; ret = UnpackDDElParam(WM_DDE_TERMINATE, lparam, &lo, &hi); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xcafe, "Expected 0xcafe, got %08lx\n", lo); - ok(hi == 0xbeef, "Expected 0xbeef, got %08lx\n", hi); + ok(lo == 0xcafe, "Expected 0xcafe, got %08Ix\n", lo); + ok(hi == 0xbeef, "Expected 0xbeef, got %08Ix\n", hi);
ret = FreeDDElParam(WM_DDE_TERMINATE, lparam); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); @@ -2122,8 +2123,8 @@ static void test_PackDDElParam(void) lparam = PackDDElParam(WM_DDE_ADVISE, 0xcafe, 0xbeef); ptr = GlobalLock((HGLOBAL)lparam); ok(ptr != NULL, "Expected non-NULL ptr\n"); - ok(ptr[0] == 0xcafe, "Expected 0xcafe, got %08lx\n", ptr[0]); - ok(ptr[1] == 0xbeef, "Expected 0xbeef, got %08lx\n", ptr[1]); + ok(ptr[0] == 0xcafe, "Expected 0xcafe, got %08Ix\n", ptr[0]); + ok(ptr[1] == 0xbeef, "Expected 0xbeef, got %08Ix\n", ptr[1]);
ret = GlobalUnlock((HGLOBAL)lparam); ok(ret == 1, "Expected 1, got %d\n", ret); @@ -2131,20 +2132,20 @@ static void test_PackDDElParam(void) lo = hi = 0; ret = UnpackDDElParam(WM_DDE_ADVISE, lparam, &lo, &hi); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xcafe, "Expected 0xcafe, got %08lx\n", lo); - ok(hi == 0xbeef, "Expected 0xbeef, got %08lx\n", hi); + ok(lo == 0xcafe, "Expected 0xcafe, got %08Ix\n", lo); + ok(hi == 0xbeef, "Expected 0xbeef, got %08Ix\n", hi);
ret = FreeDDElParam(WM_DDE_ADVISE, lparam); ok(ret == TRUE, "Expected TRUE, got %d\n", ret);
lparam = PackDDElParam(WM_DDE_UNADVISE, 0xcafe, 0xbeef); - ok(lparam == (int)0xbeefcafe, "Expected 0xbeefcafe, got %08lx\n", lparam); + ok(lparam == (int)0xbeefcafe, "Expected 0xbeefcafe, got %08Ix\n", lparam);
lo = hi = 0; ret = UnpackDDElParam(WM_DDE_UNADVISE, lparam, &lo, &hi); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xcafe, "Expected 0xcafe, got %08lx\n", lo); - ok(hi == 0xbeef, "Expected 0xbeef, got %08lx\n", hi); + ok(lo == 0xcafe, "Expected 0xcafe, got %08Ix\n", lo); + ok(hi == 0xbeef, "Expected 0xbeef, got %08Ix\n", hi);
ret = FreeDDElParam(WM_DDE_UNADVISE, lparam); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); @@ -2152,8 +2153,8 @@ static void test_PackDDElParam(void) lparam = PackDDElParam(WM_DDE_ACK, 0xcafe, 0xbeef); ptr = GlobalLock((HGLOBAL)lparam); ok(ptr != NULL, "Expected non-NULL ptr\n"); - ok(ptr[0] == 0xcafe, "Expected 0xcafe, got %08lx\n", ptr[0]); - ok(ptr[1] == 0xbeef, "Expected 0xbeef, got %08lx\n", ptr[1]); + ok(ptr[0] == 0xcafe, "Expected 0xcafe, got %08Ix\n", ptr[0]); + ok(ptr[1] == 0xbeef, "Expected 0xbeef, got %08Ix\n", ptr[1]);
ret = GlobalUnlock((HGLOBAL)lparam); ok(ret == 1, "Expected 1, got %d\n", ret); @@ -2161,8 +2162,8 @@ static void test_PackDDElParam(void) lo = hi = 0; ret = UnpackDDElParam(WM_DDE_ACK, lparam, &lo, &hi); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xcafe, "Expected 0xcafe, got %08lx\n", lo); - ok(hi == 0xbeef, "Expected 0xbeef, got %08lx\n", hi); + ok(lo == 0xcafe, "Expected 0xcafe, got %08Ix\n", lo); + ok(hi == 0xbeef, "Expected 0xbeef, got %08Ix\n", hi);
ret = FreeDDElParam(WM_DDE_ACK, lparam); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); @@ -2170,8 +2171,8 @@ static void test_PackDDElParam(void) lparam = PackDDElParam(WM_DDE_DATA, 0xcafe, 0xbeef); ptr = GlobalLock((HGLOBAL)lparam); ok(ptr != NULL, "Expected non-NULL ptr\n"); - ok(ptr[0] == 0xcafe, "Expected 0xcafe, got %08lx\n", ptr[0]); - ok(ptr[1] == 0xbeef, "Expected 0xbeef, got %08lx\n", ptr[1]); + ok(ptr[0] == 0xcafe, "Expected 0xcafe, got %08Ix\n", ptr[0]); + ok(ptr[1] == 0xbeef, "Expected 0xbeef, got %08Ix\n", ptr[1]);
ret = GlobalUnlock((HGLOBAL)lparam); ok(ret == 1, "Expected 1, got %d\n", ret); @@ -2179,20 +2180,20 @@ static void test_PackDDElParam(void) lo = hi = 0; ret = UnpackDDElParam(WM_DDE_DATA, lparam, &lo, &hi); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xcafe, "Expected 0xcafe, got %08lx\n", lo); - ok(hi == 0xbeef, "Expected 0xbeef, got %08lx\n", hi); + ok(lo == 0xcafe, "Expected 0xcafe, got %08Ix\n", lo); + ok(hi == 0xbeef, "Expected 0xbeef, got %08Ix\n", hi);
ret = FreeDDElParam(WM_DDE_DATA, lparam); ok(ret == TRUE, "Expected TRUE, got %d\n", ret);
lparam = PackDDElParam(WM_DDE_REQUEST, 0xcafe, 0xbeef); - ok(lparam == (int)0xbeefcafe, "Expected 0xbeefcafe, got %08lx\n", lparam); + ok(lparam == (int)0xbeefcafe, "Expected 0xbeefcafe, got %08Ix\n", lparam);
lo = hi = 0; ret = UnpackDDElParam(WM_DDE_REQUEST, lparam, &lo, &hi); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xcafe, "Expected 0xcafe, got %08lx\n", lo); - ok(hi == 0xbeef, "Expected 0xbeef, got %08lx\n", hi); + ok(lo == 0xcafe, "Expected 0xcafe, got %08Ix\n", lo); + ok(hi == 0xbeef, "Expected 0xbeef, got %08Ix\n", hi);
ret = FreeDDElParam(WM_DDE_REQUEST, lparam); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); @@ -2200,8 +2201,8 @@ static void test_PackDDElParam(void) lparam = PackDDElParam(WM_DDE_POKE, 0xcafe, 0xbeef); ptr = GlobalLock((HGLOBAL)lparam); ok(ptr != NULL, "Expected non-NULL ptr\n"); - ok(ptr[0] == 0xcafe, "Expected 0xcafe, got %08lx\n", ptr[0]); - ok(ptr[1] == 0xbeef, "Expected 0xbeef, got %08lx\n", ptr[1]); + ok(ptr[0] == 0xcafe, "Expected 0xcafe, got %08Ix\n", ptr[0]); + ok(ptr[1] == 0xbeef, "Expected 0xbeef, got %08Ix\n", ptr[1]);
ret = GlobalUnlock((HGLOBAL)lparam); ok(ret == 1, "Expected 1, got %d\n", ret); @@ -2209,20 +2210,20 @@ static void test_PackDDElParam(void) lo = hi = 0; ret = UnpackDDElParam(WM_DDE_POKE, lparam, &lo, &hi); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xcafe, "Expected 0xcafe, got %08lx\n", lo); - ok(hi == 0xbeef, "Expected 0xbeef, got %08lx\n", hi); + ok(lo == 0xcafe, "Expected 0xcafe, got %08Ix\n", lo); + ok(hi == 0xbeef, "Expected 0xbeef, got %08Ix\n", hi);
ret = FreeDDElParam(WM_DDE_POKE, lparam); ok(ret == TRUE, "Expected TRUE, got %d\n", ret);
lparam = PackDDElParam(WM_DDE_EXECUTE, 0xcafe, 0xbeef); - ok(lparam == 0xbeef, "Expected 0xbeef, got %08lx\n", lparam); + ok(lparam == 0xbeef, "Expected 0xbeef, got %08Ix\n", lparam);
lo = hi = 0; ret = UnpackDDElParam(WM_DDE_EXECUTE, lparam, &lo, &hi); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0, "Expected 0, got %08lx\n", lo); - ok(hi == 0xbeef, "Expected 0xbeef, got %08lx\n", hi); + ok(lo == 0, "Expected 0, got %08Ix\n", lo); + ok(hi == 0xbeef, "Expected 0xbeef, got %08Ix\n", hi);
ret = FreeDDElParam(WM_DDE_EXECUTE, lparam); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); @@ -2239,38 +2240,38 @@ static void test_UnpackDDElParam(void) hi = 0xbeef; ret = UnpackDDElParam(WM_DDE_INITIATE, 0, &lo, &hi); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0, "Expected 0, got %08lx\n", lo); - ok(hi == 0, "Expected 0, got %08lx\n", hi); + ok(lo == 0, "Expected 0, got %08Ix\n", lo); + ok(hi == 0, "Expected 0, got %08Ix\n", hi);
/* NULL lo */ lo = 0xdead; hi = 0xbeef; ret = UnpackDDElParam(WM_DDE_INITIATE, 0xcafebabe, NULL, &hi); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xdead, "Expected 0xdead, got %08lx\n", lo); - ok(hi == 0xcafe, "Expected 0xcafe, got %08lx\n", hi); + ok(lo == 0xdead, "Expected 0xdead, got %08Ix\n", lo); + ok(hi == 0xcafe, "Expected 0xcafe, got %08Ix\n", hi);
/* NULL hi */ lo = 0xdead; hi = 0xbeef; ret = UnpackDDElParam(WM_DDE_INITIATE, 0xcafebabe, &lo, NULL); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xbabe, "Expected 0xbabe, got %08lx\n", lo); - ok(hi == 0xbeef, "Expected 0xbeef, got %08lx\n", hi); + ok(lo == 0xbabe, "Expected 0xbabe, got %08Ix\n", lo); + ok(hi == 0xbeef, "Expected 0xbeef, got %08Ix\n", hi);
lo = 0xdead; hi = 0xbeef; ret = UnpackDDElParam(WM_DDE_INITIATE, 0xcafebabe, &lo, &hi); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xbabe, "Expected 0xbabe, got %08lx\n", lo); - ok(hi == 0xcafe, "Expected 0xcafe, got %08lx\n", hi); + ok(lo == 0xbabe, "Expected 0xbabe, got %08Ix\n", lo); + ok(hi == 0xcafe, "Expected 0xcafe, got %08Ix\n", hi);
lo = 0xdead; hi = 0xbeef; ret = UnpackDDElParam(WM_DDE_TERMINATE, 0xcafebabe, &lo, &hi); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xbabe, "Expected 0xbabe, got %08lx\n", lo); - ok(hi == 0xcafe, "Expected 0xcafe, got %08lx\n", hi); + ok(lo == 0xbabe, "Expected 0xbabe, got %08Ix\n", lo); + ok(hi == 0xcafe, "Expected 0xcafe, got %08Ix\n", hi);
lo = 0xdead; hi = 0xbeef; @@ -2278,10 +2279,10 @@ static void test_UnpackDDElParam(void) ok(ret == FALSE, "Expected FALSE, got %d\n", ret); ok(lo == 0 || broken(lo == 0xdead), /* win2k */ - "Expected 0, got %08lx\n", lo); + "Expected 0, got %08Ix\n", lo); ok(hi == 0 || broken(hi == 0xbeef), /* win2k */ - "Expected 0, got %08lx\n", hi); + "Expected 0, got %08Ix\n", hi);
hglobal = GlobalAlloc(GMEM_DDESHARE, 2 * sizeof(*ptr)); ptr = GlobalLock(hglobal); @@ -2293,50 +2294,50 @@ static void test_UnpackDDElParam(void) hi = 0xbeef; ret = UnpackDDElParam(WM_DDE_ADVISE, (LPARAM)hglobal, &lo, &hi); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xcafebabe, "Expected 0xcafebabe, got %08lx\n", lo); - ok(hi == 0xdeadbeef, "Expected 0xdeadbeef, got %08lx\n", hi); + ok(lo == 0xcafebabe, "Expected 0xcafebabe, got %08Ix\n", lo); + ok(hi == 0xdeadbeef, "Expected 0xdeadbeef, got %08Ix\n", hi);
lo = 0xdead; hi = 0xbeef; ret = UnpackDDElParam(WM_DDE_UNADVISE, 0xcafebabe, &lo, &hi); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xbabe, "Expected 0xbabe, got %08lx\n", lo); - ok(hi == 0xcafe, "Expected 0xcafe, got %08lx\n", hi); + ok(lo == 0xbabe, "Expected 0xbabe, got %08Ix\n", lo); + ok(hi == 0xcafe, "Expected 0xcafe, got %08Ix\n", hi);
lo = 0xdead; hi = 0xbeef; ret = UnpackDDElParam(WM_DDE_ACK, (LPARAM)hglobal, &lo, &hi); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xcafebabe, "Expected 0xcafebabe, got %08lx\n", lo); - ok(hi == 0xdeadbeef, "Expected 0xdeadbeef, got %08lx\n", hi); + ok(lo == 0xcafebabe, "Expected 0xcafebabe, got %08Ix\n", lo); + ok(hi == 0xdeadbeef, "Expected 0xdeadbeef, got %08Ix\n", hi);
lo = 0xdead; hi = 0xbeef; ret = UnpackDDElParam(WM_DDE_DATA, (LPARAM)hglobal, &lo, &hi); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xcafebabe, "Expected 0xcafebabe, got %08lx\n", lo); - ok(hi == 0xdeadbeef, "Expected 0xdeadbeef, got %08lx\n", hi); + ok(lo == 0xcafebabe, "Expected 0xcafebabe, got %08Ix\n", lo); + ok(hi == 0xdeadbeef, "Expected 0xdeadbeef, got %08Ix\n", hi);
lo = 0xdead; hi = 0xbeef; ret = UnpackDDElParam(WM_DDE_REQUEST, 0xcafebabe, &lo, &hi); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xbabe, "Expected 0xbabe, got %08lx\n", lo); - ok(hi == 0xcafe, "Expected 0xcafe, got %08lx\n", hi); + ok(lo == 0xbabe, "Expected 0xbabe, got %08Ix\n", lo); + ok(hi == 0xcafe, "Expected 0xcafe, got %08Ix\n", hi);
lo = 0xdead; hi = 0xbeef; ret = UnpackDDElParam(WM_DDE_POKE, (LPARAM)hglobal, &lo, &hi); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xcafebabe, "Expected 0xcafebabe, got %08lx\n", lo); - ok(hi == 0xdeadbeef, "Expected 0xdeadbeef, got %08lx\n", hi); + ok(lo == 0xcafebabe, "Expected 0xcafebabe, got %08Ix\n", lo); + ok(hi == 0xdeadbeef, "Expected 0xdeadbeef, got %08Ix\n", hi);
lo = 0xdead; hi = 0xbeef; ret = UnpackDDElParam(WM_DDE_EXECUTE, 0xcafebabe, &lo, &hi); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0, "Expected 0, got %08lx\n", lo); - ok(hi == 0xcafebabe, "Expected 0xcafebabe, got %08lx\n", hi); + ok(lo == 0, "Expected 0, got %08Ix\n", lo); + ok(hi == 0xcafebabe, "Expected 0xcafebabe, got %08Ix\n", hi);
GlobalFree(hglobal); } @@ -2381,18 +2382,18 @@ static HDDEDATA CALLBACK server_end_to_end_callback(UINT uType, UINT uFmt, HCONV ok(uFmt == 0, "Expected 0, got %d, msg_index=%d\n", uFmt, msg_index); ok(hconv == 0, "Expected 0, got %p, msg_index=%d\n", hconv, msg_index); ok(hdata == 0, "Expected 0, got %p, msg_index=%d\n", hdata, msg_index); - ok(dwData1 != 0, "Expected not 0, got %08lx, msg_index=%d\n", dwData1, msg_index); - ok(dwData2 == FALSE, "Expected FALSE, got %08lx, msg_index=%d\n", dwData2, msg_index); + ok(dwData1 != 0, "Expected not 0, got %08Ix, msg_index=%d\n", dwData1, msg_index); + ok(dwData2 == FALSE, "Expected FALSE, got %08Ix, msg_index=%d\n", dwData2, msg_index);
size = DdeQueryStringA(server_pid, hsz1, str, MAX_PATH, CP_WINANSI); ok(!lstrcmpA(str, test_topic), "Expected %s, got %s, msg_index=%d\n", test_topic, str, msg_index); - ok(size == 12, "Expected 12, got %d, msg_index=%d\n", size, msg_index); + ok(size == 12, "Expected 12, got %ld, msg_index=%d\n", size, msg_index);
size = DdeQueryStringA(server_pid, hsz2, str, MAX_PATH, CP_WINANSI); ok(!lstrcmpA(str, test_service), "Expected %s, got %s, msg_index=%d\n", test_service, str, msg_index); - ok(size == 14, "Expected 14, got %d, msg_index=%d\n", size, msg_index); + ok(size == 14, "Expected 14, got %ld, msg_index=%d\n", size, msg_index);
return (HDDEDATA) TRUE; } @@ -2414,18 +2415,18 @@ static HDDEDATA CALLBACK server_end_to_end_callback(UINT uType, UINT uFmt, HCONV ok(uFmt == 0, "Expected 0, got %d\n", uFmt); ok(hconv == conversation, "Expected conversation handle, got %p, msg_index=%d\n", hconv, msg_index); - ok(dwData1 == 0, "Expected 0, got %08lx, msg_index=%d\n", dwData1, msg_index); - ok(dwData2 == 0, "Expected 0, got %08lx, msg_index=%d\n", dwData2, msg_index); + ok(dwData1 == 0, "Expected 0, got %08Ix, msg_index=%d\n", dwData1, msg_index); + ok(dwData2 == 0, "Expected 0, got %08Ix, msg_index=%d\n", dwData2, msg_index); ok(hsz2 == 0, "Expected 0, got %p, msg_index=%d\n", hsz2, msg_index); size = DdeQueryStringA(server_pid, hsz1, str, MAX_PATH, CP_WINANSI); ok(!lstrcmpA(str, test_topic), "Expected %s, got %s, msg_index=%d\n", test_topic, str, msg_index); - ok(size == 12, "Expected 12, got %d, msg_index=%d\n", size, msg_index); + ok(size == 12, "Expected 12, got %ld, msg_index=%d\n", size, msg_index);
size = DdeGetData(hdata, NULL, 0, 0); ok((buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size)) != NULL, "should not be null\n"); rsize = DdeGetData(hdata, buffer, size, 0); - ok(rsize == size, "Incorrect size returned, expected %d got %d, msg_index=%d\n", + ok(rsize == size, "Incorrect size returned, expected %ld got %ld, msg_index=%d\n", size, rsize, msg_index); if (winetest_debug > 1) trace("msg %u strA "%s" strW %s\n", msg_index, buffer, wine_dbgstr_w((WCHAR*)buffer));
@@ -2442,7 +2443,7 @@ static HDDEDATA CALLBACK server_end_to_end_callback(UINT uType, UINT uFmt, HCONV case 0: /* ANSI string */ if (unicode_server) { - ok(size == size_a_to_w, "Wrong size %d/%d, msg_index=%d\n", size, size_a_to_w, msg_index); + ok(size == size_a_to_w, "Wrong size %ld/%ld, msg_index=%d\n", size, size_a_to_w, msg_index); ok(!lstrcmpW((WCHAR*)buffer, test_cmd_a_to_w), "Expected %s, msg_index=%d\n", wine_dbgstr_w(test_cmd_a_to_w), msg_index); } @@ -2452,7 +2453,7 @@ static HDDEDATA CALLBACK server_end_to_end_callback(UINT uType, UINT uFmt, HCONV } else { - ok(size == size_a, "Wrong size %d/%d, msg_index=%d\n", size, size_a, msg_index); + ok(size == size_a, "Wrong size %ld/%ld, msg_index=%d\n", size, size_a, msg_index); ok(!lstrcmpA((CHAR*)buffer, test_cmd_a_to_a), "Expected %s, got %s, msg_index=%d\n", test_cmd_a_to_a, buffer, msg_index); } @@ -2461,13 +2462,13 @@ static HDDEDATA CALLBACK server_end_to_end_callback(UINT uType, UINT uFmt, HCONV case 1: /* Unicode string with only 8-bit chars */ if (unicode_server) { - ok(size == size_w, "Wrong size %d/%d, msg_index=%d\n", size, size_w, msg_index); + ok(size == size_w, "Wrong size %ld/%ld, msg_index=%d\n", size, size_w, msg_index); ok(!lstrcmpW((WCHAR*)buffer, cmd_w), "Expected %s, msg_index=%d\n", wine_dbgstr_w(cmd_w), msg_index); } else { - ok(size == size_w_to_a, "Wrong size %d/%d, msg_index=%d\n", + ok(size == size_w_to_a, "Wrong size %ld/%ld, msg_index=%d\n", size, size_w_to_a, msg_index); ok(!lstrcmpA((CHAR*)buffer, test_cmd_w_to_a), "Expected %s, got %s, msg_index=%d\n", test_cmd_w_to_a, buffer, msg_index); @@ -2486,19 +2487,19 @@ static HDDEDATA CALLBACK server_end_to_end_callback(UINT uType, UINT uFmt, HCONV DWORD xp_size = MultiByteToWideChar( CP_ACP, 0, (char *)cmd_w, -1, NULL, 0 ) * sizeof(WCHAR); ok(size == xp_size || broken(size == nt_size) || broken(str_index == 4 && IsDBCSLeadByte(cmd_w[0])) /* East Asian */, - "Wrong size %d/%d, msg_index=%d\n", size, size_a_to_w, msg_index); + "Wrong size %ld/%ld, msg_index=%d\n", size, size_a_to_w, msg_index); ok(!lstrcmpW((WCHAR*)buffer, test_cmd_a_to_w), "Expected %s, msg_index=%d\n", wine_dbgstr_w(test_cmd_a_to_w), msg_index); } else if (unicode_client) { - ok(size == size_w_to_a, "Wrong size %d/%d, msg_index=%d\n", size, size_w_to_a, msg_index); + ok(size == size_w_to_a, "Wrong size %ld/%ld, msg_index=%d\n", size, size_w_to_a, msg_index); ok(!lstrcmpA((CHAR*)buffer, test_cmd_w_to_a), "Expected %s, got %s, msg_index=%d\n", test_cmd_w_to_a, buffer, msg_index); } else { - ok(size == size_w, "Wrong size %d/%d, msg_index=%d\n", size, size_w, msg_index); + ok(size == size_w, "Wrong size %ld/%ld, msg_index=%d\n", size, size_w, msg_index); ok(!lstrcmpW((WCHAR*)buffer, cmd_w), "Expected %s, msg_index=%d\n", wine_dbgstr_w(cmd_w), msg_index); } @@ -2506,7 +2507,7 @@ static HDDEDATA CALLBACK server_end_to_end_callback(UINT uType, UINT uFmt, HCONV case 5: /* Chinese with latin characters begin */ if (unicode_server && unicode_client) { - todo_wine ok(size == size_w, "Wrong size %d expected %d, msg_index=%d\n", size, size_w, msg_index); + todo_wine ok(size == size_w, "Wrong size %ld expected %ld, msg_index=%d\n", size, size_w, msg_index); MultiByteToWideChar(CP_ACP, 0, test_cmd_w_to_a, size_w, test_cmd_a_to_w, ARRAY_SIZE(test_cmd_a_to_w)); todo_wine ok(!lstrcmpW((WCHAR*)buffer, cmd_w), @@ -2514,7 +2515,7 @@ static HDDEDATA CALLBACK server_end_to_end_callback(UINT uType, UINT uFmt, HCONV } else if (unicode_server) { - todo_wine ok(size == size_w, "Wrong size %d expected %d, msg_index=%d\n", size, size_w, msg_index); + todo_wine ok(size == size_w, "Wrong size %ld expected %ld, msg_index=%d\n", size, size_w, msg_index); MultiByteToWideChar(CP_ACP, 0, test_cmd_w_to_a, size_w, test_cmd_a_to_w, ARRAY_SIZE(test_cmd_a_to_w)); if (!is_cjk()) @@ -2526,13 +2527,13 @@ static HDDEDATA CALLBACK server_end_to_end_callback(UINT uType, UINT uFmt, HCONV } else if (unicode_client) { - ok(size == size_w_to_a, "Wrong size %d expected %d, msg_index=%d\n", size, size_w_to_a, msg_index); + ok(size == size_w_to_a, "Wrong size %ld expected %ld, msg_index=%d\n", size, size_w_to_a, msg_index); ok(!lstrcmpA((CHAR*)buffer, test_cmd_w_to_a), "Expected %s, got %s, msg_index=%d\n", test_cmd_w_to_a, buffer, msg_index); } else { - todo_wine ok(size == size_w_to_a || size == (size_w_to_a - 1), "Wrong size %d expected %d or %d, msg_index=%d\n", + todo_wine ok(size == size_w_to_a || size == (size_w_to_a - 1), "Wrong size %ld expected %ld or %ld, msg_index=%d\n", size, size_w_to_a, size_w_to_a - 1, msg_index); todo_wine ok(!lstrcmpA((CHAR*)buffer, test_cmd_w_to_a), "Expected %s, got %s, msg_index=%d\n", test_cmd_w_to_a, buffer, msg_index); @@ -2588,7 +2589,7 @@ static void test_end_to_end_client(BOOL type_a) ret = DdeInitializeA(&client_pid, client_end_to_end_callback, APPCMD_CLIENTONLY, 0); else ret = DdeInitializeW(&client_pid, client_end_to_end_callback, APPCMD_CLIENTONLY, 0); - ok(ret == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %x\n", ret); + ok(ret == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %lx\n", ret);
if (type_a) { @@ -2609,16 +2610,16 @@ static void test_end_to_end_client(BOOL type_a) return; } ret = DdeGetLastError(client_pid); - ok(ret == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %x\n", ret); + ok(ret == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %lx\n", ret); DdeFreeStringHandle(client_pid, server);
/* Test both A and W data being passed to DdeClientTransaction */ hdata = DdeClientTransaction((LPBYTE)test_cmd_a_to_a, sizeof(test_cmd_a_to_a), hconv, (HSZ)0xdead, 0xbeef, XTYP_EXECUTE, 1000, &ret); ok(hdata != NULL, "DdeClientTransaction failed\n"); - ok(ret == DDE_FACK, "wrong status code %x\n", ret); + ok(ret == DDE_FACK, "wrong status code %lx\n", ret); err = DdeGetLastError(client_pid); - ok(err == DMLERR_NO_ERROR, "wrong dde error %x\n", err); + ok(err == DMLERR_NO_ERROR, "wrong dde error %lx\n", err);
for (i = 0; i < ARRAY_SIZE(test_cmd_w_to_w); i++) { @@ -2626,17 +2627,17 @@ static void test_end_to_end_client(BOOL type_a) (lstrlenW(test_cmd_w_to_w[i]) + 1) * sizeof(WCHAR), hconv, (HSZ)0xdead, 0xbeef, XTYP_EXECUTE, 1000, &ret); ok(hdata != NULL, "DdeClientTransaction failed\n"); - ok(ret == DDE_FACK, "wrong status code %x\n", ret); + ok(ret == DDE_FACK, "wrong status code %lx\n", ret); err = DdeGetLastError(client_pid); - ok(err == DMLERR_NO_ERROR, "wrong dde error %x\n", err); + ok(err == DMLERR_NO_ERROR, "wrong dde error %lx\n", err); }
DdeFreeStringHandle(client_pid, topic); ret = DdeDisconnect(hconv); - ok(ret == TRUE, "Expected TRUE, got %x\n", ret); + ok(ret == TRUE, "Expected TRUE, got %lx\n", ret);
ret = DdeUninitialize(client_pid); - ok(ret == TRUE, "Expected TRUE, got %x\n", ret); + ok(ret == TRUE, "Expected TRUE, got %lx\n", ret);
}
@@ -2659,7 +2660,7 @@ static void test_end_to_end_server(void) res = DdeInitializeW(&server_pid, server_end_to_end_callback, APPCLASS_STANDARD, 0); else res = DdeInitializeA(&server_pid, server_end_to_end_callback, APPCLASS_STANDARD, 0); - ok(res == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %d\n", res); + ok(res == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %ld\n", res);
server = DdeCreateStringHandleA(server_pid, test_service, CP_WINANSI); ok(server != NULL, "Expected non-NULL string handle\n"); @@ -2677,7 +2678,7 @@ static void test_end_to_end_server(void) ret = DdeUninitialize(server_pid); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); GetExitCodeProcess(client, &res); - ok( !res, "client failed with %u error(s)\n", res ); + ok( !res, "client failed with %lu error(s)\n", res ); CloseHandle(client); }
diff --git a/dlls/user32/tests/dialog.c b/dlls/user32/tests/dialog.c index f2bc30ff921..5c500608710 100644 --- a/dlls/user32/tests/dialog.c +++ b/dlls/user32/tests/dialog.c @@ -1,3 +1,4 @@ +#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* Unit test suite for the dialog functions. * * Copyright 2004 Bill Medland @@ -167,7 +168,7 @@ static BOOL CreateWindows (HINSTANCE hinst) { if (p->id >= ARRAY_SIZE(hwnd)) { - trace ("Control %ld is out of range\n", p->id); + trace ("Control %Id is out of range\n", p->id); return FALSE; } else @@ -175,21 +176,21 @@ static BOOL CreateWindows (HINSTANCE hinst) } if (p->id <= 0) { - trace ("Control %ld is out of range\n", p->id); + trace ("Control %Id is out of range\n", p->id); return FALSE; } if (hwnd[p->id] != 0) { - trace ("Control %ld is used more than once\n", p->id); + trace ("Control %Id is used more than once\n", p->id); return FALSE; }
/* Create the control */ - sprintf (ctrlname, "ctrl%4.4ld", p->id); + sprintf (ctrlname, "ctrl%4.4Id", p->id); hwnd[p->id] = CreateWindowExA(p->exstyle, p->parent ? "static" : "GetNextDlgItemWindowClass", ctrlname, p->style, 10, 10, 10, 10, hwnd[p->parent], p->parent ? (HMENU) (2000 + p->id) : 0, hinst, 0); if (!hwnd[p->id]) { - trace ("Failed to create control %ld\n", p->id); + trace ("Failed to create control %Id\n", p->id); return FALSE; }
@@ -203,7 +204,7 @@ static BOOL CreateWindows (HINSTANCE hinst) exstyle = GetWindowLongA(hwnd[p->id], GWL_EXSTYLE); if (style != p->style || exstyle != p->exstyle) { - trace ("Style mismatch at %ld: %8.8x %8.8x cf %8.8x %8.8x\n", p->id, style, exstyle, p->style, p->exstyle); + trace ("Style mismatch at %Id: %8.8lx %8.8lx cf %8.8lx %8.8lx\n", p->id, style, exstyle, p->style, p->exstyle); } } p++; @@ -693,11 +694,11 @@ static void test_WM_NEXTDLGCTL(void)
DefDlgProcA( g_hwndTestDlg, DM_SETDEFID, 200, 0); dwVal = DefDlgProcA( g_hwndTestDlg, DM_GETDEFID, 0, 0); - ok(LOWORD(dwVal) == 200, "expected 200, got %x\n", dwVal); + ok(LOWORD(dwVal) == 200, "expected 200, got %lx\n", dwVal);
DefDlgProcA( g_hwndTestDlg, DM_SETDEFID, 300, 0); dwVal = DefDlgProcA( g_hwndTestDlg, DM_GETDEFID, 0, 0); - ok(LOWORD(dwVal) == 300, "expected 300, got %x\n", dwVal); + ok(LOWORD(dwVal) == 300, "expected 300, got %lx\n", dwVal); ok(SendMessageW( child3, WM_GETDLGCODE, 0, 0) != DLGC_DEFPUSHBUTTON, "expected child3 not to be marked as DLGC_DEFPUSHBUTTON\n");
@@ -1042,13 +1043,13 @@ static void test_focus(void)
SendMessageA(hDlg, WM_SETFOCUS, 0, 0); SendMessageA(hTextbox, EM_GETSEL, (WPARAM)&selectionStart, (LPARAM)&selectionEnd); - ok(selectionStart == 0 && selectionEnd == 11, "Text selection after WM_SETFOCUS is [%i, %i) expected [0, 11)\n", selectionStart, selectionEnd); + ok(selectionStart == 0 && selectionEnd == 11, "Text selection after WM_SETFOCUS is [%li, %li) expected [0, 11)\n", selectionStart, selectionEnd);
/* but WM_ACTIVATE does not */ SendMessageA(hTextbox, EM_SETSEL, 0, 0); SendMessageA(hDlg, WM_ACTIVATE, WA_ACTIVE, 0); SendMessageA(hTextbox, EM_GETSEL, (WPARAM)&selectionStart, (LPARAM)&selectionEnd); - ok(selectionStart == 0 && selectionEnd == 0, "Text selection after WM_ACTIVATE is [%i, %i) expected [0, 0)\n", selectionStart, selectionEnd); + ok(selectionStart == 0 && selectionEnd == 0, "Text selection after WM_ACTIVATE is [%li, %li) expected [0, 0)\n", selectionStart, selectionEnd);
DestroyWindow(hDlg); } @@ -1112,7 +1113,7 @@ static void test_focus(void) GetFocus(), hDlg, edit); SendMessageA(edit, EM_GETSEL, (WPARAM)&selectionStart, (LPARAM)&selectionEnd); ok(selectionStart == 0 && selectionEnd == 11, - "Text selection after WM_SETFOCUS is [%i, %i) expected [0, 11)\n", + "Text selection after WM_SETFOCUS is [%li, %li) expected [0, 11)\n", selectionStart, selectionEnd);
DestroyWindow(hDlg); @@ -1175,7 +1176,7 @@ static INT_PTR CALLBACK getdlgitem_test_dialog_proc(HWND hdlg, UINT msg, WPARAM ok(val == -1, "Unexpected id.\n");
val = GetWindowLongPtrA(hwnd, GWLP_ID); - ok(val == -1, "Unexpected id %ld.\n", val); + ok(val == -1, "Unexpected id %Id.\n", val);
hwnd = GetDlgItem(hdlg, -2); ok(hwnd != NULL, "Expected dialog item.\n"); @@ -1184,7 +1185,7 @@ static INT_PTR CALLBACK getdlgitem_test_dialog_proc(HWND hdlg, UINT msg, WPARAM ok(val == -2, "Unexpected id.\n");
val = GetWindowLongPtrA(hwnd, GWLP_ID); - ok(val == -2, "Unexpected id %ld.\n", val); + ok(val == -2, "Unexpected id %Id.\n", val);
EndDialog(hdlg, 0xdead); } @@ -1357,9 +1358,9 @@ static INT_PTR CALLBACK TestControlStyleDlgProc(HWND hdlg, UINT msg, control = GetDlgItem(hdlg, 7); ok(control != 0, "dialog control with id 7 not found\n"); style = GetWindowLongA(control, GWL_STYLE); - ok(style == (WS_CHILD|WS_VISIBLE), "expected WS_CHILD|WS_VISIBLE, got %#x\n", style); + ok(style == (WS_CHILD|WS_VISIBLE), "expected WS_CHILD|WS_VISIBLE, got %#lx\n", style); exstyle = GetWindowLongA(control, GWL_EXSTYLE); - ok(exstyle == (WS_EX_NOPARENTNOTIFY|WS_EX_TRANSPARENT|WS_EX_CLIENTEDGE), "expected WS_EX_NOPARENTNOTIFY|WS_EX_TRANSPARENT|WS_EX_CLIENTEDGE, got %#x\n", exstyle); + ok(exstyle == (WS_EX_NOPARENTNOTIFY|WS_EX_TRANSPARENT|WS_EX_CLIENTEDGE), "expected WS_EX_NOPARENTNOTIFY|WS_EX_TRANSPARENT|WS_EX_CLIENTEDGE, got %#lx\n", exstyle); buf[0] = 0; GetWindowTextA(control, buf, sizeof(buf)); ok(strcmp(buf, "bump7") == 0, "expected bump7, got %s\n", buf); @@ -1367,9 +1368,9 @@ static INT_PTR CALLBACK TestControlStyleDlgProc(HWND hdlg, UINT msg, control = GetDlgItem(hdlg, 8); ok(control != 0, "dialog control with id 8 not found\n"); style = GetWindowLongA(control, GWL_STYLE); - ok(style == (WS_CHILD|WS_VISIBLE), "expected WS_CHILD|WS_VISIBLE, got %#x\n", style); + ok(style == (WS_CHILD|WS_VISIBLE), "expected WS_CHILD|WS_VISIBLE, got %#lx\n", style); exstyle = GetWindowLongA(control, GWL_EXSTYLE); - ok(exstyle == (WS_EX_NOPARENTNOTIFY|WS_EX_TRANSPARENT), "expected WS_EX_NOPARENTNOTIFY|WS_EX_TRANSPARENT, got %#x\n", exstyle); + ok(exstyle == (WS_EX_NOPARENTNOTIFY|WS_EX_TRANSPARENT), "expected WS_EX_NOPARENTNOTIFY|WS_EX_TRANSPARENT, got %#lx\n", exstyle); buf[0] = 0; GetWindowTextA(control, buf, sizeof(buf)); ok(strcmp(buf, "bump8") == 0, "expected bump8, got %s\n", buf); @@ -1539,19 +1540,19 @@ static INT_PTR CALLBACK test_aw_conversion_dlgproc(HWND hdlg, UINT msg, WPARAM w
/* WM_SETTEXT/WM_GETTEXT */ originalproc = GetWindowLongPtrW(hdlg, DWLP_DLGPROC); - ok(originalproc == (ULONG_PTR)test_aw_conversion_dlgproc, "Unexpected dlg proc %#lx.\n", originalproc); + ok(originalproc == (ULONG_PTR)test_aw_conversion_dlgproc, "Unexpected dlg proc %#Ix.\n", originalproc);
dlgproc = GetWindowLongPtrA(hdlg, DWLP_DLGPROC); - ok(dlgproc != (ULONG_PTR)test_aw_conversion_dlgproc, "Unexpected dlg proc %#lx.\n", dlgproc); + ok(dlgproc != (ULONG_PTR)test_aw_conversion_dlgproc, "Unexpected dlg proc %#Ix.\n", dlgproc);
dlgproc = SetWindowLongPtrA(hdlg, DWLP_DLGPROC, (UINT_PTR)test_aw_conversion_dlgprocA); ok(IsWindowUnicode(hdlg), "Expected unicode window.\n");
dlgproc = GetWindowLongPtrW(hdlg, DWLP_DLGPROC); - ok(dlgproc != (ULONG_PTR)test_aw_conversion_dlgprocA, "Unexpected dlg proc %#lx.\n", dlgproc); + ok(dlgproc != (ULONG_PTR)test_aw_conversion_dlgprocA, "Unexpected dlg proc %#Ix.\n", dlgproc);
dlgproc = GetWindowLongPtrA(hdlg, DWLP_DLGPROC); - ok(dlgproc == (ULONG_PTR)test_aw_conversion_dlgprocA, "Unexpected dlg proc %#lx.\n", dlgproc); + ok(dlgproc == (ULONG_PTR)test_aw_conversion_dlgprocA, "Unexpected dlg proc %#Ix.\n", dlgproc);
SetPropA(hdlg, "test_mode", ULongToHandle(DLGPROCTEXT_SETTEXTA)); ret = SetWindowTextA(hdlg, testtext); @@ -1584,10 +1585,10 @@ static INT_PTR CALLBACK test_aw_conversion_dlgproc(HWND hdlg, UINT msg, WPARAM w ok(IsWindowUnicode(hdlg), "Expected unicode window.\n");
dlgproc = GetWindowLongPtrW(hdlg, DWLP_DLGPROC); - ok(dlgproc == (ULONG_PTR)test_aw_conversion_dlgprocW, "Unexpected dlg proc %#lx.\n", dlgproc); + ok(dlgproc == (ULONG_PTR)test_aw_conversion_dlgprocW, "Unexpected dlg proc %#Ix.\n", dlgproc);
dlgproc = GetWindowLongPtrA(hdlg, DWLP_DLGPROC); - ok(dlgproc != (ULONG_PTR)test_aw_conversion_dlgprocW, "Unexpected dlg proc %#lx.\n", dlgproc); + ok(dlgproc != (ULONG_PTR)test_aw_conversion_dlgprocW, "Unexpected dlg proc %#Ix.\n", dlgproc);
SetPropA(hdlg, "test_mode", ULongToHandle(DLGPROCTEXT_SETTEXTA)); ret = SetWindowTextA(hdlg, testtext); @@ -1646,19 +1647,19 @@ static INT_PTR CALLBACK test_aw_conversion_dlgproc2(HWND hdlg, UINT msg, WPARAM dlg_test_aw_message(hdlg, WM_SETTEXT);
originalproc = GetWindowLongPtrW(hdlg, DWLP_DLGPROC); - ok(originalproc != (ULONG_PTR)test_aw_conversion_dlgproc2, "Unexpected dlg proc %#lx.\n", originalproc); + ok(originalproc != (ULONG_PTR)test_aw_conversion_dlgproc2, "Unexpected dlg proc %#Ix.\n", originalproc);
dlgproc = GetWindowLongPtrA(hdlg, DWLP_DLGPROC); - ok(dlgproc == (ULONG_PTR)test_aw_conversion_dlgproc2, "Unexpected dlg proc %#lx.\n", dlgproc); + ok(dlgproc == (ULONG_PTR)test_aw_conversion_dlgproc2, "Unexpected dlg proc %#Ix.\n", dlgproc);
dlgproc = SetWindowLongPtrA(hdlg, DWLP_DLGPROC, (UINT_PTR)test_aw_conversion_dlgprocW); ok(!IsWindowUnicode(hdlg), "Unexpected unicode window.\n");
dlgproc = GetWindowLongPtrW(hdlg, DWLP_DLGPROC); - ok(dlgproc != (ULONG_PTR)test_aw_conversion_dlgprocW, "Unexpected dlg proc %#lx.\n", dlgproc); + ok(dlgproc != (ULONG_PTR)test_aw_conversion_dlgprocW, "Unexpected dlg proc %#Ix.\n", dlgproc);
dlgproc = GetWindowLongPtrA(hdlg, DWLP_DLGPROC); - ok(dlgproc == (ULONG_PTR)test_aw_conversion_dlgprocW, "Unexpected dlg proc %#lx.\n", dlgproc); + ok(dlgproc == (ULONG_PTR)test_aw_conversion_dlgprocW, "Unexpected dlg proc %#Ix.\n", dlgproc);
SetPropA(hdlg, "test_mode", ULongToHandle(DLGPROCTEXT_SETTEXTA)); ret = SetWindowTextA(hdlg, testtext); @@ -1691,10 +1692,10 @@ static INT_PTR CALLBACK test_aw_conversion_dlgproc2(HWND hdlg, UINT msg, WPARAM ok(!IsWindowUnicode(hdlg), "Unexpected unicode window.\n");
dlgproc = GetWindowLongPtrW(hdlg, DWLP_DLGPROC); - ok(dlgproc == (ULONG_PTR)test_aw_conversion_dlgprocA, "Unexpected dlg proc %#lx.\n", dlgproc); + ok(dlgproc == (ULONG_PTR)test_aw_conversion_dlgprocA, "Unexpected dlg proc %#Ix.\n", dlgproc);
dlgproc = GetWindowLongPtrA(hdlg, DWLP_DLGPROC); - ok(dlgproc != (ULONG_PTR)test_aw_conversion_dlgprocA, "Unexpected dlg proc %#lx.\n", dlgproc); + ok(dlgproc != (ULONG_PTR)test_aw_conversion_dlgprocA, "Unexpected dlg proc %#Ix.\n", dlgproc);
SetPropA(hdlg, "test_mode", ULongToHandle(DLGPROCTEXT_SETTEXTA)); ret = SetWindowTextA(hdlg, testtext); @@ -1819,49 +1820,49 @@ static void test_DialogBoxParam(void) HWND hwnd_invalid = (HWND)0x4444;
ret = DialogBoxParamA(GetModuleHandleA(NULL), "TEST_DLG_CHILD_POPUP", 0, TestControlStyleDlgProc, 0); - ok(ret == -7, "expected -7, got %ld\n", ret); + ok(ret == -7, "expected -7, got %Id\n", ret);
SetLastError(0xdeadbeef); ret = DialogBoxParamA(GetModuleHandleA(NULL), "IDD_DIALOG" , hwnd_invalid, 0 , 0); - ok(0 == ret || broken(ret == -1), "DialogBoxParamA returned %ld, expected 0\n", ret); + ok(0 == ret || broken(ret == -1), "DialogBoxParamA returned %Id, expected 0\n", ret); ok(ERROR_INVALID_WINDOW_HANDLE == GetLastError() || broken(GetLastError() == 0xdeadbeef), - "got %d, expected ERROR_INVALID_WINDOW_HANDLE\n",GetLastError()); + "got %ld, expected ERROR_INVALID_WINDOW_HANDLE\n",GetLastError());
/* Test a dialog which destroys itself on WM_INITDIALOG. */ SetLastError(0xdeadbeef); ret = DialogBoxParamA(GetModuleHandleA(NULL), "IDD_DIALOG", 0, DestroyDlgWinProc, 0); - ok(-1 == ret, "DialogBoxParamA returned %ld, expected -1\n", ret); + ok(-1 == ret, "DialogBoxParamA returned %Id, expected -1\n", ret); ok(ERROR_INVALID_WINDOW_HANDLE == GetLastError() || GetLastError() == ERROR_SUCCESS || broken(GetLastError() == 0xdeadbeef), - "got %d, expected ERROR_INVALID_WINDOW_HANDLE\n",GetLastError()); + "got %ld, expected ERROR_INVALID_WINDOW_HANDLE\n",GetLastError());
/* Test a dialog which destroys itself on WM_CLOSE. */ ret = DialogBoxParamA(GetModuleHandleA(NULL), "IDD_DIALOG", 0, DestroyOnCloseDlgWinProc, 0); - ok(0 == ret, "DialogBoxParamA returned %ld, expected 0\n", ret); + ok(0 == ret, "DialogBoxParamA returned %Id, expected 0\n", ret);
SetLastError(0xdeadbeef); ret = DialogBoxParamA(GetModuleHandleA(NULL), "RESOURCE_INVALID" , 0, 0, 0); - ok(-1 == ret, "DialogBoxParamA returned %ld, expected -1\n", ret); + ok(-1 == ret, "DialogBoxParamA returned %Id, expected -1\n", ret); ok(ERROR_RESOURCE_NAME_NOT_FOUND == GetLastError() || broken(GetLastError() == 0xdeadbeef), - "got %d, expected ERROR_RESOURCE_NAME_NOT_FOUND\n",GetLastError()); + "got %ld, expected ERROR_RESOURCE_NAME_NOT_FOUND\n",GetLastError());
SetLastError(0xdeadbeef); ret = DialogBoxParamA(GetModuleHandleA(NULL), "TEST_DIALOG_INVALID_CLASS", 0, DestroyDlgWinProc, 0); - ok(ret == -1, "DialogBoxParamA returned %ld, expected -1\n", ret); + ok(ret == -1, "DialogBoxParamA returned %Id, expected -1\n", ret); todo_wine ok(GetLastError() == ERROR_CANNOT_FIND_WND_CLASS || broken(GetLastError() == ERROR_SUCCESS) /* < win10 21H1 */, - "got %u, expected ERROR_CANNOT_FIND_WND_CLASS\n", GetLastError()); + "got %lu, expected ERROR_CANNOT_FIND_WND_CLASS\n", GetLastError());
SetLastError(0xdeadbeef); ret = DefDlgProcA(0, WM_ERASEBKGND, 0, 0); - ok(ret == 0, "DefDlgProcA returned %ld, expected 0\n", ret); + ok(ret == 0, "DefDlgProcA returned %Id, expected 0\n", ret); ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE || broken(GetLastError() == 0xdeadbeef), - "got %d, expected ERROR_INVALID_WINDOW_HANDLE\n", GetLastError()); + "got %ld, expected ERROR_INVALID_WINDOW_HANDLE\n", GetLastError());
ret = DialogBoxParamA(GetModuleHandleA(NULL), "TEST_EMPTY_DIALOG", 0, TestInitDialogHandleProc, 0); ok(ret == IDOK, "Expected IDOK\n"); @@ -1870,20 +1871,20 @@ static void test_DialogBoxParam(void) ok(ret == IDOK, "Expected IDOK\n");
ret = DialogBoxParamA(GetModuleHandleA(NULL), "TEST_EMPTY_DIALOG", 0, TestReturnKeyDlgProc, 0); - ok(ret == 0, "Unexpected ret value %ld.\n", ret); + ok(ret == 0, "Unexpected ret value %Id.\n", ret);
/* WM_SETTEXT handling in case of A/W dialog procedures vs A/W dialog window. */ ret = DialogBoxParamW(GetModuleHandleA(NULL), nameW, 0, test_aw_conversion_dlgproc, 0); - ok(ret == -123, "Unexpected ret value %ld.\n", ret); + ok(ret == -123, "Unexpected ret value %Id.\n", ret);
ret = DialogBoxParamA(GetModuleHandleA(NULL), "TEST_EMPTY_DIALOG", 0, test_aw_conversion_dlgproc2, 0); - ok(ret == -123, "Unexpected ret value %ld.\n", ret); + ok(ret == -123, "Unexpected ret value %Id.\n", ret);
ret = DialogBoxParamW(GetModuleHandleA(NULL), nameW, 0, test_aw_conversion_dlgproc3, 1); - ok(ret == -123, "Unexpected ret value %ld.\n", ret); + ok(ret == -123, "Unexpected ret value %Id.\n", ret);
ret = DialogBoxParamA(GetModuleHandleA(NULL), "TEST_EMPTY_DIALOG", 0, test_aw_conversion_dlgproc3, 0); - ok(ret == -123, "Unexpected ret value %ld.\n", ret); + ok(ret == -123, "Unexpected ret value %Id.\n", ret); }
static void test_DisabledDialogTest(void) @@ -2011,12 +2012,12 @@ static void test_SaveRestoreFocus(void) ok (hDlg != 0, "Failed to create test dialog.\n");
foundId = GetWindowLongPtrA(GetFocus(), GWLP_ID); - ok (foundId == 1000, "First edit box should have gained focus on dialog creation. Expected: %d, Found: %ld\n", 1000, foundId); + ok (foundId == 1000, "First edit box should have gained focus on dialog creation. Expected: %d, Found: %Id\n", 1000, foundId);
SetFocus(GetNextDlgTabItem(hDlg, GetFocus(), FALSE)); SendMessageA(hDlg, WM_ACTIVATE, MAKEWPARAM(WA_ACTIVE, 0), 0); foundId = GetWindowLongPtrA(GetFocus(), GWLP_ID); - ok (foundId == 1001, "First edit box should have regained focus after dialog reactivation. Expected: %d, Found: %ld\n", 1001, foundId); + ok (foundId == 1001, "First edit box should have regained focus after dialog reactivation. Expected: %d, Found: %Id\n", 1001, foundId); SetFocus(GetNextDlgTabItem(hDlg, NULL, FALSE));
/* de- then reactivate the dialog */ @@ -2024,38 +2025,38 @@ static void test_SaveRestoreFocus(void) SendMessageA(hDlg, WM_ACTIVATE, MAKEWPARAM(WA_ACTIVE, 0), 0);
foundId = GetWindowLongPtrA(GetFocus(), GWLP_ID); - ok (foundId == 1000, "First edit box should have regained focus after dialog reactivation. Expected: %d, Found: %ld\n", 1000, foundId); + ok (foundId == 1000, "First edit box should have regained focus after dialog reactivation. Expected: %d, Found: %Id\n", 1000, foundId);
/* select the next tabbable item */ SetFocus(GetNextDlgTabItem(hDlg, GetFocus(), FALSE));
foundId = GetWindowLongPtrA(GetFocus(), GWLP_ID); - ok (foundId == 1001, "Second edit box should have gained focus. Expected: %d, Found: %ld\n", 1001, foundId); + ok (foundId == 1001, "Second edit box should have gained focus. Expected: %d, Found: %Id\n", 1001, foundId);
/* de- then reactivate the dialog */ SendMessageA(hDlg, WM_ACTIVATE, MAKEWPARAM(WA_INACTIVE, 0), 0); SendMessageA(hDlg, WM_ACTIVATE, MAKEWPARAM(WA_ACTIVE, 0), 0);
foundId = GetWindowLongPtrA(GetFocus(), GWLP_ID); - ok (foundId == 1001, "Second edit box should have gained focus after dialog reactivation. Expected: %d, Found: %ld\n", 1001, foundId); + ok (foundId == 1001, "Second edit box should have gained focus after dialog reactivation. Expected: %d, Found: %Id\n", 1001, foundId);
/* set focus to the dialog */ SetFocus(hDlg);
foundId = GetWindowLongPtrA(GetFocus(), GWLP_ID); - ok (foundId == 1000, "First edit box should have gained focus on dialog focus. Expected: %d, Found: %ld\n", 1000, foundId); + ok (foundId == 1000, "First edit box should have gained focus on dialog focus. Expected: %d, Found: %Id\n", 1000, foundId);
/* select second tabbable item */ SetFocus(GetNextDlgTabItem(hDlg, GetNextDlgTabItem(hDlg, NULL, FALSE), FALSE));
foundId = GetWindowLongPtrA(GetFocus(), GWLP_ID); - ok (foundId == 1001, "Second edit box should have gained focus. Expected: %d, Found: %ld\n", 1001, foundId); + ok (foundId == 1001, "Second edit box should have gained focus. Expected: %d, Found: %Id\n", 1001, foundId);
/* send WM_ACTIVATE message to already active dialog */ SendMessageA(hDlg, WM_ACTIVATE, MAKEWPARAM(WA_ACTIVE, 0), 0);
foundId = GetWindowLongPtrA(GetFocus(), GWLP_ID); - ok (foundId == 1001, "Second edit box should have gained focus. Expected: %d, Found: %ld\n", 1001, foundId); + ok (foundId == 1001, "Second edit box should have gained focus. Expected: %d, Found: %Id\n", 1001, foundId);
/* disable the 2nd box */ EnableWindow(GetFocus(), FALSE); diff --git a/dlls/user32/tests/edit.c b/dlls/user32/tests/edit.c index 777c50be337..eb65191d77d 100644 --- a/dlls/user32/tests/edit.c +++ b/dlls/user32/tests/edit.c @@ -1,3 +1,4 @@ +#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* Unit test suite for edit control. * * Copyright 2004 Vitaliy Margolen @@ -661,7 +662,7 @@ static void set_client_height(HWND Wnd, unsigned Height)
GetClientRect(Wnd, &ClientRect); ok(ClientRect.bottom - ClientRect.top == Height, - "The client height should be %d, but is %d\n", + "The client height should be %d, but is %ld\n", Height, ClientRect.bottom - ClientRect.top); }
@@ -677,52 +678,52 @@ static void test_edit_control_1(void) trace("EDIT: Single line\n"); hwEdit = create_editcontrol(ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0); r = get_edit_style(hwEdit); - ok(r == (ES_AUTOVSCROLL | ES_AUTOHSCROLL), "Wrong style expected 0xc0 got: 0x%x\n", r); + ok(r == (ES_AUTOVSCROLL | ES_AUTOHSCROLL), "Wrong style expected 0xc0 got: 0x%lx\n", r); for (i=0;i<65535;i++) { msMessage.wParam = i; r = SendMessageA(hwEdit, WM_GETDLGCODE, 0, (LPARAM) &msMessage); ok(r == (DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTARROWS), - "Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTARROWS got %x\n", r); + "Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTARROWS got %lx\n", r); } DestroyWindow (hwEdit);
trace("EDIT: Single line want returns\n"); hwEdit = create_editcontrol(ES_WANTRETURN | ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0); r = get_edit_style(hwEdit); - ok(r == (ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN), "Wrong style expected 0x10c0 got: 0x%x\n", r); + ok(r == (ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN), "Wrong style expected 0x10c0 got: 0x%lx\n", r); for (i=0;i<65535;i++) { msMessage.wParam = i; r = SendMessageA(hwEdit, WM_GETDLGCODE, 0, (LPARAM) &msMessage); ok(r == (DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTARROWS), - "Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTARROWS got %x\n", r); + "Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTARROWS got %lx\n", r); } DestroyWindow (hwEdit);
trace("EDIT: Multiline line\n"); hwEdit = create_editcontrol(ES_MULTILINE | WS_VSCROLL | ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0); r = get_edit_style(hwEdit); - ok(r == (ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_MULTILINE), "Wrong style expected 0xc4 got: 0x%x\n", r); + ok(r == (ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_MULTILINE), "Wrong style expected 0xc4 got: 0x%lx\n", r); for (i=0;i<65535;i++) { msMessage.wParam = i; r = SendMessageA(hwEdit, WM_GETDLGCODE, 0, (LPARAM) &msMessage); ok(r == (DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTALLKEYS | DLGC_WANTARROWS), - "Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTALLKEYS | DLGC_WANTARROWS got %x\n", r); + "Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTALLKEYS | DLGC_WANTARROWS got %lx\n", r); } DestroyWindow (hwEdit);
trace("EDIT: Multi line want returns\n"); hwEdit = create_editcontrol(ES_MULTILINE | WS_VSCROLL | ES_WANTRETURN | ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0); r = get_edit_style(hwEdit); - ok(r == (ES_WANTRETURN | ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_MULTILINE), "Wrong style expected 0x10c4 got: 0x%x\n", r); + ok(r == (ES_WANTRETURN | ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_MULTILINE), "Wrong style expected 0x10c4 got: 0x%lx\n", r); for (i=0;i<65535;i++) { msMessage.wParam = i; r = SendMessageA(hwEdit, WM_GETDLGCODE, 0, (LPARAM) &msMessage); ok(r == (DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTALLKEYS | DLGC_WANTARROWS), - "Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTALLKEYS | DLGC_WANTARROWS got %x\n", r); + "Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTALLKEYS | DLGC_WANTARROWS got %lx\n", r); } DestroyWindow (hwEdit); } @@ -758,11 +759,11 @@ static void test_edit_control_2(void) trace("EDIT: SETTEXT atomicity\n"); /* Send messages to "type" in the word 'foo'. */ r = SendMessageA(hwndET2, WM_CHAR, 'f', 1); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r); r = SendMessageA(hwndET2, WM_CHAR, 'o', 1); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r); r = SendMessageA(hwndET2, WM_CHAR, 'o', 1); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r); /* 'foo' should have been changed to 'bar' by the UPDATE handler. */ GetWindowTextA(hwndET2, szLocalString, MAXLEN); ok(strcmp(szLocalString, "bar")==0, @@ -770,34 +771,34 @@ static void test_edit_control_2(void)
/* try setting the caret before it's visible */ r = SetCaretPos(0, 0); - todo_wine ok(0 == r, "SetCaretPos succeeded unexpectedly, expected: 0, got: %d\n", r); + todo_wine ok(0 == r, "SetCaretPos succeeded unexpectedly, expected: 0, got: %ld\n", r); phwnd = SetFocus(hwndET2); ok(phwnd != NULL, "SetFocus failed unexpectedly, expected non-zero, got NULL\n"); r = SetCaretPos(0, 0); - ok(1 == r, "SetCaretPos failed unexpectedly, expected: 1, got: %d\n", r); + ok(1 == r, "SetCaretPos failed unexpectedly, expected: 1, got: %ld\n", r); r = GetCaretPos(&cpos); - ok(1 == r, "GetCaretPos failed unexpectedly, expected: 1, got: %d\n", r); - ok(cpos.x == 0 && cpos.y == 0, "Wrong caret position, expected: (0,0), got: (%d,%d)\n", cpos.x, cpos.y); + ok(1 == r, "GetCaretPos failed unexpectedly, expected: 1, got: %ld\n", r); + ok(cpos.x == 0 && cpos.y == 0, "Wrong caret position, expected: (0,0), got: (%ld,%ld)\n", cpos.x, cpos.y); r = SetCaretPos(-1, -1); - ok(1 == r, "SetCaretPos failed unexpectedly, expected: 1, got: %d\n", r); + ok(1 == r, "SetCaretPos failed unexpectedly, expected: 1, got: %ld\n", r); r = GetCaretPos(&cpos); - ok(1 == r, "GetCaretPos failed unexpectedly, expected: 1, got: %d\n", r); - ok(cpos.x == -1 && cpos.y == -1, "Wrong caret position, expected: (-1,-1), got: (%d,%d)\n", cpos.x, cpos.y); + ok(1 == r, "GetCaretPos failed unexpectedly, expected: 1, got: %ld\n", r); + ok(cpos.x == -1 && cpos.y == -1, "Wrong caret position, expected: (-1,-1), got: (%ld,%ld)\n", cpos.x, cpos.y); r = SetCaretPos(w << 1, h << 1); - ok(1 == r, "SetCaretPos failed unexpectedly, expected: 1, got: %d\n", r); + ok(1 == r, "SetCaretPos failed unexpectedly, expected: 1, got: %ld\n", r); r = GetCaretPos(&cpos); - ok(1 == r, "GetCaretPos failed unexpectedly, expected: 1, got: %d\n", r); - ok(cpos.x == (w << 1) && cpos.y == (h << 1), "Wrong caret position, expected: (%d,%d), got: (%d,%d)\n", w << 1, h << 1, cpos.x, cpos.y); + ok(1 == r, "GetCaretPos failed unexpectedly, expected: 1, got: %ld\n", r); + ok(cpos.x == (w << 1) && cpos.y == (h << 1), "Wrong caret position, expected: (%ld,%ld), got: (%ld,%ld)\n", w << 1, h << 1, cpos.x, cpos.y); r = SetCaretPos(w, h); - ok(1 == r, "SetCaretPos failed unexpectedly, expected: 1, got: %d\n", r); + ok(1 == r, "SetCaretPos failed unexpectedly, expected: 1, got: %ld\n", r); r = GetCaretPos(&cpos); - ok(1 == r, "GetCaretPos failed unexpectedly, expected: 1, got: %d\n", r); - ok(cpos.x == w && cpos.y == h, "Wrong caret position, expected: (%d,%d), got: (%d,%d)\n", w, h, cpos.x, cpos.y); + ok(1 == r, "GetCaretPos failed unexpectedly, expected: 1, got: %ld\n", r); + ok(cpos.x == w && cpos.y == h, "Wrong caret position, expected: (%ld,%ld), got: (%ld,%ld)\n", w, h, cpos.x, cpos.y); r = SetCaretPos(w - 1, h - 1); - ok(1 == r, "SetCaretPos failed unexpectedly, expected: 1, got: %d\n", r); + ok(1 == r, "SetCaretPos failed unexpectedly, expected: 1, got: %ld\n", r); r = GetCaretPos(&cpos); - ok(1 == r, "GetCaretPos failed unexpectedly, expected: 1, got: %d\n", r); - ok(cpos.x == (w - 1) && cpos.y == (h - 1), "Wrong caret position, expected: (%d,%d), got: (%d,%d)\n", w - 1, h - 1, cpos.x, cpos.y); + ok(1 == r, "GetCaretPos failed unexpectedly, expected: 1, got: %ld\n", r); + ok(cpos.x == (w - 1) && cpos.y == (h - 1), "Wrong caret position, expected: (%ld,%ld), got: (%ld,%ld)\n", w - 1, h - 1, cpos.x, cpos.y);
/* OK, done! */ DestroyWindow (hwndET2); @@ -1295,7 +1296,7 @@ static void test_edit_control_5(void) assert(hWnd); /* size of non-child edit control is (much) bigger than requested */ GetWindowRect( hWnd, &rc); - ok( rc.right - rc.left > 20, "size of the window (%d) is smaller than expected\n", + ok( rc.right - rc.left > 20, "size of the window (%ld) is smaller than expected\n", rc.right - rc.left); DestroyWindow(hWnd); /* so create a parent, and give it edit controls children to test with */ @@ -1358,21 +1359,21 @@ static void test_edit_control_6(void) assert(hWnd);
ret = SendMessageA(hWnd, WM_SETTEXT, 0, (LPARAM)str); - ok(ret == TRUE, "Expected %d, got %d\n", TRUE, ret); + ok(ret == TRUE, "Expected %d, got %ld\n", TRUE, ret); ret = SendMessageA(hWnd, WM_GETTEXT, MAXLEN, (LPARAM)buf); - ok(ret == strlen(str), "Expected %s, got len %d\n", str, ret); + ok(ret == strlen(str), "Expected %s, got len %ld\n", str, ret); ok(!strcmp(buf, str), "Expected %s, got %s\n", str, buf); buf[0] = 0; ret = SendMessageA(hWnd, WM_DESTROY, 0, 0); - ok(ret == 0, "Expected 0, got %d\n", ret); + ok(ret == 0, "Expected 0, got %ld\n", ret); ret = SendMessageA(hWnd, WM_GETTEXT, MAXLEN, (LPARAM)buf); - ok(ret == strlen(str), "Expected %s, got len %d\n", str, ret); + ok(ret == strlen(str), "Expected %s, got len %ld\n", str, ret); ok(!strcmp(buf, str), "Expected %s, got %s\n", str, buf); buf[0] = 0; ret = SendMessageA(hWnd, WM_NCDESTROY, 0, 0); - ok(ret == 0, "Expected 0, got %d\n", ret); + ok(ret == 0, "Expected 0, got %ld\n", ret); ret = SendMessageA(hWnd, WM_GETTEXT, MAXLEN, (LPARAM)buf); - ok(ret == 0, "Expected 0, got len %d\n", ret); + ok(ret == 0, "Expected 0, got len %ld\n", ret); ok(!strcmp(buf, ""), "Expected empty string, got %s\n", buf);
DestroyWindow(hWnd); @@ -1387,20 +1388,20 @@ static void test_edit_control_limittext(void) trace("EDIT: buffer limit for single-line\n"); hwEdit = create_editcontrol(ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0); r = SendMessageA(hwEdit, EM_GETLIMITTEXT, 0, 0); - ok(r == 30000, "Incorrect default text limit, expected 30000 got %u\n", r); + ok(r == 30000, "Incorrect default text limit, expected 30000 got %lu\n", r); SendMessageA(hwEdit, EM_SETLIMITTEXT, 0, 0); r = SendMessageA(hwEdit, EM_GETLIMITTEXT, 0, 0); - ok( r == 2147483646, "got limit %u (expected 2147483646)\n", r); + ok( r == 2147483646, "got limit %lu (expected 2147483646)\n", r); DestroyWindow(hwEdit);
/* Test default limit for multi-line control */ trace("EDIT: buffer limit for multi-line\n"); hwEdit = create_editcontrol(ES_MULTILINE | WS_VSCROLL | ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0); r = SendMessageA(hwEdit, EM_GETLIMITTEXT, 0, 0); - ok(r == 30000, "Incorrect default text limit, expected 30000 got %u\n", r); + ok(r == 30000, "Incorrect default text limit, expected 30000 got %lu\n", r); SendMessageA(hwEdit, EM_SETLIMITTEXT, 0, 0); r = SendMessageA(hwEdit, EM_GETLIMITTEXT, 0, 0); - ok( r == 4294967295U, "got limit %u (expected 4294967295)\n", r); + ok( r == 4294967295U, "got limit %lu (expected 4294967295)\n", r); DestroyWindow(hwEdit); }
@@ -1425,16 +1426,16 @@ static void test_edit_control_scroll(void) assert(hwEdit);
ret = SendMessageA(hwEdit, EM_SCROLL, SB_PAGEDOWN, 0); - ok(!ret, "Returned %x, expected 0.\n", ret); + ok(!ret, "Returned %lx, expected 0.\n", ret);
ret = SendMessageA(hwEdit, EM_SCROLL, SB_PAGEUP, 0); - ok(!ret, "Returned %x, expected 0.\n", ret); + ok(!ret, "Returned %lx, expected 0.\n", ret);
ret = SendMessageA(hwEdit, EM_SCROLL, SB_LINEUP, 0); - ok(!ret, "Returned %x, expected 0.\n", ret); + ok(!ret, "Returned %lx, expected 0.\n", ret);
ret = SendMessageA(hwEdit, EM_SCROLL, SB_LINEDOWN, 0); - ok(!ret, "Returned %x, expected 0.\n", ret); + ok(!ret, "Returned %lx, expected 0.\n", ret);
DestroyWindow (hwEdit);
@@ -1450,7 +1451,7 @@ static void test_edit_control_scroll(void) assert(hwEdit);
ret = SendMessageA(hwEdit, EM_SCROLL, SB_PAGEDOWN, 0); - ok(!ret, "Returned %x, expected 0.\n", ret); + ok(!ret, "Returned %lx, expected 0.\n", ret);
DestroyWindow (hwEdit); } @@ -1757,16 +1758,16 @@ static LRESULT CALLBACK test_class_proc(HWND hwnd, UINT message, WPARAM wParam,
memset(&rect, 0, sizeof(rect)); SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rect); - ok(!rect.right && !rect.bottom, "Invalid size after NCCREATE: %d x %d\n", rect.right, rect.bottom); + ok(!rect.right && !rect.bottom, "Invalid size after NCCREATE: %ld x %ld\n", rect.right, rect.bottom);
/* test that messages between WM_NCCREATE and WM_CREATE don't crash or cause unexpected behavior */ r = SendMessageA(hwnd, EM_SETSEL, 0, 0); - ok(r == 1, "Returned %ld, expected 1.\n", r); + ok(r == 1, "Returned %Id, expected 1.\n", r); r = SendMessageA(hwnd, WM_SIZE, 0, 0x00100010); - todo_wine ok(r == 1, "Returned %ld, expected 1.\n", r); + todo_wine ok(r == 1, "Returned %Id, expected 1.\n", r); r = SendMessageA(hwnd, EM_LINESCROLL, 1, 1); - ok(r == 1, "Returned %ld, expected 1.\n", r); + ok(r == 1, "Returned %Id, expected 1.\n", r);
return result;
@@ -1774,11 +1775,11 @@ static LRESULT CALLBACK test_class_proc(HWND hwnd, UINT message, WPARAM wParam, /* test that messages between WM_NCCREATE and WM_CREATE don't crash or cause unexpected behavior */ r = SendMessageA(hwnd, EM_SETSEL, 0, 0); - ok(r == 1, "Returned %ld, expected 1.\n", r); + ok(r == 1, "Returned %Id, expected 1.\n", r); r = SendMessageA(hwnd, WM_SIZE, 0, 0x00100010); - todo_wine ok(r == 1, "Returned %ld, expected 1.\n", r); + todo_wine ok(r == 1, "Returned %Id, expected 1.\n", r); r = SendMessageA(hwnd, EM_LINESCROLL, 1, 1); - ok(r == 1, "Returned %ld, expected 1.\n", r); + ok(r == 1, "Returned %Id, expected 1.\n", r);
break; } @@ -2174,39 +2175,39 @@ static void test_espassword(void)
hwEdit = create_editcontrol(ES_PASSWORD, 0); r = get_edit_style(hwEdit); - ok(r == ES_PASSWORD, "Wrong style expected ES_PASSWORD got: 0x%x\n", r); + ok(r == ES_PASSWORD, "Wrong style expected ES_PASSWORD got: 0x%lx\n", r); /* set text */ r = SendMessageA(hwEdit , WM_SETTEXT, 0, (LPARAM) password); - ok(r == TRUE, "Expected: %d, got: %d\n", TRUE, r); + ok(r == TRUE, "Expected: %d, got: %ld\n", TRUE, r);
/* select all, cut (ctrl-x) */ SendMessageA(hwEdit, EM_SETSEL, 0, -1); r = SendMessageA(hwEdit, WM_CHAR, 24, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r);
/* get text */ r = SendMessageA(hwEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok(r == strlen(password), "Expected: %s, got len %d\n", password, r); + ok(r == strlen(password), "Expected: %s, got len %ld\n", password, r); ok(strcmp(buffer, password) == 0, "expected %s, got %s\n", password, buffer);
r = OpenClipboard(hwEdit); - ok(r == TRUE, "expected %d, got %d le=%u\n", TRUE, r, GetLastError()); + ok(r == TRUE, "expected %d, got %ld le=%lu\n", TRUE, r, GetLastError()); r = EmptyClipboard(); - ok(r == TRUE, "expected %d, got %d\n", TRUE, r); + ok(r == TRUE, "expected %d, got %ld\n", TRUE, r); r = CloseClipboard(); - ok(r == TRUE, "expected %d, got %d\n", TRUE, r); + ok(r == TRUE, "expected %d, got %ld\n", TRUE, r);
/* select all, copy (ctrl-c) and paste (ctrl-v) */ SendMessageA(hwEdit, EM_SETSEL, 0, -1); r = SendMessageA(hwEdit, WM_CHAR, 3, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r); r = SendMessageA(hwEdit, WM_CHAR, 22, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r);
/* get text */ buffer[0] = 0; r = SendMessageA(hwEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok(r == 0, "Expected: 0, got: %d\n", r); + ok(r == 0, "Expected: 0, got: %ld\n", r); ok(strcmp(buffer, "") == 0, "expected empty string, got %s\n", buffer);
DestroyWindow (hwEdit); @@ -2222,48 +2223,48 @@ static void test_undo(void)
hwEdit = create_editcontrol(0, 0); r = get_edit_style(hwEdit); - ok(0 == r, "Wrong style expected 0x%x got: 0x%x\n", 0, r); + ok(0 == r, "Wrong style expected 0x%x got: 0x%lx\n", 0, r);
/* set text */ r = SendMessageA(hwEdit , WM_SETTEXT, 0, (LPARAM) text); - ok(TRUE == r, "Expected: %d, got: %d\n", TRUE, r); + ok(TRUE == r, "Expected: %d, got: %ld\n", TRUE, r);
/* select all, */ cpMin = cpMax = 0xdeadbeef; SendMessageA(hwEdit, EM_SETSEL, 0, -1); r = SendMessageA(hwEdit, EM_GETSEL, (WPARAM) &cpMin, (LPARAM) &cpMax); - ok((strlen(text) << 16) == r, "Unexpected length %d\n", r); - ok(0 == cpMin, "Expected: %d, got %d\n", 0, cpMin); - ok(9 == cpMax, "Expected: %d, got %d\n", 9, cpMax); + ok((strlen(text) << 16) == r, "Unexpected length %ld\n", r); + ok(0 == cpMin, "Expected: %d, got %ld\n", 0, cpMin); + ok(9 == cpMax, "Expected: %d, got %ld\n", 9, cpMax);
/* cut (ctrl-x) */ r = SendMessageA(hwEdit, WM_CHAR, 24, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r);
/* get text */ buffer[0] = 0; r = SendMessageA(hwEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok(0 == r, "Expected: %d, got len %d\n", 0, r); + ok(0 == r, "Expected: %d, got len %ld\n", 0, r); ok(0 == strcmp(buffer, ""), "expected %s, got %s\n", "", buffer);
/* undo (ctrl-z) */ r = SendMessageA(hwEdit, WM_CHAR, 26, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r);
/* get text */ buffer[0] = 0; r = SendMessageA(hwEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok(strlen(text) == r, "Unexpected length %d\n", r); + ok(strlen(text) == r, "Unexpected length %ld\n", r); ok(0 == strcmp(buffer, text), "expected %s, got %s\n", text, buffer);
/* undo again (ctrl-z) */ r = SendMessageA(hwEdit, WM_CHAR, 26, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r);
/* get text */ buffer[0] = 0; r = SendMessageA(hwEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok(r == 0, "Expected: %d, got len %d\n", 0, r); + ok(r == 0, "Expected: %d, got len %ld\n", 0, r); ok(0 == strcmp(buffer, ""), "expected %s, got %s\n", "", buffer);
DestroyWindow (hwEdit); @@ -2278,19 +2279,19 @@ static void test_enter(void) /* multiline */ hwEdit = create_editcontrol(ES_MULTILINE, 0); r = get_edit_style(hwEdit); - ok(ES_MULTILINE == r, "Wrong style expected ES_MULTILINE got: 0x%x\n", r); + ok(ES_MULTILINE == r, "Wrong style expected ES_MULTILINE got: 0x%lx\n", r);
/* set text */ r = SendMessageA(hwEdit , WM_SETTEXT, 0, (LPARAM) ""); - ok(TRUE == r, "Expected: %d, got: %d\n", TRUE, r); + ok(TRUE == r, "Expected: %d, got: %ld\n", TRUE, r);
r = SendMessageA(hwEdit, WM_CHAR, VK_RETURN, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r);
/* get text */ buffer[0] = 0; r = SendMessageA(hwEdit, WM_GETTEXT, 16, (LPARAM) buffer); - ok(2 == r, "Expected: %d, got len %d\n", 2, r); + ok(2 == r, "Expected: %d, got len %ld\n", 2, r); ok(0 == strcmp(buffer, "\r\n"), "expected "\r\n", got "%s"\n", buffer);
DestroyWindow (hwEdit); @@ -2298,19 +2299,19 @@ static void test_enter(void) /* single line */ hwEdit = create_editcontrol(0, 0); r = get_edit_style(hwEdit); - ok(0 == r, "Wrong style expected 0x%x got: 0x%x\n", 0, r); + ok(0 == r, "Wrong style expected 0x%x got: 0x%lx\n", 0, r);
/* set text */ r = SendMessageA(hwEdit , WM_SETTEXT, 0, (LPARAM) ""); - ok(TRUE == r, "Expected: %d, got: %d\n", TRUE, r); + ok(TRUE == r, "Expected: %d, got: %ld\n", TRUE, r);
r = SendMessageA(hwEdit, WM_CHAR, VK_RETURN, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r);
/* get text */ buffer[0] = 0; r = SendMessageA(hwEdit, WM_GETTEXT, 16, (LPARAM) buffer); - ok(0 == r, "Expected: %d, got len %d\n", 0, r); + ok(0 == r, "Expected: %d, got len %ld\n", 0, r); ok(0 == strcmp(buffer, ""), "expected "", got "%s"\n", buffer);
DestroyWindow (hwEdit); @@ -2318,19 +2319,19 @@ static void test_enter(void) /* single line with ES_WANTRETURN */ hwEdit = create_editcontrol(ES_WANTRETURN, 0); r = get_edit_style(hwEdit); - ok(ES_WANTRETURN == r, "Wrong style expected ES_WANTRETURN got: 0x%x\n", r); + ok(ES_WANTRETURN == r, "Wrong style expected ES_WANTRETURN got: 0x%lx\n", r);
/* set text */ r = SendMessageA(hwEdit , WM_SETTEXT, 0, (LPARAM) ""); - ok(TRUE == r, "Expected: %d, got: %d\n", TRUE, r); + ok(TRUE == r, "Expected: %d, got: %ld\n", TRUE, r);
r = SendMessageA(hwEdit, WM_CHAR, VK_RETURN, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r);
/* get text */ buffer[0] = 0; r = SendMessageA(hwEdit, WM_GETTEXT, 16, (LPARAM) buffer); - ok(0 == r, "Expected: %d, got len %d\n", 0, r); + ok(0 == r, "Expected: %d, got len %ld\n", 0, r); ok(0 == strcmp(buffer, ""), "expected "", got "%s"\n", buffer);
DestroyWindow (hwEdit); @@ -2345,19 +2346,19 @@ static void test_tab(void) /* multiline */ hwEdit = create_editcontrol(ES_MULTILINE, 0); r = get_edit_style(hwEdit); - ok(ES_MULTILINE == r, "Wrong style expected ES_MULTILINE got: 0x%x\n", r); + ok(ES_MULTILINE == r, "Wrong style expected ES_MULTILINE got: 0x%lx\n", r);
/* set text */ r = SendMessageA(hwEdit , WM_SETTEXT, 0, (LPARAM) ""); - ok(TRUE == r, "Expected: %d, got: %d\n", TRUE, r); + ok(TRUE == r, "Expected: %d, got: %ld\n", TRUE, r);
r = SendMessageA(hwEdit, WM_CHAR, VK_TAB, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r);
/* get text */ buffer[0] = 0; r = SendMessageA(hwEdit, WM_GETTEXT, 16, (LPARAM) buffer); - ok(1 == r, "Expected: %d, got len %d\n", 1, r); + ok(1 == r, "Expected: %d, got len %ld\n", 1, r); ok(0 == strcmp(buffer, "\t"), "expected "\t", got "%s"\n", buffer);
DestroyWindow (hwEdit); @@ -2365,19 +2366,19 @@ static void test_tab(void) /* single line */ hwEdit = create_editcontrol(0, 0); r = get_edit_style(hwEdit); - ok(0 == r, "Wrong style expected 0x%x got: 0x%x\n", 0, r); + ok(0 == r, "Wrong style expected 0x%x got: 0x%lx\n", 0, r);
/* set text */ r = SendMessageA(hwEdit , WM_SETTEXT, 0, (LPARAM) ""); - ok(TRUE == r, "Expected: %d, got: %d\n", TRUE, r); + ok(TRUE == r, "Expected: %d, got: %ld\n", TRUE, r);
r = SendMessageA(hwEdit, WM_CHAR, VK_TAB, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r);
/* get text */ buffer[0] = 0; r = SendMessageA(hwEdit, WM_GETTEXT, 16, (LPARAM) buffer); - ok(0 == r, "Expected: %d, got len %d\n", 0, r); + ok(0 == r, "Expected: %d, got len %ld\n", 0, r); ok(0 == strcmp(buffer, ""), "expected "", got "%s"\n", buffer);
DestroyWindow (hwEdit); @@ -2819,11 +2820,11 @@ static void test_fontsize(void) ShowWindow (hwEdit, SW_SHOW);
r = SendMessageA(hwEdit, WM_CHAR, 'A', 1); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r); r = SendMessageA(hwEdit, WM_CHAR, 'B', 1); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r); r = SendMessageA(hwEdit, WM_CHAR, 'C', 1); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r);
GetWindowTextA(hwEdit, szLocalString, MAXLEN); ok(strcmp(szLocalString, "ABC")==0, @@ -3009,7 +3010,7 @@ static void test_dialogmode(void)
hwButton = CreateWindowA("BUTTON", "OK", WS_VISIBLE|WS_CHILD|BS_PUSHBUTTON, 100, 100, 50, 20, hwParent, (HMENU)ID_EDITTESTDBUTTON, hinst, NULL); - ok(hwButton!=NULL, "CreateWindow failed with error code %d\n", GetLastError()); + ok(hwButton!=NULL, "CreateWindow failed with error code %ld\n", GetLastError());
r = SendMessageA(hwEdit, WM_KEYDOWN, VK_RETURN, 0x1c0001); ok(1 == r, "expected 1, got %d\n", r); @@ -3193,7 +3194,7 @@ static void test_paste(void) GlobalUnlock(hmem);
r = OpenClipboard(hEdit); - ok(r == TRUE, "expected %d, got %d le=%u\n", TRUE, r, GetLastError()); + ok(r == TRUE, "expected %d, got %d le=%lu\n", TRUE, r, GetLastError()); r = EmptyClipboard(); ok(r == TRUE, "expected %d, got %d\n", TRUE, r); hmem_ret = SetClipboardData(CF_TEXT, hmem); @@ -3216,7 +3217,7 @@ static void test_paste(void) GlobalUnlock(hmem);
r = OpenClipboard(hEdit); - ok(r == TRUE, "expected %d, got %d le=%u\n", TRUE, r, GetLastError()); + ok(r == TRUE, "expected %d, got %d le=%lu\n", TRUE, r, GetLastError()); r = EmptyClipboard(); ok(r == TRUE, "expected %d, got %d\n", TRUE, r); hmem_ret = SetClipboardData(CF_TEXT, hmem); @@ -3309,13 +3310,13 @@ static void test_wordbreak_proc(void) ok(proc == NULL, "Unexpected wordbreak proc %p.\n", proc);
ret = SendMessageA(hwnd, EM_SETWORDBREAKPROC, 0, (LPARAM)test_wordbreak_procA); - ok(ret == 1, "Unexpected return value %ld.\n", ret); + ok(ret == 1, "Unexpected return value %Id.\n", ret);
proc = (void *)SendMessageA(hwnd, EM_GETWORDBREAKPROC, 0, 0); ok(proc == test_wordbreak_procA, "Unexpected wordbreak proc %p.\n", proc);
ret = SendMessageA(hwnd, EM_SETWORDBREAKPROC, 0, 0); - ok(ret == 1, "Unexpected return value %ld.\n", ret); + ok(ret == 1, "Unexpected return value %Id.\n", ret);
proc = (void *)SendMessageA(hwnd, EM_GETWORDBREAKPROC, 0, 0); ok(proc == NULL, "Unexpected wordbreak proc %p.\n", proc); diff --git a/dlls/user32/tests/generated.c b/dlls/user32/tests/generated.c index 6b80ad8d6f0..a78e47d9e59 100644 --- a/dlls/user32/tests/generated.c +++ b/dlls/user32/tests/generated.c @@ -1,3 +1,4 @@ +#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* File generated automatically from tools/winapi/tests.dat; do not edit! */ /* This file can be copied, modified and distributed without restriction. */
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c index 08323c4f40e..1a5bff4388b 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c @@ -1,3 +1,4 @@ +#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* Test Key event to Key message translation * * Copyright 2003 Rein Klazes @@ -266,13 +267,13 @@ static BOOL do_test( HWND hwnd, int seqnr, const KEV td[] ) seqnr + 1, buf); while( PeekMessageA(&msg,hwnd,WM_KEYFIRST,WM_KEYLAST,PM_REMOVE) ) { if (winetest_debug > 1) - trace("message[%d] %-15s wParam %04lx lParam %08lx time %x\n", i, + trace("message[%d] %-15s wParam %04Ix lParam %08Ix time %lx\n", i, MSGNAME[msg.message - WM_KEYFIRST], msg.wParam, msg.lParam, msg.time); if( i < kmctr ) { ok( msg.message == expmsg[i].message && msg.wParam == expmsg[i].wParam && msg.lParam == expmsg[i].lParam, - "%u/%u: wrong message %x/%08lx/%08lx expected %s/%08lx/%08lx\n", + "%u/%u: wrong message %x/%08Ix/%08Ix expected %s/%08Ix/%08Ix\n", seqnr, i, msg.message, msg.wParam, msg.lParam, MSGNAME[(expmsg[i]).message - WM_KEYFIRST], expmsg[i].wParam, expmsg[i].lParam ); } @@ -731,13 +732,13 @@ static void compare_and_check(int id, BYTE *ks1, BYTE *ks2, { failcount++; todo_wine { - ok(matched, "%2d (%x/%x): %02x from %02x -> %02x " + ok(matched, "%2d (%x/%lx): %02x from %02x -> %02x " "instead of %02x -> %02x\n", id, test->wVk, test->dwFlags, t->wVk, ks1[t->wVk]&0x80, ks2[t->wVk]&0x80, t->before_state, ~t->before_state&0x80); } } else { - ok(matched || t->optional, "%2d (%x/%x): %02x from %02x -> %02x " + ok(matched || t->optional, "%2d (%x/%lx): %02x from %02x -> %02x " "instead of %02x -> %02x\n", id, test->wVk, test->dwFlags, t->wVk, ks1[t->wVk]&0x80, ks2[t->wVk]&0x80, t->before_state, ~t->before_state&0x80); @@ -750,11 +751,11 @@ static void compare_and_check(int id, BYTE *ks1, BYTE *ks2, { failcount++; todo_wine - ok(FALSE, "%2d (%x/%x): %02x from %02x -> %02x unexpected\n", + ok(FALSE, "%2d (%x/%lx): %02x from %02x -> %02x unexpected\n", id, test->wVk, test->dwFlags, i, ks1[i], ks2[i]); } else - ok(ks2[i] == ks1[i], "%2d (%x/%x): %02x from %02x -> %02x unexpected\n", + ok(ks2[i] == ks1[i], "%2d (%x/%lx): %02x from %02x -> %02x unexpected\n", id, test->wVk, test->dwFlags, i, ks1[i], ks2[i]);
while (expected->message && actual_cnt < sent_messages_cnt) @@ -774,12 +775,12 @@ static void compare_and_check(int id, BYTE *ks1, BYTE *ks2, { failcount++; todo_wine - ok(FALSE, "%2d (%x/%x): in msg 0x%04x expecting wParam 0x%lx got 0x%lx\n", + ok(FALSE, "%2d (%x/%lx): in msg 0x%04x expecting wParam 0x%Ix got 0x%Ix\n", id, test->wVk, test->dwFlags, expected->message, expected->wParam, actual->wParam); } else ok(expected->wParam == actual->wParam, - "%2d (%x/%x): in msg 0x%04x expecting wParam 0x%lx got 0x%lx\n", + "%2d (%x/%lx): in msg 0x%04x expecting wParam 0x%Ix got 0x%Ix\n", id, test->wVk, test->dwFlags, expected->message, expected->wParam, actual->wParam); } if (expected->flags & lparam) @@ -788,16 +789,16 @@ static void compare_and_check(int id, BYTE *ks1, BYTE *ks2, { failcount++; todo_wine - ok(FALSE, "%2d (%x/%x): in msg 0x%04x expecting lParam 0x%lx got 0x%lx\n", + ok(FALSE, "%2d (%x/%lx): in msg 0x%04x expecting lParam 0x%Ix got 0x%Ix\n", id, test->wVk, test->dwFlags, expected->message, expected->lParam, actual->lParam); } else ok(expected->lParam == actual->lParam, - "%2d (%x/%x): in msg 0x%04x expecting lParam 0x%lx got 0x%lx\n", + "%2d (%x/%lx): in msg 0x%04x expecting lParam 0x%Ix got 0x%Ix\n", id, test->wVk, test->dwFlags, expected->message, expected->lParam, actual->lParam); } ok((expected->flags & hook) == (actual->flags & hook), - "%2d (%x/%x): the msg 0x%04x should have been sent by a hook\n", + "%2d (%x/%lx): the msg 0x%04x should have been sent by a hook\n", id, test->wVk, test->dwFlags, expected->message);
} @@ -819,7 +820,7 @@ static void compare_and_check(int id, BYTE *ks1, BYTE *ks2, (actual->message == expected->message - 4)) { ok((expected->flags & hook) == (actual->flags & hook), - "%2d (%x/%x): the msg 0x%04x should have been sent by a hook\n", + "%2d (%x/%lx): the msg 0x%04x should have been sent by a hook\n", id, test->wVk, test->dwFlags, expected->message); } /* For VK_RMENU, at least localized Win2k/XP sends KEYDOWN/UP @@ -829,7 +830,7 @@ static void compare_and_check(int id, BYTE *ks1, BYTE *ks2, (actual->message == expected->message - 4)) { ok(expected->wParam == actual->wParam && expected->lParam == actual->lParam, - "%2d (%x/%x): the msg 0x%04x was expected, but got msg 0x%04x instead\n", + "%2d (%x/%lx): the msg 0x%04x was expected, but got msg 0x%04x instead\n", id, test->wVk, test->dwFlags, expected->message, actual->message); } else if (test->_todo_wine) @@ -837,12 +838,12 @@ static void compare_and_check(int id, BYTE *ks1, BYTE *ks2, failcount++; todo_wine ok(FALSE, - "%2d (%x/%x): the msg 0x%04x was expected, but got msg 0x%04x instead\n", + "%2d (%x/%lx): the msg 0x%04x was expected, but got msg 0x%04x instead\n", id, test->wVk, test->dwFlags, expected->message, actual->message); } else ok(FALSE, - "%2d (%x/%x): the msg 0x%04x was expected, but got msg 0x%04x instead\n", + "%2d (%x/%lx): the msg 0x%04x was expected, but got msg 0x%04x instead\n", id, test->wVk, test->dwFlags, expected->message, actual->message);
actual_cnt++; @@ -859,17 +860,17 @@ static void compare_and_check(int id, BYTE *ks1, BYTE *ks2, { failcount++; todo_wine - ok(FALSE, "%2d (%x/%x): the msg sequence is not complete: expected %04x - actual %04x\n", + ok(FALSE, "%2d (%x/%lx): the msg sequence is not complete: expected %04x - actual %04x\n", id, test->wVk, test->dwFlags, expected->message, sent_messages[actual_cnt].message); } else - ok(FALSE, "%2d (%x/%x): the msg sequence is not complete: expected %04x - actual %04x\n", + ok(FALSE, "%2d (%x/%lx): the msg sequence is not complete: expected %04x - actual %04x\n", id, test->wVk, test->dwFlags, expected->message, sent_messages[actual_cnt].message); }
if( test->_todo_wine && !failcount) /* succeeded yet marked todo */ todo_wine - ok(TRUE, "%2d (%x/%x): marked "todo_wine" but succeeds\n", id, test->wVk, test->dwFlags); + ok(TRUE, "%2d (%x/%lx): marked "todo_wine" but succeeds\n", id, test->wVk, test->dwFlags);
sent_messages_cnt = 0; } @@ -878,7 +879,7 @@ static void compare_and_check(int id, BYTE *ks1, BYTE *ks2, static LRESULT CALLBACK WndProc2(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { - if (winetest_debug > 1) trace("MSG: %8x W:%8lx L:%8lx\n", Msg, wParam, lParam); + if (winetest_debug > 1) trace("MSG: %8x W:%8Ix L:%8Ix\n", Msg, wParam, lParam);
if ((Msg >= WM_KEYFIRST && Msg <= WM_KEYLAST) || Msg == WM_SYSCOMMAND) { @@ -912,13 +913,13 @@ static LRESULT CALLBACK hook_proc(int code, WPARAM wparam, LPARAM lparam) if(0) /* For some reason not stable on Wine */ { if (wparam == WM_KEYDOWN || wparam == WM_SYSKEYDOWN) - ok(!(GetAsyncKeyState(hook_info->vkCode) & 0x8000), "key %x should be up\n", hook_info->vkCode); + ok(!(GetAsyncKeyState(hook_info->vkCode) & 0x8000), "key %lx should be up\n", hook_info->vkCode); else if (wparam == WM_KEYUP || wparam == WM_SYSKEYUP) - ok(GetAsyncKeyState(hook_info->vkCode) & 0x8000, "key %x should be down\n", hook_info->vkCode); + ok(GetAsyncKeyState(hook_info->vkCode) & 0x8000, "key %lx should be down\n", hook_info->vkCode); }
if (winetest_debug > 1) - trace("Hook: w=%lx vk:%8x sc:%8x fl:%8x %lx\n", wparam, + trace("Hook: w=%Ix vk:%8lx sc:%8lx fl:%8lx %Ix\n", wparam, hook_info->vkCode, hook_info->scanCode, hook_info->flags, hook_info->dwExtraInfo); } return CallNextHookEx( 0, code, wparam, lparam ); @@ -1023,12 +1024,12 @@ static void test_unicode_keys(HWND hwnd, HHOOK hook) } if(!key_status.sendinput_broken){ ok(key_status.last_key_down == VK_PACKET, - "Last keydown msg should have been VK_PACKET[0x%04x] (was: 0x%x)\n", VK_PACKET, key_status.last_key_down); + "Last keydown msg should have been VK_PACKET[0x%04x] (was: 0x%lx)\n", VK_PACKET, key_status.last_key_down); ok(key_status.last_char == 0x3c0, - "Last char msg wparam should have been 0x3c0 (was: 0x%x)\n", key_status.last_char); + "Last char msg wparam should have been 0x3c0 (was: 0x%lx)\n", key_status.last_char); if(hook) ok(key_status.last_hook_down == 0x3c0, - "Last hookdown msg should have been 0x3c0, was: 0x%x\n", key_status.last_hook_down); + "Last hookdown msg should have been 0x3c0, was: 0x%lx\n", key_status.last_hook_down); }
inputs[1].u.ki.wVk = 0; @@ -1045,10 +1046,10 @@ static void test_unicode_keys(HWND hwnd, HHOOK hook) } if(!key_status.sendinput_broken){ ok(key_status.last_key_up == VK_PACKET, - "Last keyup msg should have been VK_PACKET[0x%04x] (was: 0x%x)\n", VK_PACKET, key_status.last_key_up); + "Last keyup msg should have been VK_PACKET[0x%04x] (was: 0x%lx)\n", VK_PACKET, key_status.last_key_up); if(hook) ok(key_status.last_hook_up == 0x3c0, - "Last hookup msg should have been 0x3c0, was: 0x%x\n", key_status.last_hook_up); + "Last hookup msg should have been 0x3c0, was: 0x%lx\n", key_status.last_hook_up); }
/* holding alt, pressing & releasing a unicode character, releasing alt */ @@ -1071,12 +1072,12 @@ static void test_unicode_keys(HWND hwnd, HHOOK hook) } if(!key_status.sendinput_broken){ ok(key_status.last_syskey_down == VK_PACKET, - "Last syskeydown msg should have been VK_PACKET[0x%04x] (was: 0x%x)\n", VK_PACKET, key_status.last_syskey_down); + "Last syskeydown msg should have been VK_PACKET[0x%04x] (was: 0x%lx)\n", VK_PACKET, key_status.last_syskey_down); ok(key_status.last_syschar == 0x3041, - "Last syschar msg should have been 0x3041 (was: 0x%x)\n", key_status.last_syschar); + "Last syschar msg should have been 0x3041 (was: 0x%lx)\n", key_status.last_syschar); if(hook) ok(key_status.last_hook_syskey_down == 0x3041, - "Last hooksysdown msg should have been 0x3041, was: 0x%x\n", key_status.last_hook_syskey_down); + "Last hooksysdown msg should have been 0x3041, was: 0x%lx\n", key_status.last_hook_syskey_down); }
inputs[1].u.ki.wVk = 0; @@ -1098,10 +1099,10 @@ static void test_unicode_keys(HWND hwnd, HHOOK hook) } if(!key_status.sendinput_broken){ ok(key_status.last_key_up == VK_PACKET, - "Last keyup msg should have been VK_PACKET[0x%04x] (was: 0x%x)\n", VK_PACKET, key_status.last_key_up); + "Last keyup msg should have been VK_PACKET[0x%04x] (was: 0x%lx)\n", VK_PACKET, key_status.last_key_up); if(hook) ok(key_status.last_hook_up == 0x3041, - "Last hook up msg should have been 0x3041, was: 0x%x\n", key_status.last_hook_up); + "Last hook up msg should have been 0x3041, was: 0x%lx\n", key_status.last_hook_up); }
/* Press and release, non-zero key code. */ @@ -1123,11 +1124,11 @@ static void test_unicode_keys(HWND hwnd, HHOOK hook)
if (!key_status.sendinput_broken) { - ok(key_status.last_key_down == 0x51, "Unexpected key down %#x.\n", key_status.last_key_down); - ok(key_status.last_key_up == 0x51, "Unexpected key up %#x.\n", key_status.last_key_up); + ok(key_status.last_key_down == 0x51, "Unexpected key down %#lx.\n", key_status.last_key_down); + ok(key_status.last_key_up == 0x51, "Unexpected key up %#lx.\n", key_status.last_key_up); if (hook) todo_wine - ok(key_status.last_hook_up == 0x23, "Unexpected hook message %#x.\n", key_status.last_hook_up); + ok(key_status.last_hook_up == 0x23, "Unexpected hook message %#lx.\n", key_status.last_hook_up); } }
@@ -1166,11 +1167,11 @@ static LRESULT CALLBACK llkbd_unicode_hook(int nCode, WPARAM wParam, LPARAM lPar win_skip("SendInput doesn't support unicode on this platform\n"); }else{ if(key_status.expect_alt){ - ok(info->vkCode == VK_LMENU, "vkCode should have been VK_LMENU[0x%04x], was: 0x%x\n", VK_LMENU, info->vkCode); + ok(info->vkCode == VK_LMENU, "vkCode should have been VK_LMENU[0x%04x], was: 0x%lx\n", VK_LMENU, info->vkCode); key_status.expect_alt = FALSE; }else todo_wine_if(key_status.vk != VK_PACKET) - ok(info->vkCode == key_status.vk, "Unexpected vkCode %#x, expected %#x.\n", info->vkCode, key_status.vk); + ok(info->vkCode == key_status.vk, "Unexpected vkCode %#lx, expected %#x.\n", info->vkCode, key_status.vk); } switch(wParam){ case WM_KEYDOWN: @@ -1290,7 +1291,7 @@ static LRESULT CALLBACK hook_proc1( int code, WPARAM wparam, LPARAM lparam ) pt_new = hook->pt; /* Should return previous position */ GetCursorPos(&pt); - ok(pt.x == pt_old.x && pt.y == pt_old.y, "GetCursorPos: (%d,%d)\n", pt.x, pt.y); + ok(pt.x == pt_old.x && pt.y == pt_old.y, "GetCursorPos: (%ld,%ld)\n", pt.x, pt.y);
/* Should set new position until hook chain is finished. */ pt.x = pt_old.x + STEP; @@ -1298,9 +1299,9 @@ static LRESULT CALLBACK hook_proc1( int code, WPARAM wparam, LPARAM lparam ) SetCursorPos(pt.x, pt.y); GetCursorPos(&pt1); if (clipped) - ok(pt1.x == pt_old.x && pt1.y == pt_old.y, "Wrong set pos: (%d,%d)\n", pt1.x, pt1.y); + ok(pt1.x == pt_old.x && pt1.y == pt_old.y, "Wrong set pos: (%ld,%ld)\n", pt1.x, pt1.y); else - ok(pt1.x == pt.x && pt1.y == pt.y, "Wrong set pos: (%d,%d)\n", pt1.x, pt1.y); + ok(pt1.x == pt.x && pt1.y == pt.y, "Wrong set pos: (%ld,%ld)\n", pt1.x, pt1.y); } return CallNextHookEx( 0, code, wparam, lparam ); } @@ -1313,14 +1314,14 @@ static LRESULT CALLBACK hook_proc2( int code, WPARAM wparam, LPARAM lparam ) if (code == HC_ACTION) { ok(hook->pt.x == pt_new.x && hook->pt.y == pt_new.y, - "Wrong hook coords: (%d %d) != (%d,%d)\n", hook->pt.x, hook->pt.y, pt_new.x, pt_new.y); + "Wrong hook coords: (%ld %ld) != (%ld,%ld)\n", hook->pt.x, hook->pt.y, pt_new.x, pt_new.y);
/* Should match position set above */ GetCursorPos(&pt); if (clipped) - ok(pt.x == pt_old.x && pt.y == pt_old.y, "GetCursorPos: (%d,%d)\n", pt.x, pt.y); + ok(pt.x == pt_old.x && pt.y == pt_old.y, "GetCursorPos: (%ld,%ld)\n", pt.x, pt.y); else - ok(pt.x == pt_old.x +STEP && pt.y == pt_old.y +STEP, "GetCursorPos: (%d,%d)\n", pt.x, pt.y); + ok(pt.x == pt_old.x +STEP && pt.y == pt_old.y +STEP, "GetCursorPos: (%ld,%ld)\n", pt.x, pt.y); } return CallNextHookEx( 0, code, wparam, lparam ); } @@ -1333,7 +1334,7 @@ static LRESULT CALLBACK hook_proc3( int code, WPARAM wparam, LPARAM lparam ) { /* MSLLHOOKSTRUCT does not seem to be reliable and contains different data on each run. */ GetCursorPos(&pt); - ok(pt.x == pt_old.x && pt.y == pt_old.y, "GetCursorPos: (%d,%d)\n", pt.x, pt.y); + ok(pt.x == pt_old.x && pt.y == pt_old.y, "GetCursorPos: (%ld,%ld)\n", pt.x, pt.y); } return CallNextHookEx( 0, code, wparam, lparam ); } @@ -1360,16 +1361,16 @@ static void test_mouse_ll_hook(void) GetCursorPos(&pt_old); mouse_event(MOUSEEVENTF_MOVE, -STEP, 0, 0, 0); GetCursorPos(&pt_old); - ok(pt_old.x == pt_new.x && pt_old.y == pt_new.y, "Wrong new pos: (%d,%d)\n", pt_old.x, pt_old.y); + ok(pt_old.x == pt_new.x && pt_old.y == pt_new.y, "Wrong new pos: (%ld,%ld)\n", pt_old.x, pt_old.y); mouse_event(MOUSEEVENTF_MOVE, +STEP, 0, 0, 0); GetCursorPos(&pt_old); - ok(pt_old.x == pt_new.x && pt_old.y == pt_new.y, "Wrong new pos: (%d,%d)\n", pt_old.x, pt_old.y); + ok(pt_old.x == pt_new.x && pt_old.y == pt_new.y, "Wrong new pos: (%ld,%ld)\n", pt_old.x, pt_old.y); mouse_event(MOUSEEVENTF_MOVE, 0, -STEP, 0, 0); GetCursorPos(&pt_old); - ok(pt_old.x == pt_new.x && pt_old.y == pt_new.y, "Wrong new pos: (%d,%d)\n", pt_old.x, pt_old.y); + ok(pt_old.x == pt_new.x && pt_old.y == pt_new.y, "Wrong new pos: (%ld,%ld)\n", pt_old.x, pt_old.y); mouse_event(MOUSEEVENTF_MOVE, 0, +STEP, 0, 0); GetCursorPos(&pt_old); - ok(pt_old.x == pt_new.x && pt_old.y == pt_new.y, "Wrong new pos: (%d,%d)\n", pt_old.x, pt_old.y); + ok(pt_old.x == pt_new.x && pt_old.y == pt_new.y, "Wrong new pos: (%ld,%ld)\n", pt_old.x, pt_old.y);
SetRect(&rc, 50, 50, 151, 151); ClipCursor(&rc); @@ -1377,13 +1378,13 @@ static void test_mouse_ll_hook(void)
SetCursorPos(40, 40); GetCursorPos(&pt_old); - ok(pt_old.x == 50 && pt_old.y == 50, "Wrong new pos: (%d,%d)\n", pt_new.x, pt_new.y); + ok(pt_old.x == 50 && pt_old.y == 50, "Wrong new pos: (%ld,%ld)\n", pt_new.x, pt_new.y); SetCursorPos(160, 160); GetCursorPos(&pt_old); - ok(pt_old.x == 150 && pt_old.y == 150, "Wrong new pos: (%d,%d)\n", pt_new.x, pt_new.y); + ok(pt_old.x == 150 && pt_old.y == 150, "Wrong new pos: (%ld,%ld)\n", pt_new.x, pt_new.y); mouse_event(MOUSEEVENTF_MOVE, +STEP, +STEP, 0, 0); GetCursorPos(&pt_old); - ok(pt_old.x == 150 && pt_old.y == 150, "Wrong new pos: (%d,%d)\n", pt_new.x, pt_new.y); + ok(pt_old.x == 150 && pt_old.y == 150, "Wrong new pos: (%ld,%ld)\n", pt_new.x, pt_new.y);
clipped = FALSE; pt_new.x = pt_new.y = 150; @@ -1398,17 +1399,17 @@ static void test_mouse_ll_hook(void) pt_old.y = pt_new.y - STEP; mouse_event(MOUSEEVENTF_LEFTUP, 123, 456, 0, 0); GetCursorPos(&pt); - ok(pt.x == pt_new.x && pt.y == pt_new.y, "Position changed: (%d,%d)\n", pt.x, pt.y); + ok(pt.x == pt_new.x && pt.y == pt_new.y, "Position changed: (%ld,%ld)\n", pt.x, pt.y); mouse_event(MOUSEEVENTF_RIGHTUP, 456, 123, 0, 0); GetCursorPos(&pt); - ok(pt.x == pt_new.x && pt.y == pt_new.y, "Position changed: (%d,%d)\n", pt.x, pt.y); + ok(pt.x == pt_new.x && pt.y == pt_new.y, "Position changed: (%ld,%ld)\n", pt.x, pt.y);
mouse_event(MOUSEEVENTF_LEFTUP | MOUSEEVENTF_ABSOLUTE, 123, 456, 0, 0); GetCursorPos(&pt); - ok(pt.x == pt_new.x && pt.y == pt_new.y, "Position changed: (%d,%d)\n", pt.x, pt.y); + ok(pt.x == pt_new.x && pt.y == pt_new.y, "Position changed: (%ld,%ld)\n", pt.x, pt.y); mouse_event(MOUSEEVENTF_RIGHTUP | MOUSEEVENTF_ABSOLUTE, 456, 123, 0, 0); GetCursorPos(&pt); - ok(pt.x == pt_new.x && pt.y == pt_new.y, "Position changed: (%d,%d)\n", pt.x, pt.y); + ok(pt.x == pt_new.x && pt.y == pt_new.y, "Position changed: (%ld,%ld)\n", pt.x, pt.y);
UnhookWindowsHookEx(hook2); hook1 = SetWindowsHookExA(WH_MOUSE_LL, hook_proc3, GetModuleHandleA(0), 0); @@ -1419,27 +1420,27 @@ static void test_mouse_ll_hook(void)
SetCursorPos(140, 140); GetCursorPos(&pt_old); - ok(pt_old.x == 150 && pt_old.y == 150, "Wrong new pos: (%d,%d)\n", pt_old.x, pt_old.y); + ok(pt_old.x == 150 && pt_old.y == 150, "Wrong new pos: (%ld,%ld)\n", pt_old.x, pt_old.y); SetCursorPos(160, 160); GetCursorPos(&pt_old); todo_wine - ok(pt_old.x == 149 && pt_old.y == 149, "Wrong new pos: (%d,%d)\n", pt_old.x, pt_old.y); + ok(pt_old.x == 149 && pt_old.y == 149, "Wrong new pos: (%ld,%ld)\n", pt_old.x, pt_old.y); mouse_event(MOUSEEVENTF_MOVE, -STEP, -STEP, 0, 0); GetCursorPos(&pt_old); - ok(pt_old.x == 150 && pt_old.y == 150, "Wrong new pos: (%d,%d)\n", pt_old.x, pt_old.y); + ok(pt_old.x == 150 && pt_old.y == 150, "Wrong new pos: (%ld,%ld)\n", pt_old.x, pt_old.y); mouse_event(MOUSEEVENTF_MOVE, +STEP, +STEP, 0, 0); GetCursorPos(&pt_old); todo_wine - ok(pt_old.x == 149 && pt_old.y == 149, "Wrong new pos: (%d,%d)\n", pt_old.x, pt_old.y); + ok(pt_old.x == 149 && pt_old.y == 149, "Wrong new pos: (%ld,%ld)\n", pt_old.x, pt_old.y); mouse_event(MOUSEEVENTF_MOVE, 0, 0, 0, 0); GetCursorPos(&pt_old); ok((pt_old.x == 150 && pt_old.y == 150) || broken(pt_old.x == 149 && pt_old.y == 149) /* w1064v1809 */, - "Wrong new pos: (%d,%d)\n", pt_old.x, pt_old.y); + "Wrong new pos: (%ld,%ld)\n", pt_old.x, pt_old.y); mouse_event(MOUSEEVENTF_MOVE, 0, 0, 0, 0); GetCursorPos(&pt_old); todo_wine - ok(pt_old.x == 149 && pt_old.y == 149, "Wrong new pos: (%d,%d)\n", pt_old.x, pt_old.y); + ok(pt_old.x == 149 && pt_old.y == 149, "Wrong new pos: (%ld,%ld)\n", pt_old.x, pt_old.y);
clipped = FALSE; ClipCursor(NULL); @@ -1448,7 +1449,7 @@ static void test_mouse_ll_hook(void) SetRect(&rc, 150, 150, 150, 150); ClipCursor(&rc); GetCursorPos(&pt_old); - ok(pt_old.x == 150 && pt_old.y == 150, "Wrong new pos: (%d,%d)\n", pt_old.x, pt_old.y); + ok(pt_old.x == 150 && pt_old.y == 150, "Wrong new pos: (%ld,%ld)\n", pt_old.x, pt_old.y); ClipCursor(NULL);
SetCursorPos(160, 160); @@ -1456,7 +1457,7 @@ static void test_mouse_ll_hook(void) ClipCursor(&rc); GetCursorPos(&pt_old); todo_wine - ok(pt_old.x == 149 && pt_old.y == 149, "Wrong new pos: (%d,%d)\n", pt_old.x, pt_old.y); + ok(pt_old.x == 149 && pt_old.y == 149, "Wrong new pos: (%ld,%ld)\n", pt_old.x, pt_old.y); ClipCursor(NULL);
SetCursorPos(150, 150); @@ -1464,7 +1465,7 @@ static void test_mouse_ll_hook(void) ClipCursor(&rc); GetCursorPos(&pt_old); todo_wine - ok(pt_old.x == 149 && pt_old.y == 149, "Wrong new pos: (%d,%d)\n", pt_old.x, pt_old.y); + ok(pt_old.x == 149 && pt_old.y == 149, "Wrong new pos: (%ld,%ld)\n", pt_old.x, pt_old.y); ClipCursor(NULL);
UnhookWindowsHookEx(hook1); @@ -1489,7 +1490,7 @@ static void test_GetMouseMovePointsEx(const char *argv0)
/* Get a valid content for the input struct */ if(!GetCursorPos(&point)) { - win_skip("GetCursorPos() failed with error %u\n", GetLastError()); + win_skip("GetCursorPos() failed with error %lu\n", GetLastError()); return; } memset(&in, 0, sizeof(MOUSEMOVEPOINT)); @@ -1509,19 +1510,19 @@ static void test_GetMouseMovePointsEx(const char *argv0) } ok(retval == -1, "expected GetMouseMovePointsEx to fail, got %d\n", retval); ok(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == MYERROR, - "expected error ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); + "expected error ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(MYERROR); retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT)-1, &in, out, BUFLIM, GMMP_USE_DISPLAY_POINTS); ok(retval == -1, "expected GetMouseMovePointsEx to fail, got %d\n", retval); ok(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == MYERROR, - "expected error ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); + "expected error ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(MYERROR); retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT)+1, &in, out, BUFLIM, GMMP_USE_DISPLAY_POINTS); ok(retval == -1, "expected GetMouseMovePointsEx to fail, got %d\n", retval); ok(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == MYERROR, - "expected error ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); + "expected error ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
/* test second and third parameter */ @@ -1529,25 +1530,25 @@ static void test_GetMouseMovePointsEx(const char *argv0) retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), NULL, out, BUFLIM, GMMP_USE_DISPLAY_POINTS); ok(retval == -1, "expected GetMouseMovePointsEx to fail, got %d\n", retval); ok(GetLastError() == ERROR_NOACCESS || GetLastError() == MYERROR, - "expected error ERROR_NOACCESS, got %u\n", GetLastError()); + "expected error ERROR_NOACCESS, got %lu\n", GetLastError());
SetLastError(MYERROR); retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), &in, NULL, BUFLIM, GMMP_USE_DISPLAY_POINTS); ok(retval == -1, "expected GetMouseMovePointsEx to fail, got %d\n", retval); ok(ERROR_NOACCESS == GetLastError(), - "expected error ERROR_NOACCESS, got %u\n", GetLastError()); + "expected error ERROR_NOACCESS, got %lu\n", GetLastError());
SetLastError(MYERROR); retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), NULL, NULL, BUFLIM, GMMP_USE_DISPLAY_POINTS); ok(retval == -1, "expected GetMouseMovePointsEx to fail, got %d\n", retval); ok(ERROR_NOACCESS == GetLastError(), - "expected error ERROR_NOACCESS, got %u\n", GetLastError()); + "expected error ERROR_NOACCESS, got %lu\n", GetLastError());
SetLastError(MYERROR); count = 0; retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), &in, NULL, count, GMMP_USE_DISPLAY_POINTS); if (retval == -1) - ok(GetLastError() == ERROR_POINT_NOT_FOUND, "unexpected error %u\n", GetLastError()); + ok(GetLastError() == ERROR_POINT_NOT_FOUND, "unexpected error %lu\n", GetLastError()); else ok(retval == count, "expected GetMouseMovePointsEx to succeed, got %d\n", retval);
@@ -1559,13 +1560,13 @@ static void test_GetMouseMovePointsEx(const char *argv0) retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), &in, out, count, GMMP_USE_DISPLAY_POINTS); ok(retval == count, "expected GetMouseMovePointsEx to fail, got %d\n", retval); ok(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == MYERROR, - "expected error ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); + "expected error ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(MYERROR); count = 0; retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), &in, out, count, GMMP_USE_DISPLAY_POINTS); if (retval == -1) - ok(GetLastError() == ERROR_POINT_NOT_FOUND, "unexpected error %u\n", GetLastError()); + ok(GetLastError() == ERROR_POINT_NOT_FOUND, "unexpected error %lu\n", GetLastError()); else ok(retval == count, "expected GetMouseMovePointsEx to succeed, got %d\n", retval);
@@ -1573,7 +1574,7 @@ static void test_GetMouseMovePointsEx(const char *argv0) count = BUFLIM; retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), &in, out, count, GMMP_USE_DISPLAY_POINTS); if (retval == -1) - ok(GetLastError() == ERROR_POINT_NOT_FOUND, "unexpected error %u\n", GetLastError()); + ok(GetLastError() == ERROR_POINT_NOT_FOUND, "unexpected error %lu\n", GetLastError()); else ok((0 <= retval) && (retval <= count), "expected GetMouseMovePointsEx to succeed, got %d\n", retval);
@@ -1581,7 +1582,7 @@ static void test_GetMouseMovePointsEx(const char *argv0) retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), &in, out, BUFLIM+1, GMMP_USE_DISPLAY_POINTS); ok(retval == -1, "expected GetMouseMovePointsEx to fail, got %d\n", retval); ok(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == MYERROR, - "expected error ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); + "expected error ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
/* it was not possible to force an error with the fifth parameter on win2k */
@@ -1590,25 +1591,25 @@ static void test_GetMouseMovePointsEx(const char *argv0) retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT)-1, NULL, out, BUFLIM, GMMP_USE_DISPLAY_POINTS); ok(retval == -1, "expected GetMouseMovePointsEx to fail, got %d\n", retval); ok(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == MYERROR, - "expected error ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); + "expected error ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(MYERROR); retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT)-1, &in, NULL, BUFLIM, GMMP_USE_DISPLAY_POINTS); ok(retval == -1, "expected GetMouseMovePointsEx to fail, got %d\n", retval); ok(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == MYERROR, - "expected error ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); + "expected error ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(MYERROR); retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), NULL, out, BUFLIM+1, GMMP_USE_DISPLAY_POINTS); ok(retval == -1, "expected GetMouseMovePointsEx to fail, got %d\n", retval); ok(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == MYERROR, - "expected error ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); + "expected error ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(MYERROR); retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), &in, NULL, BUFLIM+1, GMMP_USE_DISPLAY_POINTS); ok(retval == -1, "expected GetMouseMovePointsEx to fail, got %d\n", retval); ok(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == MYERROR, - "expected error ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); + "expected error ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
/* more than 64 to be sure we wrap around */ for (i = 0; i < 67; i++) @@ -1621,7 +1622,7 @@ static void test_GetMouseMovePointsEx(const char *argv0) SetLastError( MYERROR ); retval = pGetMouseMovePointsEx( sizeof(MOUSEMOVEPOINT), &in, out, BUFLIM, GMMP_USE_DISPLAY_POINTS ); ok( retval == 64, "expected to get 64 mouse move points but got %d\n", retval ); - ok( GetLastError() == MYERROR, "expected error to stay %x, got %x\n", MYERROR, GetLastError() ); + ok( GetLastError() == MYERROR, "expected error to stay %x, got %lx\n", MYERROR, GetLastError() );
for (i = 0; i < retval; i++) { @@ -1635,7 +1636,7 @@ static void test_GetMouseMovePointsEx(const char *argv0) SetLastError( MYERROR ); retval = pGetMouseMovePointsEx( sizeof(MOUSEMOVEPOINT), &in, out, BUFLIM, GMMP_USE_DISPLAY_POINTS ); ok( retval == -1, "expected to get -1 but got %d\n", retval ); - ok( GetLastError() == ERROR_POINT_NOT_FOUND, "expected error to be set to %x, got %x\n", ERROR_POINT_NOT_FOUND, GetLastError() ); + ok( GetLastError() == ERROR_POINT_NOT_FOUND, "expected error to be set to %x, got %lx\n", ERROR_POINT_NOT_FOUND, GetLastError() );
/* make sure there's no deduplication */ in.x = 6; @@ -1677,7 +1678,7 @@ static void test_GetMouseMovePointsEx(const char *argv0) in.y = point.y; retval = pGetMouseMovePointsEx( sizeof(MOUSEMOVEPOINT), &in, out, BUFLIM, GMMP_USE_DISPLAY_POINTS ); ok( retval == 64, "expected to get 64 mouse move points but got %d\n", retval ); - ok( out[0].dwExtraInfo == 0xcafecafe, "wrong extra info, got 0x%lx expected 0xcafecafe\n", out[0].dwExtraInfo ); + ok( out[0].dwExtraInfo == 0xcafecafe, "wrong extra info, got 0x%Ix expected 0xcafecafe\n", out[0].dwExtraInfo );
input.type = INPUT_MOUSE; memset( &input, 0, sizeof(input) ); @@ -1693,7 +1694,7 @@ static void test_GetMouseMovePointsEx(const char *argv0) in.y = point.y; retval = pGetMouseMovePointsEx( sizeof(MOUSEMOVEPOINT), &in, out, BUFLIM, GMMP_USE_DISPLAY_POINTS ); ok( retval == 64, "expected to get 64 mouse move points but got %d\n", retval ); - ok( out[0].dwExtraInfo == 0xdeadbeef, "wrong extra info, got 0x%lx expected 0xdeadbeef\n", out[0].dwExtraInfo ); + ok( out[0].dwExtraInfo == 0xdeadbeef, "wrong extra info, got 0x%Ix expected 0xdeadbeef\n", out[0].dwExtraInfo );
retval = pGetMouseMovePointsEx( sizeof(MOUSEMOVEPOINT), &in, out, BUFLIM, GMMP_USE_HIGH_RESOLUTION_POINTS ); todo_wine ok( retval == 64, "expected to get 64 high resolution mouse move points but got %d\n", retval ); @@ -1704,7 +1705,7 @@ static void test_GetMouseMovePointsEx(const char *argv0) startup_info.dwFlags = STARTF_USESHOWWINDOW; startup_info.wShowWindow = SW_SHOWNORMAL; retval = CreateProcessA(NULL, path, NULL, NULL, TRUE, 0, NULL, NULL, &startup_info, &process_info ); - ok(retval, "CreateProcess "%s" failed err %u.\n", path, GetLastError()); + ok(retval, "CreateProcess "%s" failed err %lu.\n", path, GetLastError()); winetest_wait_child_process(process_info.hProcess); CloseHandle(process_info.hProcess); CloseHandle(process_info.hThread); @@ -1733,9 +1734,9 @@ static void test_GetMouseMovePointsEx_process(void) ok( retval == 64, "expected to get 64 mouse move points but got %d\n", retval );
desk0 = OpenInputDesktop( 0, FALSE, DESKTOP_ALL_ACCESS ); - ok( desk0 != NULL, "OpenInputDesktop has failed with %d\n", GetLastError() ); + ok( desk0 != NULL, "OpenInputDesktop has failed with %ld\n", GetLastError() ); desk1 = CreateDesktopA( "getmousemovepointsex_test_desktop", NULL, NULL, 0, DESKTOP_ALL_ACCESS, NULL ); - ok( desk1 != NULL, "CreateDesktopA failed with %d\n", GetLastError() ); + ok( desk1 != NULL, "CreateDesktopA failed with %ld\n", GetLastError() );
ok( SetThreadDesktop( desk1 ), "SetThreadDesktop failed!\n" ); ok( SwitchDesktop( desk1 ), "SwitchDesktop failed\n" ); @@ -1765,9 +1766,9 @@ static void test_GetMouseMovePointsEx_process(void)
/* non-default windowstations are non-interactive */ winstation0 = GetProcessWindowStation(); - ok( winstation0 != NULL, "GetProcessWindowStation has failed with %d\n", GetLastError() ); + ok( winstation0 != NULL, "GetProcessWindowStation has failed with %ld\n", GetLastError() ); desk0 = OpenInputDesktop( 0, FALSE, DESKTOP_ALL_ACCESS ); - ok( desk0 != NULL, "OpenInputDesktop has failed with %d\n", GetLastError() ); + ok( desk0 != NULL, "OpenInputDesktop has failed with %ld\n", GetLastError() ); winstation1 = CreateWindowStationA( "test_winstation", 0, WINSTA_ALL_ACCESS, NULL );
if (winstation1 == NULL && GetLastError() == ERROR_ACCESS_DENIED) @@ -1778,17 +1779,17 @@ static void test_GetMouseMovePointsEx_process(void) return; }
- ok( winstation1 != NULL, "CreateWindowStationA has failed with %d\n", GetLastError() ); + ok( winstation1 != NULL, "CreateWindowStationA has failed with %ld\n", GetLastError() ); ok( SetProcessWindowStation( winstation1 ), "SetProcessWindowStation has failed\n" );
desk1 = CreateDesktopA( "getmousemovepointsex_test_desktop", NULL, NULL, 0, DESKTOP_ALL_ACCESS, NULL ); - ok( desk1 != NULL, "CreateDesktopA failed with %d\n", GetLastError() ); + ok( desk1 != NULL, "CreateDesktopA failed with %ld\n", GetLastError() ); ok( SetThreadDesktop( desk1 ), "SetThreadDesktop failed!\n" );
SetLastError( 0xDEADBEEF ); retval = pGetMouseMovePointsEx( sizeof(MOUSEMOVEPOINT), &in, out, ARRAY_SIZE(out), GMMP_USE_DISPLAY_POINTS ); todo_wine ok( retval == -1, "expected to get -1 mouse move points but got %d\n", retval ); - todo_wine ok( GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED got %d\n", GetLastError() ); + todo_wine ok( GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED got %ld\n", GetLastError() );
ok( SetProcessWindowStation( winstation0 ), "SetProcessWindowStation has failed\n" ); ok( SetThreadDesktop( desk0 ), "SetThreadDesktop failed!\n" ); @@ -1809,13 +1810,13 @@ static void test_GetRawInputDeviceList(void) ret = pGetRawInputDeviceList(NULL, NULL, 0); err = GetLastError(); ok(ret == -1, "expected -1, got %d\n", ret); - ok(err == ERROR_INVALID_PARAMETER, "expected 87, got %d\n", err); + ok(err == ERROR_INVALID_PARAMETER, "expected 87, got %ld\n", err);
SetLastError(0xdeadbeef); ret = pGetRawInputDeviceList(NULL, NULL, sizeof(devices[0])); err = GetLastError(); ok(ret == -1, "expected -1, got %d\n", ret); - ok(err == ERROR_NOACCESS, "expected 998, got %d\n", err); + ok(err == ERROR_NOACCESS, "expected 998, got %ld\n", err);
devcount = 0; ret = pGetRawInputDeviceList(NULL, &devcount, sizeof(devices[0])); @@ -1827,7 +1828,7 @@ static void test_GetRawInputDeviceList(void) ret = pGetRawInputDeviceList(devices, &devcount, sizeof(devices[0])); err = GetLastError(); ok(ret == -1, "expected -1, got %d\n", ret); - ok(err == ERROR_INSUFFICIENT_BUFFER, "expected 122, got %d\n", err); + ok(err == ERROR_INSUFFICIENT_BUFFER, "expected 122, got %ld\n", err); ok(devcount > 0, "expected non-zero\n");
/* devcount contains now the correct number of devices */ @@ -1842,33 +1843,33 @@ static void test_GetRawInputDeviceList(void) SetLastError( 0xdeadbeef ); ret = pGetRawInputDeviceInfoW( UlongToHandle( 0xdeadbeef ), RIDI_DEVICEINFO, NULL, NULL ); ok( ret == ~0U, "GetRawInputDeviceInfoW returned %#x, expected ~0.\n", ret ); - ok( GetLastError() == ERROR_NOACCESS, "GetRawInputDeviceInfoW last error %#x, expected 0xdeadbeef.\n", GetLastError() ); + ok( GetLastError() == ERROR_NOACCESS, "GetRawInputDeviceInfoW last error %#lx, expected 0xdeadbeef.\n", GetLastError() );
SetLastError( 0xdeadbeef ); size = 0xdeadbeef; ret = pGetRawInputDeviceInfoW( UlongToHandle( 0xdeadbeef ), RIDI_DEVICEINFO, NULL, &size ); ok( ret == ~0U, "GetRawInputDeviceInfoW returned %#x, expected ~0.\n", ret ); ok( size == 0xdeadbeef, "GetRawInputDeviceInfoW returned size %#x, expected 0.\n", size ); - ok( GetLastError() == ERROR_INVALID_HANDLE, "GetRawInputDeviceInfoW last error %#x, expected 0xdeadbeef.\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_HANDLE, "GetRawInputDeviceInfoW last error %#lx, expected 0xdeadbeef.\n", GetLastError() );
SetLastError( 0xdeadbeef ); size = 0xdeadbeef; ret = pGetRawInputDeviceInfoW( devices[0].hDevice, 0xdeadbeef, NULL, &size ); ok( ret == ~0U, "GetRawInputDeviceInfoW returned %#x, expected ~0.\n", ret ); ok( size == 0xdeadbeef, "GetRawInputDeviceInfoW returned size %#x, expected 0.\n", size ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "GetRawInputDeviceInfoW last error %#x, expected 0xdeadbeef.\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "GetRawInputDeviceInfoW last error %#lx, expected 0xdeadbeef.\n", GetLastError() );
SetLastError( 0xdeadbeef ); ret = pGetRawInputDeviceInfoW( devices[0].hDevice, RIDI_DEVICEINFO, &info, NULL ); ok( ret == ~0U, "GetRawInputDeviceInfoW returned %#x, expected ~0.\n", ret ); - ok( GetLastError() == ERROR_NOACCESS, "GetRawInputDeviceInfoW last error %#x, expected 0xdeadbeef.\n", GetLastError() ); + ok( GetLastError() == ERROR_NOACCESS, "GetRawInputDeviceInfoW last error %#lx, expected 0xdeadbeef.\n", GetLastError() );
SetLastError( 0xdeadbeef ); size = 0; ret = pGetRawInputDeviceInfoW( devices[0].hDevice, RIDI_DEVICEINFO, &info, &size ); ok( ret == ~0U, "GetRawInputDeviceInfoW returned %#x, expected ~0.\n", ret ); - ok( size == sizeof(info), "GetRawInputDeviceInfoW returned size %#x, expected %#x.\n", size, sizeof(info) ); - ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetRawInputDeviceInfoW last error %#x, expected 0xdeadbeef.\n", GetLastError() ); + ok( size == sizeof(info), "GetRawInputDeviceInfoW returned size %#x, expected %#Ix.\n", size, sizeof(info) ); + ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetRawInputDeviceInfoW last error %#lx, expected 0xdeadbeef.\n", GetLastError() ); }
for(i = 0; i < devcount; ++i) @@ -1884,18 +1885,18 @@ static void test_GetRawInputDeviceList(void) name[0] = '\0'; sz = 5; ret = pGetRawInputDeviceInfoW(devices[i].hDevice, RIDI_DEVICENAME, name, &sz); - ok(ret == -1, "GetRawInputDeviceInfo gave wrong failure: %d\n", err); + ok(ret == -1, "GetRawInputDeviceInfo gave wrong failure: %ld\n", err); ok(sz > 5 && sz < ARRAY_SIZE(name), "Size should have been set and not too large (got: %u)\n", sz);
/* buffer size for RIDI_DEVICENAME is in CHARs, not BYTEs */ ret = pGetRawInputDeviceInfoW(devices[i].hDevice, RIDI_DEVICENAME, name, &sz); - ok(ret == sz, "GetRawInputDeviceInfo gave wrong return: %d\n", err); + ok(ret == sz, "GetRawInputDeviceInfo gave wrong return: %ld\n", err); len = lstrlenW(name); ok(len + 1 == ret, "GetRawInputDeviceInfo returned wrong length (name: %u, ret: %u)\n", len + 1, ret);
/* test A variant with same size */ ret = pGetRawInputDeviceInfoA(devices[i].hDevice, RIDI_DEVICENAME, nameA, &sz); - ok(ret == sz, "GetRawInputDeviceInfoA gave wrong return: %d\n", err); + ok(ret == sz, "GetRawInputDeviceInfoA gave wrong return: %ld\n", err); len = strlen(nameA); ok(len + 1 == ret, "GetRawInputDeviceInfoA returned wrong length (name: %u, ret: %u)\n", len + 1, ret);
@@ -1904,33 +1905,33 @@ static void test_GetRawInputDeviceList(void) info.cbSize = sizeof(info); sz = sizeof(info) - 1; ret = pGetRawInputDeviceInfoW(devices[i].hDevice, RIDI_DEVICEINFO, &info, &sz); - ok(ret == -1, "GetRawInputDeviceInfo gave wrong failure: %d\n", err); + ok(ret == -1, "GetRawInputDeviceInfo gave wrong failure: %ld\n", err); ok(sz == sizeof(info), "GetRawInputDeviceInfo set wrong size\n");
ret = pGetRawInputDeviceInfoW(devices[i].hDevice, RIDI_DEVICEINFO, &info, &sz); - ok(ret == sizeof(info), "GetRawInputDeviceInfo gave wrong return: %d\n", err); + ok(ret == sizeof(info), "GetRawInputDeviceInfo gave wrong return: %ld\n", err); ok(sz == sizeof(info), "GetRawInputDeviceInfo set wrong size\n"); - ok(info.dwType == devices[i].dwType, "GetRawInputDeviceInfo set wrong type: 0x%x\n", info.dwType); + ok(info.dwType == devices[i].dwType, "GetRawInputDeviceInfo set wrong type: 0x%lx\n", info.dwType);
memset(&info, 0, sizeof(info)); info.cbSize = sizeof(info); ret = pGetRawInputDeviceInfoA(devices[i].hDevice, RIDI_DEVICEINFO, &info, &sz); - ok(ret == sizeof(info), "GetRawInputDeviceInfo gave wrong return: %d\n", err); + ok(ret == sizeof(info), "GetRawInputDeviceInfo gave wrong return: %ld\n", err); ok(sz == sizeof(info), "GetRawInputDeviceInfo set wrong size\n"); - ok(info.dwType == devices[i].dwType, "GetRawInputDeviceInfo set wrong type: 0x%x\n", info.dwType); + ok(info.dwType == devices[i].dwType, "GetRawInputDeviceInfo set wrong type: 0x%lx\n", info.dwType);
/* setupapi returns an NT device path, but CreateFile() < Vista can't * understand that; so use the \?\ prefix instead */ name[1] = '\'; file = CreateFileW(name, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL); - ok(file != INVALID_HANDLE_VALUE, "Failed to open %s, error %u\n", wine_dbgstr_w(name), GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "Failed to open %s, error %lu\n", wine_dbgstr_w(name), GetLastError());
sz = 0; ret = pGetRawInputDeviceInfoW(devices[i].hDevice, RIDI_PREPARSEDDATA, NULL, &sz); ok(ret == 0, "GetRawInputDeviceInfo gave wrong return: %u\n", ret); ok((info.dwType == RIM_TYPEHID && sz != 0) || (info.dwType != RIM_TYPEHID && sz == 0), - "Got wrong PPD size for type 0x%x: %u\n", info.dwType, sz); + "Got wrong PPD size for type 0x%lx: %u\n", info.dwType, sz);
ppd = HeapAlloc(GetProcessHeap(), 0, sz); ret = pGetRawInputDeviceInfoW(devices[i].hDevice, RIDI_PREPARSEDDATA, ppd, &sz); @@ -1985,7 +1986,7 @@ static void test_GetRawInputData(void) SetLastError(0xdeadbeef); ret = GetRawInputData(NULL, RID_INPUT, NULL, &size, sizeof(RAWINPUTHEADER)); ok(ret == ~0U, "Expect ret %u, got %u\n", ~0U, ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "GetRawInputData returned %08x\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "GetRawInputData returned %08lx\n", GetLastError()); }
static void test_RegisterRawInputDevices(void) @@ -2012,31 +2013,31 @@ static void test_RegisterRawInputDevices(void) SetLastError(0xdeadbeef); res = RegisterRawInputDevices(raw_devices, ARRAY_SIZE(raw_devices), 0); ok(res == FALSE, "RegisterRawInputDevices succeeded\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "RegisterRawInputDevices returned %08x\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "RegisterRawInputDevices returned %08lx\n", GetLastError());
SetLastError(0xdeadbeef); res = RegisterRawInputDevices(raw_devices, ARRAY_SIZE(raw_devices), sizeof(RAWINPUTDEVICE)); ok(res == TRUE, "RegisterRawInputDevices failed\n"); - ok(GetLastError() == 0xdeadbeef, "RegisterRawInputDevices returned %08x\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "RegisterRawInputDevices returned %08lx\n", GetLastError());
SetLastError(0xdeadbeef); count = GetRegisteredRawInputDevices(NULL, NULL, 0); ok(count == ~0U, "GetRegisteredRawInputDevices returned %u\n", count); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetRegisteredRawInputDevices unexpected error %08x\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetRegisteredRawInputDevices unexpected error %08lx\n", GetLastError());
SetLastError(0xdeadbeef); raw_devices_count = 0; count = GetRegisteredRawInputDevices(NULL, &raw_devices_count, 0); ok(count == ~0U, "GetRegisteredRawInputDevices returned %u\n", count); ok(raw_devices_count == 0, "Unexpected registered devices count: %u\n", raw_devices_count); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetRegisteredRawInputDevices unexpected error %08x\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetRegisteredRawInputDevices unexpected error %08lx\n", GetLastError());
SetLastError(0xdeadbeef); raw_devices_count = 0; count = GetRegisteredRawInputDevices(NULL, &raw_devices_count, sizeof(RAWINPUTDEVICE)); ok(count == 0, "GetRegisteredRawInputDevices returned %u\n", count); ok(raw_devices_count == 2, "Unexpected registered devices count: %u\n", raw_devices_count); - ok(GetLastError() == 0xdeadbeef, "GetRegisteredRawInputDevices unexpected error %08x\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "GetRegisteredRawInputDevices unexpected error %08lx\n", GetLastError());
SetLastError(0xdeadbeef); raw_devices_count = 0; @@ -2047,7 +2048,7 @@ static void test_RegisterRawInputDevices(void) { ok(count == ~0U, "GetRegisteredRawInputDevices returned %u\n", count); ok(raw_devices_count == 0, "Unexpected registered devices count: %u\n", raw_devices_count); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetRegisteredRawInputDevices unexpected error %08x\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetRegisteredRawInputDevices unexpected error %08lx\n", GetLastError()); }
SetLastError(0xdeadbeef); @@ -2055,7 +2056,7 @@ static void test_RegisterRawInputDevices(void) count = GetRegisteredRawInputDevices(raw_devices, &raw_devices_count, sizeof(RAWINPUTDEVICE)); ok(count == ~0U, "GetRegisteredRawInputDevices returned %u\n", count); ok(raw_devices_count == 2, "Unexpected registered devices count: %u\n", raw_devices_count); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetRegisteredRawInputDevices unexpected error %08x\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetRegisteredRawInputDevices unexpected error %08lx\n", GetLastError());
SetLastError(0xdeadbeef); memset(raw_devices, 0, sizeof(raw_devices)); @@ -2063,7 +2064,7 @@ static void test_RegisterRawInputDevices(void) count = GetRegisteredRawInputDevices(raw_devices, &raw_devices_count, sizeof(RAWINPUTDEVICE)); ok(count == 2, "GetRegisteredRawInputDevices returned %u\n", count); ok(raw_devices_count == 2, "Unexpected registered devices count: %u\n", raw_devices_count); - ok(GetLastError() == 0xdeadbeef, "GetRegisteredRawInputDevices unexpected error %08x\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "GetRegisteredRawInputDevices unexpected error %08lx\n", GetLastError()); ok(raw_devices[0].usUsagePage == 0x01, "Unexpected usage page: %x\n", raw_devices[0].usUsagePage); ok(raw_devices[0].usUsage == 0x04, "Unexpected usage: %x\n", raw_devices[0].usUsage); ok(raw_devices[1].usUsagePage == 0x01, "Unexpected usage page: %x\n", raw_devices[1].usUsagePage); @@ -2078,7 +2079,7 @@ static void test_RegisterRawInputDevices(void) SetLastError(0xdeadbeef); res = RegisterRawInputDevices(raw_devices, ARRAY_SIZE(raw_devices), sizeof(RAWINPUTDEVICE)); ok(res == FALSE, "RegisterRawInputDevices succeeded\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "RegisterRawInputDevices returned %08x\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "RegisterRawInputDevices returned %08lx\n", GetLastError());
raw_devices[0].hwndTarget = 0; raw_devices[1].hwndTarget = 0; @@ -2086,7 +2087,7 @@ static void test_RegisterRawInputDevices(void) SetLastError(0xdeadbeef); res = RegisterRawInputDevices(raw_devices, ARRAY_SIZE(raw_devices), sizeof(RAWINPUTDEVICE)); ok(res == TRUE, "RegisterRawInputDevices failed\n"); - ok(GetLastError() == 0xdeadbeef, "RegisterRawInputDevices returned %08x\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "RegisterRawInputDevices returned %08lx\n", GetLastError());
/* RIDEV_INPUTSINK requires hwndTarget != NULL */ @@ -2098,7 +2099,7 @@ static void test_RegisterRawInputDevices(void) SetLastError(0xdeadbeef); res = RegisterRawInputDevices(raw_devices, ARRAY_SIZE(raw_devices), sizeof(RAWINPUTDEVICE)); ok(res == FALSE, "RegisterRawInputDevices failed\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "RegisterRawInputDevices returned %08x\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "RegisterRawInputDevices returned %08lx\n", GetLastError());
raw_devices[0].hwndTarget = hwnd; raw_devices[1].hwndTarget = hwnd; @@ -2106,7 +2107,7 @@ static void test_RegisterRawInputDevices(void) SetLastError(0xdeadbeef); res = RegisterRawInputDevices(raw_devices, ARRAY_SIZE(raw_devices), sizeof(RAWINPUTDEVICE)); ok(res == TRUE, "RegisterRawInputDevices succeeded\n"); - ok(GetLastError() == 0xdeadbeef, "RegisterRawInputDevices returned %08x\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "RegisterRawInputDevices returned %08lx\n", GetLastError());
DestroyWindow(hwnd); } @@ -2196,31 +2197,31 @@ static LRESULT CALLBACK rawinputbuffer_wndproc(HWND hwnd, UINT msg, WPARAM wpara SetLastError(0xdeadbeef); count = GetRawInputData((HRAWINPUT)lparam, RID_INPUT, &ri, &size, 0); ok(count == ~0U, "GetRawInputData succeeded\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetRawInputData returned %08x\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetRawInputData returned %08lx\n", GetLastError());
SetLastError(0xdeadbeef); size = 0; count = GetRawInputData((HRAWINPUT)lparam, RID_INPUT, &ri, &size, sizeof(RAWINPUTHEADER)); ok(count == ~0U, "GetRawInputData succeeded\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetRawInputData returned %08x\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetRawInputData returned %08lx\n", GetLastError());
SetLastError(0xdeadbeef); size = sizeof(ri); count = GetRawInputData((HRAWINPUT)lparam, 0, &ri, &size, sizeof(RAWINPUTHEADER)); ok(count == ~0U, "GetRawInputData succeeded\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetRawInputData returned %08x\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetRawInputData returned %08lx\n", GetLastError());
SetLastError(0xdeadbeef); size = sizeof(ri); count = GetRawInputData((HRAWINPUT)lparam, RID_INPUT, &ri, &size, sizeof(RAWINPUTHEADER)); ok(count == sizeof(ri), "GetRawInputData failed\n"); - ok(ri.data.mouse.lLastX == 6, "Unexpected rawinput data: %d\n", ri.data.mouse.lLastX); - ok(GetLastError() == 0xdeadbeef, "GetRawInputData returned %08x\n", GetLastError()); + ok(ri.data.mouse.lLastX == 6, "Unexpected rawinput data: %ld\n", ri.data.mouse.lLastX); + ok(GetLastError() == 0xdeadbeef, "GetRawInputData returned %08lx\n", GetLastError()); } else { ok(count == ~0U, "GetRawInputData succeeded\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "GetRawInputData returned %08x\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "GetRawInputData returned %08lx\n", GetLastError()); }
return 0; @@ -2243,7 +2244,7 @@ static void test_GetRawInputBuffer(void)
SetCursorPos(300, 300); GetCursorPos(&pt); - ok(pt.x == 300 && pt.y == 300, "Unexpected cursor position pos %dx%d\n", pt.x, pt.y); + ok(pt.x == 300 && pt.y == 300, "Unexpected cursor position pos %ldx%ld\n", pt.x, pt.y);
hwnd = CreateWindowA("static", "static", WS_VISIBLE | WS_POPUP, 100, 100, 100, 100, 0, NULL, NULL, NULL); @@ -2259,12 +2260,12 @@ static void test_GetRawInputBuffer(void) SetLastError(0xdeadbeef); ret = RegisterRawInputDevices(raw_devices, ARRAY_SIZE(raw_devices), sizeof(RAWINPUTDEVICE)); ok(ret, "RegisterRawInputDevices failed\n"); - ok(GetLastError() == 0xdeadbeef, "RegisterRawInputDevices returned %08x\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "RegisterRawInputDevices returned %08lx\n", GetLastError());
SetLastError(0xdeadbeef); count = GetRawInputBuffer(NULL, NULL, sizeof(RAWINPUTHEADER)); ok(count == ~0U, "GetRawInputBuffer succeeded\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetRawInputBuffer returned %08x\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetRawInputBuffer returned %08lx\n", GetLastError());
size = sizeof(buffer); count = GetRawInputBuffer(NULL, &size, sizeof(RAWINPUTHEADER)); @@ -2280,7 +2281,7 @@ static void test_GetRawInputBuffer(void) size = sizeof(buffer); count = GetRawInputBuffer((RAWINPUT*)buffer, &size, 0); ok(count == ~0U, "GetRawInputBuffer succeeded\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetRawInputBuffer returned %08x\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetRawInputBuffer returned %08lx\n", GetLastError());
size = sizeof(buffer); count = GetRawInputBuffer((RAWINPUT*)buffer, &size, sizeof(RAWINPUTHEADER)); @@ -2294,7 +2295,7 @@ static void test_GetRawInputBuffer(void) count = GetRawInputBuffer((RAWINPUT*)buffer, &size, sizeof(RAWINPUTHEADER)); ok(count == ~0U, "GetRawInputBuffer succeeded\n"); ok(size == rawinput_size, "GetRawInputBuffer returned unexpected size: %u\n", size); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetRawInputBuffer returned %08x\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetRawInputBuffer returned %08lx\n", GetLastError());
size = 0; count = GetRawInputBuffer(NULL, &size, sizeof(RAWINPUTHEADER)); @@ -2305,7 +2306,7 @@ static void test_GetRawInputBuffer(void) size = sizeof(buffer); count = GetRawInputBuffer((RAWINPUT*)buffer, &size, 0); ok(count == ~0U, "GetRawInputBuffer succeeded\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetRawInputBuffer returned %08x\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetRawInputBuffer returned %08lx\n", GetLastError());
size = sizeof(buffer); memset(buffer, 0, sizeof(buffer)); @@ -2324,7 +2325,7 @@ static void test_GetRawInputBuffer(void) memset(buffer, 0, sizeof(buffer)); count = GetRawInputBuffer((RAWINPUT*)buffer, &size, sizeof(RAWINPUTHEADER)); ok(count == ~0U, "GetRawInputBuffer succeeded\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetRawInputBuffer returned %08x\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetRawInputBuffer returned %08lx\n", GetLastError()); ok(rawinput_buffer_mouse_x(buffer, 0) == 5, "Unexpected rawinput data: %d\n", rawinput_buffer_mouse_x(buffer, 0));
size = sizeof(buffer); @@ -2346,7 +2347,7 @@ static void test_GetRawInputBuffer(void) SetLastError(0xdeadbeef); ret = RegisterRawInputDevices(raw_devices, ARRAY_SIZE(raw_devices), sizeof(RAWINPUTDEVICE)); ok(ret, "RegisterRawInputDevices failed\n"); - ok(GetLastError() == 0xdeadbeef, "RegisterRawInputDevices returned %08x\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "RegisterRawInputDevices returned %08lx\n", GetLastError());
DestroyWindow(hwnd); } @@ -2364,7 +2365,7 @@ static LRESULT CALLBACK rawinput_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPA { todo_wine_if(rawinput_test_received_raw) ok(!rawinput_test_received_raw, "Unexpected spurious WM_INPUT message.\n"); - ok(wparam == RIM_INPUT || wparam == RIM_INPUTSINK, "Unexpected wparam: %lu\n", wparam); + ok(wparam == RIM_INPUT || wparam == RIM_INPUTSINK, "Unexpected wparam: %Iu\n", wparam);
rawinput_test_received_raw = TRUE; if (wparam == RIM_INPUT) rawinput_test_received_rawfg = TRUE; @@ -2376,7 +2377,7 @@ static LRESULT CALLBACK rawinput_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPA raw_size = sizeof(raw); ret = GetRawInputData((HRAWINPUT)lparam, RID_INPUT, &raw, &raw_size, sizeof(RAWINPUTHEADER)); ok(ret > 0 && ret != (UINT)-1, "GetRawInputData failed\n"); - ok(raw.header.dwType == RIM_TYPEMOUSE, "Unexpected rawinput type: %u\n", raw.header.dwType); + ok(raw.header.dwType == RIM_TYPEMOUSE, "Unexpected rawinput type: %lu\n", raw.header.dwType);
ok(!(raw.data.mouse.usFlags & MOUSE_MOVE_ABSOLUTE), "Unexpected absolute rawinput motion\n"); ok(!(raw.data.mouse.usFlags & MOUSE_VIRTUAL_DESKTOP), "Unexpected virtual desktop rawinput motion\n"); @@ -2441,13 +2442,13 @@ static void rawinput_test_process(void) int i;
ready = OpenEventA(EVENT_ALL_ACCESS, FALSE, "rawinput_test_process_ready"); - ok(ready != 0, "OpenEventA failed, error: %u\n", GetLastError()); + ok(ready != 0, "OpenEventA failed, error: %lu\n", GetLastError());
start = OpenEventA(EVENT_ALL_ACCESS, FALSE, "rawinput_test_process_start"); - ok(start != 0, "OpenEventA failed, error: %u\n", GetLastError()); + ok(start != 0, "OpenEventA failed, error: %lu\n", GetLastError());
done = OpenEventA(EVENT_ALL_ACCESS, FALSE, "rawinput_test_process_done"); - ok(done != 0, "OpenEventA failed, error: %u\n", GetLastError()); + ok(done != 0, "OpenEventA failed, error: %lu\n", GetLastError());
for (i = 0; i < ARRAY_SIZE(rawinput_tests); ++i) { @@ -2491,7 +2492,7 @@ static void rawinput_test_process(void) SetLastError(0xdeadbeef); ret = RegisterRawInputDevices(raw_devices, ARRAY_SIZE(raw_devices), sizeof(RAWINPUTDEVICE)); ok(ret, "%d: RegisterRawInputDevices failed\n", i); - ok(GetLastError() == 0xdeadbeef, "%d: RegisterRawInputDevices returned %08x\n", i, GetLastError()); + ok(GetLastError() == 0xdeadbeef, "%d: RegisterRawInputDevices returned %08lx\n", i, GetLastError()); }
rawinput_test_received_legacy = FALSE; @@ -2525,7 +2526,7 @@ static void rawinput_test_process(void) SetLastError(0xdeadbeef); ret = RegisterRawInputDevices(raw_devices, ARRAY_SIZE(raw_devices), sizeof(RAWINPUTDEVICE)); ok(ret, "%d: RegisterRawInputDevices failed\n", i); - ok(GetLastError() == 0xdeadbeef, "%d: RegisterRawInputDevices returned %08x\n", i, GetLastError()); + ok(GetLastError() == 0xdeadbeef, "%d: RegisterRawInputDevices returned %08lx\n", i, GetLastError()); }
if (hwnd) DestroyWindow(hwnd); @@ -2595,7 +2596,7 @@ static DWORD WINAPI rawinput_test_desk_thread(void *arg) SetLastError(0xdeadbeef); ret = RegisterRawInputDevices(raw_devices, ARRAY_SIZE(raw_devices), sizeof(RAWINPUTDEVICE)); ok(ret, "%d: RegisterRawInputDevices failed\n", i); - ok(GetLastError() == 0xdeadbeef, "%d: RegisterRawInputDevices returned %08x\n", i, GetLastError()); + ok(GetLastError() == 0xdeadbeef, "%d: RegisterRawInputDevices returned %08lx\n", i, GetLastError()); break; }
@@ -2678,7 +2679,7 @@ static void test_rawinput(const char* argv0) int i;
params.desk = CreateDesktopA( "rawinput_test_desktop", NULL, NULL, 0, DESKTOP_ALL_ACCESS, NULL ); - ok( params.desk != NULL, "CreateDesktopA failed, last error: %u\n", GetLastError() ); + ok( params.desk != NULL, "CreateDesktopA failed, last error: %lu\n", GetLastError() );
params.ready = CreateEventA(NULL, FALSE, FALSE, NULL); ok(params.ready != NULL, "CreateEvent failed\n"); @@ -2708,7 +2709,7 @@ static void test_rawinput(const char* argv0)
sprintf(path, "%s input rawinput_test", argv0); ret = CreateProcessA(NULL, path, NULL, NULL, TRUE, 0, NULL, NULL, &startup_info, &process_info ); - ok(ret, "CreateProcess "%s" failed err %u.\n", path, GetLastError()); + ok(ret, "CreateProcess "%s" failed err %lu.\n", path, GetLastError());
SetCursorPos(100, 100); empty_message_queue(); @@ -2750,7 +2751,7 @@ static void test_rawinput(const char* argv0) if (rawinput_tests[i].register_flags == RIDEV_EXINPUTSINK && skipped) win_skip("RIDEV_EXINPUTSINK not supported\n"); else - ok(!skipped, "%d: RegisterRawInputDevices failed: %u\n", i, GetLastError()); + ok(!skipped, "%d: RegisterRawInputDevices failed: %lu\n", i, GetLastError()); }
SetEvent(params.ready); @@ -2810,7 +2811,7 @@ static void test_rawinput(const char* argv0)
SetLastError(0xdeadbeef); ret = RegisterRawInputDevices(raw_devices, ARRAY_SIZE(raw_devices), sizeof(RAWINPUTDEVICE)); - ok(ret, "%d: RegisterRawInputDevices failed: %u\n", i, GetLastError()); + ok(ret, "%d: RegisterRawInputDevices failed: %lu\n", i, GetLastError()); }
DestroyWindow(hwnd); @@ -3093,7 +3094,7 @@ static void test_keyboard_layout_name(void) SetLastError(0xdeadbeef); ret = GetKeyboardLayoutNameW(NULL); ok(!ret, "got %d\n", ret); - ok(GetLastError() == ERROR_NOACCESS, "got %d\n", GetLastError()); + ok(GetLastError() == ERROR_NOACCESS, "got %ld\n", GetLastError());
layout = GetKeyboardLayout(0);
@@ -3122,8 +3123,8 @@ static void test_keyboard_layout_name(void) layouts_preload[i - 1] = UlongToHandle( wcstoul( klid, NULL, 16 ) );
id = (DWORD_PTR)layouts_preload[i - 1]; - if (id & 0x80000000) todo_wine_if(HIWORD(id) == 0xe001) ok((id & 0xf0000000) == 0xd0000000, "Unexpected preloaded keyboard layout high bits %#x\n", id); - else ok(!(id & 0xf0000000), "Unexpected preloaded keyboard layout high bits %#x\n", id); + if (id & 0x80000000) todo_wine_if(HIWORD(id) == 0xe001) ok((id & 0xf0000000) == 0xd0000000, "Unexpected preloaded keyboard layout high bits %#lx\n", id); + else ok(!(id & 0xf0000000), "Unexpected preloaded keyboard layout high bits %#lx\n", id); }
ok(i <= len, "Unexpected keyboard count %d in preload list\n", i); @@ -3143,12 +3144,12 @@ static void test_keyboard_layout_name(void)
/* Substitute should contain the keyboard layout id, not the HKL high word */ id = (DWORD_PTR)layouts_preload[i]; - ok(!(id & 0xf0000000), "Unexpected substitute keyboard layout high bits %#x\n", id); + ok(!(id & 0xf0000000), "Unexpected substitute keyboard layout high bits %#lx\n", id); } else { id = (DWORD_PTR)layouts_preload[i]; - ok(!(id & 0xf0000000), "Unexpected preloaded keyboard layout high bits %#x\n", id); + ok(!(id & 0xf0000000), "Unexpected preloaded keyboard layout high bits %#lx\n", id); } }
@@ -3170,14 +3171,14 @@ static void test_keyboard_layout_name(void)
if (id & 0x80000000) { - todo_wine ok((id >> 28) == 0xf, "hkl high bits %#x, expected 0xf\n", id >> 28); + todo_wine ok((id >> 28) == 0xf, "hkl high bits %#lx, expected 0xf\n", id >> 28);
value_size = sizeof(value); wcscpy(layout_path, L"System\CurrentControlSet\Control\Keyboard Layouts\"); wcscat(layout_path, klid); status = RegGetValueW(HKEY_LOCAL_MACHINE, layout_path, L"Layout Id", RRF_RT_REG_SZ, NULL, (void *)&value, &value_size); - todo_wine ok(!status, "RegGetValueW returned %x\n", status); - ok(value_size == 5 * sizeof(WCHAR), "RegGetValueW returned size %d\n", value_size); + todo_wine ok(!status, "RegGetValueW returned %lx\n", status); + ok(value_size == 5 * sizeof(WCHAR), "RegGetValueW returned size %ld\n", value_size);
swprintf(tmpklid, KL_NAMELENGTH, L"%04X", (id >> 16) & 0x0fff); todo_wine ok(!wcsicmp(value, tmpklid), "RegGetValueW returned %s, expected %s\n", debugstr_w(value), debugstr_w(tmpklid)); @@ -3347,7 +3348,7 @@ static LRESULT CALLBACK mouse_move_wndproc(HWND hwnd, UINT msg, WPARAM wparam, L POINT pt = {LOWORD(lparam), HIWORD(lparam)}; MapWindowPoints(hwnd, NULL, &pt, 1);
- if (pt.x != last_x) ok( pt.x == expect_x, "got unexpected WM_MOUSEMOVE x %d, expected %d\n", pt.x, expect_x ); + if (pt.x != last_x) ok( pt.x == expect_x, "got unexpected WM_MOUSEMOVE x %ld, expected %ld\n", pt.x, expect_x );
expect_x = pt.x == 200 ? 210 : 200; last_x = pt.x; @@ -3370,12 +3371,12 @@ static void test_Input_mouse(void) SetLastError(0xdeadbeef); ret = GetCursorPos(NULL); ok(!ret, "GetCursorPos succeed\n"); - ok(GetLastError() == 0xdeadbeef || GetLastError() == ERROR_NOACCESS, "error %u\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef || GetLastError() == ERROR_NOACCESS, "error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetCursorPos(&pt_org); ok(ret, "GetCursorPos failed\n"); - ok(GetLastError() == 0xdeadbeef, "error %u\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "error %lu\n", GetLastError());
button_win = CreateWindowA("button", "button", WS_VISIBLE | WS_POPUP, 100, 100, 100, 100, 0, NULL, NULL, NULL); @@ -3586,7 +3587,7 @@ static void test_Input_mouse(void) SetCursorPos(200, 200); hwnd = CreateWindowA("static", "Title", WS_OVERLAPPEDWINDOW | WS_VISIBLE, 100, 100, 200, 200, NULL, NULL, NULL, NULL); - ok(hwnd != NULL, "CreateWindowA failed %u\n", GetLastError()); + ok(hwnd != NULL, "CreateWindowA failed %lu\n", GetLastError());
/* warm up test case by moving cursor and window a bit first */ SetCursorPos(210, 200); @@ -3601,13 +3602,13 @@ static void test_Input_mouse(void) SetWindowPos(hwnd, NULL, 110, 100, 0, 0, SWP_NOSIZE); empty_message_queue(); GetCursorPos(&pt); - ok(pt.x == 210 && pt.y == 200, "GetCursorPos returned %dx%d, expected 210x200\n", pt.x, pt.y); + ok(pt.x == 210 && pt.y == 200, "GetCursorPos returned %ldx%ld, expected 210x200\n", pt.x, pt.y);
SetCursorPos(200, 200); SetWindowPos(hwnd, NULL, 100, 100, 0, 0, SWP_NOSIZE); empty_message_queue(); GetCursorPos(&pt); - ok(pt.x == 200 && pt.y == 200, "GetCursorPos returned %dx%d, expected 200x200\n", pt.x, pt.y); + ok(pt.x == 200 && pt.y == 200, "GetCursorPos returned %ldx%ld, expected 200x200\n", pt.x, pt.y);
SetCursorPos(pt_org.x, pt_org.y); empty_message_queue(); @@ -3652,13 +3653,13 @@ static DWORD WINAPI thread_proc(void *param) if (wnd_event->attach_from) { ret = AttachThreadInput(wnd_event->attach_from, GetCurrentThreadId(), TRUE); - ok(ret, "AttachThreadInput error %d\n", GetLastError()); + ok(ret, "AttachThreadInput error %ld\n", GetLastError()); }
if (wnd_event->attach_to) { ret = AttachThreadInput(GetCurrentThreadId(), wnd_event->attach_to, TRUE); - ok(ret, "AttachThreadInput error %d\n", GetLastError()); + ok(ret, "AttachThreadInput error %ld\n", GetLastError()); }
wnd_event->hwnd = CreateWindowExA(0, "TestWindowClass", "window caption text", WS_OVERLAPPEDWINDOW, @@ -3714,7 +3715,7 @@ static void test_attach_input(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"); CloseHandle(wnd_event.start_event); @@ -3731,7 +3732,7 @@ static void test_attach_input(void) SetActiveWindow(ourWnd);
ret = AttachThreadInput(GetCurrentThreadId(), tid, TRUE); - ok(ret, "AttachThreadInput error %d\n", GetLastError()); + ok(ret, "AttachThreadInput error %ld\n", GetLastError());
ok(GetActiveWindow() == ourWnd, "expected active %p, got %p\n", ourWnd, GetActiveWindow()); ok(GetFocus() == ourWnd, "expected focus %p, got %p\n", ourWnd, GetFocus()); @@ -3739,14 +3740,14 @@ static void test_attach_input(void) SendMessageA(wnd_event.hwnd, WM_USER+1, 0, (LPARAM)ourWnd);
ret = AttachThreadInput(GetCurrentThreadId(), tid, FALSE); - ok(ret, "AttachThreadInput error %d\n", GetLastError()); + ok(ret, "AttachThreadInput error %ld\n", GetLastError()); ok(GetActiveWindow() == ourWnd, "expected active %p, got %p\n", ourWnd, GetActiveWindow()); ok(GetFocus() == ourWnd, "expected focus %p, got %p\n", ourWnd, GetFocus());
SendMessageA(wnd_event.hwnd, WM_USER+1, 0, 0);
ret = AttachThreadInput(GetCurrentThreadId(), tid, TRUE); - ok(ret, "AttachThreadInput error %d\n", GetLastError()); + ok(ret, "AttachThreadInput error %ld\n", GetLastError());
ok(GetActiveWindow() == ourWnd, "expected active %p, got %p\n", ourWnd, GetActiveWindow()); ok(GetFocus() == ourWnd, "expected focus %p, got %p\n", ourWnd, GetFocus()); @@ -3760,14 +3761,14 @@ static void test_attach_input(void) SendMessageA(wnd_event.hwnd, WM_USER+1, 0, (LPARAM)Wnd2);
ret = AttachThreadInput(GetCurrentThreadId(), tid, FALSE); - ok(ret, "AttachThreadInput error %d\n", GetLastError()); + ok(ret, "AttachThreadInput error %ld\n", GetLastError()); ok(GetActiveWindow() == Wnd2, "expected active %p, got %p\n", Wnd2, GetActiveWindow()); ok(GetFocus() == Wnd2, "expected focus %p, got %p\n", Wnd2, GetFocus());
SendMessageA(wnd_event.hwnd, WM_USER+1, 0, 0);
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); @@ -3779,7 +3780,7 @@ static void test_attach_input(void) wnd_event.setWindows = TRUE;
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); @@ -3788,7 +3789,7 @@ static void test_attach_input(void) SetActiveWindow(ourWnd);
ret = AttachThreadInput(GetCurrentThreadId(), tid, TRUE); - ok(ret, "AttachThreadInput error %d\n", GetLastError()); + ok(ret, "AttachThreadInput error %ld\n", GetLastError());
ok(GetActiveWindow() == wnd_event.hwnd, "expected active %p, got %p\n", wnd_event.hwnd, GetActiveWindow()); ok(GetFocus() == wnd_event.hwnd, "expected focus %p, got %p\n", wnd_event.hwnd, GetFocus()); @@ -3796,7 +3797,7 @@ static void test_attach_input(void) SendMessageA(wnd_event.hwnd, WM_USER+1, 0, (LPARAM)wnd_event.hwnd);
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()); @@ -3804,7 +3805,7 @@ static void test_attach_input(void) SendMessageA(wnd_event.hwnd, WM_USER+1, 0, (LPARAM)wnd_event.hwnd);
ret = AttachThreadInput(GetCurrentThreadId(), tid, TRUE); - ok(ret, "AttachThreadInput error %d\n", GetLastError()); + ok(ret, "AttachThreadInput error %ld\n", GetLastError());
ok(GetActiveWindow() == wnd_event.hwnd, "expected active %p, got %p\n", wnd_event.hwnd, GetActiveWindow()); ok(GetFocus() == wnd_event.hwnd, "expected focus %p, got %p\n", wnd_event.hwnd, GetFocus()); @@ -3819,7 +3820,7 @@ static void test_attach_input(void) SendMessageA(wnd_event.hwnd, WM_USER+1, 0, (LPARAM)Wnd2);
ret = AttachThreadInput(GetCurrentThreadId(), tid, FALSE); - ok(ret, "AttachThreadInput error %d\n", GetLastError()); + ok(ret, "AttachThreadInput error %ld\n", GetLastError());
ok(GetActiveWindow() == Wnd2, "expected active %p, got %p\n", Wnd2, GetActiveWindow()); ok(GetFocus() == Wnd2, "expected focus %p, got %p\n", Wnd2, GetFocus()); @@ -3827,7 +3828,7 @@ static void test_attach_input(void) SendMessageA(wnd_event.hwnd, WM_USER+1, 0, 0);
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); @@ -3839,19 +3840,19 @@ static void test_attach_input(void) wnd_event.setWindows = TRUE;
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());
SetLastError(0xdeadbeef); ret = AttachThreadInput(GetCurrentThreadId(), tid, TRUE); ok(!ret, "AttachThreadInput succeeded\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER || broken(GetLastError() == 0xdeadbeef) /* <= Win XP */, - "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = AttachThreadInput(tid, GetCurrentThreadId(), TRUE); ok(!ret, "AttachThreadInput succeeded\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER || broken(GetLastError() == 0xdeadbeef) /* <= Win XP */, - "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetEvent(wnd_event.wait_event);
@@ -3859,7 +3860,7 @@ static void test_attach_input(void) CloseHandle(wnd_event.start_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); @@ -3874,7 +3875,7 @@ static void test_attach_input(void) SetActiveWindow(ourWnd);
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); @@ -3883,7 +3884,7 @@ static void test_attach_input(void) ok(GetFocus() == ourWnd, "expected focus %p, got %p\n", ourWnd, GetFocus());
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); @@ -3898,7 +3899,7 @@ static void test_attach_input(void) SetActiveWindow(ourWnd);
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); @@ -3907,7 +3908,7 @@ static void test_attach_input(void) ok(GetFocus() == ourWnd, "expected focus %p, got %p\n", ourWnd, GetFocus());
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); @@ -3969,14 +3970,14 @@ static void check_get_keyboard_state_(int i, int j, int c, int x, int todo_c, in
memset(keystate, 0, sizeof(keystate)); ret = GetKeyboardState(keystate); - ok_(__FILE__, line)(ret, "GetKeyboardState failed, %u\n", GetLastError()); + ok_(__FILE__, line)(ret, "GetKeyboardState failed, %lu\n", GetLastError()); todo_wine_if(todo_x) ok_(__FILE__, line)(!(keystate['X'] & 0x80) == !x, "%d:%d: expected that X keystate is %s\n", i, j, x ? "set" : "unset"); todo_wine_if(todo_c) ok_(__FILE__, line)(!(keystate['C'] & 0x80) == !c, "%d:%d: expected that C keystate is %s\n", i, j, c ? "set" : "unset");
/* calling it twice shouldn't change */ memset(keystate, 0, sizeof(keystate)); ret = GetKeyboardState(keystate); - ok_(__FILE__, line)(ret, "GetKeyboardState failed, %u\n", GetLastError()); + ok_(__FILE__, line)(ret, "GetKeyboardState failed, %lu\n", GetLastError()); todo_wine_if(todo_x) ok_(__FILE__, line)(!(keystate['X'] & 0x80) == !x, "%d:%d: expected that X keystate is %s\n", i, j, x ? "set" : "unset"); todo_wine_if(todo_c) ok_(__FILE__, line)(!(keystate['C'] & 0x80) == !c, "%d:%d: expected that C keystate is %s\n", i, j, c ? "set" : "unset"); } @@ -4021,7 +4022,7 @@ static DWORD WINAPI get_key_state_thread(void *arg) /* initialization */ ReleaseSemaphore(semaphores[0], 1, NULL); result = WaitForSingleObject(semaphores[1], 1000); - ok(result == WAIT_OBJECT_0, "%d:%d: WaitForSingleObject returned %u\n", i, j, result); + ok(result == WAIT_OBJECT_0, "%d:%d: WaitForSingleObject returned %lu\n", i, j, result);
if (test->set_keyboard_state) { @@ -4032,7 +4033,7 @@ static DWORD WINAPI get_key_state_thread(void *arg) /* key pressed */ ReleaseSemaphore(semaphores[0], 1, NULL); result = WaitForSingleObject(semaphores[1], 1000); - ok(result == WAIT_OBJECT_0, "%d:%d: WaitForSingleObject returned %u\n", i, j, result); + ok(result == WAIT_OBJECT_0, "%d:%d: WaitForSingleObject returned %lu\n", i, j, result);
if (test->set_keyboard_state) expect_x = TRUE; else if (!has_queue && j == 0) expect_x = FALSE; @@ -4048,7 +4049,7 @@ static DWORD WINAPI get_key_state_thread(void *arg) /* key released */ ReleaseSemaphore(semaphores[0], 1, NULL); result = WaitForSingleObject(semaphores[1], 1000); - ok(result == WAIT_OBJECT_0, "%d: WaitForSingleObject returned %u\n", i, result); + ok(result == WAIT_OBJECT_0, "%d: WaitForSingleObject returned %lu\n", i, result);
check_get_keyboard_state(i, j, expect_c, expect_x, /* todo */ i == 6, has_queue || i == 6 || j > 0); check_get_key_state(i, j, expect_c, FALSE, /* todo */ i == 6, FALSE); @@ -4078,13 +4079,13 @@ static void test_GetKeyState(void)
memset(keystate, 0, sizeof(keystate)); params.semaphores[0] = CreateSemaphoreA(NULL, 0, 1, NULL); - ok(params.semaphores[0] != NULL, "CreateSemaphoreA failed %u\n", GetLastError()); + ok(params.semaphores[0] != NULL, "CreateSemaphoreA failed %lu\n", GetLastError()); params.semaphores[1] = CreateSemaphoreA(NULL, 0, 1, NULL); - ok(params.semaphores[1] != NULL, "CreateSemaphoreA failed %u\n", GetLastError()); + ok(params.semaphores[1] != NULL, "CreateSemaphoreA failed %lu\n", GetLastError());
hwnd = CreateWindowA("static", "Title", WS_OVERLAPPEDWINDOW | WS_VISIBLE, 10, 10, 200, 200, NULL, NULL, NULL, NULL); - ok(hwnd != NULL, "CreateWindowA failed %u\n", GetLastError()); + ok(hwnd != NULL, "CreateWindowA failed %lu\n", GetLastError()); empty_message_queue();
for (i = 0; i < ARRAY_SIZE(get_key_state_tests); ++i) @@ -4093,13 +4094,13 @@ static void test_GetKeyState(void)
params.index = i; thread = CreateThread(NULL, 0, get_key_state_thread, ¶ms, 0, NULL); - ok(thread != NULL, "CreateThread failed %u\n", GetLastError()); + ok(thread != NULL, "CreateThread failed %lu\n", GetLastError());
for (j = 0; j < 4; ++j) { /* initialization */ result = WaitForSingleObject(params.semaphores[0], 1000); - ok(result == WAIT_OBJECT_0, "%d:%d: WaitForSingleObject returned %u\n", i, j, result); + ok(result == WAIT_OBJECT_0, "%d:%d: WaitForSingleObject returned %lu\n", i, j, result);
SetForegroundWindow(hwnd); SetFocus(hwnd); @@ -4109,7 +4110,7 @@ static void test_GetKeyState(void)
/* key pressed */ result = WaitForSingleObject(params.semaphores[0], 1000); - ok(result == WAIT_OBJECT_0, "%d:%d: WaitForSingleObject returned %u\n", i, j, result); + ok(result == WAIT_OBJECT_0, "%d:%d: WaitForSingleObject returned %lu\n", i, j, result);
keybd_event('X', 0, 0, 0); if (test->set_keyboard_state_main) @@ -4137,7 +4138,7 @@ static void test_GetKeyState(void)
/* key released */ result = WaitForSingleObject(params.semaphores[0], 1000); - ok(result == WAIT_OBJECT_0, "%d:%d: WaitForSingleObject returned %u\n", i, j, result); + ok(result == WAIT_OBJECT_0, "%d:%d: WaitForSingleObject returned %lu\n", i, j, result);
keybd_event('X', 0, KEYEVENTF_KEYUP, 0); if (test->set_keyboard_state_main) @@ -4161,7 +4162,7 @@ static void test_GetKeyState(void) }
result = WaitForSingleObject(thread, 1000); - ok(result == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", result); + ok(result == WAIT_OBJECT_0, "WaitForSingleObject returned %lu\n", result); CloseHandle(thread); }
@@ -4207,7 +4208,7 @@ static void test_OemKeyScan(void) expect = vkey | scan; } } - ok( ret == expect, "%04x: got %08x expected %08x\n", oem, ret, expect ); + ok( ret == expect, "%04x: got %08lx expected %08lx\n", oem, ret, expect ); } }
@@ -4350,19 +4351,19 @@ static void test_GetPointerType(void) ret = pGetPointerType(id, NULL); ok(!ret, "GetPointerType should have failed.\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "expected error ERROR_INVALID_PARAMETER, got %u.\n", GetLastError()); + "expected error ERROR_INVALID_PARAMETER, got %lu.\n", GetLastError());
SetLastError(0xdeadbeef); ret = pGetPointerType(id, &type); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "expected error ERROR_INVALID_PARAMETER, got %u.\n", GetLastError()); - ok(!ret, "GetPointerType failed, got type %d for %u.\n", type, id ); - ok(type == -1, " type %d\n", type ); + "expected error ERROR_INVALID_PARAMETER, got %lu.\n", GetLastError()); + ok(!ret, "GetPointerType failed, got type %ld for %u.\n", type, id ); + ok(type == -1, " type %ld\n", type );
id = 1; ret = pGetPointerType(id, &type); - ok(ret, "GetPointerType failed, got type %d for %u.\n", type, id ); - ok(type == PT_MOUSE, " type %d\n", type ); + ok(ret, "GetPointerType failed, got type %ld for %u.\n", type, id ); + ok(type == PT_MOUSE, " type %ld\n", type ); }
static void test_UnregisterDeviceNotification(void) @@ -4389,52 +4390,52 @@ static void test_SendInput(void)
SetLastError( 0xdeadbeef ); res = SendInput( 0, NULL, 0 ); - ok( res == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "SendInput returned %u, error %#x\n", res, GetLastError() ); + ok( res == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "SendInput returned %u, error %#lx\n", res, GetLastError() ); SetLastError( 0xdeadbeef ); res = SendInput( 1, NULL, 0 ); - ok( res == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "SendInput returned %u, error %#x\n", res, GetLastError() ); + ok( res == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "SendInput returned %u, error %#lx\n", res, GetLastError() ); SetLastError( 0xdeadbeef ); res = SendInput( 1, NULL, sizeof(*input) ); ok( res == 0 && (GetLastError() == ERROR_NOACCESS || GetLastError() == ERROR_INVALID_PARAMETER), - "SendInput returned %u, error %#x\n", res, GetLastError() ); + "SendInput returned %u, error %#lx\n", res, GetLastError() ); SetLastError( 0xdeadbeef ); res = SendInput( 0, input, sizeof(*input) ); - ok( res == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "SendInput returned %u, error %#x\n", res, GetLastError() ); + ok( res == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "SendInput returned %u, error %#lx\n", res, GetLastError() ); SetLastError( 0xdeadbeef ); res = SendInput( 0, NULL, sizeof(*input) ); - ok( res == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "SendInput returned %u, error %#x\n", res, GetLastError() ); + ok( res == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "SendInput returned %u, error %#lx\n", res, GetLastError() );
memset( input, 0, sizeof(input) ); SetLastError( 0xdeadbeef ); res = SendInput( 1, input, sizeof(*input) ); - ok( res == 1 && GetLastError() == 0xdeadbeef, "SendInput returned %u, error %#x\n", res, GetLastError() ); + ok( res == 1 && GetLastError() == 0xdeadbeef, "SendInput returned %u, error %#lx\n", res, GetLastError() ); SetLastError( 0xdeadbeef ); res = SendInput( 16, input, sizeof(*input) ); - ok( res == 16 && GetLastError() == 0xdeadbeef, "SendInput returned %u, error %#x\n", res, GetLastError() ); + ok( res == 16 && GetLastError() == 0xdeadbeef, "SendInput returned %u, error %#lx\n", res, GetLastError() );
SetLastError( 0xdeadbeef ); res = SendInput( 1, input, 0 ); - ok( res == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "SendInput returned %u, error %#x\n", res, GetLastError() ); + ok( res == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "SendInput returned %u, error %#lx\n", res, GetLastError() ); SetLastError( 0xdeadbeef ); res = SendInput( 1, input, sizeof(*input) + 1 ); - ok( res == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "SendInput returned %u, error %#x\n", res, GetLastError() ); + ok( res == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "SendInput returned %u, error %#lx\n", res, GetLastError() ); SetLastError( 0xdeadbeef ); res = SendInput( 1, input, sizeof(*input) - 1 ); - ok( res == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "SendInput returned %u, error %#x\n", res, GetLastError() ); + ok( res == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "SendInput returned %u, error %#lx\n", res, GetLastError() );
for (i = 0; i < ARRAY_SIZE(input); ++i) input[i].type = INPUT_KEYBOARD; SetLastError( 0xdeadbeef ); res = SendInput( 16, input, offsetof( INPUT, ki ) + sizeof(KEYBDINPUT) ); - ok( res == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "SendInput returned %u, error %#x\n", res, GetLastError() ); + ok( res == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "SendInput returned %u, error %#lx\n", res, GetLastError() ); SetLastError( 0xdeadbeef ); res = SendInput( 16, input, sizeof(*input) ); - ok( res == 16 && GetLastError() == 0xdeadbeef, "SendInput returned %u, error %#x\n", res, GetLastError() ); + ok( res == 16 && GetLastError() == 0xdeadbeef, "SendInput returned %u, error %#lx\n", res, GetLastError() ); empty_message_queue();
for (i = 0; i < ARRAY_SIZE(input); ++i) input[i].type = INPUT_HARDWARE; SetLastError( 0xdeadbeef ); res = SendInput( 16, input, offsetof( INPUT, hi ) + sizeof(HARDWAREINPUT) ); - ok( res == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "SendInput returned %u, error %#x\n", res, GetLastError() ); + ok( res == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "SendInput returned %u, error %#lx\n", res, GetLastError() );
input[0].hi.uMsg = WM_KEYDOWN; input[0].hi.wParamL = 0; @@ -4446,7 +4447,7 @@ static void test_SendInput(void) res = SendInput( 16, input, sizeof(*input) ); ok( (res == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) || broken(res == 16 && GetLastError() == 0xdeadbeef) /* 32bit */, - "SendInput returned %u, error %#x\n", res, GetLastError() ); + "SendInput returned %u, error %#lx\n", res, GetLastError() ); while ((res = wait_for_message(&msg)) && msg.message == WM_TIMER) DispatchMessageA(&msg); ok( !res, "SendInput triggered unexpected message %#x\n", msg.message ); empty_message_queue(); @@ -4463,7 +4464,7 @@ static void test_SendInput(void) res = SendInput( 16, input, sizeof(*input) ); ok( (res == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) || broken(res == 16 && GetLastError() == 0xdeadbeef), - "SendInput returned %u, error %#x\n", res, GetLastError() ); + "SendInput returned %u, error %#lx\n", res, GetLastError() ); while ((res = wait_for_message(&msg)) && (msg.message == WM_TIMER || broken(msg.message == WM_KEYDOWN || msg.message == WM_KEYUP))) DispatchMessageA(&msg); ok( !res, "SendInput triggered unexpected message %#x\n", msg.message ); @@ -4472,7 +4473,7 @@ static void test_SendInput(void) for (i = 0; i < ARRAY_SIZE(input); ++i) input[i].type = INPUT_HARDWARE + 1; SetLastError( 0xdeadbeef ); res = SendInput( 16, input, sizeof(*input) ); - ok( res == 16 && GetLastError() == 0xdeadbeef, "SendInput returned %u, error %#x\n", res, GetLastError() ); + ok( res == 16 && GetLastError() == 0xdeadbeef, "SendInput returned %u, error %#lx\n", res, GetLastError() ); while ((res = wait_for_message(&msg)) && msg.message == WM_TIMER) DispatchMessageA(&msg); ok( !res, "SendInput triggered unexpected message %#x\n", msg.message ); empty_message_queue();
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=110026
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
user32: input.c:758: Test failed: 0 (a4/0): 00 from 00 -> 80 unexpected input.c:758: Test failed: 0 (a4/0): 41 from 01 -> 00 unexpected
=== w1064 (64 bit report) ===
user32: input.c:1324: Test failed: GetCursorPos: (99,100)
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/user32/tests/listbox.c | 211 ++++----- dlls/user32/tests/menu.c | 333 +++++++------- dlls/user32/tests/monitor.c | 435 +++++++++--------- dlls/user32/tests/msg.c | 973 +++++++++++++++++++++-------------------- dlls/user32/tests/resource.c | 21 - dlls/user32/tests/scroll.c | 93 ++-- dlls/user32/tests/static.c | 17 - dlls/user32/tests/sysparams.c | 593 +++++++++++++------------ dlls/user32/tests/text.c | 73 ++- dlls/user32/tests/uitools.c | 5 10 files changed, 1382 insertions(+), 1372 deletions(-)
diff --git a/dlls/user32/tests/listbox.c b/dlls/user32/tests/listbox.c index cb2551002d6..5a09282f6a6 100644 --- a/dlls/user32/tests/listbox.c +++ b/dlls/user32/tests/listbox.c @@ -1,3 +1,4 @@ +#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* Unit test suite for list boxes. * * Copyright 2003 Ferenc Wagner @@ -128,7 +129,7 @@ keypress (HWND handle, WPARAM keycode, BYTE scancode, BOOL extended) }
#define listbox_field_ok(t, s, f, got) \ - ok (t.s.f==got.f, "style %#x, step " #s ", field " #f \ + ok (t.s.f==got.f, "style %#lx, step " #s ", field " #f \ ": expected %d, got %d\n", style, t.s.f, got.f)
#define listbox_todo_field_ok(t, s, f, got) \ @@ -223,7 +224,7 @@ static void check_item_height(void) ok (SendMessageA(hLB, WM_SETFONT, (WPARAM)font, 0) == 0, "Can't set font\n");
itemHeight = SendMessageA(hLB, LB_GETITEMHEIGHT, 0, 0); - ok (itemHeight == tm.tmHeight, "Item height wrong, got %d, expecting %d\n", itemHeight, tm.tmHeight); + ok (itemHeight == tm.tmHeight, "Item height wrong, got %d, expecting %ld\n", itemHeight, tm.tmHeight);
DestroyWindow (hLB);
@@ -249,7 +250,7 @@ static LRESULT WINAPI main_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARA DWORD style = GetWindowLongA(GetWindow(hwnd, GW_CHILD), GWL_STYLE); MEASUREITEMSTRUCT *mi = (void*)lparam;
- ok(wparam == mi->CtlID, "got wParam=%08lx, expected %08x\n", wparam, mi->CtlID); + ok(wparam == mi->CtlID, "got wParam=%08Ix, expected %08x\n", wparam, mi->CtlID); ok(mi->CtlType == ODT_LISTBOX, "mi->CtlType = %u\n", mi->CtlType); ok(mi->CtlID == 1, "mi->CtlID = %u\n", mi->CtlID); ok(mi->itemHeight, "mi->itemHeight = 0\n"); @@ -265,7 +266,7 @@ static LRESULT WINAPI main_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARA else { ok((void*)mi->itemData == strings[mi->itemID], - "mi->itemData = %08lx, expected %p\n", mi->itemData, strings[mi->itemID]); + "mi->itemData = %08Ix, expected %p\n", mi->itemData, strings[mi->itemID]); } break; } @@ -274,9 +275,9 @@ static LRESULT WINAPI main_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARA RECT rc_item, rc_client, rc_clip; DRAWITEMSTRUCT *dis = (DRAWITEMSTRUCT *)lparam;
- trace("%p WM_DRAWITEM %08lx %08lx\n", hwnd, wparam, lparam); + trace("%p WM_DRAWITEM %08Ix %08Ix\n", hwnd, wparam, lparam);
- ok(wparam == dis->CtlID, "got wParam=%08lx instead of %08x\n", + ok(wparam == dis->CtlID, "got wParam=%08Ix instead of %08x\n", wparam, dis->CtlID); ok(dis->CtlType == ODT_LISTBOX, "wrong CtlType %04x\n", dis->CtlType);
@@ -386,14 +387,14 @@ static void test_ownerdraw(void) SendMessageA(hLB, LB_GETITEMRECT, 0, (LPARAM)&rc); trace("item 0 rect %s\n", wine_dbgstr_rect(&rc)); ok(!IsRectEmpty(&rc), "empty item rect\n"); - ok(rc.top < 0, "rc.top is not negative (%d)\n", rc.top); + ok(rc.top < 0, "rc.top is not negative (%ld)\n", rc.top);
DestroyWindow(hLB);
/* Both FIXED and VARIABLE, FIXED should override VARIABLE. */ hLB = CreateWindowA("listbox", "TestList", LBS_OWNERDRAWFIXED | LBS_OWNERDRAWVARIABLE | styles[i], 0, 0, 100, 100, NULL, NULL, NULL, 0); - ok(hLB != NULL, "last error 0x%08x\n", GetLastError()); + ok(hLB != NULL, "last error 0x%08lx\n", GetLastError());
ok(GetWindowLongA(hLB, GWL_STYLE) & LBS_OWNERDRAWVARIABLE, "Unexpected window style.\n");
@@ -785,70 +786,70 @@ static void test_changing_selection_styles(void) for (k = 0; k < ARRAY_SIZE(selexpect_multi); k++) { ret = SendMessageA(listbox, LB_INSERTSTRING, -1, (LPARAM)"x"); - ok(ret == k, "%u: Unexpected return value %d, expected %d.\n", j, ret, k); + ok(ret == k, "%u: Unexpected return value %ld, expected %d.\n", j, ret, k); } ret = SendMessageA(listbox, LB_GETCOUNT, 0, 0); - ok(ret == ARRAY_SIZE(selexpect_multi), "%u: Unexpected count %d.\n", j, ret); + ok(ret == ARRAY_SIZE(selexpect_multi), "%u: Unexpected count %ld.\n", j, ret);
/* Select items with different methods */ ret = SendMessageA(listbox, LB_SETCURSEL, 2, 0); - ok(ret == setcursel_expect, "%u: Unexpected return value %d.\n", j, ret); + ok(ret == setcursel_expect, "%u: Unexpected return value %ld.\n", j, ret); ret = SendMessageA(listbox, LB_SELITEMRANGE, TRUE, MAKELPARAM(0, 0)); - ok(ret == selitemrange_expect, "%u: Unexpected return value %d.\n", j, ret); + ok(ret == selitemrange_expect, "%u: Unexpected return value %ld.\n", j, ret); ret = SendMessageA(listbox, LB_SELITEMRANGE, TRUE, MAKELPARAM(2, 2)); - ok(ret == selitemrange_expect, "%u: Unexpected return value %d.\n", j, ret); + ok(ret == selitemrange_expect, "%u: Unexpected return value %ld.\n", j, ret);
/* Verify that the proper items are selected */ for (k = 0; k < ARRAY_SIZE(selexpect_multi); k++) { ret = SendMessageA(listbox, LB_GETSEL, k, 0); - ok(ret == selexpect[k], "%u: Unexpected selection state %d, expected %d.\n", + ok(ret == selexpect[k], "%u: Unexpected selection state %ld, expected %ld.\n", j, ret, selexpect[k]); }
/* Now change the selection style */ style = GetWindowLongA(listbox, GWL_STYLE); ok((style & (LBS_MULTIPLESEL | LBS_EXTENDEDSEL)) == selstyles[j], - "%u: unexpected window styles %#x.\n", j, style); + "%u: unexpected window styles %#lx.\n", j, style); if (selstyles[j] & (LBS_MULTIPLESEL | LBS_EXTENDEDSEL)) style &= ~selstyles[j]; else style |= LBS_MULTIPLESEL | LBS_EXTENDEDSEL; SetWindowLongA(listbox, GWL_STYLE, style); style = GetWindowLongA(listbox, GWL_STYLE); - ok(!(style & selstyles[j]), "%u: unexpected window styles %#x.\n", j, style); + ok(!(style & selstyles[j]), "%u: unexpected window styles %#lx.\n", j, style);
/* Verify that the same items are selected */ ret = SendMessageA(listbox, LB_GETSELCOUNT, 0, 0); - ok(ret == getselcount_expect, "%u: expected %d from LB_GETSELCOUNT, got %d\n", + ok(ret == getselcount_expect, "%u: expected %ld from LB_GETSELCOUNT, got %ld\n", j, getselcount_expect, ret);
for (k = 0; k < ARRAY_SIZE(selexpect_multi); k++) { ret = SendMessageA(listbox, LB_GETSEL, k, 0); - ok(ret == selexpect[k], "%u: Unexpected selection state %d, expected %d.\n", + ok(ret == selexpect[k], "%u: Unexpected selection state %ld, expected %ld.\n", j, ret, selexpect[k]); }
/* Lastly see if we can still change the selection as before with old style */ if (setcursel_expect != LB_ERR) setcursel_expect = 0; ret = SendMessageA(listbox, LB_SETCURSEL, 0, 0); - ok(ret == setcursel_expect, "%u: Unexpected return value %d.\n", j, ret); + ok(ret == setcursel_expect, "%u: Unexpected return value %ld.\n", j, ret); ret = SendMessageA(listbox, LB_SELITEMRANGE, TRUE, MAKELPARAM(1, 1)); - ok(ret == selitemrange_expect, "%u: Unexpected return value %d.\n", j, ret); + ok(ret == selitemrange_expect, "%u: Unexpected return value %ld.\n", j, ret); ret = SendMessageA(listbox, LB_SELITEMRANGE, FALSE, MAKELPARAM(2, 2)); - ok(ret == selitemrange_expect, "%u: Unexpected return value %d.\n", j, ret); + ok(ret == selitemrange_expect, "%u: Unexpected return value %ld.\n", j, ret);
/* And verify the selections */ selexpect = (selstyles[j] & (LBS_MULTIPLESEL | LBS_EXTENDEDSEL)) ? selexpect_multi2 : selexpect_single2; ret = SendMessageA(listbox, LB_GETSELCOUNT, 0, 0); - ok(ret == getselcount_expect, "%u: expected %d from LB_GETSELCOUNT, got %d\n", + ok(ret == getselcount_expect, "%u: expected %ld from LB_GETSELCOUNT, got %ld\n", j, getselcount_expect, ret);
for (k = 0; k < ARRAY_SIZE(selexpect_multi); k++) { ret = SendMessageA(listbox, LB_GETSEL, k, 0); - ok(ret == selexpect[k], "%u: Unexpected selection state %d, expected %d.\n", + ok(ret == selexpect[k], "%u: Unexpected selection state %ld, expected %ld.\n", j, ret, selexpect[k]); }
@@ -872,13 +873,13 @@ static void test_itemfrompoint(void)
/* For an empty listbox win2k returns 0x1ffff, win98 returns 0x10000, nt4 returns 0xffffffff */ r = SendMessageA(hList, LB_ITEMFROMPOINT, 0, MAKELPARAM( /* x */ 30, /* y */ 30 )); - ok( r == 0x1ffff || r == 0x10000 || r == 0xffffffff, "ret %x\n", r ); + ok( r == 0x1ffff || r == 0x10000 || r == 0xffffffff, "ret %lx\n", r );
r = SendMessageA(hList, LB_ITEMFROMPOINT, 0, MAKELPARAM( 700, 30 )); - ok( r == 0x1ffff || r == 0x10000 || r == 0xffffffff, "ret %x\n", r ); + ok( r == 0x1ffff || r == 0x10000 || r == 0xffffffff, "ret %lx\n", r );
r = SendMessageA(hList, LB_ITEMFROMPOINT, 0, MAKELPARAM( 30, 300 )); - ok( r == 0x1ffff || r == 0x10000 || r == 0xffffffff, "ret %x\n", r ); + ok( r == 0x1ffff || r == 0x10000 || r == 0xffffffff, "ret %lx\n", r );
id = SendMessageA( hList, LB_ADDSTRING, 0, (LPARAM) "hi"); ok( id == 0, "item id wrong\n"); @@ -886,17 +887,17 @@ static void test_itemfrompoint(void) ok( id == 1, "item id wrong\n");
r = SendMessageA(hList, LB_ITEMFROMPOINT, 0, MAKELPARAM( /* x */ 30, /* y */ 30 )); - ok( r == 0x1, "ret %x\n", r ); + ok( r == 0x1, "ret %lx\n", r );
r = SendMessageA(hList, LB_ITEMFROMPOINT, 0, MAKELPARAM( /* x */ 30, /* y */ 601 )); ok( r == 0x10001 || broken(r == 1), /* nt4 */ - "ret %x\n", r ); + "ret %lx\n", r );
/* Resize control so that below assertions about sizes are valid */ r = SendMessageA( hList, LB_GETITEMRECT, 0, (LPARAM)&rc); - ok( r == 1, "ret %x\n", r); + ok( r == 1, "ret %lx\n", r); r = MoveWindow(hList, 1, 1, 600, (rc.bottom - rc.top + 1) * 9 / 2, TRUE); - ok( r != 0, "ret %x\n", r); + ok( r != 0, "ret %lx\n", r);
id = SendMessageA( hList, LB_ADDSTRING, 0, (LPARAM) "hi2"); ok( id == 2, "item id wrong\n"); @@ -916,31 +917,31 @@ static void test_itemfrompoint(void)
SendMessageA( hList, LB_SETTOPINDEX, 1, 0); r = SendMessageA( hList, LB_GETTOPINDEX, 0, 0); - ok( r == 1, "top %d\n", r); + ok( r == 1, "top %ld\n", r);
r = SendMessageA( hList, LB_GETITEMRECT, 5, (LPARAM)&rc); - ok( r == 1, "ret %x\n", r); + ok( r == 1, "ret %lx\n", r); r = SendMessageA( hList, LB_GETITEMRECT, 6, (LPARAM)&rc); - ok( r == 0, "ret %x\n", r); + ok( r == 0, "ret %lx\n", r);
r = SendMessageA( hList, LB_ITEMFROMPOINT, 0, MAKELPARAM(/* x */ 10, /* y */ 10) ); - ok( r == 1, "ret %x\n", r); + ok( r == 1, "ret %lx\n", r);
r = SendMessageA( hList, LB_ITEMFROMPOINT, 0, MAKELPARAM(1000, 10) ); ok( r == 0x10001 || broken(r == 1), /* nt4 */ - "ret %x\n", r ); + "ret %lx\n", r );
r = SendMessageA( hList, LB_ITEMFROMPOINT, 0, MAKELPARAM(10, -10) ); ok( r == 0x10001 || broken(r == 1), /* nt4 */ - "ret %x\n", r ); + "ret %lx\n", r );
r = SendMessageA( hList, LB_ITEMFROMPOINT, 0, MAKELPARAM(10, 100) ); ok( r == 0x10005 || broken(r == 5), /* nt4 */ - "item %x\n", r ); + "item %lx\n", r );
r = SendMessageA( hList, LB_ITEMFROMPOINT, 0, MAKELPARAM(10, 200) ); ok( r == 0x10005 || broken(r == 5), /* nt4 */ - "item %x\n", r ); + "item %lx\n", r );
DestroyWindow( hList ); } @@ -993,7 +994,7 @@ static void test_listbox_LB_DIR(void) ok(ret, "Failed to create test directory.\n");
file = CreateFileA( "wtest1.tmp.c", GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL ); - ok(file != INVALID_HANDLE_VALUE, "Error creating the test file: %d\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "Error creating the test file: %ld\n", GetLastError()); CloseHandle( file );
/* NOTE: for this test to succeed, there must be no subdirectories @@ -1017,7 +1018,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, wildcard); res = SendMessageA(hList, LB_DIR, 0, (LPARAM)pathBuffer); } - ok (res >= 0, "SendMessage(LB_DIR, 0, *) failed - 0x%08x\n", GetLastError()); + ok (res >= 0, "SendMessage(LB_DIR, 0, *) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox */ itemCount = SendMessageA(hList, LB_GETCOUNT, 0, 0); @@ -1044,7 +1045,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, "w*.c"); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, 0, (LPARAM)pathBuffer); - ok (res >= 0, "SendMessage(LB_DIR, 0, w*.c) failed - 0x%08x\n", GetLastError()); + ok (res >= 0, "SendMessage(LB_DIR, 0, w*.c) failed - 0x%08lx\n", GetLastError());
/* Path specification does NOT converted to uppercase */ ok (!strcmp(pathBuffer, "w*.c"), @@ -1072,7 +1073,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, wildcard); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, DDL_DIRECTORY, (LPARAM)pathBuffer); - ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY, *) failed - 0x%08x\n", GetLastError()); + ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY, *) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox. * All files plus "[..]" @@ -1101,7 +1102,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, "w*.c"); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, DDL_DIRECTORY, (LPARAM)pathBuffer); - ok (res >= 0, "SendMessage(LB_DIR, DDL_DIRECTORY, w*.c) failed - 0x%08x\n", GetLastError()); + ok (res >= 0, "SendMessage(LB_DIR, DDL_DIRECTORY, w*.c) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox. Since the parent directory does not * fit w*.c, there should be exactly the same number of items as without DDL_DIRECTORY @@ -1130,7 +1131,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, wildcard); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, DDL_DRIVES|DDL_EXCLUSIVE, (LPARAM)pathBuffer); - ok (res >= 0, "SendMessage(LB_DIR, DDL_DRIVES|DDL_EXCLUSIVE, *) failed - 0x%08x\n", GetLastError()); + ok (res >= 0, "SendMessage(LB_DIR, DDL_DRIVES|DDL_EXCLUSIVE, *) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox. In particular, there should * be at least one element before, since the string "[-c-]" should @@ -1177,7 +1178,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, wildcard); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, DDL_DRIVES, (LPARAM)pathBuffer); - ok (res > 0, "SendMessage(LB_DIR, DDL_DRIVES, *) failed - 0x%08x\n", GetLastError()); + ok (res > 0, "SendMessage(LB_DIR, DDL_DRIVES, *) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox. In particular, there should * be at least one element before, since the string "[-c-]" should @@ -1205,7 +1206,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, "w*.c"); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, DDL_DRIVES, (LPARAM)pathBuffer); - ok (res > 0, "SendMessage(LB_DIR, DDL_DRIVES, w*.c) failed - 0x%08x\n", GetLastError()); + ok (res > 0, "SendMessage(LB_DIR, DDL_DRIVES, w*.c) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox. In particular, there should * be at least one element before, since the string "[-c-]" should @@ -1240,7 +1241,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, wildcard); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, DDL_DIRECTORY|DDL_DRIVES, (LPARAM)pathBuffer); - ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES, *) failed - 0x%08x\n", GetLastError()); + ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES, *) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox. In particular, there should * be exactly the number of plain files, plus the number of mapped drives. @@ -1280,7 +1281,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, "w*.c"); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, DDL_DIRECTORY|DDL_DRIVES, (LPARAM)pathBuffer); - ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES, w*.c) failed - 0x%08x\n", GetLastError()); + ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES, w*.c) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox. In particular, there should * be exactly the number of plain files, plus the number of mapped drives. @@ -1314,7 +1315,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, wildcard); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, (LPARAM)pathBuffer); - ok (res != -1, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err %u\n", GetLastError()); + ok (res != -1, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err %lu\n", GetLastError());
itemCount = SendMessageA(hList, LB_GETCOUNT, 0, 0); ok (itemCount == itemCount_allDirs, @@ -1356,7 +1357,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, wildcard); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, (LPARAM)pathBuffer); - ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, w*.c,) failed - 0x%08x\n", GetLastError()); + ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, w*.c,) failed - 0x%08lx\n", GetLastError());
/* There should be no plain files on the listbox */ itemCount = SendMessageA(hList, LB_GETCOUNT, 0, 0); @@ -1391,7 +1392,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, "w*.c"); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, (LPARAM)pathBuffer); - ok (res >= 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, w*.c,) failed - 0x%08x\n", GetLastError()); + ok (res >= 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, w*.c,) failed - 0x%08lx\n", GetLastError());
/* There should be no plain files on the listbox, and no [..], since it does not fit w*.c */ itemCount = SendMessageA(hList, LB_GETCOUNT, 0, 0); @@ -1497,7 +1498,7 @@ static void test_listbox_dlgdir(void) HANDLE file;
file = CreateFileA( "wtest1.tmp.c", GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL ); - ok(file != INVALID_HANDLE_VALUE, "Error creating the test file: %d\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "Error creating the test file: %ld\n", GetLastError()); CloseHandle( file );
/* NOTE: for this test to succeed, there must be no subdirectories @@ -1524,7 +1525,7 @@ static void test_listbox_dlgdir(void) */ strcpy(pathBuffer, "w*.c"); res = DlgDirListA(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, 0); - ok (res == 1, "DlgDirList(*.c, 0) returned %d - expected 1 - 0x%08x\n", res, GetLastError()); + ok (res == 1, "DlgDirList(*.c, 0) returned %d - expected 1 - 0x%08lx\n", res, GetLastError());
/* Path specification gets converted to uppercase */ ok (!strcmp(pathBuffer, "W*.C"), @@ -1562,7 +1563,7 @@ static void test_listbox_dlgdir(void) strcpy(pathBuffer, "w*.c"); res = DlgDirListA(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, DDL_DIRECTORY); - ok (res == 1, "DlgDirList(*.c, DDL_DIRECTORY) failed - 0x%08x\n", GetLastError()); + ok (res == 1, "DlgDirList(*.c, DDL_DIRECTORY) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox. In particular, there should * be exactly more elements than before, since the directories should @@ -1609,7 +1610,7 @@ static void test_listbox_dlgdir(void) strcpy(pathBuffer, "w*.c"); res = DlgDirListA(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, DDL_DRIVES); - ok (res == 1, "DlgDirList(*.c, DDL_DRIVES) failed - 0x%08x\n", GetLastError()); + ok (res == 1, "DlgDirList(*.c, DDL_DRIVES) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox. In particular, there should * be at least one element before, since the string "[-c-]" should @@ -1651,7 +1652,7 @@ static void test_listbox_dlgdir(void) strcpy(pathBuffer, "w*.c"); res = DlgDirListA(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, DDL_DIRECTORY|DDL_DRIVES); - ok (res == 1, "DlgDirList(*.c, DDL_DIRECTORY|DDL_DRIVES) failed - 0x%08x\n", GetLastError()); + ok (res == 1, "DlgDirList(*.c, DDL_DIRECTORY|DDL_DRIVES) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox. In particular, there should * be exactly the number of plain files, plus the number of mapped drives, @@ -1698,7 +1699,7 @@ static void test_listbox_dlgdir(void) strcpy(pathBuffer, "w*.c"); res = DlgDirListA(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, DDL_DIRECTORY|DDL_EXCLUSIVE); - ok (res == 1, "DlgDirList(*.c, DDL_DIRECTORY|DDL_EXCLUSIVE) failed - 0x%08x\n", GetLastError()); + ok (res == 1, "DlgDirList(*.c, DDL_DIRECTORY|DDL_EXCLUSIVE) failed - 0x%08lx\n", GetLastError());
/* There should be exactly one element: "[..]" */ itemCount = SendMessageA(g_listBox, LB_GETCOUNT, 0, 0); @@ -1727,7 +1728,7 @@ static void test_listbox_dlgdir(void) strcpy(pathBuffer, "w*.c"); res = DlgDirListA(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE); - ok (res == 1, "DlgDirList(*.c, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE) failed - 0x%08x\n", GetLastError()); + ok (res == 1, "DlgDirList(*.c, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE) failed - 0x%08lx\n", GetLastError());
/* There should be no plain files on the listbox */ itemCount = SendMessageA(g_listBox, LB_GETCOUNT, 0, 0); @@ -1762,14 +1763,14 @@ static void test_listbox_dlgdir(void) strcpy(pathBuffer, "*"); res = DlgDirListA(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, DDL_DIRECTORY|DDL_DRIVES); - ok (res != 0, "DlgDirList(*, DDL_DIRECTORY|DDL_DRIVES) failed - 0x%08x\n", GetLastError()); + ok (res != 0, "DlgDirList(*, DDL_DIRECTORY|DDL_DRIVES) failed - 0x%08lx\n", GetLastError());
SendMessageA(g_listBox, LB_SETCURSEL, -1, 0); /* Unselect any current selection */ memset(pathBuffer, 0, MAX_PATH); SetLastError(0xdeadbeef); res = DlgDirSelectExA(hWnd, pathBuffer, MAX_PATH, ID_TEST_LISTBOX); ok (GetLastError() == 0xdeadbeef, - "DlgDirSelectEx() with no selection modified last error code from 0xdeadbeef to 0x%08x\n", + "DlgDirSelectEx() with no selection modified last error code from 0xdeadbeef to 0x%08lx\n", GetLastError()); ok (res == 0, "DlgDirSelectEx() with no selection returned %d, expected 0\n", res); /* WinXP-SP2 leaves pathBuffer untouched, but Win98 fills it with garbage. */ @@ -1791,7 +1792,7 @@ static void test_listbox_dlgdir(void) SetLastError(0xdeadbeef); res = DlgDirSelectExA(hWnd, pathBuffer, MAX_PATH, ID_TEST_LISTBOX); ok (GetLastError() == 0xdeadbeef, - "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08x\n", + "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08lx\n", i, GetLastError()); ok(res == 1, "DlgDirSelectEx() thinks %s (%s) is not a drive/directory!\n", itemBuffer, pathBuffer);
@@ -1803,7 +1804,7 @@ static void test_listbox_dlgdir(void) SetLastError(0xdeadbeef); res = DlgDirSelectExA(hWnd, pathBuffer, MAX_PATH, ID_TEST_LISTBOX); ok (GetLastError() == 0xdeadbeef, - "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08x\n", + "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08lx\n", i, GetLastError()); ok(res == 1, "DlgDirSelectEx() thinks %s (%s) is not a drive/directory!\n", itemBuffer, pathBuffer);
@@ -1820,7 +1821,7 @@ static void test_listbox_dlgdir(void) SetLastError(0xdeadbeef); res = DlgDirSelectExA(hWnd, pathBuffer, MAX_PATH, ID_TEST_LISTBOX); ok (GetLastError() == 0xdeadbeef, - "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08x\n", + "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08lx\n", i, GetLastError()); ok(res == 0, "DlgDirSelectEx() thinks %s (%s) is a drive/directory!\n", itemBuffer, pathBuffer);
@@ -1854,7 +1855,7 @@ static void test_listbox_dlgdir(void) SetLastError(0xdeadbeef); res = DlgDirSelectExA(hWnd, pathBuffer, MAX_PATH, ID_TEST_LISTBOX); ok (GetLastError() == 0xdeadbeef, - "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08x\n", + "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08lx\n", i, GetLastError()); ok(res == 1, "DlgDirSelectEx() thinks %s (%s) is not a drive/directory!\n", itemBuffer, pathBuffer);
@@ -1866,7 +1867,7 @@ static void test_listbox_dlgdir(void) SetLastError(0xdeadbeef); res = DlgDirSelectExA(hWnd, pathBuffer, MAX_PATH, ID_TEST_LISTBOX); ok (GetLastError() == 0xdeadbeef, - "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08x\n", + "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08lx\n", i, GetLastError()); ok(res == 1, "DlgDirSelectEx() thinks %s (%s) is not a drive/directory!\n", itemBuffer, pathBuffer);
@@ -1883,7 +1884,7 @@ static void test_listbox_dlgdir(void) SetLastError(0xdeadbeef); res = DlgDirSelectExA(hWnd, pathBuffer, MAX_PATH, ID_TEST_LISTBOX); ok (GetLastError() == 0xdeadbeef, - "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08x\n", + "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08lx\n", i, GetLastError()); ok(res == 0, "DlgDirSelectEx() thinks %s (%s) is a drive/directory!\n", itemBuffer, pathBuffer);
@@ -1915,7 +1916,7 @@ static void test_listbox_dlgdir(void) res = DlgDirListA(hWnd, pathBuffer, ID_TEST_LISTBOX, 0, DDL_DIRECTORY | DDL_EXCLUSIVE); ok(!res, "DlgDirList should have failed with 0 but %d was returned\n", res); ok(GetLastError() == ERROR_NO_WILDCARD_CHARACTERS, - "GetLastError should return 0x589, got 0x%X\n",GetLastError()); + "GetLastError should return 0x589, got 0x%lX\n",GetLastError());
DestroyWindow(hWnd); } @@ -1940,9 +1941,9 @@ static void test_set_count( void ) ok( IsRectEmpty( &r ), "got non-empty rect\n");
ret = SendMessageA( listbox, LB_SETCOUNT, 100, 0 ); - ok( ret == 0, "got %d\n", ret ); + ok( ret == 0, "got %ld\n", ret ); ret = SendMessageA( listbox, LB_GETCOUNT, 0, 0 ); - ok( ret == 100, "got %d\n", ret ); + ok( ret == 100, "got %ld\n", ret );
GetUpdateRect( listbox, &r, TRUE ); ok( !IsRectEmpty( &r ), "got empty rect\n"); @@ -1952,15 +1953,15 @@ static void test_set_count( void ) ok( IsRectEmpty( &r ), "got non-empty rect\n");
ret = SendMessageA( listbox, LB_SETCOUNT, 99, 0 ); - ok( ret == 0, "got %d\n", ret ); + ok( ret == 0, "got %ld\n", ret );
GetUpdateRect( listbox, &r, TRUE ); ok( !IsRectEmpty( &r ), "got empty rect\n");
ret = SendMessageA( listbox, LB_SETCOUNT, -5, 0 ); - ok( ret == 0, "got %d\n", ret ); + ok( ret == 0, "got %ld\n", ret ); ret = SendMessageA( listbox, LB_GETCOUNT, 0, 0 ); - ok( ret == -5, "got %d\n", ret ); + ok( ret == -5, "got %ld\n", ret );
DestroyWindow( listbox );
@@ -1970,8 +1971,8 @@ static void test_set_count( void )
SetLastError( 0xdeadbeef ); ret = SendMessageA( listbox, LB_SETCOUNT, 100, 0 ); - ok( ret == LB_ERR, "expected %d, got %d\n", LB_ERR, ret ); - ok( GetLastError() == ERROR_SETCOUNT_ON_BAD_LB, "Unexpected error %d.\n", GetLastError() ); + ok( ret == LB_ERR, "expected %d, got %ld\n", LB_ERR, ret ); + ok( GetLastError() == ERROR_SETCOUNT_ON_BAD_LB, "Unexpected error %ld.\n", GetLastError() );
DestroyWindow( listbox ); } @@ -2014,7 +2015,7 @@ static void test_GetListBoxInfo(void)
lb_getlistboxinfo = 0; ret = pGetListBoxInfo(listbox); - ok(ret > 0, "got %d\n", ret); + ok(ret > 0, "got %ld\n", ret); todo_wine ok(lb_getlistboxinfo == 0, "got %d\n", lb_getlistboxinfo);
@@ -2040,45 +2041,45 @@ static void test_init_storage( void ) 0, 0, 100, 100, parent, (HMENU)1, NULL, 0);
items_size = SendMessageA(listbox, LB_INITSTORAGE, 100, 0); - ok(items_size >= 100, "expected at least 100, got %d\n", items_size); + ok(items_size >= 100, "expected at least 100, got %ld\n", items_size);
ret = SendMessageA(listbox, LB_INITSTORAGE, 0, 0); - ok(ret == items_size, "expected %d, got %d\n", items_size, ret); + ok(ret == items_size, "expected %ld, got %ld\n", items_size, ret);
/* it doesn't grow since the space was already reserved */ ret = SendMessageA(listbox, LB_INITSTORAGE, items_size, 0); - ok(ret == items_size, "expected %d, got %d\n", items_size, ret); + ok(ret == items_size, "expected %ld, got %ld\n", items_size, ret);
/* it doesn't shrink the reserved space */ ret = SendMessageA(listbox, LB_INITSTORAGE, 42, 0); - ok(ret == items_size, "expected %d, got %d\n", items_size, ret); + ok(ret == items_size, "expected %ld, got %ld\n", items_size, ret);
/* now populate almost all of it so it's not reserved anymore */ if (styles[i] & LBS_NODATA) { ret = SendMessageA(listbox, LB_SETCOUNT, items_size - 1, 0); - ok(ret == 0, "unexpected return value %d\n", ret); + ok(ret == 0, "unexpected return value %ld\n", ret); } else { for (j = 0; j < items_size - 1; j++) { ret = SendMessageA(listbox, LB_INSERTSTRING, -1, (LPARAM)""); - ok(ret == j, "expected %d, got %d\n", j, ret); + ok(ret == j, "expected %d, got %ld\n", j, ret); } }
/* we still have one more reserved slot, so it doesn't grow yet */ ret = SendMessageA(listbox, LB_INITSTORAGE, 1, 0); - ok(ret == items_size, "expected %d, got %d\n", items_size, ret); + ok(ret == items_size, "expected %ld, got %ld\n", items_size, ret);
/* fill the slot and check again, it should grow this time */ ret = SendMessageA(listbox, LB_INSERTSTRING, -1, (LPARAM)""); - ok(ret == items_size - 1, "expected %d, got %d\n", items_size - 1, ret); + ok(ret == items_size - 1, "expected %ld, got %ld\n", items_size - 1, ret); ret = SendMessageA(listbox, LB_INITSTORAGE, 0, 0); - ok(ret == items_size, "expected %d, got %d\n", items_size, ret); + ok(ret == items_size, "expected %ld, got %ld\n", items_size, ret); ret = SendMessageA(listbox, LB_INITSTORAGE, 1, 0); - ok(ret > items_size, "expected it to grow past %d, got %d\n", items_size, ret); + ok(ret > items_size, "expected it to grow past %ld, got %ld\n", items_size, ret);
DestroyWindow(listbox); } @@ -2120,7 +2121,7 @@ static void test_extents(void) listbox = create_listbox(WS_CHILD | WS_VISIBLE, parent);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 0, "Got wrong initial horizontal extent: %u\n", res); + ok(res == 0, "Got wrong initial horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2135,7 +2136,7 @@ static void test_extents(void) SendMessageA(listbox, LB_SETHORIZONTALEXTENT, 64, 0);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 64, "Got wrong horizontal extent: %u\n", res); + ok(res == 64, "Got wrong horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2150,7 +2151,7 @@ static void test_extents(void) SendMessageA(listbox, LB_SETHORIZONTALEXTENT, 184, 0);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 184, "Got wrong horizontal extent: %u\n", res); + ok(res == 184, "Got wrong horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2167,7 +2168,7 @@ static void test_extents(void) listbox = create_listbox(WS_CHILD | WS_VISIBLE | WS_HSCROLL, parent);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 0, "Got wrong initial horizontal extent: %u\n", res); + ok(res == 0, "Got wrong initial horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2182,7 +2183,7 @@ static void test_extents(void) SendMessageA(listbox, LB_SETHORIZONTALEXTENT, 64, 0);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 64, "Got wrong horizontal extent: %u\n", res); + ok(res == 64, "Got wrong horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2197,7 +2198,7 @@ static void test_extents(void) SendMessageA(listbox, LB_SETHORIZONTALEXTENT, 184, 0);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 184, "Got wrong horizontal extent: %u\n", res); + ok(res == 184, "Got wrong horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2211,7 +2212,7 @@ static void test_extents(void) SendMessageA(listbox, LB_SETHORIZONTALEXTENT, 0, 0);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 0, "Got wrong horizontal extent: %u\n", res); + ok(res == 0, "Got wrong horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2228,7 +2229,7 @@ static void test_extents(void) listbox = create_listbox(WS_CHILD | WS_VISIBLE | WS_HSCROLL | LBS_DISABLENOSCROLL, parent);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 0, "Got wrong initial horizontal extent: %u\n", res); + ok(res == 0, "Got wrong initial horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2243,7 +2244,7 @@ static void test_extents(void) SendMessageA(listbox, LB_SETHORIZONTALEXTENT, 64, 0);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 64, "Got wrong horizontal extent: %u\n", res); + ok(res == 64, "Got wrong horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2258,7 +2259,7 @@ static void test_extents(void) SendMessageA(listbox, LB_SETHORIZONTALEXTENT, 184, 0);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 184, "Got wrong horizontal extent: %u\n", res); + ok(res == 184, "Got wrong horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2272,7 +2273,7 @@ static void test_extents(void) SendMessageA(listbox, LB_SETHORIZONTALEXTENT, 0, 0);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 0, "Got wrong horizontal extent: %u\n", res); + ok(res == 0, "Got wrong horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2297,14 +2298,14 @@ static void test_WM_MEASUREITEM(void) listbox = create_listbox(WS_CHILD | LBS_OWNERDRAWVARIABLE, parent);
data = SendMessageA(listbox, LB_GETITEMDATA, 0, 0); - ok(data == (LRESULT)strings[0], "data = %08lx, expected %p\n", data, strings[0]); + ok(data == (LRESULT)strings[0], "data = %08Ix, expected %p\n", data, strings[0]); DestroyWindow(parent);
parent = create_parent(); listbox = create_listbox(WS_CHILD | LBS_OWNERDRAWVARIABLE | LBS_HASSTRINGS, parent);
data = SendMessageA(listbox, LB_GETITEMDATA, 0, 0); - ok(!data, "data = %08lx\n", data); + ok(!data, "data = %08Ix\n", data); DestroyWindow(parent); }
@@ -2375,27 +2376,27 @@ static void test_LBS_NODATA(void) SetLastError(0xdeadbeef); ret = SendMessageA(listbox, LB_FINDSTRING, 1, 0); ok(ret == LB_ERR, "Unexpected return value %d.\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError should return 0x57, got 0x%X\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError should return 0x57, got 0x%lX\n", GetLastError()); SetLastError(0xdeadbeef); ret = SendMessageA(listbox, LB_FINDSTRING, 1, 42); ok(ret == LB_ERR, "Unexpected return value %d.\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError should return 0x57, got 0x%X\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError should return 0x57, got 0x%lX\n", GetLastError()); SetLastError(0xdeadbeef); ret = SendMessageA(listbox, LB_FINDSTRINGEXACT, 1, 0); ok(ret == LB_ERR, "Unexpected return value %d.\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError should return 0x57, got 0x%X\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError should return 0x57, got 0x%lX\n", GetLastError()); SetLastError(0xdeadbeef); ret = SendMessageA(listbox, LB_FINDSTRINGEXACT, 1, 42); ok(ret == LB_ERR, "Unexpected return value %d.\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError should return 0x57, got 0x%X\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError should return 0x57, got 0x%lX\n", GetLastError()); SetLastError(0xdeadbeef); ret = SendMessageA(listbox, LB_SELECTSTRING, 1, 0); ok(ret == LB_ERR, "Unexpected return value %d.\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError should return 0x57, got 0x%X\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError should return 0x57, got 0x%lX\n", GetLastError()); SetLastError(0xdeadbeef); ret = SendMessageA(listbox, LB_SELECTSTRING, 1, 42); ok(ret == LB_ERR, "Unexpected return value %d.\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError should return 0x57, got 0x%X\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError should return 0x57, got 0x%lX\n", GetLastError());
DestroyWindow(listbox);
@@ -2412,7 +2413,7 @@ static void test_LBS_NODATA(void) ok(listbox != NULL, "Failed to create a listbox.\n");
style = GetWindowLongA(listbox, GWL_STYLE); - ok((style & invalid_styles[i]) == invalid_styles[i], "%u: unexpected window styles %#x.\n", i, style); + ok((style & invalid_styles[i]) == invalid_styles[i], "%u: unexpected window styles %#lx.\n", i, style); ret = SendMessageA(listbox, LB_SETCOUNT, 100, 0); ok(ret == LB_ERR, "%u: unexpected return value %d.\n", i, ret); DestroyWindow(listbox); diff --git a/dlls/user32/tests/menu.c b/dlls/user32/tests/menu.c index cc0a9e6d9fa..4724b292e72 100644 --- a/dlls/user32/tests/menu.c +++ b/dlls/user32/tests/menu.c @@ -1,3 +1,4 @@ +#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* * Unit tests for menus * @@ -120,9 +121,9 @@ static LRESULT WINAPI menu_ownerdraw_wnd_proc(HWND hwnd, UINT msg, { MEASUREITEMSTRUCT* pmis = (MEASUREITEMSTRUCT*)lparam; if (winetest_debug > 1) - trace("WM_MEASUREITEM received data %lx size %dx%d\n", + trace("WM_MEASUREITEM received data %Ix size %dx%d\n", pmis->itemData, pmis->itemWidth, pmis->itemHeight); - ok( !wparam, "wrong wparam %lx\n", wparam ); + ok( !wparam, "wrong wparam %Ix\n", wparam ); ok( pmis->CtlType == ODT_MENU, "wrong type %x\n", pmis->CtlType ); MOD_odheight = pmis->itemHeight; pmis->itemWidth = MODsizes[pmis->itemData].cx; @@ -141,7 +142,7 @@ static LRESULT WINAPI menu_ownerdraw_wnd_proc(HWND hwnd, UINT msg, if (winetest_debug > 1) { RECT rc; GetMenuItemRect( hwnd, (HMENU)pdis->hwndItem, pdis->itemData ,&rc); - trace("WM_DRAWITEM received hwnd %p hmenu %p itemdata %ld item %d rc %s itemrc: %s\n", + trace("WM_DRAWITEM received hwnd %p hmenu %p itemdata %Id item %d rc %s itemrc: %s\n", hwnd, pdis->hwndItem, pdis->itemData, pdis->itemID, wine_dbgstr_rect(&pdis->rcItem), wine_dbgstr_rect(&rc)); oldpen=SelectObject( pdis->hDC, GetStockObject( @@ -150,7 +151,7 @@ static LRESULT WINAPI menu_ownerdraw_wnd_proc(HWND hwnd, UINT msg, pdis->rcItem.right,pdis->rcItem.bottom ); SelectObject( pdis->hDC, oldpen); } - ok( !wparam, "wrong wparam %lx\n", wparam ); + ok( !wparam, "wrong wparam %Ix\n", wparam ); ok( pdis->CtlType == ODT_MENU, "wrong type %x\n", pdis->CtlType ); /* calculate widths of some menu texts */ if( ! MOD_txtsizes[0].size.cx) @@ -236,7 +237,7 @@ static void test_getmenubarinfo(void) hwnd = CreateWindowExA(0, (LPCSTR)MAKEINTATOM(atomMenuCheckClass), NULL, WS_SYSMENU | WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, 100, 100, NULL, NULL, NULL, NULL); - ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError()); + ok(hwnd != NULL, "CreateWindowEx failed with error %ld\n", GetLastError());
/* no menu: getmenubarinfo should fail */ SetLastError(0xdeadbeef); @@ -247,10 +248,10 @@ static void test_getmenubarinfo(void)
/* create menubar, no items yet */ hmenu = CreateMenu(); - ok(hmenu != NULL, "CreateMenu failed with error %d\n", GetLastError()); + ok(hmenu != NULL, "CreateMenu failed with error %ld\n", GetLastError());
ret = SetMenu(hwnd, hmenu); - ok(ret, "SetMenu failed with error %d\n", GetLastError()); + ok(ret, "SetMenu failed with error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetMenuBarInfo(NULL, OBJID_CLIENT, 0, &mbi); @@ -285,7 +286,7 @@ static void test_getmenubarinfo(void) ok(err == 0xdeadbeef, "err = %d\n", err);
ret = GetMenuBarInfo(hwnd, OBJID_MENU, 0, &mbi); - ok(ret, "GetMenuBarInfo failed with error %d\n", GetLastError()); + ok(ret, "GetMenuBarInfo failed with error %ld\n", GetLastError());
ok(mbi.rcBar.left == 0 && mbi.rcBar.top == 0 && mbi.rcBar.bottom == 0 && mbi.rcBar.right == 0, "rcBar: Expected (0,0)-(0,0), got: %s\n", wine_dbgstr_rect(&mbi.rcBar)); @@ -300,7 +301,7 @@ static void test_getmenubarinfo(void) ret = AppendMenuA(hmenu, MF_STRING , 101, "item 2"); ok(ret, "AppendMenu failed.\n"); ret = SetMenu(hwnd, hmenu); - ok(ret, "SetMenu failed with error %d\n", GetLastError()); + ok(ret, "SetMenu failed with error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetMenuBarInfo(hwnd, OBJID_MENU, 200, &mbi); @@ -310,7 +311,7 @@ static void test_getmenubarinfo(void)
/* get info for the whole menu */ ret = GetMenuBarInfo(hwnd, OBJID_MENU, 0, &mbi); - ok(ret, "GetMenuBarInfo failed with error %d\n", GetLastError()); + ok(ret, "GetMenuBarInfo failed with error %ld\n", GetLastError());
/* calculate menu rectangle, from window rectangle and the position of the first item */ ret = GetWindowRect(hwnd, &rcw); @@ -319,7 +320,7 @@ static void test_getmenubarinfo(void) ok(ret, "GetMenuItemRect failed.\n"); todo_wine ok(mbi.rcBar.left == rci.left && mbi.rcBar.top == rci.top && mbi.rcBar.bottom == rci.bottom && mbi.rcBar.right == rcw.right - rci.left + rcw.left, - "rcBar: Got %s instead of (%d,%d)-(%d,%d)\n", wine_dbgstr_rect(&mbi.rcBar), + "rcBar: Got %s instead of (%ld,%ld)-(%ld,%ld)\n", wine_dbgstr_rect(&mbi.rcBar), rci.left, rci.top, rcw.right - rci.left + rcw.left, rci.bottom); ok(mbi.hMenu == hmenu, "hMenu: Got %p instead of %p\n", mbi.hMenu, hmenu); ok(mbi.fBarFocused == 0, "fBarFocused: got %d instead of 0\n", mbi.fBarFocused); @@ -327,7 +328,7 @@ static void test_getmenubarinfo(void)
/* get info for item nr.2 */ ret = GetMenuBarInfo(hwnd, OBJID_MENU, 2, &mbi); - ok(ret, "GetMenuBarInfo failed with error %d\n", GetLastError()); + ok(ret, "GetMenuBarInfo failed with error %ld\n", GetLastError()); ret = GetMenuItemRect(hwnd, hmenu, 1, &rci); ok(ret, "GetMenuItemRect failed.\n"); ok(EqualRect(&mbi.rcBar, &rci), "rcBar: Got %s instead of %s\n", wine_dbgstr_rect(&mbi.rcBar), @@ -352,21 +353,21 @@ static void test_GetMenuItemRect(void)
hwnd = CreateWindowW((LPCWSTR)MAKEINTATOM(atomMenuCheckClass), NULL, WS_OVERLAPPEDWINDOW, 0, 0, 100, 100, NULL, NULL, NULL, NULL); - ok(hwnd != NULL, "CreateWindow failed with error %d\n", GetLastError()); + ok(hwnd != NULL, "CreateWindow failed with error %ld\n", GetLastError()); hmenu = CreateMenu(); - ok(hmenu != NULL, "CreateMenu failed with error %d\n", GetLastError()); + ok(hmenu != NULL, "CreateMenu failed with error %ld\n", GetLastError()); popup_hmenu = CreatePopupMenu(); - ok(popup_hmenu != NULL, "CreatePopupMenu failed with error %d\n", GetLastError()); + ok(popup_hmenu != NULL, "CreatePopupMenu failed with error %ld\n", GetLastError()); ret = AppendMenuA(popup_hmenu, MF_STRING, 0, "Popup"); - ok(ret, "AppendMenu failed with error %d\n", GetLastError()); + ok(ret, "AppendMenu failed with error %ld\n", GetLastError()); ret = AppendMenuA(hmenu, MF_STRING | MF_POPUP, (UINT_PTR)popup_hmenu, "Menu"); - ok(ret, "AppendMenu failed with error %d\n", GetLastError()); + ok(ret, "AppendMenu failed with error %ld\n", GetLastError()); ret = SetMenu(hwnd, hmenu); - ok(ret, "SetMenu failed with error %d\n", GetLastError()); + ok(ret, "SetMenu failed with error %ld\n", GetLastError());
/* Get the menu item rectangle of the displayed sysmenu item */ ret = GetMenuItemRect(hwnd, hmenu, 0, &item_rect); - ok(ret, "GetMenuItemRect failed with error %d\n", GetLastError()); + ok(ret, "GetMenuItemRect failed with error %ld\n", GetLastError()); GetWindowRect(hwnd, &window_rect); /* Get the screen coordinate of the left top corner of the client rectangle */ client_top_left.x = 0; @@ -374,22 +375,22 @@ static void test_GetMenuItemRect(void) MapWindowPoints(hwnd, 0, &client_top_left, 1); caption_height = GetSystemMetrics(SM_CYFRAME) + GetSystemMetrics(SM_CYCAPTION);
- ok(item_rect.left == client_top_left.x, "Expect item_rect.left %d == %d\n", item_rect.left, client_top_left.x); - ok(item_rect.right <= window_rect.right, "Expect item_rect.right %d <= %d\n", item_rect.right, window_rect.right); + ok(item_rect.left == client_top_left.x, "Expect item_rect.left %ld == %ld\n", item_rect.left, client_top_left.x); + ok(item_rect.right <= window_rect.right, "Expect item_rect.right %ld <= %ld\n", item_rect.right, window_rect.right); /* A gap of 1 pixel is added deliberately in commit 75f9e64, so using equal operator would fail on Wine. * Check that top and bottom are correct with 1 pixel margin tolerance */ - ok(item_rect.top - (window_rect.top + caption_height) <= 1, "Expect item_rect.top %d - %d <= 1\n", item_rect.top, + ok(item_rect.top - (window_rect.top + caption_height) <= 1, "Expect item_rect.top %ld - %ld <= 1\n", item_rect.top, window_rect.top + caption_height); - ok(item_rect.bottom - (client_top_left.y - 1) <= 1, "Expect item_rect.bottom %d - %d <= 1\n", item_rect.bottom, + ok(item_rect.bottom - (client_top_left.y - 1) <= 1, "Expect item_rect.bottom %ld - %ld <= 1\n", item_rect.bottom, client_top_left.y - 1);
/* Get the item rectangle of the not yet displayed popup menu item. */ ret = GetMenuItemRect(hwnd, popup_hmenu, 0, &item_rect); - ok(ret, "GetMenuItemRect failed with error %d\n", GetLastError()); - ok(item_rect.left == client_top_left.x, "Expect item_rect.left %d == %d\n", item_rect.left, client_top_left.x); - ok(item_rect.right == client_top_left.x, "Expect item_rect.right %d == %d\n", item_rect.right, client_top_left.x); - ok(item_rect.top == client_top_left.y, "Expect item_rect.top %d == %d\n", item_rect.top, client_top_left.y); - ok(item_rect.bottom == client_top_left.y, "Expect item_rect.bottom %d == %d\n", item_rect.bottom, + ok(ret, "GetMenuItemRect failed with error %ld\n", GetLastError()); + ok(item_rect.left == client_top_left.x, "Expect item_rect.left %ld == %ld\n", item_rect.left, client_top_left.x); + ok(item_rect.right == client_top_left.x, "Expect item_rect.right %ld == %ld\n", item_rect.right, client_top_left.x); + ok(item_rect.top == client_top_left.y, "Expect item_rect.top %ld == %ld\n", item_rect.top, client_top_left.y); + ok(item_rect.bottom == client_top_left.y, "Expect item_rect.bottom %ld == %ld\n", item_rect.bottom, client_top_left.y);
DestroyWindow(hwnd); @@ -410,7 +411,7 @@ static void test_system_menu(void) hwnd = CreateWindowExA(0, (LPCSTR)MAKEINTATOM(atomMenuCheckClass), NULL, WS_SYSMENU | WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, 100, 100, NULL, NULL, NULL, NULL); - ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError()); + ok(hwnd != NULL, "CreateWindowEx failed with error %ld\n", GetLastError()); menu = GetSystemMenu( hwnd, FALSE ); ok( menu != NULL, "no system menu\n" );
@@ -533,7 +534,7 @@ static void test_system_menu(void) /* now a normal (non-system) menu */
menu = CreateMenu(); - ok( menu != NULL, "CreateMenu failed with error %d\n", GetLastError() ); + ok( menu != NULL, "CreateMenu failed with error %ld\n", GetLastError() );
res = CheckMenuItem( menu, SC_TASKLIST, 0 ); ok( res == -1, "CheckMenuItem succeeded\n" ); @@ -544,9 +545,9 @@ static void test_system_menu(void) ret = RemoveMenu( menu, SC_TASKLIST, 0 ); ok( !ret, "RemoveMenu succeeded\n" ); ret = ModifyMenuA( menu, SC_TASKLIST, 0, SC_TASKLIST, "test" ); - ok( ret, "ModifyMenuA failed err %d\n", GetLastError() ); + ok( ret, "ModifyMenuA failed err %ld\n", GetLastError() ); ret = ModifyMenuW( menu, SC_TASKLIST, 0, SC_TASKLIST, testW ); - ok( ret, "ModifyMenuW failed err %d\n", GetLastError() ); + ok( ret, "ModifyMenuW failed err %ld\n", GetLastError() ); ret = ModifyMenuA( menu, SC_TASKLIST-1, 0, SC_TASKLIST, "test" ); ok( !ret, "ModifyMenu succeeded on SC_TASKLIST-1\n" ); strcpy( buffer, "test" ); @@ -589,18 +590,18 @@ static void test_menu_locked_by_window(void) HWND hwnd = CreateWindowExA(0, (LPCSTR)MAKEINTATOM(atomMenuCheckClass), NULL, WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, 200, 200, NULL, NULL, NULL, NULL); - ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError()); + ok(hwnd != NULL, "CreateWindowEx failed with error %ld\n", GetLastError()); hmenu = CreateMenu(); - ok(hmenu != NULL, "CreateMenu failed with error %d\n", GetLastError()); + ok(hmenu != NULL, "CreateMenu failed with error %ld\n", GetLastError()); ret = InsertMenuA(hmenu, 0, MF_STRING, 0, "&Test"); - ok(ret, "InsertMenu failed with error %d\n", GetLastError()); + ok(ret, "InsertMenu failed with error %ld\n", GetLastError()); ret = SetMenu(hwnd, hmenu); - ok(ret, "SetMenu failed with error %d\n", GetLastError()); + ok(ret, "SetMenu failed with error %ld\n", GetLastError()); ret = DestroyMenu(hmenu); - ok(ret, "DestroyMenu failed with error %d\n", GetLastError()); + ok(ret, "DestroyMenu failed with error %ld\n", GetLastError());
ret = DrawMenuBar(hwnd); - ok(ret, "DrawMenuBar failed with error %d\n", GetLastError()); + ok(ret, "DrawMenuBar failed with error %ld\n", GetLastError()); ret = IsMenu(GetMenu(hwnd)); ok(!ret || broken(ret) /* nt4 */, "Menu handle should have been destroyed\n");
@@ -645,38 +646,38 @@ static void test_subpopup_locked_by_menu(void) hwnd = CreateWindowExA(0, (LPCSTR)MAKEINTATOM(atomMenuCheckClass), NULL, WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, 200, 200, NULL, NULL, NULL, NULL); - 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) subpopuplocked_wnd_proc); hmenu = CreatePopupMenu(); - ok(hmenu != NULL, "CreateMenu failed with error %d\n", GetLastError()); + ok(hmenu != NULL, "CreateMenu failed with error %ld\n", GetLastError()); hsubmenu = CreatePopupMenu(); - ok(hsubmenu != NULL, "CreateMenu failed with error %d\n", GetLastError()); + ok(hsubmenu != NULL, "CreateMenu failed with error %ld\n", GetLastError()); ret = InsertMenuA(hmenu, 0, MF_BYPOSITION | MF_POPUP | MF_STRING, (UINT_PTR)hsubmenu, "PopUpLockTest"); - ok(ret, "InsertMenu failed with error %d\n", GetLastError()); + ok(ret, "InsertMenu failed with error %ld\n", GetLastError()); ret = InsertMenuA(hsubmenu, 0, MF_BYPOSITION | MF_STRING, itemid, "PopUpMenu"); - ok(ret, "InsertMenu failed with error %d\n", GetLastError()); + ok(ret, "InsertMenu failed with error %ld\n", GetLastError()); /* first some tests that all this functions properly */ mii.fMask = MIIM_SUBMENU; ret = GetMenuItemInfoA( hmenu, 0, TRUE, &mii); - ok( ret, "GetMenuItemInfo failed error %d\n", GetLastError()); + ok( ret, "GetMenuItemInfo failed error %ld\n", GetLastError()); ok( mii.hSubMenu == hsubmenu, "submenu is %p\n", mii.hSubMenu); mi.fMask |= MIM_STYLE; ret = GetMenuInfo( hsubmenu, &mi); - ok( ret , "GetMenuInfo returned 0 with error %d\n", GetLastError()); + ok( ret , "GetMenuInfo returned 0 with error %ld\n", GetLastError()); ret = IsMenu( hsubmenu); ok( ret , "Menu handle is not valid\n");
ret = TrackPopupMenu( hmenu, TPM_RETURNCMD, 100,100, 0, hwnd, NULL); - ok( ret == itemid , "TrackPopupMenu returned %d error is %d\n", ret, GetLastError()); + ok( ret == itemid , "TrackPopupMenu returned %d error is %ld\n", ret, GetLastError());
/* then destroy the sub-popup */ ret = DestroyMenu( hsubmenu); - ok(ret, "DestroyMenu failed with error %d\n", GetLastError()); + ok(ret, "DestroyMenu failed with error %ld\n", GetLastError()); /* and repeat the tests */ mii.fMask = MIIM_SUBMENU; ret = GetMenuItemInfoA( hmenu, 0, TRUE, &mii); - ok( ret, "GetMenuItemInfo failed error %d\n", GetLastError()); + ok( ret, "GetMenuItemInfo failed error %ld\n", GetLastError()); /* GetMenuInfo fails now */ ok( mii.hSubMenu == hsubmenu, "submenu is %p\n", mii.hSubMenu); mi.fMask |= MIM_STYLE; @@ -689,7 +690,7 @@ static void test_subpopup_locked_by_menu(void) /* but TrackPopupMenu still works! */ ret = TrackPopupMenu( hmenu, TPM_RETURNCMD, 100,100, 0, hwnd, NULL); todo_wine { - ok( ret == itemid , "TrackPopupMenu returned %d error is %d\n", ret, GetLastError()); + ok( ret == itemid , "TrackPopupMenu returned %d error is %ld\n", ret, GetLastError()); }
/* clean up */ @@ -707,11 +708,11 @@ static void test_menu_ownerdraw(void) HWND hwnd = CreateWindowExA(0, (LPCSTR)MAKEINTATOM(atomMenuCheckClass), NULL, WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, 200, 200, NULL, NULL, NULL, NULL); - ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError()); + ok(hwnd != NULL, "CreateWindowEx failed with error %ld\n", GetLastError()); if( !hwnd) return; SetWindowLongPtrA( hwnd, GWLP_WNDPROC, (LONG_PTR)menu_ownerdraw_wnd_proc); hmenu = CreatePopupMenu(); - ok(hmenu != NULL, "CreateMenu failed with error %d\n", GetLastError()); + ok(hmenu != NULL, "CreateMenu failed with error %ld\n", GetLastError()); if( !hmenu) { DestroyWindow(hwnd);return;} k=0; for( j=0;j<2;j++) /* create columns */ @@ -731,11 +732,11 @@ static void test_menu_ownerdraw(void) "item rectangles are not separated by 4 pixels space\n"); /* height should be what the MEASUREITEM message has returned */ ok( MOD_rc[0].bottom - MOD_rc[0].top == MOD_SIZE, - "menu item has wrong height: %d should be %d\n", + "menu item has wrong height: %ld should be %d\n", MOD_rc[0].bottom - MOD_rc[0].top, MOD_SIZE); /* no gaps between the rows */ ok( MOD_rc[0].bottom - MOD_rc[1].top == 0, - "There should not be a space between the rows, gap is %d\n", + "There should not be a space between the rows, gap is %ld\n", MOD_rc[0].bottom - MOD_rc[1].top); /* test the correct value of the item height that was sent * by the WM_MEASUREITEM message */ @@ -751,15 +752,15 @@ static void test_menu_ownerdraw(void) TrackPopupMenu( hmenu, TPM_RETURNCMD, 100,100, 0, hwnd, NULL); /* left should be 4 pixels less now */ ok( leftcol == MOD_rc[0].left + 4, - "columns should be 4 pixels to the left (actual %d).\n", + "columns should be 4 pixels to the left (actual %ld).\n", leftcol - MOD_rc[0].left); /* test width */ ok( MOD_rc[0].right - MOD_rc[0].left == 2 * MOD_avec + MOD_SIZE, - "width of owner drawn menu item is wrong. Got %d expected %d\n", + "width of owner drawn menu item is wrong. Got %ld expected %d\n", MOD_rc[0].right - MOD_rc[0].left , 2*MOD_avec + MOD_SIZE); /* and height */ ok( MOD_rc[0].bottom - MOD_rc[0].top == MOD_SIZE, - "Height is incorrect. Got %d expected %d\n", + "Height is incorrect. Got %ld expected %d\n", MOD_rc[0].bottom - MOD_rc[0].top, MOD_SIZE);
/* test owner-drawn callback bitmap */ @@ -776,9 +777,9 @@ static void test_menu_ownerdraw(void)
/* test width/height of an ownerdraw menu bar as well */ ret = DestroyMenu(hmenu); - ok(ret, "DestroyMenu failed with error %d\n", GetLastError()); + ok(ret, "DestroyMenu failed with error %ld\n", GetLastError()); hmenu = CreateMenu(); - ok(hmenu != NULL, "CreateMenu failed with error %d\n", GetLastError()); + ok(hmenu != NULL, "CreateMenu failed with error %ld\n", GetLastError()); if( !hmenu) { DestroyWindow(hwnd);return;} MOD_maxid=1; for(i=0;i<2;i++) { @@ -787,19 +788,19 @@ static void test_menu_ownerdraw(void) } ret = SetMenu( hwnd, hmenu); UpdateWindow( hwnd); /* hack for wine to draw the window + menu */ - ok(ret, "SetMenu failed with error %d\n", GetLastError()); + ok(ret, "SetMenu failed with error %ld\n", GetLastError()); /* test width */ ok( MOD_rc[0].right - MOD_rc[0].left == 2 * MOD_avec + MOD_SIZE, - "width of owner drawn menu item is wrong. Got %d expected %d\n", + "width of owner drawn menu item is wrong. Got %ld expected %d\n", MOD_rc[0].right - MOD_rc[0].left , 2*MOD_avec + MOD_SIZE); /* test height */ ok( MOD_rc[0].bottom - MOD_rc[0].top == GetSystemMetrics( SM_CYMENU) - 1, - "Height of owner drawn menu item is wrong. Got %d expected %d\n", + "Height of owner drawn menu item is wrong. Got %ld expected %d\n", MOD_rc[0].bottom - MOD_rc[0].top, GetSystemMetrics( SM_CYMENU) - 1);
/* clean up */ ret = DestroyMenu(hmenu); - ok(ret, "DestroyMenu failed with error %d\n", GetLastError()); + ok(ret, "DestroyMenu failed with error %ld\n", GetLastError()); DestroyWindow(hwnd); }
@@ -841,12 +842,12 @@ static void test_mbs_help( int ispop, int hassub, int mnuopt, mii.hbmpItem = hbmp; } submenu = CreateMenu(); - ok( submenu != 0, "CreateMenu failed with error %d\n", GetLastError()); + ok( submenu != 0, "CreateMenu failed with error %ld\n", GetLastError()); if( ispop) hmenu = CreatePopupMenu(); else hmenu = CreateMenu(); - ok( hmenu != 0, "Create{Popup}Menu failed with error %d\n", GetLastError()); + ok( hmenu != 0, "Create{Popup}Menu failed with error %ld\n", GetLastError()); if( hassub) { mii.fMask |= MIIM_SUBMENU; mii.hSubMenu = submenu; @@ -857,10 +858,10 @@ static void test_mbs_help( int ispop, int hassub, int mnuopt, GetMenuInfo( hmenu, &mi); if( mnuopt) mi.dwStyle |= mnuopt == 1 ? MNS_NOCHECK : MNS_CHECKORBMP; ret = SetMenuInfo( hmenu, &mi); - ok( ret, "SetMenuInfo failed with error %d\n", GetLastError()); + ok( ret, "SetMenuInfo failed with error %ld\n", GetLastError()); } ret = InsertMenuItemA( hmenu, 0, FALSE, &mii); - ok( ret, "InsertMenuItem failed with error %d\n", GetLastError()); + ok( ret, "InsertMenuItem failed with error %ld\n", GetLastError()); failed = !ret; if( winetest_debug) { HDC hdc=GetDC(hwnd); @@ -876,11 +877,11 @@ static void test_mbs_help( int ispop, int hassub, int mnuopt, TrackPopupMenu( hmenu, TPM_RETURNCMD, 100,100, 0, hwnd, NULL); else { ret = SetMenu( hwnd, hmenu); - ok(ret, "SetMenu failed with error %d\n", GetLastError()); + ok(ret, "SetMenu failed with error %ld\n", GetLastError()); DrawMenuBar( hwnd); } ret = GetMenuItemRect( hwnd, hmenu, 0, &rc); - ok(ret, "GetMenuItemRect failed with error %d\n", GetLastError()); + ok(ret, "GetMenuItemRect failed with error %ld\n", GetLastError());
if (0) /* comment out menu size checks, behavior is different in almost every Windows version */ /* the tests should however succeed on win2000, XP and Wine (at least up to 1.1.15) */ @@ -902,7 +903,7 @@ static void test_mbs_help( int ispop, int hassub, int mnuopt, ( hbmp ? (text ? 2:0) + bmpsize.cx : 0 ) + (text ? 2 * MOD_avec + (text[0] ? size.cx :0): 0) ; ok( rc.right - rc.left == expect, - "menu width wrong, got %d expected %d\n", rc.right - rc.left, expect); + "menu width wrong, got %ld expected %d\n", rc.right - rc.left, expect); failed = failed || !(rc.right - rc.left == expect); /* check menu height */ if( ispop) @@ -917,7 +918,7 @@ static void test_mbs_help( int ispop, int hassub, int mnuopt, expect = ( !(text || hbmp) ? GetSystemMetrics( SM_CYMENUSIZE)/2 : max( GetSystemMetrics( SM_CYMENU) - 1, (hbmp ? bmpsize.cy : 0))); ok( rc.bottom - rc.top == expect, - "menu height wrong, got %d expected %d (%d)\n", + "menu height wrong, got %ld expected %d (%d)\n", rc.bottom - rc.top, expect, GetSystemMetrics( SM_CYMENU)); failed = failed || !(rc.bottom - rc.top == expect); if( hbmp == HBMMENU_CALLBACK && MOD_GotDrawItemMsg) { @@ -932,18 +933,18 @@ static void test_mbs_help( int ispop, int hassub, int mnuopt, else /* mnuopt == 2 */ expect = 2; ok( expect == MOD_rc[0].left, - "bitmap left is %d expected %d\n", MOD_rc[0].left, expect); + "bitmap left is %ld expected %d\n", MOD_rc[0].left, expect); failed = failed || !(expect == MOD_rc[0].left); /* vertical */ expect = (rc.bottom - rc.top - MOD_rc[0].bottom + MOD_rc[0].top) / 2; ok( expect == MOD_rc[0].top, - "bitmap top is %d expected %d\n", MOD_rc[0].top, expect); + "bitmap top is %ld expected %d\n", MOD_rc[0].top, expect); failed = failed || !(expect == MOD_rc[0].top); } } /* if there was a failure, report details */ if( failed) { - trace("*** count %d %s text "%s" bitmap %p bmsize %d,%d textsize %d+%d,%d mnuopt %d hastab %d\n", + trace("*** count %d %s text "%s" bitmap %p bmsize %ld,%ld textsize %ld+%ld,%ld mnuopt %d hastab %d\n", count, (ispop? "POPUP": "MENUBAR"),text ? text: "(nil)", hbmp, bmpsize.cx, bmpsize.cy, size.cx, size.cy, sc_size.cx, mnuopt, hastab); trace(" check %d,%d arrow %d avechar %d\n", @@ -954,9 +955,9 @@ static void test_mbs_help( int ispop, int hassub, int mnuopt, } /* clean up */ ret = DestroyMenu(submenu); - ok(ret, "DestroyMenu failed with error %d\n", GetLastError()); + ok(ret, "DestroyMenu failed with error %ld\n", GetLastError()); ret = DestroyMenu(hmenu); - ok(ret, "DestroyMenu failed with error %d\n", GetLastError()); + ok(ret, "DestroyMenu failed with error %ld\n", GetLastError()); }
@@ -980,21 +981,21 @@ static void test_menu_bmp_and_string(void) hbm_arrow = LoadBitmapA( 0, (LPCSTR)OBM_MNARROW); GetObjectA( hbm_arrow, sizeof(bm), &bm); arrowwidth = bm.bmWidth; - ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError()); + ok(hwnd != NULL, "CreateWindowEx failed with error %ld\n", GetLastError()); if( !hwnd) return; /* test system menu */ hsysmenu = GetSystemMenu( hwnd, FALSE); - ok( hsysmenu != NULL, "GetSystemMenu failed with error %d\n", GetLastError()); + ok( hsysmenu != NULL, "GetSystemMenu failed with error %ld\n", GetLastError()); mi.fMask = MIM_STYLE; mi.dwStyle = 0; got = GetMenuInfo( hsysmenu, &mi); - ok( got, "GetMenuInfo failed gle=%d\n", GetLastError()); - ok( MNS_CHECKORBMP == mi.dwStyle, "System Menu Style is %08x, without the bit %08x\n", + ok( got, "GetMenuInfo failed gle=%ld\n", GetLastError()); + ok( MNS_CHECKORBMP == mi.dwStyle, "System Menu Style is %08lx, without the bit %08x\n", mi.dwStyle, MNS_CHECKORBMP); mii.fMask = MIIM_BITMAP; mii.hbmpItem = NULL; got = GetMenuItemInfoA( hsysmenu, SC_CLOSE, FALSE, &mii); - ok( got, "GetMenuItemInfoA failed gle=%d\n", GetLastError()); + ok( got, "GetMenuItemInfoA failed gle=%ld\n", GetLastError()); ok( HBMMENU_POPUP_CLOSE == mii.hbmpItem, "Item info did not get the right hbitmap: got %p expected %p\n", mii.hbmpItem, HBMMENU_POPUP_CLOSE);
@@ -1010,7 +1011,7 @@ static void test_menu_bmp_and_string(void) ok(mii.fState == MF_ENABLED, "expected MF_ENABLED, got %#x\n", mii.fState); ok(mii.wID == SC_RESTORE, "expected SC_RESTORE, got %#x\n", mii.wID); ok(mii.hSubMenu == 0, "expected 0, got %p\n", mii.hSubMenu); - ok(mii.dwItemData == 0, "expected 0, got %#lx\n", mii.dwItemData); + ok(mii.dwItemData == 0, "expected 0, got %#Ix\n", mii.dwItemData); ok(mii.dwTypeData == (LPSTR)bmfill, "expected %p, got %p\n", bmfill, mii.dwTypeData); ok(mii.cch != 0, "cch should not be 0\n"); ok(mii.hbmpItem == HBMMENU_POPUP_RESTORE, "expected HBMMENU_POPUP_RESTORE, got %p\n", mii.hbmpItem); @@ -1024,7 +1025,7 @@ static void test_menu_bmp_and_string(void) ok(mii.fState == MF_ENABLED, "expected MF_ENABLED, got %#x\n", mii.fState); ok(mii.wID == SC_RESTORE, "expected SC_RESTORE, got %#x\n", mii.wID); ok(mii.hSubMenu == 0, "expected 0, got %p\n", mii.hSubMenu); - ok(mii.dwItemData == 0, "expected 0, got %#lx\n", mii.dwItemData); + ok(mii.dwItemData == 0, "expected 0, got %#Ix\n", mii.dwItemData); ok(mii.dwTypeData == (LPSTR)bmfill, "expected %p, got %p\n", bmfill, mii.dwTypeData); ok(mii.cch != 0, "cch should not be 0\n"); ok(mii.hbmpItem == HBMMENU_POPUP_CLOSE, "expected HBMMENU_POPUP_CLOSE, got %p\n", mii.hbmpItem); @@ -1043,7 +1044,7 @@ static void test_menu_bmp_and_string(void) for( szidx=0; szidx < ARRAY_SIZE(bmsizes); szidx++) { HBITMAP hbm = CreateBitmap( bmsizes[szidx].cx, bmsizes[szidx].cy,1,1,bmfill); HBITMAP bitmaps[] = { HBMMENU_CALLBACK, hbm, HBMMENU_POPUP_CLOSE, NULL }; - ok( hbm != 0, "CreateBitmap failed err %d\n", GetLastError()); + ok( hbm != 0, "CreateBitmap failed err %ld\n", GetLastError()); for( txtidx = 0; txtidx < ARRAY_SIZE(MOD_txtsizes); txtidx++) { for( hassub = 0; hassub < 2 ; hassub++) { /* add submenu item */ for( mnuopt = 0; mnuopt < 3 ; mnuopt++){ /* test MNS_NOCHECK/MNS_CHECKORBMP */ @@ -1227,7 +1228,7 @@ static void insert_menu_item( int line, HMENU hmenu, BOOL ansi, UINT mask, UINT if (ansi) ret = InsertMenuItemA( hmenu, 0, TRUE, &info ); else ret = InsertMenuItemW( hmenu, 0, TRUE, (MENUITEMINFOW*)&info ); if (!expect) ok_(__FILE__, line)( !ret, "InsertMenuItem should have failed.\n" ); - else ok_(__FILE__, line)( ret, "InsertMenuItem failed, err %u\n", GetLastError()); + else ok_(__FILE__, line)( ret, "InsertMenuItem failed, err %lu\n", GetLastError()); }
static void check_menu_item_info( int line, HMENU hmenu, BOOL ansi, UINT mask, UINT type, UINT state, @@ -1253,7 +1254,7 @@ static void check_menu_item_info( int line, HMENU hmenu, BOOL ansi, UINT mask, U ok_(__FILE__, line)( !ret, "GetMenuItemInfo should have failed.\n" ); return; } - ok_(__FILE__, line)( ret, "GetMenuItemInfo failed, err %u\n", GetLastError()); + ok_(__FILE__, line)( ret, "GetMenuItemInfo failed, err %lu\n", GetLastError()); if (mask & MIIM_TYPE) ok_(__FILE__, line)( info.fType == type || info.fType == LOWORD(type), "wrong type %x/%x\n", info.fType, type ); @@ -1275,7 +1276,7 @@ static void check_menu_item_info( int line, HMENU hmenu, BOOL ansi, UINT mask, U } if (mask & MIIM_DATA) ok_(__FILE__, line)( info.dwItemData == data || info.dwItemData == LOWORD(data), - "wrong item data %lx/%lx\n", info.dwItemData, data ); + "wrong item data %Ix/%Ix\n", info.dwItemData, data ); if (mask & MIIM_BITMAP) ok_(__FILE__, line)( info.hbmpItem == item || (ULONG_PTR)info.hbmpItem == LOWORD(item), "wrong bmpitem %p/%p\n", info.hbmpItem, item ); @@ -1297,7 +1298,7 @@ static void check_menu_item_info( int line, HMENU hmenu, BOOL ansi, UINT mask, U ret = ansi ? GetMenuStringA( hmenu, 0, (char *)buffer, 80, MF_BYPOSITION ) : GetMenuStringW( hmenu, 0, buffer, 80, MF_BYPOSITION ); if (expstring) - ok_(__FILE__, line)( ret, "GetMenuString failed, err %u\n", GetLastError()); + ok_(__FILE__, line)( ret, "GetMenuString failed, err %lu\n", GetLastError()); else ok_(__FILE__, line)( !ret, "GetMenuString should have failed\n" ); } @@ -1310,7 +1311,7 @@ static void modify_menu( int line, HMENU hmenu, BOOL ansi, UINT flags, UINT_PTR SetLastError( 0xdeadbeef ); if (ansi) ret = ModifyMenuA( hmenu, 0, flags, id, data ); else ret = ModifyMenuW( hmenu, 0, flags, id, data ); - ok_(__FILE__,line)( ret, "ModifyMenuA failed, err %u\n", GetLastError()); + ok_(__FILE__,line)( ret, "ModifyMenuA failed, err %lu\n", GetLastError()); }
static void set_menu_item_info( int line, HMENU hmenu, BOOL ansi, UINT mask, UINT type, UINT state, @@ -1340,7 +1341,7 @@ static void set_menu_item_info( int line, HMENU hmenu, BOOL ansi, UINT mask, UIN SetLastError( 0xdeadbeef ); if (ansi) ret = SetMenuItemInfoA( hmenu, 0, TRUE, &info ); else ret = SetMenuItemInfoW( hmenu, 0, TRUE, (MENUITEMINFOW*)&info ); - ok_(__FILE__, line)( ret, "SetMenuItemInfo failed, err %u\n", GetLastError()); + ok_(__FILE__, line)( ret, "SetMenuItemInfo failed, err %lu\n", GetLastError()); }
#define TMII_INSMI( c1,d1,e1,f1,g1,h1,i1,j1,k1,l1,m1,eret1 )\ @@ -2551,14 +2552,14 @@ static void test_menu_hilitemenuitem( void ) } ok(GetLastError() == 0xdeadbeef || /* 9x */ GetLastError() == ERROR_INVALID_WINDOW_HANDLE /* NT */, - "HiliteMenuItem: expected error ERROR_INVALID_WINDOW_HANDLE, got: %d\n", GetLastError()); + "HiliteMenuItem: expected error ERROR_INVALID_WINDOW_HANDLE, got: %ld\n", GetLastError());
SetLastError(0xdeadbeef); ok(!HiliteMenuItem(hWnd, NULL, 1, MF_HILITE | MF_BYPOSITION), "HiliteMenuItem: call should have failed.\n"); ok(GetLastError() == 0xdeadbeef || /* 9x */ GetLastError() == ERROR_INVALID_MENU_HANDLE /* NT */, - "HiliteMenuItem: expected error ERROR_INVALID_MENU_HANDLE, got: %d\n", GetLastError()); + "HiliteMenuItem: expected error ERROR_INVALID_MENU_HANDLE, got: %ld\n", GetLastError());
ok(!(GetMenuState(hPopupMenu, 1, MF_BYPOSITION) & MF_HILITE), "HiliteMenuItem: Item 2 is hilited\n"); @@ -2569,7 +2570,7 @@ static void test_menu_hilitemenuitem( void ) ok(HiliteMenuItem(hWnd, hPopupMenu, 1, MF_BYPOSITION), "HiliteMenuItem: call should have succeeded.\n"); ok(GetLastError() == 0xdeadbeef, - "HiliteMenuItem: expected error 0xdeadbeef, got: %d\n", GetLastError()); + "HiliteMenuItem: expected error 0xdeadbeef, got: %ld\n", GetLastError());
ok(!(GetMenuState(hPopupMenu, 1, MF_BYPOSITION) & MF_HILITE), "HiliteMenuItem: Item 2 is hilited\n"); @@ -2581,7 +2582,7 @@ static void test_menu_hilitemenuitem( void ) "HiliteMenuItem: call should have succeeded.\n"); } ok(GetLastError() == 0xdeadbeef, - "HiliteMenuItem: expected error 0xdeadbeef, got: %d\n", GetLastError()); + "HiliteMenuItem: expected error 0xdeadbeef, got: %ld\n", GetLastError());
ok(!(GetMenuState(hPopupMenu, 1, MF_BYPOSITION) & MF_HILITE), "HiliteMenuItem: Item 2 is hilited\n"); @@ -2592,7 +2593,7 @@ static void test_menu_hilitemenuitem( void ) ok(HiliteMenuItem(hWnd, hPopupMenu, 1, MF_HILITE | MF_BYPOSITION), "HiliteMenuItem: call should not have failed.\n"); ok(GetLastError() == 0xdeadbeef, - "HiliteMenuItem: expected error 0xdeadbeef, got: %d\n", GetLastError()); + "HiliteMenuItem: expected error 0xdeadbeef, got: %ld\n", GetLastError());
todo_wine { @@ -2606,7 +2607,7 @@ static void test_menu_hilitemenuitem( void ) ok(HiliteMenuItem(hWnd, hPopupMenu, 1, MF_UNHILITE | MF_BYPOSITION), "HiliteMenuItem: call should not have failed.\n"); ok(GetLastError() == 0xdeadbeef, - "HiliteMenuItem: expected error 0xdeadbeef, got: %d\n", GetLastError()); + "HiliteMenuItem: expected error 0xdeadbeef, got: %ld\n", GetLastError());
ok(!(GetMenuState(hPopupMenu, 1, MF_BYPOSITION) & MF_HILITE), "HiliteMenuItem: Item 2 is hilited\n"); @@ -2617,7 +2618,7 @@ static void test_menu_hilitemenuitem( void ) ok(HiliteMenuItem(hWnd, hPopupMenu, 103, MF_HILITE | MF_BYCOMMAND), "HiliteMenuItem: call should not have failed.\n"); ok(GetLastError() == 0xdeadbeef, - "HiliteMenuItem: expected error 0xdeadbeef, got: %d\n", GetLastError()); + "HiliteMenuItem: expected error 0xdeadbeef, got: %ld\n", GetLastError());
todo_wine { @@ -2631,7 +2632,7 @@ static void test_menu_hilitemenuitem( void ) ok(HiliteMenuItem(hWnd, hPopupMenu, 103, MF_UNHILITE | MF_BYCOMMAND), "HiliteMenuItem: call should not have failed.\n"); ok(GetLastError() == 0xdeadbeef, - "HiliteMenuItem: expected error 0xdeadbeef, got: %d\n", GetLastError()); + "HiliteMenuItem: expected error 0xdeadbeef, got: %ld\n", GetLastError());
ok(!(GetMenuState(hPopupMenu, 2, MF_BYPOSITION) & MF_HILITE), "HiliteMenuItem: Item 3 is hilited\n"); @@ -2797,7 +2798,7 @@ static void test_menu_resource_layout(void) BOOL ret;
hmenu = LoadMenuIndirectA(&menu_template); - ok(hmenu != 0, "LoadMenuIndirect error %u\n", GetLastError()); + ok(hmenu != 0, "LoadMenuIndirect error %lu\n", GetLastError());
ret = AppendMenuA(hmenu, MF_STRING, 6, NULL); ok(ret, "AppendMenu failed\n"); @@ -2860,7 +2861,7 @@ static HMENU create_menu_from_data(const struct menu_data *item, INT item_count) { SetLastError(0xdeadbeef); ret = AppendMenuA(hmenu, item[i].type, item[i].id, item[i].str); - ok(ret, "%d: AppendMenu(%04x, %04x, %p) error %u\n", + ok(ret, "%d: AppendMenu(%04x, %04x, %p) error %lu\n", i, item[i].type, item[i].id, item[i].str, GetLastError()); } return hmenu; @@ -2902,7 +2903,7 @@ static HMENU create_menuitem_from_data(const struct menu_data *item, INT item_co if( item[i].type & MF_HELP) mii.fType |= MF_HELP; mii.wID = item[i].id; ret = InsertMenuItemA( hmenu, -1, TRUE, &mii); - ok(ret, "%d: InsertMenuItem(%04x, %04x, %p) error %u\n", + ok(ret, "%d: InsertMenuItem(%04x, %04x, %p) error %lu\n", i, item[i].type, item[i].id, item[i].str, GetLastError()); } return hmenu; @@ -3086,7 +3087,7 @@ static void test_menu_getmenuinfo(void) ok( !ret, "GetMenuInfo() should have failed\n"); ok( gle == ERROR_INVALID_PARAMETER || broken(gle == 0xdeadbeef), /* Win98, WinME */ - "GetMenuInfo() error got %u expected %u\n", gle, ERROR_INVALID_PARAMETER); + "GetMenuInfo() error got %lu expected %u\n", gle, ERROR_INVALID_PARAMETER); SetLastError(0xdeadbeef); mi.cbSize = 0; ret = GetMenuInfo( hmenu, &mi); @@ -3094,13 +3095,13 @@ static void test_menu_getmenuinfo(void) ok( !ret, "GetMenuInfo() should have failed\n"); ok( gle == ERROR_INVALID_PARAMETER || broken(gle == 0xdeadbeef), /* Win98, WinME */ - "GetMenuInfo() error got %u expected %u\n", gle, ERROR_INVALID_PARAMETER); + "GetMenuInfo() error got %lu expected %u\n", gle, ERROR_INVALID_PARAMETER); SetLastError(0xdeadbeef); mi.cbSize = sizeof( MENUINFO); ret = GetMenuInfo( hmenu, &mi); gle= GetLastError(); ok( ret, "GetMenuInfo() should have succeeded\n"); - ok( gle == 0xdeadbeef, "GetMenuInfo() error got %u\n", gle); + ok( gle == 0xdeadbeef, "GetMenuInfo() error got %lu\n", gle); SetLastError(0xdeadbeef); mi.cbSize = 0; ret = GetMenuInfo( NULL, &mi); @@ -3108,7 +3109,7 @@ static void test_menu_getmenuinfo(void) ok( !ret, "GetMenuInfo() should have failed\n"); ok( gle == ERROR_INVALID_PARAMETER || broken(gle == 0xdeadbeef), /* Win98, WinME */ - "GetMenuInfo() error got %u expected %u\n", gle, ERROR_INVALID_PARAMETER); + "GetMenuInfo() error got %lu expected %u\n", gle, ERROR_INVALID_PARAMETER); /* clean up */ DestroyMenu( hmenu); return; @@ -3130,7 +3131,7 @@ static void test_menu_setmenuinfo(void) mii.fMask = MIIM_SUBMENU; mii.hSubMenu = hsubmenu; ret = InsertMenuItemA( hmenu, 0, FALSE, &mii); - ok( ret, "InsertMenuItem failed with error %d\n", GetLastError()); + ok( ret, "InsertMenuItem failed with error %ld\n", GetLastError()); /* test some parameter errors */ SetLastError(0xdeadbeef); ret = SetMenuInfo( hmenu, NULL); @@ -3138,7 +3139,7 @@ static void test_menu_setmenuinfo(void) ok( !ret, "SetMenuInfo() should have failed\n"); ok( gle == ERROR_INVALID_PARAMETER || broken(gle == 0xdeadbeef), /* Win98, WinME */ - "SetMenuInfo() error got %u expected %u\n", gle, ERROR_INVALID_PARAMETER); + "SetMenuInfo() error got %lu expected %u\n", gle, ERROR_INVALID_PARAMETER); SetLastError(0xdeadbeef); mi.cbSize = 0; ret = SetMenuInfo( hmenu, &mi); @@ -3146,13 +3147,13 @@ static void test_menu_setmenuinfo(void) ok( !ret, "SetMenuInfo() should have failed\n"); ok( gle == ERROR_INVALID_PARAMETER || broken(gle == 0xdeadbeef), /* Win98, WinME */ - "SetMenuInfo() error got %u expected %u\n", gle, ERROR_INVALID_PARAMETER); + "SetMenuInfo() error got %lu expected %u\n", gle, ERROR_INVALID_PARAMETER); SetLastError(0xdeadbeef); mi.cbSize = sizeof( MENUINFO); ret = SetMenuInfo( hmenu, &mi); gle= GetLastError(); ok( ret, "SetMenuInfo() should have succeeded\n"); - ok( gle == 0xdeadbeef, "SetMenuInfo() error got %u\n", gle); + ok( gle == 0xdeadbeef, "SetMenuInfo() error got %lu\n", gle); SetLastError(0xdeadbeef); mi.cbSize = 0; ret = SetMenuInfo( NULL, &mi); @@ -3160,7 +3161,7 @@ static void test_menu_setmenuinfo(void) ok( !ret, "SetMenuInfo() should have failed\n"); ok( gle == ERROR_INVALID_PARAMETER || broken(gle == 0xdeadbeef), /* Win98, WinME */ - "SetMenuInfo() error got %u expected %u\n", gle, ERROR_INVALID_PARAMETER); + "SetMenuInfo() error got %lu expected %u\n", gle, ERROR_INVALID_PARAMETER); /* functional tests */ /* menu and submenu should have the CHECKORBMP style bit cleared */ SetLastError(0xdeadbeef); @@ -3169,7 +3170,7 @@ static void test_menu_setmenuinfo(void) ret = GetMenuInfo( hmenu, &mi); gle= GetLastError(); ok( ret, "GetMenuInfo() should have succeeded\n"); - ok( gle == 0xdeadbeef, "GetMenuInfo() error got %u\n", gle); + ok( gle == 0xdeadbeef, "GetMenuInfo() error got %lu\n", gle); ok( !(mi.dwStyle & MNS_CHECKORBMP), "menustyle was not expected to have the MNS_CHECKORBMP flag\n"); SetLastError(0xdeadbeef); mi.cbSize = sizeof( MENUINFO); @@ -3177,7 +3178,7 @@ static void test_menu_setmenuinfo(void) ret = GetMenuInfo( hsubmenu, &mi); gle= GetLastError(); ok( ret, "GetMenuInfo() should have succeeded\n"); - ok( gle == 0xdeadbeef, "GetMenuInfo() error got %u\n", gle); + ok( gle == 0xdeadbeef, "GetMenuInfo() error got %lu\n", gle); ok( !(mi.dwStyle & MNS_CHECKORBMP), "menustyle was not expected to have the MNS_CHECKORBMP flag\n"); /* SetMenuInfo() */ SetLastError(0xdeadbeef); @@ -3187,7 +3188,7 @@ static void test_menu_setmenuinfo(void) ret = SetMenuInfo( hmenu, &mi); gle= GetLastError(); ok( ret, "SetMenuInfo() should have succeeded\n"); - ok( gle == 0xdeadbeef, "SetMenuInfo() error got %u\n", gle); + ok( gle == 0xdeadbeef, "SetMenuInfo() error got %lu\n", gle); /* Now both menus should have the MNS_CHECKORBMP style bit set */ SetLastError(0xdeadbeef); mi.cbSize = sizeof( MENUINFO); @@ -3195,7 +3196,7 @@ static void test_menu_setmenuinfo(void) ret = GetMenuInfo( hmenu, &mi); gle= GetLastError(); ok( ret, "GetMenuInfo() should have succeeded\n"); - ok( gle == 0xdeadbeef, "GetMenuInfo() error got %u\n", gle); + ok( gle == 0xdeadbeef, "GetMenuInfo() error got %lu\n", gle); ok( mi.dwStyle & MNS_CHECKORBMP, "menustyle was expected to have the MNS_CHECKORBMP flag\n"); SetLastError(0xdeadbeef); mi.cbSize = sizeof( MENUINFO); @@ -3203,7 +3204,7 @@ static void test_menu_setmenuinfo(void) ret = GetMenuInfo( hsubmenu, &mi); gle= GetLastError(); ok( ret, "GetMenuInfo() should have succeeded\n"); - ok( gle == 0xdeadbeef, "GetMenuInfo() error got %u\n", gle); + ok( gle == 0xdeadbeef, "GetMenuInfo() error got %lu\n", gle); ok( mi.dwStyle & MNS_CHECKORBMP, "menustyle was expected to have the MNS_CHECKORBMP flag\n"); /* now repeat that without the APPLYTOSUBMENUS flag and another style bit */ SetLastError(0xdeadbeef); @@ -3213,7 +3214,7 @@ static void test_menu_setmenuinfo(void) ret = SetMenuInfo( hmenu, &mi); gle= GetLastError(); ok( ret, "SetMenuInfo() should have succeeded\n"); - ok( gle == 0xdeadbeef, "SetMenuInfo() error got %u\n", gle); + ok( gle == 0xdeadbeef, "SetMenuInfo() error got %lu\n", gle); /* Now only the top menu should have the MNS_NOCHECK style bit set */ SetLastError(0xdeadbeef); mi.cbSize = sizeof( MENUINFO); @@ -3221,7 +3222,7 @@ static void test_menu_setmenuinfo(void) ret = GetMenuInfo( hmenu, &mi); gle= GetLastError(); ok( ret, "GetMenuInfo() should have succeeded\n"); - ok( gle == 0xdeadbeef, "GetMenuInfo() error got %u\n", gle); + ok( gle == 0xdeadbeef, "GetMenuInfo() error got %lu\n", gle); ok( mi.dwStyle & MNS_NOCHECK, "menustyle was expected to have the MNS_NOCHECK flag\n"); SetLastError(0xdeadbeef); mi.cbSize = sizeof( MENUINFO); @@ -3229,7 +3230,7 @@ static void test_menu_setmenuinfo(void) ret = GetMenuInfo( hsubmenu, &mi); gle= GetLastError(); ok( ret, "GetMenuInfo() should have succeeded\n"); - ok( gle == 0xdeadbeef, "GetMenuInfo() error got %u\n", gle); + ok( gle == 0xdeadbeef, "GetMenuInfo() error got %lu\n", gle); ok( !(mi.dwStyle & MNS_NOCHECK), "menustyle was not expected to have the MNS_NOCHECK flag\n");
/* test background brush */ @@ -3284,13 +3285,13 @@ static void test_menu_trackpopupmenu(void) HWND hwnd = CreateWindowExA(0, (LPCSTR)MAKEINTATOM(atomMenuCheckClass), NULL, WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, 200, 200, NULL, NULL, NULL, NULL); - ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError()); + ok(hwnd != NULL, "CreateWindowEx failed with error %ld\n", GetLastError()); if (!hwnd) return; SetWindowLongPtrA( hwnd, GWLP_WNDPROC, (LONG_PTR)menu_ownerdraw_wnd_proc); for( Ex = 0; Ex < 2; Ex++) { hmenu = CreatePopupMenu(); - ok(hmenu != NULL, "CreateMenu failed with error %d\n", GetLastError()); + ok(hmenu != NULL, "CreateMenu failed with error %ld\n", GetLastError()); if (!hmenu) { DestroyWindow(hwnd); @@ -3307,7 +3308,7 @@ static void test_menu_trackpopupmenu(void) ok( gle == ERROR_INVALID_MENU_HANDLE || broken (gle == 0xdeadbeef) /* win95 */ || broken (gle == NO_ERROR) /* win98/ME */ - ,"TrackPopupMenu%s error got %u expected %u\n", + ,"TrackPopupMenu%s error got %lu expected %u\n", Ex ? "Ex" : "", gle, ERROR_INVALID_MENU_HANDLE); ok( !(gflag_initmenupopup || gflag_entermenuloop || gflag_initmenu), "got unexpected message(s)%s%s%s\n", @@ -3323,7 +3324,7 @@ static void test_menu_trackpopupmenu(void) ok( gle == ERROR_INVALID_MENU_HANDLE || broken (gle == 0xdeadbeef) /* win95 */ || broken (gle == NO_ERROR) /* win98/ME */ - ,"TrackPopupMenu%s error got %u expected %u\n", + ,"TrackPopupMenu%s error got %lu expected %u\n", Ex ? "Ex" : "", gle, ERROR_INVALID_MENU_HANDLE); ok( !(gflag_initmenupopup || gflag_entermenuloop || gflag_initmenu), "got unexpected message(s)%s%s%s\n", @@ -3337,7 +3338,7 @@ static void test_menu_trackpopupmenu(void) ret = MyTrackPopupMenu( Ex, hmenu, TPM_RETURNCMD, 100,100, 0, NULL); gle = GetLastError(); ok( !ret, "TrackPopupMenu%s should have failed\n", Ex ? "Ex" : ""); - ok( gle == ERROR_INVALID_WINDOW_HANDLE, "TrackPopupMenu%s error got %u\n", Ex ? "Ex" : "", gle ); + ok( gle == ERROR_INVALID_WINDOW_HANDLE, "TrackPopupMenu%s error got %lu\n", Ex ? "Ex" : "", gle ); ok( !(gflag_initmenupopup || gflag_entermenuloop || gflag_initmenu), "got unexpected message(s)%s%s%s\n", gflag_initmenupopup ? " WM_INITMENUPOPUP ": " ", @@ -3353,7 +3354,7 @@ static void test_menu_trackpopupmenu(void) ok( gle == NO_ERROR || gle == ERROR_INVALID_MENU_HANDLE /* NT4, win2k */ || broken (gle == 0xdeadbeef) /* win95 */ - ,"TrackPopupMenu%s error got %u expected %u or %u\n", + ,"TrackPopupMenu%s error got %lu expected %u or %u\n", Ex ? "Ex" : "", gle, NO_ERROR, ERROR_INVALID_MENU_HANDLE); ok( gflag_initmenupopup && gflag_entermenuloop && gflag_initmenu, "missed expected message(s)%s%s%s\n", @@ -3371,7 +3372,7 @@ static void test_menu_trackpopupmenu(void) ok( gle == NO_ERROR || gle == ERROR_INVALID_MENU_HANDLE /* NT4, win2k and Vista in the TrackPopupMenuEx case */ || broken (gle == 0xdeadbeef) /* win95 */ - ,"TrackPopupMenu%s error got %u expected %u or %u\n", + ,"TrackPopupMenu%s error got %lu expected %u or %u\n", Ex ? "Ex" : "", gle, NO_ERROR, ERROR_INVALID_MENU_HANDLE); ok( gflag_initmenupopup && gflag_entermenuloop && gflag_initmenu, "missed expected message(s)%s%s%s\n", @@ -3399,7 +3400,7 @@ static LRESULT WINAPI menu_track_again_wnd_proc(HWND hwnd, UINT msg, WPARAM wpar ret = TrackPopupMenu(g_hmenu, 0, 100, 100, 0, hwnd, NULL); ok(ret == FALSE, "got %d\n", ret); ok(GetLastError() == ERROR_POPUP_ALREADY_ACTIVE || - broken(GetLastError() == 0xdeadbeef) /* W9x */, "got %d\n", GetLastError()); + broken(GetLastError() == 0xdeadbeef) /* W9x */, "got %ld\n", GetLastError());
/* exit menu modal loop * ( A SendMessage does not work on NT3.51 here ) */ @@ -3417,12 +3418,12 @@ static void test_menu_trackagain(void) hwnd = CreateWindowExA(0, (LPCSTR)MAKEINTATOM(atomMenuCheckClass), NULL, WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, 200, 200, NULL, NULL, NULL, NULL); - ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError()); + ok(hwnd != NULL, "CreateWindowEx failed with error %ld\n", GetLastError()); if (!hwnd) return; SetWindowLongPtrA( hwnd, GWLP_WNDPROC, (LONG_PTR)menu_track_again_wnd_proc);
g_hmenu = CreatePopupMenu(); - ok(g_hmenu != NULL, "CreateMenu failed with error %d\n", GetLastError()); + ok(g_hmenu != NULL, "CreateMenu failed with error %ld\n", GetLastError());
ret = AppendMenuA(g_hmenu, MF_STRING , 100, "item 1"); ok(ret, "AppendMenu failed.\n"); @@ -3475,14 +3476,14 @@ static void test_menu_cancelmode(void) WS_VISIBLE | WS_CHILD, 10, 10, 20, 20, hwnd, NULL, NULL, NULL); ok( hwnd != NULL && hwndchild != NULL, - "CreateWindowEx failed with error %d\n", GetLastError()); + "CreateWindowEx failed with error %ld\n", GetLastError()); g_hwndtosend = hwnd; SetWindowLongPtrA( hwnd, GWLP_WNDPROC, (LONG_PTR)menu_cancelmode_wnd_proc); SetWindowLongPtrA( hwndchild, GWLP_WNDPROC, (LONG_PTR)menu_cancelmode_wnd_proc); menu = CreatePopupMenu(); - ok( menu != NULL, "CreatePopupMenu failed with error %d\n", GetLastError()); + ok( menu != NULL, "CreatePopupMenu failed with error %ld\n", GetLastError()); ret = AppendMenuA( menu, MF_STRING, 1, "winetest"); - ok( ret, "Functie failed lasterror is %u\n", GetLastError()); + ok( ret, "Functie failed lasterror is %lu\n", GetLastError()); /* seems to be needed only on wine :( */ while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg); @@ -3509,15 +3510,15 @@ static void test_menu_cancelmode(void)
/* test canceling tracking in a window's menu bar */ menubar = CreateMenu(); - ok( menubar != NULL, "CreateMenu failed with error %d\n", GetLastError()); + ok( menubar != NULL, "CreateMenu failed with error %ld\n", GetLastError()); ret = AppendMenuA( menubar, MF_POPUP|MF_STRING, (UINT_PTR)menu, "winetest"); - ok( ret, "AppendMenuA failed lasterror is %u\n", GetLastError()); + ok( ret, "AppendMenuA failed lasterror is %lu\n", GetLastError()); ret = SetMenu( hwnd, menubar ); - ok( ret, "SetMenu failed lasterror is %u\n", GetLastError()); + ok( ret, "SetMenu failed lasterror is %lu\n", GetLastError()); /* initiate tracking */ g_hwndtosend = hwnd; ret = SendMessageA( hwnd, WM_SYSCOMMAND, SC_KEYMENU, 0 ); - ok( ret == 0, "Sending WM_SYSCOMMAND/SC_KEYMENU failed lasterror is %u\n", GetLastError()); + ok( ret == 0, "Sending WM_SYSCOMMAND/SC_KEYMENU failed lasterror is %lu\n", GetLastError()); while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg); ok(g_got_enteridle == 0, "received %d WM_ENTERIDLE messages, none expected\n", g_got_enteridle); @@ -3548,7 +3549,7 @@ static void test_menu_maxdepth(void) if( !ret) break; } trace("Maximum depth is %d\n", i); - ok( GetLastError() == 12345678, "unexpected error %d\n", GetLastError()); + ok( GetLastError() == 12345678, "unexpected error %ld\n", GetLastError()); ok( i < NR_MENUS || broken( i == NR_MENUS), /* win98, NT */ "no ( or very large) limit on menu depth!\n"); @@ -3567,12 +3568,12 @@ static void test_menu_circref(void) menu2 = CreatePopupMenu(); ok( menu1 && menu2, "error creating menus.\n"); ret = AppendMenuA( menu1, MF_POPUP, (UINT_PTR)menu2, "winetest"); - ok( ret, "AppendMenu failed, error is %d\n", GetLastError()); + ok( ret, "AppendMenu failed, error is %ld\n", GetLastError()); ret = AppendMenuA( menu1, MF_STRING | MF_HILITE, 123, "winetest"); - ok( ret, "AppendMenu failed, error is %d\n", GetLastError()); + ok( ret, "AppendMenu failed, error is %ld\n", GetLastError()); /* app chooses an id that happens to clash with its own hmenu */ ret = AppendMenuA( menu2, MF_STRING, (UINT_PTR)menu2, "winetest"); - ok( ret, "AppendMenu failed, error is %d\n", GetLastError()); + ok( ret, "AppendMenu failed, error is %ld\n", GetLastError()); /* now attempt to change the string of the first item of menu1 */ ret = ModifyMenuA( menu1, (UINT_PTR)menu2, MF_POPUP, (UINT_PTR)menu2, "menu 2"); ok( !ret || @@ -3580,7 +3581,7 @@ static void test_menu_circref(void) "ModifyMenu should have failed.\n"); if( !ret) { /* will probably stack fault if the ModifyMenu succeeded */ ret = GetMenuState( menu1, 123, 0); - ok( ret == MF_HILITE, "GetMenuState returned %x\n",ret); + ok( ret == MF_HILITE, "GetMenuState returned %lx\n",ret); } DestroyMenu( menu2); DestroyMenu( menu1); @@ -3621,9 +3622,9 @@ static void test_menualign(void)
mi.fMask = MIM_STYLE; ret = GetMenuInfo( menu, &mi); - ok( ret, "GetMenuInfo failed: %d\n", GetLastError()); + ok( ret, "GetMenuInfo failed: %ld\n", GetLastError()); ok( menu != NULL, "GetMenuInfo() failed\n"); - ok( 0 == mi.dwStyle, "menuinfo style is %x\n", mi.dwStyle); + ok( 0 == mi.dwStyle, "menuinfo style is %lx\n", mi.dwStyle);
/* test 1 */ mii.fMask = MIIM_BITMAP | MIIM_STRING | MIIM_ID; @@ -3639,7 +3640,7 @@ static void test_menualign(void) ret = InsertMenuItemA( menu, -1, TRUE, &mii); ok( ret, "InsertMenuItem() failed\n"); ret = TrackPopupMenu( menu, TPM_RETURNCMD, 110, 200, 0, hwnd, NULL); - ok( ret != 2, "User indicated that menu text alignment test 1 failed %d\n", ret); + ok( ret != 2, "User indicated that menu text alignment test 1 failed %ld\n", ret); /* test 2*/ mii.fMask = MIIM_BITMAP | MIIM_STRING | MIIM_ID; mii.wID = 3; @@ -3661,7 +3662,7 @@ static void test_menualign(void) ret = SetMenuItemInfoA( menu, 2, TRUE, &mii); ok( ret, "SetMenuItemInfo() failed\n"); ret = TrackPopupMenu( menu, TPM_RETURNCMD, 110, 200, 0, hwnd, NULL); - ok( ret != 2, "User indicated that menu text alignment test 2 failed %d\n", ret); + ok( ret != 2, "User indicated that menu text alignment test 2 failed %ld\n", ret); /* test 3 */ mii.fMask = MIIM_TYPE | MIIM_ID; mii.wID = 3; @@ -3681,7 +3682,7 @@ static void test_menualign(void) ret = SetMenuItemInfoA( menu, 2, TRUE, &mii); ok( ret, "SetMenuItemInfo() failed\n"); ret = TrackPopupMenu( menu, TPM_RETURNCMD, 110, 200, 0, hwnd, NULL); - ok( ret != 2, "User indicated that menu text alignment test 3 failed %d\n", ret); + ok( ret != 2, "User indicated that menu text alignment test 3 failed %ld\n", ret); /* cleanup */ DeleteObject( hbm1); DeleteObject( hbm2); @@ -3731,11 +3732,11 @@ static void test_emptypopup(void) HWND hwnd = CreateWindowExA(0, (LPCSTR)MAKEINTATOM(atomMenuCheckClass), NULL, WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, 200, 200, NULL, NULL, NULL, NULL); - 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)menu_ownerdraw_wnd_proc);
hmenu = CreatePopupMenu(); - ok(hmenu != NULL, "CreateMenu failed with error %d\n", GetLastError()); + ok(hmenu != NULL, "CreateMenu failed with error %ld\n", GetLastError());
gflag_initmenupopup = gflag_entermenuloop = gflag_initmenu = gflag_enteridle = 0; selectitem_wp = 0xdeadbeef; @@ -3749,8 +3750,8 @@ static void test_emptypopup(void) ok(gflag_initmenu == 1, "got %i\n", gflag_initmenu); ok(gflag_enteridle == 0, "got %i\n", gflag_initmenu);
- ok(selectitem_wp == 0xdeadbeef, "got %lx\n", selectitem_wp); - ok(selectitem_lp == 0xdeadbeef, "got %lx\n", selectitem_lp); + ok(selectitem_wp == 0xdeadbeef, "got %Ix\n", selectitem_wp); + ok(selectitem_lp == 0xdeadbeef, "got %Ix\n", selectitem_lp);
gflag_initmenupopup = gflag_entermenuloop = gflag_initmenu = gflag_enteridle = 0; selectitem_wp = 0xdeadbeef; @@ -3764,8 +3765,8 @@ static void test_emptypopup(void) ok(gflag_initmenu == 1, "got %i\n", gflag_initmenu); ok(gflag_enteridle == 0, "got %i\n", gflag_initmenu);
- ok(selectitem_wp == 0xdeadbeef, "got %lx\n", selectitem_wp); - ok(selectitem_lp == 0xdeadbeef, "got %lx\n", selectitem_lp); + ok(selectitem_wp == 0xdeadbeef, "got %Ix\n", selectitem_wp); + ok(selectitem_lp == 0xdeadbeef, "got %Ix\n", selectitem_lp);
SetWindowLongPtrA( hwnd, GWLP_WNDPROC, (LONG_PTR)menu_fill_in_init);
@@ -3781,13 +3782,13 @@ static void test_emptypopup(void) ok(gflag_initmenu == 1, "got %i\n", gflag_initmenu); ok(gflag_enteridle == 1, "got %i\n", gflag_initmenu);
- ok(selectitem_wp == 0xffff0000, "got %lx\n", selectitem_wp); - ok(selectitem_lp == 0, "got %lx\n", selectitem_lp); + ok(selectitem_wp == 0xffff0000, "got %Ix\n", selectitem_wp); + ok(selectitem_lp == 0, "got %Ix\n", selectitem_lp);
DestroyWindow(hwnd);
ret = DestroyMenu(hmenu); - ok(ret, "DestroyMenu failed with error %d\n", GetLastError()); + ok(ret, "DestroyMenu failed with error %ld\n", GetLastError()); }
static HMENU get_bad_hmenu( UINT_PTR id ) @@ -3946,7 +3947,7 @@ if (0) /* FIXME: uncomment once Wine is fixed */ { ok(mii.fState == MF_ENABLED, "expected MF_ENABLED, got %#x\n", mii.fState); ok(mii.wID == 0, "expected 0, got %#x\n", mii.wID); ok(mii.hSubMenu == 0, "expected 0, got %p\n", mii.hSubMenu); - ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#lx\n", mii.dwItemData); + ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#Ix\n", mii.dwItemData); ok(mii.dwTypeData == buf, "expected %p, got %p\n", buf, mii.dwTypeData); ok(mii.cch == 6, "expected 6, got %u\n", mii.cch); ok(!strcmp(buf, string), "expected %s, got %s\n", string, buf); @@ -3962,7 +3963,7 @@ if (0) /* FIXME: uncomment once Wine is fixed */ { ok(mii.fState == 0x81818181, "expected 0x81818181, got %#x\n", mii.fState); ok(mii.wID == 0x81818181, "expected 0x81818181, got %#x\n", mii.wID); ok(mii.hSubMenu == 0, "expected 0, got %p\n", mii.hSubMenu); - ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#lx\n", mii.dwItemData); + ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#Ix\n", mii.dwItemData); ok(mii.dwTypeData == (LPSTR)hbmp, "expected %p, got %p\n", hbmp, mii.dwTypeData); ok(mii.cch == 6, "expected 6, got %u\n", mii.cch); ok(mii.hbmpItem == hbmp, "expected %p, got %p\n", hbmp, mii.hbmpItem); @@ -3980,7 +3981,7 @@ if (0) /* FIXME: uncomment once Wine is fixed */ { ok(mii.fState == MF_ENABLED, "expected MF_ENABLED, got %#x\n", mii.fState); ok(mii.wID == 0, "expected 0, got %#x\n", mii.wID); ok(mii.hSubMenu == 0, "expected 0, got %p\n", mii.hSubMenu); - ok(mii.dwItemData == 0, "expected 0, got %#lx\n", mii.dwItemData); + ok(mii.dwItemData == 0, "expected 0, got %#Ix\n", mii.dwItemData); ok(mii.dwTypeData == (LPSTR)hbmp, "expected %p, got %p\n", hbmp, mii.dwTypeData); ok(mii.cch == 6, "expected 6, got %u\n", mii.cch); ok(mii.hbmpItem == hbmp, "expected %p, got %p\n", hbmp, mii.hbmpItem); @@ -4013,7 +4014,7 @@ if (0) /* FIXME: uncomment once Wine is fixed */ { ok(mii.fState == MF_ENABLED, "expected MF_ENABLED, got %#x\n", mii.fState); ok(mii.wID == 0, "expected 0, got %#x\n", mii.wID); ok(mii.hSubMenu == 0, "expected 0, got %p\n", mii.hSubMenu); - ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#lx\n", mii.dwItemData); + ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#Ix\n", mii.dwItemData); ok(mii.dwTypeData == buf, "expected %p, got %p\n", buf, mii.dwTypeData); ok(mii.cch == 6, "expected 6, got %u\n", mii.cch); ok(!strcmp(buf, string), "expected %s, got %s\n", string, buf); @@ -4031,7 +4032,7 @@ if (0) /* FIXME: uncomment once Wine is fixed */ { ok(mii.fState == 0x81818181, "expected 0x81818181, got %#x\n", mii.fState); ok(mii.wID == 0x81818181, "expected 0x81818181, got %#x\n", mii.wID); ok(mii.hSubMenu == 0, "expected 0, got %p\n", mii.hSubMenu); - ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#lx\n", mii.dwItemData); + ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#Ix\n", mii.dwItemData); ok(mii.dwTypeData == buf, "expected %p, got %p\n", buf, mii.dwTypeData); ok(mii.cch == 6, "expected 6, got %u\n", mii.cch); ok(!strcmp(buf, string), "expected %s, got %s\n", string, buf); @@ -4050,7 +4051,7 @@ if (0) /* FIXME: uncomment once Wine is fixed */ { ok(mii.fState == MF_ENABLED, "expected MF_ENABLED, got %#x\n", mii.fState); ok(mii.wID == 0, "expected 0, got %#x\n", mii.wID); ok(mii.hSubMenu == 0, "expected 0, got %p\n", mii.hSubMenu); - ok(mii.dwItemData == 0, "expected 0, got %#lx\n", mii.dwItemData); + ok(mii.dwItemData == 0, "expected 0, got %#Ix\n", mii.dwItemData); ok(mii.dwTypeData == buf, "expected %p, got %p\n", buf, mii.dwTypeData); ok(mii.cch == 6, "expected 6, got %u\n", mii.cch); ok(!strcmp(buf, string), "expected %s, got %s\n", string, buf); @@ -4085,7 +4086,7 @@ if (0) /* FIXME: uncomment once Wine is fixed */ { ok(mii.fState == MF_ENABLED, "expected MF_ENABLED, got %#x\n", mii.fState); ok(mii.wID == 0, "expected 0, got %#x\n", mii.wID); ok(mii.hSubMenu == 0, "expected 0, got %p\n", mii.hSubMenu); - ok(mii.dwItemData == (ULONG_PTR)hbmp, "expected %p, got %#lx\n", hbmp, mii.dwItemData); + ok(mii.dwItemData == (ULONG_PTR)hbmp, "expected %p, got %#Ix\n", hbmp, mii.dwItemData); ok(mii.dwTypeData == buf, "expected %p, got %p\n", buf, mii.dwTypeData); ok(mii.cch == 6, "expected 6, got %u\n", mii.cch); ok(!strcmp(buf, string), "expected %s, got %s\n", string, buf); @@ -4104,7 +4105,7 @@ if (0) /* FIXME: uncomment once Wine is fixed */ { ok(mii.fState == 0x81818181, "expected 0x81818181, got %#x\n", mii.fState); ok(mii.wID == 0x81818181, "expected 0x81818181, got %#x\n", mii.wID); ok(mii.hSubMenu == 0, "expected 0, got %p\n", mii.hSubMenu); - ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#lx\n", mii.dwItemData); + ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#Ix\n", mii.dwItemData); ok(mii.dwTypeData == buf, "expected %p, got %p\n", buf, mii.dwTypeData); ok(mii.cch == 6, "expected 6, got %u\n", mii.cch); ok(!strcmp(buf, string), "expected %s, got %s\n", string, buf); @@ -4137,7 +4138,7 @@ if (0) /* FIXME: uncomment once Wine is fixed */ { ok(mii.fState == MF_ENABLED, "expected MF_ENABLED, got %#x\n", mii.fState); ok(mii.wID == 0, "expected 0, got %#x\n", mii.wID); ok(mii.hSubMenu == 0, "expected 0, got %p\n", mii.hSubMenu); - ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#lx\n", mii.dwItemData); + ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#Ix\n", mii.dwItemData); ok(mii.dwTypeData == buf, "expected %p, got %p\n", buf, mii.dwTypeData); ok(mii.cch == 6, "expected 6, got %u\n", mii.cch); ok(!strcmp(buf, string), "expected %s, got %s\n", string, buf); @@ -4161,7 +4162,7 @@ if (0) /* FIXME: uncomment once Wine is fixed */ { ok(mii.fState == MF_ENABLED, "expected MF_ENABLED, got %#x\n", mii.fState); ok(mii.wID == 0, "expected 0, got %#x\n", mii.wID); ok(mii.hSubMenu == 0, "expected 0, got %p\n", mii.hSubMenu); - ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#lx\n", mii.dwItemData); + ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#Ix\n", mii.dwItemData); ok(mii.dwTypeData == buf, "expected %p, got %p\n", buf, mii.dwTypeData); ok(mii.cch == 6, "expected 6, got %u\n", mii.cch); ok(!strcmp(buf, string), "expected %s, got %s\n", string, buf); @@ -4180,7 +4181,7 @@ if (0) /* FIXME: uncomment once Wine is fixed */ { ok(mii.fState == 0x81818181, "expected 0x81818181, got %#x\n", mii.fState); ok(mii.wID == 0x81818181, "expected 0x81818181, got %#x\n", mii.wID); ok(mii.hSubMenu == 0, "expected 0, got %p\n", mii.hSubMenu); - ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#lx\n", mii.dwItemData); + ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#Ix\n", mii.dwItemData); ok(mii.dwTypeData == buf, "expected %p, got %p\n", buf, mii.dwTypeData); ok(mii.cch == 6, "expected 6, got %u\n", mii.cch); ok(!strcmp(buf, string), "expected %s, got %s\n", string, buf); @@ -4204,7 +4205,7 @@ if (0) /* FIXME: uncomment once Wine is fixed */ { ok(mii.fState == MF_ENABLED, "expected MF_ENABLED, got %#x\n", mii.fState); ok(mii.wID == 0, "expected 0, got %#x\n", mii.wID); ok(mii.hSubMenu == 0, "expected 0, got %p\n", mii.hSubMenu); - ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#lx\n", mii.dwItemData); + ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#Ix\n", mii.dwItemData); ok(mii.dwTypeData == buf, "expected %p, got %p\n", buf, mii.dwTypeData); ok(mii.cch == 6, "expected 6, got %u\n", mii.cch); ok(!strcmp(buf, string), "expected %s, got %s\n", string, buf); @@ -4223,7 +4224,7 @@ if (0) /* FIXME: uncomment once Wine is fixed */ { ok(mii.fState == 0x81818181, "expected 0x81818181, got %#x\n", mii.fState); ok(mii.wID == 0x81818181, "expected 0x81818181, got %#x\n", mii.wID); ok(mii.hSubMenu == 0, "expected 0, got %p\n", mii.hSubMenu); - ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#lx\n", mii.dwItemData); + ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#Ix\n", mii.dwItemData); ok(mii.dwTypeData == (LPSTR)hbmp, "expected %p, got %p\n", hbmp, mii.dwTypeData); ok(mii.cch == 6, "expected 6, got %u\n", mii.cch); ok(mii.hbmpItem == hbmp, "expected %p, got %p\n", hbmp, mii.hbmpItem); diff --git a/dlls/user32/tests/monitor.c b/dlls/user32/tests/monitor.c index 5e14c536a76..4578742a707 100644 --- a/dlls/user32/tests/monitor.c +++ b/dlls/user32/tests/monitor.c @@ -1,3 +1,4 @@ +#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* * Unit tests for monitor APIs * @@ -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); } diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index f0e0d0fba76..ee949ec9518 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -1,3 +1,4 @@ +#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* * Unit tests for window message handling * @@ -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 ); } diff --git a/dlls/user32/tests/resource.c b/dlls/user32/tests/resource.c index 5d4c4e2f968..d116fb7462b 100644 --- a/dlls/user32/tests/resource.c +++ b/dlls/user32/tests/resource.c @@ -1,3 +1,4 @@ +#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* Unit test suite for resources. * * Copyright 2004 Ferenc Wagner @@ -51,10 +52,10 @@ static void test_LoadStringW(void) return; } length2 = LoadStringW(hInst, 2, returnedstringw, ARRAY_SIZE(returnedstringw)); /* get resource string */ - ok(length2 > 0, "LoadStringW failed to load resource 2, ret %d, err %d\n", length2, GetLastError()); + ok(length2 > 0, "LoadStringW failed to load resource 2, ret %d, err %ld\n", length2, GetLastError()); ok(length1 == length2, "LoadStringW returned different values dependent on buflen. ret1 %d, ret2 %d\n", length1, length2); - ok(length1 > 0 && resourcepointer != NULL, "LoadStringW failed to get pointer to resource 2, ret %d, err %d\n", + ok(length1 > 0 && resourcepointer != NULL, "LoadStringW failed to get pointer to resource 2, ret %d, err %ld\n", length1, GetLastError());
/* Copy the resource since it is not '\0' terminated, and add '\0' to the end */ @@ -109,22 +110,22 @@ static void test_LoadStringA (void) }
ret = LoadStringA(hInst, 1, buf, sizeof(buf) ); - ok( ret > 0, "LoadString failed: ret %d err %d\n", ret, GetLastError()); + ok( ret > 0, "LoadString failed: ret %d err %ld\n", ret, GetLastError()); ret2 = LoadStringA( hInst, MAKELONG( 1, 0x8000 ), buf, sizeof(buf)); - ok( ret2 == ret, "LoadString failed: ret %d err %d\n", ret, GetLastError()); + ok( ret2 == ret, "LoadString failed: ret %d err %ld\n", ret, GetLastError()); ret2 = LoadStringA( hInst, MAKELONG( 1, 0xffff ), buf, sizeof(buf)); - ok( ret2 == ret, "LoadString failed: ret %d err %d\n", ret, GetLastError()); + ok( ret2 == ret, "LoadString failed: ret %d err %ld\n", ret, GetLastError());
ret = LoadStringA(hInst, 65534, buf, sizeof(buf) ); - ok( ret > 0, "LoadString failed: ret %d err %d\n", ret, GetLastError()); + ok( ret > 0, "LoadString failed: ret %d err %ld\n", ret, GetLastError()); ret2 = LoadStringA( hInst, MAKELONG( 65534, 0x8000 ), buf, sizeof(buf)); - ok( ret2 == ret, "LoadString failed: ret %d err %d\n", ret, GetLastError()); + ok( ret2 == ret, "LoadString failed: ret %d err %ld\n", ret, GetLastError()); ret2 = LoadStringA( hInst, MAKELONG( 65534, 0xffff ), buf, sizeof(buf)); - ok( ret2 == ret, "LoadString failed: ret %d err %d\n", ret, GetLastError()); + ok( ret2 == ret, "LoadString failed: ret %d err %ld\n", ret, GetLastError());
ret = LoadStringA(hInst, 0, buf, 0); ok( ret == -1 || broken(ret == 0), - "LoadStringA did not return -1 when called with buflen = 0, got %d, err %d\n", + "LoadStringA did not return -1 when called with buflen = 0, got %d, err %ld\n", ret, GetLastError());
SetLastError(0xdeadbeef); @@ -132,7 +133,7 @@ static void test_LoadStringA (void) ret = LoadStringA(hInst, 1, buf, 1); ok( !ret, "LoadString returned %d\n", ret); ok( buf[0] == 0, "buf[0] = %c (%x)\n", buf[0], buf[0]); - ok( GetLastError() == 0xdeadbeef, "GetLastError() = %d\n", GetLastError()); + ok( GetLastError() == 0xdeadbeef, "GetLastError() = %ld\n", GetLastError()); }
static void test_accel1(void) diff --git a/dlls/user32/tests/scroll.c b/dlls/user32/tests/scroll.c index 40eb13943fc..98f091abda5 100644 --- a/dlls/user32/tests/scroll.c +++ b/dlls/user32/tests/scroll.c @@ -1,3 +1,4 @@ +#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* * Unit tests for scrollbar * @@ -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 ) diff --git a/dlls/user32/tests/static.c b/dlls/user32/tests/static.c index 0899f4c6187..7a22c8594da 100644 --- a/dlls/user32/tests/static.c +++ b/dlls/user32/tests/static.c @@ -1,3 +1,4 @@ +#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* Unit test suite for static controls. * * Copyright 2007 Google (Mikolaj Zalewski) @@ -85,19 +86,19 @@ static void test_updates(int style)
exstyle = GetWindowLongW(hStatic, GWL_EXSTYLE); if (style == SS_ETCHEDHORZ || style == SS_ETCHEDVERT || style == SS_SUNKEN) - ok(exstyle == WS_EX_STATICEDGE, "expected WS_EX_STATICEDGE, got %d\n", exstyle); + ok(exstyle == WS_EX_STATICEDGE, "expected WS_EX_STATICEDGE, got %ld\n", exstyle); else - ok(exstyle == 0, "expected 0, got %d\n", exstyle); + ok(exstyle == 0, "expected 0, got %ld\n", exstyle);
GetClientRect(hStatic, &rcClient); if (style == SS_ETCHEDVERT) - ok(rcClient.right == 0, "expected zero width, got %d\n", rcClient.right); + ok(rcClient.right == 0, "expected zero width, got %ld\n", rcClient.right); else - ok(rcClient.right > 0, "expected non-zero width, got %d\n", rcClient.right); + ok(rcClient.right > 0, "expected non-zero width, got %ld\n", rcClient.right); if (style == SS_ETCHEDHORZ) - ok(rcClient.bottom == 0, "expected zero height, got %d\n", rcClient.bottom); + ok(rcClient.bottom == 0, "expected zero height, got %ld\n", rcClient.bottom); else - ok(rcClient.bottom > 0, "expected non-zero height, got %d\n", rcClient.bottom); + ok(rcClient.bottom > 0, "expected non-zero height, got %ld\n", rcClient.bottom);
g_nReceivedColorStatic = 0; /* during each update parent WndProc will test the WM_CTLCOLORSTATIC message */ @@ -217,10 +218,10 @@ static void test_STM_SETIMAGE(void)
for (type = SS_LEFT; type < SS_ETCHEDFRAME; type++) { - winetest_push_context("%u", type); + winetest_push_context("%lu", type);
hwnd = build_static(type); - ok(hwnd != 0, "failed to create static type %#x\n", type); + ok(hwnd != 0, "failed to create static type %#lx\n", type);
/* set icon */ g_nReceivedColorStatic = 0; diff --git a/dlls/user32/tests/sysparams.c b/dlls/user32/tests/sysparams.c index f2d9694bd6f..a8487b40878 100644 --- a/dlls/user32/tests/sysparams.c +++ b/dlls/user32/tests/sysparams.c @@ -1,3 +1,4 @@ +#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* Unit test suite for functions SystemParametersInfo and GetSystemMetrics. * * Copyright 2002 Andriy Palamarchuk @@ -302,14 +303,14 @@ static BOOL test_error_msg ( int rc, const char *name ) } else { - trace("%s failed for reason: %d. Indicating test failure and skipping remainder of test\n",name,last_error); - ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,last_error); + trace("%s failed for reason: %ld. Indicating test failure and skipping remainder of test\n",name,last_error); + ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,last_error); } return FALSE; } else { - ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,last_error); + ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,last_error); return TRUE; } } @@ -335,12 +336,12 @@ static void _test_reg_key( LPCSTR subKey1, LPCSTR subKey2, LPCSTR valName1, LPCS RegCloseKey( hKey ); if (rc==ERROR_SUCCESS) { - ok( type == exp_type, "wrong type %u/%u\n", type, exp_type ); + ok( type == exp_type, "wrong type %lu/%lu\n", type, exp_type ); switch (exp_type) { case REG_DWORD: ok( *(DWORD *)value == *(DWORD *)exp_value, - "Wrong value in registry: %s %s %08x/%08x\n", + "Wrong value in registry: %s %s %08lx/%08lx\n", subKey1, valName1, *(DWORD *)value, *(DWORD *)exp_value ); break; case REG_SZ: @@ -365,12 +366,12 @@ static void _test_reg_key( LPCSTR subKey1, LPCSTR subKey2, LPCSTR valName1, LPCS RegCloseKey( hKey ); if (rc==ERROR_SUCCESS) { - ok( type == exp_type, "wrong type %u/%u\n", type, exp_type ); + ok( type == exp_type, "wrong type %lu/%lu\n", type, exp_type ); switch (exp_type) { case REG_DWORD: ok( *(DWORD *)value == *(DWORD *)exp_value, - "Wrong value in registry: %s %s %08x/%08x\n", + "Wrong value in registry: %s %s %08lx/%08lx\n", subKey1, valName1, *(DWORD *)value, *(DWORD *)exp_value ); break; case REG_SZ: @@ -396,12 +397,12 @@ static void _test_reg_key( LPCSTR subKey1, LPCSTR subKey2, LPCSTR valName1, LPCS RegCloseKey( hKey ); if (rc==ERROR_SUCCESS) { - ok( type == exp_type, "wrong type %u/%u\n", type, exp_type ); + ok( type == exp_type, "wrong type %lu/%lu\n", type, exp_type ); switch (exp_type) { case REG_DWORD: ok( *(DWORD *)value == *(DWORD *)exp_value, - "Wrong value in registry: %s %s %08x/%08x\n", + "Wrong value in registry: %s %s %08lx/%08lx\n", subKey1, valName1, *(DWORD *)value, *(DWORD *)exp_value ); break; case REG_SZ: @@ -426,12 +427,12 @@ static void _test_reg_key( LPCSTR subKey1, LPCSTR subKey2, LPCSTR valName1, LPCS RegCloseKey( hKey ); if (rc==ERROR_SUCCESS) { - ok( type == exp_type, "wrong type %u/%u\n", type, exp_type ); + ok( type == exp_type, "wrong type %lu/%lu\n", type, exp_type ); switch (exp_type) { case REG_DWORD: ok( *(DWORD *)value == *(DWORD *)exp_value, - "Wrong value in registry: %s %s %08x/%08x\n", + "Wrong value in registry: %s %s %08lx/%08lx\n", subKey1, valName1, *(DWORD *)value, *(DWORD *)exp_value ); break; case REG_SZ: @@ -575,48 +576,48 @@ static void test_SPI_SETBEEP( void ) /* 2 */ curr_val = TRUE; rc=SystemParametersInfoA( SPI_SETBEEP, curr_val, 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); if (!test_error_msg(rc,"SPI_SETBEEP")) return; - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); test_change_message( SPI_SETBEEP, 0 ); test_reg_key( SPI_SETBEEP_REGKEY, SPI_SETBEEP_VALNAME, curr_val ? "Yes" : "No" ); rc=SystemParametersInfoA( SPI_GETBEEP, 0, &b, 0 ); - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); eq( b, curr_val, "SPI_{GET,SET}BEEP", "%d" ); rc=SystemParametersInfoW( SPI_GETBEEP, 0, &b, 0 ); if (rc || GetLastError() != ERROR_CALL_NOT_IMPLEMENTED) { - ok(rc, "SystemParametersInfoW: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoW: rc=%d err=%ld\n", rc, GetLastError()); eq( b, curr_val, "SystemParametersInfoW", "%d" ); }
/* is a message sent for the second change? */ rc=SystemParametersInfoA( SPI_SETBEEP, curr_val, 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); test_change_message( SPI_SETBEEP, 0 );
curr_val = FALSE; rc=SystemParametersInfoW( SPI_SETBEEP, curr_val, 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); if (rc == FALSE && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) rc=SystemParametersInfoA( SPI_SETBEEP, curr_val, 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); - ok(rc, "SystemParametersInfo: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfo: rc=%d err=%ld\n", rc, GetLastError()); test_change_message( SPI_SETBEEP, 0 ); test_reg_key( SPI_SETBEEP_REGKEY, SPI_SETBEEP_VALNAME, curr_val ? "Yes" : "No" ); rc=SystemParametersInfoA( SPI_GETBEEP, 0, &b, 0 ); - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); eq( b, curr_val, "SPI_{GET,SET}BEEP", "%d" ); rc=SystemParametersInfoW( SPI_GETBEEP, 0, &b, 0 ); if (rc || GetLastError() != ERROR_CALL_NOT_IMPLEMENTED) { - ok(rc, "SystemParametersInfoW: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoW: rc=%d err=%ld\n", rc, GetLastError()); eq( b, curr_val, "SystemParametersInfoW", "%d" ); } ok( MessageBeep( MB_OK ), "Return value of MessageBeep when sound is disabled\n" );
rc=SystemParametersInfoA( SPI_SETBEEP, old_b, 0, SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); }
static const char *setmouse_valuenames[3] = { @@ -646,7 +647,7 @@ static BOOL run_spi_setmouse_test( int curr_val[], POINT *req_change, POINT *pro rc=SystemParametersInfoA( SPI_SETMOUSE, 0, curr_val, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); if (!test_error_msg(rc,"SPI_SETMOUSE")) return FALSE;
- ok(rc, "SystemParametersInfo: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfo: rc=%d err=%ld\n", rc, GetLastError()); test_change_message( SPI_SETMOUSE, 0 ); for (i = 0; i < 3; i++) { @@ -655,14 +656,14 @@ static BOOL run_spi_setmouse_test( int curr_val[], POINT *req_change, POINT *pro }
rc=SystemParametersInfoA( SPI_GETMOUSE, 0, mi, 0 ); - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); ok(mi[0] == curr_val[0], "expected X threshold %d, got %d\n", curr_val[0], mi[0]); ok(mi[1] == curr_val[1], "expected Y threshold %d, got %d\n", curr_val[1], mi[1]); ok(mi[2] == curr_val[2] || broken(mi[2] == 1) /* Win10 1709+ */, "expected acceleration %d, got %d\n", curr_val[2], mi[2]);
rc=SystemParametersInfoW( SPI_GETMOUSE, 0, mi, 0 ); - ok(rc, "SystemParametersInfoW: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoW: rc=%d err=%ld\n", rc, GetLastError()); ok(mi[0] == curr_val[0], "expected X threshold %d, got %d\n", curr_val[0], mi[0]); ok(mi[1] == curr_val[1], "expected Y threshold %d, got %d\n", curr_val[1], mi[1]); ok(mi[2] == curr_val[2] || broken(mi[2] == 1) /* Win10 1709+ */, @@ -745,7 +746,7 @@ static void test_SPI_SETMOUSE( void ) /* 4 */ run_spi_setmouse_test( curr_val, req_change, proj_change8, nchange );
rc=SystemParametersInfoA( SPI_SETMOUSE, 0, old_mi, SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); }
static BOOL test_setborder(UINT curr_val, int usesetborder, int dpi) @@ -757,18 +758,18 @@ static BOOL test_setborder(UINT curr_val, int usesetborder, int dpi)
ncm.cbSize = FIELD_OFFSET(NONCLIENTMETRICSA, iPaddedBorderWidth); rc=SystemParametersInfoA( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0); - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); if( usesetborder) { rc=SystemParametersInfoA( SPI_SETBORDER, curr_val, 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); if (!test_error_msg(rc,"SPI_SETBORDER")) return FALSE; - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); test_change_message( SPI_SETBORDER, 1 ); } else { /* set non client metrics */ ncm.iBorderWidth = curr_val; rc=SystemParametersInfoA( SPI_SETNONCLIENTMETRICS, 0, &ncm, SPIF_UPDATEINIFILE| SPIF_SENDCHANGE); if (!test_error_msg(rc,"SPI_SETNONCLIENTMETRICS")) return FALSE; - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); test_change_message( SPI_SETNONCLIENTMETRICS, 1 ); } if( curr_val) { /* skip if 0, some windows versions return 0 others 1 */ @@ -781,11 +782,11 @@ static BOOL test_setborder(UINT curr_val, int usesetborder, int dpi) if (curr_val == 0) curr_val = 1; /* should be the same as the non client metrics */ rc=SystemParametersInfoA( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0); - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); eq( (UINT)ncm.iBorderWidth, curr_val, "NonClientMetric.iBorderWidth", "%d"); /* and from SPI_GETBORDER */ rc=SystemParametersInfoA( SPI_GETBORDER, 0, &border, 0 ); - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); eq( border, curr_val, "SPI_{GET,SET}BORDER", "%d"); /* test some SystemMetrics */ frame = curr_val + GetSystemMetrics( SM_CXDLGFRAME ); @@ -845,7 +846,7 @@ static void test_SPI_SETBORDER( void ) /* 6 */ rc=SystemParametersInfoA( SPI_SETNONCLIENTMETRICS, 0, &ncmsave, SPIF_UPDATEINIFILE| SPIF_SENDCHANGE); test_change_message( SPI_SETNONCLIENTMETRICS, 1 ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); }
static void test_SPI_SETKEYBOARDSPEED( void ) /* 10 */ @@ -869,18 +870,18 @@ static void test_SPI_SETKEYBOARDSPEED( void ) /* 10 */ rc=SystemParametersInfoA( SPI_SETKEYBOARDSPEED, vals[i], 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); if (!test_error_msg(rc,"SPI_SETKEYBOARDSPEED")) return; - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); test_change_message( SPI_SETKEYBOARDSPEED, 0 ); sprintf( buf, "%d", vals[i] ); test_reg_key( SPI_SETKEYBOARDSPEED_REGKEY, SPI_SETKEYBOARDSPEED_VALNAME, buf );
rc=SystemParametersInfoA( SPI_GETKEYBOARDSPEED, 0, &v, 0 ); - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); eq( v, vals[i], "SPI_{GET,SET}KEYBOARDSPEED", "%d" ); }
rc=SystemParametersInfoA( SPI_SETKEYBOARDSPEED, old_speed, 0, SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); }
/* test_SPI_ICONHORIZONTALSPACING helper */ @@ -893,7 +894,7 @@ static BOOL dotest_spi_iconhorizontalspacing( INT curr_val) rc=SystemParametersInfoA( SPI_ICONHORIZONTALSPACING, curr_val, 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE); if (!test_error_msg(rc,"SPI_ICONHORIZONTALSPACING")) return FALSE; - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); test_change_message( SPI_ICONHORIZONTALSPACING, 0 ); curr_val = max( curr_val, min_val ); /* The registry keys depend on the Windows version and the values too @@ -906,14 +907,14 @@ static BOOL dotest_spi_iconhorizontalspacing( INT curr_val) "wrong value in registry %d, expected %d\n", regval, curr_val); /* compare with what SPI_ICONHORIZONTALSPACING returns */ rc=SystemParametersInfoA( SPI_ICONHORIZONTALSPACING, 0, &spacing, 0 ); - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); eq( spacing, curr_val, "ICONHORIZONTALSPACING", "%d"); /* and with a system metrics */ eq( GetSystemMetrics( SM_CXICONSPACING ), curr_val, "SM_CXICONSPACING", "%d" ); /* and with what SPI_GETICONMETRICS returns */ im.cbSize = sizeof(ICONMETRICSA); rc=SystemParametersInfoA( SPI_GETICONMETRICS, sizeof(ICONMETRICSA), &im, FALSE ); - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); eq( im.iHorzSpacing, curr_val, "SPI_GETICONMETRICS", "%d" ); return TRUE; } @@ -934,7 +935,7 @@ static void test_SPI_ICONHORIZONTALSPACING( void ) /* 13 */ dotest_spi_iconhorizontalspacing( 10); /* minimum is 32 */ /* restore */ rc=SystemParametersInfoA( SPI_ICONHORIZONTALSPACING, old_spacing, 0, SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); }
static void test_SPI_SETSCREENSAVETIMEOUT( void ) /* 14 */ @@ -958,20 +959,20 @@ static void test_SPI_SETSCREENSAVETIMEOUT( void ) /* 14 */ rc=SystemParametersInfoA( SPI_SETSCREENSAVETIMEOUT, vals[i], 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); if (!test_error_msg(rc,"SPI_SETSCREENSAVETIMEOUT")) return; - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); test_change_message( SPI_SETSCREENSAVETIMEOUT, 0 ); sprintf( buf, "%d", vals[i] ); test_reg_key( SPI_SETSCREENSAVETIMEOUT_REGKEY, SPI_SETSCREENSAVETIMEOUT_VALNAME, buf );
rc = SystemParametersInfoA( SPI_GETSCREENSAVETIMEOUT, 0, &v, 0 ); - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); eq( v, vals[i], "SPI_{GET,SET}SCREENSAVETIMEOUT", "%d" ); }
rc=SystemParametersInfoA( SPI_SETSCREENSAVETIMEOUT, old_timeout, 0, SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); }
static void test_SPI_SETSCREENSAVEACTIVE( void ) /* 17 */ @@ -994,20 +995,20 @@ static void test_SPI_SETSCREENSAVEACTIVE( void ) /* 17 */ rc=SystemParametersInfoA( SPI_SETSCREENSAVEACTIVE, vals[i], 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); if (!test_error_msg(rc,"SPI_SETSCREENSAVEACTIVE")) return; - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); test_change_message( SPI_SETSCREENSAVEACTIVE, 0 ); test_reg_key( SPI_SETSCREENSAVEACTIVE_REGKEY, SPI_SETSCREENSAVEACTIVE_VALNAME, vals[i] ? "1" : "0" );
rc=SystemParametersInfoA( SPI_GETSCREENSAVEACTIVE, 0, &v, 0 ); - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); ok(v == vals[i] || broken(! v) /* Win 7 */, "SPI_{GET,SET}SCREENSAVEACTIVE: got %d instead of %d\n", v, vals[i]); }
rc=SystemParametersInfoA( SPI_SETSCREENSAVEACTIVE, old_b, 0, SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); }
static void test_SPI_SETGRIDGRANULARITY( void ) /* 19 */ @@ -1036,19 +1037,19 @@ static void test_SPI_SETKEYBOARDDELAY( void ) /* 23 */ rc=SystemParametersInfoA( SPI_SETKEYBOARDDELAY, vals[i], 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); if (!test_error_msg(rc,"SPI_SETKEYBOARDDELAY")) return; - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); test_change_message( SPI_SETKEYBOARDDELAY, 0 ); sprintf( buf, "%d", vals[i] ); test_reg_key( SPI_SETKEYBOARDDELAY_REGKEY, SPI_SETKEYBOARDDELAY_VALNAME, buf );
rc=SystemParametersInfoA( SPI_GETKEYBOARDDELAY, 0, &delay, 0 ); - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); eq( delay, vals[i], "SPI_{GET,SET}KEYBOARDDELAY", "%d" ); }
rc=SystemParametersInfoA( SPI_SETKEYBOARDDELAY, old_delay, 0, SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); }
@@ -1062,7 +1063,7 @@ static BOOL dotest_spi_iconverticalspacing( INT curr_val) rc=SystemParametersInfoA( SPI_ICONVERTICALSPACING, curr_val, 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE); if (!test_error_msg(rc,"SPI_ICONVERTICALSPACING")) return FALSE; - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); test_change_message( SPI_ICONVERTICALSPACING, 0 ); curr_val = max( curr_val, min_val ); /* The registry keys depend on the Windows version and the values too @@ -1075,14 +1076,14 @@ static BOOL dotest_spi_iconverticalspacing( INT curr_val) "wrong value in registry %d, expected %d\n", regval, curr_val); /* compare with what SPI_ICONVERTICALSPACING returns */ rc=SystemParametersInfoA( SPI_ICONVERTICALSPACING, 0, &spacing, 0 ); - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); eq( spacing, curr_val, "ICONVERTICALSPACING", "%d" ); /* and with a system metrics */ eq( GetSystemMetrics( SM_CYICONSPACING ), curr_val, "SM_CYICONSPACING", "%d" ); /* and with what SPI_GETICONMETRICS returns */ im.cbSize = sizeof(ICONMETRICSA); rc=SystemParametersInfoA( SPI_GETICONMETRICS, sizeof(ICONMETRICSA), &im, FALSE ); - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); eq( im.iVertSpacing, curr_val, "SPI_GETICONMETRICS", "%d" ); return TRUE; } @@ -1105,7 +1106,7 @@ static void test_SPI_ICONVERTICALSPACING( void ) /* 24 */ /* restore */ rc=SystemParametersInfoA( SPI_ICONVERTICALSPACING, old_spacing, 0, SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); }
static void test_SPI_SETICONTITLEWRAP( void ) /* 26 */ @@ -1130,7 +1131,7 @@ static void test_SPI_SETICONTITLEWRAP( void ) /* 26 */ rc=SystemParametersInfoA( SPI_SETICONTITLEWRAP, vals[i], 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); if (!test_error_msg(rc,"SPI_SETICONTITLEWRAP")) return; - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); test_change_message( SPI_SETICONTITLEWRAP, 1 ); regval = metricfromreg( SPI_SETICONTITLEWRAP_REGKEY2, SPI_SETICONTITLEWRAP_VALNAME, dpi); @@ -1140,17 +1141,17 @@ static void test_SPI_SETICONTITLEWRAP( void ) /* 26 */ ok( regval == vals[i], "wrong value in registry %d, expected %d\n", regval, vals[i] );
rc=SystemParametersInfoA( SPI_GETICONTITLEWRAP, 0, &v, 0 ); - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); eq( v, vals[i], "SPI_{GET,SET}ICONTITLEWRAP", "%d" ); /* and test with what SPI_GETICONMETRICS returns */ im.cbSize = sizeof(ICONMETRICSA); rc=SystemParametersInfoA( SPI_GETICONMETRICS, sizeof(ICONMETRICSA), &im, FALSE ); - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); eq( im.iTitleWrap, (BOOL)vals[i], "SPI_GETICONMETRICS", "%d" ); }
rc=SystemParametersInfoA( SPI_SETICONTITLEWRAP, old_b, 0, SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); }
static void test_SPI_SETMENUDROPALIGNMENT( void ) /* 28 */ @@ -1173,7 +1174,7 @@ static void test_SPI_SETMENUDROPALIGNMENT( void ) /* 28 */ rc=SystemParametersInfoA( SPI_SETMENUDROPALIGNMENT, vals[i], 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); if (!test_error_msg(rc,"SPI_SETMENUDROPALIGNMENT")) return; - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); test_change_message( SPI_SETMENUDROPALIGNMENT, 0 ); test_reg_key_ex( SPI_SETMENUDROPALIGNMENT_REGKEY1, SPI_SETMENUDROPALIGNMENT_REGKEY2, @@ -1181,7 +1182,7 @@ static void test_SPI_SETMENUDROPALIGNMENT( void ) /* 28 */ vals[i] ? "1" : "0" );
rc=SystemParametersInfoA( SPI_GETMENUDROPALIGNMENT, 0, &v, 0 ); - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); eq( v, vals[i], "SPI_{GET,SET}MENUDROPALIGNMENT", "%d" ); eq( GetSystemMetrics( SM_MENUDROPALIGNMENT ), (int)vals[i], "SM_MENUDROPALIGNMENT", "%d" ); @@ -1189,7 +1190,7 @@ static void test_SPI_SETMENUDROPALIGNMENT( void ) /* 28 */
rc=SystemParametersInfoA( SPI_SETMENUDROPALIGNMENT, old_b, 0, SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); }
static void test_SPI_SETDOUBLECLKWIDTH( void ) /* 29 */ @@ -1223,7 +1224,7 @@ static void test_SPI_SETDOUBLECLKWIDTH( void ) /* 29 */
rc=SystemParametersInfoA( SPI_SETDOUBLECLKWIDTH, old_width, 0, SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); }
static void test_SPI_SETDOUBLECLKHEIGHT( void ) /* 30 */ @@ -1257,7 +1258,7 @@ static void test_SPI_SETDOUBLECLKHEIGHT( void ) /* 30 */
rc=SystemParametersInfoA( SPI_SETDOUBLECLKHEIGHT, old_height, 0, SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); }
static void test_SPI_SETDOUBLECLICKTIME( void ) /* 32 */ @@ -1288,7 +1289,7 @@ static void test_SPI_SETDOUBLECLICKTIME( void ) /* 32 */ curr_val = 1000; rc=SystemParametersInfoA( SPI_SETDOUBLECLICKTIME, curr_val, 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); test_change_message( SPI_SETDOUBLECLICKTIME, 0 ); sprintf( buf, "%d", curr_val ); test_reg_key( SPI_SETDOUBLECLICKTIME_REGKEY, @@ -1313,7 +1314,7 @@ static void test_SPI_SETDOUBLECLICKTIME( void ) /* 32 */ eq( GetDoubleClickTime(), curr_val, "GetDoubleClickTime", "%d" );
rc=SystemParametersInfoA(SPI_SETDOUBLECLICKTIME, old_time, 0, SPIF_UPDATEINIFILE); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); }
static void test_SPI_SETMOUSEBUTTONSWAP( void ) /* 33 */ @@ -1347,7 +1348,7 @@ static void test_SPI_SETMOUSEBUTTONSWAP( void ) /* 33 */
rc=SystemParametersInfoA( SPI_SETMOUSEBUTTONSWAP, old_b, 0, SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); }
static void test_SPI_SETFASTTASKSWITCH( void ) /* 36 */ @@ -1388,19 +1389,19 @@ static void test_SPI_SETDRAGFULLWINDOWS( void ) /* 37 */ rc=SystemParametersInfoA( SPI_SETDRAGFULLWINDOWS, vals[i], 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); if (!test_error_msg(rc,"SPI_SETDRAGFULLWINDOWS")) return; - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); test_change_message( SPI_SETDRAGFULLWINDOWS, 0 ); test_reg_key( SPI_SETDRAGFULLWINDOWS_REGKEY, SPI_SETDRAGFULLWINDOWS_VALNAME, vals[i] ? "1" : "0" );
rc=SystemParametersInfoA( SPI_GETDRAGFULLWINDOWS, 0, &v, 0 ); - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); eq( v, vals[i], "SPI_{GET,SET}DRAGFULLWINDOWS", "%d" ); }
rc=SystemParametersInfoA( SPI_SETDRAGFULLWINDOWS, old_b, 0, SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); }
#define test_reg_metric( KEY, VAL, val) do { \ @@ -1424,7 +1425,7 @@ static void test_SPI_SETDRAGFULLWINDOWS( void ) /* 37 */ (LF).lfWidth == lfreg.lfWidth &&\ (LF).lfWeight == lfreg.lfWeight &&\ !strcmp( (LF).lfFaceName, lfreg.lfFaceName)\ - , "wrong value "%s" in registry %d, %d\n", VAL, (LF).lfHeight, lfreg.lfHeight);\ + , "wrong value "%s" in registry %ld, %ld\n", VAL, (LF).lfHeight, lfreg.lfHeight);\ } while(0)
#define TEST_NONCLIENTMETRICS_REG( ncm) do { \ @@ -1534,11 +1535,11 @@ static void test_SPI_SETNONCLIENTMETRICS( void ) /* 44 */ rc=SystemParametersInfoA( SPI_SETNONCLIENTMETRICS, 0, &Ncmnew, SPIF_UPDATEINIFILE| SPIF_SENDCHANGE); if (!test_error_msg(rc,"SPI_SETNONCLIENTMETRICS")) return; - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); test_change_message( SPI_SETNONCLIENTMETRICS, 1 ); /* get them back */ rc=SystemParametersInfoA( SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICSA), &Ncmcur, FALSE ); - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); /* test registry entries */ TEST_NONCLIENTMETRICS_REG( Ncmcur ); /* test the system metrics with these settings */ @@ -1557,13 +1558,13 @@ static void test_SPI_SETNONCLIENTMETRICS( void ) /* 44 */
rc=SystemParametersInfoA( SPI_SETNONCLIENTMETRICS, 0, &Ncmnew, SPIF_UPDATEINIFILE| SPIF_SENDCHANGE); - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); test_change_message( SPI_SETNONCLIENTMETRICS, 1 ); /* raw values are in registry */ TEST_NONCLIENTMETRICS_REG( Ncmnew ); /* get them back */ rc=SystemParametersInfoA( SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICSA), &Ncmcur, FALSE ); - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); /* cooked values are returned */ expect = max( Ncmnew.iMenuHeight, 2 + get_tmheight( &Ncmnew.lfMenuFont, 1)); ok( Ncmcur.iMenuHeight == expect, @@ -1589,7 +1590,7 @@ static void test_SPI_SETNONCLIENTMETRICS( void ) /* 44 */ rc=SystemParametersInfoA( SPI_SETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICSA), &Ncmorig, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE); test_change_message( SPI_SETNONCLIENTMETRICS, 0 ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); /* test the system metrics with these settings */ test_GetSystemMetrics(); } @@ -1634,10 +1635,10 @@ static void test_SPI_SETMINIMIZEDMETRICS( void ) /* 44 */ rc=SystemParametersInfoA( SPI_SETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS), &lpMm_cur, SPIF_UPDATEINIFILE ); if (!test_error_msg(rc,"SPI_SETMINIMIZEDMETRICS")) return; - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); /* read them back */ rc=SystemParametersInfoA( SPI_GETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS), &lpMm_new, FALSE ); - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); /* and compare */ eq( lpMm_new.iWidth, lpMm_cur.iWidth, "iWidth", "%d" ); eq( lpMm_new.iHorzGap, lpMm_cur.iHorzGap, "iHorzGap", "%d" ); @@ -1672,10 +1673,10 @@ static void test_SPI_SETMINIMIZEDMETRICS( void ) /* 44 */ lpMm_cur.iArrange = - 1; rc=SystemParametersInfoA( SPI_SETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS), &lpMm_cur, SPIF_UPDATEINIFILE ); - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); /* read back */ rc=SystemParametersInfoA( SPI_GETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS), &lpMm_new, FALSE ); - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); /* the width and H/V gaps have minimum 0, arrange is and'd with 0xf */ eq( lpMm_new.iWidth, 0, "iWidth", "%d" ); eq( lpMm_new.iHorzGap, 0, "iHorzGap", "%d" ); @@ -1710,10 +1711,10 @@ static void test_SPI_SETMINIMIZEDMETRICS( void ) /* 44 */ /* restore */ rc=SystemParametersInfoA( SPI_SETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS), &lpMm_orig, SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); /* check that */ rc=SystemParametersInfoA( SPI_GETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS), &lpMm_new, FALSE ); - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); eq( lpMm_new.iWidth, lpMm_orig.iWidth, "iWidth", "%d" ); eq( lpMm_new.iHorzGap, lpMm_orig.iHorzGap, "iHorzGap", "%d" ); eq( lpMm_new.iVertGap, lpMm_orig.iVertGap, "iVertGap", "%d" ); @@ -1777,18 +1778,18 @@ static void test_SPI_SETICONMETRICS( void ) /* 46 */
rc=SystemParametersInfoA( SPI_SETICONMETRICS, sizeof(ICONMETRICSA), &im_cur, SPIF_UPDATEINIFILE ); if (!test_error_msg(rc,"SPI_SETICONMETRICS")) return; - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError());
rc=SystemParametersInfoA( SPI_GETICONMETRICS, sizeof(ICONMETRICSA), &im_new, FALSE ); - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); /* test GET <-> SETICONMETRICS */ eq( im_new.iHorzSpacing, im_cur.iHorzSpacing, "iHorzSpacing", "%d" ); eq( im_new.iVertSpacing, im_cur.iVertSpacing, "iVertSpacing", "%d" ); eq( im_new.iTitleWrap, im_cur.iTitleWrap, "iTitleWrap", "%d" ); - eq( im_new.lfFont.lfHeight, im_cur.lfFont.lfHeight, "lfHeight", "%d" ); - eq( im_new.lfFont.lfWidth, im_cur.lfFont.lfWidth, "lfWidth", "%d" ); - eq( im_new.lfFont.lfEscapement, im_cur.lfFont.lfEscapement, "lfEscapement", "%d" ); - eq( im_new.lfFont.lfWeight, im_cur.lfFont.lfWeight, "lfWeight", "%d" ); + eq( im_new.lfFont.lfHeight, im_cur.lfFont.lfHeight, "lfHeight", "%ld" ); + eq( im_new.lfFont.lfWidth, im_cur.lfFont.lfWidth, "lfWidth", "%ld" ); + eq( im_new.lfFont.lfEscapement, im_cur.lfFont.lfEscapement, "lfEscapement", "%ld" ); + eq( im_new.lfFont.lfWeight, im_cur.lfFont.lfWeight, "lfWeight", "%ld" ); eq( im_new.lfFont.lfItalic, im_cur.lfFont.lfItalic, "lfItalic", "%d" ); eq( im_new.lfFont.lfStrikeOut, im_cur.lfFont.lfStrikeOut, "lfStrikeOut", "%d" ); eq( im_new.lfFont.lfUnderline, im_cur.lfFont.lfUnderline, "lfUnderline", "%d" ); @@ -1829,10 +1830,10 @@ static void test_SPI_SETICONMETRICS( void ) /* 46 */ wrap, im_cur.iTitleWrap); /* restore old values */ rc=SystemParametersInfoA( SPI_SETICONMETRICS, sizeof(ICONMETRICSA), &im_orig,SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError());
rc=SystemParametersInfoA( SPI_GETICONMETRICS, sizeof(ICONMETRICSA), &im_new, FALSE ); - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError());
eq( im_new.iHorzSpacing, im_orig.iHorzSpacing, "iHorzSpacing", "%d" ); eq( im_new.iVertSpacing, im_orig.iVertSpacing, "iVertSpacing", "%d" ); @@ -1862,33 +1863,33 @@ static void test_SPI_SETWORKAREA( void ) /* 47 */ rc=SystemParametersInfoA( SPI_SETWORKAREA, 0, &curr_val, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); if (!test_error_msg(rc,"SPI_SETWORKAREA")) return; - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); rc=SystemParametersInfoA( SPI_GETWORKAREA, 0, &area, 0 ); - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); if( !EqualRect( &area, &curr_val)) /* no message if rect has not changed */ test_change_message( SPI_SETWORKAREA, 0); - eq( area.left, curr_val.left, "left", "%d" ); - eq( area.top, curr_val.top, "top", "%d" ); + eq( area.left, curr_val.left, "left", "%ld" ); + eq( area.top, curr_val.top, "top", "%ld" ); /* size may be rounded */ ok( area.right >= curr_val.right - 16 && area.right < curr_val.right + 16, - "right: got %d instead of %d\n", area.right, curr_val.right ); + "right: got %ld instead of %ld\n", area.right, curr_val.right ); ok( area.bottom >= curr_val.bottom - 16 && area.bottom < curr_val.bottom + 16, - "bottom: got %d instead of %d\n", area.bottom, curr_val.bottom ); + "bottom: got %ld instead of %ld\n", area.bottom, curr_val.bottom ); curr_val = area; rc=SystemParametersInfoA( SPI_SETWORKAREA, 0, &old_area, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); rc=SystemParametersInfoA( SPI_GETWORKAREA, 0, &area, 0 ); - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); if( !EqualRect( &area, &curr_val)) /* no message if rect has not changed */ test_change_message( SPI_SETWORKAREA, 0 ); - eq( area.left, old_area.left, "left", "%d" ); - eq( area.top, old_area.top, "top", "%d" ); + eq( area.left, old_area.left, "left", "%ld" ); + eq( area.top, old_area.top, "top", "%ld" ); /* size may be rounded */ ok( area.right >= old_area.right - 16 && area.right < old_area.right + 16, - "right: got %d instead of %d\n", area.right, old_area.right ); + "right: got %ld instead of %ld\n", area.right, old_area.right ); ok( area.bottom >= old_area.bottom - 16 && area.bottom < old_area.bottom + 16, - "bottom: got %d instead of %d\n", area.bottom, old_area.bottom ); + "bottom: got %ld instead of %ld\n", area.bottom, old_area.bottom ); }
static void test_SPI_SETSHOWSOUNDS( void ) /* 57 */ @@ -1911,21 +1912,21 @@ static void test_SPI_SETSHOWSOUNDS( void ) /* 57 */ rc=SystemParametersInfoA( SPI_SETSHOWSOUNDS, vals[i], 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); if (!test_error_msg(rc,"SPI_SETSHOWSOUNDS")) return; - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); test_change_message( SPI_SETSHOWSOUNDS, 1 ); test_reg_key( SPI_SETSHOWSOUNDS_REGKEY, SPI_SETSHOWSOUNDS_VALNAME, vals[i] ? "1" : "0" );
rc=SystemParametersInfoA( SPI_GETSHOWSOUNDS, 0, &v, 0 ); - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); eq( v, vals[i], "SPI_GETSHOWSOUNDS", "%d" ); eq( GetSystemMetrics( SM_SHOWSOUNDS ), (int)vals[i], "SM_SHOWSOUNDS", "%d" ); }
rc=SystemParametersInfoA( SPI_SETSHOWSOUNDS, old_b, 0, SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); }
static void test_SPI_SETKEYBOARDPREF( void ) /* 69 */ @@ -1948,19 +1949,19 @@ static void test_SPI_SETKEYBOARDPREF( void ) /* 69 */ rc=SystemParametersInfoA( SPI_SETKEYBOARDPREF, vals[i], 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); if (!test_error_msg(rc,"SPI_SETKEYBOARDPREF")) return; - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); test_change_message( SPI_SETKEYBOARDPREF, 1 ); test_reg_key_ex2( SPI_SETKEYBOARDPREF_REGKEY, SPI_SETKEYBOARDPREF_REGKEY_LEGACY, SPI_SETKEYBOARDPREF_VALNAME, SPI_SETKEYBOARDPREF_VALNAME_LEGACY, vals[i] ? "1" : "0" );
rc=SystemParametersInfoA( SPI_GETKEYBOARDPREF, 0, &v, 0 ); - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); eq( v, (BOOL)vals[i], "SPI_GETKEYBOARDPREF", "%d" ); }
rc=SystemParametersInfoA( SPI_SETKEYBOARDPREF, old_b, 0, SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); }
static void test_SPI_SETSCREENREADER( void ) /* 71 */ @@ -1983,19 +1984,19 @@ static void test_SPI_SETSCREENREADER( void ) /* 71 */ rc=SystemParametersInfoA( SPI_SETSCREENREADER, vals[i], 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); if (!test_error_msg(rc,"SPI_SETSCREENREADER")) return; - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); test_change_message( SPI_SETSCREENREADER, 1 ); test_reg_key_ex2_optional( SPI_SETSCREENREADER_REGKEY, SPI_SETSCREENREADER_REGKEY_LEGACY, SPI_SETSCREENREADER_VALNAME, SPI_SETSCREENREADER_VALNAME_LEGACY, vals[i] ? "1" : "0" );
rc=SystemParametersInfoA( SPI_GETSCREENREADER, 0, &v, 0 ); - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); eq( v, (BOOL)vals[i], "SPI_GETSCREENREADER", "%d" ); }
rc=SystemParametersInfoA( SPI_SETSCREENREADER, old_b, 0, SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); }
static void test_SPI_SETFONTSMOOTHING( void ) /* 75 */ @@ -2022,7 +2023,7 @@ static void test_SPI_SETFONTSMOOTHING( void ) /* 75 */ rc=SystemParametersInfoA( SPI_SETFONTSMOOTHING, vals[i], 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); if (!test_error_msg(rc,"SPI_SETFONTSMOOTHING")) return; - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); test_change_message( SPI_SETFONTSMOOTHING, 0 ); test_reg_key( SPI_SETFONTSMOOTHING_REGKEY, SPI_SETFONTSMOOTHING_VALNAME, @@ -2031,7 +2032,7 @@ static void test_SPI_SETFONTSMOOTHING( void ) /* 75 */ rc=SystemParametersInfoA( SPI_SETFONTSMOOTHINGTYPE, 0, UlongToPtr(vals[i]), SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); if (!test_error_msg(rc,"SPI_SETFONTSMOOTHINGTYPE")) return; - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); test_change_message( SPI_SETFONTSMOOTHINGTYPE, 0 ); test_reg_key_dword( SPI_SETFONTSMOOTHING_REGKEY, SPI_SETFONTSMOOTHINGTYPE_VALNAME, &vals[i] ); @@ -2039,7 +2040,7 @@ static void test_SPI_SETFONTSMOOTHING( void ) /* 75 */ rc=SystemParametersInfoA( SPI_SETFONTSMOOTHINGCONTRAST, 0, UlongToPtr(vals[i]), SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); if (!test_error_msg(rc,"SPI_SETFONTSMOOTHINGCONTRAST")) return; - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); test_change_message( SPI_SETFONTSMOOTHINGCONTRAST, 0 ); test_reg_key_dword( SPI_SETFONTSMOOTHING_REGKEY, SPI_SETFONTSMOOTHINGCONTRAST_VALNAME, &vals[i] ); @@ -2047,36 +2048,36 @@ static void test_SPI_SETFONTSMOOTHING( void ) /* 75 */ rc=SystemParametersInfoA( SPI_SETFONTSMOOTHINGORIENTATION, 0, UlongToPtr(vals[i]), SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); if (!test_error_msg(rc,"SPI_SETFONTSMOOTHINGORIENTATION")) return; - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); test_change_message( SPI_SETFONTSMOOTHINGORIENTATION, 0 ); test_reg_key_dword( SPI_SETFONTSMOOTHING_REGKEY, SPI_SETFONTSMOOTHINGORIENTATION_VALNAME, &vals[i] );
rc=SystemParametersInfoA( SPI_GETFONTSMOOTHING, 0, &v, 0 ); - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); eq( v, vals[i] ? 1 : 0, "SPI_GETFONTSMOOTHING", "%d" );
rc=SystemParametersInfoA( SPI_GETFONTSMOOTHINGTYPE, 0, &v, 0 ); - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); ok( v == vals[i], "wrong value %x/%x\n", v, vals[i] );
rc=SystemParametersInfoA( SPI_GETFONTSMOOTHINGCONTRAST, 0, &v, 0 ); - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); ok( v == vals[i], "wrong value %x/%x\n", v, vals[i] );
rc=SystemParametersInfoA( SPI_GETFONTSMOOTHINGORIENTATION, 0, &v, 0 ); - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); ok( v == vals[i], "wrong value %x/%x\n", v, vals[i] ); }
rc=SystemParametersInfoA( SPI_SETFONTSMOOTHING, old_b, 0, SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); rc=SystemParametersInfoA( SPI_SETFONTSMOOTHINGTYPE, old_type, 0, SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); rc=SystemParametersInfoA( SPI_SETFONTSMOOTHINGCONTRAST, old_contrast, 0, SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); rc=SystemParametersInfoA( SPI_SETFONTSMOOTHINGORIENTATION, old_orient, 0, SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); }
static void test_SPI_SETLOWPOWERACTIVE( void ) /* 85 */ @@ -2099,7 +2100,7 @@ static void test_SPI_SETLOWPOWERACTIVE( void ) /* 85 */ rc=SystemParametersInfoA( SPI_SETLOWPOWERACTIVE, vals[i], 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); if (!test_error_msg(rc,"SPI_SETLOWPOWERACTIVE")) return; - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); test_change_message( SPI_SETLOWPOWERACTIVE, 1 ); test_reg_key_optional( SPI_SETLOWPOWERACTIVE_REGKEY, SPI_SETLOWPOWERACTIVE_VALNAME, @@ -2108,13 +2109,13 @@ static void test_SPI_SETLOWPOWERACTIVE( void ) /* 85 */ /* SPI_SETLOWPOWERACTIVE is not persistent in win2k3 and above */ v = 0xdeadbeef; rc=SystemParametersInfoA( SPI_GETLOWPOWERACTIVE, 0, &v, 0 ); - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); ok(v == vals[i] || v == 0, /* win2k3 */ "SPI_GETLOWPOWERACTIVE: got %d instead of 0 or %d\n", v, vals[i]); }
rc=SystemParametersInfoA( SPI_SETLOWPOWERACTIVE, old_b, 0, SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); }
static void test_SPI_SETPOWEROFFACTIVE( void ) /* 86 */ @@ -2137,7 +2138,7 @@ static void test_SPI_SETPOWEROFFACTIVE( void ) /* 86 */ rc=SystemParametersInfoA( SPI_SETPOWEROFFACTIVE, vals[i], 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); if (!test_error_msg(rc,"SPI_SETPOWEROFFACTIVE")) return; - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); test_change_message( SPI_SETPOWEROFFACTIVE, 1 ); test_reg_key_optional( SPI_SETPOWEROFFACTIVE_REGKEY, SPI_SETPOWEROFFACTIVE_VALNAME, @@ -2146,13 +2147,13 @@ static void test_SPI_SETPOWEROFFACTIVE( void ) /* 86 */ /* SPI_SETPOWEROFFACTIVE is not persistent in win2k3 and above */ v = 0xdeadbeef; rc=SystemParametersInfoA( SPI_GETPOWEROFFACTIVE, 0, &v, 0 ); - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); ok(v == vals[i] || v == 0, /* win2k3 */ "SPI_GETPOWEROFFACTIVE: got %d instead of 0 or %d\n", v, vals[i]); }
rc=SystemParametersInfoA( SPI_SETPOWEROFFACTIVE, old_b, 0, SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); }
static void test_SPI_SETSNAPTODEFBUTTON( void ) /* 95 */ @@ -2175,19 +2176,19 @@ static void test_SPI_SETSNAPTODEFBUTTON( void ) /* 95 */ rc=SystemParametersInfoA( SPI_SETSNAPTODEFBUTTON, vals[i], 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); if (!test_error_msg(rc,"SPI_SETSNAPTODEFBUTTON")) return; - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); test_change_message( SPI_SETSNAPTODEFBUTTON, 0 ); test_reg_key_optional( SPI_SETSNAPTODEFBUTTON_REGKEY, SPI_SETSNAPTODEFBUTTON_VALNAME, vals[i] ? "1" : "0" );
rc=SystemParametersInfoA( SPI_GETSNAPTODEFBUTTON, 0, &v, 0 ); - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); eq( v, vals[i], "SPI_GETSNAPTODEFBUTTON", "%d" ); }
rc=SystemParametersInfoA( SPI_SETSNAPTODEFBUTTON, old_b, 0, SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); }
static void test_SPI_SETMOUSEHOVERWIDTH( void ) /* 99 */ @@ -2211,20 +2212,20 @@ static void test_SPI_SETMOUSEHOVERWIDTH( void ) /* 99 */ rc=SystemParametersInfoA( SPI_SETMOUSEHOVERWIDTH, vals[i], 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); if (!test_error_msg(rc,"SPI_SETMOUSEHOVERWIDTH")) return; - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); test_change_message( SPI_SETMOUSEHOVERWIDTH, 0 ); sprintf( buf, "%d", vals[i] ); test_reg_key( SPI_SETMOUSEHOVERWIDTH_REGKEY, SPI_SETMOUSEHOVERWIDTH_VALNAME, buf );
SystemParametersInfoA( SPI_GETMOUSEHOVERWIDTH, 0, &v, 0 ); - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); eq( v, vals[i], "SPI_{GET,SET}MOUSEHOVERWIDTH", "%d" ); }
rc=SystemParametersInfoA( SPI_SETMOUSEHOVERWIDTH, old_width, 0, SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); }
static void test_SPI_SETMOUSEHOVERHEIGHT( void ) /* 101 */ @@ -2248,20 +2249,20 @@ static void test_SPI_SETMOUSEHOVERHEIGHT( void ) /* 101 */ rc=SystemParametersInfoA( SPI_SETMOUSEHOVERHEIGHT, vals[i], 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); if (!test_error_msg(rc,"SPI_SETMOUSEHOVERHEIGHT")) return; - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); test_change_message( SPI_SETMOUSEHOVERHEIGHT, 0 ); sprintf( buf, "%d", vals[i] ); test_reg_key( SPI_SETMOUSEHOVERHEIGHT_REGKEY, SPI_SETMOUSEHOVERHEIGHT_VALNAME, buf );
SystemParametersInfoA( SPI_GETMOUSEHOVERHEIGHT, 0, &v, 0 ); - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); eq( v, vals[i], "SPI_{GET,SET}MOUSEHOVERHEIGHT", "%d" ); }
rc=SystemParametersInfoA( SPI_SETMOUSEHOVERHEIGHT, old_height, 0, SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); }
static void test_SPI_SETMOUSEHOVERTIME( void ) /* 103 */ @@ -2289,20 +2290,20 @@ static void test_SPI_SETMOUSEHOVERTIME( void ) /* 103 */ rc=SystemParametersInfoA( SPI_SETMOUSEHOVERTIME, vals[i], 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); if (!test_error_msg(rc,"SPI_SETMOUSEHOVERTIME")) return; - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); test_change_message( SPI_SETMOUSEHOVERTIME, 0 ); sprintf( buf, "%d", vals[i] ); test_reg_key( SPI_SETMOUSEHOVERTIME_REGKEY, SPI_SETMOUSEHOVERTIME_VALNAME, buf );
SystemParametersInfoA( SPI_GETMOUSEHOVERTIME, 0, &v, 0 ); - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); eq( v, vals[i], "SPI_{GET,SET}MOUSEHOVERTIME", "%d" ); }
rc=SystemParametersInfoA( SPI_SETMOUSEHOVERTIME, old_time, 0, SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); }
static void test_SPI_SETWHEELSCROLLLINES( void ) /* 105 */ @@ -2328,20 +2329,20 @@ static void test_SPI_SETWHEELSCROLLLINES( void ) /* 105 */ rc=SystemParametersInfoA( SPI_SETWHEELSCROLLLINES, vals[i], 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); if (!test_error_msg(rc,"SPI_SETWHEELSCROLLLINES")) return; - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); test_change_message( SPI_SETWHEELSCROLLLINES, 0 ); sprintf( buf, "%d", vals[i] ); test_reg_key( SPI_SETMOUSESCROLLLINES_REGKEY, SPI_SETMOUSESCROLLLINES_VALNAME, buf );
SystemParametersInfoA( SPI_GETWHEELSCROLLLINES, 0, &v, 0 ); - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); eq( v, vals[i], "SPI_{GET,SET}WHEELSCROLLLINES", "%d" ); }
rc=SystemParametersInfoA( SPI_SETWHEELSCROLLLINES, old_lines, 0, SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); }
static void test_SPI_SETMENUSHOWDELAY( void ) /* 107 */ @@ -2367,20 +2368,20 @@ static void test_SPI_SETMENUSHOWDELAY( void ) /* 107 */ rc=SystemParametersInfoA( SPI_SETMENUSHOWDELAY, vals[i], 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); if (!test_error_msg(rc,"SPI_SETMENUSHOWDELAY")) return; - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); test_change_message( SPI_SETMENUSHOWDELAY, 0 ); sprintf( buf, "%d", vals[i] ); test_reg_key( SPI_SETMENUSHOWDELAY_REGKEY, SPI_SETMENUSHOWDELAY_VALNAME, buf );
SystemParametersInfoA( SPI_GETMENUSHOWDELAY, 0, &v, 0 ); - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); eq( v, vals[i], "SPI_{GET,SET}MENUSHOWDELAY", "%d" ); }
rc=SystemParametersInfoA( SPI_SETMENUSHOWDELAY, old_delay, 0, SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); }
static void test_SPI_SETWHEELSCROLLCHARS( void ) /* 108 */ @@ -2412,13 +2413,13 @@ static void test_SPI_SETWHEELSCROLLCHARS( void ) /* 108 */ SPI_SETMOUSESCROLLCHARS_VALNAME, buf );
SystemParametersInfoA( SPI_GETWHEELSCROLLCHARS, 0, &v, 0 ); - ok(rc, "%d: rc=%d err=%d\n", i, rc, GetLastError()); + ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); eq( v, vals[i], "SPI_{GET,SET}WHEELSCROLLCHARS", "%d" ); }
rc=SystemParametersInfoA( SPI_SETWHEELSCROLLCHARS, old_chars, 0, SPIF_UPDATEINIFILE ); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError()); }
static void test_SPI_SETWALLPAPER( void ) /* 115 */ @@ -2436,11 +2437,11 @@ static void test_SPI_SETWALLPAPER( void ) /* 115 */ strcpy(newval, ""); rc=SystemParametersInfoA(SPI_SETDESKWALLPAPER, 0, newval, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE); if (!test_error_msg(rc,"SPI_SETDESKWALLPAPER")) return; - ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "SystemParametersInfoA: rc=%d err=%ld\n", rc, GetLastError()); test_change_message(SPI_SETDESKWALLPAPER, 0);
rc=SystemParametersInfoA(SPI_SETDESKWALLPAPER, 0, oldval, SPIF_UPDATEINIFILE); - ok(rc, "***warning*** failed to restore the original value: rc=%d err=%d\n", rc, GetLastError()); + ok(rc, "***warning*** failed to restore the original value: rc=%d err=%ld\n", rc, GetLastError());
test_reg_key(SPI_SETDESKWALLPAPER_REGKEY, SPI_SETDESKWALLPAPER_VALNAME, oldval); } @@ -2492,7 +2493,7 @@ static void test_WM_DISPLAYCHANGE(void) displaychange_ok = FALSE;
if(change_ret != DISP_CHANGE_SUCCESSFUL) { - skip("Setting depth %d failed(ret = %d)\n", test_bpps[i], change_ret); + skip("Setting depth %d failed(ret = %ld)\n", test_bpps[i], change_ret); ok(last_bpp == -1, "WM_DISPLAYCHANGE was sent with wParam %d despite mode change failure\n", last_bpp); continue; } @@ -2888,7 +2889,7 @@ static void test_GetSystemMetrics( void) ncm.iBorderWidth, ncm.iCaptionWidth, ncm.iCaptionHeight, IconSpacing, IconVerticalSpacing); trace( "MenuHeight %d MenuWidth %d ScrollHeight %d ScrollWidth %d SmCaptionHeight %d SmCaptionWidth %d\n", ncm.iMenuHeight, ncm.iMenuWidth, ncm.iScrollHeight, ncm.iScrollWidth, ncm.iSmCaptionHeight, ncm.iSmCaptionWidth); - trace( "Captionfontchar width %d MenuFont %d,%d CaptionWidth from registry: %d screen %d,%d\n", + trace( "Captionfontchar width %d MenuFont %ld,%ld CaptionWidth from registry: %d screen %ld,%ld\n", avcwCaption, tmMenuFont.tmHeight, tmMenuFont.tmExternalLeading, CaptionWidthfromreg, screen.cx, screen.cy); }
@@ -2898,9 +2899,9 @@ static void test_GetSystemMetrics( void) static void compare_font( const LOGFONTW *lf1, const LOGFONTW *lf2, int dpi, int custom_dpi, int line ) { ok_(__FILE__,line)( lf2->lfHeight == (dpi == custom_dpi) ? lf1->lfHeight : MulDiv( lf1->lfHeight, custom_dpi, 2 * dpi ), - "wrong lfHeight %d vs %d\n", lf1->lfHeight, lf2->lfHeight ); + "wrong lfHeight %ld vs %ld\n", lf1->lfHeight, lf2->lfHeight ); ok_(__FILE__,line)( abs( lf1->lfWidth - MulDiv( lf2->lfWidth, dpi, custom_dpi )) <= 1, - "wrong lfWidth %d vs %d\n", lf1->lfWidth, lf2->lfWidth ); + "wrong lfWidth %ld vs %ld\n", lf1->lfWidth, lf2->lfWidth ); ok_(__FILE__,line)( !memcmp( &lf1->lfEscapement, &lf2->lfEscapement, offsetof( LOGFONTW, lfFaceName ) - offsetof( LOGFONTW, lfEscapement )), "font differs\n" ); @@ -2924,10 +2925,10 @@ static void test_metrics_for_dpi( int custom_dpi )
ncm1.cbSize = sizeof(ncm1); ret = SystemParametersInfoW( SPI_GETNONCLIENTMETRICS, sizeof(ncm1), &ncm1, FALSE ); - ok( ret, "SystemParametersInfoW failed err %u\n", GetLastError() ); + ok( ret, "SystemParametersInfoW failed err %lu\n", GetLastError() ); ncm2.cbSize = sizeof(ncm2); ret = pSystemParametersInfoForDpi( SPI_GETNONCLIENTMETRICS, sizeof(ncm2), &ncm2, FALSE, custom_dpi ); - ok( ret, "SystemParametersInfoForDpi failed err %u\n", GetLastError() ); + ok( ret, "SystemParametersInfoForDpi failed err %lu\n", GetLastError() );
for (i = 0; i < 92; i++) { @@ -3005,10 +3006,10 @@ static void test_metrics_for_dpi( int custom_dpi ) } im1.cbSize = sizeof(im1); ret = SystemParametersInfoW( SPI_GETICONMETRICS, sizeof(im1), &im1, FALSE ); - ok( ret, "SystemParametersInfoW failed err %u\n", GetLastError() ); + ok( ret, "SystemParametersInfoW failed err %lu\n", GetLastError() ); im2.cbSize = sizeof(im2); ret = pSystemParametersInfoForDpi( SPI_GETICONMETRICS, sizeof(im2), &im2, FALSE, custom_dpi ); - ok( ret, "SystemParametersInfoForDpi failed err %u\n", GetLastError() ); + ok( ret, "SystemParametersInfoForDpi failed err %lu\n", GetLastError() ); ok( im1.iHorzSpacing == MulDiv( im2.iHorzSpacing, dpi, custom_dpi ), "wrong iHorzSpacing %u vs %u\n", im1.iHorzSpacing, im2.iHorzSpacing ); ok( im1.iVertSpacing == MulDiv( im2.iVertSpacing, dpi, custom_dpi ), "wrong iVertSpacing %u vs %u\n", @@ -3018,9 +3019,9 @@ static void test_metrics_for_dpi( int custom_dpi ) compare_font( &im1.lfFont, &im2.lfFont, dpi, custom_dpi, __LINE__ );
ret = SystemParametersInfoW( SPI_GETICONTITLELOGFONT, sizeof(lf1), &lf1, FALSE ); - ok( ret, "SystemParametersInfoW failed err %u\n", GetLastError() ); + ok( ret, "SystemParametersInfoW failed err %lu\n", GetLastError() ); ret = pSystemParametersInfoForDpi( SPI_GETICONTITLELOGFONT, sizeof(lf2), &lf2, FALSE, custom_dpi ); - ok( ret, "SystemParametersInfoForDpi failed err %u\n", GetLastError() ); + ok( ret, "SystemParametersInfoForDpi failed err %lu\n", GetLastError() ); compare_font( &lf1, &lf2, dpi, custom_dpi, __LINE__ );
/* on high-dpi iPaddedBorderWidth is used in addition to iBorderWidth */ @@ -3057,7 +3058,7 @@ static void test_metrics_for_dpi( int custom_dpi ) SetLastError( 0xdeadbeef ); ret = pSystemParametersInfoForDpi( i, 0, &val, 0, custom_dpi ); ok( !ret, "%u: SystemParametersInfoForDpi succeeded\n", i ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "%u: wrong error %u\n", i, GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "%u: wrong error %lu\n", i, GetLastError() ); } }
@@ -3089,21 +3090,21 @@ static BOOL CALLBACK test_enum_display_settings(HMONITOR hmonitor, HDC hdc, LPRE memset(&mi, 0, sizeof(mi)); mi.cbSize = sizeof(mi); ret = GetMonitorInfoA(hmonitor, (MONITORINFO *)&mi); - ok(ret, "GetMonitorInfoA failed, error %#x\n", GetLastError()); + ok(ret, "GetMonitorInfoA failed, error %#lx\n", GetLastError());
memset(&dm, 0, sizeof(dm)); dm.dmSize = sizeof(dm); ret = EnumDisplaySettingsA(mi.szDevice, ENUM_CURRENT_SETTINGS, &dm); - ok(ret, "EnumDisplaySettingsA failed, error %#x\n", GetLastError()); + ok(ret, "EnumDisplaySettingsA failed, error %#lx\n", GetLastError());
ok((dm.dmFields & (DM_POSITION | DM_PELSWIDTH | DM_PELSHEIGHT)) == (DM_POSITION | DM_PELSWIDTH | DM_PELSHEIGHT), - "Unexpected dmFields %#x.\n", dm.dmFields); - ok(dm.dmPosition.x == mi.rcMonitor.left, "Expect dmPosition.x %d, got %d\n", mi.rcMonitor.left, dm.dmPosition.x); - ok(dm.dmPosition.y == mi.rcMonitor.top, "Expect dmPosition.y %d, got %d\n", mi.rcMonitor.top, dm.dmPosition.y); + "Unexpected dmFields %#lx.\n", dm.dmFields); + ok(dm.dmPosition.x == mi.rcMonitor.left, "Expect dmPosition.x %ld, got %ld\n", mi.rcMonitor.left, dm.dmPosition.x); + ok(dm.dmPosition.y == mi.rcMonitor.top, "Expect dmPosition.y %ld, got %ld\n", mi.rcMonitor.top, dm.dmPosition.y); width = mi.rcMonitor.right - mi.rcMonitor.left; - ok(dm.dmPelsWidth == width, "Expect dmPelsWidth %d, got %d\n", width, dm.dmPelsWidth); + ok(dm.dmPelsWidth == width, "Expect dmPelsWidth %d, got %ld\n", width, dm.dmPelsWidth); height = mi.rcMonitor.bottom - mi.rcMonitor.top; - ok(dm.dmPelsHeight == height, "Expect dmPelsHeight %d, got %d\n", height, dm.dmPelsHeight); + ok(dm.dmPelsHeight == height, "Expect dmPelsHeight %d, got %ld\n", height, dm.dmPelsHeight);
return TRUE; } @@ -3128,8 +3129,8 @@ static void test_EnumDisplaySettings(void) SetLastError(0xdeadbeef); ret = EnumDisplaySettingsA("invalid", ENUM_CURRENT_SETTINGS, &dm); ok(!ret, "EnumDisplaySettingsA succeeded\n"); - ok(GetLastError() == 0xdeadbeef, "Expect error 0xdeadbeef, got %#x\n", GetLastError()); - ok(dm.dmFields == 0, "Expect dmFields unchanged, got %#x\n", dm.dmFields); + ok(GetLastError() == 0xdeadbeef, "Expect error 0xdeadbeef, got %#lx\n", GetLastError()); + ok(dm.dmFields == 0, "Expect dmFields unchanged, got %#lx\n", dm.dmFields);
/* Monitor device names are invalid */ memset(&dm, 0, sizeof(dm)); @@ -3137,8 +3138,8 @@ static void test_EnumDisplaySettings(void) SetLastError(0xdeadbeef); ret = EnumDisplaySettingsA("\\.\DISPLAY1\Monitor0", ENUM_CURRENT_SETTINGS, &dm); ok(!ret, "EnumDisplaySettingsA succeeded\n"); - ok(GetLastError() == 0xdeadbeef, "Expect error 0xdeadbeef, got %#x\n", GetLastError()); - ok(dm.dmFields == 0, "Expect dmFields unchanged, got %#x\n", dm.dmFields); + ok(GetLastError() == 0xdeadbeef, "Expect error 0xdeadbeef, got %#lx\n", GetLastError()); + ok(dm.dmFields == 0, "Expect dmFields unchanged, got %#lx\n", dm.dmFields);
/* Test that passing NULL to device name parameter means to use the primary adapter */ memset(&dm, 0, sizeof(dm)); @@ -3148,45 +3149,45 @@ static void test_EnumDisplaySettings(void) ret = get_primary_adapter_name(primary_adapter); ok(ret, "get_primary_adapter_name failed\n"); ret = EnumDisplaySettingsA(NULL, ENUM_CURRENT_SETTINGS, &dm); - ok(ret, "EnumDisplaySettingsA failed, error %#x\n", GetLastError()); + ok(ret, "EnumDisplaySettingsA failed, error %#lx\n", GetLastError()); ret = EnumDisplaySettingsA(primary_adapter, ENUM_CURRENT_SETTINGS, &dm2); - ok(ret, "EnumDisplaySettingsA failed, error %#x\n", GetLastError()); + ok(ret, "EnumDisplaySettingsA failed, error %#lx\n", GetLastError()); ok(!memcmp(&dm, &dm2, sizeof(dm)), "Expect NULL device is the primary device.\n");
/* Test dmSize */ /* EnumDisplaySettingsA/W modify dmSize and don't check for insufficient dmSize */ memset(&dm, 0, sizeof(dm)); ret = EnumDisplaySettingsA(NULL, ENUM_CURRENT_SETTINGS, &dm); - ok(ret, "EnumDisplaySettingsA failed, error %#x\n", GetLastError()); - ok(dm.dmSize == FIELD_OFFSET(DEVMODEA, dmICMMethod), "Expect dmSize %u, got %u\n", + ok(ret, "EnumDisplaySettingsA failed, error %#lx\n", GetLastError()); + ok(dm.dmSize == FIELD_OFFSET(DEVMODEA, dmICMMethod), "Expect dmSize %lu, got %u\n", FIELD_OFFSET(DEVMODEA, dmICMMethod), dm.dmSize); - ok((dm.dmFields & setting_fields) == setting_fields, "Expect dmFields to contain %#x, got %#x\n", + ok((dm.dmFields & setting_fields) == setting_fields, "Expect dmFields to contain %#lx, got %#lx\n", setting_fields, dm.dmFields);
memset(&dm, 0, sizeof(dm)); dm.dmSize = sizeof(dm); ret = EnumDisplaySettingsA(NULL, ENUM_CURRENT_SETTINGS, &dm); - ok(ret, "EnumDisplaySettingsA failed, error %#x\n", GetLastError()); - ok(dm.dmSize == FIELD_OFFSET(DEVMODEA, dmICMMethod), "Expect dmSize %u, got %u\n", + ok(ret, "EnumDisplaySettingsA failed, error %#lx\n", GetLastError()); + ok(dm.dmSize == FIELD_OFFSET(DEVMODEA, dmICMMethod), "Expect dmSize %lu, got %u\n", FIELD_OFFSET(DEVMODEA, dmICMMethod), dm.dmSize); - ok((dm.dmFields & setting_fields) == setting_fields, "Expect dmFields to contain %#x, got %#x\n", + ok((dm.dmFields & setting_fields) == setting_fields, "Expect dmFields to contain %#lx, got %#lx\n", setting_fields, dm.dmFields);
memset(&dmW, 0, sizeof(dmW)); ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &dmW); - ok(ret, "EnumDisplaySettingsW failed, error %#x\n", GetLastError()); - ok(dmW.dmSize == FIELD_OFFSET(DEVMODEW, dmICMMethod), "Expect dmSize %u, got %u\n", + ok(ret, "EnumDisplaySettingsW failed, error %#lx\n", GetLastError()); + ok(dmW.dmSize == FIELD_OFFSET(DEVMODEW, dmICMMethod), "Expect dmSize %lu, got %u\n", FIELD_OFFSET(DEVMODEW, dmICMMethod), dmW.dmSize); - ok((dmW.dmFields & setting_fields) == setting_fields, "Expect dmFields to contain %#x, got %#x\n", + ok((dmW.dmFields & setting_fields) == setting_fields, "Expect dmFields to contain %#lx, got %#lx\n", setting_fields, dmW.dmFields);
memset(&dmW, 0, sizeof(dmW)); dmW.dmSize = sizeof(dmW); ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &dmW); - ok(ret, "EnumDisplaySettingsW failed, error %#x\n", GetLastError()); - ok(dmW.dmSize == FIELD_OFFSET(DEVMODEW, dmICMMethod), "Expect dmSize %u, got %u\n", + ok(ret, "EnumDisplaySettingsW failed, error %#lx\n", GetLastError()); + ok(dmW.dmSize == FIELD_OFFSET(DEVMODEW, dmICMMethod), "Expect dmSize %lu, got %u\n", FIELD_OFFSET(DEVMODEW, dmICMMethod), dmW.dmSize); - ok((dmW.dmFields & setting_fields) == setting_fields, "Expect dmFields to contain %#x, got %#x\n", + ok((dmW.dmFields & setting_fields) == setting_fields, "Expect dmFields to contain %#lx, got %#lx\n", setting_fields, dmW.dmFields);
/* EnumDisplaySettingsExA/W need dmSize to be at least FIELD_OFFSET(DEVMODEA/W, dmFields) + 1 to have valid dmFields */ @@ -3205,34 +3206,34 @@ static void test_EnumDisplaySettings(void) memset(&dm, 0, sizeof(dm)); dm.dmSize = FIELD_OFFSET(DEVMODEA, dmFields); ret = EnumDisplaySettingsExA(NULL, ENUM_CURRENT_SETTINGS, &dm, 0); - ok(ret, "EnumDisplaySettingsExA failed, error %#x\n", GetLastError()); + ok(ret, "EnumDisplaySettingsExA failed, error %#lx\n", GetLastError()); todo_wine ok(dm.dmSize == FIELD_OFFSET(DEVMODEA, dmFields), "Expect dmSize unchanged, got %u\n", dm.dmSize); - todo_wine ok(dm.dmFields == 0, "Expect dmFields unchanged, got %#x\n", dm.dmFields); + todo_wine ok(dm.dmFields == 0, "Expect dmFields unchanged, got %#lx\n", dm.dmFields);
memset(&dm, 0, sizeof(dm)); dm.dmSize = FIELD_OFFSET(DEVMODEA, dmFields) + 1; ret = EnumDisplaySettingsExA(NULL, ENUM_CURRENT_SETTINGS, &dm, 0); - ok(ret, "EnumDisplaySettingsExA failed, error %#x\n", GetLastError()); + ok(ret, "EnumDisplaySettingsExA failed, error %#lx\n", GetLastError()); todo_wine ok(dm.dmSize == FIELD_OFFSET(DEVMODEA, dmFields) + 1, "Expect dmSize unchanged, got %u\n", dm.dmSize); todo_wine ok((dm.dmFields & setting_fields) == (DM_POSITION | DM_DISPLAYORIENTATION), - "Expect dmFields to contain %#lx, got %#x\n", DM_POSITION | DM_DISPLAYORIENTATION, dm.dmFields); + "Expect dmFields to contain %#lx, got %#lx\n", DM_POSITION | DM_DISPLAYORIENTATION, dm.dmFields); /* Fields beyond dmSize don't get written */ todo_wine ok(dm.dmPelsWidth == 0, "Expect dmPelsWidth unwritten\n");
memset(&dmW, 0, sizeof(dmW)); dmW.dmSize = FIELD_OFFSET(DEVMODEW, dmFields); ret = EnumDisplaySettingsExW(NULL, ENUM_CURRENT_SETTINGS, &dmW, 0); - ok(ret, "EnumDisplaySettingsExW failed, error %#x\n", GetLastError()); + ok(ret, "EnumDisplaySettingsExW failed, error %#lx\n", GetLastError()); todo_wine ok(dmW.dmSize == FIELD_OFFSET(DEVMODEW, dmFields), "Expect dmSize unchanged, got %u\n", dmW.dmSize); - todo_wine ok(dmW.dmFields == 0, "Expect dmFields unchanged, got %#x\n", dmW.dmFields); + todo_wine ok(dmW.dmFields == 0, "Expect dmFields unchanged, got %#lx\n", dmW.dmFields);
memset(&dmW, 0, sizeof(dmW)); dmW.dmSize = FIELD_OFFSET(DEVMODEW, dmFields) + 1; ret = EnumDisplaySettingsExW(NULL, ENUM_CURRENT_SETTINGS, &dmW, 0); - ok(ret, "EnumDisplaySettingsExW failed, error %#x\n", GetLastError()); + ok(ret, "EnumDisplaySettingsExW failed, error %#lx\n", GetLastError()); todo_wine ok(dmW.dmSize == FIELD_OFFSET(DEVMODEW, dmFields) + 1, "Expect dmSize unchanged, got %u\n", dmW.dmSize); todo_wine ok((dmW.dmFields & setting_fields) == (DM_POSITION | DM_DISPLAYORIENTATION), - "Expect dmFields to contain %#lx, got %#x\n", DM_POSITION | DM_DISPLAYORIENTATION, dmW.dmFields); + "Expect dmFields to contain %#lx, got %#lx\n", DM_POSITION | DM_DISPLAYORIENTATION, dmW.dmFields); /* Fields beyond dmSize don't get written */ todo_wine ok(dmW.dmPelsWidth == 0, "Expect dmPelsWidth unwritten\n");
@@ -3243,19 +3244,19 @@ static void test_EnumDisplaySettings(void) memset(&dm, 0, sizeof(dm)); dm.dmSize = sizeof(dm); ret = EnumDisplaySettingsExA(NULL, ENUM_CURRENT_SETTINGS, &dm, 0); - ok(ret, "EnumDisplaySettingsExA failed, error %#x\n", GetLastError()); - ok((dm.dmFields & setting_fields) == setting_fields, "Expect dmFields to contain %#x, got %#x\n", + ok(ret, "EnumDisplaySettingsExA failed, error %#lx\n", GetLastError()); + ok((dm.dmFields & setting_fields) == setting_fields, "Expect dmFields to contain %#lx, got %#lx\n", setting_fields, dm.dmFields); - ok(dm.dmBitsPerPel == val, "Expect dmBitsPerPel %d, got %d\n", val, dm.dmBitsPerPel); + ok(dm.dmBitsPerPel == val, "Expect dmBitsPerPel %ld, got %ld\n", val, dm.dmBitsPerPel);
val = GetDeviceCaps(hdc, NUMCOLORS); if (dm.dmBitsPerPel <= 8) { - ok(val == 256, "Screen bpp is %d, NUMCOLORS returned %d\n", dm.dmBitsPerPel, val); + ok(val == 256, "Screen bpp is %ld, NUMCOLORS returned %ld\n", dm.dmBitsPerPel, val); } else { - ok(val == -1, "Screen bpp is %d, NUMCOLORS returned %d\n", dm.dmBitsPerPel, val); + ok(val == -1, "Screen bpp is %ld, NUMCOLORS returned %ld\n", dm.dmBitsPerPel, val); }
ReleaseDC(0, hdc); @@ -3288,24 +3289,24 @@ static void test_EnumDisplaySettings(void) if (mode == ENUM_CURRENT_SETTINGS) { ok((dm.dmFields & setting_fields) == setting_fields, - "Expect dmFields to contain %#x, got %#x\n", setting_fields, dm.dmFields); + "Expect dmFields to contain %#lx, got %#lx\n", setting_fields, dm.dmFields); } else { - ok((dm.dmFields & mode_fields) == mode_fields, "Expect dmFields to contain %#x, got %#x\n", + ok((dm.dmFields & mode_fields) == mode_fields, "Expect dmFields to contain %#lx, got %#lx\n", mode_fields, dm.dmFields); }
- ok(dm.dmDisplayOrientation == DMDO_DEFAULT, "Expect dmDisplayOrientation DMDO_DEFAULT, got %#x\n", + ok(dm.dmDisplayOrientation == DMDO_DEFAULT, "Expect dmDisplayOrientation DMDO_DEFAULT, got %#lx\n", dm.dmDisplayOrientation); ok(dm.dmDisplayFlags == 0, "Expect dmDisplayFlags zero\n");
if (mode == ENUM_CURRENT_SETTINGS && !attached) { - ok(dm.dmBitsPerPel == 0, "Expect dmBitsPerPel zero, got %u\n", dm.dmBitsPerPel); - ok(dm.dmPelsWidth == 0, "Expect dmPelsWidth zero, got %u\n", dm.dmPelsWidth); - ok(dm.dmPelsHeight == 0, "Expect dmPelsHeight zero, got %u\n", dm.dmPelsHeight); - ok(dm.dmDisplayFrequency == 0, "Expect dmDisplayFrequency zero, got %u\n", dm.dmDisplayFrequency); + ok(dm.dmBitsPerPel == 0, "Expect dmBitsPerPel zero, got %lu\n", dm.dmBitsPerPel); + ok(dm.dmPelsWidth == 0, "Expect dmPelsWidth zero, got %lu\n", dm.dmPelsWidth); + ok(dm.dmPelsHeight == 0, "Expect dmPelsHeight zero, got %lu\n", dm.dmPelsHeight); + ok(dm.dmDisplayFrequency == 0, "Expect dmDisplayFrequency zero, got %lu\n", dm.dmDisplayFrequency); } else if (mode != ENUM_REGISTRY_SETTINGS) { @@ -3322,7 +3323,7 @@ static void test_EnumDisplaySettings(void) ok(err == ERROR_NO_MORE_FILES || err == ERROR_MOD_NOT_FOUND /* Win8 */ || err == 0xdeadbeef, /* XP, 2003 */ - "Expected ERROR_NO_MORE_FILES, ERROR_MOD_NOT_FOUND or 0xdeadbeef, got %#x\n", err); + "Expected ERROR_NO_MORE_FILES, ERROR_MOD_NOT_FOUND or 0xdeadbeef, got %#lx\n", err); } }
@@ -3333,7 +3334,7 @@ static void test_GetSysColorBrush(void) SetLastError(0xdeadbeef); hbr = GetSysColorBrush(-1); ok(hbr == NULL, "Expected NULL brush\n"); - ok(GetLastError() == 0xdeadbeef, "Expected last error not set, got %x\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected last error not set, got %lx\n", GetLastError()); /* greater than max index */ hbr = GetSysColorBrush(COLOR_MENUBAR); if (hbr) @@ -3341,7 +3342,7 @@ static void test_GetSysColorBrush(void) SetLastError(0xdeadbeef); hbr = GetSysColorBrush(COLOR_MENUBAR + 1); ok(hbr == NULL, "Expected NULL brush\n"); - ok(GetLastError() == 0xdeadbeef, "Expected last error not set, got %x\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected last error not set, got %lx\n", GetLastError()); } else win_skip("COLOR_MENUBAR unsupported\n"); @@ -3380,7 +3381,7 @@ static void test_dpi_stock_objects( HDC hdc ) GetObjectW( obj[i], sizeof(lf), &lf ); GetObjectW( obj2[i], sizeof(lf2), &lf2 ); ok( lf.lfHeight == MulDiv( lf2.lfHeight, USER_DEFAULT_SCREEN_DPI, real_dpi ), - "%u: wrong height %d / %d\n", i, lf.lfHeight, lf2.lfHeight ); + "%u: wrong height %ld / %ld\n", i, lf.lfHeight, lf2.lfHeight ); break; default: ok( obj[i] == obj2[i], "%u: different object\n", i ); @@ -3452,15 +3453,15 @@ static void test_dpi_mapping(void) GetWindowRect( GetDesktopWindow(), &rect ); expect = desktop; if (i == DPI_AWARENESS_UNAWARE) scale_rect_dpi( &expect, real_dpi, USER_DEFAULT_SCREEN_DPI ); - ok( EqualRect( &expect, &rect ), "%lu: wrong desktop rect %s expected %s\n", + ok( EqualRect( &expect, &rect ), "%Iu: wrong desktop rect %s expected %s\n", i, wine_dbgstr_rect(&rect), wine_dbgstr_rect(&expect) ); SetRect( &rect, 0, 0, GetSystemMetrics( SM_CXSCREEN ), GetSystemMetrics( SM_CYSCREEN )); - ok( EqualRect( &expect, &rect ), "%lu: wrong desktop rect %s expected %s\n", + ok( EqualRect( &expect, &rect ), "%Iu: wrong desktop rect %s expected %s\n", i, wine_dbgstr_rect(&rect), wine_dbgstr_rect(&expect) ); if (monitor_count < 2) { SetRect( &rect, 0, 0, GetSystemMetrics( SM_CXVIRTUALSCREEN ), GetSystemMetrics( SM_CYVIRTUALSCREEN )); - ok( EqualRect( &expect, &rect ), "%lu: wrong virt desktop rect %s expected %s\n", + ok( EqualRect( &expect, &rect ), "%Iu: wrong virt desktop rect %s expected %s\n", i, wine_dbgstr_rect(&rect), wine_dbgstr_rect(&expect) ); } SetRect( &rect, 0, 0, 1, 1 ); @@ -3468,15 +3469,15 @@ static void test_dpi_mapping(void) ok( monitor != 0, "failed to get monitor\n" ); mon_info.cbSize = sizeof(mon_info); ok( GetMonitorInfoW( monitor, &mon_info ), "GetMonitorInfoExW failed\n" ); - ok( EqualRect( &expect, &mon_info.rcMonitor ), "%lu: wrong monitor rect %s expected %s\n", + ok( EqualRect( &expect, &mon_info.rcMonitor ), "%Iu: wrong monitor rect %s expected %s\n", i, wine_dbgstr_rect(&mon_info.rcMonitor), wine_dbgstr_rect(&expect) ); hdc = CreateDCA( "display", NULL, NULL, NULL ); SetRect( &rect, 0, 0, GetDeviceCaps( hdc, HORZRES ), GetDeviceCaps( hdc, VERTRES )); - ok( EqualRect( &expect, &rect ), "%lu: wrong caps desktop rect %s expected %s\n", + ok( EqualRect( &expect, &rect ), "%Iu: wrong caps desktop rect %s expected %s\n", i, wine_dbgstr_rect(&rect), wine_dbgstr_rect(&expect) ); SetRect( &rect, 0, 0, GetDeviceCaps( hdc, DESKTOPHORZRES ), GetDeviceCaps( hdc, DESKTOPVERTRES )); todo_wine_if(monitor_count > 1) - ok( EqualRect( &desktop, &rect ), "%lu: wrong caps virt desktop rect %s expected %s\n", + ok( EqualRect( &desktop, &rect ), "%Iu: wrong caps virt desktop rect %s expected %s\n", i, wine_dbgstr_rect(&rect), wine_dbgstr_rect(&desktop) ); DeleteDC( hdc ); /* test message window rect */ @@ -3485,7 +3486,7 @@ static void test_dpi_mapping(void) GetWindowRect( GetAncestor( hwnd, GA_PARENT ), &rect ); SetRect( &expect, 0, 0, 100, 100 ); if (i == DPI_AWARENESS_UNAWARE) scale_rect_dpi( &expect, real_dpi, USER_DEFAULT_SCREEN_DPI ); - ok( EqualRect( &expect, &rect ), "%lu: wrong message rect %s expected %s\n", + ok( EqualRect( &expect, &rect ), "%Iu: wrong message rect %s expected %s\n", i, wine_dbgstr_rect(&rect), wine_dbgstr_rect(&expect) ); DestroyWindow( hwnd ); } @@ -3494,10 +3495,10 @@ static void test_dpi_mapping(void) pSetThreadDpiAwarenessContext( (DPI_AWARENESS_CONTEXT)~i ); hwnd = CreateWindowA( "SysParamsTestClass", "test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, 193, 177, 295, 303, 0, 0, GetModuleHandleA(0), NULL ); - ok( hwnd != 0, "creating window failed err %u\n", GetLastError()); + ok( hwnd != 0, "creating window failed err %lu\n", GetLastError()); child = CreateWindowA( "SysParamsTestClass", "child", WS_CHILD | WS_VISIBLE, 50, 60, 70, 80, hwnd, 0, GetModuleHandleA(0), NULL ); - ok( child != 0, "creating child failed err %u\n", GetLastError()); + ok( child != 0, "creating child failed err %lu\n", GetLastError()); GetWindowRect( hwnd, &orig ); SetRect( &rect, 0, 0, 0, 0 ); pAdjustWindowRectExForDpi( &rect, WS_OVERLAPPEDWINDOW, FALSE, 0, pGetDpiForWindow( hwnd )); @@ -3515,47 +3516,47 @@ static void test_dpi_mapping(void) GetWindowRect( hwnd, &rect ); expect = orig; scale_rect_dpi_aware( &expect, i, j ); - ok( EqualRect( &expect, &rect ), "%lu/%lu: wrong window rect %s expected %s\n", + ok( EqualRect( &expect, &rect ), "%Iu/%Iu: wrong window rect %s expected %s\n", i, j, wine_dbgstr_rect(&rect), wine_dbgstr_rect(&expect) ); /* test client rect */ GetClientRect( hwnd, &rect ); expect = client; OffsetRect( &expect, -expect.left, -expect.top ); scale_rect_dpi_aware( &expect, i, j ); - ok( EqualRect( &expect, &rect ), "%lu/%lu: wrong client rect %s expected %s\n", + ok( EqualRect( &expect, &rect ), "%Iu/%Iu: wrong client rect %s expected %s\n", i, j, wine_dbgstr_rect(&rect), wine_dbgstr_rect(&expect) ); /* test window placement */ GetWindowPlacement( hwnd, &wpl ); point = wpl_orig.ptMinPosition; if (point.x != -1 || point.y != -1) scale_point_dpi_aware( &point, i, j ); ok( wpl.ptMinPosition.x == point.x && wpl.ptMinPosition.y == point.y, - "%lu/%lu: wrong placement min pos %d,%d expected %d,%d\n", i, j, + "%Iu/%Iu: wrong placement min pos %ld,%ld expected %ld,%ld\n", i, j, wpl.ptMinPosition.x, wpl.ptMinPosition.y, point.x, point.y ); point = wpl_orig.ptMaxPosition; if (point.x != -1 || point.y != -1) scale_point_dpi_aware( &point, i, j ); ok( wpl.ptMaxPosition.x == point.x && wpl.ptMaxPosition.y == point.y, - "%lu/%lu: wrong placement max pos %d,%d expected %d,%d\n", i, j, + "%Iu/%Iu: wrong placement max pos %ld,%ld expected %ld,%ld\n", i, j, wpl.ptMaxPosition.x, wpl.ptMaxPosition.y, point.x, point.y ); expect = wpl_orig.rcNormalPosition; scale_rect_dpi_aware( &expect, i, j ); ok( EqualRect( &wpl.rcNormalPosition, &expect ), - "%lu/%lu: wrong placement rect %s expect %s\n", i, j, + "%Iu/%Iu: wrong placement rect %s expect %s\n", i, j, wine_dbgstr_rect(&wpl.rcNormalPosition), wine_dbgstr_rect(&expect)); /* test DC rect */ hdc = GetDC( hwnd ); GetClipBox( hdc, &rect ); SetRect( &expect, 0, 0, client.right - client.left, client.bottom - client.top ); - ok( EqualRect( &expect, &rect ), "%lu/%lu: wrong clip box %s expected %s\n", + ok( EqualRect( &expect, &rect ), "%Iu/%Iu: wrong clip box %s expected %s\n", i, j, wine_dbgstr_rect(&rect), wine_dbgstr_rect(&expect) ); /* test DC resolution */ SetRect( &rect, 0, 0, GetDeviceCaps( hdc, HORZRES ), GetDeviceCaps( hdc, VERTRES )); expect = desktop; if (j == DPI_AWARENESS_UNAWARE) scale_rect_dpi( &expect, real_dpi, USER_DEFAULT_SCREEN_DPI ); - ok( EqualRect( &expect, &rect ), "%lu/%lu: wrong DC resolution %s expected %s\n", + ok( EqualRect( &expect, &rect ), "%Iu/%Iu: wrong DC resolution %s expected %s\n", i, j, wine_dbgstr_rect(&rect), wine_dbgstr_rect(&expect) ); SetRect( &rect, 0, 0, GetDeviceCaps( hdc, DESKTOPHORZRES ), GetDeviceCaps( hdc, DESKTOPVERTRES )); todo_wine_if(monitor_count > 1) - ok( EqualRect( &desktop, &rect ), "%lu/%lu: wrong desktop resolution %s expected %s\n", + ok( EqualRect( &desktop, &rect ), "%Iu/%Iu: wrong desktop resolution %s expected %s\n", i, j, wine_dbgstr_rect(&rect), wine_dbgstr_rect(&desktop) ); ReleaseDC( hwnd, hdc ); /* test DC win rect */ @@ -3563,7 +3564,7 @@ static void test_dpi_mapping(void) GetClipBox( hdc, &rect ); SetRect( &expect, 0, 0, 295, 303 ); todo_wine - ok( EqualRect( &expect, &rect ), "%lu/%lu: wrong clip box win DC %s expected %s\n", + ok( EqualRect( &expect, &rect ), "%Iu/%Iu: wrong clip box win DC %s expected %s\n", i, j, wine_dbgstr_rect(&rect), wine_dbgstr_rect(&expect) ); ReleaseDC( hwnd, hdc ); /* test window invalidation */ @@ -3580,11 +3581,11 @@ static void test_dpi_mapping(void) GetUpdateRgn( hwnd, update, FALSE ); GetRgnBox( update, &rect ); SetRect( &expect, 20, 20, 25, 25 ); - ok( EqualRect( &expect, &rect ), "%lu/%lu/%lu: wrong update region %s expected %s\n", + ok( EqualRect( &expect, &rect ), "%Iu/%Iu/%Iu: wrong update region %s expected %s\n", i, j, k, wine_dbgstr_rect(&rect), wine_dbgstr_rect(&expect) ); GetUpdateRect( hwnd, &rect, FALSE ); scale_rect_dpi_aware( &expect, i, j ); - ok( EqualRect( &expect, &rect ), "%lu/%lu/%lu: wrong update rect %s expected %s\n", + ok( EqualRect( &expect, &rect ), "%Iu/%Iu/%Iu: wrong update rect %s expected %s\n", i, j, k, wine_dbgstr_rect(&rect), wine_dbgstr_rect(&expect) ); UpdateWindow( hwnd ); } @@ -3596,11 +3597,11 @@ static void test_dpi_mapping(void) pSetThreadDpiAwarenessContext( (DPI_AWARENESS_CONTEXT)~j ); GetRgnBox( update, &rect ); SetRect( &expect, 20, 20, 25, 25 ); - ok( EqualRect( &expect, &rect ), "%lu/%lu/%lu: wrong update region %s expected %s\n", + ok( EqualRect( &expect, &rect ), "%Iu/%Iu/%Iu: wrong update region %s expected %s\n", i, j, k, wine_dbgstr_rect(&rect), wine_dbgstr_rect(&expect) ); GetUpdateRect( hwnd, &rect, FALSE ); scale_rect_dpi_aware( &expect, i, j ); - ok( EqualRect( &expect, &rect ), "%lu/%lu/%lu: wrong update rect %s expected %s\n", + ok( EqualRect( &expect, &rect ), "%Iu/%Iu/%Iu: wrong update rect %s expected %s\n", i, j, k, wine_dbgstr_rect(&rect), wine_dbgstr_rect(&expect) ); UpdateWindow( hwnd ); } @@ -3615,11 +3616,11 @@ static void test_dpi_mapping(void) GetUpdateRgn( hwnd, update, TRUE ); GetRgnBox( update, &rect ); if (i == DPI_AWARENESS_UNAWARE) scale_rect_dpi( &expect, real_dpi, USER_DEFAULT_SCREEN_DPI ); - ok( EqualRect( &expect, &rect ), "%lu/%lu: wrong update region %s expected %s\n", + ok( EqualRect( &expect, &rect ), "%Iu/%Iu: wrong update region %s expected %s\n", i, j, wine_dbgstr_rect(&rect), wine_dbgstr_rect(&expect) ); GetUpdateRect( hwnd, &rect, FALSE ); scale_rect_dpi_aware( &expect, i, j ); - ok( EqualRect( &expect, &rect ), "%lu/%lu: wrong update rect %s expected %s\n", + ok( EqualRect( &expect, &rect ), "%Iu/%Iu: wrong update rect %s expected %s\n", i, j, wine_dbgstr_rect(&rect), wine_dbgstr_rect(&expect) ); UpdateWindow( hwnd ); DeleteObject( update ); @@ -3628,7 +3629,7 @@ static void test_dpi_mapping(void) point.x = LOWORD( units ); point.y = HIWORD( units ); scale_point_dpi_aware( &point, i, j ); - ok( LOWORD(ret) == point.x && HIWORD(ret) == point.y, "%lu/%lu: wrong units %d,%d / %d,%d\n", + ok( LOWORD(ret) == point.x && HIWORD(ret) == point.y, "%Iu/%Iu: wrong units %d,%d / %ld,%ld\n", i, j, LOWORD(ret), HIWORD(ret), point.x, point.y ); /* test window points mapping */ SetRect( &rect, 0, 0, 100, 100 ); @@ -3639,7 +3640,7 @@ static void test_dpi_mapping(void) scale_rect_dpi_aware( &expect, i, j ); expect.right = expect.left + 100; expect.bottom = expect.top + 100; - ok( EqualRect( &expect, &rect ), "%lu/%lu: wrong MapWindowPoints rect %s expected %s\n", + ok( EqualRect( &expect, &rect ), "%Iu/%Iu: wrong MapWindowPoints rect %s expected %s\n", i, j, wine_dbgstr_rect(&rect), wine_dbgstr_rect(&expect) ); SetRect( &rect, 50, 60, 70, 80 ); scale_rect_dpi_aware( &rect, i, j ); @@ -3647,7 +3648,7 @@ static void test_dpi_mapping(void) OffsetRect( &expect, -rect.left, -rect.top ); SetRect( &rect, 40, 30, 60, 80 ); MapWindowPoints( hwnd, child, (POINT *)&rect, 2 ); - ok( EqualRect( &expect, &rect ), "%lu/%lu: wrong MapWindowPoints child rect %s expected %s\n", + ok( EqualRect( &expect, &rect ), "%Iu/%Iu: wrong MapWindowPoints child rect %s expected %s\n", i, j, wine_dbgstr_rect(&rect), wine_dbgstr_rect(&expect) ); /* test logical<->physical coords mapping */ win_dpi = pGetDpiForWindow( hwnd ); @@ -3658,42 +3659,42 @@ static void test_dpi_mapping(void) point.x = 373; point.y = 377; ret = pLogicalToPhysicalPointForPerMonitorDPI( hwnd, &point ); - ok( ret, "%lu/%lu: LogicalToPhysicalPointForPerMonitorDPI failed\n", i, j ); + ok( ret, "%Iu/%Iu: LogicalToPhysicalPointForPerMonitorDPI failed\n", i, j ); ok( point.x == MulDiv( 373, real_dpi, win_dpi ) && point.y == MulDiv( 377, real_dpi, win_dpi ), - "%lu/%lu: wrong pos %d,%d dpi %u\n", i, j, point.x, point.y, win_dpi ); + "%Iu/%Iu: wrong pos %ld,%ld dpi %u\n", i, j, point.x, point.y, win_dpi ); point.x = 405; point.y = 423; ret = pPhysicalToLogicalPointForPerMonitorDPI( hwnd, &point ); - ok( ret, "%lu/%lu: PhysicalToLogicalPointForPerMonitorDPI failed\n", i, j ); + ok( ret, "%Iu/%Iu: PhysicalToLogicalPointForPerMonitorDPI failed\n", i, j ); ok( point.x == MulDiv( 405, win_dpi, real_dpi ) && point.y == MulDiv( 423, win_dpi, real_dpi ), - "%lu/%lu: wrong pos %d,%d dpi %u\n", i, j, point.x, point.y, win_dpi ); + "%Iu/%Iu: wrong pos %ld,%ld dpi %u\n", i, j, point.x, point.y, win_dpi ); /* point outside the window fails, but note that Windows (wrongly) checks against the * window rect transformed relative to the thread's awareness */ GetWindowRect( hwnd, &rect ); point.x = rect.left - 1; point.y = rect.top; ret = pLogicalToPhysicalPointForPerMonitorDPI( hwnd, &point ); - ok( !ret, "%lu/%lu: LogicalToPhysicalPointForPerMonitorDPI succeeded\n", i, j ); + ok( !ret, "%Iu/%Iu: LogicalToPhysicalPointForPerMonitorDPI succeeded\n", i, j ); point.x++; point.y--; ret = pLogicalToPhysicalPointForPerMonitorDPI( hwnd, &point ); - ok( !ret, "%lu/%lu: LogicalToPhysicalPointForPerMonitorDPI succeeded\n", i, j ); + ok( !ret, "%Iu/%Iu: LogicalToPhysicalPointForPerMonitorDPI succeeded\n", i, j ); point.y++; ret = pLogicalToPhysicalPointForPerMonitorDPI( hwnd, &point ); - ok( ret, "%lu/%lu: LogicalToPhysicalPointForPerMonitorDPI failed\n", i, j ); + ok( ret, "%Iu/%Iu: LogicalToPhysicalPointForPerMonitorDPI failed\n", i, j ); point.x = rect.right; point.y = rect.bottom + 1; ret = pLogicalToPhysicalPointForPerMonitorDPI( hwnd, &point ); - ok( !ret, "%lu/%lu: LogicalToPhysicalPointForPerMonitorDPI succeeded\n", i, j ); + ok( !ret, "%Iu/%Iu: LogicalToPhysicalPointForPerMonitorDPI succeeded\n", i, j ); point.x++; point.y--; ret = pLogicalToPhysicalPointForPerMonitorDPI( hwnd, &point ); - ok( !ret, "%lu/%lu: LogicalToPhysicalPointForPerMonitorDPI succeeded\n", i, j ); + ok( !ret, "%Iu/%Iu: LogicalToPhysicalPointForPerMonitorDPI succeeded\n", i, j ); point.x--; ret = pLogicalToPhysicalPointForPerMonitorDPI( hwnd, &point ); - ok( ret, "%lu/%lu: LogicalToPhysicalPointForPerMonitorDPI failed\n", i, j ); + ok( ret, "%Iu/%Iu: LogicalToPhysicalPointForPerMonitorDPI failed\n", i, j ); /* get physical window rect */ pSetThreadDpiAwarenessContext( DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE ); GetWindowRect( hwnd, &rect ); @@ -3701,25 +3702,25 @@ static void test_dpi_mapping(void) point.x = rect.left - 1; point.y = rect.top; ret = pPhysicalToLogicalPointForPerMonitorDPI( hwnd, &point ); - ok( !ret, "%lu/%lu: PhysicalToLogicalPointForPerMonitorDPI succeeded\n", i, j ); + ok( !ret, "%Iu/%Iu: PhysicalToLogicalPointForPerMonitorDPI succeeded\n", i, j ); point.x++; point.y--; ret = pPhysicalToLogicalPointForPerMonitorDPI( hwnd, &point ); - ok( !ret, "%lu/%lu: PhysicalToLogicalPointForPerMonitorDPI succeeded\n", i, j ); + ok( !ret, "%Iu/%Iu: PhysicalToLogicalPointForPerMonitorDPI succeeded\n", i, j ); point.y++; ret = pPhysicalToLogicalPointForPerMonitorDPI( hwnd, &point ); - ok( ret, "%lu/%lu: PhysicalToLogicalPointForPerMonitorDPI failed\n", i, j ); + ok( ret, "%Iu/%Iu: PhysicalToLogicalPointForPerMonitorDPI failed\n", i, j ); point.x = rect.right; point.y = rect.bottom + 1; ret = pPhysicalToLogicalPointForPerMonitorDPI( hwnd, &point ); - ok( !ret, "%lu/%lu: PhysicalToLogicalPointForPerMonitorDPI succeeded\n", i, j ); + ok( !ret, "%Iu/%Iu: PhysicalToLogicalPointForPerMonitorDPI succeeded\n", i, j ); point.x++; point.y--; ret = pPhysicalToLogicalPointForPerMonitorDPI( hwnd, &point ); - ok( !ret, "%lu/%lu: PhysicalToLogicalPointForPerMonitorDPI succeeded\n", i, j ); + ok( !ret, "%Iu/%Iu: PhysicalToLogicalPointForPerMonitorDPI succeeded\n", i, j ); point.x--; ret = pPhysicalToLogicalPointForPerMonitorDPI( hwnd, &point ); - ok( ret, "%lu/%lu: PhysicalToLogicalPointForPerMonitorDPI failed\n", i, j ); + ok( ret, "%Iu/%Iu: PhysicalToLogicalPointForPerMonitorDPI failed\n", i, j ); } DestroyWindow( hwnd ); } @@ -3776,11 +3777,11 @@ static void test_dpi_context(void) SetLastError( 0xdeadbeef ); ret = pSetProcessDpiAwarenessContext( NULL ); ok( !ret, "got %d\n", ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); ret = pSetProcessDpiAwarenessContext( (DPI_AWARENESS_CONTEXT)-6 ); ok( !ret, "got %d\n", ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() ); ret = pSetProcessDpiAwarenessContext( DPI_AWARENESS_CONTEXT_SYSTEM_AWARE ); todo_wine ok( ret, "got %d\n", ret ); @@ -3789,18 +3790,18 @@ static void test_dpi_context(void) SetLastError( 0xdeadbeef ); ret = pSetProcessDpiAwarenessContext( DPI_AWARENESS_CONTEXT_SYSTEM_AWARE ); ok( !ret, "got %d\n", ret ); - ok( GetLastError() == ERROR_ACCESS_DENIED, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_ACCESS_DENIED, "wrong error %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); ret = pSetProcessDpiAwarenessContext( DPI_AWARENESS_CONTEXT_UNAWARE ); ok( !ret, "got %d\n", ret ); - ok( GetLastError() == ERROR_ACCESS_DENIED, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_ACCESS_DENIED, "wrong error %lu\n", GetLastError() );
ret = pSetProcessDpiAwarenessInternal( DPI_AWARENESS_INVALID ); ok( !ret, "got %d\n", ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() ); ret = pSetProcessDpiAwarenessInternal( DPI_AWARENESS_UNAWARE ); ok( !ret, "got %d\n", ret ); - ok( GetLastError() == ERROR_ACCESS_DENIED, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_ACCESS_DENIED, "wrong error %lu\n", GetLastError() ); ret = pGetProcessDpiAwarenessInternal( 0, &awareness ); ok( ret, "got %d\n", ret ); todo_wine @@ -3824,11 +3825,11 @@ static void test_dpi_context(void) SetLastError( 0xdeadbeef ); context = pSetThreadDpiAwarenessContext( 0 ); ok( !context, "got %p\n", context ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); context = pSetThreadDpiAwarenessContext( (DPI_AWARENESS_CONTEXT)-6 ); ok( !context, "got %p\n", context ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() ); context = pSetThreadDpiAwarenessContext( DPI_AWARENESS_CONTEXT_UNAWARE ); todo_wine ok( context == (DPI_AWARENESS_CONTEXT)(0x80000011 | flags), "wrong context %p\n", context ); @@ -3893,22 +3894,22 @@ static void test_dpi_context(void) { case 0x10: ok( awareness == DPI_AWARENESS_UNAWARE || awareness == DPI_AWARENESS_INVALID /* Win10 1709+ */, - "%lx: wrong value %u\n", i, awareness ); + "%Ix: wrong value %u\n", i, awareness ); break; case 0x11: case 0x12: - ok( awareness == (i & ~0x10), "%lx: wrong value %u\n", i, awareness ); + ok( awareness == (i & ~0x10), "%Ix: wrong value %u\n", i, awareness ); break; case 0x22: ok( awareness == DPI_AWARENESS_INVALID || awareness == DPI_AWARENESS_PER_MONITOR_AWARE /* Win10 1709+ */, - "%lx: wrong value %u\n", i, awareness ); + "%Ix: wrong value %u\n", i, awareness ); break; default: - ok( awareness == DPI_AWARENESS_INVALID, "%lx: wrong value %u\n", i, awareness ); + ok( awareness == DPI_AWARENESS_INVALID, "%Ix: wrong value %u\n", i, awareness ); break; } ret = pIsValidDpiAwarenessContext( (DPI_AWARENESS_CONTEXT)i ); - ok( ret == (awareness != DPI_AWARENESS_INVALID), "%lx: expected %d, got %d\n", + ok( ret == (awareness != DPI_AWARENESS_INVALID), "%Ix: expected %d, got %d\n", i, (awareness != DPI_AWARENESS_INVALID), ret );
awareness = pGetAwarenessFromDpiAwarenessContext( (DPI_AWARENESS_CONTEXT)(i | 0x80000000) ); @@ -3916,22 +3917,22 @@ static void test_dpi_context(void) { case 0x10: ok( awareness == DPI_AWARENESS_UNAWARE || awareness == DPI_AWARENESS_INVALID /* Win10 1709+ */, - "%lx: wrong value %u\n", i | 0x80000000, awareness ); + "%Ix: wrong value %u\n", i | 0x80000000, awareness ); break; case 0x11: case 0x12: - ok( awareness == (i & ~0x10), "%lx: wrong value %u\n", i | 0x80000000, awareness ); + ok( awareness == (i & ~0x10), "%Ix: wrong value %u\n", i | 0x80000000, awareness ); break; case 0x22: ok( awareness == DPI_AWARENESS_INVALID || awareness == DPI_AWARENESS_PER_MONITOR_AWARE /* Win10 1709+ */, - "%lx: wrong value %u\n", i, awareness ); + "%Ix: wrong value %u\n", i, awareness ); break; default: - ok( awareness == DPI_AWARENESS_INVALID, "%lx: wrong value %u\n", i | 0x80000000, awareness ); + ok( awareness == DPI_AWARENESS_INVALID, "%Ix: wrong value %u\n", i | 0x80000000, awareness ); break; } ret = pIsValidDpiAwarenessContext( (DPI_AWARENESS_CONTEXT)(i | 0x80000000) ); - ok( ret == (awareness != DPI_AWARENESS_INVALID), "%lx: expected %d, got %d\n", + ok( ret == (awareness != DPI_AWARENESS_INVALID), "%Ix: expected %d, got %d\n", (i | 0x80000000), (awareness != DPI_AWARENESS_INVALID), ret );
awareness = pGetAwarenessFromDpiAwarenessContext( (DPI_AWARENESS_CONTEXT)~i ); @@ -3940,24 +3941,24 @@ static void test_dpi_context(void) case (ULONG_PTR)DPI_AWARENESS_CONTEXT_UNAWARE: case (ULONG_PTR)DPI_AWARENESS_CONTEXT_SYSTEM_AWARE: case (ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE: - ok( awareness == i, "%lx: wrong value %u\n", ~i, awareness ); - ok( pIsValidDpiAwarenessContext( (DPI_AWARENESS_CONTEXT)~i ), "%lx: not valid\n", ~i ); + ok( awareness == i, "%Ix: wrong value %u\n", ~i, awareness ); + ok( pIsValidDpiAwarenessContext( (DPI_AWARENESS_CONTEXT)~i ), "%Ix: not valid\n", ~i ); break; case (ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2: if (pIsValidDpiAwarenessContext( (DPI_AWARENESS_CONTEXT)~i )) - ok( awareness == DPI_AWARENESS_PER_MONITOR_AWARE, "%lx: wrong value %u\n", ~i, awareness ); + ok( awareness == DPI_AWARENESS_PER_MONITOR_AWARE, "%Ix: wrong value %u\n", ~i, awareness ); else - ok( awareness == DPI_AWARENESS_INVALID, "%lx: wrong value %u\n", ~i, awareness ); + ok( awareness == DPI_AWARENESS_INVALID, "%Ix: wrong value %u\n", ~i, awareness ); break; case (ULONG_PTR)DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED: if (pIsValidDpiAwarenessContext( (DPI_AWARENESS_CONTEXT)~i )) - ok( awareness == DPI_AWARENESS_UNAWARE, "%lx: wrong value %u\n", ~i, awareness ); + ok( awareness == DPI_AWARENESS_UNAWARE, "%Ix: wrong value %u\n", ~i, awareness ); else - ok( awareness == DPI_AWARENESS_INVALID, "%lx: wrong value %u\n", ~i, awareness ); + ok( awareness == DPI_AWARENESS_INVALID, "%Ix: wrong value %u\n", ~i, awareness ); break; default: - ok( awareness == DPI_AWARENESS_INVALID, "%lx: wrong value %u\n", ~i, awareness ); - ok( !pIsValidDpiAwarenessContext( (DPI_AWARENESS_CONTEXT)~i ), "%lx: valid\n", ~i ); + ok( awareness == DPI_AWARENESS_INVALID, "%Ix: wrong value %u\n", ~i, awareness ); + ok( !pIsValidDpiAwarenessContext( (DPI_AWARENESS_CONTEXT)~i ), "%Ix: valid\n", ~i ); break; } } @@ -3977,7 +3978,7 @@ static LRESULT CALLBACK dpi_winproc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) pos = GetMessagePos(); pSetThreadDpiAwarenessContext( DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE ); pos2 = GetMessagePos(); - ok( pos == pos2, "wrong pos %08x / %08x\n", pos, pos2 ); + ok( pos == pos2, "wrong pos %08lx / %08lx\n", pos, pos2 ); pSetThreadDpiAwarenessContext( ctx2 ); return DefWindowProcA( hwnd, msg, wp, lp ); } @@ -4005,29 +4006,29 @@ static void test_dpi_window(void) ok( hwnd != 0, "failed to create window\n" ); context = pGetWindowDpiAwarenessContext( hwnd ); awareness = pGetAwarenessFromDpiAwarenessContext( context ); - ok( awareness == i, "%lu: wrong awareness %u\n", i, awareness ); + ok( awareness == i, "%Iu: wrong awareness %u\n", i, awareness ); dpi = pGetDpiForWindow( hwnd ); ok( dpi == (i == DPI_AWARENESS_UNAWARE ? USER_DEFAULT_SCREEN_DPI : real_dpi), - "%lu: got %u / %u\n", i, dpi, real_dpi ); + "%Iu: got %u / %u\n", i, dpi, real_dpi ); if (pGetDpiForMonitorInternal) { BOOL res; SetLastError( 0xdeadbeef ); res = pGetDpiForMonitorInternal( MonitorFromWindow( hwnd, 0 ), 0, &dpi, NULL ); ok( !res, "succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_ADDRESS, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_ADDRESS, "wrong error %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); res = pGetDpiForMonitorInternal( MonitorFromWindow( hwnd, 0 ), 3, &dpi, &dpi ); ok( !res, "succeeded\n" ); - ok( GetLastError() == ERROR_BAD_ARGUMENTS, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_BAD_ARGUMENTS, "wrong error %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); res = pGetDpiForMonitorInternal( MonitorFromWindow( hwnd, 0 ), 3, &dpi, NULL ); ok( !res, "succeeded\n" ); - ok( GetLastError() == ERROR_BAD_ARGUMENTS, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_BAD_ARGUMENTS, "wrong error %lu\n", GetLastError() ); res = pGetDpiForMonitorInternal( MonitorFromWindow( hwnd, 0 ), 0, &dpi, &dpi ); - ok( res, "failed err %u\n", GetLastError() ); + ok( res, "failed err %lu\n", GetLastError() ); ok( dpi == (i == DPI_AWARENESS_UNAWARE ? USER_DEFAULT_SCREEN_DPI : real_dpi), - "%lu: got %u / %u\n", i, dpi, real_dpi ); + "%Iu: got %u / %u\n", i, dpi, real_dpi ); } msg.hwnd = hwnd; for (j = DPI_AWARENESS_UNAWARE; j <= DPI_AWARENESS_PER_MONITOR_AWARE; j++) @@ -4040,36 +4041,36 @@ static void test_dpi_window(void) WS_CHILD, 0, 0, 100, 100, hwnd, 0, GetModuleHandleA(0), NULL ); context = pGetWindowDpiAwarenessContext( child ); awareness = pGetAwarenessFromDpiAwarenessContext( context ); - ok( awareness == i, "%lu/%lu: wrong awareness %u\n", i, j, awareness ); + ok( awareness == i, "%Iu/%Iu: wrong awareness %u\n", i, j, awareness ); dpi = pGetDpiForWindow( child ); ok( dpi == (i == DPI_AWARENESS_UNAWARE ? USER_DEFAULT_SCREEN_DPI : real_dpi), - "%lu/%lu: got %u / %u\n", i, j, dpi, real_dpi ); + "%Iu/%Iu: got %u / %u\n", i, j, dpi, real_dpi ); ret = SetParent( child, NULL ); - ok( ret != 0, "SetParent failed err %u\n", GetLastError() ); + ok( ret != 0, "SetParent failed err %lu\n", GetLastError() ); context = pGetWindowDpiAwarenessContext( child ); awareness = pGetAwarenessFromDpiAwarenessContext( context ); - ok( awareness == i, "%lu/%lu: wrong awareness %u\n", i, j, awareness ); + ok( awareness == i, "%Iu/%Iu: wrong awareness %u\n", i, j, awareness ); dpi = pGetDpiForWindow( child ); ok( dpi == (i == DPI_AWARENESS_UNAWARE ? USER_DEFAULT_SCREEN_DPI : real_dpi), - "%lu/%lu: got %u / %u\n", i, j, dpi, real_dpi ); + "%Iu/%Iu: got %u / %u\n", i, j, dpi, real_dpi ); DestroyWindow( child ); child = CreateWindowA( "DpiTestClass", "Test", WS_OVERLAPPEDWINDOW, 0, 0, 100, 100, 0, 0, GetModuleHandleA(0), NULL ); context = pGetWindowDpiAwarenessContext( child ); awareness = pGetAwarenessFromDpiAwarenessContext( context ); - ok( awareness == j, "%lu/%lu: wrong awareness %u\n", i, j, awareness ); + ok( awareness == j, "%Iu/%Iu: wrong awareness %u\n", i, j, awareness ); dpi = pGetDpiForWindow( child ); ok( dpi == (j == DPI_AWARENESS_UNAWARE ? USER_DEFAULT_SCREEN_DPI : real_dpi), - "%lu/%lu: got %u / %u\n", i, j, dpi, real_dpi ); + "%Iu/%Iu: got %u / %u\n", i, j, dpi, real_dpi ); ret = SetParent( child, hwnd ); ok( ret != 0 || GetLastError() == ERROR_INVALID_STATE, - "SetParent failed err %u\n", GetLastError() ); + "SetParent failed err %lu\n", GetLastError() ); context = pGetWindowDpiAwarenessContext( child ); awareness = pGetAwarenessFromDpiAwarenessContext( context ); - ok( awareness == (ret ? i : j), "%lu/%lu: wrong awareness %u\n", i, j, awareness ); + ok( awareness == (ret ? i : j), "%Iu/%Iu: wrong awareness %u\n", i, j, awareness ); dpi = pGetDpiForWindow( child ); ok( dpi == (i == DPI_AWARENESS_UNAWARE ? USER_DEFAULT_SCREEN_DPI : real_dpi), - "%lu/%lu: got %u / %u\n", i, j, dpi, real_dpi ); + "%Iu/%Iu: got %u / %u\n", i, j, dpi, real_dpi ); DestroyWindow( child ); } DestroyWindow( hwnd ); @@ -4078,12 +4079,12 @@ static void test_dpi_window(void) SetLastError( 0xdeadbeef ); context = pGetWindowDpiAwarenessContext( (HWND)0xdeadbeef ); ok( !context, "got %p\n", context ); - ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); dpi = pGetDpiForWindow( (HWND)0xdeadbeef ); ok( !dpi, "got %u\n", dpi ); ok( GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_INVALID_WINDOW_HANDLE, - "wrong error %u\n", GetLastError() ); + "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); context = pGetWindowDpiAwarenessContext( GetDesktopWindow() ); @@ -4117,11 +4118,11 @@ static void test_GetAutoRotationState(void) SetLastError(0xdeadbeef); ret = pGetAutoRotationState(NULL); ok(!ret, "Expected GetAutoRotationState to fail\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
state = 0; ret = pGetAutoRotationState(&state); - ok(ret, "Expected GetAutoRotationState to succeed, error %d\n", GetLastError()); + ok(ret, "Expected GetAutoRotationState to succeed, error %ld\n", GetLastError()); }
START_TEST(sysparams) diff --git a/dlls/user32/tests/text.c b/dlls/user32/tests/text.c index 359721fcd91..9db3d558adf 100644 --- a/dlls/user32/tests/text.c +++ b/dlls/user32/tests/text.c @@ -1,3 +1,4 @@ +#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* * DrawText tests * @@ -55,9 +56,9 @@ static void test_DrawTextCalcRect(void) /* Initialization */ hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP, 0, 0, 200, 200, 0, 0, 0, NULL); - ok(hwnd != 0, "CreateWindowExA error %u\n", GetLastError()); + ok(hwnd != 0, "CreateWindowExA error %lu\n", GetLastError()); hdc = GetDC(hwnd); - ok(hdc != 0, "GetDC error %u\n", GetLastError()); + ok(hdc != 0, "GetDC error %lu\n", GetLastError()); trace("hdc %p\n", hdc); textlen = lstrlenA(text);
@@ -74,23 +75,23 @@ static void test_DrawTextCalcRect(void) SetMapMode(hdc, MM_HIENGLISH); lf.lfHeight = 100 * 9 / 72; /* 9 point */ hFont = CreateFontIndirectA(&lf); - ok(hFont != 0, "CreateFontIndirectA error %u\n", + ok(hFont != 0, "CreateFontIndirectA error %lu\n", GetLastError()); hOldFont = SelectObject(hdc, hFont);
textheight = DrawTextA(hdc, text, textlen, &rect, DT_CALCRECT | DT_EXTERNALLEADING | DT_WORDBREAK | DT_NOCLIP | DT_LEFT | DT_NOPREFIX); - ok( textheight, "DrawTextA error %u\n", GetLastError()); + ok( textheight, "DrawTextA error %lu\n", GetLastError());
- trace("MM_HIENGLISH rect.bottom %d\n", rect.bottom); + trace("MM_HIENGLISH rect.bottom %ld\n", rect.bottom); ok(rect.bottom < 0, "In MM_HIENGLISH, DrawText with " "DT_CALCRECT should return a negative rectangle bottom. " - "(bot=%d)\n", rect.bottom); + "(bot=%ld)\n", rect.bottom);
SelectObject(hdc, hOldFont); ret = DeleteObject(hFont); - ok( ret, "DeleteObject error %u\n", GetLastError()); + ok( ret, "DeleteObject error %lu\n", GetLastError());
/* DrawText in MM_TEXT with DT_CALCRECT */ @@ -98,18 +99,18 @@ static void test_DrawTextCalcRect(void) lf.lfHeight = -MulDiv(9, GetDeviceCaps(hdc, LOGPIXELSY), 72); /* 9 point */ hFont = CreateFontIndirectA(&lf); - ok(hFont != 0, "CreateFontIndirectA error %u\n", + ok(hFont != 0, "CreateFontIndirectA error %lu\n", GetLastError()); hOldFont = SelectObject(hdc, hFont);
textheight = DrawTextA(hdc, text, textlen, &rect, DT_CALCRECT | DT_EXTERNALLEADING | DT_WORDBREAK | DT_NOCLIP | DT_LEFT | DT_NOPREFIX); - ok( textheight, "DrawTextA error %u\n", GetLastError()); + ok( textheight, "DrawTextA error %lu\n", GetLastError());
- trace("MM_TEXT rect.bottom %d\n", rect.bottom); + trace("MM_TEXT rect.bottom %ld\n", rect.bottom); ok(rect.bottom > 0, "In MM_TEXT, DrawText with DT_CALCRECT " - "should return a positive rectangle bottom. (bot=%d)\n", + "should return a positive rectangle bottom. (bot=%ld)\n", rect.bottom);
/* empty or null text should in some cases calc an empty rectangle */ @@ -326,12 +327,12 @@ static void test_DrawTextCalcRect(void) dtp.iLeftMargin = 8; SetRectEmpty(&rect); DrawTextExA(hdc, text, -1, &rect, DT_CALCRECT, &dtp); - ok(rect.right==dtp.iLeftMargin+textlen ,"Incorrect left margin calculated rc(%d,%d)\n", rect.left, rect.right); + ok(rect.right==dtp.iLeftMargin+textlen ,"Incorrect left margin calculated rc(%ld,%ld)\n", rect.left, rect.right); dtp.iLeftMargin = 0; dtp.iRightMargin = 8; SetRectEmpty(&rect); DrawTextExA(hdc, text, -1, &rect, DT_CALCRECT, &dtp); - ok(rect.right==dtp.iRightMargin+textlen ,"Incorrect right margin calculated rc(%d,%d)\n", rect.left, rect.right); + ok(rect.right==dtp.iRightMargin+textlen ,"Incorrect right margin calculated rc(%ld,%ld)\n", rect.left, rect.right);
/* Wide char versions */ SetRect( &rect, 10,10, 100, 100); @@ -524,10 +525,10 @@ static void test_DrawTextCalcRect(void) /* More test cases from bug 12226 */ SetRectEmpty(&rect); textheight = DrawTextA(hdc, emptystring, -1, &rect, DT_CALCRECT | DT_LEFT | DT_SINGLELINE); - ok(textheight, "DrawTextA error %u\n", GetLastError()); - ok(0 == rect.left, "expected 0, got %d\n", rect.left); - ok(0 == rect.right, "expected 0, got %d\n", rect.right); - ok(0 == rect.top, "expected 0, got %d\n", rect.top); + ok(textheight, "DrawTextA error %lu\n", GetLastError()); + ok(0 == rect.left, "expected 0, got %ld\n", rect.left); + ok(0 == rect.right, "expected 0, got %ld\n", rect.right); + ok(0 == rect.top, "expected 0, got %ld\n", rect.top); ok(rect.bottom, "rect.bottom should not be 0\n");
SetRectEmpty(&rect); @@ -538,10 +539,10 @@ static void test_DrawTextCalcRect(void) } else { - ok(textheight, "DrawTextW error %u\n", GetLastError()); - ok(0 == rect.left, "expected 0, got %d\n", rect.left); - ok(0 == rect.right, "expected 0, got %d\n", rect.right); - ok(0 == rect.top, "expected 0, got %d\n", rect.top); + ok(textheight, "DrawTextW error %lu\n", GetLastError()); + ok(0 == rect.left, "expected 0, got %ld\n", rect.left); + ok(0 == rect.right, "expected 0, got %ld\n", rect.right); + ok(0 == rect.top, "expected 0, got %ld\n", rect.top); ok(rect.bottom, "rect.bottom should not be 0\n"); }
@@ -595,22 +596,22 @@ static void test_DrawTextCalcRect(void) textheight = DrawTextExA(hdc, tabstring, -1, &rect, DT_CALCRECT | DT_TABSTOP | DT_EXPANDTABS, &dtp); ok(textheight >= heightcheck, "Got unexpected textheight %d\n", textheight); ok(dtp.iTabLength == 8, "invalid dtp.iTabLength = %i\n",dtp.iTabLength); - ok(rect.left == rect2.left, "unexpected value %d, got %d\n", rect.left, rect2.left); + ok(rect.left == rect2.left, "unexpected value %ld, got %ld\n", rect.left, rect2.left); /* XP, 2003 appear to not give the same values. */ - ok(rect.right == rect2.right || broken(rect.right > rect2.right), "unexpected value %d, got %d\n",rect.right, rect2.right); - ok(rect.top == rect2.top, "unexpected value %d, got %d\n", rect.top, rect2.top); - ok(rect.bottom == rect2.bottom , "unexpected value %d, got %d\n", rect.bottom, rect2.bottom); + ok(rect.right == rect2.right || broken(rect.right > rect2.right), "unexpected value %ld, got %ld\n",rect.right, rect2.right); + ok(rect.top == rect2.top, "unexpected value %ld, got %ld\n", rect.top, rect2.top); + ok(rect.bottom == rect2.bottom , "unexpected value %ld, got %ld\n", rect.bottom, rect2.bottom);
SelectObject(hdc, hOldFont); ret = DeleteObject(hFont); - ok( ret, "DeleteObject error %u\n", GetLastError()); + ok( ret, "DeleteObject error %lu\n", GetLastError());
/* Clean up */ ret = ReleaseDC(hwnd, hdc); - ok( ret, "ReleaseDC error %u\n", GetLastError()); + ok( ret, "ReleaseDC error %lu\n", GetLastError()); ret = DestroyWindow(hwnd); - ok( ret, "DestroyWindow error %u\n", GetLastError()); + ok( ret, "DestroyWindow error %lu\n", GetLastError()); }
/* replace tabs by \t */ @@ -631,7 +632,7 @@ static void strfmt( const char *str, char *strout) extent = GetTabbedTextExtentA( hdc, string, strlen( string), (tabcount), tabs); \ strfmt( string, strdisp); \ /* trace( "Extent is %08lx\n", extent); */\ - ok( extent == _exp, "Test case "%s". Text extent is 0x%x, expected 0x%x tab %d tabcount %d\n", \ + ok( extent == _exp, "Test case "%s". Text extent is 0x%lx, expected 0x%lx tab %d tabcount %d\n", \ strdisp, extent, _exp, tabval, tabcount); \ } \
@@ -648,12 +649,12 @@ static void test_TabbedText(void) /* Initialization */ hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP, 0, 0, 200, 200, 0, 0, 0, NULL); - ok(hwnd != 0, "CreateWindowExA error %u\n", GetLastError()); + ok(hwnd != 0, "CreateWindowExA error %lu\n", GetLastError()); hdc = GetDC(hwnd); - ok(hdc != 0, "GetDC error %u\n", GetLastError()); + ok(hdc != 0, "GetDC error %lu\n", GetLastError());
ret = GetTextMetricsA( hdc, &tm); - ok( ret, "GetTextMetrics error %u\n", GetLastError()); + ok( ret, "GetTextMetrics error %lu\n", GetLastError());
extent = GetTabbedTextExtentA( hdc, "x", 0, 1, tabs); ok( extent == 0, "GetTabbedTextExtentA returned non-zero on nCount == 0\n"); @@ -721,24 +722,24 @@ static void test_DrawState(void) SetLastError(0xdeadbeef); ret = DrawStateA(hdc, GetStockObject(DKGRAY_BRUSH), NULL, (LPARAM)text, strlen(text), 0, 0, 10, 10, DST_TEXT); - ok(ret, "DrawState error %u\n", GetLastError()); + ok(ret, "DrawState error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = DrawStateA(hdc, GetStockObject(DKGRAY_BRUSH), NULL, (LPARAM)text, 0, 0, 0, 10, 10, DST_TEXT); - ok(ret, "DrawState error %u\n", GetLastError()); + ok(ret, "DrawState error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = DrawStateA(hdc, GetStockObject(DKGRAY_BRUSH), NULL, 0, strlen(text), 0, 0, 10, 10, DST_TEXT); ok(!ret || broken(ret) /* win98 */, "DrawState succeeded\n"); - ok(GetLastError() == 0xdeadbeef, "not expected error %u\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "not expected error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = DrawStateA(hdc, GetStockObject(DKGRAY_BRUSH), NULL, 0, 0, 0, 0, 10, 10, DST_TEXT); ok(!ret || broken(ret) /* win98 */, "DrawState succeeded\n"); - ok(GetLastError() == 0xdeadbeef, "not expected error %u\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "not expected error %lu\n", GetLastError());
ReleaseDC(hwnd, hdc); DestroyWindow(hwnd); diff --git a/dlls/user32/tests/uitools.c b/dlls/user32/tests/uitools.c index 07cf776a952..3b4ab010e44 100644 --- a/dlls/user32/tests/uitools.c +++ b/dlls/user32/tests/uitools.c @@ -1,3 +1,4 @@ +#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* Unit test suite for user interface functions * * Copyright 2009 Nikolay Sivov @@ -46,7 +47,7 @@ static void test_FillRect(void) oldhbmp = SelectObject(hdcmem, hbmp); ok(oldhbmp != NULL, "SelectObject returned NULL\n"); /* a memdc always has a bitmap selected */ col = GetPixel(hdcmem, 0, 0); - ok( col == 0xffffff, "GetPixel returned %08x, expected 0xffffff\n", col); + ok( col == 0xffffff, "GetPixel returned %08lx, expected 0xffffff\n", col);
/* select black brush */ old_brush = SelectObject(hdcmem, GetStockObject(BLACK_BRUSH)); @@ -55,7 +56,7 @@ static void test_FillRect(void) SelectObject(hdcmem, old_brush); /* bitmap filled with last selected brush */ col = GetPixel(hdcmem, 0, 0); - ok(col == 0, "GetPixel returned %08x, expected 0\n", col); + ok(col == 0, "GetPixel returned %08lx, expected 0\n", col);
SelectObject(hdcmem, oldhbmp); DeleteObject(hbmp);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=110027
Your paranoid android.
=== w10pro64_ar (64 bit report) ===
user32: menu.c:2338: Test failed: test 6 menu.c:2338: Test failed: test 8 menu.c:2338: Test failed: test 10 menu.c:2338: Test failed: test 12 menu.c:2338: Test failed: test 14 menu.c:2338: Test failed: test 16
=== w10pro64_he (64 bit report) ===
user32: menu.c:2338: Test failed: test 6 menu.c:2338: Test failed: test 8 menu.c:2338: Test failed: test 10 menu.c:2338: Test failed: test 12 menu.c:2338: Test failed: test 14 menu.c:2338: Test failed: test 16
=== w10pro64_he (64 bit report) ===
user32: msg.c:12808: Test failed: message time not advanced: c766 c766 msg.c:12809: Test failed: coords not changed: (101 101) (101 101) msg.c:12826: Test failed: message time not advanced: c766 c766 msg.c:12827: Test failed: coords not changed: (101 101) (101 101)
=== w8 (32 bit report) ===
user32: sysparams.c:2491: Test failed: Waiting for the WM_DISPLAYCHANGE message timed out sysparams.c:2502: Test failed: Set bpp 32, but WM_DISPLAYCHANGE reported bpp -1
=== w8adm (32 bit report) ===
user32: sysparams.c:2491: Test failed: Waiting for the WM_DISPLAYCHANGE message timed out sysparams.c:2502: Test failed: Set bpp 32, but WM_DISPLAYCHANGE reported bpp -1
=== w864 (32 bit report) ===
user32: sysparams.c:2491: Test failed: Waiting for the WM_DISPLAYCHANGE message timed out sysparams.c:2502: Test failed: Set bpp 32, but WM_DISPLAYCHANGE reported bpp -1
=== w1064v1809 (32 bit report) ===
user32: sysparams.c:2491: Test failed: Waiting for the WM_DISPLAYCHANGE message timed out sysparams.c:2502: Test failed: Set bpp 32, but WM_DISPLAYCHANGE reported bpp -1
=== w1064 (32 bit report) ===
user32: sysparams.c:2491: Test failed: Waiting for the WM_DISPLAYCHANGE message timed out sysparams.c:2502: Test failed: Set bpp 32, but WM_DISPLAYCHANGE reported bpp -1
=== w1064_tsign (32 bit report) ===
user32: sysparams.c:2491: Test failed: Waiting for the WM_DISPLAYCHANGE message timed out sysparams.c:2502: Test failed: Set bpp 32, but WM_DISPLAYCHANGE reported bpp -1
=== w10pro64 (32 bit report) ===
user32: sysparams.c:2491: Test failed: Waiting for the WM_DISPLAYCHANGE message timed out sysparams.c:2502: Test failed: Set bpp 32, but WM_DISPLAYCHANGE reported bpp -1
=== w1064_2qxl (64 bit report) ===
user32: sysparams.c:242: Test failed: too many changes counter=1 last change=8229
=== debian11 (64 bit WoW report) ===
user32: menu.c:2338: Test failed: test 25
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/user32/tests/Makefile.in | 1 dlls/user32/tests/broadcast.c | 1 dlls/user32/tests/class.c | 1 dlls/user32/tests/clipboard.c | 1 dlls/user32/tests/combo.c | 1 dlls/user32/tests/cursoricon.c | 1 dlls/user32/tests/dce.c | 1 dlls/user32/tests/dde.c | 1 dlls/user32/tests/dialog.c | 1 dlls/user32/tests/edit.c | 1 dlls/user32/tests/generated.c | 1 dlls/user32/tests/input.c | 1 dlls/user32/tests/listbox.c | 1 dlls/user32/tests/menu.c | 1 dlls/user32/tests/monitor.c | 1 dlls/user32/tests/msg.c | 1 dlls/user32/tests/resource.c | 1 dlls/user32/tests/scroll.c | 1 dlls/user32/tests/static.c | 1 dlls/user32/tests/sysparams.c | 1 dlls/user32/tests/text.c | 1 dlls/user32/tests/uitools.c | 1 dlls/user32/tests/win.c | 1498 ++++++++++++++++++++-------------------- dlls/user32/tests/winstation.c | 158 ++-- dlls/user32/tests/wsprintf.c | 8 25 files changed, 832 insertions(+), 854 deletions(-)
diff --git a/dlls/user32/tests/Makefile.in b/dlls/user32/tests/Makefile.in index f375234af51..dd101d69f3c 100644 --- a/dlls/user32/tests/Makefile.in +++ b/dlls/user32/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = user32.dll IMPORTS = user32 gdi32 advapi32 hid
diff --git a/dlls/user32/tests/broadcast.c b/dlls/user32/tests/broadcast.c index 86f7ec2f26b..a2de4f6bc23 100644 --- a/dlls/user32/tests/broadcast.c +++ b/dlls/user32/tests/broadcast.c @@ -1,4 +1,3 @@ -#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* * Unit tests for BroadcastSystemMessage * diff --git a/dlls/user32/tests/class.c b/dlls/user32/tests/class.c index 083aeb80b45..b93d0496ad7 100644 --- a/dlls/user32/tests/class.c +++ b/dlls/user32/tests/class.c @@ -1,4 +1,3 @@ -#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* Unit test suite for window classes. * * Copyright 2002 Mike McCormack diff --git a/dlls/user32/tests/clipboard.c b/dlls/user32/tests/clipboard.c index 8ddebfd1c1e..3053de398f9 100644 --- a/dlls/user32/tests/clipboard.c +++ b/dlls/user32/tests/clipboard.c @@ -1,4 +1,3 @@ -#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* * Unit test suite for clipboard functions. * diff --git a/dlls/user32/tests/combo.c b/dlls/user32/tests/combo.c index be4a2b4b044..2fc0d1ad9c0 100644 --- a/dlls/user32/tests/combo.c +++ b/dlls/user32/tests/combo.c @@ -1,4 +1,3 @@ -#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* Unit test suite for combo boxes. * * Copyright 2007 Mikolaj Zalewski diff --git a/dlls/user32/tests/cursoricon.c b/dlls/user32/tests/cursoricon.c index d6aee461a5d..117d5bf8456 100644 --- a/dlls/user32/tests/cursoricon.c +++ b/dlls/user32/tests/cursoricon.c @@ -1,4 +1,3 @@ -#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* * Unit test suite for cursors and icons. * diff --git a/dlls/user32/tests/dce.c b/dlls/user32/tests/dce.c index 5f0eb928f53..613512d0f5f 100644 --- a/dlls/user32/tests/dce.c +++ b/dlls/user32/tests/dce.c @@ -1,4 +1,3 @@ -#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* * Unit tests for DCE support * diff --git a/dlls/user32/tests/dde.c b/dlls/user32/tests/dde.c index c41d93a987b..37c78b115ba 100644 --- a/dlls/user32/tests/dde.c +++ b/dlls/user32/tests/dde.c @@ -1,4 +1,3 @@ -#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* * Unit tests for DDE functions * diff --git a/dlls/user32/tests/dialog.c b/dlls/user32/tests/dialog.c index 5c500608710..0ac1d48a375 100644 --- a/dlls/user32/tests/dialog.c +++ b/dlls/user32/tests/dialog.c @@ -1,4 +1,3 @@ -#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* Unit test suite for the dialog functions. * * Copyright 2004 Bill Medland diff --git a/dlls/user32/tests/edit.c b/dlls/user32/tests/edit.c index eb65191d77d..1607e9d84d9 100644 --- a/dlls/user32/tests/edit.c +++ b/dlls/user32/tests/edit.c @@ -1,4 +1,3 @@ -#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* Unit test suite for edit control. * * Copyright 2004 Vitaliy Margolen diff --git a/dlls/user32/tests/generated.c b/dlls/user32/tests/generated.c index a78e47d9e59..6b80ad8d6f0 100644 --- a/dlls/user32/tests/generated.c +++ b/dlls/user32/tests/generated.c @@ -1,4 +1,3 @@ -#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* File generated automatically from tools/winapi/tests.dat; do not edit! */ /* This file can be copied, modified and distributed without restriction. */
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c index 1a5bff4388b..14641591bff 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c @@ -1,4 +1,3 @@ -#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* Test Key event to Key message translation * * Copyright 2003 Rein Klazes diff --git a/dlls/user32/tests/listbox.c b/dlls/user32/tests/listbox.c index 5a09282f6a6..0433818bb1d 100644 --- a/dlls/user32/tests/listbox.c +++ b/dlls/user32/tests/listbox.c @@ -1,4 +1,3 @@ -#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* Unit test suite for list boxes. * * Copyright 2003 Ferenc Wagner diff --git a/dlls/user32/tests/menu.c b/dlls/user32/tests/menu.c index 4724b292e72..a6afd9cd4fb 100644 --- a/dlls/user32/tests/menu.c +++ b/dlls/user32/tests/menu.c @@ -1,4 +1,3 @@ -#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* * Unit tests for menus * diff --git a/dlls/user32/tests/monitor.c b/dlls/user32/tests/monitor.c index 4578742a707..d0d4ff1f324 100644 --- a/dlls/user32/tests/monitor.c +++ b/dlls/user32/tests/monitor.c @@ -1,4 +1,3 @@ -#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* * Unit tests for monitor APIs * diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index ee949ec9518..a2adf56565d 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -1,4 +1,3 @@ -#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* * Unit tests for window message handling * diff --git a/dlls/user32/tests/resource.c b/dlls/user32/tests/resource.c index d116fb7462b..97c274c7817 100644 --- a/dlls/user32/tests/resource.c +++ b/dlls/user32/tests/resource.c @@ -1,4 +1,3 @@ -#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* Unit test suite for resources. * * Copyright 2004 Ferenc Wagner diff --git a/dlls/user32/tests/scroll.c b/dlls/user32/tests/scroll.c index 98f091abda5..20bb0dc111b 100644 --- a/dlls/user32/tests/scroll.c +++ b/dlls/user32/tests/scroll.c @@ -1,4 +1,3 @@ -#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* * Unit tests for scrollbar * diff --git a/dlls/user32/tests/static.c b/dlls/user32/tests/static.c index 7a22c8594da..a5af3315865 100644 --- a/dlls/user32/tests/static.c +++ b/dlls/user32/tests/static.c @@ -1,4 +1,3 @@ -#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* Unit test suite for static controls. * * Copyright 2007 Google (Mikolaj Zalewski) diff --git a/dlls/user32/tests/sysparams.c b/dlls/user32/tests/sysparams.c index a8487b40878..4f2709094e9 100644 --- a/dlls/user32/tests/sysparams.c +++ b/dlls/user32/tests/sysparams.c @@ -1,4 +1,3 @@ -#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* Unit test suite for functions SystemParametersInfo and GetSystemMetrics. * * Copyright 2002 Andriy Palamarchuk diff --git a/dlls/user32/tests/text.c b/dlls/user32/tests/text.c index 9db3d558adf..317fb9a6a29 100644 --- a/dlls/user32/tests/text.c +++ b/dlls/user32/tests/text.c @@ -1,4 +1,3 @@ -#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* * DrawText tests * diff --git a/dlls/user32/tests/uitools.c b/dlls/user32/tests/uitools.c index 3b4ab010e44..a3067c518ea 100644 --- a/dlls/user32/tests/uitools.c +++ b/dlls/user32/tests/uitools.c @@ -1,4 +1,3 @@ -#undef WINE_NO_LONG_TYPES /* temporary for migration */ /* Unit test suite for user interface functions * * Copyright 2009 Nikolay Sivov diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index d6087873f21..319c6d240f2 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -76,7 +76,7 @@ static DWORD our_pid;
static void dump_minmax_info( const MINMAXINFO *minmax ) { - trace("Reserved=%d,%d MaxSize=%d,%d MaxPos=%d,%d MinTrack=%d,%d MaxTrack=%d,%d\n", + 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, @@ -186,7 +186,7 @@ static DWORD wait_for_events( DWORD count, HANDLE *events, DWORD timeout ) else timeout = end - GetTickCount(); }
- ok( ret == WAIT_TIMEOUT, "MsgWaitForMultipleObjects returned %#x\n", ret ); + ok( ret == WAIT_TIMEOUT, "MsgWaitForMultipleObjects returned %#lx\n", ret ); return ret; }
@@ -229,7 +229,7 @@ static void test_parent_owner(void) test = CreateWindowExA(0, "ToolWindowClass", "Tool window 1", WS_CHILD, 0, 0, 100, 100, 0, 0, 0, NULL ); ok( !test, "WS_CHILD without parent created\n" ); - ok( GetLastError() == ERROR_TLW_WITH_WSCHILD, "CreateWindowExA error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_TLW_WITH_WSCHILD, "CreateWindowExA error %lu\n", GetLastError() );
/* desktop window */ check_parents( desktop, 0, 0, 0, 0, 0, 0 ); @@ -681,7 +681,7 @@ static DWORD CALLBACK enum_thread( void *arg ) info.cbSize = sizeof(info) + 1; ret = pGetGUIThreadInfo( GetCurrentThreadId(), &info ); ok( !ret, "GetGUIThreadInfo succeeded with wrong size\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() ); }
PeekMessageA( &msg, 0, 0, 0, PM_NOREMOVE ); /* make sure we have a message queue */ @@ -741,7 +741,7 @@ static DWORD CALLBACK test_thread_exit_parent_thread( void *args )
params->hwnd = CreateWindowW( L"static", L"parent", WS_OVERLAPPEDWINDOW|WS_VISIBLE, 100, 100, 200, 200, 0, 0, 0, NULL ); - ok( params->hwnd != 0, "CreateWindowExW failed, error %u\n", GetLastError() ); + ok( params->hwnd != 0, "CreateWindowExW failed, error %lu\n", GetLastError() ); flush_events( TRUE ); SetEvent( params->created_event );
@@ -779,22 +779,22 @@ static void test_thread_exit_destroy(void)
adopter = CreateWindowW( L"static", L"adopter", WS_OVERLAPPEDWINDOW|WS_VISIBLE, 300, 100, 200, 200, 0, 0, 0, NULL ); - ok( adopter != 0, "CreateWindowExW failed, error %u\n", GetLastError() ); + ok( adopter != 0, "CreateWindowExW failed, error %lu\n", GetLastError() ); flush_events( TRUE );
thread = CreateThread( NULL, 0, test_thread_exit_parent_thread, ¶ms, 0, NULL ); - ok( thread != 0, "CreateThread failed, error %u\n", GetLastError() ); + ok( thread != 0, "CreateThread failed, error %lu\n", GetLastError() ); WaitForSingleObject( params.created_event, INFINITE );
child1 = CreateWindowW( L"static", L"child1", WS_CHILD|WS_VISIBLE, 50, 50, 50, 50, params.hwnd, 0, 0, NULL ); - ok( child1 != 0, "CreateWindowExW failed, error %u\n", GetLastError() ); + ok( child1 != 0, "CreateWindowExW failed, error %lu\n", GetLastError() ); child2 = CreateWindowW( L"static", L"child2", WS_CHILD|WS_VISIBLE, 100, 50, 50, 50, params.hwnd, 0, 0, NULL ); - ok( child2 != 0, "CreateWindowExW failed, error %u\n", GetLastError() ); + ok( child2 != 0, "CreateWindowExW failed, error %lu\n", GetLastError() ); child3 = CreateWindowW( L"static", L"child3", WS_CHILD|WS_VISIBLE, 50, 100, 50, 50, params.hwnd, 0, 0, NULL ); - ok( child3 != 0, "CreateWindowExW failed, error %u\n", GetLastError() ); + ok( child3 != 0, "CreateWindowExW failed, error %lu\n", GetLastError() ); flush_events( TRUE );
trace("parent %p adopter %p child1 %p child2 %p child3 %p\n", params.hwnd, adopter, child1, child2, child3); @@ -808,28 +808,28 @@ static void test_thread_exit_destroy(void) ok( GetCapture() == child1, "GetCapture %p, expected %p\n", GetCapture(), child1 );
ret = SetPropW( child1, L"myprop", UlongToHandle(0xdeadbeef) ); - ok( ret, "SetPropW failed, error %u\n", GetLastError() ); + ok( ret, "SetPropW failed, error %lu\n", GetLastError() ); ret = SetPropW( child2, L"myprop", UlongToHandle(0xdeadbeef) ); - ok( ret, "SetPropW failed, error %u\n", GetLastError() ); + ok( ret, "SetPropW failed, error %lu\n", GetLastError() );
old_wndproc = (WNDPROC)GetWindowLongPtrW( child1, GWLP_WNDPROC ); - ok( old_wndproc != NULL, "GetWindowLongPtrW GWLP_WNDPROC failed, error %u\n", GetLastError() ); + ok( old_wndproc != NULL, "GetWindowLongPtrW GWLP_WNDPROC failed, error %lu\n", GetLastError() );
ret = GetWindowLongW( child1, GWL_STYLE ); - ok( ret == (WS_CHILD|WS_VISIBLE), "GetWindowLongW returned %#x\n", ret ); + ok( ret == (WS_CHILD|WS_VISIBLE), "GetWindowLongW returned %#lx\n", ret );
SetEvent( params.stop_event ); ret = WaitForSingleObject( thread, INFINITE ); - ok( ret == WAIT_OBJECT_0, "WaitForSingleObject returned %#x\n", ret ); + ok( ret == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", ret ); CloseHandle( thread );
/* child windows should all still be alive but hidden */ ret = IsWindow( child1 ); - ok( ret, "IsWindow returned %u\n", ret ); + ok( ret, "IsWindow returned %lu\n", ret ); ret = IsWindow( child2 ); - ok( ret, "IsWindow returned %u\n", ret ); + ok( ret, "IsWindow returned %lu\n", ret ); ret = IsWindow( child3 ); - ok( ret, "IsWindow returned %u\n", ret ); + ok( ret, "IsWindow returned %lu\n", ret );
todo_wine ok( GetActiveWindow() == adopter, "GetActiveWindow %p, expected %p\n", GetActiveWindow(), adopter ); @@ -850,38 +850,38 @@ static void test_thread_exit_destroy(void) SetLastError( 0xdeadbeef ); ret = GetWindowLongW( child1, GWL_STYLE ); todo_wine - ok( ret == WS_CHILD, "GetWindowLongW returned %#x\n", ret ); - ok( GetLastError() == 0xdeadbeef, "GetWindowLongW error %u\n", GetLastError() ); + ok( ret == WS_CHILD, "GetWindowLongW returned %#lx\n", ret ); + ok( GetLastError() == 0xdeadbeef, "GetWindowLongW error %lu\n", GetLastError() ); ret = SetWindowLongW( child1, GWL_STYLE, WS_CHILD|WS_VISIBLE ); - ok( ret, "SetWindowLongW failed, error %u\n", GetLastError() ); + ok( ret, "SetWindowLongW failed, error %lu\n", GetLastError() ); ret = GetWindowLongW( child1, GWL_STYLE ); - ok( ret == (WS_CHILD|WS_VISIBLE), "GetWindowLongW returned %#x\n", ret ); + ok( ret == (WS_CHILD|WS_VISIBLE), "GetWindowLongW returned %#lx\n", ret );
/* and cannot be adopted */ SetLastError( 0xdeadbeef ); tmp = GetParent( child1 ); - ok( tmp == params.hwnd, "GetParent returned %p, error %u\n", tmp, GetLastError() ); - ok( GetLastError() == 0xdeadbeef, "GetWindowLongW error %u\n", GetLastError() ); + ok( tmp == params.hwnd, "GetParent returned %p, error %lu\n", tmp, GetLastError() ); + ok( GetLastError() == 0xdeadbeef, "GetWindowLongW error %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); tmp = SetParent( child1, adopter ); ok( tmp == 0, "SetParent returned %p\n", tmp ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "got error %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); tmp = SetParent( child3, adopter ); ok( tmp == 0, "SetParent returned %p\n", tmp ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "got error %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); tmp = GetParent( child1 ); - ok( tmp == params.hwnd, "GetParent returned %p, error %u\n", tmp, GetLastError() ); - ok( GetLastError() == 0xdeadbeef, "GetWindowLongW error %u\n", GetLastError() ); + ok( tmp == params.hwnd, "GetParent returned %p, error %lu\n", tmp, GetLastError() ); + ok( GetLastError() == 0xdeadbeef, "GetWindowLongW error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); ret = GetWindowLongW( params.hwnd, GWL_STYLE ); - ok( ret == 0, "GetWindowLongW returned %#x\n", ret ); - ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "GetWindowLongW error %u\n", GetLastError() ); + ok( ret == 0, "GetWindowLongW returned %#lx\n", ret ); + ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "GetWindowLongW error %lu\n", GetLastError() );
wndproc = (WNDPROC)GetWindowLongPtrW( child1, GWLP_WNDPROC ); - ok( wndproc != NULL, "GetWindowLongPtrW GWLP_WNDPROC failed, error %u\n", GetLastError() ); + ok( wndproc != NULL, "GetWindowLongPtrW GWLP_WNDPROC failed, error %lu\n", GetLastError() ); ok( wndproc == old_wndproc, "GetWindowLongPtrW GWLP_WNDPROC returned %p\n", wndproc );
tmp = GetPropW( child1, L"myprop" ); @@ -892,58 +892,58 @@ static void test_thread_exit_destroy(void) child = CreateWindowExA( 0, "ToolWindowClass", "Tool window 1", WS_CHILD, 0, 0, 100, 100, child1, 0, 0, NULL ); ok( !child && GetLastError() == ERROR_INVALID_PARAMETER, - "CreateWindowExA returned %p %u\n", child, GetLastError() ); + "CreateWindowExA returned %p %lu\n", child, GetLastError() );
ret = MoveWindow( child1, 5, 5, 10, 10, FALSE ); - ok( ret, "MoveWindow failed: %u\n", GetLastError() ); + ok( ret, "MoveWindow failed: %lu\n", GetLastError() );
/* destroying child1 ourselves succeeds */ ret = DestroyWindow( child1 ); - ok( ret, "DestroyWindow returned %u\n", ret ); + ok( ret, "DestroyWindow returned %lu\n", ret ); ret = DestroyWindow( child1 ); - ok( !ret, "DestroyWindow returned %u\n", ret ); + ok( !ret, "DestroyWindow returned %lu\n", ret ); ret = IsWindow( child1 ); - ok( !ret, "IsWindow returned %u\n", ret ); + ok( !ret, "IsWindow returned %lu\n", ret );
tmp = GetPropW( child1, L"myprop" ); ok( HandleToULong(tmp) == 0, "GetPropW returned %p\n", tmp );
/* child2 is still alive, for now */ ret = IsWindow( child2 ); - ok( ret, "IsWindow returned %u\n", ret ); + ok( ret, "IsWindow returned %lu\n", ret );
SetLastError( 0xdeadbeef ); ret = SetWindowPos( child2, HWND_TOPMOST, 0, 0, 100, 100, SWP_NOSIZE|SWP_NOMOVE ); todo_wine ok( !ret, "SetWindowPos succeeded\n" ); todo_wine - ok( GetLastError() == ERROR_INVALID_PARAMETER, "SetWindowPos returned error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "SetWindowPos returned error %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); ret = SetWindowPos( child2, 0, 10, 10, 200, 200, SWP_NOZORDER | SWP_NOACTIVATE ); todo_wine ok( !ret, "SetWindowPos succeeded\n" ); todo_wine - ok( GetLastError() == ERROR_INVALID_PARAMETER, "SetWindowPos returned error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "SetWindowPos returned error %lu\n", GetLastError() );
rgn = CreateRectRgn( 5, 5, 15, 15 ); SetLastError( 0xdeadbeef ); ret = SetWindowRgn( child2, rgn, TRUE ); - ok( ret, "SetWindowRgn failed, error %u\n", GetLastError() ); + ok( ret, "SetWindowRgn failed, error %lu\n", GetLastError() ); DeleteObject( rgn );
wndproc = (WNDPROC)SetWindowLongPtrW( child2, GWLP_WNDPROC, (LONG_PTR)test_thread_exit_wnd_proc ); ret = SendMessageW( child2, WM_USER, 0, 0 ); - ok( ret == 0xdeadbeef, "SendMessageW returned %u, error %u\n", ret, GetLastError() ); + ok( ret == 0xdeadbeef, "SendMessageW returned %lu, error %lu\n", ret, GetLastError() ); ret = SendMessageW( child2, WM_USER + 1, 0, 0 ); - ok( ret == 0xfeedcafe, "SendMessageW returned %u, error %u\n", ret, GetLastError() ); + ok( ret == 0xfeedcafe, "SendMessageW returned %lu, error %lu\n", ret, GetLastError() ); ret = SendMessageW( child2, WM_USER + 2, 0, 0 ); - ok( ret == 0, "SendMessageW returned %u, error %u\n", ret, GetLastError() ); + ok( ret == 0, "SendMessageW returned %lu, error %lu\n", ret, GetLastError() );
ret = GetWindowTextW( child2, buffer, ARRAY_SIZE(buffer) ); - ok( ret == 6, "GetWindowTextW returned %u\n", ret ); + ok( ret == 6, "GetWindowTextW returned %lu\n", ret ); ok( !wcscmp( buffer, L"child2" ), "GetWindowTextW returned %s\n", debugstr_w( buffer ) ); ret = IsWindow( child2 ); - ok( ret, "IsWindow returned %u\n", ret ); + ok( ret, "IsWindow returned %lu\n", ret );
/* but peeking any message should reap them all */ PeekMessageW( &msg, child2, 0, 0, PM_REMOVE ); @@ -952,12 +952,12 @@ static void test_thread_exit_destroy(void) ok( HandleToULong(tmp) == 0, "GetPropW returned %p\n", tmp );
ret = IsWindow( child2 ); - ok( !ret, "IsWindow returned %u\n", ret ); + ok( !ret, "IsWindow returned %lu\n", ret ); ret = IsWindow( child3 ); todo_wine - ok( !ret, "IsWindow returned %u\n", ret ); + ok( !ret, "IsWindow returned %lu\n", ret ); ret = DestroyWindow( child2 ); - ok( !ret, "DestroyWindow returned %u\n", ret ); + ok( !ret, "DestroyWindow returned %lu\n", ret );
DestroyWindow( adopter );
@@ -1025,7 +1025,7 @@ static LRESULT WINAPI main_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR
GetClientRect(hwnd, &rc2); ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc1); - ok(!ret, "got %08lx\n", ret); + ok(!ret, "got %08Ix\n", ret); MapWindowPoints(0, hwnd, (LPPOINT)&rc1, 2); ok(EqualRect(&rc1, &rc2), "rects do not match %s / %s\n", wine_dbgstr_rect(&rc1), wine_dbgstr_rect(&rc2)); @@ -1082,7 +1082,7 @@ static LRESULT WINAPI main_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR case WM_NCCALCSIZE: { LRESULT ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, wparam, lparam); - ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wparam, lparam); + ok(!ret, "got %08Ix (%08Ix %08Ix)\n", ret, wparam, lparam); return ret; } } @@ -1119,7 +1119,7 @@ static LRESULT WINAPI main_window_procW(HWND hwnd, UINT msg, WPARAM wparam, LPAR case WM_NCCALCSIZE: { LRESULT ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, wparam, lparam); - ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wparam, lparam); + ok(!ret, "got %08Ix (%08Ix %08Ix)\n", ret, wparam, lparam); return ret; } } @@ -1151,7 +1151,7 @@ static LRESULT WINAPI tool_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR case WM_NCCALCSIZE: { LRESULT ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, wparam, lparam); - ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wparam, lparam); + ok(!ret, "got %08Ix (%08Ix %08Ix)\n", ret, wparam, lparam); return ret; } } @@ -1224,17 +1224,17 @@ static void verify_window_info(const char *hook, HWND hwnd, const WINDOWINFO *in ok(EqualRect(&rcClient, &info->rcClient), "wrong rcClient for %p in hook %s\n", hwnd, hook);
ok(info->dwStyle == (DWORD)GetWindowLongA(hwnd, GWL_STYLE), - "wrong dwStyle: %08x != %08x for %p in hook %s\n", + "wrong dwStyle: %08lx != %08lx for %p in hook %s\n", info->dwStyle, GetWindowLongA(hwnd, GWL_STYLE), hwnd, hook); /* Windows reports some undocumented exstyles in WINDOWINFO, but * doesn't return them in GetWindowLong(hwnd, GWL_EXSTYLE). */ ok((info->dwExStyle & ~0xe0000800) == (DWORD)GetWindowLongA(hwnd, GWL_EXSTYLE), - "wrong dwExStyle: %08x != %08x for %p in hook %s\n", + "wrong dwExStyle: %08lx != %08lx for %p in hook %s\n", info->dwExStyle, GetWindowLongA(hwnd, GWL_EXSTYLE), hwnd, hook); status = (GetActiveWindow() == hwnd) ? WS_ACTIVECAPTION : 0; if (GetForegroundWindow()) - ok(info->dwWindowStatus == status, "wrong dwWindowStatus: %04x != %04x active %p fg %p in hook %s\n", + ok(info->dwWindowStatus == status, "wrong dwWindowStatus: %04lx != %04lx active %p fg %p in hook %s\n", info->dwWindowStatus, status, GetActiveWindow(), GetForegroundWindow(), hook);
/* win2k and XP return broken border info in GetWindowInfo most of @@ -1244,7 +1244,7 @@ if (0) { UINT border; ok(info->cxWindowBorders == (unsigned)(rcClient.left - rcWindow.left), - "wrong cxWindowBorders %d != %d\n", info->cxWindowBorders, rcClient.left - rcWindow.left); + "wrong cxWindowBorders %d != %ld\n", info->cxWindowBorders, rcClient.left - rcWindow.left); border = min(rcWindow.bottom - rcClient.bottom, rcClient.top - rcWindow.top); ok(info->cyWindowBorders == border, "wrong cyWindowBorders %d != %d\n", info->cyWindowBorders, border); @@ -1267,13 +1267,13 @@ static void test_window_info(const char *hook, HWND hwnd) SetLastError(0xdeadbeef); ok(!pGetWindowInfo(0, NULL), "GetWindowInfo should fail\n"); ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, - "got error %d expected ERROR_INVALID_WINDOW_HANDLE\n", GetLastError()); + "got error %ld expected ERROR_INVALID_WINDOW_HANDLE\n", GetLastError()); }
SetLastError(0xdeadbeef); ok(!pGetWindowInfo(0, &info), "GetWindowInfo should fail\n"); ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, - "got error %d expected ERROR_INVALID_WINDOW_HANDLE\n", GetLastError()); + "got error %ld expected ERROR_INVALID_WINDOW_HANDLE\n", GetLastError());
info.cbSize = sizeof(WINDOWINFO); ok(pGetWindowInfo(hwnd, &info), "GetWindowInfo should not fail\n"); @@ -1422,7 +1422,7 @@ static LRESULT CALLBACK test_standard_scrollbar_proc(HWND hwnd, UINT msg, WPARAM case WM_NCCALCSIZE: { LRESULT ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, wp, lp); - ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wp, lp); + ok(!ret, "got %08Ix (%08Ix %08Ix)\n", ret, wp, lp); return ret; }
@@ -1462,28 +1462,28 @@ static void test_nonclient_area(HWND hwnd) FixedAdjustWindowRectEx(&rc, style, menu, exstyle);
ok(EqualRect(&rc, &rc_window), - "window rect does not match: style:exstyle=0x%08x:0x%08x, menu=%d, win=%s, calc=%s\n", + "window rect does not match: style:exstyle=0x%08lx:0x%08lx, menu=%d, win=%s, calc=%s\n", style, exstyle, menu, wine_dbgstr_rect(&rc_window), wine_dbgstr_rect(&rc));
rc = rc_client; MapWindowPoints(hwnd, 0, (LPPOINT)&rc, 2); wine_AdjustWindowRectEx(&rc, style, menu, exstyle); ok(EqualRect(&rc, &rc_window), - "window rect does not match: style:exstyle=0x%08x:0x%08x, menu=%d, win=%s, calc=%s\n", + "window rect does not match: style:exstyle=0x%08lx:0x%08lx, menu=%d, win=%s, calc=%s\n", style, exstyle, menu, wine_dbgstr_rect(&rc_window), wine_dbgstr_rect(&rc));
rc = rc_window; ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc); - ok(!ret, "got %08lx\n", ret); + ok(!ret, "got %08Ix\n", ret); MapWindowPoints(0, hwnd, (LPPOINT)&rc, 2); ok(EqualRect(&rc, &rc_client), - "client rect does not match: style:exstyle=0x%08x:0x%08x, menu=%d client=%s, calc=%s\n", + "client rect does not match: style:exstyle=0x%08lx:0x%08lx, menu=%d client=%s, calc=%s\n", style, exstyle, menu, wine_dbgstr_rect(&rc_client), wine_dbgstr_rect(&rc));
/* NULL rectangle shouldn't crash */ ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, 0); - ok(ret == 0, "NULL rectangle returned %ld instead of 0\n", ret); + ok(ret == 0, "NULL rectangle returned %Id instead of 0\n", ret);
/* and now test AdjustWindowRectEx and WM_NCCALCSIZE on synthetic data */ SetRect(&rc_client, 0, 0, 250, 150); @@ -1493,17 +1493,17 @@ static void test_nonclient_area(HWND hwnd)
rc = rc_window; ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc); - ok(!ret, "got %08lx\n", ret); + ok(!ret, "got %08Ix\n", ret); MapWindowPoints(0, hwnd, (LPPOINT)&rc, 2); ok(EqualRect(&rc, &rc_client), - "synthetic rect does not match: style:exstyle=0x%08x:0x%08x, menu=%d, client=%s, calc=%s\n", + "synthetic rect does not match: style:exstyle=0x%08lx:0x%08lx, menu=%d, client=%s, calc=%s\n", style, exstyle, menu, wine_dbgstr_rect(&rc_client), wine_dbgstr_rect(&rc));
/* Test standard scroll bars */ uxtheme = LoadLibraryA("uxtheme.dll"); - ok(!!uxtheme, "Failed to load uxtheme.dll, error %u.\n", GetLastError()); + ok(!!uxtheme, "Failed to load uxtheme.dll, error %lu.\n", GetLastError()); pIsThemeActive = (void *)GetProcAddress(uxtheme, "IsThemeActive"); - ok(!!pIsThemeActive, "Failed to load IsThemeActive, error %u.\n", GetLastError()); + ok(!!pIsThemeActive, "Failed to load IsThemeActive, error %lu.\n", GetLastError()); is_theme_active = pIsThemeActive();
memset(&cls, 0, sizeof(cls)); @@ -1521,7 +1521,7 @@ static void test_nonclient_area(HWND hwnd)
parent = CreateWindowA("TestStandardScrollbarParentClass", "parent", WS_POPUP | WS_VISIBLE, 100, 100, 100, 100, NULL, NULL, 0, NULL); - ok(!!parent, "Failed to create a parent window, error %u.\n", GetLastError()); + ok(!!parent, "Failed to create a parent window, error %lu.\n", GetLastError()); GetCursorPos(&old_cursor_pos);
/* Place the cursor on the standard scroll bar arrow button when not painting it at all. @@ -1529,16 +1529,16 @@ static void test_nonclient_area(HWND hwnd) offset = GetSystemMetrics(SM_CYHSCROLL); child = CreateWindowA("TestStandardScrollbarClass", "test", WS_CHILD | WS_HSCROLL | WS_VISIBLE, 0, 0, 50, 50, parent, NULL, 0, NULL); - ok(!!child, "Failed to create a test window, error %u.\n", GetLastError()); + ok(!!child, "Failed to create a test window, error %lu.\n", GetLastError()); hdc = GetDC(parent); - ok(!!hdc, "GetDC failed, error %d.\n", GetLastError()); + ok(!!hdc, "GetDC failed, error %ld.\n", GetLastError());
SetCursorPos(0, 0); flush_events(TRUE); RedrawWindow(child, NULL, NULL, RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW | RDW_ERASENOW | RDW_FRAME); old_color = GetPixel(hdc, 50 - GetSystemMetrics(SM_CXVSCROLL) / 2, 50 - GetSystemMetrics(SM_CYHSCROLL) / 2); - ok(old_color == 0xc0c0c0, "Expected color %#x, got %#x.\n", 0xc0c0c0, old_color); + ok(old_color == 0xc0c0c0, "Expected color %#x, got %#lx.\n", 0xc0c0c0, old_color);
point.x = 50 - GetSystemMetrics(SM_CXVSCROLL) / 2; point.y = 50 - GetSystemMetrics(SM_CYHSCROLL) / 2; @@ -1548,7 +1548,7 @@ static void test_nonclient_area(HWND hwnd) RedrawWindow(child, NULL, NULL, RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW | RDW_ERASENOW | RDW_FRAME); color = GetPixel(hdc, 50 - GetSystemMetrics(SM_CXVSCROLL) / 2, 50 - GetSystemMetrics(SM_CYHSCROLL) / 2); - ok(color == old_color, "Expected color %#x, got %#x.\n", old_color, color); + ok(color == old_color, "Expected color %#lx, got %#lx.\n", old_color, color);
ReleaseDC(parent, hdc); DestroyWindow(child); @@ -1558,9 +1558,9 @@ static void test_nonclient_area(HWND hwnd) offset = GetSystemMetrics(SM_CYHSCROLL) - 1; child = CreateWindowA("TestStandardScrollbarClass", "test", WS_CHILD | WS_HSCROLL | WS_VISIBLE, 0, 0, 50, 50, parent, NULL, 0, NULL); - ok(!!child, "Failed to create a test window, error %u.\n", GetLastError()); + ok(!!child, "Failed to create a test window, error %lu.\n", GetLastError()); hdc = GetDC(parent); - ok(!!hdc, "GetDC failed, error %d.\n", GetLastError()); + ok(!!hdc, "GetDC failed, error %ld.\n", GetLastError());
SetCursorPos(0, 0); flush_events(TRUE); @@ -1578,10 +1578,10 @@ static void test_nonclient_area(HWND hwnd) 50 - GetSystemMetrics(SM_CYHSCROLL) / 2); if (is_theme_active) ok(color != old_color || broken(color == old_color), /* Win 10 1507 64-bit */ - "Got unexpected color %#x.\n", color); + "Got unexpected color %#lx.\n", color); else todo_wine - ok(color == old_color, "Expected color %#x, got %#x.\n", old_color, color); + ok(color == old_color, "Expected color %#lx, got %#lx.\n", old_color, color);
SetCursorPos(old_cursor_pos.x, old_cursor_pos.y); ReleaseDC(parent, hdc); @@ -1623,7 +1623,7 @@ static LRESULT CALLBACK cbt_hook_proc(int nCode, WPARAM wParam, LPARAM lParam) /* WS_VISIBLE should be turned off yet */ style = createwnd->lpcs->style & ~WS_VISIBLE; ok(style == GetWindowLongA(hwnd, GWL_STYLE), - "style of hwnd and style in the CREATESTRUCT do not match: %08x != %08x\n", + "style of hwnd and style in the CREATESTRUCT do not match: %08lx != %08lx\n", GetWindowLongA(hwnd, GWL_STYLE), style);
if (0) @@ -1827,7 +1827,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id) mdi_child = (HWND)SendMessageA(mdi_client, WM_MDICREATE, 0, (LPARAM)&mdi_cs); ok(mdi_child != 0, "MDI child creation failed\n"); id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == first_id, "wrong child id %ld\n", id); + ok(id == first_id, "wrong child id %Id\n", id); hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0); exp_hwnd = (GetWindowLongW(mdi_child, GWL_STYLE) & WS_VISIBLE) ? mdi_child : 0; ok(hwnd == exp_hwnd, "WM_MDIGETACTIVE should return %p, got %p\n", exp_hwnd, hwnd); @@ -1838,7 +1838,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id) mdi_child = (HWND)SendMessageA(mdi_client, WM_MDICREATE, 0, (LPARAM)&mdi_cs); ok(mdi_child != 0, "MDI child creation failed\n"); id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == first_id, "wrong child id %ld\n", id); + ok(id == first_id, "wrong child id %Id\n", id); hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0); ok(!hwnd, "WM_MDIGETACTIVE should return 0, got %p\n", hwnd); SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0); @@ -1854,7 +1854,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id) { ok(mdi_child != 0, "MDI child creation failed\n"); id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == first_id, "wrong child id %ld\n", id); + ok(id == first_id, "wrong child id %Id\n", id); hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0); ok(!hwnd, "WM_MDIGETACTIVE should return 0, got %p\n", hwnd); ok(GetMenuItemCount(frame_menu) == 0, "Got wrong frame menu item count: %u\n", GetMenuItemCount(frame_menu)); @@ -1871,7 +1871,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id) mdi_child = (HWND)SendMessageW(mdi_client, WM_MDICREATE, 0, (LPARAM)&mdi_cs); ok(mdi_child != 0, "MDI child creation failed\n"); id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == first_id, "wrong child id %ld\n", id); + ok(id == first_id, "wrong child id %Id\n", id); hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0); exp_hwnd = (GetWindowLongW(mdi_child, GWL_STYLE) & WS_VISIBLE) ? mdi_child : 0; ok(hwnd == exp_hwnd, "WM_MDIGETACTIVE should return %p, got %p\n", exp_hwnd, hwnd); @@ -1887,7 +1887,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id) (LPARAM)mdi_lParam_test_message); ok(mdi_child != 0, "MDI child creation failed\n"); id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == first_id, "wrong child id %ld\n", id); + ok(id == first_id, "wrong child id %Id\n", id); hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0); exp_hwnd = (GetWindowLongW(mdi_child, GWL_STYLE) & WS_VISIBLE) ? mdi_child : 0; ok(hwnd == exp_hwnd, "WM_MDIGETACTIVE should return %p, got %p\n", exp_hwnd, hwnd); @@ -1903,7 +1903,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id) (LPARAM)mdi_lParam_test_message); ok(mdi_child != 0, "MDI child creation failed\n"); id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == first_id, "wrong child id %ld\n", id); + ok(id == first_id, "wrong child id %Id\n", id); hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0); ok(!hwnd, "WM_MDIGETACTIVE should return 0, got %p\n", hwnd); ok(GetMenuItemCount(frame_menu) == 0, "Got wrong frame menu item count: %u\n", GetMenuItemCount(frame_menu)); @@ -1924,7 +1924,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id) { ok(mdi_child != 0, "MDI child creation failed\n"); id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == first_id, "wrong child id %ld\n", id); + ok(id == first_id, "wrong child id %Id\n", id); hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0); ok(!hwnd, "WM_MDIGETACTIVE should return 0, got %p\n", hwnd); ok(GetMenuItemCount(frame_menu) == 0, "Got wrong frame menu item count: %u\n", GetMenuItemCount(frame_menu)); @@ -1942,7 +1942,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id) (LPARAM)mdi_lParam_test_message); ok(mdi_child != 0, "MDI child creation failed\n"); id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == first_id, "wrong child id %ld\n", id); + ok(id == first_id, "wrong child id %Id\n", id); hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0); exp_hwnd = (GetWindowLongW(mdi_child, GWL_STYLE) & WS_VISIBLE) ? mdi_child : 0; ok(hwnd == exp_hwnd, "WM_MDIGETACTIVE should return %p, got %p\n", exp_hwnd, hwnd); @@ -1958,7 +1958,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id) mdi_lParam_test_message); ok(mdi_child != 0, "MDI child creation failed\n"); id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == first_id, "wrong child id %ld\n", id); + ok(id == first_id, "wrong child id %Id\n", id); hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0); exp_hwnd = (GetWindowLongW(mdi_child, GWL_STYLE) & WS_VISIBLE) ? mdi_child : 0; ok(hwnd == exp_hwnd, "WM_MDIGETACTIVE should return %p, got %p\n", exp_hwnd, hwnd); @@ -1974,7 +1974,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id) mdi_lParam_test_message); ok(mdi_child != 0, "MDI child creation failed\n"); id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == first_id, "wrong child id %ld\n", id); + ok(id == first_id, "wrong child id %Id\n", id); hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0); exp_hwnd = (GetWindowLongW(mdi_child, GWL_STYLE) & WS_VISIBLE) ? mdi_child : 0; ok(hwnd == exp_hwnd, "WM_MDIGETACTIVE should return %p, got %p\n", exp_hwnd, hwnd); @@ -1993,7 +1993,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id) mdi_lParam_test_message); ok(mdi_child != 0, "MDI child creation failed\n"); id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == first_id, "wrong child id %ld\n", id); + ok(id == first_id, "wrong child id %Id\n", id); hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0); ok(!hwnd, "WM_MDIGETACTIVE should return 0, got %p\n", hwnd); ok(GetMenuItemCount(frame_menu) == 0, "Got wrong frame menu item count: %u\n", GetMenuItemCount(frame_menu)); @@ -2014,7 +2014,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id) { ok(mdi_child != 0, "MDI child creation failed\n"); id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == first_id, "wrong child id %ld\n", id); + ok(id == first_id, "wrong child id %Id\n", id); hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0); ok(!hwnd, "WM_MDIGETACTIVE should return 0, got %p\n", hwnd); ok(GetMenuItemCount(frame_menu) == 0, "Got wrong frame menu item count: %u\n", GetMenuItemCount(frame_menu)); @@ -2032,7 +2032,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id) mdi_lParam_test_message); ok(mdi_child != 0, "MDI child creation failed\n"); id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == first_id, "wrong child id %ld\n", id); + ok(id == first_id, "wrong child id %Id\n", id); hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0); exp_hwnd = (GetWindowLongW(mdi_child, GWL_STYLE) & WS_VISIBLE) ? mdi_child : 0; ok(hwnd == exp_hwnd, "WM_MDIGETACTIVE should return %p, got %p\n", exp_hwnd, hwnd); @@ -2056,7 +2056,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id) mdi_lParam_test_message); ok(mdi_child != 0, "MDI child creation failed\n"); id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == 0, "wrong child id %ld\n", id); + ok(id == 0, "wrong child id %Id\n", id); ok(GetMenuItemCount(frame_menu) == 0, "Got wrong frame menu item count: %u\n", GetMenuItemCount(frame_menu)); hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0); ok(!hwnd, "WM_MDIGETACTIVE should return 0, got %p\n", hwnd); @@ -2070,7 +2070,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id) mdi_lParam_test_message); ok(mdi_child != 0, "MDI child creation failed\n"); id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == 0, "wrong child id %ld\n", id); + ok(id == 0, "wrong child id %Id\n", id); hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0); ok(!hwnd, "WM_MDIGETACTIVE should return 0, got %p\n", hwnd); ok(GetMenuItemCount(frame_menu) == 0, "Got wrong frame menu item count: %u\n", GetMenuItemCount(frame_menu)); @@ -2085,7 +2085,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id) mdi_lParam_test_message); ok(mdi_child != 0, "MDI child creation failed\n"); id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == 0, "wrong child id %ld\n", id); + ok(id == 0, "wrong child id %Id\n", id); hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0); ok(!hwnd, "WM_MDIGETACTIVE should return 0, got %p\n", hwnd); ok(GetMenuItemCount(frame_menu) == 0, "Got wrong frame menu item count: %u\n", GetMenuItemCount(frame_menu)); @@ -2099,7 +2099,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id) mdi_lParam_test_message); ok(mdi_child != 0, "MDI child creation failed\n"); id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == 0, "wrong child id %ld\n", id); + ok(id == 0, "wrong child id %Id\n", id); hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0); ok(!hwnd, "WM_MDIGETACTIVE should return 0, got %p\n", hwnd); ok(GetMenuItemCount(frame_menu) == 0, "Got wrong frame menu item count: %u\n", GetMenuItemCount(frame_menu)); @@ -2113,7 +2113,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id) mdi_lParam_test_message); ok(mdi_child != 0, "MDI child creation failed\n"); id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == 0, "wrong child id %ld\n", id); + ok(id == 0, "wrong child id %Id\n", id); hwnd = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0); ok(!hwnd, "WM_MDIGETACTIVE should return 0, got %p\n", hwnd); ok(GetMenuItemCount(frame_menu) == 0, "Got wrong frame menu item count: %u\n", GetMenuItemCount(frame_menu)); @@ -2233,7 +2233,7 @@ static LRESULT WINAPI mdi_child_wnd_proc_1(HWND hwnd, UINT msg, WPARAM wparam, L
/* MDICREATESTRUCT should have original values */ ok(mdi_cs->style == 0 || mdi_cs->style == 0x7fffffff || mdi_cs->style == 0xffffffff || mdi_cs->style == WS_MAXIMIZE, - "mdi_cs->style does not match (%08x)\n", mdi_cs->style); + "mdi_cs->style does not match (%08lx)\n", mdi_cs->style); ok(mdi_cs->x == CW_USEDEFAULT, "%d != CW_USEDEFAULT\n", mdi_cs->x); ok(mdi_cs->y == CW_USEDEFAULT, "%d != CW_USEDEFAULT\n", mdi_cs->y); ok(mdi_cs->cx == CW_USEDEFAULT, "%d != CW_USEDEFAULT\n", mdi_cs->cx); @@ -2253,7 +2253,7 @@ static LRESULT WINAPI mdi_child_wnd_proc_1(HWND hwnd, UINT msg, WPARAM wparam, L { LONG style = mdi_cs->style | WS_CHILD | WS_CLIPSIBLINGS; ok(cs->style == style, - "cs->style does not match (%08x)\n", cs->style); + "cs->style does not match (%08lx)\n", cs->style); } else { @@ -2262,7 +2262,7 @@ static LRESULT WINAPI mdi_child_wnd_proc_1(HWND hwnd, UINT msg, WPARAM wparam, L style |= WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX; ok(cs->style == style, - "cs->style does not match (%08x)\n", cs->style); + "cs->style does not match (%08lx)\n", cs->style); } break; } @@ -2286,13 +2286,13 @@ static LRESULT WINAPI mdi_child_wnd_proc_1(HWND hwnd, UINT msg, WPARAM wparam, L AdjustWindowRectEx(&rc, style, 0, exstyle); if (winetest_debug > 1) { - trace("MDI child: calculated max window size = (%d x %d)\n", rc.right-rc.left, rc.bottom-rc.top); + trace("MDI child: calculated max window size = (%ld x %ld)\n", rc.right-rc.left, rc.bottom-rc.top); dump_minmax_info( minmax ); }
- ok(minmax->ptMaxSize.x == rc.right - rc.left, "default width of maximized child %d != %d\n", + ok(minmax->ptMaxSize.x == rc.right - rc.left, "default width of maximized child %ld != %ld\n", minmax->ptMaxSize.x, rc.right - rc.left); - ok(minmax->ptMaxSize.y == rc.bottom - rc.top, "default height of maximized child %d != %d\n", + ok(minmax->ptMaxSize.y == rc.bottom - rc.top, "default height of maximized child %ld != %ld\n", minmax->ptMaxSize.y, rc.bottom - rc.top);
DefMDIChildProcA(hwnd, msg, wparam, lparam); @@ -2304,9 +2304,9 @@ static LRESULT WINAPI mdi_child_wnd_proc_1(HWND hwnd, UINT msg, WPARAM wparam, L }
MDI_ChildGetMinMaxInfo(client, hwnd, &my_minmax); - ok(minmax->ptMaxSize.x == my_minmax.ptMaxSize.x, "default width of maximized child %d != %d\n", + ok(minmax->ptMaxSize.x == my_minmax.ptMaxSize.x, "default width of maximized child %ld != %ld\n", minmax->ptMaxSize.x, my_minmax.ptMaxSize.x); - ok(minmax->ptMaxSize.y == my_minmax.ptMaxSize.y, "default height of maximized child %d != %d\n", + ok(minmax->ptMaxSize.y == my_minmax.ptMaxSize.y, "default height of maximized child %ld != %ld\n", minmax->ptMaxSize.y, my_minmax.ptMaxSize.y);
return 1; @@ -2369,7 +2369,7 @@ static LRESULT WINAPI mdi_child_wnd_proc_2(HWND hwnd, UINT msg, WPARAM wparam, L GetClientRect(parent, &rc); if (winetest_debug > 1) { - trace("WM_GETMINMAXINFO: parent %p client size = (%d x %d)\n", parent, rc.right, rc.bottom); + trace("WM_GETMINMAXINFO: parent %p client size = (%ld x %ld)\n", parent, rc.right, rc.bottom); dump_minmax_info( minmax ); } GetClientRect(parent, &rc); @@ -2377,9 +2377,9 @@ static LRESULT WINAPI mdi_child_wnd_proc_2(HWND hwnd, UINT msg, WPARAM wparam, L style &= ~WS_BORDER; /* WS_CAPTION = WS_DLGFRAME | WS_BORDER */ AdjustWindowRectEx(&rc, style, 0, exstyle);
- ok(minmax->ptMaxSize.x == rc.right - rc.left, "default width of maximized child %d != %d\n", + ok(minmax->ptMaxSize.x == rc.right - rc.left, "default width of maximized child %ld != %ld\n", minmax->ptMaxSize.x, rc.right - rc.left); - ok(minmax->ptMaxSize.y == rc.bottom - rc.top, "default height of maximized child %d != %d\n", + ok(minmax->ptMaxSize.y == rc.bottom - rc.top, "default height of maximized child %ld != %ld\n", minmax->ptMaxSize.y, rc.bottom - rc.top); break; } @@ -2399,7 +2399,7 @@ static LRESULT WINAPI mdi_child_wnd_proc_2(HWND hwnd, UINT msg, WPARAM wparam, L GetWindowRect(hwnd, &rc1); GetClientRect(hwnd, &rc2); ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc1); - ok(!ret, "got %08lx\n", ret); + ok(!ret, "got %08Ix\n", ret); MapWindowPoints(0, hwnd, (LPPOINT)&rc1, 2); ok(EqualRect(&rc1, &rc2), "rects do not match, window=%s client=%s\n", wine_dbgstr_rect(&rc1), wine_dbgstr_rect(&rc2)); @@ -2429,7 +2429,7 @@ static LRESULT WINAPI mdi_child_wnd_proc_2(HWND hwnd, UINT msg, WPARAM wparam, L case WM_NCCALCSIZE: { LRESULT ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, wparam, lparam); - ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wparam, lparam); + ok(!ret, "got %08Ix (%08Ix %08Ix)\n", ret, wparam, lparam); return ret; } } @@ -2492,7 +2492,7 @@ static LRESULT WINAPI mdi_main_wnd_procA(HWND hwnd, UINT msg, WPARAM wparam, LPA case WM_NCCALCSIZE: { LRESULT ret = DefFrameProcA(hwnd, mdi_client, WM_NCCALCSIZE, wparam, lparam); - ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wparam, lparam); + ok(!ret, "got %08Ix (%08Ix %08Ix)\n", ret, wparam, lparam); return ret; }
@@ -2562,7 +2562,7 @@ static void test_mdi(void) SCROLLINFO si; BOOL ret, gotit;
- winetest_push_context("style %#x", style[i]); + winetest_push_context("style %#lx", style[i]); mdi_client = CreateWindowExA(0, "mdiclient", NULL, WS_CHILD | style[i], 0, 0, rc.right, rc.bottom, @@ -2797,11 +2797,11 @@ static void check_icon_size_( int line, HICON icon, LONG width, LONG height ) BOOL ret;
ret = GetIconInfo( icon, &info ); - ok_(__FILE__, line)(ret, "failed to get icon info, error %u\n", GetLastError()); + ok_(__FILE__, line)(ret, "failed to get icon info, error %lu\n", GetLastError()); ret = GetObjectW(info.hbmColor, sizeof(bitmap), &bitmap); - ok_(__FILE__, line)(ret, "failed to get bitmap, error %u\n", GetLastError()); - ok_(__FILE__, line)(bitmap.bmWidth == width, "expected width %d, got %d\n", width, bitmap.bmWidth); - ok_(__FILE__, line)(bitmap.bmHeight == height, "expected height %d, got %d\n", height, bitmap.bmHeight); + ok_(__FILE__, line)(ret, "failed to get bitmap, error %lu\n", GetLastError()); + ok_(__FILE__, line)(bitmap.bmWidth == width, "expected width %ld, got %d\n", width, bitmap.bmWidth); + ok_(__FILE__, line)(bitmap.bmHeight == height, "expected height %ld, got %d\n", height, bitmap.bmHeight); }
#define check_internal_icon_size(a, b, c, d) check_internal_icon_size_(__LINE__, a, b, c, d) @@ -2814,7 +2814,7 @@ static void check_internal_icon_size_( int line, HANDLE window, UINT type, LONG ok_(__FILE__, line)(icon != 0, "expected nonzero icon\n"); check_icon_size_( line, icon, width, height ); ret = DestroyIcon( icon ); - ok_(__FILE__, line)(ret, "failed to destroy icon, error %u\n", GetLastError()); + ok_(__FILE__, line)(ret, "failed to destroy icon, error %lu\n", GetLastError()); }
static DWORD WINAPI internal_get_icon_thread(void *arg) @@ -2825,7 +2825,7 @@ static DWORD WINAPI internal_get_icon_thread(void *arg) icon = pInternalGetWindowIcon( arg, ICON_BIG ); ok( icon != 0, "expected nonzero icon\n" ); ret = DestroyIcon( icon ); - ok( ret, "got error %u\n", GetLastError() ); + ok( ret, "got error %lu\n", GetLastError() );
return 0; } @@ -2861,15 +2861,15 @@ static void test_icons(void) SetLastError( 0xdeadbeef ); res = pInternalGetWindowIcon( hwnd, ICON_BIG ); ok( res != 0, "expected nonzero icon\n" ); - ok( GetLastError() == 0xdeadbeef, "got error %u\n", GetLastError() ); + ok( GetLastError() == 0xdeadbeef, "got error %lu\n", GetLastError() ); check_icon_size( res, 40, 40 ); res2 = pInternalGetWindowIcon( hwnd, ICON_BIG ); ok( res2 && res2 != res, "got %p\n", res2 ); check_icon_size( res2, 40, 40 ); ret = DestroyIcon( res2 ); - ok( ret, "got error %u\n", GetLastError() ); + ok( ret, "got error %lu\n", GetLastError() ); ret = DestroyIcon( res ); - ok( ret, "got error %u\n", GetLastError() ); + ok( ret, "got error %lu\n", GetLastError() );
res = (HICON)SendMessageA( hwnd, WM_GETICON, ICON_SMALL, 0 ); ok( !res, "wrong small icon %p\n", res ); @@ -2880,9 +2880,9 @@ static void test_icons(void) ok( res2 && res2 != res, "got %p\n", res2 ); check_icon_size( res2, 50, 50 ); ret = DestroyIcon( res2 ); - ok( ret, "got error %u\n", GetLastError() ); + ok( ret, "got error %lu\n", GetLastError() ); ret = DestroyIcon( res ); - ok( ret, "got error %u\n", GetLastError() ); + ok( ret, "got error %lu\n", GetLastError() );
res = (HICON)SendMessageA( hwnd, WM_GETICON, ICON_SMALL2, 0 ); ok( !res, "wrong small2 icon %p\n", res ); @@ -2893,9 +2893,9 @@ static void test_icons(void) ok( res2 && res2 != res, "got %p\n", res2 ); check_icon_size( res2, 50, 50 ); ret = DestroyIcon( res2 ); - ok( ret, "got error %u\n", GetLastError() ); + ok( ret, "got error %lu\n", GetLastError() ); ret = DestroyIcon( res ); - ok( ret, "got error %u\n", GetLastError() ); + ok( ret, "got error %lu\n", GetLastError() );
res = (HICON)SendMessageA( hwnd, WM_SETICON, ICON_BIG, (LPARAM)icon ); ok( res == 0, "wrong previous big icon %p/0\n", res ); @@ -2905,7 +2905,7 @@ static void test_icons(void) ok( res2 && res2 != icon, "got %p\n", res2 ); check_icon_size( res2, 10, 10 ); ret = DestroyIcon( res2 ); - ok( ret, "got error %u\n", GetLastError() ); + ok( ret, "got error %lu\n", GetLastError() );
res = (HICON)SendMessageA( hwnd, WM_SETICON, ICON_BIG, (LPARAM)icon2 ); ok( res == icon, "wrong previous big icon %p/%p\n", res, icon ); @@ -2915,7 +2915,7 @@ static void test_icons(void) ok( res2 && res2 != icon2, "got %p\n", res2 ); check_icon_size( res2, 20, 20 ); ret = DestroyIcon( res2 ); - ok( ret, "got error %u\n", GetLastError() ); + ok( ret, "got error %lu\n", GetLastError() );
res = (HICON)SendMessageA( hwnd, WM_GETICON, ICON_SMALL, 0 ); ok( res == 0, "wrong small icon %p/0\n", res ); @@ -2923,7 +2923,7 @@ static void test_icons(void) ok( res2 != 0, "expected nonzero icon\n" ); check_icon_size( res2, small_width, small_height ); ret = DestroyIcon( res2 ); - ok( ret, "got error %u\n", GetLastError() ); + ok( ret, "got error %lu\n", GetLastError() );
res = (HICON)SendMessageA( hwnd, WM_GETICON, ICON_SMALL2, 0 ); ok( res && res != icon3 && res != icon2, "wrong small2 icon %p\n", res ); @@ -2934,7 +2934,7 @@ static void test_icons(void) ok( res2 && res2 != icon3 && res2 != icon2 && res2 != res, "got %p\n", res2 ); check_icon_size( res2, small_width, small_height ); ret = DestroyIcon( res2 ); - ok( ret, "got error %u\n", GetLastError() ); + ok( ret, "got error %lu\n", GetLastError() );
res = (HICON)SendMessageA( hwnd, WM_SETICON, ICON_SMALL, (LPARAM)icon ); ok( res == 0, "wrong previous small icon %p/0\n", res ); @@ -2944,7 +2944,7 @@ static void test_icons(void) ok( res2 && res2 != icon, "got %p\n", res2 ); check_icon_size( res2, 10, 10 ); ret = DestroyIcon( res2 ); - ok( ret, "got error %u\n", GetLastError() ); + ok( ret, "got error %lu\n", GetLastError() );
res = (HICON)SendMessageA( hwnd, WM_GETICON, ICON_SMALL2, 0 ); ok( res == icon, "wrong small2 icon after set %p/%p\n", res, icon ); @@ -2952,7 +2952,7 @@ static void test_icons(void) ok( res2 && res2 != icon && res2 != res, "got %p\n", res2 ); check_icon_size( res2, 10, 10 ); ret = DestroyIcon( res2 ); - ok( ret, "got error %u\n", GetLastError() ); + ok( ret, "got error %lu\n", GetLastError() );
res = (HICON)SendMessageA( hwnd, WM_SETICON, ICON_SMALL, (LPARAM)icon3 ); ok( res == icon, "wrong previous small icon %p/%p\n", res, icon ); @@ -2962,7 +2962,7 @@ static void test_icons(void) ok( res2 && res2 != icon3, "got %p\n", res2 ); check_icon_size( res2, 30, 30 ); ret = DestroyIcon( res2 ); - ok( ret, "got error %u\n", GetLastError() ); + ok( ret, "got error %lu\n", GetLastError() );
res = (HICON)SendMessageA( hwnd, WM_GETICON, ICON_SMALL2, 0 ); ok( res == icon3, "wrong small2 icon after set %p/%p\n", res, icon3 ); @@ -2970,7 +2970,7 @@ static void test_icons(void) ok( res2 && res2 != icon3 && res2 != res, "got %p\n", res2 ); check_icon_size( res2, 30, 30 ); ret = DestroyIcon( res2 ); - ok( ret, "got error %u\n", GetLastError() ); + ok( ret, "got error %lu\n", GetLastError() );
/* make sure the big icon hasn't changed */ res = (HICON)SendMessageA( hwnd, WM_GETICON, ICON_BIG, 0 ); @@ -2979,17 +2979,17 @@ static void test_icons(void) ok( res2 && res2 != icon2, "got %p\n", res2 ); check_icon_size( res2, 20, 20 ); ret = DestroyIcon( res2 ); - ok( ret, "got error %u\n", GetLastError() ); + ok( ret, "got error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); res = pInternalGetWindowIcon( NULL, ICON_BIG ); ok( !res, "got %p\n", res ); - ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "got error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "got error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); res = pInternalGetWindowIcon( hwnd, 0xdeadbeef ); ok( !res, "got %p\n", res ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "got error %lu\n", GetLastError() );
thread = CreateThread( NULL, 0, internal_get_icon_thread, hwnd, 0, NULL ); ret = WaitForSingleObject( thread, 1000 ); @@ -3133,13 +3133,13 @@ static void test_SetWindowPos(HWND hwnd, HWND hwnd2) ok(ret, "Got %d\n", ret);
hwnd_desktop = GetDesktopWindow(); - ok(!!hwnd_desktop, "Failed to get hwnd_desktop window (%d).\n", GetLastError()); + ok(!!hwnd_desktop, "Failed to get hwnd_desktop window (%ld).\n", GetLastError()); hwnd_child = create_tool_window(WS_VISIBLE|WS_CHILD, hwnd); - ok(!!hwnd_child, "Failed to create child window (%d)\n", GetLastError()); + ok(!!hwnd_child, "Failed to create child window (%ld)\n", GetLastError()); hwnd_grandchild = create_tool_window(WS_VISIBLE|WS_CHILD, hwnd_child); - ok(!!hwnd_child, "Failed to create child window (%d)\n", GetLastError()); + ok(!!hwnd_child, "Failed to create child window (%ld)\n", GetLastError()); hwnd_child2 = create_tool_window(WS_VISIBLE|WS_CHILD, hwnd); - ok(!!hwnd_child2, "Failed to create second child window (%d)\n", GetLastError()); + ok(!!hwnd_child2, "Failed to create second child window (%ld)\n", GetLastError());
ret = SetWindowPos(hwnd, hwnd2, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE); ok(ret, "Got %d\n", ret); @@ -3277,7 +3277,7 @@ static void test_SetWindowPos(HWND hwnd, HWND hwnd2) DestroyWindow(hwnd_child2);
hwnd_child = create_tool_window(WS_CHILD|WS_POPUP|WS_SYSMENU, hwnd2); - ok(!!hwnd_child, "Failed to create child window (%d)\n", GetLastError()); + ok(!!hwnd_child, "Failed to create child window (%ld)\n", GetLastError()); ret = SetWindowPos(hwnd_child, NULL, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_SHOWWINDOW); ok(ret, "Got %d\n", ret); flush_events( TRUE ); @@ -3305,7 +3305,7 @@ static void test_SetMenu(HWND parent) ok(ret == hMenu, "unexpected menu id %p\n", ret); /* test whether we can destroy a menu assigned to a window */ retok = DestroyMenu(hMenu); - ok( retok, "DestroyMenu error %d\n", GetLastError()); + ok( retok, "DestroyMenu error %ld\n", GetLastError()); retok = IsMenu(hMenu); ok(!retok, "menu handle should be not valid after DestroyMenu\n"); ret = GetMenu(parent); @@ -3409,7 +3409,7 @@ static void test_window_tree(HWND parent, const DWORD *style, const int *order,
for (i = 0; i < total; i++) { - ok(child[order[i]] == hwnd, "Z order of child #%ld is wrong\n", i); + ok(child[order[i]] == hwnd, "Z order of child #%Id is wrong\n", i); hwnd = GetWindow(hwnd, GW_HWNDNEXT); }
@@ -3677,7 +3677,7 @@ static void test_SetFocus(HWND hwnd) ok( GetFocus() == child, "Focus should be on child %p\n", child ); SetLastError(0xdeadbeef); EnableWindow(hwnd, FALSE); - ok(GetLastError() == 0xdeadbeef, "got error %u in EnableWindow call\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "got error %lu in EnableWindow call\n", GetLastError()); ok( GetFocus() == child, "Focus should still be on child %p\n", child ); EnableWindow(hwnd, TRUE);
@@ -3736,16 +3736,16 @@ static void test_SetActiveWindow_0_proc( char **argv )
sscanf( argv[3], "%p", &other ); start_event = CreateEventW( NULL, FALSE, FALSE, L"test_SetActiveWindow_0_start" ); - ok( start_event != 0, "CreateEventW failed, error %u\n", GetLastError() ); + ok( start_event != 0, "CreateEventW failed, error %lu\n", GetLastError() ); stop_event = CreateEventW( NULL, FALSE, FALSE, L"test_SetActiveWindow_0_stop" ); - ok( stop_event != 0, "CreateEventW failed, error %u\n", GetLastError() ); + ok( stop_event != 0, "CreateEventW failed, error %lu\n", GetLastError() );
hwnd = CreateWindowExA( 0, "static", NULL, WS_OVERLAPPEDWINDOW | WS_VISIBLE, 100, 100, 200, 200, 0, 0, NULL, NULL ); - ok( !!hwnd, "CreateWindowExA failed, error %u\n", GetLastError() ); + ok( !!hwnd, "CreateWindowExA failed, error %lu\n", GetLastError() ); flush_events( TRUE );
ret = SetForegroundWindow( hwnd ); - ok( ret, "SetForegroundWindow failed, error %u\n", GetLastError() ); + ok( ret, "SetForegroundWindow failed, error %lu\n", GetLastError() );
tmp = GetForegroundWindow(); ok( tmp == hwnd, "GetForegroundWindow returned %p\n", tmp ); @@ -3756,12 +3756,12 @@ static void test_SetActiveWindow_0_proc( char **argv )
SetLastError( 0xdeadbeef ); tmp = SetActiveWindow( 0 ); - if (!tmp) ok( GetLastError() == 0xdeadbeef, "got error %u\n", GetLastError() ); + if (!tmp) ok( GetLastError() == 0xdeadbeef, "got error %lu\n", GetLastError() ); else /* < Win10 */ { ok( tmp == hwnd, "SetActiveWindow returned %p\n", tmp ); todo_wine - ok( GetLastError() == 0, "got error %u\n", GetLastError() ); + ok( GetLastError() == 0, "got error %lu\n", GetLastError() );
tmp = GetForegroundWindow(); ok( tmp == other || tmp == 0, "GetForegroundWindow returned %p\n", tmp ); @@ -3809,7 +3809,7 @@ static void test_SetActiveWindow_0( char **argv ) BOOL ret;
hwnd = CreateWindowExA( 0, "static", NULL, WS_OVERLAPPEDWINDOW | WS_VISIBLE, 100, 100, 200, 200, 0, 0, NULL, NULL ); - ok( !!hwnd, "CreateWindowExA failed, error %u\n", GetLastError() ); + ok( !!hwnd, "CreateWindowExA failed, error %lu\n", GetLastError() ); SetWindowPos( hwnd, HWND_TOPMOST, 150, 150, 300, 300, SWP_FRAMECHANGED | SWP_SHOWWINDOW ); flush_events( TRUE );
@@ -3821,13 +3821,13 @@ static void test_SetActiveWindow_0( char **argv ) ok( tmp == hwnd, "GetFocus returned %p\n", tmp );
events[1] = CreateEventW( NULL, FALSE, FALSE, L"test_SetActiveWindow_0_start" ); - ok( events[1] != 0, "CreateEventW failed, error %u\n", GetLastError() ); + ok( events[1] != 0, "CreateEventW failed, error %lu\n", GetLastError() ); events[2] = CreateEventW( NULL, FALSE, FALSE, L"test_SetActiveWindow_0_stop" ); - ok( events[2] != 0, "CreateEventW failed, error %u\n", GetLastError() ); + ok( events[2] != 0, "CreateEventW failed, error %lu\n", GetLastError() );
sprintf( cmdline, "%s %s SetActiveWindow_0 %p", argv[0], argv[1], hwnd ); ret = CreateProcessA( NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &startup, &info ); - ok( ret, "CreateProcessA failed, error %u\n", GetLastError() ); + ok( ret, "CreateProcessA failed, error %lu\n", GetLastError() );
events[0] = info.hProcess; if (wait_for_events( 2, events, INFINITE ) == 1) @@ -3903,7 +3903,7 @@ static void test_SetActiveWindow(HWND hwnd) ret = SetActiveWindow(GetDesktopWindow()); ok(ret == NULL, "expected NULL, got %p\n", ret); todo_wine - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", GetLastError()); check_wnd_state(hwnd, hwnd, hwnd, 0);
/* activating a child should activate the parent */ @@ -3932,10 +3932,10 @@ static DWORD WINAPI create_window_thread(void *param) p->window = CreateWindowA("static", NULL, WS_POPUP | WS_VISIBLE, 0, 0, 0, 0, 0, 0, 0, 0);
ret = SetEvent(p->window_created); - ok(ret, "SetEvent failed, last error %#x.\n", GetLastError()); + ok(ret, "SetEvent failed, last error %#lx.\n", GetLastError());
res = WaitForSingleObject(p->test_finished, INFINITE); - ok(res == WAIT_OBJECT_0, "Wait failed (%#x), last error %#x.\n", res, GetLastError()); + ok(res == WAIT_OBJECT_0, "Wait failed (%#lx), last error %#lx.\n", res, GetLastError());
DestroyWindow(p->window); return 0; @@ -3970,7 +3970,7 @@ static void test_SetForegroundWindow(HWND hwnd) ret = SetForegroundWindow(0); ok(!ret, "SetForegroundWindow returned TRUE instead of FALSE\n"); ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, - "got error %d expected ERROR_INVALID_WINDOW_HANDLE\n", GetLastError()); + "got error %ld expected ERROR_INVALID_WINDOW_HANDLE\n", GetLastError()); check_wnd_state(hwnd, hwnd, hwnd, 0);
SetWindowPos(hwnd,0,0,0,0,0,SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE|SWP_HIDEWINDOW); @@ -3982,7 +3982,7 @@ static void test_SetForegroundWindow(HWND hwnd) hwnd2 = GetForegroundWindow(); ok(hwnd2 == hwnd, "Wrong foreground window %p\n", hwnd2); ret = SetForegroundWindow( GetDesktopWindow() ); - ok(ret, "SetForegroundWindow(desktop) error: %d\n", GetLastError()); + ok(ret, "SetForegroundWindow(desktop) error: %ld\n", GetLastError()); hwnd2 = GetForegroundWindow(); ok(hwnd2 != hwnd, "Wrong foreground window %p\n", hwnd2);
@@ -4016,13 +4016,13 @@ static void test_SetForegroundWindow(HWND hwnd) check_wnd_state(hwnd2, hwnd2, hwnd2, 0);
thread_params.window_created = CreateEventW(NULL, FALSE, FALSE, NULL); - ok(!!thread_params.window_created, "CreateEvent failed, last error %#x.\n", GetLastError()); + ok(!!thread_params.window_created, "CreateEvent failed, last error %#lx.\n", GetLastError()); thread_params.test_finished = CreateEventW(NULL, FALSE, FALSE, NULL); - ok(!!thread_params.test_finished, "CreateEvent failed, last error %#x.\n", GetLastError()); + ok(!!thread_params.test_finished, "CreateEvent failed, last error %#lx.\n", GetLastError()); thread = CreateThread(NULL, 0, create_window_thread, &thread_params, 0, &tid); - ok(!!thread, "Failed to create thread, last error %#x.\n", GetLastError()); + ok(!!thread, "Failed to create thread, last error %#lx.\n", GetLastError()); res = WaitForSingleObject(thread_params.window_created, INFINITE); - ok(res == WAIT_OBJECT_0, "Wait failed (%#x), last error %#x.\n", res, GetLastError()); + ok(res == WAIT_OBJECT_0, "Wait failed (%#lx), last error %#lx.\n", res, GetLastError()); check_wnd_state(hwnd2, thread_params.window, hwnd2, 0);
SetForegroundWindow(hwnd2); @@ -4235,11 +4235,11 @@ static LRESULT CALLBACK test_capture_4_proc(HWND hWnd, UINT msg, WPARAM wParam, gti.cbSize = sizeof(GUITHREADINFO); status = pGetGUIThreadInfo(GetCurrentThreadId(), >i); ok(status, "GetGUIThreadInfo() failed!\n"); - ok(gti.flags & GUI_INMENUMODE, "Thread info incorrect (flags=%08X)!\n", gti.flags); + ok(gti.flags & GUI_INMENUMODE, "Thread info incorrect (flags=%08lX)!\n", gti.flags); } cap_wnd = GetCapture();
- ok(cap_wnd == (HWND)lParam, "capture window %p does not match lparam %lx\n", cap_wnd, lParam); + ok(cap_wnd == (HWND)lParam, "capture window %p does not match lparam %Ix\n", cap_wnd, lParam); todo_wine ok(cap_wnd == hWnd, "capture window %p does not match hwnd %p\n", cap_wnd, hWnd);
/* check that re-setting the capture for the menu fails */ @@ -4266,7 +4266,7 @@ static LRESULT CALLBACK test_capture_4_proc(HWND hWnd, UINT msg, WPARAM wParam, gti.cbSize = sizeof(GUITHREADINFO); status = pGetGUIThreadInfo(GetCurrentThreadId(), >i); ok(status, "GetGUIThreadInfo() failed!\n"); - ok(gti.flags & GUI_INMENUMODE, "Thread info incorrect (flags=%08X)!\n", gti.flags); + ok(gti.flags & GUI_INMENUMODE, "Thread info incorrect (flags=%08lX)!\n", gti.flags); }
/* verify that no capture change took place */ @@ -4309,11 +4309,11 @@ static void test_capture_4(void) wclass.cbClsExtra = 0; wclass.cbWndExtra = 0; aclass = RegisterClassA( &wclass ); - ok( aclass, "RegisterClassA failed with error %d\n", GetLastError()); + ok( aclass, "RegisterClassA failed with error %ld\n", GetLastError()); hwnd = CreateWindowA( wclass.lpszClassName, "MenuTest", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, 400, 200, NULL, NULL, hInstance, NULL); - ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError()); + ok(hwnd != NULL, "CreateWindowEx failed with error %ld\n", GetLastError()); if (!hwnd) return; hmenu = CreatePopupMenu();
@@ -4483,7 +4483,7 @@ static void test_mouse_input(HWND hwnd) { ok(msg.hwnd == popup && msg.message == WM_MOUSEMOVE, "hwnd %p message %04x\n", msg.hwnd, msg.message); - ok(msg.pt.x == x && msg.pt.y == y, "wrong message coords (%d,%d)/(%d,%d)\n", + ok(msg.pt.x == x && msg.pt.y == y, "wrong message coords (%d,%d)/(%ld,%ld)\n", x, y, msg.pt.x, msg.pt.y); }
@@ -4628,7 +4628,7 @@ static void test_mouse_input(HWND hwnd) } ok(msg.hwnd == child && msg.message == WM_NCLBUTTONDOWN, "hwnd %p/%p message %04x\n", msg.hwnd, child, msg.message); - ok(msg.wParam == HTSYSMENU, "wparam %ld\n", msg.wParam); + ok(msg.wParam == HTSYSMENU, "wparam %Id\n", msg.wParam);
ret = wait_for_message( &msg ); ok(ret, "no message available\n"); @@ -4641,7 +4641,7 @@ static void test_mouse_input(HWND hwnd) ok(ret, "no message available\n"); ok(msg.hwnd == child && msg.message == WM_LBUTTONDBLCLK, "hwnd %p/%p message %04x\n", msg.hwnd, child, msg.message); - ok(msg.wParam == MK_LBUTTON, "wparam %ld\n", msg.wParam); + ok(msg.wParam == MK_LBUTTON, "wparam %Id\n", msg.wParam);
ret = wait_for_message( &msg ); ok(ret, "no message available\n"); @@ -4713,7 +4713,7 @@ static void nccalchelper(HWND hwnd, INT x, INT y, RECT *prc) GetWindowRect( hwnd, prc); rc = *prc; ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)prc); - ok(!ret, "got %08lx\n", ret); + ok(!ret, "got %08Ix\n", ret); if (winetest_debug > 1) trace("window rect is %s, nccalc rect is %s\n", wine_dbgstr_rect(&rc), wine_dbgstr_rect(prc)); } @@ -4953,17 +4953,17 @@ static LRESULT WINAPI cbt_proc(int ncode, WPARAM wparam, LPARAM lparam)
ts = c->lpcs->lpCreateParams; ok(ts != NULL, "lpCreateParams not set\n"); - ok(c->lpcs->style == ts->cs_style, "style = 0x%08x, expected 0x%08x\n", + ok(c->lpcs->style == ts->cs_style, "style = 0x%08lx, expected 0x%08lx\n", c->lpcs->style, ts->cs_style); - ok(c->lpcs->dwExStyle == ts->cs_exstyle, "exstyle = 0x%08x, expected 0x%08x\n", + ok(c->lpcs->dwExStyle == ts->cs_exstyle, "exstyle = 0x%08lx, expected 0x%08lx\n", c->lpcs->dwExStyle, ts->cs_exstyle);
style = GetWindowLongW(hwnd, GWL_STYLE); - ok(style == ts->cs_style, "style = 0x%08x, expected 0x%08x\n", + ok(style == ts->cs_style, "style = 0x%08lx, expected 0x%08lx\n", style, ts->cs_style); style = GetWindowLongW(hwnd, GWL_EXSTYLE); ok(style == (ts->cs_exstyle & ~WS_EX_LAYERED), - "exstyle = 0x%08x, expected 0x%08x\n", style, ts->cs_exstyle); + "exstyle = 0x%08lx, expected 0x%08lx\n", style, ts->cs_exstyle); return CallNextHookEx(NULL, ncode, wparam, lparam); }
@@ -4981,16 +4981,16 @@ static LRESULT WINAPI StyleCheckProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM ts = cs->lpCreateParams;
ok(ts != NULL, "lpCreateParams not set\n"); - ok(cs->style == ts->cs_style, "style = 0x%08x, expected 0x%08x\n", + ok(cs->style == ts->cs_style, "style = 0x%08lx, expected 0x%08lx\n", cs->style, ts->cs_style); - ok(cs->dwExStyle == ts->cs_exstyle, "exstyle = 0x%08x, expected 0x%08x\n", + ok(cs->dwExStyle == ts->cs_exstyle, "exstyle = 0x%08lx, expected 0x%08lx\n", cs->dwExStyle, ts->cs_exstyle);
style = GetWindowLongW(hwnd, GWL_STYLE); - ok(style == ts->style, "style = 0x%08x, expected 0x%08x\n", + ok(style == ts->style, "style = 0x%08lx, expected 0x%08lx\n", style, ts->style); style = GetWindowLongW(hwnd, GWL_EXSTYLE); - ok(style == ts->exstyle, "exstyle = 0x%08x, expected 0x%08x\n", + ok(style == ts->exstyle, "exstyle = 0x%08lx, expected 0x%08lx\n", style, ts->exstyle); break; } @@ -5056,8 +5056,8 @@ static void check_window_style(DWORD dwStyleIn, DWORD dwExStyleIn, DWORD dwStyle
dwActualStyle = GetWindowLongA(hwnd, GWL_STYLE); dwActualExStyle = GetWindowLongA(hwnd, GWL_EXSTYLE); - ok(dwActualStyle == dwStyleOut, "expected style %#x, got %#x\n", dwStyleOut, dwActualStyle); - ok(dwActualExStyle == dwExStyleOut, "expected ex_style %#x, got %#x\n", dwExStyleOut, dwActualExStyle); + ok(dwActualStyle == dwStyleOut, "expected style %#lx, got %#lx\n", dwStyleOut, dwActualStyle); + ok(dwActualExStyle == dwExStyleOut, "expected ex_style %#lx, got %#lx\n", dwExStyleOut, dwActualExStyle);
/* try setting the styles explicitly */ SetWindowLongA( hwnd, GWL_EXSTYLE, dwExStyleIn ); @@ -5070,8 +5070,8 @@ static void check_window_style(DWORD dwStyleIn, DWORD dwExStyleIn, DWORD dwStyle dwExStyleOut = dwExStyleIn | WS_EX_WINDOWEDGE; else dwExStyleOut = dwExStyleIn & ~WS_EX_WINDOWEDGE; - ok(dwActualStyle == dwStyleOut, "expected style %#x, got %#x\n", dwStyleOut, dwActualStyle); - ok(dwActualExStyle == dwExStyleOut, "expected ex_style %#x, got %#x\n", dwExStyleOut, dwActualExStyle); + ok(dwActualStyle == dwStyleOut, "expected style %#lx, got %#lx\n", dwStyleOut, dwActualStyle); + ok(dwActualExStyle == dwExStyleOut, "expected ex_style %#lx, got %#lx\n", dwExStyleOut, dwActualExStyle);
SetWindowLongA( hwnd, GWL_STYLE, dwStyleIn ); dwActualStyle = GetWindowLongA(hwnd, GWL_STYLE); @@ -5086,8 +5086,8 @@ static void check_window_style(DWORD dwStyleIn, DWORD dwExStyleIn, DWORD dwStyle dwExStyleOut = dwExStyleIn | WS_EX_WINDOWEDGE; else dwExStyleOut = dwExStyleIn & ~WS_EX_WINDOWEDGE; - ok(dwActualStyle == dwStyleOut, "expected style %#x, got %#x\n", dwStyleOut, dwActualStyle); - ok(dwActualExStyle == dwExStyleOut, "expected ex_style %#x, got %#x\n", dwExStyleOut, dwActualExStyle); + ok(dwActualStyle == dwStyleOut, "expected style %#lx, got %#lx\n", dwStyleOut, dwActualStyle); + ok(dwActualExStyle == dwExStyleOut, "expected ex_style %#lx, got %#lx\n", dwExStyleOut, dwActualExStyle);
DestroyWindow(hwnd); if (hwndParent) DestroyWindow(hwndParent); @@ -5150,7 +5150,7 @@ static void test_window_styles(void) if ((tests[i].exstyle_in & WS_EX_LAYERED) && !pGetLayeredWindowAttributes) continue;
- winetest_push_context("style %#x exstyle %#x", tests[i].style_in, tests[i].exstyle_in); + winetest_push_context("style %#lx exstyle %#lx", tests[i].style_in, tests[i].exstyle_in); check_window_style(tests[i].style_in, tests[i].exstyle_in, tests[i].style_out, tests[i].exstyle_out); winetest_pop_context(); } @@ -5189,40 +5189,40 @@ static INT_PTR WINAPI empty_dlg_proc2(HWND hwnd, UINT msg, WPARAM wparam, LPARAM ok(IsWindowEnabled(hwnd), "wrong state for %p\n", hwnd); if (parent_is_child) { - ok(IsWindowEnabled(param->parent), "wrong state for %08x\n", style); + ok(IsWindowEnabled(param->parent), "wrong state for %08lx\n", style); disabled_hwnd = param->grand_parent; } else { - ok(!IsWindowEnabled(param->parent), "wrong state for %08x\n", style); + ok(!IsWindowEnabled(param->parent), "wrong state for %08lx\n", style); disabled_hwnd = param->parent; }
if (param->grand_parent) { if (parent_is_child) - ok(!IsWindowEnabled(param->grand_parent), "wrong state for %08x\n", style); + ok(!IsWindowEnabled(param->grand_parent), "wrong state for %08lx\n", style); else - ok(IsWindowEnabled(param->grand_parent), "wrong state for %08x\n", style); + ok(IsWindowEnabled(param->grand_parent), "wrong state for %08lx\n", style); }
DialogBoxIndirectParamA(GetModuleHandleA(NULL), param->dlg_data, disabled_hwnd, empty_dlg_proc3, 0); - ok(IsWindowEnabled(disabled_hwnd), "wrong state for %08x\n", style); + ok(IsWindowEnabled(disabled_hwnd), "wrong state for %08lx\n", style);
ok(IsWindowEnabled(hwnd), "wrong state for %p\n", hwnd); ok(IsWindowEnabled(param->parent), "wrong state for %p\n", param->parent); if (param->grand_parent) - ok(IsWindowEnabled(param->grand_parent), "wrong state for %p (%08x)\n", param->grand_parent, style); + ok(IsWindowEnabled(param->grand_parent), "wrong state for %p (%08lx)\n", param->grand_parent, style);
DialogBoxIndirectParamA(GetModuleHandleA(NULL), param->dlg_data, hwnd, empty_dlg_proc3, 0); ok(IsWindowEnabled(hwnd), "wrong state for %p\n", hwnd); ok(IsWindowEnabled(param->parent), "wrong state for %p\n", param->parent); if (param->grand_parent) - ok(IsWindowEnabled(param->grand_parent), "wrong state for %p (%08x)\n", param->grand_parent, style); + ok(IsWindowEnabled(param->grand_parent), "wrong state for %p (%08lx)\n", param->grand_parent, style);
param->dlg_data->style |= WS_CHILD; DialogBoxIndirectParamA(GetModuleHandleA(NULL), param->dlg_data, hwnd, empty_dlg_proc3, 0); - ok(IsWindowEnabled(hwnd), "wrong state for %p (%08x)\n", hwnd, style); + ok(IsWindowEnabled(hwnd), "wrong state for %p (%08lx)\n", hwnd, style);
EndDialog(hwnd, 0); } @@ -5252,7 +5252,7 @@ static void check_dialog_style(DWORD style_in, DWORD ex_style_in, DWORD style_ou
parent = CreateWindowExA(0, "static", NULL, style_in, 0, 0, 0, 0, grand_parent, NULL, NULL, NULL); - ok(parent != 0, "parent creation failed, style %#x\n", style_in); + ok(parent != 0, "parent creation failed, style %#lx\n", style_in);
dlg_data.dt.style = style_in; dlg_data.dt.dwExtendedStyle = ex_style_in; @@ -5267,22 +5267,22 @@ static void check_dialog_style(DWORD style_in, DWORD ex_style_in, DWORD style_ou dlg_data.caption[0] = 0;
hwnd = CreateDialogIndirectParamA(GetModuleHandleA(NULL), &dlg_data.dt, parent, empty_dlg_proc, 0); - ok(hwnd != 0, "dialog creation failed, style %#x, exstyle %#x\n", style_in, ex_style_in); + ok(hwnd != 0, "dialog creation failed, style %#lx, exstyle %#lx\n", style_in, ex_style_in);
flush_events( TRUE );
style = GetWindowLongA(hwnd, GWL_STYLE); ex_style = GetWindowLongA(hwnd, GWL_EXSTYLE); - ok(style == (style_out | DS_3DLOOK), "got %#x\n", style); - ok(ex_style == ex_style_out, "expected ex_style %#x, got %#x\n", ex_style_out, ex_style); + ok(style == (style_out | DS_3DLOOK), "got %#lx\n", style); + ok(ex_style == ex_style_out, "expected ex_style %#lx, got %#lx\n", ex_style_out, ex_style);
- ok(IsWindowEnabled(parent), "wrong parent state (dialog style %#x)\n", style_in); + ok(IsWindowEnabled(parent), "wrong parent state (dialog style %#lx)\n", style_in);
/* try setting the styles explicitly */ SetWindowLongA(hwnd, GWL_EXSTYLE, ex_style_in); style = GetWindowLongA(hwnd, GWL_STYLE); ex_style = GetWindowLongA(hwnd, GWL_EXSTYLE); - ok(style == (style_out | DS_3DLOOK), "got %#x\n", style); + ok(style == (style_out | DS_3DLOOK), "got %#lx\n", style); /* WS_EX_WINDOWEDGE can't always be changed */ if (ex_style_in & WS_EX_DLGMODALFRAME) ex_style_out = ex_style_in | WS_EX_WINDOWEDGE; @@ -5290,7 +5290,7 @@ static void check_dialog_style(DWORD style_in, DWORD ex_style_in, DWORD style_ou ex_style_out = ex_style_in | WS_EX_WINDOWEDGE; else ex_style_out = ex_style_in & ~WS_EX_WINDOWEDGE; - ok(ex_style == ex_style_out, "expected ex_style %#x, got %#x\n", ex_style_out, ex_style); + ok(ex_style == ex_style_out, "expected ex_style %#lx, got %#lx\n", ex_style_out, ex_style);
SetWindowLongA(hwnd, GWL_STYLE, style_in); style = GetWindowLongA(hwnd, GWL_STYLE); @@ -5298,7 +5298,7 @@ static void check_dialog_style(DWORD style_in, DWORD ex_style_in, DWORD style_ou /* WS_CLIPSIBLINGS can't be reset on top-level windows */ if ((style_in & (WS_CHILD | WS_POPUP)) == WS_CHILD) style_out = style_in; else style_out = style_in | WS_CLIPSIBLINGS; - ok(style == style_out, "expected style %#x, got %#x\n", style_out, style); + ok(style == style_out, "expected style %#lx, got %#lx\n", style_out, style); /* WS_EX_WINDOWEDGE can't always be changed */ if (ex_style_in & WS_EX_DLGMODALFRAME) ex_style_out = ex_style_in | WS_EX_WINDOWEDGE; @@ -5306,7 +5306,7 @@ static void check_dialog_style(DWORD style_in, DWORD ex_style_in, DWORD style_ou ex_style_out = ex_style_in | WS_EX_WINDOWEDGE; else ex_style_out = ex_style_in & ~WS_EX_WINDOWEDGE; - ok(ex_style == ex_style_out, "expected ex_style %#x, got %#x\n", ex_style_out, ex_style); + ok(ex_style == ex_style_out, "expected ex_style %#lx, got %#lx\n", ex_style_out, ex_style);
DestroyWindow(hwnd);
@@ -5315,9 +5315,9 @@ static void check_dialog_style(DWORD style_in, DWORD ex_style_in, DWORD style_ou param.dlg_data = &dlg_data.dt; DialogBoxIndirectParamA(GetModuleHandleA(NULL), &dlg_data.dt, parent, empty_dlg_proc2, (LPARAM)¶m);
- ok(IsWindowEnabled(parent), "wrong parent state (dialog style %#x)\n", style_in); + ok(IsWindowEnabled(parent), "wrong parent state (dialog style %#lx)\n", style_in); if (grand_parent) - ok(IsWindowEnabled(grand_parent), "wrong grand parent state (dialog style %#x)\n", style_in); + ok(IsWindowEnabled(grand_parent), "wrong grand parent state (dialog style %#lx)\n", style_in);
DestroyWindow(parent); DestroyWindow(grand_parent); @@ -5546,7 +5546,7 @@ static void test_dialog_parent(void) param.root = parent; param.ga_root_owner = child; ret = DialogBoxIndirectParamA(GetModuleHandleA(NULL), &dlg_data.dt, child2, parent_dlg_proc, (LPARAM)¶m); - ok(ret == 2, "DialogBoxIndirectParam returned %ld\n", ret); + ok(ret == 2, "DialogBoxIndirectParam returned %Id\n", ret);
/* Dialogs without WS_CHILD behave as expected, they use passed owner just like CreateWindow does. */ dlg_data.dt.style = WS_OVERLAPPEDWINDOW; @@ -5567,7 +5567,7 @@ static void test_dialog_parent(void) param.owner = child; param.root = param.ga_root_owner = NULL; ret = DialogBoxIndirectParamA(GetModuleHandleA(NULL), &dlg_data.dt, child2, parent_dlg_proc, (LPARAM)¶m); - ok(ret == 2, "DialogBoxIndirectParam returned %ld\n", ret); + ok(ret == 2, "DialogBoxIndirectParam returned %Id\n", ret);
other = CreateWindowExA(0, "static", NULL, WS_OVERLAPPEDWINDOW, 0, 0, 0, 0, NULL, NULL, NULL, NULL); SetWindowLongPtrA(child, GWLP_WNDPROC, (ULONG_PTR)reparent_dialog_owner_proc); @@ -5591,7 +5591,7 @@ static void test_dialog_parent(void) param.root = NULL; param.ga_root_owner = child; ret = DialogBoxIndirectParamA(GetModuleHandleA(NULL), &dlg_data.dt, child2, parent_dlg_proc, (LPARAM)¶m); - ok(ret == 2, "DialogBoxIndirectParam returned %ld\n", ret); + ok(ret == 2, "DialogBoxIndirectParam returned %Id\n", ret);
/* If we change parent in WM_INITDIALOG for WS_CHILD dialog WM_ENTERIDLE is still sent to the original * parent. EndDialog will enable the new parent. */ @@ -5599,7 +5599,7 @@ static void test_dialog_parent(void) EnableWindow(other, FALSE); dlg_data.dt.style = WS_CHILD; ret = DialogBoxIndirectParamA(GetModuleHandleA(NULL), &dlg_data.dt, child2, reparent_dlg_proc, (LPARAM)other); - ok(ret == 2, "DialogBoxIndirectParam returned %ld\n", ret); + ok(ret == 2, "DialogBoxIndirectParam returned %Id\n", ret); ok(!IsWindowEnabled(other), "other is not disabled\n"); ok(!IsWindowEnabled(child), "child is not disabled\n"); ok(IsWindowEnabled(child2), "child2 is not enabled\n"); @@ -5611,7 +5611,7 @@ static void test_dialog_parent(void) EnableWindow(other, FALSE); dlg_data.dt.style = WS_OVERLAPPED; ret = DialogBoxIndirectParamA(GetModuleHandleA(NULL), &dlg_data.dt, child2, reparent_owned_dlg_proc, (LPARAM)other); - ok(ret == 1, "DialogBoxIndirectParam returned %ld\n", ret); + ok(ret == 1, "DialogBoxIndirectParam returned %Id\n", ret); ok(!IsWindowEnabled(other), "other is not disabled\n"); ok(!IsWindowEnabled(child), "child is not disabled\n"); ok(IsWindowEnabled(child2), "child2 is not enabled\n"); @@ -5621,14 +5621,14 @@ static void test_dialog_parent(void) /* Quit dialog message loop by sending WM_QUIT message. Dialog owner is not enabled. */ SetWindowLongPtrA(child, GWLP_WNDPROC, (ULONG_PTR)post_quit_dialog_owner_proc); ret = DialogBoxIndirectParamA(GetModuleHandleA(NULL), &dlg_data.dt, other, empty_dlg_proc, 0); - ok(ret == 1, "DialogBoxIndirectParam returned %ld\n", ret); + ok(ret == 1, "DialogBoxIndirectParam returned %Id\n", ret); ok(!IsWindowEnabled(other), "other is enabled\n"); EnableWindow(other, TRUE);
/* Quit dialog message loop by destroying the window. Dialog owner is not enabled. */ SetWindowLongPtrA(child, GWLP_WNDPROC, (ULONG_PTR)destroy_dialog_owner_proc); ret = DialogBoxIndirectParamA(GetModuleHandleA(NULL), &dlg_data.dt, other, empty_dlg_proc, 0); - ok(ret == 1, "DialogBoxIndirectParam returned %ld\n", ret); + ok(ret == 1, "DialogBoxIndirectParam returned %Id\n", ret); ok(!IsWindowEnabled(other), "other is enabled\n"); EnableWindow(other, TRUE);
@@ -5663,7 +5663,7 @@ static void test_scrollwindow( HWND hwnd) flush_events(FALSE); /* expected: black should have scrolled to the upper half */ colr = GetPixel( hdc, (rc2.left+rc2.right)/ 2, rc2.bottom / 4 ); - ok ( colr == 0, "pixel should be black, color is %08x\n", colr); + ok ( colr == 0, "pixel should be black, color is %08lx\n", colr); /* Repeat that test of ScrollWindow(Ex) now with clip rectangle */ /* paint the lower half of the window black */ rc2 = rc; @@ -5683,7 +5683,7 @@ static void test_scrollwindow( HWND hwnd) flush_events(FALSE); /* expected: black should have scrolled to the upper half */ colr = GetPixel( hdc, (rc2.left+rc2.right)/ 2, rc2.bottom / 4 ); - ok ( colr == 0, "pixel should be black, color is %08x\n", colr); + ok ( colr == 0, "pixel should be black, color is %08lx\n", colr);
/* clean up */ ReleaseDC( hwnd, hdc); @@ -5914,11 +5914,11 @@ static void test_scrolldc( HWND parent) cliprc.top = (rc.top + rc.bottom) /2; /* test whether scrolled pixels are properly clipped */ colr = GetPixel( hdc, (rc.left+rc.right)/2, ( rc.top + rc.bottom) /2 - 1); - ok ( colr == 0, "pixel should be black, color is %08x\n", colr); + ok ( colr == 0, "pixel should be black, color is %08lx\n", colr); /* this scroll should not cause any visible changes */ ScrollDC( hdc, 5, -20, &rc, &cliprc, hrgn, &rcu); colr = GetPixel( hdc, (rc.left+rc.right)/2, ( rc.top + rc.bottom) /2 - 1); - ok ( colr == 0, "pixel should be black, color is %08x\n", colr); + ok ( colr == 0, "pixel should be black, color is %08lx\n", colr); /* test with NULL clip rect */ ScrollDC( hdc, 20, -20, &rc, NULL, hrgn, &rcu); /*FillRgn(hdc, hrgn, GetStockObject(WHITE_BRUSH));*/ @@ -5971,7 +5971,7 @@ static void test_params(void) /* Just a param check */ SetLastError(0xdeadbeef); rc = GetWindowTextA(hwndMain2, NULL, 1024); - ok(!rc, "GetWindowText: rc=%d err=%d\n",rc,GetLastError()); + ok(!rc, "GetWindowText: rc=%d err=%ld\n",rc,GetLastError());
SetLastError(0xdeadbeef); hwnd=CreateWindowA("LISTBOX", "TestList", @@ -5983,7 +5983,7 @@ static void test_params(void) "CreateWindow with invalid menu handle should fail\n"); if (!hwnd) ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, - "wrong last error value %d\n", GetLastError()); + "wrong last error value %ld\n", GetLastError()); }
static void test_AWRwindow(LPCSTR class, LONG style, LONG exStyle, BOOL menu) @@ -5996,7 +5996,7 @@ static void test_AWRwindow(LPCSTR class, LONG style, LONG exStyle, BOOL menu) 0, menu ? hmenu : 0, 0, 0); - ok(hwnd != NULL, "Failed to create window class=%s, style=0x%08x, exStyle=0x%08x\n", class, style, exStyle); + ok(hwnd != NULL, "Failed to create window class=%s, style=0x%08lx, exStyle=0x%08lx\n", class, style, exStyle);
ShowWindow(hwnd, SW_SHOW);
@@ -6080,7 +6080,7 @@ static void test_AWR_flags(void) rect2 = rect; AdjustWindowRectEx( &rect, style, FALSE, exstyle ); wine_AdjustWindowRectEx( &rect2, style, FALSE, exstyle ); - ok( EqualRect( &rect, &rect2 ), "%08x %08x rects do not match: win %s wine %s\n", + ok( EqualRect( &rect, &rect2 ), "%08lx %08lx rects do not match: win %s wine %s\n", style, exstyle, wine_dbgstr_rect( &rect ), wine_dbgstr_rect( &rect2 )); if (pAdjustWindowRectExForDpi) { @@ -6088,7 +6088,7 @@ static void test_AWR_flags(void) rect2 = rect; pAdjustWindowRectExForDpi( &rect, style, FALSE, exstyle, 192 ); wine_AdjustWindowRectExForDpi( &rect2, style, FALSE, exstyle, 192 ); - ok( EqualRect( &rect, &rect2 ), "%08x %08x rects do not match: win %s wine %s\n", + ok( EqualRect( &rect, &rect2 ), "%08lx %08lx rects do not match: win %s wine %s\n", style, exstyle, wine_dbgstr_rect( &rect ), wine_dbgstr_rect( &rect2 )); } } @@ -6238,7 +6238,7 @@ static void zero_parentdc_test(struct parentdc_test *t)
#define parentdc_field_ok(t, w, r, f, got) \ ok (t.w.r.f==got.w.r.f, "window " #w ", rect " #r ", field " #f \ - ": expected %d, got %d\n", \ + ": expected %ld, got %ld\n", \ t.w.r.f, got.w.r.f)
#define parentdc_todo_field_ok(t, w, r, f, got) \ @@ -6611,7 +6611,7 @@ static LRESULT CALLBACK winsizes_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM ok( EqualRect( &rect, r ), "passed rect %s doesn't match window rect %s\n", wine_dbgstr_rect( r ), wine_dbgstr_rect( &rect )); ret = DefWindowProcA(hwnd, msg, wp, lp); - ok(!ret, "got %08lx\n", ret); + ok(!ret, "got %08Ix\n", ret); return ret; } default: @@ -6632,13 +6632,13 @@ static void test_CreateWindow(void) #define expect_menu(window, menu) \ SetLastError(0xdeadbeef); \ res = (GetMenu(window) == (HMENU)menu); \ - ok(res, "GetMenu error %d\n", GetLastError()) + ok(res, "GetMenu error %ld\n", GetLastError())
#define expect_style(window, style)\ - ok((ULONG)GetWindowLongA(window, GWL_STYLE) == (style), "expected style %x != %x\n", (LONG)(style), GetWindowLongA(window, GWL_STYLE)) + ok((ULONG)GetWindowLongA(window, GWL_STYLE) == (style), "expected style %lx != %lx\n", (LONG)(style), GetWindowLongA(window, GWL_STYLE))
#define expect_ex_style(window, ex_style)\ - ok((ULONG)GetWindowLongA(window, GWL_EXSTYLE) == (ex_style), "expected ex_style %x != %x\n", (LONG)(ex_style), GetWindowLongA(window, GWL_EXSTYLE)) + ok((ULONG)GetWindowLongA(window, GWL_EXSTYLE) == (ex_style), "expected ex_style %lx != %lx\n", (LONG)(ex_style), GetWindowLongA(window, GWL_EXSTYLE))
hmenu = CreateMenu(); assert(hmenu != 0); @@ -6647,13 +6647,13 @@ static void test_CreateWindow(void)
SetLastError(0xdeadbeef); res = IsMenu(hmenu); - ok(res, "IsMenu error %d\n", GetLastError()); + ok(res, "IsMenu error %ld\n", GetLastError());
/* WS_CHILD */ SetLastError(0xdeadbeef); hwnd = CreateWindowExA(WS_EX_APPWINDOW, "static", NULL, WS_CHILD, 0, 0, 100, 100, parent, (HMENU)1, 0, NULL); - ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError()); + ok(hwnd != 0, "CreateWindowEx error %ld\n", GetLastError()); expect_menu(hwnd, 1); expect_style(hwnd, WS_CHILD); expect_ex_style(hwnd, WS_EX_APPWINDOW); @@ -6662,7 +6662,7 @@ static void test_CreateWindow(void) SetLastError(0xdeadbeef); hwnd = CreateWindowExA(WS_EX_APPWINDOW, "static", NULL, WS_CHILD | WS_CAPTION, 0, 0, 100, 100, parent, (HMENU)1, 0, NULL); - ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError()); + ok(hwnd != 0, "CreateWindowEx error %ld\n", GetLastError()); expect_menu(hwnd, 1); expect_style(hwnd, WS_CHILD | WS_CAPTION); expect_ex_style(hwnd, WS_EX_APPWINDOW | WS_EX_WINDOWEDGE); @@ -6671,7 +6671,7 @@ static void test_CreateWindow(void) SetLastError(0xdeadbeef); hwnd = CreateWindowExA(0, "static", NULL, WS_CHILD, 0, 0, 100, 100, parent, (HMENU)1, 0, NULL); - ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError()); + ok(hwnd != 0, "CreateWindowEx error %ld\n", GetLastError()); expect_menu(hwnd, 1); expect_style(hwnd, WS_CHILD); expect_ex_style(hwnd, 0); @@ -6680,7 +6680,7 @@ static void test_CreateWindow(void) SetLastError(0xdeadbeef); hwnd = CreateWindowExA(0, "static", NULL, WS_CHILD | WS_CAPTION, 0, 0, 100, 100, parent, (HMENU)1, 0, NULL); - ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError()); + ok(hwnd != 0, "CreateWindowEx error %ld\n", GetLastError()); expect_menu(hwnd, 1); expect_style(hwnd, WS_CHILD | WS_CAPTION); expect_ex_style(hwnd, WS_EX_WINDOWEDGE); @@ -6690,63 +6690,63 @@ static void test_CreateWindow(void) SetLastError(0xdeadbeef); hwnd = CreateWindowExA(WS_EX_APPWINDOW, "static", NULL, WS_POPUP, 0, 0, 100, 100, parent, hmenu, 0, NULL); - ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError()); + ok(hwnd != 0, "CreateWindowEx error %ld\n", GetLastError()); expect_menu(hwnd, hmenu); expect_style(hwnd, WS_POPUP | WS_CLIPSIBLINGS); expect_ex_style(hwnd, WS_EX_APPWINDOW); DestroyWindow(hwnd); SetLastError(0xdeadbeef); ok(!IsMenu(hmenu), "IsMenu should fail\n"); - ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %ld\n", GetLastError());
hmenu = CreateMenu(); assert(hmenu != 0); SetLastError(0xdeadbeef); hwnd = CreateWindowExA(WS_EX_APPWINDOW, "static", NULL, WS_POPUP | WS_CAPTION, 0, 0, 100, 100, parent, hmenu, 0, NULL); - ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError()); + ok(hwnd != 0, "CreateWindowEx error %ld\n", GetLastError()); expect_menu(hwnd, hmenu); expect_style(hwnd, WS_POPUP | WS_CAPTION | WS_CLIPSIBLINGS); expect_ex_style(hwnd, WS_EX_APPWINDOW | WS_EX_WINDOWEDGE); DestroyWindow(hwnd); SetLastError(0xdeadbeef); ok(!IsMenu(hmenu), "IsMenu should fail\n"); - ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %ld\n", GetLastError());
hmenu = CreateMenu(); assert(hmenu != 0); SetLastError(0xdeadbeef); hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP, 0, 0, 100, 100, parent, hmenu, 0, NULL); - ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError()); + ok(hwnd != 0, "CreateWindowEx error %ld\n", GetLastError()); expect_menu(hwnd, hmenu); expect_style(hwnd, WS_POPUP | WS_CLIPSIBLINGS); expect_ex_style(hwnd, 0); DestroyWindow(hwnd); SetLastError(0xdeadbeef); ok(!IsMenu(hmenu), "IsMenu should fail\n"); - ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %ld\n", GetLastError());
hmenu = CreateMenu(); assert(hmenu != 0); SetLastError(0xdeadbeef); hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP | WS_CAPTION, 0, 0, 100, 100, parent, hmenu, 0, NULL); - ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError()); + ok(hwnd != 0, "CreateWindowEx error %ld\n", GetLastError()); expect_menu(hwnd, hmenu); expect_style(hwnd, WS_POPUP | WS_CAPTION | WS_CLIPSIBLINGS); expect_ex_style(hwnd, WS_EX_WINDOWEDGE); DestroyWindow(hwnd); SetLastError(0xdeadbeef); ok(!IsMenu(hmenu), "IsMenu should fail\n"); - ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %ld\n", GetLastError());
/* WS_CHILD | WS_POPUP */ SetLastError(0xdeadbeef); hwnd = CreateWindowExA(WS_EX_APPWINDOW, "static", NULL, WS_CHILD | WS_POPUP, 0, 0, 100, 100, parent, (HMENU)1, 0, NULL); ok(!hwnd, "CreateWindowEx should fail\n"); - ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %ld\n", GetLastError()); if (hwnd) DestroyWindow(hwnd);
@@ -6755,20 +6755,20 @@ static void test_CreateWindow(void) SetLastError(0xdeadbeef); hwnd = CreateWindowExA(WS_EX_APPWINDOW, "static", NULL, WS_CHILD | WS_POPUP, 0, 0, 100, 100, parent, hmenu, 0, NULL); - ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError()); + ok(hwnd != 0, "CreateWindowEx error %ld\n", GetLastError()); expect_menu(hwnd, hmenu); expect_style(hwnd, WS_CHILD | WS_POPUP | WS_CLIPSIBLINGS); expect_ex_style(hwnd, WS_EX_APPWINDOW); DestroyWindow(hwnd); SetLastError(0xdeadbeef); ok(!IsMenu(hmenu), "IsMenu should fail\n"); - ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %ld\n", GetLastError());
SetLastError(0xdeadbeef); hwnd = CreateWindowExA(WS_EX_APPWINDOW, "static", NULL, WS_CHILD | WS_POPUP | WS_CAPTION, 0, 0, 100, 100, parent, (HMENU)1, 0, NULL); ok(!hwnd, "CreateWindowEx should fail\n"); - ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %ld\n", GetLastError()); if (hwnd) DestroyWindow(hwnd);
@@ -6777,20 +6777,20 @@ static void test_CreateWindow(void) SetLastError(0xdeadbeef); hwnd = CreateWindowExA(WS_EX_APPWINDOW, "static", NULL, WS_CHILD | WS_POPUP | WS_CAPTION, 0, 0, 100, 100, parent, hmenu, 0, NULL); - ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError()); + ok(hwnd != 0, "CreateWindowEx error %ld\n", GetLastError()); expect_menu(hwnd, hmenu); expect_style(hwnd, WS_CHILD | WS_POPUP | WS_CAPTION | WS_CLIPSIBLINGS); expect_ex_style(hwnd, WS_EX_APPWINDOW | WS_EX_WINDOWEDGE); DestroyWindow(hwnd); SetLastError(0xdeadbeef); ok(!IsMenu(hmenu), "IsMenu should fail\n"); - ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %ld\n", GetLastError());
SetLastError(0xdeadbeef); hwnd = CreateWindowExA(0, "static", NULL, WS_CHILD | WS_POPUP, 0, 0, 100, 100, parent, (HMENU)1, 0, NULL); ok(!hwnd, "CreateWindowEx should fail\n"); - ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %ld\n", GetLastError()); if (hwnd) DestroyWindow(hwnd);
@@ -6799,20 +6799,20 @@ static void test_CreateWindow(void) SetLastError(0xdeadbeef); hwnd = CreateWindowExA(0, "static", NULL, WS_CHILD | WS_POPUP, 0, 0, 100, 100, parent, hmenu, 0, NULL); - ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError()); + ok(hwnd != 0, "CreateWindowEx error %ld\n", GetLastError()); expect_menu(hwnd, hmenu); expect_style(hwnd, WS_CHILD | WS_POPUP | WS_CLIPSIBLINGS); expect_ex_style(hwnd, 0); DestroyWindow(hwnd); SetLastError(0xdeadbeef); ok(!IsMenu(hmenu), "IsMenu should fail\n"); - ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %ld\n", GetLastError());
SetLastError(0xdeadbeef); hwnd = CreateWindowExA(0, "static", NULL, WS_CHILD | WS_POPUP | WS_CAPTION, 0, 0, 100, 100, parent, (HMENU)1, 0, NULL); ok(!hwnd, "CreateWindowEx should fail\n"); - ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %ld\n", GetLastError()); if (hwnd) DestroyWindow(hwnd);
@@ -6821,14 +6821,14 @@ static void test_CreateWindow(void) SetLastError(0xdeadbeef); hwnd = CreateWindowExA(0, "static", NULL, WS_CHILD | WS_POPUP | WS_CAPTION, 0, 0, 100, 100, parent, hmenu, 0, NULL); - ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError()); + ok(hwnd != 0, "CreateWindowEx error %ld\n", GetLastError()); expect_menu(hwnd, hmenu); expect_style(hwnd, WS_CHILD | WS_POPUP | WS_CAPTION | WS_CLIPSIBLINGS); expect_ex_style(hwnd, WS_EX_WINDOWEDGE); DestroyWindow(hwnd); SetLastError(0xdeadbeef); ok(!IsMenu(hmenu), "IsMenu should fail\n"); - ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "IsMenu set error %ld\n", GetLastError());
/* test child window sizing */ cls.style = 0; @@ -6846,7 +6846,7 @@ static void test_CreateWindow(void) SetLastError(0xdeadbeef); parent = CreateWindowExA(0, "MinMax_WndClass", NULL, WS_CAPTION | WS_SYSMENU | WS_THICKFRAME, 0, 0, 100, 100, 0, 0, 0, NULL); - ok(parent != 0, "CreateWindowEx error %d\n", GetLastError()); + ok(parent != 0, "CreateWindowEx error %ld\n", GetLastError()); expect_menu(parent, 0); expect_style(parent, WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_CLIPSIBLINGS); expect_ex_style(parent, WS_EX_WINDOWEDGE); @@ -6869,7 +6869,7 @@ static void test_CreateWindow(void) hwnd = CreateWindowExA(0, "MinMax_WndClass", NULL, WS_CHILD | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, parent, (HMENU)1, 0, NULL); - ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError()); + ok(hwnd != 0, "CreateWindowEx error %ld\n", GetLastError()); expect_menu(hwnd, 1); expect_style(hwnd, WS_CHILD | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME); expect_ex_style(hwnd, WS_EX_WINDOWEDGE); @@ -6892,49 +6892,49 @@ static void test_CreateWindow(void) SetRect( &expected_rect, 0, 0, 200000, 200000 ); broken_rect = expected_rect; hwnd = CreateWindowExA(0, "Sizes_WndClass", NULL, WS_CHILD, 300000, 300000, 200000, 200000, parent, 0, 0, NULL); - ok( hwnd != 0, "creation failed err %u\n", GetLastError()); + ok( hwnd != 0, "creation failed err %lu\n", GetLastError()); GetClientRect( hwnd, &rc ); ok( rc.right == 200000 || rc.right == 65535 || broken(rc.right == (short)200000), - "invalid rect right %u\n", rc.right ); + "invalid rect right %lu\n", rc.right ); ok( rc.bottom == 200000 || rc.bottom == 65535 || broken(rc.bottom == (short)200000), - "invalid rect bottom %u\n", rc.bottom ); + "invalid rect bottom %lu\n", rc.bottom ); DestroyWindow(hwnd);
expected_cx = expected_cy = -10; SetRectEmpty(&expected_rect); SetRect( &broken_rect, 0, 0, -10, -10 ); hwnd = CreateWindowExA(0, "Sizes_WndClass", NULL, WS_CHILD, -20, -20, -10, -10, parent, 0, 0, NULL); - ok( hwnd != 0, "creation failed err %u\n", GetLastError()); + ok( hwnd != 0, "creation failed err %lu\n", GetLastError()); GetClientRect( hwnd, &rc ); - ok( rc.right == 0, "invalid rect right %u\n", rc.right ); - ok( rc.bottom == 0, "invalid rect bottom %u\n", rc.bottom ); + ok( rc.right == 0, "invalid rect right %lu\n", rc.right ); + ok( rc.bottom == 0, "invalid rect bottom %lu\n", rc.bottom ); DestroyWindow(hwnd);
expected_cx = expected_cy = -200000; SetRectEmpty(&expected_rect); SetRect( &broken_rect, 0, 0, -200000, -200000 ); hwnd = CreateWindowExA(0, "Sizes_WndClass", NULL, WS_CHILD, -300000, -300000, -200000, -200000, parent, 0, 0, NULL); - ok( hwnd != 0, "creation failed err %u\n", GetLastError()); + ok( hwnd != 0, "creation failed err %lu\n", GetLastError()); GetClientRect( hwnd, &rc ); - ok( rc.right == 0, "invalid rect right %u\n", rc.right ); - ok( rc.bottom == 0, "invalid rect bottom %u\n", rc.bottom ); + ok( rc.right == 0, "invalid rect right %lu\n", rc.right ); + ok( rc.bottom == 0, "invalid rect bottom %lu\n", rc.bottom ); DestroyWindow(hwnd);
/* we need a parent at 0,0 so that child coordinates match */ DestroyWindow(parent); parent = CreateWindowExA(0, "MinMax_WndClass", NULL, WS_POPUP, 0, 0, 100, 100, 0, 0, 0, NULL); - ok(parent != 0, "CreateWindowEx error %d\n", GetLastError()); + ok(parent != 0, "CreateWindowEx error %ld\n", GetLastError());
expected_cx = 100; expected_cy = 0x7fffffff; SetRect( &expected_rect, 10, 10, 110, 0x7fffffff ); SetRect( &broken_rect, 10, 10, 110, 0x7fffffffU + 10 ); hwnd = CreateWindowExA(0, "Sizes_WndClass", NULL, WS_CHILD, 10, 10, 100, 0x7fffffff, parent, 0, 0, NULL); - ok( hwnd != 0, "creation failed err %u\n", GetLastError()); + ok( hwnd != 0, "creation failed err %lu\n", GetLastError()); GetClientRect( hwnd, &rc ); - ok( rc.right == 100, "invalid rect right %u\n", rc.right ); + ok( rc.right == 100, "invalid rect right %lu\n", rc.right ); ok( rc.bottom == 0x7fffffff - 10 || rc.bottom ==65535 || broken(rc.bottom == 0), - "invalid rect bottom %u\n", rc.bottom ); + "invalid rect bottom %lu\n", rc.bottom ); DestroyWindow(hwnd);
expected_cx = 0x7fffffff; @@ -6942,22 +6942,22 @@ static void test_CreateWindow(void) SetRect( &expected_rect, 20, 10, 0x7fffffff, 0x7fffffff ); SetRect( &broken_rect, 20, 10, 0x7fffffffU + 20, 0x7fffffffU + 10 ); hwnd = CreateWindowExA(0, "Sizes_WndClass", NULL, WS_CHILD, 20, 10, 0x7fffffff, 0x7fffffff, parent, 0, 0, NULL); - ok( hwnd != 0, "creation failed err %u\n", GetLastError()); + ok( hwnd != 0, "creation failed err %lu\n", GetLastError()); GetClientRect( hwnd, &rc ); ok( rc.right == 0x7fffffff - 20 || rc.right == 65535 || broken(rc.right == 0), - "invalid rect right %u\n", rc.right ); + "invalid rect right %lu\n", rc.right ); ok( rc.bottom == 0x7fffffff - 10 || rc.right == 65535 || broken(rc.bottom == 0), - "invalid rect bottom %u\n", rc.bottom ); + "invalid rect bottom %lu\n", rc.bottom ); DestroyWindow(hwnd);
/* top level window */ expected_cx = expected_cy = 200000; SetRect( &expected_rect, 0, 0, GetSystemMetrics(SM_CXMAXTRACK), GetSystemMetrics(SM_CYMAXTRACK) ); hwnd = CreateWindowExA(0, "Sizes_WndClass", NULL, WS_OVERLAPPEDWINDOW, 300000, 300000, 200000, 200000, 0, 0, 0, NULL); - ok( hwnd != 0, "creation failed err %u\n", GetLastError()); + ok( hwnd != 0, "creation failed err %lu\n", GetLastError()); GetClientRect( hwnd, &rc ); - ok( rc.right <= expected_cx, "invalid rect right %u\n", rc.right ); - ok( rc.bottom <= expected_cy, "invalid rect bottom %u\n", rc.bottom ); + ok( rc.right <= expected_cx, "invalid rect right %lu\n", rc.right ); + ok( rc.bottom <= expected_cy, "invalid rect bottom %lu\n", rc.bottom ); DestroyWindow(hwnd);
/* invalid class */ @@ -6965,7 +6965,7 @@ static void test_CreateWindow(void) hwnd = CreateWindowExA(0, "INVALID_CLASS", NULL, WS_CHILD, 10, 10, 100, 100, parent, 0, 0, NULL); ok(hwnd == 0, "CreateWindowEx succeeded\n"); ok(GetLastError() == ERROR_CLASS_DOES_NOT_EXIST || GetLastError() == ERROR_CANNOT_FIND_WND_CLASS, - "invalid error %u\n", GetLastError()); + "invalid error %lu\n", GetLastError()); DestroyWindow(hwnd);
hdc = GetDC( parent ); @@ -6977,19 +6977,19 @@ static void test_CreateWindow(void) SetLastError( 0xdeadbeef ); parent = CreateWindowExA(WS_EX_APPWINDOW | WS_EX_LAYOUTRTL, "static", NULL, WS_POPUP, 0, 0, 100, 100, 0, 0, 0, NULL); - ok( parent != 0, "creation failed err %u\n", GetLastError()); + ok( parent != 0, "creation failed err %lu\n", GetLastError()); expect_ex_style( parent, WS_EX_APPWINDOW | WS_EX_LAYOUTRTL ); hwnd = CreateWindowExA(0, "static", NULL, WS_CHILD, 0, 0, 20, 20, parent, 0, 0, NULL); - ok( hwnd != 0, "creation failed err %u\n", GetLastError()); + ok( hwnd != 0, "creation failed err %lu\n", GetLastError()); expect_ex_style( hwnd, WS_EX_LAYOUTRTL ); DestroyWindow( hwnd ); hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP, 0, 0, 20, 20, parent, 0, 0, NULL); - ok( hwnd != 0, "creation failed err %u\n", GetLastError()); + ok( hwnd != 0, "creation failed err %lu\n", GetLastError()); expect_ex_style( hwnd, 0 ); DestroyWindow( hwnd ); SetWindowLongW( parent, GWL_EXSTYLE, WS_EX_APPWINDOW | WS_EX_LAYOUTRTL | WS_EX_NOINHERITLAYOUT ); hwnd = CreateWindowExA(0, "static", NULL, WS_CHILD, 0, 0, 20, 20, parent, 0, 0, NULL); - ok( hwnd != 0, "creation failed err %u\n", GetLastError()); + ok( hwnd != 0, "creation failed err %lu\n", GetLastError()); expect_ex_style( hwnd, 0 ); DestroyWindow( hwnd );
@@ -6999,31 +6999,31 @@ static void test_CreateWindow(void)
SetLastError( 0xdeadbeef ); ok( !pGetProcessDefaultLayout( NULL ), "GetProcessDefaultLayout succeeded\n" ); - ok( GetLastError() == ERROR_NOACCESS, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_NOACCESS, "wrong error %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); res = pGetProcessDefaultLayout( &layout ); - ok( res, "GetProcessDefaultLayout failed err %u\n", GetLastError ()); - ok( layout == 0, "GetProcessDefaultLayout wrong layout %x\n", layout ); + ok( res, "GetProcessDefaultLayout failed err %lu\n", GetLastError ()); + ok( layout == 0, "GetProcessDefaultLayout wrong layout %lx\n", layout ); SetLastError( 0xdeadbeef ); res = pSetProcessDefaultLayout( 7 ); - ok( res, "SetProcessDefaultLayout failed err %u\n", GetLastError ()); + ok( res, "SetProcessDefaultLayout failed err %lu\n", GetLastError ()); res = pGetProcessDefaultLayout( &layout ); - ok( res, "GetProcessDefaultLayout failed err %u\n", GetLastError ()); - ok( layout == 7, "GetProcessDefaultLayout wrong layout %x\n", layout ); + ok( res, "GetProcessDefaultLayout failed err %lu\n", GetLastError ()); + ok( layout == 7, "GetProcessDefaultLayout wrong layout %lx\n", layout ); SetLastError( 0xdeadbeef ); res = pSetProcessDefaultLayout( LAYOUT_RTL ); - ok( res, "SetProcessDefaultLayout failed err %u\n", GetLastError ()); + ok( res, "SetProcessDefaultLayout failed err %lu\n", GetLastError ()); res = pGetProcessDefaultLayout( &layout ); - ok( res, "GetProcessDefaultLayout failed err %u\n", GetLastError ()); - ok( layout == LAYOUT_RTL, "GetProcessDefaultLayout wrong layout %x\n", layout ); + ok( res, "GetProcessDefaultLayout failed err %lu\n", GetLastError ()); + ok( layout == LAYOUT_RTL, "GetProcessDefaultLayout wrong layout %lx\n", layout ); hwnd = CreateWindowExA(WS_EX_APPWINDOW, "static", NULL, WS_POPUP, 0, 0, 100, 100, 0, 0, 0, NULL); - ok( hwnd != 0, "creation failed err %u\n", GetLastError()); + ok( hwnd != 0, "creation failed err %lu\n", GetLastError()); expect_ex_style( hwnd, WS_EX_APPWINDOW | WS_EX_LAYOUTRTL ); DestroyWindow( hwnd ); hwnd = CreateWindowExA(WS_EX_APPWINDOW, "static", NULL, WS_POPUP, 0, 0, 100, 100, parent, 0, 0, NULL); - ok( hwnd != 0, "creation failed err %u\n", GetLastError()); + ok( hwnd != 0, "creation failed err %lu\n", GetLastError()); expect_ex_style( hwnd, WS_EX_APPWINDOW ); DestroyWindow( hwnd ); pSetProcessDefaultLayout( 0 ); @@ -7087,103 +7087,103 @@ static void test_set_window_long_size(void) /* GWLP_USERDATA */ SetWindowLongPtrA(hwnd, GWLP_USERDATA, ((LONG_PTR)1 << 32) | 123); ret = GetWindowLongA(hwnd, GWLP_USERDATA); - ok(ret == 123, "Unexpected user data %#x.\n", ret); + ok(ret == 123, "Unexpected user data %#lx.\n", ret); retval = GetWindowLongPtrA(hwnd, GWLP_USERDATA); ok(retval > 123, "Unexpected user data.\n"); ret = GetWindowWord(hwnd, GWLP_USERDATA); todo_wine - ok(ret == 123, "Unexpected user data %#x.\n", ret); + ok(ret == 123, "Unexpected user data %#lx.\n", ret); ret = SetWindowWord(hwnd, GWLP_USERDATA, 124); todo_wine - ok(ret == 123, "Unexpected user data %#x.\n", ret); + ok(ret == 123, "Unexpected user data %#lx.\n", ret); ret = GetWindowLongA(hwnd, GWLP_USERDATA); todo_wine - ok(ret == 124, "Unexpected user data %#x.\n", ret); + ok(ret == 124, "Unexpected user data %#lx.\n", ret); retval = GetWindowLongPtrA(hwnd, GWLP_USERDATA); todo_wine ok(retval == 124, "Unexpected user data.\n");
SetWindowLongA(hwnd, GWLP_USERDATA, (1 << 16) | 123); ret = GetWindowLongA(hwnd, GWLP_USERDATA); - ok(ret == ((1 << 16) | 123), "Unexpected user data %#x.\n", ret); + ok(ret == ((1 << 16) | 123), "Unexpected user data %#lx.\n", ret); ret = GetWindowWord(hwnd, GWLP_USERDATA); todo_wine - ok(ret == 123, "Unexpected user data %#x.\n", ret); + ok(ret == 123, "Unexpected user data %#lx.\n", ret);
ret = SetWindowWord(hwnd, GWLP_USERDATA, 124); todo_wine - ok(ret == 123, "Unexpected user data %#x.\n", ret); + ok(ret == 123, "Unexpected user data %#lx.\n", ret); ret = GetWindowLongA(hwnd, GWLP_USERDATA); todo_wine - ok(ret == ((1 << 16) | 124), "Unexpected user data %#x.\n", ret); + ok(ret == ((1 << 16) | 124), "Unexpected user data %#lx.\n", ret); ret = GetWindowWord(hwnd, GWLP_USERDATA); todo_wine - ok(ret == 124, "Unexpected user data %#x.\n", ret); + ok(ret == 124, "Unexpected user data %#lx.\n", ret);
/* GWLP_ID */ ret = SetWindowLongA(hwnd, GWLP_ID, 1); - ok(!ret, "Unexpected id %#x.\n", ret); + ok(!ret, "Unexpected id %#lx.\n", ret);
ret = GetWindowLongA(hwnd, GWLP_ID); - ok(ret == 1, "Unexpected id %#x.\n", ret); + ok(ret == 1, "Unexpected id %#lx.\n", ret);
ret = GetWindowLongW(hwnd, GWLP_ID); - ok(ret == 1, "Unexpected id %#x.\n", ret); + ok(ret == 1, "Unexpected id %#lx.\n", ret);
SetWindowLongPtrA(hwnd, GWLP_ID, ((LONG_PTR)1 << 32) | 123); ret = GetWindowLongA(hwnd, GWLP_ID); - ok(ret == 123, "Unexpected id %#x.\n", ret); + ok(ret == 123, "Unexpected id %#lx.\n", ret); ret = GetWindowLongW(hwnd, GWLP_ID); - ok(ret == 123, "Unexpected id %#x.\n", ret); + ok(ret == 123, "Unexpected id %#lx.\n", ret); retval = GetWindowLongPtrA(hwnd, GWLP_ID); ok(retval > 123, "Unexpected id.\n"); SetLastError(0xdeadbeef); ret = GetWindowWord(hwnd, GWLP_ID); todo_wine - ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected id %#x.\n", ret); + ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected id %#lx.\n", ret);
/* GWLP_HINSTANCE */ retval = GetWindowLongPtrA(hwnd, GWLP_HINSTANCE); - ok(retval == (LONG_PTR)GetModuleHandleA(NULL), "Unexpected instance %#lx.\n", retval); + ok(retval == (LONG_PTR)GetModuleHandleA(NULL), "Unexpected instance %#Ix.\n", retval);
SetLastError(0xdeadbeef); ret = GetWindowLongA(hwnd, GWLP_HINSTANCE); - ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected instance %#x.\n", ret); + ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected instance %#lx.\n", ret);
SetLastError(0xdeadbeef); ret = GetWindowLongW(hwnd, GWLP_HINSTANCE); - ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected instance %#x.\n", ret); + ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected instance %#lx.\n", ret);
SetLastError(0xdeadbeef); ret = GetWindowWord(hwnd, GWLP_HINSTANCE); todo_wine - ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected instance %#x.\n", ret); + ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected instance %#lx.\n", ret);
SetLastError(0xdeadbeef); ret = SetWindowLongA(hwnd, GWLP_HINSTANCE, 1); - ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected instance %#x.\n", ret); + ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected instance %#lx.\n", ret);
SetLastError(0xdeadbeef); ret = SetWindowLongW(hwnd, GWLP_HINSTANCE, 1); - ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected instance %#x.\n", ret); + ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected instance %#lx.\n", ret);
/* GWLP_HWNDPARENT */ SetLastError(0xdeadbeef); ret = GetWindowLongA(hwnd, GWLP_HWNDPARENT); - ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected parent window %#x.\n", ret); + ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected parent window %#lx.\n", ret);
SetLastError(0xdeadbeef); ret = SetWindowLongA(hwnd, GWLP_HWNDPARENT, 0); - ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected parent window %#x.\n", ret); + ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected parent window %#lx.\n", ret);
SetLastError(0xdeadbeef); ret = SetWindowLongW(hwnd, GWLP_HWNDPARENT, 0); - ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected parent window %#x.\n", ret); + ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected parent window %#lx.\n", ret);
SetLastError(0xdeadbeef); ret = GetWindowWord(hwnd, GWLP_HWNDPARENT); todo_wine - ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected parent window %#x.\n", ret); + ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected parent window %#lx.\n", ret);
DestroyWindow(hwnd); #endif @@ -7218,59 +7218,59 @@ static void test_set_window_word_size(void)
/* GWLP_USERDATA */ ret = SetWindowLongA(hwnd, GWLP_USERDATA, (1 << 16) | 123); - ok(!ret, "Unexpected user data %#x.\n", ret); + ok(!ret, "Unexpected user data %#lx.\n", ret); ret = GetWindowLongA(hwnd, GWLP_USERDATA); - ok(ret > 123, "Unexpected user data %#x.\n", ret); + ok(ret > 123, "Unexpected user data %#lx.\n", ret); ret = GetWindowWord(hwnd, GWLP_USERDATA); todo_wine - ok(ret == 123, "Unexpected user data %#x.\n", ret); + ok(ret == 123, "Unexpected user data %#lx.\n", ret); ret = SetWindowWord(hwnd, GWLP_USERDATA, 124); todo_wine - ok(ret == 123, "Unexpected user data %#x.\n", ret); + ok(ret == 123, "Unexpected user data %#lx.\n", ret); ret = GetWindowWord(hwnd, GWLP_USERDATA); todo_wine - ok(ret == 124, "Unexpected user data %#x.\n", ret); + ok(ret == 124, "Unexpected user data %#lx.\n", ret); ret = GetWindowLongA(hwnd, GWLP_USERDATA); todo_wine - ok(ret == ((1 << 16) | 124), "Unexpected user data %#x.\n", ret); + ok(ret == ((1 << 16) | 124), "Unexpected user data %#lx.\n", ret);
/* GWLP_ID */ ret = SetWindowLongA(hwnd, GWLP_ID, 1); - ok(!ret, "Unexpected id %#x.\n", ret); + ok(!ret, "Unexpected id %#lx.\n", ret); ret = GetWindowLongA(hwnd, GWLP_ID); - ok(ret == 1, "Unexpected id %#x.\n", ret); + ok(ret == 1, "Unexpected id %#lx.\n", ret);
SetLastError(0xdeadbeef); ret = GetWindowWord(hwnd, GWLP_ID); todo_wine - ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected id %#x.\n", ret); + ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected id %#lx.\n", ret); SetLastError(0xdeadbeef); ret = SetWindowWord(hwnd, GWLP_ID, 2); todo_wine - ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected id %#x.\n", ret); + ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected id %#lx.\n", ret);
/* GWLP_HINSTANCE */ retval = GetWindowLongPtrA(hwnd, GWLP_HINSTANCE); - ok(retval == (LONG_PTR)GetModuleHandleA(NULL), "Unexpected instance %#lx.\n", retval); + ok(retval == (LONG_PTR)GetModuleHandleA(NULL), "Unexpected instance %#Ix.\n", retval);
SetLastError(0xdeadbeef); ret = GetWindowWord(hwnd, GWLP_HINSTANCE); todo_wine - ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected instance %#x.\n", ret); + ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected instance %#lx.\n", ret);
SetLastError(0xdeadbeef); ret = SetWindowWord(hwnd, GWLP_HINSTANCE, 0xdead); todo_wine - ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected instance %#x.\n", ret); + ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected instance %#lx.\n", ret);
/* GWLP_HWNDPARENT */ retval = GetWindowLongPtrA(hwnd, GWLP_HWNDPARENT); - ok(!!retval, "Unexpected parent window %#x.\n", ret); + ok(!!retval, "Unexpected parent window %#lx.\n", ret);
SetLastError(0xdeadbeef); ret = GetWindowWord(hwnd, GWLP_HWNDPARENT); todo_wine - ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected parent window %#x.\n", ret); + ok(!ret && GetLastError() == ERROR_INVALID_INDEX, "Unexpected parent window %#lx.\n", ret);
DestroyWindow(hwnd); } @@ -7282,24 +7282,24 @@ static void test_SetWindowLong(void)
SetLastError(0xdeadbeef); retval = SetWindowLongPtrA(NULL, GWLP_WNDPROC, 0); - ok(!retval, "SetWindowLongPtr on invalid window handle should have returned 0 instead of 0x%lx\n", retval); + ok(!retval, "SetWindowLongPtr on invalid window handle should have returned 0 instead of 0x%Ix\n", retval); ok(check_error(GetLastError(), ERROR_INVALID_WINDOW_HANDLE), - "SetWindowLongPtr should have set error to ERROR_INVALID_WINDOW_HANDLE instead of %d\n", GetLastError()); + "SetWindowLongPtr should have set error to ERROR_INVALID_WINDOW_HANDLE instead of %ld\n", GetLastError());
SetLastError(0xdeadbeef); retval = SetWindowLongPtrA(hwndMain, 0xdeadbeef, 0); - ok(!retval, "SetWindowLongPtr on invalid index should have returned 0 instead of 0x%lx\n", retval); + ok(!retval, "SetWindowLongPtr on invalid index should have returned 0 instead of 0x%Ix\n", retval); ok(check_error(GetLastError(), ERROR_INVALID_INDEX), - "SetWindowLongPtr should have set error to ERROR_INVALID_INDEX instead of %d\n", GetLastError()); + "SetWindowLongPtr should have set error to ERROR_INVALID_INDEX instead of %ld\n", GetLastError());
SetLastError(0xdeadbeef); retval = SetWindowLongPtrA(hwndMain, GWLP_WNDPROC, 0); ok((WNDPROC)retval == main_window_procA, - "SetWindowLongPtr on invalid window proc should have returned address of main_window_procA instead of 0x%lx\n", retval); - ok(GetLastError() == 0xdeadbeef, "SetWindowLongPtr shouldn't have set the last error, instead of setting it to %d\n", GetLastError()); + "SetWindowLongPtr on invalid window proc should have returned address of main_window_procA instead of 0x%Ix\n", retval); + ok(GetLastError() == 0xdeadbeef, "SetWindowLongPtr shouldn't have set the last error, instead of setting it to %ld\n", GetLastError()); retval = GetWindowLongPtrA(hwndMain, GWLP_WNDPROC); ok((WNDPROC)retval == main_window_procA, - "SetWindowLongPtr on invalid window proc shouldn't have changed the value returned by GetWindowLongPtr, instead of changing it to 0x%lx\n", retval); + "SetWindowLongPtr on invalid window proc shouldn't have changed the value returned by GetWindowLongPtr, instead of changing it to 0x%Ix\n", retval); ok(!IsWindowUnicode(hwndMain), "hwndMain shouldn't be Unicode\n");
old_window_procW = (WNDPROC)GetWindowLongPtrW(hwndMain, GWLP_WNDPROC); @@ -7307,10 +7307,10 @@ static void test_SetWindowLong(void) retval = SetWindowLongPtrW(hwndMain, GWLP_WNDPROC, 0); if (GetLastError() != ERROR_CALL_NOT_IMPLEMENTED) { - ok(GetLastError() == 0xdeadbeef, "SetWindowLongPtr shouldn't have set the last error, instead of setting it to %d\n", GetLastError()); - ok(retval != 0, "SetWindowLongPtr error %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "SetWindowLongPtr shouldn't have set the last error, instead of setting it to %ld\n", GetLastError()); + ok(retval != 0, "SetWindowLongPtr error %ld\n", GetLastError()); ok((WNDPROC)retval == old_window_procW, - "SetWindowLongPtr on invalid window proc shouldn't have changed the value returned by GetWindowLongPtr, instead of changing it to 0x%lx\n", retval); + "SetWindowLongPtr on invalid window proc shouldn't have changed the value returned by GetWindowLongPtr, instead of changing it to 0x%Ix\n", retval); ok(IsWindowUnicode(hwndMain), "hwndMain should now be Unicode\n");
/* set it back to ANSI */ @@ -7328,16 +7328,16 @@ static LRESULT WINAPI check_style_wnd_proc(HWND hwnd, UINT message, WPARAM wPara
if (message == WM_STYLECHANGING && wParam == GWL_STYLE) { - ok(got->styleOld == expected[0].styleOld, "expected old style %#x, got %#x\n", + ok(got->styleOld == expected[0].styleOld, "expected old style %#lx, got %#lx\n", expected[0].styleOld, got->styleOld); - ok(got->styleNew == expected[0].styleNew, "expected new style %#x, got %#x\n", + ok(got->styleNew == expected[0].styleNew, "expected new style %#lx, got %#lx\n", expected[0].styleNew, got->styleNew); } else if (message == WM_STYLECHANGED && wParam == GWL_STYLE) { - ok(got->styleOld == expected[1].styleOld, "expected old style %#x, got %#x\n", + ok(got->styleOld == expected[1].styleOld, "expected old style %#lx, got %#lx\n", expected[1].styleOld, got->styleOld); - ok(got->styleNew == expected[1].styleNew, "expected new style %#x, got %#x\n", + ok(got->styleNew == expected[1].styleNew, "expected new style %#lx, got %#lx\n", expected[1].styleNew, got->styleNew); }
@@ -7400,10 +7400,10 @@ static void test_set_window_style(void) SetWindowLongPtrA(hwnd, GWLP_USERDATA, (LONG_PTR)&expected_stylestruct);
old_style = SetWindowLongA(hwnd, GWL_STYLE, tests[i].style); - ok(old_style == tests[i].creation_style, "expected old style %#x, got %#x\n", + ok(old_style == tests[i].creation_style, "expected old style %#lx, got %#lx\n", tests[i].creation_style, old_style); new_style = GetWindowLongA(hwnd, GWL_STYLE); - ok(new_style == expected_style, "expected new style %#x, got %#x\n", + ok(new_style == expected_style, "expected new style %#lx, got %#lx\n", expected_style, new_style);
SetWindowLongPtrA(hwnd, GWLP_USERDATA, 0); @@ -7471,7 +7471,7 @@ static void test_ShowWindow(void) wine_dbgstr_rect(&rcClient), wine_dbgstr_rect(&rc));
ret = ShowWindow(hwnd, SW_SHOW); - ok(!ret, "not expected ret: %lu\n", ret); + ok(!ret, "not expected ret: %Iu\n", ret); style = GetWindowLongA(hwnd, GWL_STYLE); ok(!(style & WS_DISABLED), "window should not be disabled\n"); ok(style & WS_VISIBLE, "window should be visible\n"); @@ -7485,7 +7485,7 @@ static void test_ShowWindow(void) wine_dbgstr_rect(&rcClient), wine_dbgstr_rect(&rc));
ret = ShowWindow(hwnd, SW_MINIMIZE); - ok(ret, "not expected ret: %lu\n", ret); + ok(ret, "not expected ret: %Iu\n", ret); style = GetWindowLongA(hwnd, GWL_STYLE); ok(!(style & WS_DISABLED), "window should not be disabled\n"); ok(style & WS_VISIBLE, "window should be visible\n"); @@ -7502,7 +7502,7 @@ static void test_ShowWindow(void) (rcMinimized.right - rcMinimized.left) * 2, (rcMinimized.bottom - rcMinimized.top) * 2, SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER); - ok(ret, "not expected ret: %lu\n", ret); + ok(ret, "not expected ret: %Iu\n", ret); GetWindowRect(hwnd, &rc); ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n", wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc)); @@ -7512,7 +7512,7 @@ static void test_ShowWindow(void) /* SetWindowPos shouldn't affect the client rect */ ret = SetWindowPos(hwnd, 0, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER); - ok(ret, "not expected ret: %lu\n", ret); + ok(ret, "not expected ret: %Iu\n", ret); GetWindowRect(hwnd, &rc); ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n", wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc)); @@ -7523,12 +7523,12 @@ static void test_ShowWindow(void) GetWindowRect(hwnd, &rc); SetRect(&rcNonClient, rc.left, rc.top, rc.left, rc.top); ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc); - ok(!ret, "got %08lx\n", ret); + ok(!ret, "got %08Ix\n", ret); ok(EqualRect(&rc, &rcNonClient), "expected %s, got %s\n", wine_dbgstr_rect(&rcNonClient), wine_dbgstr_rect(&rc));
ret = ShowWindow(hwnd, SW_RESTORE); - ok(ret, "not expected ret: %lu\n", ret); + ok(ret, "not expected ret: %Iu\n", ret); style = GetWindowLongA(hwnd, GWL_STYLE); ok(!(style & WS_DISABLED), "window should not be disabled\n"); ok(style & WS_VISIBLE, "window should be visible\n"); @@ -7542,7 +7542,7 @@ static void test_ShowWindow(void) wine_dbgstr_rect(&rcClient), wine_dbgstr_rect(&rc));
ret = ShowWindow(hwnd, SW_MAXIMIZE); - ok(ret, "not expected ret: %lu\n", ret); + ok(ret, "not expected ret: %Iu\n", ret); style = GetWindowLongA(hwnd, GWL_STYLE); ok(!(style & WS_DISABLED), "window should not be disabled\n"); ok(style & WS_VISIBLE, "window should be visible\n"); @@ -7553,14 +7553,14 @@ static void test_ShowWindow(void) wine_dbgstr_rect(&rcMaximized), wine_dbgstr_rect(&rc)); /* maximized windows can be resized */ ret = SetWindowPos(hwnd, 0, 300, 300, 200, 200, SWP_NOACTIVATE | SWP_NOZORDER); - ok(ret, "not expected ret: %lu\n", ret); + ok(ret, "not expected ret: %Iu\n", ret); SetRect(&rcResized, 300, 300, 500, 500); GetWindowRect(hwnd, &rc); ok(EqualRect(&rcResized, &rc), "expected %s, got %s\n", wine_dbgstr_rect(&rcResized), wine_dbgstr_rect(&rc));
ret = ShowWindow(hwnd, SW_RESTORE); - ok(ret, "not expected ret: %lu\n", ret); + ok(ret, "not expected ret: %Iu\n", ret); style = GetWindowLongA(hwnd, GWL_STYLE); ok(!(style & WS_DISABLED), "window should not be disabled\n"); ok(style & WS_VISIBLE, "window should be visible\n"); @@ -7571,12 +7571,12 @@ static void test_ShowWindow(void) wine_dbgstr_rect(&rc));
ret = EnableWindow(hwnd, FALSE); - ok(!ret, "not expected ret: %lu\n", ret); + ok(!ret, "not expected ret: %Iu\n", ret); style = GetWindowLongA(hwnd, GWL_STYLE); ok(style & WS_DISABLED, "window should be disabled\n");
ret = DefWindowProcA(hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0); - ok(!ret, "not expected ret: %lu\n", ret); + ok(!ret, "not expected ret: %Iu\n", ret); style = GetWindowLongA(hwnd, GWL_STYLE); ok(style & WS_DISABLED, "window should be disabled\n"); ok(style & WS_VISIBLE, "window should be visible\n"); @@ -7590,7 +7590,7 @@ static void test_ShowWindow(void) wine_dbgstr_rect(&rcClient), wine_dbgstr_rect(&rc));
ret = DefWindowProcA(hwnd, WM_SYSCOMMAND, SC_MAXIMIZE, 0); - ok(!ret, "not expected ret: %lu\n", ret); + ok(!ret, "not expected ret: %Iu\n", ret); style = GetWindowLongA(hwnd, GWL_STYLE); ok(style & WS_DISABLED, "window should be disabled\n"); ok(style & WS_VISIBLE, "window should be visible\n"); @@ -7604,7 +7604,7 @@ static void test_ShowWindow(void) wine_dbgstr_rect(&rcClient), wine_dbgstr_rect(&rc));
ret = ShowWindow(hwnd, SW_MINIMIZE); - ok(ret, "not expected ret: %lu\n", ret); + ok(ret, "not expected ret: %Iu\n", ret); style = GetWindowLongA(hwnd, GWL_STYLE); ok(style & WS_DISABLED, "window should be disabled\n"); ok(style & WS_VISIBLE, "window should be visible\n"); @@ -7618,7 +7618,7 @@ static void test_ShowWindow(void) wine_dbgstr_rect(&rcEmpty), wine_dbgstr_rect(&rc));
ret = DefWindowProcA(hwnd, WM_SYSCOMMAND, SC_RESTORE, 0); - ok(!ret, "not expected ret: %lu\n", ret); + ok(!ret, "not expected ret: %Iu\n", ret); style = GetWindowLongA(hwnd, GWL_STYLE); ok(style & WS_DISABLED, "window should be disabled\n"); ok(style & WS_VISIBLE, "window should be visible\n"); @@ -7632,7 +7632,7 @@ static void test_ShowWindow(void) wine_dbgstr_rect(&rcEmpty), wine_dbgstr_rect(&rc));
ret = ShowWindow(hwnd, SW_RESTORE); - ok(ret, "not expected ret: %lu\n", ret); + ok(ret, "not expected ret: %Iu\n", ret); style = GetWindowLongA(hwnd, GWL_STYLE); ok(style & WS_DISABLED, "window should be disabled\n"); ok(style & WS_VISIBLE, "window should be visible\n"); @@ -7646,14 +7646,14 @@ static void test_ShowWindow(void) wine_dbgstr_rect(&rcClient), wine_dbgstr_rect(&rc));
ret = DefWindowProcA(hwnd, WM_SYSCOMMAND, SC_CLOSE, 0); - ok(!ret, "not expected ret: %lu\n", ret); + ok(!ret, "not expected ret: %Iu\n", ret); ok(IsWindow(hwnd), "window should exist\n");
ret = EnableWindow(hwnd, TRUE); - ok(ret, "not expected ret: %lu\n", ret); + ok(ret, "not expected ret: %Iu\n", ret);
ret = DefWindowProcA(hwnd, WM_SYSCOMMAND, SC_CLOSE, 0); - ok(!ret, "not expected ret: %lu\n", ret); + ok(!ret, "not expected ret: %Iu\n", ret); ok(!IsWindow(hwnd), "window should not exist\n");
hwnd = CreateWindowExA(0, "MainWindowClass", NULL, @@ -7662,7 +7662,7 @@ static void test_ShowWindow(void) rcMain.left, rcMain.top, rcMain.right - rcMain.left, rcMain.bottom - rcMain.top, 0, 0, 0, NULL); - ok(hwnd != NULL, "failed to create window with error %u\n", GetLastError()); + ok(hwnd != NULL, "failed to create window with error %lu\n", GetLastError()); style = GetWindowLongA(hwnd, GWL_STYLE); ok(style & WS_MINIMIZE, "window should be minimized\n"); GetWindowRect(hwnd, &rc); @@ -7680,7 +7680,7 @@ static void test_ShowWindow(void) rcMain.left, rcMain.top, rcMain.right - rcMain.left, rcMain.bottom - rcMain.top, 0, 0, 0, NULL); - ok(hwnd != NULL, "failed to create window with error %u\n", GetLastError()); + ok(hwnd != NULL, "failed to create window with error %lu\n", GetLastError()); style = GetWindowLongA(hwnd, GWL_STYLE); ok(style & WS_MINIMIZE, "window should be minimized\n"); GetWindowRect(hwnd, &rc); @@ -7703,7 +7703,7 @@ static void test_ShowWindow(void) rcMain.left, rcMain.top, rcMain.right - rcMain.left, rcMain.bottom - rcMain.top, 0, 0, 0, NULL); - ok(hwnd != NULL, "Test %u: failed to create window with error %u\n", i, GetLastError()); + ok(hwnd != NULL, "Test %u: failed to create window with error %lu\n", i, GetLastError());
GetWindowRect(hwnd, &rcMain); ok(rcMain.left > mon_info.rcMonitor.left && @@ -7717,7 +7717,7 @@ static void test_ShowWindow(void) 0, GetWindowLongA(hwnd, GWL_EXSTYLE));
ret = ShowWindow(hwnd, SW_MAXIMIZE); - ok(ret, "unexpected ret: %lu\n", ret); + ok(ret, "unexpected ret: %Iu\n", ret); style = GetWindowLongA(hwnd, GWL_STYLE); ok(style & WS_MAXIMIZE, "Test %u: window should be maximized\n", i); GetWindowRect(hwnd, &rc); @@ -7734,7 +7734,7 @@ static void test_ShowWindow(void) wine_dbgstr_rect(&rc));
ret = ShowWindow(hwnd, SW_RESTORE); - ok(ret, "unexpected ret: %lu\n", ret); + ok(ret, "unexpected ret: %Iu\n", ret); style = GetWindowLongA(hwnd, GWL_STYLE); ok(!(style & WS_MAXIMIZE), "Test %u: window should not be maximized\n", i); GetWindowRect(hwnd, &rc); @@ -7761,12 +7761,12 @@ static void test_ShowWindow_owned(HWND hwndMain) WS_MINIMIZEBOX | WS_MAXIMIZEBOX, orig.left, orig.top, orig.right - orig.left, orig.bottom - orig.top, hwndMain, 0, 0, NULL); - ok(!!hwnd, "failed to create window, error %u\n", GetLastError()); + ok(!!hwnd, "failed to create window, error %lu\n", GetLastError()); hwnd2 = CreateWindowA("MainWindowClass", "owned2", WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_VISIBLE, orig.left, orig.top, orig.right - orig.left, orig.bottom - orig.top, hwndMain, 0, 0, NULL); - ok(!!hwnd2, "failed to create window, error %u\n", GetLastError()); + ok(!!hwnd2, "failed to create window, error %lu\n", GetLastError());
style = GetWindowLongA(hwnd, GWL_STYLE); ok(!(style & WS_DISABLED), "window should not be disabled\n"); @@ -7778,7 +7778,7 @@ static void test_ShowWindow_owned(HWND hwndMain) wine_dbgstr_rect(&orig), wine_dbgstr_rect(&rect));
ret = ShowWindow(hwnd, SW_SHOW); - ok(!ret, "wrong ret %lu\n", ret); + ok(!ret, "wrong ret %Iu\n", ret); style = GetWindowLongA(hwnd, GWL_STYLE); ok(!(style & WS_DISABLED), "window should not be disabled\n"); ok(style & WS_VISIBLE, "window should be visible\n"); @@ -7789,7 +7789,7 @@ static void test_ShowWindow_owned(HWND hwndMain) wine_dbgstr_rect(&orig), wine_dbgstr_rect(&rect));
ret = ShowWindow(hwnd, SW_MINIMIZE); - ok(ret, "wrong ret %lu\n", ret); + ok(ret, "wrong ret %Iu\n", ret); style = GetWindowLongA(hwnd, GWL_STYLE); ok(!(style & WS_DISABLED), "window should not be disabled\n"); ok(style & WS_VISIBLE, "window should be visible\n"); @@ -7803,7 +7803,7 @@ static void test_ShowWindow_owned(HWND hwndMain) wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect)); /* shouldn't be able to resize minimized windows */ ret = SetWindowPos(hwnd, 0, 0, 0, 200, 200, SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER); - ok(ret, "wrong ret %lu\n", ret); + ok(ret, "wrong ret %Iu\n", ret); GetWindowRect(hwnd, &rect); todo_wine ok(EqualRect(&expect, &rect), "expected %s, got %s\n", @@ -7812,7 +7812,7 @@ static void test_ShowWindow_owned(HWND hwndMain) GetWindowRect(hwnd, &rect); SetRect(&nc, rect.left, rect.top, rect.left, rect.top); ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rect); - ok(!ret, "got %08lx\n", ret); + ok(!ret, "got %08Ix\n", ret); ok(EqualRect(&rect, &nc), "expected %s, got %s\n", wine_dbgstr_rect(&nc), wine_dbgstr_rect(&rect));
@@ -7820,7 +7820,7 @@ static void test_ShowWindow_owned(HWND hwndMain) * on top of each other) */ OffsetRect(&expect, GetSystemMetrics(SM_CXMINIMIZED), 0); ret = ShowWindow(hwnd2, SW_MINIMIZE); - ok(ret, "wrong ret %lu\n", ret); + ok(ret, "wrong ret %Iu\n", ret); style = GetWindowLongA(hwnd2, GWL_STYLE); ok(!(style & WS_DISABLED), "window should not be disabled\n"); ok(style & WS_VISIBLE, "window should be visible\n"); @@ -7832,7 +7832,7 @@ static void test_ShowWindow_owned(HWND hwndMain) wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
ret = ShowWindow(hwnd, SW_RESTORE); - ok(ret, "wrong ret %lu\n", ret); + ok(ret, "wrong ret %Iu\n", ret); style = GetWindowLongA(hwnd, GWL_STYLE); ok(!(style & WS_DISABLED), "window should not be disabled\n"); ok(style & WS_VISIBLE, "window should be visible\n"); @@ -7843,7 +7843,7 @@ static void test_ShowWindow_owned(HWND hwndMain) wine_dbgstr_rect(&orig), wine_dbgstr_rect(&rect));
ret = ShowWindow(hwnd, SW_MAXIMIZE); - ok(ret, "wrong ret %lu\n", ret); + ok(ret, "wrong ret %Iu\n", ret); style = GetWindowLongA(hwnd, GWL_STYLE); ok(!(style & WS_DISABLED), "window should not be disabled\n"); ok(style & WS_VISIBLE, "window should be visible\n"); @@ -7857,14 +7857,14 @@ static void test_ShowWindow_owned(HWND hwndMain) wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect)); /* maximized windows can be resized */ ret = SetWindowPos(hwnd, 0, 300, 300, 200, 200, SWP_NOACTIVATE | SWP_NOZORDER); - ok(ret, "wrong ret %lu\n", ret); + ok(ret, "wrong ret %Iu\n", ret); GetWindowRect(hwnd, &rect); SetRect(&expect, 300, 300, 500, 500); ok(EqualRect(&expect, &rect), "expected %s, got %s\n", wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
ret = ShowWindow(hwnd, SW_RESTORE); - ok(ret, "wrong ret %lu\n", ret); + ok(ret, "wrong ret %Iu\n", ret); style = GetWindowLongA(hwnd, GWL_STYLE); ok(!(style & WS_DISABLED), "window should not be disabled\n"); ok(style & WS_VISIBLE, "window should be visible\n"); @@ -7891,12 +7891,12 @@ static void test_ShowWindow_child(HWND hwndMain) WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_CHILD, orig.left, orig.top, orig.right - orig.left, orig.bottom - orig.top, hwndMain, 0, 0, NULL); - ok(!!hwnd, "failed to create window, error %u\n", GetLastError()); + ok(!!hwnd, "failed to create window, error %lu\n", GetLastError()); hwnd2 = CreateWindowA("MainWindowClass", "child2", WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_CHILD | WS_VISIBLE, orig.left, orig.top, orig.right - orig.left, orig.bottom - orig.top, hwndMain, 0, 0, NULL); - ok(!!hwnd2, "failed to create window, error %u\n", GetLastError()); + ok(!!hwnd2, "failed to create window, error %lu\n", GetLastError());
ClientToScreen(hwndMain, &pt); OffsetRect(&orig, pt.x, pt.y); @@ -7911,7 +7911,7 @@ static void test_ShowWindow_child(HWND hwndMain) wine_dbgstr_rect(&orig), wine_dbgstr_rect(&rect));
ret = ShowWindow(hwnd, SW_SHOW); - ok(!ret, "wrong ret %lu\n", ret); + ok(!ret, "wrong ret %Iu\n", ret); style = GetWindowLongA(hwnd, GWL_STYLE); ok(!(style & WS_DISABLED), "window should not be disabled\n"); ok(style & WS_VISIBLE, "window should be visible\n"); @@ -7922,7 +7922,7 @@ static void test_ShowWindow_child(HWND hwndMain) wine_dbgstr_rect(&orig), wine_dbgstr_rect(&rect));
ret = ShowWindow(hwnd, SW_MINIMIZE); - ok(ret, "wrong ret %lu\n", ret); + ok(ret, "wrong ret %Iu\n", ret); style = GetWindowLongA(hwnd, GWL_STYLE); ok(!(style & WS_DISABLED), "window should not be disabled\n"); ok(style & WS_VISIBLE, "window should be visible\n"); @@ -7937,7 +7937,7 @@ static void test_ShowWindow_child(HWND hwndMain) wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect)); /* shouldn't be able to resize minimized windows */ ret = SetWindowPos(hwnd, 0, 0, 0, 200, 200, SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER); - ok(ret, "wrong ret %lu\n", ret); + ok(ret, "wrong ret %Iu\n", ret); GetWindowRect(hwnd, &rect); ok(EqualRect(&expect, &rect), "expected %s, got %s\n", wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect)); @@ -7945,7 +7945,7 @@ static void test_ShowWindow_child(HWND hwndMain) GetWindowRect(hwnd, &rect); SetRect(&nc, rect.left, rect.top, rect.left, rect.top); ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rect); - ok(!ret, "got %08lx\n", ret); + ok(!ret, "got %08Ix\n", ret); ok(EqualRect(&rect, &nc), "expected %s, got %s\n", wine_dbgstr_rect(&nc), wine_dbgstr_rect(&rect));
@@ -7953,7 +7953,7 @@ static void test_ShowWindow_child(HWND hwndMain) * fit more than one per row */ OffsetRect(&expect, 0, -GetSystemMetrics(SM_CYMINIMIZED)); ret = ShowWindow(hwnd2, SW_MINIMIZE); - ok(ret, "wrong ret %lu\n", ret); + ok(ret, "wrong ret %Iu\n", ret); style = GetWindowLongA(hwnd2, GWL_STYLE); ok(!(style & WS_DISABLED), "window should not be disabled\n"); ok(style & WS_VISIBLE, "window should be visible\n"); @@ -7964,7 +7964,7 @@ static void test_ShowWindow_child(HWND hwndMain) wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
ret = ShowWindow(hwnd, SW_RESTORE); - ok(ret, "wrong ret %lu\n", ret); + ok(ret, "wrong ret %Iu\n", ret); style = GetWindowLongA(hwnd, GWL_STYLE); ok(!(style & WS_DISABLED), "window should not be disabled\n"); ok(style & WS_VISIBLE, "window should be visible\n"); @@ -7975,7 +7975,7 @@ static void test_ShowWindow_child(HWND hwndMain) wine_dbgstr_rect(&orig), wine_dbgstr_rect(&rect));
ret = ShowWindow(hwnd, SW_MAXIMIZE); - ok(ret, "wrong ret %lu\n", ret); + ok(ret, "wrong ret %Iu\n", ret); style = GetWindowLongA(hwnd, GWL_STYLE); ok(!(style & WS_DISABLED), "window should not be disabled\n"); ok(style & WS_VISIBLE, "window should be visible\n"); @@ -7990,7 +7990,7 @@ static void test_ShowWindow_child(HWND hwndMain) wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect)); /* maximized windows can be resized */ ret = SetWindowPos(hwnd, 0, 300, 300, 200, 200, SWP_NOACTIVATE | SWP_NOZORDER); - ok(ret, "wrong ret %lu\n", ret); + ok(ret, "wrong ret %Iu\n", ret); GetWindowRect(hwnd, &rect); SetRect(&expect, 300, 300, 500, 500); OffsetRect(&expect, pt.x, pt.y); @@ -7998,7 +7998,7 @@ static void test_ShowWindow_child(HWND hwndMain) wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
ret = ShowWindow(hwnd, SW_RESTORE); - ok(ret, "wrong ret %lu\n", ret); + ok(ret, "wrong ret %Iu\n", ret); style = GetWindowLongA(hwnd, GWL_STYLE); ok(!(style & WS_DISABLED), "window should not be disabled\n"); ok(style & WS_VISIBLE, "window should be visible\n"); @@ -8026,17 +8026,17 @@ static void test_ShowWindow_mdichild(HWND hwndMain) mdiclient = CreateWindowA("mdiclient", "MDI client", WS_CHILD, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, hwndMain, 0, 0, &mdi_client_cs); - ok(!!mdiclient, "failed to create window, error %u\n", GetLastError()); + ok(!!mdiclient, "failed to create window, error %lu\n", GetLastError()); hwnd = CreateWindowExA(WS_EX_MDICHILD, "MainWindowClass", "MDI child", WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX, orig.left, orig.top, orig.right - orig.left, orig.bottom - orig.top, mdiclient, 0, 0, NULL); - ok(!!hwnd, "failed to create window, error %u\n", GetLastError()); + ok(!!hwnd, "failed to create window, error %lu\n", GetLastError()); hwnd2 = CreateWindowExA(WS_EX_MDICHILD, "MainWindowClass", "MDI child 2", WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX, orig.left, orig.top, orig.right - orig.left, orig.bottom - orig.top, mdiclient, 0, 0, NULL); - ok(!!hwnd2, "failed to create window, error %u\n", GetLastError()); + ok(!!hwnd2, "failed to create window, error %lu\n", GetLastError());
ClientToScreen(hwndMain, &pt); OffsetRect(&orig, pt.x, pt.y); @@ -8051,7 +8051,7 @@ static void test_ShowWindow_mdichild(HWND hwndMain) wine_dbgstr_rect(&orig), wine_dbgstr_rect(&rect));
ret = ShowWindow(hwnd, SW_MINIMIZE); - ok(ret, "wrong ret %lu\n", ret); + ok(ret, "wrong ret %Iu\n", ret); style = GetWindowLongA(hwnd, GWL_STYLE); ok(!(style & WS_DISABLED), "window should not be disabled\n"); ok(style & WS_VISIBLE, "window should be visible\n"); @@ -8066,7 +8066,7 @@ static void test_ShowWindow_mdichild(HWND hwndMain) wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect)); /* shouldn't be able to resize minimized windows */ ret = SetWindowPos(hwnd, 0, 0, 0, 200, 200, SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER); - ok(ret, "wrong ret %lu\n", ret); + ok(ret, "wrong ret %Iu\n", ret); GetWindowRect(hwnd, &rect); ok(EqualRect(&expect, &rect), "expected %s, got %s\n", wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect)); @@ -8074,7 +8074,7 @@ static void test_ShowWindow_mdichild(HWND hwndMain) GetWindowRect(hwnd, &rect); SetRect(&nc, rect.left, rect.top, rect.left, rect.top); ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rect); - ok(!ret, "got %08lx\n", ret); + ok(!ret, "got %08Ix\n", ret); ok(EqualRect(&rect, &nc), "expected %s, got %s\n", wine_dbgstr_rect(&nc), wine_dbgstr_rect(&rect));
@@ -8082,7 +8082,7 @@ static void test_ShowWindow_mdichild(HWND hwndMain) * fit more than one per row */ OffsetRect(&expect, 0, -GetSystemMetrics(SM_CYMINIMIZED)); ret = ShowWindow(hwnd2, SW_MINIMIZE); - ok(ret, "wrong ret %lu\n", ret); + ok(ret, "wrong ret %Iu\n", ret); style = GetWindowLongA(hwnd2, GWL_STYLE); ok(!(style & WS_DISABLED), "window should not be disabled\n"); ok(style & WS_VISIBLE, "window should be visible\n"); @@ -8093,7 +8093,7 @@ static void test_ShowWindow_mdichild(HWND hwndMain) wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
ret = ShowWindow(hwnd, SW_RESTORE); - ok(ret, "wrong ret %lu\n", ret); + ok(ret, "wrong ret %Iu\n", ret); style = GetWindowLongA(hwnd, GWL_STYLE); ok(!(style & WS_DISABLED), "window should not be disabled\n"); ok(style & WS_VISIBLE, "window should be visible\n"); @@ -8104,7 +8104,7 @@ static void test_ShowWindow_mdichild(HWND hwndMain) wine_dbgstr_rect(&orig), wine_dbgstr_rect(&rect));
ret = ShowWindow(hwnd, SW_MAXIMIZE); - ok(ret, "wrong ret %lu\n", ret); + ok(ret, "wrong ret %Iu\n", ret); style = GetWindowLongA(hwnd, GWL_STYLE); ok(!(style & WS_DISABLED), "window should not be disabled\n"); ok(style & WS_VISIBLE, "window should be visible\n"); @@ -8119,7 +8119,7 @@ static void test_ShowWindow_mdichild(HWND hwndMain) wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect)); /* maximized windows can be resized */ ret = SetWindowPos(hwnd, 0, 300, 300, 200, 200, SWP_NOACTIVATE | SWP_NOZORDER); - ok(ret, "wrong ret %lu\n", ret); + ok(ret, "wrong ret %Iu\n", ret); GetWindowRect(hwnd, &rect); SetRect(&expect, 300, 300, 500, 500); OffsetRect(&expect, pt.x, pt.y); @@ -8127,7 +8127,7 @@ static void test_ShowWindow_mdichild(HWND hwndMain) wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
ret = ShowWindow(hwnd, SW_RESTORE); - ok(ret, "wrong ret %lu\n", ret); + ok(ret, "wrong ret %Iu\n", ret); style = GetWindowLongA(hwnd, GWL_STYLE); ok(!(style & WS_DISABLED), "window should not be disabled\n"); ok(style & WS_VISIBLE, "window should be visible\n"); @@ -8231,7 +8231,7 @@ static DWORD CALLBACK gettext_msg_thread( LPVOID arg ) buf_len = GetWindowTextA( hwnd, buf, sizeof(buf) ); ok( buf_len != 0, "expected a nonempty window text\n" ); ok( !strcmp(buf, "another_caption"), "got wrong window text '%s'\n", buf ); - ok( num_gettext_msgs == 1, "got %u WM_GETTEXT messages\n", num_gettext_msgs ); + ok( num_gettext_msgs == 1, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
return 0; } @@ -8245,7 +8245,7 @@ static DWORD CALLBACK settext_msg_thread( LPVOID arg ) num_settext_msgs = 0; success = SetWindowTextA( hwnd, "thread_caption" ); ok( success, "SetWindowTextA failed\n" ); - ok( num_settext_msgs == 1, "got %u WM_SETTEXT messages\n", num_settext_msgs ); + ok( num_settext_msgs == 1, "got %lu WM_SETTEXT messages\n", num_settext_msgs );
return 0; } @@ -8264,7 +8264,7 @@ static void test_gettext(void) MSG msg;
hwnd = CreateWindowExA( 0, "MainWindowClass", "caption", WS_POPUP, 0, 0, 0, 0, 0, 0, 0, NULL ); - ok( hwnd != 0, "CreateWindowExA error %d\n", GetLastError() ); + ok( hwnd != 0, "CreateWindowExA error %ld\n", GetLastError() );
/* test GetWindowTextA */ num_gettext_msgs = 0; @@ -8272,7 +8272,7 @@ static void test_gettext(void) buf_len = GetWindowTextA( hwnd, buf, sizeof(buf) ); ok( buf_len != 0, "expected a nonempty window text\n" ); ok( !strcmp(buf, "caption"), "got wrong window text '%s'\n", buf ); - ok( num_gettext_msgs == 1, "got %u WM_GETTEXT messages\n", num_gettext_msgs ); + ok( num_gettext_msgs == 1, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
/* other process window */ strcpy( buf, "a" ); @@ -8298,7 +8298,7 @@ static void test_gettext(void) buf_len = GetWindowTextA( hwnd, buf, sizeof(buf) ); ok( buf_len == 0, "got %d\n", buf_len ); ok( *buf == 0, "got %x\n", *buf ); - ok( num_gettext_msgs == 1, "got %u WM_GETTEXT messages\n", num_gettext_msgs ); + ok( num_gettext_msgs == 1, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
num_gettext_msgs = 0; strcpy( buf, "blah" ); @@ -8306,13 +8306,13 @@ static void test_gettext(void) buf_len = GetWindowTextA( hwnd, buf, 0 ); ok( buf_len == 0, "got %d\n", buf_len ); ok( !strcmp(buf, "blah"), "got %s\n", buf ); - ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs ); + ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
g_wm_gettext_override.enabled = FALSE;
/* same for W window */ hwnd2 = CreateWindowExW( 0, mainclassW, NULL, WS_POPUP, 0, 0, 0, 0, 0, 0, 0, NULL ); - ok( hwnd2 != 0, "CreateWindowExA error %d\n", GetLastError() ); + ok( hwnd2 != 0, "CreateWindowExA error %ld\n", GetLastError() );
g_wm_gettext_override.enabled = TRUE;
@@ -8322,7 +8322,7 @@ static void test_gettext(void) buf_len = GetWindowTextW( hwnd2, bufW, ARRAY_SIZE(bufW)); ok( buf_len == 0, "got %d\n", buf_len ); ok( *bufW == 0, "got %x\n", *bufW ); - ok( num_gettext_msgs == 1, "got %u WM_GETTEXT messages\n", num_gettext_msgs ); + ok( num_gettext_msgs == 1, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
num_gettext_msgs = 0; memset( bufW, 0xcc, sizeof(bufW) ); @@ -8330,7 +8330,7 @@ static void test_gettext(void) buf_len = GetWindowTextW( hwnd2, bufW, 0 ); ok( buf_len == 0, "got %d\n", buf_len ); ok( *bufW == 0xcccc, "got %x\n", *bufW ); - ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs ); + ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
g_wm_gettext_override.enabled = FALSE;
@@ -8342,33 +8342,33 @@ static void test_gettext(void) r = SendMessageA( hwnd, WM_GETTEXT, sizeof(buf), (LONG_PTR)buf ); ok( r != 0, "expected a nonempty window text\n" ); ok( !strcmp(buf, "caption"), "got wrong window text '%s'\n", buf ); - ok( num_gettext_msgs == 1, "got %u WM_GETTEXT messages\n", num_gettext_msgs ); + ok( num_gettext_msgs == 1, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
/* test SetWindowTextA */ num_settext_msgs = 0; success = SetWindowTextA( hwnd, "new_caption" ); ok( success, "SetWindowTextA failed\n" ); - ok( num_settext_msgs == 1, "got %u WM_SETTEXT messages\n", num_settext_msgs ); + ok( num_settext_msgs == 1, "got %lu WM_SETTEXT messages\n", num_settext_msgs );
num_gettext_msgs = 0; memset( buf, 0, sizeof(buf) ); buf_len = GetWindowTextA( hwnd, buf, sizeof(buf) ); ok( buf_len != 0, "expected a nonempty window text\n" ); ok( !strcmp(buf, "new_caption"), "got wrong window text '%s'\n", buf ); - ok( num_gettext_msgs == 1, "got %u WM_GETTEXT messages\n", num_gettext_msgs ); + ok( num_gettext_msgs == 1, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
/* test WM_SETTEXT */ num_settext_msgs = 0; r = SendMessageA( hwnd, WM_SETTEXT, 0, (ULONG_PTR)"another_caption" ); ok( r != 0, "WM_SETTEXT failed\n" ); - ok( num_settext_msgs == 1, "got %u WM_SETTEXT messages\n", num_settext_msgs ); + ok( num_settext_msgs == 1, "got %lu WM_SETTEXT messages\n", num_settext_msgs );
num_gettext_msgs = 0; memset( buf, 0, sizeof(buf) ); buf_len = GetWindowTextA( hwnd, buf, sizeof(buf) ); ok( buf_len != 0, "expected a nonempty window text\n" ); ok( !strcmp(buf, "another_caption"), "got wrong window text '%s'\n", buf ); - ok( num_gettext_msgs == 1, "got %u WM_GETTEXT messages\n", num_gettext_msgs ); + ok( num_gettext_msgs == 1, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
while (PeekMessageA( &msg, 0, 0, 0, PM_REMOVE | PM_QS_SENDMESSAGE )) DispatchMessageA( &msg ); @@ -8376,7 +8376,7 @@ static void test_gettext(void) /* test interthread GetWindowTextA */ num_msgs = 0; thread = CreateThread( NULL, 0, gettext_msg_thread, hwnd, 0, &tid ); - ok(thread != NULL, "CreateThread failed, error %d\n", GetLastError()); + ok(thread != NULL, "CreateThread failed, error %ld\n", GetLastError()); while (MsgWaitForMultipleObjects( 1, &thread, FALSE, INFINITE, QS_SENDMESSAGE ) != WAIT_OBJECT_0) { while (PeekMessageA( &msg, 0, 0, 0, PM_REMOVE | PM_QS_SENDMESSAGE )) @@ -8384,12 +8384,12 @@ static void test_gettext(void) num_msgs++; } CloseHandle( thread ); - ok( num_msgs >= 1, "got %u wakeups from MsgWaitForMultipleObjects\n", num_msgs ); + ok( num_msgs >= 1, "got %lu wakeups from MsgWaitForMultipleObjects\n", num_msgs );
/* test interthread SetWindowText */ num_msgs = 0; thread = CreateThread( NULL, 0, settext_msg_thread, hwnd, 0, &tid ); - ok(thread != NULL, "CreateThread failed, error %d\n", GetLastError()); + ok(thread != NULL, "CreateThread failed, error %ld\n", GetLastError()); while (MsgWaitForMultipleObjects( 1, &thread, FALSE, INFINITE, QS_SENDMESSAGE ) != WAIT_OBJECT_0) { while (PeekMessageA( &msg, 0, 0, 0, PM_REMOVE | PM_QS_SENDMESSAGE )) @@ -8397,14 +8397,14 @@ static void test_gettext(void) num_msgs++; } CloseHandle( thread ); - ok( num_msgs >= 1, "got %u wakeups from MsgWaitForMultipleObjects\n", num_msgs ); + ok( num_msgs >= 1, "got %lu wakeups from MsgWaitForMultipleObjects\n", num_msgs );
num_gettext_msgs = 0; memset( buf, 0, sizeof(buf) ); buf_len = GetWindowTextA( hwnd, buf, sizeof(buf) ); ok( buf_len != 0, "expected a nonempty window text\n" ); ok( !strcmp(buf, "thread_caption"), "got wrong window text '%s'\n", buf ); - ok( num_gettext_msgs == 1, "got %u WM_GETTEXT messages\n", num_gettext_msgs ); + ok( num_gettext_msgs == 1, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
/* WM_GETTEXT does not terminate returned string */ memset( buf, 0x1c, sizeof(buf) ); @@ -8424,7 +8424,7 @@ static void test_gettext(void) g_wm_gettext_override.dont_terminate = FALSE;
hwnd2 = CreateWindowExW( 0, mainclassW, NULL, WS_POPUP, 0, 0, 0, 0, 0, 0, 0, NULL ); - ok( hwnd2 != 0, "CreateWindowExA error %d\n", GetLastError() ); + ok( hwnd2 != 0, "CreateWindowExA error %ld\n", GetLastError() );
memset( buf, 0x1c, sizeof(buf) ); g_wm_gettext_override.dont_terminate = TRUE; @@ -8448,36 +8448,36 @@ static void test_gettext(void) if (0) { r = SendMessageA( hwnd, WM_GETTEXT, 0x10, 0x1000); - ok( r == 0, "WM_GETTEXT should return zero (%ld)\n", r ); + ok( r == 0, "WM_GETTEXT should return zero (%Id)\n", r );
r = SendMessageA( hwnd, WM_GETTEXT, 0x10000, 0); - ok( r == 0, "WM_GETTEXT should return zero (%ld)\n", r ); + ok( r == 0, "WM_GETTEXT should return zero (%Id)\n", r );
r = SendMessageA( hwnd, WM_GETTEXT, 0xff000000, 0x1000); - ok( r == 0, "WM_GETTEXT should return zero (%ld)\n", r ); + ok( r == 0, "WM_GETTEXT should return zero (%Id)\n", r );
r = SendMessageA( hwnd, WM_GETTEXT, 0x1000, 0xff000000); - ok( r == 0, "WM_GETTEXT should return zero (%ld)\n", r ); + ok( r == 0, "WM_GETTEXT should return zero (%Id)\n", r ); }
/* GetWindowText doesn't crash */ r = GetWindowTextA( hwnd, (LPSTR)0x10, 0x1000 ); - ok( r == 0, "GetWindowText should return zero (%ld)\n", r ); + ok( r == 0, "GetWindowText should return zero (%Id)\n", r ); r = GetWindowTextA( hwnd, (LPSTR)0x10000, 0 ); - ok( r == 0, "GetWindowText should return zero (%ld)\n", r ); + ok( r == 0, "GetWindowText should return zero (%Id)\n", r ); r = GetWindowTextA( hwnd, (LPSTR)0xff000000, 0x1000 ); - ok( r == 0, "GetWindowText should return zero (%ld)\n", r ); + ok( r == 0, "GetWindowText should return zero (%Id)\n", r ); r = GetWindowTextA( hwnd, (LPSTR)0x1000, 0xff000000 ); - ok( r == 0, "GetWindowText should return zero (%ld)\n", r ); + ok( r == 0, "GetWindowText should return zero (%Id)\n", r );
r = GetWindowTextW( hwnd, (LPWSTR)0x10, 0x1000 ); - ok( r == 0, "GetWindowText should return zero (%ld)\n", r ); + ok( r == 0, "GetWindowText should return zero (%Id)\n", r ); r = GetWindowTextW( hwnd, (LPWSTR)0x10000, 0 ); - ok( r == 0, "GetWindowText should return zero (%ld)\n", r ); + ok( r == 0, "GetWindowText should return zero (%Id)\n", r ); r = GetWindowTextW( hwnd, (LPWSTR)0xff000000, 0x1000 ); - ok( r == 0, "GetWindowText should return zero (%ld)\n", r ); + ok( r == 0, "GetWindowText should return zero (%Id)\n", r ); r = GetWindowTextW( hwnd, (LPWSTR)0x1000, 0xff000000); - ok( r == 0, "GetWindowText should return zero (%ld)\n", r ); + ok( r == 0, "GetWindowText should return zero (%Id)\n", r );
DestroyWindow(hwnd); } @@ -8736,12 +8736,12 @@ static void test_GetWindowModuleFileName(void) buf1[0] = 0; SetLastError(0xdeadbeef); ret1 = GetModuleFileNameA(hinst, buf1, sizeof(buf1)); - ok(ret1, "GetModuleFileName error %u\n", GetLastError()); + ok(ret1, "GetModuleFileName error %lu\n", GetLastError());
buf2[0] = 0; SetLastError(0xdeadbeef); ret2 = pGetWindowModuleFileNameA(hwnd, buf2, sizeof(buf2)); - ok(ret2, "GetWindowModuleFileNameA error %u\n", GetLastError()); + ok(ret2, "GetWindowModuleFileNameA error %lu\n", GetLastError());
if (ret2) { @@ -8755,28 +8755,28 @@ static void test_GetWindowModuleFileName(void) ok(ret2 == ret1 - 2, "expected %u, got %u\n", ret1 - 2, ret2); ok(GetLastError() == 0xdeadbeef /* XP */ || GetLastError() == ERROR_INSUFFICIENT_BUFFER, /* win2k3, vista */ - "expected 0xdeadbeef or ERROR_INSUFFICIENT_BUFFER, got %u\n", GetLastError()); + "expected 0xdeadbeef or ERROR_INSUFFICIENT_BUFFER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret2 = GetModuleFileNameA(hinst, buf2, 0); ok(!ret2, "GetModuleFileName should return 0\n"); ok(GetLastError() == 0xdeadbeef /* XP */ || GetLastError() == ERROR_INSUFFICIENT_BUFFER, /* win2k3, vista */ - "expected 0xdeadbeef or ERROR_INSUFFICIENT_BUFFER, got %u\n", GetLastError()); + "expected 0xdeadbeef or ERROR_INSUFFICIENT_BUFFER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret2 = pGetWindowModuleFileNameA(hwnd, buf2, ret1 - 2); ok(ret2 == ret1 - 2, "expected %u, got %u\n", ret1 - 2, ret2); ok(GetLastError() == 0xdeadbeef /* XP */ || GetLastError() == ERROR_INSUFFICIENT_BUFFER, /* win2k3, vista */ - "expected 0xdeadbeef or ERROR_INSUFFICIENT_BUFFER, got %u\n", GetLastError()); + "expected 0xdeadbeef or ERROR_INSUFFICIENT_BUFFER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret2 = pGetWindowModuleFileNameA(hwnd, buf2, 0); ok(!ret2, "expected 0, got %u\n", ret2); ok(GetLastError() == 0xdeadbeef /* XP */ || GetLastError() == ERROR_INSUFFICIENT_BUFFER, /* win2k3, vista */ - "expected 0xdeadbeef or ERROR_INSUFFICIENT_BUFFER, got %u\n", GetLastError()); + "expected 0xdeadbeef or ERROR_INSUFFICIENT_BUFFER, got %lu\n", GetLastError());
DestroyWindow(hwnd);
@@ -8786,7 +8786,7 @@ static void test_GetWindowModuleFileName(void) ret1 = pGetWindowModuleFileNameA(hwnd, buf1, sizeof(buf1)); ok(!ret1, "expected 0, got %u\n", ret1); ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, - "expected ERROR_INVALID_WINDOW_HANDLE, got %u\n", GetLastError()); + "expected ERROR_INVALID_WINDOW_HANDLE, got %lu\n", GetLastError());
hwnd = FindWindowA("Shell_TrayWnd", NULL); ok(IsWindow(hwnd) || broken(!hwnd), "got invalid tray window %p\n", hwnd); @@ -8860,7 +8860,7 @@ static void test_hwnd_message(void) SetLastError(0xdeadbeef); found = FindWindowExA( GetDesktopWindow(), 0, 0, "message window" ); ok( found == 0, "found message window %p/%p\n", found, hwnd ); - ok( GetLastError() == 0xdeadbeef, "expected deadbeef, got %d\n", GetLastError() ); + ok( GetLastError() == 0xdeadbeef, "expected deadbeef, got %ld\n", GetLastError() ); if (parent) { found = FindWindowExA( parent, 0, 0, "message window" ); @@ -8881,13 +8881,13 @@ static void test_hwnd_message(void) { SetLastError( 0xdeadbeef ); result = GetWindowLongPtrW( parent, tests[i].offset ); - ok( result == tests[i].expect, "offset %d, got %08lx expect %08lx\n", + ok( result == tests[i].expect, "offset %d, got %08Ix expect %08Ix\n", tests[i].offset, result, tests[i].expect ); if (tests[i].error) - ok( GetLastError() == tests[i].error, "offset %d: error %d expect %d\n", + ok( GetLastError() == tests[i].error, "offset %d: error %ld expect %ld\n", tests[i].offset, GetLastError(), tests[i].error ); else - ok( GetLastError() == 0xdeadbeef, "offset %d: error %d expect unchanged\n", + ok( GetLastError() == 0xdeadbeef, "offset %d: error %ld expect unchanged\n", tests[i].offset, GetLastError() ); }
@@ -8923,7 +8923,7 @@ static void test_layered_window(void) SetLastError( 0xdeadbeef ); ret = pUpdateLayeredWindow( hwnd, 0, NULL, &sz, hdc, &pt, 0, NULL, ULW_OPAQUE ); ok( !ret, "UpdateLayeredWindow should fail on non-layered window\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError() ); ret = pGetLayeredWindowAttributes( hwnd, &key, &alpha, &flags ); ok( !ret, "GetLayeredWindowAttributes should fail on non-layered window\n" ); ret = pSetLayeredWindowAttributes( hwnd, 0, 0, LWA_ALPHA ); @@ -8939,13 +8939,13 @@ static void test_layered_window(void) ok( ret, "SetLayeredWindowAttributes should succeed on layered window\n" ); ret = pGetLayeredWindowAttributes( hwnd, &key, &alpha, &flags ); ok( ret, "GetLayeredWindowAttributes should succeed on layered window\n" ); - ok( key == 0x123456 || key == 0, "wrong color key %x\n", key ); + ok( key == 0x123456 || key == 0, "wrong color key %lx\n", key ); ok( alpha == 44, "wrong alpha %u\n", alpha ); - ok( flags == LWA_ALPHA, "wrong flags %x\n", flags ); + ok( flags == LWA_ALPHA, "wrong flags %lx\n", flags ); SetLastError( 0xdeadbeef ); ret = pUpdateLayeredWindow( hwnd, 0, NULL, &sz, hdc, &pt, 0, NULL, ULW_OPAQUE ); ok( !ret, "UpdateLayeredWindow should fail on layered but initialized window\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError() );
/* clearing WS_EX_LAYERED resets attributes */ SetWindowLongA( hwnd, GWL_EXSTYLE, GetWindowLongA(hwnd, GWL_EXSTYLE) & ~WS_EX_LAYERED ); @@ -8961,7 +8961,7 @@ static void test_layered_window(void) ok( ret, "UpdateLayeredWindow should succeed on layered window\n" ); ret = pUpdateLayeredWindow( hwnd, 0, NULL, &sz, hdc, &pt, 0, NULL, ULW_OPAQUE | ULW_EX_NORESIZE ); ok( !ret, "UpdateLayeredWindow should fail with ex flag\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() ); if (pUpdateLayeredWindowIndirect) { UPDATELAYEREDWINDOWINFO info; @@ -8983,7 +8983,7 @@ static void test_layered_window(void) ok( !ret, "UpdateLayeredWindowIndirect should fail\n" ); /* particular error code differs from version to version, could be ERROR_INCORRECT_SIZE, ERROR_MR_MID_NOT_FOUND or ERROR_GEN_FAILURE (Win8/Win10) */ - ok( GetLastError() != 0, "wrong error %u\n", GetLastError() ); + ok( GetLastError() != 0, "wrong error %lu\n", GetLastError() ); info.dwFlags = ULW_OPAQUE; ret = pUpdateLayeredWindowIndirect( hwnd, &info ); ok( ret, "UpdateLayeredWindowIndirect should succeed on layered window\n" ); @@ -8991,38 +8991,38 @@ static void test_layered_window(void) info.dwFlags = ULW_OPAQUE | 0xf00; ret = pUpdateLayeredWindowIndirect( hwnd, &info ); ok( !ret, "UpdateLayeredWindowIndirect should fail\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() ); info.cbSize--; info.dwFlags = ULW_OPAQUE; ret = pUpdateLayeredWindowIndirect( hwnd, &info ); ok( !ret, "UpdateLayeredWindowIndirect should fail\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() ); ret = pUpdateLayeredWindowIndirect( hwnd, NULL ); ok( !ret, "UpdateLayeredWindowIndirect should fail\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() ); }
ret = pSetLayeredWindowAttributes( hwnd, 0x654321, 22, LWA_COLORKEY | LWA_ALPHA ); ok( ret, "SetLayeredWindowAttributes should succeed on layered window\n" ); ret = pGetLayeredWindowAttributes( hwnd, &key, &alpha, &flags ); ok( ret, "GetLayeredWindowAttributes should succeed on layered window\n" ); - ok( key == 0x654321, "wrong color key %x\n", key ); + ok( key == 0x654321, "wrong color key %lx\n", key ); ok( alpha == 22, "wrong alpha %u\n", alpha ); - ok( flags == (LWA_COLORKEY | LWA_ALPHA), "wrong flags %x\n", flags ); + ok( flags == (LWA_COLORKEY | LWA_ALPHA), "wrong flags %lx\n", flags ); SetLastError( 0xdeadbeef ); ret = pUpdateLayeredWindow( hwnd, 0, NULL, &sz, hdc, &pt, 0, NULL, ULW_OPAQUE ); ok( !ret, "UpdateLayeredWindow should fail on layered but initialized window\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError() );
ret = pSetLayeredWindowAttributes( hwnd, 0x888888, 33, LWA_COLORKEY ); ok( ret, "SetLayeredWindowAttributes should succeed on layered window\n" ); alpha = 0; ret = pGetLayeredWindowAttributes( hwnd, &key, &alpha, &flags ); ok( ret, "GetLayeredWindowAttributes should succeed on layered window\n" ); - ok( key == 0x888888, "wrong color key %x\n", key ); + ok( key == 0x888888, "wrong color key %lx\n", key ); /* alpha not changed on vista if LWA_ALPHA is not set */ ok( alpha == 22 || alpha == 33, "wrong alpha %u\n", alpha ); - ok( flags == LWA_COLORKEY, "wrong flags %x\n", flags ); + ok( flags == LWA_COLORKEY, "wrong flags %lx\n", flags );
/* color key may or may not be changed without LWA_COLORKEY */ ret = pSetLayeredWindowAttributes( hwnd, 0x999999, 44, 0 ); @@ -9030,9 +9030,9 @@ static void test_layered_window(void) alpha = 0; ret = pGetLayeredWindowAttributes( hwnd, &key, &alpha, &flags ); ok( ret, "GetLayeredWindowAttributes should succeed on layered window\n" ); - ok( key == 0x888888 || key == 0x999999, "wrong color key %x\n", key ); + ok( key == 0x888888 || key == 0x999999, "wrong color key %lx\n", key ); ok( alpha == 22 || alpha == 44, "wrong alpha %u\n", alpha ); - ok( flags == 0, "wrong flags %x\n", flags ); + ok( flags == 0, "wrong flags %lx\n", flags );
/* default alpha and color key is 0 */ SetWindowLongA( hwnd, GWL_EXSTYLE, GetWindowLongA(hwnd, GWL_EXSTYLE) & ~WS_EX_LAYERED ); @@ -9041,9 +9041,9 @@ static void test_layered_window(void) ok( ret, "SetLayeredWindowAttributes should succeed on layered window\n" ); ret = pGetLayeredWindowAttributes( hwnd, &key, &alpha, &flags ); ok( ret, "GetLayeredWindowAttributes should succeed on layered window\n" ); - ok( key == 0 || key == 0x222222, "wrong color key %x\n", key ); + ok( key == 0 || key == 0x222222, "wrong color key %lx\n", key ); ok( alpha == 0 || alpha == 55, "wrong alpha %u\n", alpha ); - ok( flags == 0, "wrong flags %x\n", flags ); + ok( flags == 0, "wrong flags %lx\n", flags );
/* test layered window with WS_CLIPCHILDREN flag */ SetWindowLongA( hwnd, GWL_STYLE, GetWindowLongA(hwnd, GWL_STYLE) | WS_CLIPCHILDREN ); @@ -9051,7 +9051,7 @@ static void test_layered_window(void) SetWindowLongA( hwnd, GWL_EXSTYLE, GetWindowLongA(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED ); child = CreateWindowExA( 0, "button", "button", WS_VISIBLE | WS_CHILD, 0, 0, 50, 50, hwnd, 0, 0, NULL ); - ok( child != NULL, "CreateWindowEx error %u\n", GetLastError() ); + ok( child != NULL, "CreateWindowEx error %lu\n", GetLastError() ); ShowWindow( hwnd, SW_SHOW );
ret = pSetLayeredWindowAttributes( hwnd, 0, 255, LWA_ALPHA ); @@ -9102,16 +9102,16 @@ static LRESULT CALLBACK fullscreen_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPAR case WM_GETMINMAXINFO: { MINMAXINFO *minmax = (MINMAXINFO *)lp; - ok(minmax->ptMaxPosition.x <= mi.rcMonitor.left, "%d <= %d\n", minmax->ptMaxPosition.x, mi.rcMonitor.left); - ok(minmax->ptMaxPosition.y <= mi.rcMonitor.top, "%d <= %d\n", minmax->ptMaxPosition.y, mi.rcMonitor.top); - ok(minmax->ptMaxSize.x >= mi.rcMonitor.right, "%d >= %d\n", minmax->ptMaxSize.x, mi.rcMonitor.right); - ok(minmax->ptMaxSize.y >= mi.rcMonitor.bottom, "%d >= %d\n", minmax->ptMaxSize.y, mi.rcMonitor.bottom); + ok(minmax->ptMaxPosition.x <= mi.rcMonitor.left, "%ld <= %ld\n", minmax->ptMaxPosition.x, mi.rcMonitor.left); + ok(minmax->ptMaxPosition.y <= mi.rcMonitor.top, "%ld <= %ld\n", minmax->ptMaxPosition.y, mi.rcMonitor.top); + ok(minmax->ptMaxSize.x >= mi.rcMonitor.right, "%ld >= %ld\n", minmax->ptMaxSize.x, mi.rcMonitor.right); + ok(minmax->ptMaxSize.y >= mi.rcMonitor.bottom, "%ld >= %ld\n", minmax->ptMaxSize.y, mi.rcMonitor.bottom); break; } case WM_NCCALCSIZE: { LRESULT ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, wp, lp); - ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wp, lp); + ok(!ret, "got %08Ix (%08Ix %08Ix)\n", ret, wp, lp); return ret; } } @@ -9138,12 +9138,12 @@ static void test_fullscreen(void) pt.x = pt.y = 0; 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));
cls.style = 0; @@ -9175,58 +9175,58 @@ static void test_fullscreen(void) hwnd = CreateWindowExA(ex_style, "fullscreen_class", NULL, style, mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom, GetDesktopWindow(), 0, GetModuleHandleA(NULL), NULL); - ok(hwnd != 0, "%d: CreateWindowExA(%#x/%#x) failed\n", i, ex_style, style); + ok(hwnd != 0, "%d: CreateWindowExA(%#lx/%#lx) failed\n", i, ex_style, style); GetWindowRect(hwnd, &rc); ok(rc.left <= mi.rcMonitor.left && rc.top <= mi.rcMonitor.top && rc.right >= mi.rcMonitor.right && rc.bottom >= mi.rcMonitor.bottom, - "%#x/%#x: window rect %s\n", ex_style, style, wine_dbgstr_rect(&rc)); + "%#lx/%#lx: window rect %s\n", ex_style, style, wine_dbgstr_rect(&rc)); DestroyWindow(hwnd);
style = t_style[i] | WS_MAXIMIZE; hwnd = CreateWindowExA(ex_style, "fullscreen_class", NULL, style, mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom, GetDesktopWindow(), 0, GetModuleHandleA(NULL), NULL); - ok(hwnd != 0, "%d: CreateWindowExA(%#x/%#x) failed\n", i, ex_style, style); + ok(hwnd != 0, "%d: CreateWindowExA(%#lx/%#lx) failed\n", i, ex_style, style); GetWindowRect(hwnd, &rc); ok(rc.left <= mi.rcMonitor.left && rc.top <= mi.rcMonitor.top && rc.right >= mi.rcMonitor.right && rc.bottom >= mi.rcMonitor.bottom, - "%#x/%#x: window rect %s\n", ex_style, style, wine_dbgstr_rect(&rc)); + "%#lx/%#lx: window rect %s\n", ex_style, style, wine_dbgstr_rect(&rc)); DestroyWindow(hwnd);
style = t_style[i] | WS_MAXIMIZE | WS_CAPTION; hwnd = CreateWindowExA(ex_style, "fullscreen_class", NULL, style, mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom, GetDesktopWindow(), 0, GetModuleHandleA(NULL), NULL); - ok(hwnd != 0, "%d: CreateWindowExA(%#x/%#x) failed\n", i, ex_style, style); + ok(hwnd != 0, "%d: CreateWindowExA(%#lx/%#lx) failed\n", i, ex_style, style); GetWindowRect(hwnd, &rc); ok(rc.left <= mi.rcMonitor.left && rc.top <= mi.rcMonitor.top && rc.right >= mi.rcMonitor.right && rc.bottom >= mi.rcMonitor.bottom, - "%#x/%#x: window rect %s\n", ex_style, style, wine_dbgstr_rect(&rc)); + "%#lx/%#lx: window rect %s\n", ex_style, style, wine_dbgstr_rect(&rc)); DestroyWindow(hwnd);
style = t_style[i] | WS_CAPTION | WS_MAXIMIZEBOX; hwnd = CreateWindowExA(ex_style, "fullscreen_class", NULL, style, mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom, GetDesktopWindow(), 0, GetModuleHandleA(NULL), NULL); - ok(hwnd != 0, "%d: CreateWindowExA(%#x/%#x) failed\n", i, ex_style, style); + ok(hwnd != 0, "%d: CreateWindowExA(%#lx/%#lx) failed\n", i, ex_style, style); GetWindowRect(hwnd, &rc); ok(rc.left <= mi.rcMonitor.left && rc.top <= mi.rcMonitor.top && rc.right >= mi.rcMonitor.right && rc.bottom >= mi.rcMonitor.bottom, - "%#x/%#x: window rect %s\n", ex_style, style, wine_dbgstr_rect(&rc)); + "%#lx/%#lx: window rect %s\n", ex_style, style, wine_dbgstr_rect(&rc)); DestroyWindow(hwnd);
style = t_style[i] | WS_MAXIMIZE | WS_CAPTION | WS_MAXIMIZEBOX; hwnd = CreateWindowExA(ex_style, "fullscreen_class", NULL, style, mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom, GetDesktopWindow(), 0, GetModuleHandleA(NULL), NULL); - ok(hwnd != 0, "%d: CreateWindowExA(%#x/%#x) failed\n", i, ex_style, style); + ok(hwnd != 0, "%d: CreateWindowExA(%#lx/%#lx) failed\n", i, ex_style, style); GetWindowRect(hwnd, &rc); /* Windows makes a maximized window slightly larger (to hide the borders?) */ fixup = min(abs(rc.left), abs(rc.top)); InflateRect(&rc, -fixup, -fixup); ok(rc.left >= mi.rcMonitor.left && rc.top >= mi.rcMonitor.top && rc.right <= mi.rcMonitor.right && rc.bottom <= mi.rcMonitor.bottom, - "%#x/%#x: window rect %s must be in %s\n", ex_style, style, wine_dbgstr_rect(&rc), + "%#lx/%#lx: window rect %s must be in %s\n", ex_style, style, wine_dbgstr_rect(&rc), wine_dbgstr_rect(&mi.rcMonitor)); DestroyWindow(hwnd);
@@ -9234,7 +9234,7 @@ static void test_fullscreen(void) hwnd = CreateWindowExA(ex_style, "fullscreen_class", NULL, style, mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom, GetDesktopWindow(), 0, GetModuleHandleA(NULL), NULL); - ok(hwnd != 0, "%d: CreateWindowExA(%#x/%#x) failed\n", i, ex_style, style); + ok(hwnd != 0, "%d: CreateWindowExA(%#lx/%#lx) failed\n", i, ex_style, style); GetWindowRect(hwnd, &rc); /* Windows makes a maximized window slightly larger (to hide the borders?) */ fixup = min(abs(rc.left), abs(rc.top)); @@ -9242,11 +9242,11 @@ static void test_fullscreen(void) if (style & (WS_CHILD | WS_POPUP)) ok(rc.left <= mi.rcMonitor.left && rc.top <= mi.rcMonitor.top && rc.right >= mi.rcMonitor.right && rc.bottom >= mi.rcMonitor.bottom, - "%#x/%#x: window rect %s\n", ex_style, style, wine_dbgstr_rect(&rc)); + "%#lx/%#lx: window rect %s\n", ex_style, style, wine_dbgstr_rect(&rc)); else ok(rc.left >= mi.rcMonitor.left && rc.top >= mi.rcMonitor.top && rc.right <= mi.rcMonitor.right && rc.bottom <= mi.rcMonitor.bottom, - "%#x/%#x: window rect %s\n", ex_style, style, wine_dbgstr_rect(&rc)); + "%#lx/%#lx: window rect %s\n", ex_style, style, wine_dbgstr_rect(&rc)); DestroyWindow(hwnd); } } @@ -9255,7 +9255,7 @@ static void test_fullscreen(void) /* Add WS_THICKFRAME style later so that the window can cover the entire monitor */ hwnd = CreateWindowA("fullscreen_class", NULL, WS_POPUP | WS_VISIBLE, 0, 0, mi.rcMonitor.right, mi.rcMonitor.bottom, NULL, NULL, GetModuleHandleA(NULL), NULL); - ok(!!hwnd, "CreateWindow failed, error %#x.\n", GetLastError()); + ok(!!hwnd, "CreateWindow failed, error %#lx.\n", GetLastError()); flush_events(TRUE);
/* Add WS_THICKFRAME and exit full screen */ @@ -9273,8 +9273,8 @@ static void test_fullscreen(void) if (rc.right - rc.left == 100 && rc.bottom - rc.top == 100) break; } - ok(rc.right - rc.left == 100, "Expect width %d, got %d.\n", 100, rc.right - rc.left); - ok(rc.bottom - rc.top == 100, "Expect height %d, got %d.\n", 100, rc.bottom - rc.top); + ok(rc.right - rc.left == 100, "Expect width %d, got %ld.\n", 100, rc.right - rc.left); + ok(rc.bottom - rc.top == 100, "Expect height %d, got %ld.\n", 100, rc.bottom - rc.top); DestroyWindow(hwnd);
UnregisterClassA("fullscreen_class", GetModuleHandleA(NULL)); @@ -9313,7 +9313,7 @@ static LRESULT WINAPI test_thick_child_size_winproc(HWND hwnd, UINT msg, WPARAM minmax = (MINMAXINFO *)lparam; if (winetest_debug > 1) { - trace("hwnd %p, WM_GETMINMAXINFO, %08lx, %08lx\n", hwnd, wparam, lparam); + trace("hwnd %p, WM_GETMINMAXINFO, %08Ix, %08Ix\n", hwnd, wparam, lparam); dump_minmax_info( minmax ); } test_thick_child_got_minmax = TRUE; @@ -9377,7 +9377,7 @@ static LRESULT WINAPI test_thick_child_size_winproc(HWND hwnd, UINT msg, WPARAM case WM_NCCALCSIZE: { LRESULT ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, wparam, lparam); - ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wparam, lparam); + ok(!ret, "got %08Ix (%08Ix %08Ix)\n", ret, wparam, lparam); return ret; } } @@ -9468,7 +9468,7 @@ static void test_thick_child_size(HWND parentWindow) cls.lpszClassName = className; SetLastError(0xdeadbeef); success = RegisterClassA(&cls); - ok(success,"RegisterClassA failed, error: %u\n", GetLastError()); + ok(success,"RegisterClassA failed, error: %lu\n", GetLastError());
for(i = 0; i < NUMBER_OF_THICK_CHILD_TESTS; i++) { @@ -9479,13 +9479,13 @@ static void test_thick_child_size(HWND parentWindow)
SetLastError(0xdeadbeef); childWindow = CreateWindowExA( exStyles[i], className, "", styles[i], 0, 0, 0, 0, parentWindow, 0, GetModuleHandleA(0), NULL ); - ok(childWindow != NULL, "Failed to create child window, error: %u\n", GetLastError()); + ok(childWindow != NULL, "Failed to create child window, error: %lu\n", GetLastError());
ok(test_thick_child_got_minmax, "Got no WM_GETMINMAXINFO\n");
SetLastError(0xdeadbeef); success = GetWindowRect(childWindow, &childRect); - ok(success,"GetWindowRect call failed, error: %u\n", GetLastError()); + ok(success,"GetWindowRect call failed, error: %lu\n", GetLastError()); childWidth = childRect.right - childRect.left; childHeight = childRect.bottom - childRect.top;
@@ -9508,12 +9508,12 @@ static void test_thick_child_size(HWND parentWindow) }
ok((childWidth == expectedWidth) && (childHeight == expectedHeight), - "size of window (%s) is wrong: expected size %dx%d != actual size %dx%d\n", + "size of window (%s) is wrong: expected size %ldx%ld != actual size %ldx%ld\n", test_thick_child_name, expectedWidth, expectedHeight, childWidth, childHeight);
SetLastError(0xdeadbeef); success = DestroyWindow(childWindow); - ok(success,"DestroyWindow call failed, error: %u\n", GetLastError()); + ok(success,"DestroyWindow call failed, error: %lu\n", GetLastError()); } ok(UnregisterClassA(className, GetModuleHandleA(NULL)),"UnregisterClass call failed\n"); } @@ -9526,7 +9526,7 @@ static void test_handles( HWND full_hwnd )
SetLastError( 0xdeadbeef ); ret = GetWindowRect( hwnd, &rect ); - ok( ret, "GetWindowRect failed for %p err %u\n", hwnd, GetLastError() ); + ok( ret, "GetWindowRect failed for %p err %lu\n", hwnd, GetLastError() );
#ifdef _WIN64 if ((ULONG_PTR)full_hwnd >> 32) @@ -9535,24 +9535,24 @@ static void test_handles( HWND full_hwnd ) hwnd = (HWND)((ULONG_PTR)full_hwnd | ((ULONG_PTR)~0u << 32)); SetLastError( 0xdeadbeef ); ret = GetWindowRect( hwnd, &rect ); - ok( ret, "GetWindowRect failed for %p err %u\n", hwnd, GetLastError() ); + ok( ret, "GetWindowRect failed for %p err %lu\n", hwnd, GetLastError() );
hwnd = (HWND)(((ULONG_PTR)full_hwnd & ~0u) | ((ULONG_PTR)0x1234 << 32)); SetLastError( 0xdeadbeef ); ret = GetWindowRect( hwnd, &rect ); - ok( ret, "GetWindowRect failed for %p err %u\n", hwnd, GetLastError() ); + ok( ret, "GetWindowRect failed for %p err %lu\n", hwnd, GetLastError() );
hwnd = (HWND)(((ULONG_PTR)full_hwnd & 0xffff) | ((ULONG_PTR)0x9876 << 16)); SetLastError( 0xdeadbeef ); ret = GetWindowRect( hwnd, &rect ); ok( !ret, "GetWindowRect succeeded for %p\n", hwnd ); - ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error %lu\n", GetLastError() );
hwnd = (HWND)(((ULONG_PTR)full_hwnd & 0xffff) | ((ULONG_PTR)0x12345678 << 16)); SetLastError( 0xdeadbeef ); ret = GetWindowRect( hwnd, &rect ); ok( !ret, "GetWindowRect succeeded for %p\n", hwnd ); - ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error %lu\n", GetLastError() ); #endif }
@@ -9574,7 +9574,7 @@ static void test_winregion(void) SetLastError(0xdeadbeef); ret = pGetWindowRgnBox(hwnd, NULL); ok( ret == ERROR, "Expected ERROR, got %d\n", ret); - ok( GetLastError() == 0xdeadbeef, "Expected , got %d\n", GetLastError()); + ok( GetLastError() == 0xdeadbeef, "Expected , got %ld\n", GetLastError());
hrgn = CreateRectRgn(2, 3, 10, 15); ok( hrgn != NULL, "Region creation failed\n"); @@ -9585,7 +9585,7 @@ static void test_winregion(void) SetLastError(0xdeadbeef); ret = pGetWindowRgnBox(hwnd, NULL); ok( ret == ERROR, "Expected ERROR, got %d\n", ret); - ok( GetLastError() == 0xdeadbeef, "Expected , got %d\n", GetLastError()); + ok( GetLastError() == 0xdeadbeef, "Expected , got %ld\n", GetLastError());
SetRectEmpty(&r); ret = pGetWindowRgnBox(hwnd, &r); @@ -9644,7 +9644,7 @@ static void test_rtl_layout(void) ok( r.left == 30 && r.right == 10, "wrong rect %s\n", wine_dbgstr_rect( &r )); pt.x = pt.y = 12; MapWindowPoints( child, parent, &pt, 1 ); - ok( pt.x == 22 && pt.y == 22, "wrong point %d,%d\n", pt.x, pt.y ); + ok( pt.x == 22 && pt.y == 22, "wrong point %ld,%ld\n", pt.x, pt.y ); SetWindowPos( parent, 0, 0, 0, 250, 250, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE ); GetWindowRect( parent, &r ); ok( r.left == 100 && r.right == 350, "wrong rect %s\n", wine_dbgstr_rect( &r )); @@ -9681,13 +9681,13 @@ static void test_FlashWindow(void)
hwnd = CreateWindowExA( 0, "MainWindowClass", "FlashWindow", WS_POPUP, 0, 0, 0, 0, 0, 0, 0, NULL ); - ok( hwnd != 0, "CreateWindowExA error %d\n", GetLastError() ); + ok( hwnd != 0, "CreateWindowExA error %ld\n", GetLastError() );
SetLastError( 0xdeadbeef ); ret = pFlashWindow( NULL, TRUE ); ok( !ret && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_INVALID_WINDOW_HANDLE), - "FlashWindow returned with %d\n", GetLastError() ); + "FlashWindow returned with %ld\n", GetLastError() );
DestroyWindow( hwnd );
@@ -9695,7 +9695,7 @@ static void test_FlashWindow(void) ret = pFlashWindow( hwnd, TRUE ); ok( !ret && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_INVALID_WINDOW_HANDLE), - "FlashWindow returned with %d\n", GetLastError() ); + "FlashWindow returned with %ld\n", GetLastError() ); }
static void test_FlashWindowEx(void) @@ -9712,7 +9712,7 @@ static void test_FlashWindowEx(void)
hwnd = CreateWindowExA( 0, "MainWindowClass", "FlashWindow", WS_POPUP, 0, 0, 0, 0, 0, 0, 0, NULL ); - ok( hwnd != 0, "CreateWindowExA error %d\n", GetLastError() ); + ok( hwnd != 0, "CreateWindowExA error %ld\n", GetLastError() );
finfo.cbSize = sizeof(FLASHWINFO); finfo.dwFlags = FLASHW_TIMER; @@ -9723,13 +9723,13 @@ static void test_FlashWindowEx(void) ret = pFlashWindowEx(&finfo); ok(!ret && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_INVALID_WINDOW_HANDLE), - "FlashWindowEx returned with %d\n", GetLastError()); + "FlashWindowEx returned with %ld\n", GetLastError());
finfo.hwnd = hwnd; SetLastError(0xdeadbeef); ret = pFlashWindowEx(NULL); ok(!ret && GetLastError() == ERROR_NOACCESS, - "FlashWindowEx returned with %d\n", GetLastError()); + "FlashWindowEx returned with %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = pFlashWindowEx(&finfo); @@ -9754,32 +9754,32 @@ static void test_FlashWindowEx(void) ret = pFlashWindowEx(&finfo); ok(!ret && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_INVALID_WINDOW_HANDLE), - "FlashWindowEx returned with %d\n", GetLastError()); + "FlashWindowEx returned with %ld\n", GetLastError());
ok(finfo.cbSize == sizeof(FLASHWINFO), "FlashWindowEx modified cdSize to %x\n", finfo.cbSize); ok(finfo.hwnd == hwnd, "FlashWindowEx modified hwnd to %p\n", finfo.hwnd); - ok(finfo.dwFlags == FLASHW_TIMER, "FlashWindowEx modified dwFlags to %x\n", finfo.dwFlags); + ok(finfo.dwFlags == FLASHW_TIMER, "FlashWindowEx modified dwFlags to %lx\n", finfo.dwFlags); ok(finfo.uCount == 3, "FlashWindowEx modified uCount to %x\n", finfo.uCount); - ok(finfo.dwTimeout == 200, "FlashWindowEx modified dwTimeout to %x\n", finfo.dwTimeout); + ok(finfo.dwTimeout == 200, "FlashWindowEx modified dwTimeout to %lx\n", finfo.dwTimeout);
hwnd = CreateWindowExA( 0, "MainWindowClass", "FlashWindow", WS_VISIBLE | WS_POPUPWINDOW, 0, 0, 0, 0, 0, 0, 0, NULL ); - ok( hwnd != 0, "CreateWindowExA error %d\n", GetLastError() ); + ok( hwnd != 0, "CreateWindowExA error %ld\n", GetLastError() ); finfo.hwnd = hwnd;
SetLastError(0xdeadbeef); ret = pFlashWindowEx(NULL); ok(!ret && GetLastError() == ERROR_NOACCESS, - "FlashWindowEx returned with %d\n", GetLastError()); + "FlashWindowEx returned with %ld\n", GetLastError());
SetLastError(0xdeadbeef); prev = pFlashWindowEx(&finfo);
ok(finfo.cbSize == sizeof(FLASHWINFO), "FlashWindowEx modified cdSize to %x\n", finfo.cbSize); ok(finfo.hwnd == hwnd, "FlashWindowEx modified hwnd to %p\n", finfo.hwnd); - ok(finfo.dwFlags == FLASHW_TIMER, "FlashWindowEx modified dwFlags to %x\n", finfo.dwFlags); + ok(finfo.dwFlags == FLASHW_TIMER, "FlashWindowEx modified dwFlags to %lx\n", finfo.dwFlags); ok(finfo.uCount == 3, "FlashWindowEx modified uCount to %x\n", finfo.uCount); - ok(finfo.dwTimeout == 200, "FlashWindowEx modified dwTimeout to %x\n", finfo.dwTimeout); + ok(finfo.dwTimeout == 200, "FlashWindowEx modified dwTimeout to %lx\n", finfo.dwTimeout);
finfo.dwFlags = FLASHW_STOP; SetLastError(0xdeadbeef); @@ -9794,47 +9794,47 @@ static void test_FindWindowEx(void) HWND hwnd, found;
hwnd = CreateWindowExA( 0, "MainWindowClass", "caption", WS_POPUP, 0,0,0,0, 0, 0, 0, NULL ); - ok( hwnd != 0, "CreateWindowExA error %d\n", GetLastError() ); + ok( hwnd != 0, "CreateWindowExA error %ld\n", GetLastError() );
num_gettext_msgs = 0; found = FindWindowExA( 0, 0, "ClassThatDoesntExist", "" ); ok( found == NULL, "expected a NULL hwnd\n" ); - ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs ); + ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
num_gettext_msgs = 0; found = FindWindowExA( 0, 0, "ClassThatDoesntExist", NULL ); ok( found == NULL, "expected a NULL hwnd\n" ); - ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs ); + ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
num_gettext_msgs = 0; found = FindWindowExA( 0, 0, "MainWindowClass", "" ); ok( found == NULL, "expected a NULL hwnd\n" ); - ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs ); + ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
num_gettext_msgs = 0; found = FindWindowExA( 0, 0, "MainWindowClass", NULL ); ok( found == hwnd, "found is %p, expected a valid hwnd\n", found ); - ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs ); + ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
num_gettext_msgs = 0; found = FindWindowExA( 0, 0, "MainWindowClass", "caption" ); ok( found == hwnd, "found is %p, expected a valid hwnd\n", found ); - ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs ); + ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
DestroyWindow( hwnd );
hwnd = CreateWindowExA( 0, "MainWindowClass", NULL, WS_POPUP, 0,0,0,0, 0, 0, 0, NULL ); - ok( hwnd != 0, "CreateWindowExA error %d\n", GetLastError() ); + ok( hwnd != 0, "CreateWindowExA error %ld\n", GetLastError() );
num_gettext_msgs = 0; found = FindWindowExA( 0, 0, "MainWindowClass", "" ); ok( found == hwnd, "found is %p, expected a valid hwnd\n", found ); - ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs ); + ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
num_gettext_msgs = 0; found = FindWindowExA( 0, 0, "MainWindowClass", NULL ); ok( found == hwnd, "found is %p, expected a valid hwnd\n", found ); - ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs ); + ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
DestroyWindow( hwnd );
@@ -9850,47 +9850,47 @@ static void test_FindWindow(void) HWND hwnd, found;
hwnd = CreateWindowExA( 0, "MainWindowClass", "caption", WS_POPUP, 0,0,0,0, 0, 0, 0, NULL ); - ok( hwnd != 0, "CreateWindowExA error %d\n", GetLastError() ); + ok( hwnd != 0, "CreateWindowExA error %ld\n", GetLastError() );
num_gettext_msgs = 0; found = FindWindowA( "ClassThatDoesntExist", "" ); ok( found == NULL, "expected a NULL hwnd\n" ); - ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs ); + ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
num_gettext_msgs = 0; found = FindWindowA( "ClassThatDoesntExist", NULL ); ok( found == NULL, "expected a NULL hwnd\n" ); - ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs ); + ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
num_gettext_msgs = 0; found = FindWindowA( "MainWindowClass", "" ); ok( found == NULL, "expected a NULL hwnd\n" ); - ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs ); + ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
num_gettext_msgs = 0; found = FindWindowA( "MainWindowClass", NULL ); ok( found == hwnd, "found is %p, expected a valid hwnd\n", found ); - ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs ); + ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
num_gettext_msgs = 0; found = FindWindowA( "MainWindowClass", "caption" ); ok( found == hwnd, "found is %p, expected a valid hwnd\n", found ); - ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs ); + ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
DestroyWindow( hwnd );
hwnd = CreateWindowExA( 0, "MainWindowClass", NULL, WS_POPUP, 0,0,0,0, 0, 0, 0, NULL ); - ok( hwnd != 0, "CreateWindowExA error %d\n", GetLastError() ); + ok( hwnd != 0, "CreateWindowExA error %ld\n", GetLastError() );
num_gettext_msgs = 0; found = FindWindowA( "MainWindowClass", "" ); ok( found == hwnd, "found is %p, expected a valid hwnd\n", found ); - ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs ); + ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
num_gettext_msgs = 0; found = FindWindowA( "MainWindowClass", NULL ); ok( found == hwnd, "found is %p, expected a valid hwnd\n", found ); - ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs ); + ok( num_gettext_msgs == 0, "got %lu WM_GETTEXT messages\n", num_gettext_msgs );
DestroyWindow( hwnd );
@@ -10233,7 +10233,7 @@ static void window_from_point_proc(HWND parent) ok(got_click, "button under static window didn't get WM_LBUTTONUP\n");
ret = WaitForSingleObject(end_event, 5000); - ok(ret == WAIT_OBJECT_0, "WaitForSingleObject returned %x\n", ret); + ok(ret == WAIT_OBJECT_0, "WaitForSingleObject returned %lx\n", ret);
CloseHandle(start_event); CloseHandle(end_event); @@ -10336,15 +10336,15 @@ static void test_map_points(void)
/* Verify window rect and client rect (they should have the same width and height) */ GetWindowRect(wnd, &window_rect); - ok(window_rect.left == pos.x, "left is %d instead of %d\n", window_rect.left, pos.x); - ok(window_rect.top == pos.y, "top is %d instead of %d\n", window_rect.top, pos.y); - ok(window_rect.right == pos.x + width, "right is %d instead of %d\n", window_rect.right, pos.x + width); - ok(window_rect.bottom == pos.y + height, "bottom is %d instead of %d\n", window_rect.bottom, pos.y + height); + ok(window_rect.left == pos.x, "left is %ld instead of %ld\n", window_rect.left, pos.x); + ok(window_rect.top == pos.y, "top is %ld instead of %ld\n", window_rect.top, pos.y); + ok(window_rect.right == pos.x + width, "right is %ld instead of %ld\n", window_rect.right, pos.x + width); + ok(window_rect.bottom == pos.y + height, "bottom is %ld instead of %ld\n", window_rect.bottom, pos.y + height); GetClientRect(wnd, &client_rect); - ok(client_rect.left == 0, "left is %d instead of 0\n", client_rect.left); - ok(client_rect.top == 0, "top is %d instead of 0\n", client_rect.top); - ok(client_rect.right == width, "right is %d instead of %d\n", client_rect.right, width); - ok(client_rect.bottom == height, "bottom is %d instead of %d\n", client_rect.bottom, height); + ok(client_rect.left == 0, "left is %ld instead of 0\n", client_rect.left); + ok(client_rect.top == 0, "top is %ld instead of 0\n", client_rect.top); + ok(client_rect.right == width, "right is %ld instead of %d\n", client_rect.right, width); + ok(client_rect.bottom == height, "bottom is %ld instead of %d\n", client_rect.bottom, height);
/* Test MapWindowPoints */
@@ -10354,20 +10354,20 @@ static void test_map_points(void) n = MapWindowPoints(NULL, NULL, NULL, 0); err = GetLastError(); ok(n == 0, "Got %d, expected %d\n", n, 0); - ok(err == 0xdeadbeef, "Got %x, expected %x\n", err, 0xdeadbeef); + ok(err == 0xdeadbeef, "Got %lx, expected %x\n", err, 0xdeadbeef);
SetLastError(0xdeadbeef); n = MapWindowPoints(wnd, wnd, NULL, 0); err = GetLastError(); ok(n == 0, "Got %d, expected %d\n", n, 0); - ok(err == 0xdeadbeef, "Got %x, expected %x\n", err, 0xdeadbeef); + ok(err == 0xdeadbeef, "Got %lx, expected %x\n", err, 0xdeadbeef);
n = MapWindowPoints(wnd, NULL, NULL, 0); - ok(n == MAKELONG(window_rect.left, window_rect.top), "Got %x, expected %x\n", + ok(n == MAKELONG(window_rect.left, window_rect.top), "Got %x, expected %lx\n", n, MAKELONG(window_rect.left, window_rect.top));
n = MapWindowPoints(NULL, wnd, NULL, 0); - ok(n == MAKELONG(-window_rect.left, -window_rect.top), "Got %x, expected %x\n", + ok(n == MAKELONG(-window_rect.left, -window_rect.top), "Got %x, expected %lx\n", n, MAKELONG(-window_rect.left, -window_rect.top));
SetLastError(0xdeadbeef); @@ -10375,69 +10375,69 @@ static void test_map_points(void) n = MapWindowPoints(dwnd, NULL, &p, 1); err = GetLastError(); ok(n == 0, "Got %d, expected %d\n", n, 0); - ok(p.x == 100 && p.y == 100, "Failed got(%d, %d), expected (%d, %d)\n", p.x, p.y, 100, 100); - ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %x, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE); + ok(p.x == 100 && p.y == 100, "Failed got(%ld, %ld), expected (%d, %d)\n", p.x, p.y, 100, 100); + ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %lx, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
SetLastError(0xdeadbeef); p.x = p.y = 100; n = MapWindowPoints(dwnd, wnd, &p, 1); err = GetLastError(); ok(n == 0, "Got %d, expected %d\n", n, 0); - ok(p.x == 100 && p.y == 100, "Failed got(%d, %d), expected (%d, %d)\n", p.x, p.y, 100, 100); - ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %x, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE); + ok(p.x == 100 && p.y == 100, "Failed got(%ld, %ld), expected (%d, %d)\n", p.x, p.y, 100, 100); + ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %lx, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
SetLastError(0xdeadbeef); p.x = p.y = 100; n = MapWindowPoints(NULL, dwnd, &p, 1); err = GetLastError(); ok(n == 0, "Got %d, expected %d\n", n, 0); - ok(p.x == 100 && p.y == 100, "Failed got(%d, %d), expected (%d, %d)\n", p.x, p.y, 100, 100); - ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %x, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE); + ok(p.x == 100 && p.y == 100, "Failed got(%ld, %ld), expected (%d, %d)\n", p.x, p.y, 100, 100); + ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %lx, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
SetLastError(0xdeadbeef); p.x = p.y = 100; n = MapWindowPoints(wnd, dwnd, &p, 1); err = GetLastError(); ok(n == 0, "Got %d, expected %d\n", n, 0); - ok(p.x == 100 && p.y == 100, "Failed got(%d, %d), expected (%d, %d)\n", p.x, p.y, 100, 100); - ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %x, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE); + ok(p.x == 100 && p.y == 100, "Failed got(%ld, %ld), expected (%d, %d)\n", p.x, p.y, 100, 100); + ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %lx, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
SetLastError(0xdeadbeef); p.x = p.y = 100; n = MapWindowPoints(dwnd, dwnd, &p, 1); err = GetLastError(); ok(n == 0, "Got %d, expected %d\n", n, 0); - ok(p.x == 100 && p.y == 100, "Failed got(%d, %d), expected (%d, %d)\n", p.x, p.y, 100, 100); - ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %x, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE); + ok(p.x == 100 && p.y == 100, "Failed got(%ld, %ld), expected (%d, %d)\n", p.x, p.y, 100, 100); + ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %lx, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
SetLastError(0xdeadbeef); p.x = p.y = 100; n = MapWindowPoints(NULL, NULL, &p, 1); err = GetLastError(); ok(n == 0, "Got %d, expected %d\n", n, 0); - ok(p.x == 100 && p.y == 100, "Failed got(%d, %d), expected (%d, %d)\n", p.x, p.y, 100, 100); - ok(err == 0xdeadbeef, "Got %x, expected %x\n", err, 0xdeadbeef); + ok(p.x == 100 && p.y == 100, "Failed got(%ld, %ld), expected (%d, %d)\n", p.x, p.y, 100, 100); + ok(err == 0xdeadbeef, "Got %lx, expected %x\n", err, 0xdeadbeef);
SetLastError(0xdeadbeef); p.x = p.y = 100; n = MapWindowPoints(wnd, wnd, &p, 1); err = GetLastError(); ok(n == 0, "Got %d, expected %d\n", n, 0); - ok(p.x == 100 && p.y == 100, "Failed got(%d, %d), expected (%d, %d)\n", p.x, p.y, 100, 100); - ok(err == 0xdeadbeef, "Got %x, expected %x\n", err, 0xdeadbeef); + ok(p.x == 100 && p.y == 100, "Failed got(%ld, %ld), expected (%d, %d)\n", p.x, p.y, 100, 100); + ok(err == 0xdeadbeef, "Got %lx, expected %x\n", err, 0xdeadbeef);
p.x = p.y = 100; n = MapWindowPoints(wnd, NULL, &p, 1); - ok(n == MAKELONG(window_rect.left, window_rect.top), "Got %x, expected %x\n", + ok(n == MAKELONG(window_rect.left, window_rect.top), "Got %x, expected %lx\n", n, MAKELONG(window_rect.left, window_rect.top)); - ok((p.x == (window_rect.left + 100)) && (p.y == (window_rect.top + 100)), "Failed got (%d, %d), expected (%d, %d)\n", + ok((p.x == (window_rect.left + 100)) && (p.y == (window_rect.top + 100)), "Failed got (%ld, %ld), expected (%ld, %ld)\n", p.x, p.y, window_rect.left + 100, window_rect.top + 100);
p.x = p.y = 100; n = MapWindowPoints(NULL, wnd, &p, 1); - ok(n == MAKELONG(-window_rect.left, -window_rect.top), "Got %x, expected %x\n", + ok(n == MAKELONG(-window_rect.left, -window_rect.top), "Got %x, expected %lx\n", n, MAKELONG(-window_rect.left, -window_rect.top)); - ok((p.x == (-window_rect.left + 100)) && (p.y == (-window_rect.top + 100)), "Failed got (%d, %d), expected (%d, %d)\n", + ok((p.x == (-window_rect.left + 100)) && (p.y == (-window_rect.top + 100)), "Failed got (%ld, %ld), expected (%ld, %ld)\n", p.x, p.y, -window_rect.left + 100, -window_rect.top + 100);
SetLastError(0xdeadbeef); @@ -10445,16 +10445,16 @@ static void test_map_points(void) n = MapWindowPoints(wnd0, NULL, &p, 1); err = GetLastError(); ok(n == 0, "Got %x, expected 0\n", n); - ok((p.x == 0) && (p.y == 0), "Failed got (%d, %d), expected (0, 0)\n", p.x, p.y); - ok(err == 0xdeadbeef, "Got %x, expected %x\n", err, 0xdeadbeef); + ok((p.x == 0) && (p.y == 0), "Failed got (%ld, %ld), expected (0, 0)\n", p.x, p.y); + ok(err == 0xdeadbeef, "Got %lx, expected %x\n", err, 0xdeadbeef);
SetLastError(0xdeadbeef); p.x = p.y = 0; n = MapWindowPoints(NULL, wnd0, &p, 1); err = GetLastError(); ok(n == 0, "Got %x, expected 0\n", n); - ok((p.x == 0) && (p.y == 0), "Failed got (%d, %d), expected (0, 0)\n", p.x, p.y); - ok(err == 0xdeadbeef, "Got %x, expected %x\n", err, 0xdeadbeef); + ok((p.x == 0) && (p.y == 0), "Failed got (%ld, %ld), expected (0, 0)\n", p.x, p.y); + ok(err == 0xdeadbeef, "Got %lx, expected %x\n", err, 0xdeadbeef);
/* Test ClientToScreen */
@@ -10464,34 +10464,34 @@ static void test_map_points(void) ret = ClientToScreen(NULL, NULL); err = GetLastError(); ok(!ret, "Should fail\n"); - ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %x, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE); + ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %lx, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
SetLastError(0xdeadbeef); p.x = p.y = 100; ret = ClientToScreen(NULL, &p); err = GetLastError(); ok(!ret, "Should fail\n"); - ok(p.x == 100 && p.y == 100, "Failed got(%d, %d), expected (%d, %d)\n", p.x, p.y, 100, 100); - ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %x, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE); + ok(p.x == 100 && p.y == 100, "Failed got(%ld, %ld), expected (%d, %d)\n", p.x, p.y, 100, 100); + ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %lx, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
SetLastError(0xdeadbeef); p.x = p.y = 100; ret = ClientToScreen(dwnd, &p); err = GetLastError(); ok(!ret, "Should fail\n"); - ok(p.x == 100 && p.y == 100, "Failed got(%d, %d), expected (%d, %d)\n", p.x, p.y, 100, 100); - ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %x, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE); + ok(p.x == 100 && p.y == 100, "Failed got(%ld, %ld), expected (%d, %d)\n", p.x, p.y, 100, 100); + ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %lx, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
p.x = p.y = 100; ret = ClientToScreen(wnd, &p); - ok(ret, "Failed with error %u\n", GetLastError()); - ok((p.x == (window_rect.left + 100)) && (p.y == (window_rect.top + 100)), "Failed got (%d, %d), expected (%d, %d)\n", + ok(ret, "Failed with error %lu\n", GetLastError()); + ok((p.x == (window_rect.left + 100)) && (p.y == (window_rect.top + 100)), "Failed got (%ld, %ld), expected (%ld, %ld)\n", p.x, p.y, window_rect.left + 100, window_rect.top + 100);
p.x = p.y = 0; ret = ClientToScreen(wnd0, &p); - ok(ret, "Failed with error %u\n", GetLastError()); - ok((p.x == 0) && (p.y == 0), "Failed got (%d, %d), expected (0, 0)\n", p.x, p.y); + ok(ret, "Failed with error %lu\n", GetLastError()); + ok((p.x == 0) && (p.y == 0), "Failed got (%ld, %ld), expected (0, 0)\n", p.x, p.y);
/* Test ScreenToClient */
@@ -10501,34 +10501,34 @@ static void test_map_points(void) ret = ScreenToClient(NULL, NULL); err = GetLastError(); ok(!ret, "Should fail\n"); - ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %x, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE); + ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %lx, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
SetLastError(0xdeadbeef); p.x = p.y = 100; ret = ScreenToClient(NULL, &p); err = GetLastError(); ok(!ret, "Should fail\n"); - ok(p.x == 100 && p.y == 100, "Failed got(%d, %d), expected (%d, %d)\n", p.x, p.y, 100, 100); - ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %x, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE); + ok(p.x == 100 && p.y == 100, "Failed got(%ld, %ld), expected (%d, %d)\n", p.x, p.y, 100, 100); + ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %lx, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
SetLastError(0xdeadbeef); p.x = p.y = 100; ret = ScreenToClient(dwnd, &p); err = GetLastError(); ok(!ret, "Should fail\n"); - ok(p.x == 100 && p.y == 100, "Failed got(%d, %d), expected (%d, %d)\n", p.x, p.y, 100, 100); - ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %x, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE); + ok(p.x == 100 && p.y == 100, "Failed got(%ld, %ld), expected (%d, %d)\n", p.x, p.y, 100, 100); + ok(err == ERROR_INVALID_WINDOW_HANDLE, "Got %lx, expected %x\n", err, ERROR_INVALID_WINDOW_HANDLE);
p.x = p.y = 100; ret = ScreenToClient(wnd, &p); - ok(ret, "Failed with error %u\n", GetLastError()); - ok((p.x == (-window_rect.left + 100)) && (p.y == (-window_rect.top + 100)), "Failed got(%d, %d), expected (%d, %d)\n", + ok(ret, "Failed with error %lu\n", GetLastError()); + ok((p.x == (-window_rect.left + 100)) && (p.y == (-window_rect.top + 100)), "Failed got(%ld, %ld), expected (%ld, %ld)\n", p.x, p.y, -window_rect.left + 100, -window_rect.top + 100);
p.x = p.y = 0; ret = ScreenToClient(wnd0, &p); - ok(ret, "Failed with error %u\n", GetLastError()); - ok((p.x == 0) && (p.y == 0), "Failed got (%d, %d), expected (0, 0)\n", p.x, p.y); + ok(ret, "Failed with error %lu\n", GetLastError()); + ok((p.x == 0) && (p.y == 0), "Failed got (%ld, %ld), expected (0, 0)\n", p.x, p.y);
DestroyWindow(wnd); DestroyWindow(wnd0); @@ -10668,7 +10668,7 @@ static LRESULT WINAPI smresult_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPARA
/* Send another message while we have a reply queued for the current one. */ res = SendMessageA(data->thread_hwnd, WM_APP+2, 0, lparam); - ok(res == 0x449b0190, "unexpected result %lx\n", res); + ok(res == 0x449b0190, "unexpected result %Ix\n", res);
return 0; } @@ -10766,12 +10766,12 @@ static void test_smresult(void) 100, 100, 200, 200, 0, 0, 0, NULL);
hThread = CreateThread(NULL, 0, smresult_thread_proc, &data, 0, &tid); - ok(hThread != NULL, "CreateThread failed, error %d\n", GetLastError()); + ok(hThread != NULL, "CreateThread failed, error %ld\n", GetLastError());
ok(WaitForSingleObject(data.thread_started, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
res = SendMessageA(data.thread_hwnd, WM_APP, 0, (LPARAM)&data); - ok(res == 0x240408ea, "unexpected result %lx\n", res); + ok(res == 0x240408ea, "unexpected result %Ix\n", res);
SendMessageA(data.thread_hwnd, WM_CLOSE, 0, 0);
@@ -10799,42 +10799,42 @@ static void test_GetMessagePos(void) SetCursorPos(120, 140); flush_events(TRUE); pos = GetMessagePos(); - ok(pos == MAKELONG(120, 140), "pos = %08x\n", pos); + ok(pos == MAKELONG(120, 140), "pos = %08lx\n", pos);
SetCursorPos(340, 320); pos = GetMessagePos(); - ok(pos == MAKELONG(120, 140), "pos = %08x\n", pos); + ok(pos == MAKELONG(120, 140), "pos = %08lx\n", pos);
SendMessageW(button, WM_APP, 0, 0); pos = GetMessagePos(); - ok(pos == MAKELONG(120, 140), "pos = %08x\n", pos); + ok(pos == MAKELONG(120, 140), "pos = %08lx\n", pos);
PostMessageA(button, WM_APP, 0, 0); GetMessageA(&msg, button, 0, 0); ok(msg.message == WM_APP, "msg.message = %x\n", msg.message); pos = GetMessagePos(); - ok(pos == MAKELONG(340, 320), "pos = %08x\n", pos); + ok(pos == MAKELONG(340, 320), "pos = %08lx\n", pos);
PostMessageA(button, WM_APP, 0, 0); SetCursorPos(350, 330); GetMessageA(&msg, button, 0, 0); ok(msg.message == WM_APP, "msg.message = %x\n", msg.message); pos = GetMessagePos(); - ok(pos == MAKELONG(340, 320), "pos = %08x\n", pos); + ok(pos == MAKELONG(340, 320), "pos = %08lx\n", pos);
PostMessageA(button, WM_APP, 0, 0); SetCursorPos(320, 340); PostMessageA(button, WM_APP+1, 0, 0); pos = GetMessagePos(); - ok(pos == MAKELONG(340, 320), "pos = %08x\n", pos); + ok(pos == MAKELONG(340, 320), "pos = %08lx\n", pos); GetMessageA(&msg, button, 0, 0); ok(msg.message == WM_APP, "msg.message = %x\n", msg.message); pos = GetMessagePos(); - ok(pos == MAKELONG(350, 330), "pos = %08x\n", pos); + ok(pos == MAKELONG(350, 330), "pos = %08lx\n", pos); GetMessageA(&msg, button, 0, 0); ok(msg.message == WM_APP+1, "msg.message = %x\n", msg.message); pos = GetMessagePos(); - ok(pos == MAKELONG(320, 340), "pos = %08x\n", pos); + ok(pos == MAKELONG(320, 340), "pos = %08lx\n", pos);
SetTimer(button, 1, 250, NULL); SetCursorPos(330, 350); @@ -10846,7 +10846,7 @@ static void test_GetMessagePos(void) } ok(msg.message == WM_TIMER, "msg.message = %x\n", msg.message); pos = GetMessagePos(); - ok(pos == MAKELONG(330, 350), "pos = %08x\n", pos); + ok(pos == MAKELONG(330, 350), "pos = %08lx\n", pos); KillTimer(button, 1);
DestroyWindow(button); @@ -11085,7 +11085,7 @@ static LRESULT WINAPI winproc_convA(HWND hwnd, UINT msg, WPARAM wparam, LPARAM l { const char *text = (const char*)lparam;
- ok(!wparam, "wparam = %08lx\n", wparam); + ok(!wparam, "wparam = %08Ix\n", wparam); ok(!strcmp(text, "text"), "WM_SETTEXT lparam = %s\n", text); return 1; } @@ -11099,7 +11099,7 @@ static LRESULT WINAPI winproc_convW(HWND hwnd, UINT msg, WPARAM wparam, LPARAM l { const WCHAR *text = (const WCHAR*)lparam;
- ok(!wparam, "wparam = %08lx\n", wparam); + ok(!wparam, "wparam = %08Ix\n", wparam); ok(!lstrcmpW(text, textW), "WM_SETTEXT lparam = %s\n", wine_dbgstr_w(text)); return 1; } @@ -11122,10 +11122,10 @@ static void test_winproc_handles(const char *argv0) wnd_classA.lpszClassName = "winproc_test"; wnd_classA.lpfnWndProc = winproc; ret = RegisterClassA(&wnd_classA); - ok(ret, "RegisterClass failed with error %d\n", GetLastError()); + ok(ret, "RegisterClass failed with error %ld\n", GetLastError());
ret = GetClassInfoW(hinst, winproc_testW, &wnd_classW); - ok(ret, "GetClassInfoW failed with error %d\n", GetLastError()); + ok(ret, "GetClassInfoW failed with error %ld\n", GetLastError()); ok(wnd_classA.lpfnWndProc != wnd_classW.lpfnWndProc, "winproc pointers should not be identical\n");
@@ -11137,7 +11137,7 @@ static void test_winproc_handles(const char *argv0) ok(count == 1, "winproc should be called once (%d)\n", count);
ret = UnregisterClassW(winproc_testW, hinst); - ok(ret, "UnregisterClass failed with error %d\n", GetLastError()); + ok(ret, "UnregisterClass failed with error %ld\n", GetLastError());
/* crashes on 64-bit windows because lpfnWndProc handle is already freed */ if (sizeof(void*) == 4) @@ -11184,12 +11184,12 @@ static void test_winproc_limit(void) ok(i != 0xffff, "unable to run out of winproc slots\n");
ret = SetWindowLongPtrA(hwnd, GWLP_WNDPROC, (LONG_PTR)winproc_convA); - ok(ret, "SetWindowLongPtr failed with error %d\n", GetLastError()); + ok(ret, "SetWindowLongPtr failed with error %ld\n", GetLastError()); ok(SendMessageA(hwnd, WM_SETTEXT, 0, (LPARAM)"text"), "WM_SETTEXT failed\n"); ok(SendMessageW(hwnd, WM_SETTEXT, 0, (LPARAM)textW), "WM_SETTEXT with conversion failed\n");
ret = SetWindowLongPtrW(hwnd, GWLP_WNDPROC, (LONG_PTR)winproc_convW); - ok(ret, "SetWindowLongPtr failed with error %d\n", GetLastError()); + ok(ret, "SetWindowLongPtr failed with error %ld\n", GetLastError()); ok(SendMessageA(hwnd, WM_SETTEXT, 0, (LPARAM)"text"), "WM_SETTEXT failed\n"); ok(SendMessageW(hwnd, WM_SETTEXT, 0, (LPARAM)textW), "WM_SETTEXT with conversion failed\n");
@@ -11231,21 +11231,21 @@ static void test_deferwindowpos(void) hdwp2 = DeferWindowPos(NULL, NULL, NULL, 0, 0, 10, 10, 0); todo_wine ok(hdwp2 == NULL && ((GetLastError() == ERROR_INVALID_DWP_HANDLE) || - broken(GetLastError() == ERROR_INVALID_WINDOW_HANDLE) /* before win8 */), "got %p, error %d\n", hdwp2, GetLastError()); + broken(GetLastError() == ERROR_INVALID_WINDOW_HANDLE) /* before win8 */), "got %p, error %ld\n", hdwp2, GetLastError());
hdwp2 = DeferWindowPos((HDWP)0xdead, GetDesktopWindow(), NULL, 0, 0, 10, 10, 0); todo_wine ok(hdwp2 == NULL && ((GetLastError() == ERROR_INVALID_DWP_HANDLE) || - broken(GetLastError() == ERROR_INVALID_WINDOW_HANDLE) /* before win8 */), "got %p, error %d\n", hdwp2, GetLastError()); + broken(GetLastError() == ERROR_INVALID_WINDOW_HANDLE) /* before win8 */), "got %p, error %ld\n", hdwp2, GetLastError());
hdwp2 = DeferWindowPos(hdwp, NULL, NULL, 0, 0, 10, 10, 0); - ok(hdwp2 == NULL && GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "got %p, error %d\n", hdwp2, GetLastError()); + ok(hdwp2 == NULL && GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "got %p, error %ld\n", hdwp2, GetLastError());
hdwp2 = DeferWindowPos(hdwp, GetDesktopWindow(), NULL, 0, 0, 10, 10, 0); - ok(hdwp2 == NULL && GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "got %p, error %d\n", hdwp2, GetLastError()); + ok(hdwp2 == NULL && GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "got %p, error %ld\n", hdwp2, GetLastError());
hdwp2 = DeferWindowPos(hdwp, (HWND)0xdead, NULL, 0, 0, 10, 10, 0); - ok(hdwp2 == NULL && GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "got %p, error %d\n", hdwp2, GetLastError()); + ok(hdwp2 == NULL && GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "got %p, error %ld\n", hdwp2, GetLastError());
ret = EndDeferWindowPos(hdwp); ok(ret, "got %d\n", ret); @@ -11254,7 +11254,7 @@ static void test_deferwindowpos(void)
hwnd = create_tool_window(WS_POPUP, 0); hdwp2 = DeferWindowPos(hdwp, hwnd, NULL, 0, 0, 10, 10, 0); - ok(hdwp2 != NULL, "got %p, error %d\n", hdwp2, GetLastError()); + ok(hdwp2 != NULL, "got %p, error %ld\n", hdwp2, GetLastError()); DestroyWindow(hwnd);
ret = EndDeferWindowPos(hdwp); @@ -11309,7 +11309,7 @@ static void test_LockWindowUpdate(HWND parent) COLORREF c = GetPixel(hdc, p.x, p.y); \ COLORREF e = tests[i].expect_valid ? (c_valid) : (c_invalid); \ todo_wine_if(!tests[i].expect_valid) \ - ok(c == e, "%u: GetPixel: got %08x, expected %08x\n", i, c, e); \ + ok(c == e, "%u: GetPixel: got %08lx, expected %08lx\n", i, c, e); \ } while (0)
SetPixel(hdc, p.x, p.y, c1); @@ -11563,13 +11563,13 @@ static void test_desktop( void ) { SetLastError( 0xdeadbeef ); result = GetWindowLongPtrW( desktop, tests[i].offset ); - ok( result == tests[i].expect, "offset %d, got %08lx expect %08lx\n", + ok( result == tests[i].expect, "offset %d, got %08Ix expect %08Ix\n", tests[i].offset, result, tests[i].expect ); if (tests[i].error) - ok( GetLastError() == tests[i].error, "offset %d: error %d expect %d\n", + ok( GetLastError() == tests[i].error, "offset %d: error %ld expect %ld\n", tests[i].offset, GetLastError(), tests[i].error ); else - ok( GetLastError() == 0xdeadbeef, "offset %d: error %d expect unchanged\n", + ok( GetLastError() == 0xdeadbeef, "offset %d: error %ld expect unchanged\n", tests[i].offset, GetLastError() ); } } @@ -11611,7 +11611,7 @@ static void test_topmost(void)
owner = create_tool_window(WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE, 0); - ok(owner != 0, "Failed to create owner window (%d)\n", GetLastError()); + ok(owner != 0, "Failed to create owner window (%ld)\n", GetLastError());
/* Give current thread foreground state otherwise the tests may fail. */ if (!SetForegroundWindow(owner)) @@ -11623,10 +11623,10 @@ static void test_topmost(void)
hwnd = create_tool_window(WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE, owner); - ok(hwnd != 0, "Failed to create popup window (%d)\n", GetLastError()); + ok(hwnd != 0, "Failed to create popup window (%ld)\n", GetLastError()); hwnd2 = create_tool_window(WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE, owner); - ok(hwnd2 != 0, "Failed to create popup window (%d)\n", GetLastError()); + ok(hwnd2 != 0, "Failed to create popup window (%ld)\n", GetLastError());
flush_events( TRUE );
@@ -11733,11 +11733,11 @@ static void test_topmost(void) reset_window_state(state, ARRAY_SIZE(state));
hwnd_child2 = create_tool_window(WS_VISIBLE|WS_POPUP, hwnd); - ok(hwnd_child2 != 0, "Failed to create popup window (%d)\n", GetLastError()); + ok(hwnd_child2 != 0, "Failed to create popup window (%ld)\n", GetLastError()); hwnd_child = create_tool_window(WS_VISIBLE|WS_POPUP, hwnd); - ok(hwnd_child != 0, "Failed to create popup window (%d)\n", GetLastError()); + ok(hwnd_child != 0, "Failed to create popup window (%ld)\n", GetLastError()); hwnd_grandchild = create_tool_window(WS_VISIBLE|WS_POPUP, hwnd_child); - ok(hwnd_grandchild != 0, "Failed to create popup window (%d)\n", GetLastError()); + ok(hwnd_grandchild != 0, "Failed to create popup window (%ld)\n", GetLastError());
flush_events( TRUE );
@@ -11978,70 +11978,70 @@ static void test_display_affinity( HWND win )
ret = pGetWindowDisplayAffinity(NULL, NULL); ok(!ret, "GetWindowDisplayAffinity succeeded\n"); - ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "Expected ERROR_INVALID_WINDOW_HANDLE, got %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "Expected ERROR_INVALID_WINDOW_HANDLE, got %lu\n", GetLastError());
ret = pGetWindowDisplayAffinity(NULL, &affinity); ok(!ret, "GetWindowDisplayAffinity succeeded\n"); - ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "Expected ERROR_INVALID_WINDOW_HANDLE, got %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "Expected ERROR_INVALID_WINDOW_HANDLE, got %lu\n", GetLastError());
ret = pGetWindowDisplayAffinity(win, NULL); ok(!ret, "GetWindowDisplayAffinity succeeded\n"); - ok(GetLastError() == ERROR_NOACCESS, "Expected ERROR_NOACCESS, got %u\n", GetLastError()); + ok(GetLastError() == ERROR_NOACCESS, "Expected ERROR_NOACCESS, got %lu\n", GetLastError());
styleex = GetWindowLongW(win, GWL_EXSTYLE); SetWindowLongW(win, GWL_EXSTYLE, styleex & ~WS_EX_LAYERED);
affinity = 0xdeadbeef; ret = pGetWindowDisplayAffinity(win, &affinity); - ok(ret, "GetWindowDisplayAffinity failed with %u\n", GetLastError()); - ok(affinity == WDA_NONE, "Expected WDA_NONE, got 0x%x\n", affinity); + ok(ret, "GetWindowDisplayAffinity failed with %lu\n", GetLastError()); + ok(affinity == WDA_NONE, "Expected WDA_NONE, got 0x%lx\n", affinity);
/* Windows 7 fails with ERROR_NOT_ENOUGH_MEMORY when dwm compositing is disabled */ ret = pSetWindowDisplayAffinity(win, WDA_MONITOR); ok(ret || GetLastError() == ERROR_NOT_ENOUGH_MEMORY, - "SetWindowDisplayAffinity failed with %u\n", GetLastError()); + "SetWindowDisplayAffinity failed with %lu\n", GetLastError()); dwm = ret;
affinity = 0xdeadbeef; ret = pGetWindowDisplayAffinity(win, &affinity); - ok(ret, "GetWindowDisplayAffinity failed with %u\n", GetLastError()); - if (dwm) ok(affinity == WDA_MONITOR, "Expected WDA_MONITOR, got 0x%x\n", affinity); - else ok(affinity == WDA_NONE, "Expected WDA_NONE, got 0x%x\n", affinity); + ok(ret, "GetWindowDisplayAffinity failed with %lu\n", GetLastError()); + if (dwm) ok(affinity == WDA_MONITOR, "Expected WDA_MONITOR, got 0x%lx\n", affinity); + else ok(affinity == WDA_NONE, "Expected WDA_NONE, got 0x%lx\n", affinity);
ret = pSetWindowDisplayAffinity(win, WDA_NONE); ok(ret || GetLastError() == ERROR_NOT_ENOUGH_MEMORY, - "SetWindowDisplayAffinity failed with %u\n", GetLastError()); + "SetWindowDisplayAffinity failed with %lu\n", GetLastError());
affinity = 0xdeadbeef; ret = pGetWindowDisplayAffinity(win, &affinity); - ok(ret, "GetWindowDisplayAffinity failed with %u\n", GetLastError()); - ok(affinity == WDA_NONE, "Expected WDA_NONE, got 0x%x\n", affinity); + ok(ret, "GetWindowDisplayAffinity failed with %lu\n", GetLastError()); + ok(affinity == WDA_NONE, "Expected WDA_NONE, got 0x%lx\n", affinity);
SetWindowLongW(win, GWL_EXSTYLE, styleex | WS_EX_LAYERED);
affinity = 0xdeadbeef; ret = pGetWindowDisplayAffinity(win, &affinity); - ok(ret, "GetWindowDisplayAffinity failed with %u\n", GetLastError()); - ok(affinity == WDA_NONE, "Expected WDA_NONE, got 0x%x\n", affinity); + ok(ret, "GetWindowDisplayAffinity failed with %lu\n", GetLastError()); + ok(affinity == WDA_NONE, "Expected WDA_NONE, got 0x%lx\n", affinity);
ret = pSetWindowDisplayAffinity(win, WDA_MONITOR); ok(ret || GetLastError() == ERROR_NOT_ENOUGH_MEMORY, - "SetWindowDisplayAffinity failed with %u\n", GetLastError()); + "SetWindowDisplayAffinity failed with %lu\n", GetLastError());
affinity = 0xdeadbeef; ret = pGetWindowDisplayAffinity(win, &affinity); - ok(ret, "GetWindowDisplayAffinity failed with %u\n", GetLastError()); - if (dwm) ok(affinity == WDA_MONITOR, "Expected WDA_MONITOR, got 0x%x\n", affinity); - else ok(affinity == WDA_NONE, "Expected WDA_NONE, got 0x%x\n", affinity); + ok(ret, "GetWindowDisplayAffinity failed with %lu\n", GetLastError()); + if (dwm) ok(affinity == WDA_MONITOR, "Expected WDA_MONITOR, got 0x%lx\n", affinity); + else ok(affinity == WDA_NONE, "Expected WDA_NONE, got 0x%lx\n", affinity);
ret = pSetWindowDisplayAffinity(win, WDA_NONE); ok(ret || GetLastError() == ERROR_NOT_ENOUGH_MEMORY, - "SetWindowDisplayAffinity failed with %u\n", GetLastError()); + "SetWindowDisplayAffinity failed with %lu\n", GetLastError());
affinity = 0xdeadbeef; ret = pGetWindowDisplayAffinity(win, &affinity); - ok(ret, "GetWindowDisplayAffinity failed with %u\n", GetLastError()); - ok(affinity == WDA_NONE, "Expected WDA_NONE, got 0x%x\n", affinity); + ok(ret, "GetWindowDisplayAffinity failed with %lu\n", GetLastError()); + ok(affinity == WDA_NONE, "Expected WDA_NONE, got 0x%lx\n", affinity);
SetWindowLongW(win, GWL_EXSTYLE, styleex); } @@ -12109,7 +12109,7 @@ static DWORD CALLBACK destroy_thread1(void *user) destroy_data.thread1_wnd = CreateWindowExA(0, "destroy_test_thread1", "destroy test thread", WS_CHILD, 100, 100, 100, 100, destroy_data.main_wnd, 0, GetModuleHandleA(NULL), NULL); - ok(destroy_data.thread1_wnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError()); + ok(destroy_data.thread1_wnd != NULL, "CreateWindowEx failed with error %ld\n", GetLastError()); PostThreadMessageW(destroy_data.main_tid, WM_USER, 0, 0);
while (GetMessageA(&msg, 0, 0, 0)) @@ -12130,7 +12130,7 @@ static DWORD CALLBACK destroy_thread2(void *user) destroy_data.thread2_wnd = CreateWindowExA(0, "destroy_test_thread2", "destroy test thread", WS_CHILD, 100, 100, 100, 100, destroy_data.main_wnd, 0, GetModuleHandleA(NULL), NULL); - ok(destroy_data.thread2_wnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError()); + ok(destroy_data.thread2_wnd != NULL, "CreateWindowEx failed with error %ld\n", GetLastError());
PostThreadMessageW(destroy_data.main_tid, WM_USER + 1, 0, 0); Sleep( 100 ); @@ -12160,22 +12160,22 @@ static void test_destroy_quit(void) wnd_classA.lpszClassName = "destroy_test_main"; wnd_classA.lpfnWndProc = destroy_main_wndproc; ret = RegisterClassA(&wnd_classA); - ok(ret, "RegisterClass failed with error %d\n", GetLastError()); + ok(ret, "RegisterClass failed with error %ld\n", GetLastError());
wnd_classA.lpszClassName = "destroy_test_thread1"; wnd_classA.lpfnWndProc = destroy_thread1_wndproc; ret = RegisterClassA(&wnd_classA); - ok(ret, "RegisterClass failed with error %d\n", GetLastError()); + ok(ret, "RegisterClass failed with error %ld\n", GetLastError());
wnd_classA.lpszClassName = "destroy_test_thread2"; wnd_classA.lpfnWndProc = destroy_thread2_wndproc; ret = RegisterClassA(&wnd_classA); - ok(ret, "RegisterClass failed with error %d\n", GetLastError()); + ok(ret, "RegisterClass failed with error %ld\n", GetLastError());
destroy_data.main_wnd = CreateWindowExA(0, "destroy_test_main", "destroy test main", WS_OVERLAPPED | WS_CAPTION, 100, 100, 100, 100, 0, 0, GetModuleHandleA(NULL), NULL); - ok(destroy_data.main_wnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError()); + ok(destroy_data.main_wnd != NULL, "CreateWindowEx failed with error %ld\n", GetLastError()); if (!destroy_data.main_wnd) { CloseHandle(destroy_data.evt); @@ -12243,141 +12243,141 @@ static void test_window_placement(void)
hwnd = CreateWindowA("MainWindowClass", "wp", WS_OVERLAPPEDWINDOW, orig.left, orig.top, orig.right - orig.left, orig.bottom - orig.top, 0, 0, 0, 0); - ok(!!hwnd, "failed to create window, error %u\n", GetLastError()); + ok(!!hwnd, "failed to create window, error %lu\n", GetLastError());
mon_info.cbSize = sizeof(mon_info); GetMonitorInfoW(MonitorFromWindow(hwnd, MONITOR_DEFAULTTOPRIMARY), &mon_info); work_rect = mon_info.rcWork;
ret = GetWindowPlacement(hwnd, &wp); - ok(ret, "failed to get window placement, error %u\n", GetLastError()); + ok(ret, "failed to get window placement, error %lu\n", GetLastError()); ok(wp.showCmd == SW_SHOWNORMAL, "got show cmd %u\n", wp.showCmd); ok(wp.ptMinPosition.x == -1 && wp.ptMinPosition.y == -1, - "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); + "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1, - "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); + "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n", wine_dbgstr_rect(&wp.rcNormalPosition));
ShowWindow(hwnd, SW_MINIMIZE);
ret = GetWindowPlacement(hwnd, &wp); - ok(ret, "failed to get window placement, error %u\n", GetLastError()); + ok(ret, "failed to get window placement, error %lu\n", GetLastError()); ok(!wp.flags, "got flags %#x\n", wp.flags); ok(wp.showCmd == SW_SHOWMINIMIZED, "got show cmd %u\n", wp.showCmd); ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000, - "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); + "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1, - "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); + "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n", wine_dbgstr_rect(&wp.rcNormalPosition));
ShowWindow(hwnd, SW_RESTORE);
ret = GetWindowPlacement(hwnd, &wp); - ok(ret, "failed to get window placement, error %u\n", GetLastError()); + ok(ret, "failed to get window placement, error %lu\n", GetLastError()); ok(wp.showCmd == SW_SHOWNORMAL, "got show cmd %u\n", wp.showCmd); ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000, - "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); + "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1, - "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); + "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n", wine_dbgstr_rect(&wp.rcNormalPosition));
ShowWindow(hwnd, SW_MAXIMIZE);
ret = GetWindowPlacement(hwnd, &wp); - ok(ret, "failed to get window placement, error %u\n", GetLastError()); + ok(ret, "failed to get window placement, error %lu\n", GetLastError()); ok(wp.showCmd == SW_SHOWMAXIMIZED, "got show cmd %u\n", wp.showCmd); ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000, - "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); + "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1, - "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); + "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n", wine_dbgstr_rect(&wp.rcNormalPosition));
SetWindowPos(hwnd, 0, 100, 100, 100, 100, SWP_NOZORDER | SWP_NOACTIVATE);
ret = GetWindowPlacement(hwnd, &wp); - ok(ret, "failed to get window placement, error %u\n", GetLastError()); + ok(ret, "failed to get window placement, error %lu\n", GetLastError()); ok(wp.showCmd == SW_SHOWMAXIMIZED, "got show cmd %u\n", wp.showCmd); ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000, - "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); + "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); ok(wp.ptMaxPosition.x == 100 && wp.ptMaxPosition.y == 100, - "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); + "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n", wine_dbgstr_rect(&wp.rcNormalPosition));
SetWindowPos(hwnd, 0, work_rect.left, work_rect.top, work_rect.right - work_rect.left, work_rect.bottom - work_rect.top, SWP_NOZORDER | SWP_NOACTIVATE); ret = GetWindowPlacement(hwnd, &wp); - ok(ret, "failed to get window placement, error %u\n", GetLastError()); + ok(ret, "failed to get window placement, error %lu\n", GetLastError()); ok(wp.showCmd == SW_SHOWMAXIMIZED, "got show cmd %u\n", wp.showCmd); ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000, - "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); + "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1, - "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); + "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n", wine_dbgstr_rect(&wp.rcNormalPosition));
SetWindowPos(hwnd, 0, work_rect.left, work_rect.top, work_rect.right - work_rect.left - 1, work_rect.bottom - work_rect.top, SWP_NOZORDER | SWP_NOACTIVATE); ret = GetWindowPlacement(hwnd, &wp); - ok(ret, "failed to get window placement, error %u\n", GetLastError()); + ok(ret, "failed to get window placement, error %lu\n", GetLastError()); ok(wp.showCmd == SW_SHOWMAXIMIZED, "got show cmd %u\n", wp.showCmd); ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000, - "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); + "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); ok(wp.ptMaxPosition.x == work_rect.left && wp.ptMaxPosition.y == work_rect.top, - "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); + "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n", wine_dbgstr_rect(&wp.rcNormalPosition));
SetWindowPos(hwnd, 0, work_rect.left, work_rect.top, work_rect.right - work_rect.left, work_rect.bottom - work_rect.top - 1, SWP_NOZORDER | SWP_NOACTIVATE); ret = GetWindowPlacement(hwnd, &wp); - ok(ret, "failed to get window placement, error %u\n", GetLastError()); + ok(ret, "failed to get window placement, error %lu\n", GetLastError()); ok(wp.showCmd == SW_SHOWMAXIMIZED, "got show cmd %u\n", wp.showCmd); ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000, - "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); + "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); ok(wp.ptMaxPosition.x == work_rect.left && wp.ptMaxPosition.y == work_rect.top, - "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); + "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n", wine_dbgstr_rect(&wp.rcNormalPosition));
ShowWindow(hwnd, SW_MINIMIZE);
ret = GetWindowPlacement(hwnd, &wp); - ok(ret, "failed to get window placement, error %u\n", GetLastError()); + ok(ret, "failed to get window placement, error %lu\n", GetLastError()); ok(wp.flags == WPF_RESTORETOMAXIMIZED, "got flags %#x\n", wp.flags); ok(wp.showCmd == SW_SHOWMINIMIZED, "got show cmd %u\n", wp.showCmd); ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000, - "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); + "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1, - "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); + "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n", wine_dbgstr_rect(&wp.rcNormalPosition));
ShowWindow(hwnd, SW_RESTORE);
ret = GetWindowPlacement(hwnd, &wp); - ok(ret, "failed to get window placement, error %u\n", GetLastError()); + ok(ret, "failed to get window placement, error %lu\n", GetLastError()); ok(wp.showCmd == SW_SHOWMAXIMIZED, "got show cmd %u\n", wp.showCmd); ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000, - "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); + "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1, - "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); + "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n", wine_dbgstr_rect(&wp.rcNormalPosition));
ShowWindow(hwnd, SW_RESTORE);
ret = GetWindowPlacement(hwnd, &wp); - ok(ret, "failed to get window placement, error %u\n", GetLastError()); + ok(ret, "failed to get window placement, error %lu\n", GetLastError()); ok(wp.showCmd == SW_SHOWNORMAL, "got show cmd %u\n", wp.showCmd); ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000, - "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); + "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1, - "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); + "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n", wine_dbgstr_rect(&wp.rcNormalPosition));
@@ -12386,15 +12386,15 @@ static void test_window_placement(void) wp.ptMaxPosition.x = wp.ptMaxPosition.y = 100; wp.rcNormalPosition = orig2; ret = SetWindowPlacement(hwnd, &wp); - ok(ret, "failed to set window placement, error %u\n", GetLastError()); + ok(ret, "failed to set window placement, error %lu\n", GetLastError());
ret = GetWindowPlacement(hwnd, &wp); - ok(ret, "failed to get window placement, error %u\n", GetLastError()); + ok(ret, "failed to get window placement, error %lu\n", GetLastError()); ok(wp.showCmd == SW_SHOWNORMAL, "got show cmd %u\n", wp.showCmd); ok(wp.ptMinPosition.x == 100 && wp.ptMinPosition.y == 100, - "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); + "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1, - "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); + "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); ok(EqualRect(&wp.rcNormalPosition, &orig2), "got normal pos %s\n", wine_dbgstr_rect(&wp.rcNormalPosition)); GetWindowRect(hwnd, &rect); @@ -12403,13 +12403,13 @@ static void test_window_placement(void) ShowWindow(hwnd, SW_MINIMIZE);
ret = GetWindowPlacement(hwnd, &wp); - ok(ret, "failed to get window placement, error %u\n", GetLastError()); + ok(ret, "failed to get window placement, error %lu\n", GetLastError()); ok(!wp.flags, "got flags %#x\n", wp.flags); ok(wp.showCmd == SW_SHOWMINIMIZED, "got show cmd %u\n", wp.showCmd); ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000, - "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); + "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1, - "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); + "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); ok(EqualRect(&wp.rcNormalPosition, &orig2), "got normal pos %s\n", wine_dbgstr_rect(&wp.rcNormalPosition));
@@ -12421,16 +12421,16 @@ static void test_window_placement(void) wp.ptMaxPosition.x = wp.ptMaxPosition.y = 100; wp.rcNormalPosition = orig; ret = SetWindowPlacement(hwnd, &wp); - ok(ret, "failed to set window placement, error %u\n", GetLastError()); + ok(ret, "failed to set window placement, error %lu\n", GetLastError());
ret = GetWindowPlacement(hwnd, &wp); - ok(ret, "failed to get window placement, error %u\n", GetLastError()); + ok(ret, "failed to get window placement, error %lu\n", GetLastError()); ok(!wp.flags, "got flags %#x\n", wp.flags); ok(wp.showCmd == SW_SHOWMINIMIZED, "got show cmd %u\n", wp.showCmd); ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000, - "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); + "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1, - "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); + "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n", wine_dbgstr_rect(&wp.rcNormalPosition));
@@ -12442,15 +12442,15 @@ static void test_window_placement(void) wp.ptMaxPosition.x = wp.ptMaxPosition.y = 100; wp.rcNormalPosition = orig; ret = SetWindowPlacement(hwnd, &wp); - ok(ret, "failed to set window placement, error %u\n", GetLastError()); + ok(ret, "failed to set window placement, error %lu\n", GetLastError());
ret = GetWindowPlacement(hwnd, &wp); - ok(ret, "failed to get window placement, error %u\n", GetLastError()); + ok(ret, "failed to get window placement, error %lu\n", GetLastError()); ok(wp.showCmd == SW_SHOWMAXIMIZED, "got show cmd %u\n", wp.showCmd); ok(wp.ptMinPosition.x == 100 && wp.ptMinPosition.y == 100, - "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); + "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1, - "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); + "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n", wine_dbgstr_rect(&wp.rcNormalPosition));
@@ -12460,30 +12460,30 @@ static void test_window_placement(void) wp.ptMaxPosition.x = wp.ptMaxPosition.y = 100; wp.rcNormalPosition = orig; ret = SetWindowPlacement(hwnd, &wp); - ok(ret, "failed to set window placement, error %u\n", GetLastError()); + ok(ret, "failed to set window placement, error %lu\n", GetLastError());
ShowWindow(hwnd, SW_MINIMIZE);
ret = GetWindowPlacement(hwnd, &wp); - ok(ret, "failed to get window placement, error %u\n", GetLastError()); + ok(ret, "failed to get window placement, error %lu\n", GetLastError()); ok(wp.showCmd == SW_SHOWMINIMIZED, "got show cmd %u\n", wp.showCmd); ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000, - "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); + "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1, - "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); + "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n", wine_dbgstr_rect(&wp.rcNormalPosition));
ret = SetWindowPos(hwnd, NULL, 100, 100, 151, 151, SWP_NOACTIVATE | SWP_NOZORDER); - ok(ret, "failed to set window pos, error %u\n", GetLastError()); + ok(ret, "failed to set window pos, error %lu\n", GetLastError());
ret = GetWindowPlacement(hwnd, &wp); - ok(ret, "failed to get window placement, error %u\n", GetLastError()); + ok(ret, "failed to get window placement, error %lu\n", GetLastError()); ok(wp.showCmd == SW_SHOWMINIMIZED, "got show cmd %u\n", wp.showCmd); ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000, - "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); + "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1, - "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); + "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n", wine_dbgstr_rect(&wp.rcNormalPosition)); GetWindowRect(hwnd, &rect); @@ -12492,12 +12492,12 @@ static void test_window_placement(void) ShowWindow(hwnd, SW_SHOWNORMAL);
ret = GetWindowPlacement(hwnd, &wp); - ok(ret, "failed to get window placement, error %u\n", GetLastError()); + ok(ret, "failed to get window placement, error %lu\n", GetLastError()); ok(wp.showCmd == SW_NORMAL, "got show cmd %u\n", wp.showCmd); ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000, - "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); + "got minimized pos (%ld,%ld)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1, - "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); + "got maximized pos (%ld,%ld)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n", wine_dbgstr_rect(&wp.rcNormalPosition)); GetWindowRect(hwnd, &rect); @@ -12517,7 +12517,7 @@ static void test_arrange_iconic_windows(void)
parent = CreateWindowA("MainWindowClass", "parent", WS_OVERLAPPEDWINDOW, 100, 200, 500, 300, NULL, 0, 0, NULL); - ok(!!parent, "failed to create window, error %u\n", GetLastError()); + ok(!!parent, "failed to create window, error %lu\n", GetLastError());
GetClientRect(parent, &parent_rect); ClientToScreen(parent, &pt); @@ -12528,25 +12528,25 @@ static void test_arrange_iconic_windows(void) mm.iVertGap = 3; mm.iArrange = ARW_TOPLEFT | ARW_RIGHT; ret = SystemParametersInfoA(SPI_SETMINIMIZEDMETRICS, sizeof(mm), &mm, 0); - ok(ret, "failed to set minimized metrics, error %u\n", GetLastError()); + ok(ret, "failed to set minimized metrics, error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = ArrangeIconicWindows(parent); ok(!ret, "wrong ret %u\n", ret); - ok(GetLastError() == 0xdeadbeef, "wrong error %u\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "wrong error %lu\n", GetLastError());
for (i = 0; i < ARRAY_SIZE(hwnds); ++i) { hwnds[i] = CreateWindowA("MainWindowClass", "child", WS_CHILD | WS_OVERLAPPEDWINDOW, orig.left, orig.top, orig.right - orig.left, orig.bottom - orig.top, parent, 0, 0, NULL); - ok(!!hwnds[i], "failed to create window %u, error %u\n", i, GetLastError()); + ok(!!hwnds[i], "failed to create window %u, error %lu\n", i, GetLastError()); }
SetLastError(0xdeadbeef); ret = ArrangeIconicWindows(parent); ok(!ret, "wrong ret %u\n", ret); - ok(GetLastError() == 0xdeadbeef, "wrong error %u\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "wrong error %lu\n", GetLastError());
for (i = 0; i < ARRAY_SIZE(hwnds); ++i) { @@ -12563,7 +12563,7 @@ static void test_arrange_iconic_windows(void) { ret = SetWindowPos(hwnds[i], 0, orig.left, orig.top, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE); - ok(ret, "hwnd %u: failed to move window, error %u\n", i, GetLastError()); + ok(ret, "hwnd %u: failed to move window, error %lu\n", i, GetLastError()); }
ret = ArrangeIconicWindows(parent); @@ -12590,7 +12590,7 @@ static void test_arrange_iconic_windows(void) ShowWindow(hwnds[i], SW_MINIMIZE); ret = SetWindowPos(hwnds[i], 0, orig.left, orig.top, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE); - ok(ret, "hwnd %u: failed to move window, error %u\n", i, GetLastError()); + ok(ret, "hwnd %u: failed to move window, error %lu\n", i, GetLastError()); }
ret = ArrangeIconicWindows(parent); @@ -12619,13 +12619,13 @@ static void test_arrange_iconic_windows(void) mm.iArrange = ARW_BOTTOMRIGHT | ARW_UP; mm.iVertGap = 10; ret = SystemParametersInfoA(SPI_SETMINIMIZEDMETRICS, sizeof(mm), &mm, 0); - ok(ret, "failed to set minimized metrics, error %u\n", GetLastError()); + ok(ret, "failed to set minimized metrics, error %lu\n", GetLastError());
for (i = 0; i < ARRAY_SIZE(hwnds); ++i) { ret = SetWindowPos(hwnds[i], 0, orig.left, orig.top, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE); - ok(ret, "hwnd %u: failed to move window, error %u\n", i, GetLastError()); + ok(ret, "hwnd %u: failed to move window, error %lu\n", i, GetLastError()); }
ret = ArrangeIconicWindows(parent); @@ -12656,7 +12656,7 @@ static void test_arrange_iconic_windows(void) DestroyWindow(parent);
ret = SystemParametersInfoA(SPI_SETMINIMIZEDMETRICS, sizeof(oldmm), &oldmm, 0); - ok(ret, "failed to restore minimized metrics, error %u\n", GetLastError()); + ok(ret, "failed to restore minimized metrics, error %lu\n", GetLastError()); }
static void other_process_proc(HWND hwnd) @@ -12672,36 +12672,36 @@ static void other_process_proc(HWND hwnd)
/* SW_SHOW */ ret = WaitForSingleObject(window_ready_event, 5000); - ok(ret == WAIT_OBJECT_0, "Unexpected ret %x.\n", ret); + ok(ret == WAIT_OBJECT_0, "Unexpected ret %lx.\n", ret); ret = GetWindowPlacement(hwnd, &wp); - ok(ret, "Unexpected ret %#x.\n", ret); + ok(ret, "Unexpected ret %#lx.\n", ret); ok(wp.showCmd == SW_SHOWNORMAL, "Unexpected showCmd %#x.\n", wp.showCmd); ok(!wp.flags, "Unexpected flags %#x.\n", wp.flags); SetEvent(test_done_event);
/* SW_SHOWMAXIMIZED */ ret = WaitForSingleObject(window_ready_event, 5000); - ok(ret == WAIT_OBJECT_0, "Unexpected ret %x.\n", ret); + ok(ret == WAIT_OBJECT_0, "Unexpected ret %lx.\n", ret); ret = GetWindowPlacement(hwnd, &wp); - ok(ret, "Unexpected ret %#x.\n", ret); + ok(ret, "Unexpected ret %#lx.\n", ret); ok(wp.showCmd == SW_SHOWMAXIMIZED, "Unexpected showCmd %#x.\n", wp.showCmd); todo_wine ok(wp.flags == WPF_RESTORETOMAXIMIZED, "Unexpected flags %#x.\n", wp.flags); SetEvent(test_done_event);
/* SW_SHOWMINIMIZED */ ret = WaitForSingleObject(window_ready_event, 5000); - ok(ret == WAIT_OBJECT_0, "Unexpected ret %x.\n", ret); + ok(ret == WAIT_OBJECT_0, "Unexpected ret %lx.\n", ret); ret = GetWindowPlacement(hwnd, &wp); - ok(ret, "Unexpected ret %#x.\n", ret); + ok(ret, "Unexpected ret %#lx.\n", ret); ok(wp.showCmd == SW_SHOWMINIMIZED, "Unexpected showCmd %#x.\n", wp.showCmd); todo_wine ok(wp.flags == WPF_RESTORETOMAXIMIZED, "Unexpected flags %#x.\n", wp.flags); SetEvent(test_done_event);
/* SW_RESTORE */ ret = WaitForSingleObject(window_ready_event, 5000); - ok(ret == WAIT_OBJECT_0, "Unexpected ret %x.\n", ret); + ok(ret == WAIT_OBJECT_0, "Unexpected ret %lx.\n", ret); ret = GetWindowPlacement(hwnd, &wp); - ok(ret, "Unexpected ret %#x.\n", ret); + ok(ret, "Unexpected ret %#lx.\n", ret); ok(wp.showCmd == SW_SHOWMAXIMIZED, "Unexpected showCmd %#x.\n", wp.showCmd); todo_wine ok(wp.flags == WPF_RESTORETOMAXIMIZED, "Unexpected flags %#x.\n", wp.flags); SetEvent(test_done_event); @@ -12721,10 +12721,10 @@ static void test_SC_SIZE(void) ok(!!hwnd, "CreateWindowEx failed.\n");
GetWindowRect(hwnd, &rect); - ok(rect.left == 100, "rect.left = %d\n", rect.left); - ok(rect.top == 100, "rect.top = %d\n", rect.top); - ok(rect.right == 200, "rect.right = %d\n", rect.right); - ok(rect.bottom == 200, "rect.bottom = %d\n", rect.bottom); + ok(rect.left == 100, "rect.left = %ld\n", rect.left); + ok(rect.top == 100, "rect.top = %ld\n", rect.top); + ok(rect.right == 200, "rect.right = %ld\n", rect.right); + ok(rect.bottom == 200, "rect.bottom = %ld\n", rect.bottom);
SetCursorPos(100, 100); PostMessageA(hwnd, WM_SYSCOMMAND, SC_SIZE | 9, MAKELONG(100, 100)); @@ -12741,10 +12741,10 @@ static void test_SC_SIZE(void) }
GetWindowRect(hwnd, &rect); - ok(rect.left == 110, "rect.left = %d\n", rect.left); - ok(rect.top == 100, "rect.top = %d\n", rect.top); - ok(rect.right == 210, "rect.right = %d\n", rect.right); - ok(rect.bottom == 200, "rect.bottom = %d\n", rect.bottom); + ok(rect.left == 110, "rect.left = %ld\n", rect.left); + ok(rect.top == 100, "rect.top = %ld\n", rect.top); + ok(rect.right == 210, "rect.right = %ld\n", rect.right); + ok(rect.bottom == 200, "rect.bottom = %ld\n", rect.bottom);
DestroyWindow(hwnd); } @@ -12820,11 +12820,11 @@ static void test_cancel_mode(void) ok(GetCapture() == hwnd1, "got capture %p\n", GetCapture());
ret = SendMessageA(hwnd2, WM_CANCELMODE, 0, 0); - ok(!ret, "got %ld\n", ret); + ok(!ret, "got %Id\n", ret); ok(GetCapture() == hwnd1, "got capture %p\n", GetCapture());
ret = SendMessageA(hwnd1, WM_CANCELMODE, 0, 0); - ok(!ret, "got %ld\n", ret); + ok(!ret, "got %Id\n", ret); ok(!GetCapture(), "got capture %p\n", GetCapture());
child = CreateWindowA("MainWindowClass", "child", WS_CHILD, @@ -12834,15 +12834,15 @@ static void test_cancel_mode(void) ok(GetCapture() == child, "got capture %p\n", GetCapture());
ret = SendMessageA(hwnd2, WM_CANCELMODE, 0, 0); - ok(!ret, "got %ld\n", ret); + ok(!ret, "got %Id\n", ret); ok(GetCapture() == child, "got capture %p\n", GetCapture());
ret = SendMessageA(hwnd1, WM_CANCELMODE, 0, 0); - ok(!ret, "got %ld\n", ret); + ok(!ret, "got %Id\n", ret); ok(GetCapture() == child, "got capture %p\n", GetCapture());
ret = SendMessageA(child, WM_CANCELMODE, 0, 0); - ok(!ret, "got %ld\n", ret); + ok(!ret, "got %Id\n", ret); ok(!GetCapture(), "got capture %p\n", GetCapture());
DestroyWindow(child); @@ -12880,23 +12880,23 @@ static LRESULT WINAPI ncdestroy_test_proc( HWND hwnd, UINT msg, WPARAM wp, LPARA todo_wine ok( !ret, "SetWindowPos succeeded\n" ); todo_wine - ok( GetLastError() == ERROR_INVALID_PARAMETER, "SetWindowPos returned error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "SetWindowPos returned error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); parent = SetParent( hwnd, hwndMain ); ok( parent == 0, "SetParent returned %p\n", parent ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "got error %lu\n", GetLastError() );
ret = GetWindowRect( hwnd, &rect ); - ok( ret, "GetWindowRect failed: %u\n", GetLastError() ); + ok( ret, "GetWindowRect failed: %lu\n", GetLastError() ); SetRect( &exp, 10, 20, 110, 220 ); ok( EqualRect( &rect, &exp ), "unexpected rect %s, expected %s\n", wine_dbgstr_rect( &rect ), wine_dbgstr_rect( &exp ));
ret = MoveWindow( hwnd, 11, 12, 20, 30, FALSE ); - ok( ret, "MoveWindow failed: %u\n", GetLastError() ); + ok( ret, "MoveWindow failed: %lu\n", GetLastError() ); ret = GetWindowRect( hwnd, &rect ); - ok( ret, "GetWindowRect failed: %u\n", GetLastError() ); + ok( ret, "GetWindowRect failed: %lu\n", GetLastError() ); SetRect( &exp, 11, 12, 31, 42 ); ok( EqualRect( &rect, &exp ), "unexpected rect %s, expected %s\n", wine_dbgstr_rect( &rect ), wine_dbgstr_rect( &exp )); @@ -12904,7 +12904,7 @@ static LRESULT WINAPI ncdestroy_test_proc( HWND hwnd, UINT msg, WPARAM wp, LPARA child = CreateWindowExA( 0, "ToolWindowClass", "Tool window 1", WS_CHILD, 0, 0, 100, 100, hwnd, 0, 0, NULL ); ok( !child && GetLastError() == ERROR_INVALID_PARAMETER, - "CreateWindowExA returned %p %u\n", child, GetLastError() ); + "CreateWindowExA returned %p %lu\n", child, GetLastError() ); break; }
@@ -12940,12 +12940,12 @@ static void test_WM_NCCALCSIZE(void) cls.lpszMenuName = NULL; cls.lpszClassName = "dummy_window_class"; ret = RegisterClassA(&cls); - ok(ret, "RegisterClass error %u\n", GetLastError()); + ok(ret, "RegisterClass error %lu\n", GetLastError());
hwnd = CreateWindowExA(0, "dummy_window_class", NULL, WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP, 100, 100, 200, 200, 0, 0, GetModuleHandleA(NULL), NULL); - ok(hwnd != 0, "CreateWindowEx error %u\n", GetLastError()); + ok(hwnd != 0, "CreateWindowEx error %lu\n", GetLastError());
GetWindowRect(hwnd, &window_rect); params.rgrc[0] = window_rect; @@ -12964,22 +12964,22 @@ static void test_WM_NCCALCSIZE(void) params.lppos = &winpos;
ret = SendMessageW(hwnd, WM_NCCALCSIZE, TRUE, (LPARAM)¶ms); - ok(!ret, "got %08lx\n", ret); + ok(!ret, "got %08Ix\n", ret); ok(EqualRect(¶ms.rgrc[0], &client_rect), "got %s\n", wine_dbgstr_rect(¶ms.rgrc[0]));
params.rgrc[0] = window_rect; ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, TRUE, (LPARAM)¶ms); - ok(!ret, "got %08lx\n", ret); + ok(!ret, "got %08Ix\n", ret); ok(EqualRect(¶ms.rgrc[0], &client_rect), "got %s\n", wine_dbgstr_rect(¶ms.rgrc[0]));
GetWindowRect(hwnd, &window_rect); ret = SendMessageW(hwnd, WM_NCCALCSIZE, FALSE, (LPARAM)&window_rect); - ok(!ret, "got %08lx\n", ret); + ok(!ret, "got %08Ix\n", ret); ok(EqualRect(&window_rect, &client_rect), "got %s\n", wine_dbgstr_rect(&window_rect));
GetWindowRect(hwnd, &window_rect); ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, FALSE, (LPARAM)&window_rect); - ok(!ret, "got %08lx\n", ret); + ok(!ret, "got %08Ix\n", ret); ok(EqualRect(&window_rect, &client_rect), "got %s\n", wine_dbgstr_rect(&window_rect));
DestroyWindow(hwnd); diff --git a/dlls/user32/tests/winstation.c b/dlls/user32/tests/winstation.c index 9899b6c7f7b..9c27b5afd01 100644 --- a/dlls/user32/tests/winstation.c +++ b/dlls/user32/tests/winstation.c @@ -81,11 +81,11 @@ static DWORD CALLBACK thread( LPVOID arg )
SetLastError( 0xdeadbeef ); ok( !CloseHandle( d1 ), "CloseHandle succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %d\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %ld\n", GetLastError() ); SetLastError( 0xdeadbeef ); ok( !CloseDesktop( d1 ), "CloseDesktop succeeded\n" ); ok( GetLastError() == ERROR_BUSY || broken(GetLastError() == 0xdeadbeef), /* wow64 */ - "bad last error %d\n", GetLastError() ); + "bad last error %ld\n", GetLastError() ); print_object( d1 ); d2 = CreateDesktopA( "foobar2", NULL, NULL, 0, DESKTOP_ALL_ACCESS, NULL ); trace( "created desktop %p\n", d2 ); @@ -94,7 +94,7 @@ static DWORD CALLBACK thread( LPVOID arg ) SetLastError( 0xdeadbeef ); ok( !SetThreadDesktop( d2 ), "set thread desktop succeeded with existing window\n" ); ok( GetLastError() == ERROR_BUSY || broken(GetLastError() == 0xdeadbeef), /* wow64 */ - "bad last error %d\n", GetLastError() ); + "bad last error %ld\n", GetLastError() );
DestroyWindow( hwnd ); ok( SetThreadDesktop( d2 ), "set thread desktop failed\n" ); @@ -130,7 +130,7 @@ static void test_handles(void) ok( !CloseWindowStation(w1), "closing process win station succeeded\n" ); SetLastError( 0xdeadbeef ); ok( !CloseHandle(w1), "closing process win station handle succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %d\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %ld\n", GetLastError() ); print_object( w1 );
flags = 0; @@ -149,14 +149,14 @@ static void test_handles(void)
w2 = CreateWindowStationA("WinSta0", 0, WINSTA_ALL_ACCESS, NULL ); le = GetLastError(); - ok( w2 != 0 || le == ERROR_ACCESS_DENIED, "CreateWindowStation failed (%u)\n", le ); + ok( w2 != 0 || le == ERROR_ACCESS_DENIED, "CreateWindowStation failed (%lu)\n", le ); if (w2 != 0) { ok( w2 != w1, "CreateWindowStation returned default handle\n" ); SetLastError( 0xdeadbeef ); ok( !CloseDesktop( (HDESK)w2 ), "CloseDesktop succeeded on win station\n" ); ok( GetLastError() == ERROR_INVALID_HANDLE || broken(GetLastError() == 0xdeadbeef), /* wow64 */ - "bad last error %d\n", GetLastError() ); + "bad last error %ld\n", GetLastError() ); ok( CloseWindowStation( w2 ), "CloseWindowStation failed\n" );
w2 = CreateWindowStationA("WinSta0", 0, WINSTA_ALL_ACCESS, NULL ); @@ -176,7 +176,7 @@ static void test_handles(void) CreateMutexA( NULL, 0, "foobar" ); w2 = CreateWindowStationA("foobar", 0, WINSTA_ALL_ACCESS, NULL ); le = GetLastError(); - ok( w2 != 0 || le == ERROR_ACCESS_DENIED, "create foobar station failed (%u)\n", le ); + ok( w2 != 0 || le == ERROR_ACCESS_DENIED, "create foobar station failed (%lu)\n", le );
if (w2 != 0) { @@ -216,35 +216,35 @@ static void test_handles(void) SetLastError( 0xdeadbeef ); w2 = OpenWindowStationA( "", TRUE, WINSTA_ALL_ACCESS ); ok( !w2, "open station succeeded\n" ); - ok( GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); w2 = CreateWindowStationA( "", 0, WINSTA_ALL_ACCESS, NULL ); - ok( w2 != 0, "create station failed err %u\n", GetLastError() ); + ok( w2 != 0, "create station failed err %lu\n", GetLastError() );
memset( buffer, 0, sizeof(buffer) ); ret = GetUserObjectInformationA( w2, UOI_NAME, buffer, sizeof(buffer), &size ); - ok( ret, "GetUserObjectInformationA failed with error %u\n", GetLastError() ); + ok( ret, "GetUserObjectInformationA failed with error %lu\n", GetLastError() ); /* Get the logon session LUID */ ret = GetTokenInformation( GetCurrentProcessToken(), TokenStatistics, &token_stats, sizeof(token_stats), NULL ); if (ret) - sprintf( default_name, "Service-0x%x-%x$", token_stats.AuthenticationId.HighPart, + sprintf( default_name, "Service-0x%lx-%lx$", token_stats.AuthenticationId.HighPart, token_stats.AuthenticationId.LowPart ); if (*default_name) ok( !strcmp( buffer, default_name ), "unexpected window station name '%s' expected '%s'\n", buffer, default_name );
SetLastError( 0xdeadbeef ); w3 = OpenWindowStationA( "", TRUE, WINSTA_ALL_ACCESS ); - ok( w3 != 0, "open station failed err %u\n", GetLastError() ); + ok( w3 != 0, "open station failed err %lu\n", GetLastError() ); CloseWindowStation( w3 ); CloseWindowStation( w2 );
w2 = CreateWindowStationA( NULL, 0, WINSTA_ALL_ACCESS, NULL ); - ok( w2 != 0, "create station failed err %u\n", GetLastError() ); + ok( w2 != 0, "create station failed err %lu\n", GetLastError() );
memset( buffer, 0, sizeof(buffer) ); ret = GetUserObjectInformationA( w2, UOI_NAME, buffer, sizeof(buffer), &size ); - ok( ret, "GetUserObjectInformationA failed with error %u\n", GetLastError() ); + ok( ret, "GetUserObjectInformationA failed with error %lu\n", GetLastError() ); if (*default_name) ok( !strcmp( buffer, default_name ), "unexpected window station name '%s' expected '%s'\n", buffer, default_name ); CloseWindowStation( w2 ); @@ -253,12 +253,12 @@ static void test_handles(void) w2 = CreateWindowStationA( "foo\bar", 0, WINSTA_ALL_ACCESS, NULL ); ok( !w2, "create station succeeded\n" ); ok( GetLastError() == ERROR_PATH_NOT_FOUND || GetLastError() == ERROR_ACCESS_DENIED, - "wrong error %u\n", GetLastError() ); + "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); w2 = OpenWindowStationA( "foo\bar", TRUE, WINSTA_ALL_ACCESS ); ok( !w2, "create station succeeded\n" ); - ok( GetLastError() == ERROR_PATH_NOT_FOUND, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_PATH_NOT_FOUND, "wrong error %lu\n", GetLastError() );
/* desktops */ d1 = GetThreadDesktop(GetCurrentThreadId()); @@ -273,7 +273,7 @@ static void test_handles(void) SetLastError( 0xdeadbeef ); ok( !CloseDesktop(d1), "closing thread desktop succeeded\n" ); ok( GetLastError() == ERROR_BUSY || broken(GetLastError() == 0xdeadbeef), /* wow64 */ - "bad last error %d\n", GetLastError() ); + "bad last error %ld\n", GetLastError() );
SetLastError( 0xdeadbeef ); if (CloseHandle( d1 )) /* succeeds on nt4 */ @@ -281,7 +281,7 @@ static void test_handles(void) win_skip( "NT4 desktop handle management is completely different\n" ); return; } - ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %d\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %ld\n", GetLastError() );
ok( DuplicateHandle( GetCurrentProcess(), d1, GetCurrentProcess(), (PHANDLE)&d2, 0, TRUE, DUPLICATE_SAME_ACCESS ), "DuplicateHandle failed\n" ); @@ -297,34 +297,34 @@ static void test_handles(void) SetLastError( 0xdeadbeef ); d2 = CreateDesktopA( "", NULL, NULL, 0, DESKTOP_ALL_ACCESS, NULL ); ok( !d2, "create empty desktop succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); d2 = OpenDesktopA( "", 0, TRUE, DESKTOP_ALL_ACCESS ); ok( !d2, "open empty desktop succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); d2 = CreateDesktopA( "foo\bar", NULL, NULL, 0, DESKTOP_ALL_ACCESS, NULL ); ok( !d2, "create desktop succeeded\n" ); - ok( GetLastError() == ERROR_BAD_PATHNAME, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_BAD_PATHNAME, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); d2 = OpenDesktopA( "foo\bar", 0, TRUE, DESKTOP_ALL_ACCESS ); ok( !d2, "open desktop succeeded\n" ); - ok( GetLastError() == ERROR_BAD_PATHNAME, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_BAD_PATHNAME, "wrong error %lu\n", GetLastError() );
d2 = CreateDesktopA( "foobar", NULL, NULL, 0, DESKTOP_ALL_ACCESS, NULL ); ok( d2 != 0, "create foobar desktop failed\n" ); SetLastError( 0xdeadbeef ); ok( !CloseWindowStation( (HWINSTA)d2 ), "CloseWindowStation succeeded on desktop\n" ); ok( GetLastError() == ERROR_INVALID_HANDLE || broken(GetLastError() == 0xdeadbeef), /* wow64 */ - "bad last error %d\n", GetLastError() ); + "bad last error %ld\n", GetLastError() );
SetLastError( 0xdeadbeef ); d3 = CreateDesktopA( "foobar", NULL, NULL, 0, DESKTOP_ALL_ACCESS, NULL ); ok( d3 != 0, "create foobar desktop again failed\n" ); - ok( GetLastError() == 0xdeadbeef, "bad last error %d\n", GetLastError() ); + ok( GetLastError() == 0xdeadbeef, "bad last error %ld\n", GetLastError() ); ok( CloseDesktop( d3 ), "CloseDesktop failed\n" );
d3 = OpenDesktopA( "foobar", 0, TRUE, DESKTOP_ALL_ACCESS ); @@ -383,12 +383,12 @@ static void test_enumstations(void) SetLastError(0xbabefeed); ret = EnumWindowStationsA(NULL, 0); ok(!ret, "EnumWindowStationsA returned successfully!\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "LastError is set to %08x\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "LastError is set to %08lx\n", GetLastError()); }
hwinsta = CreateWindowStationA("winsta_test", 0, WINSTA_ALL_ACCESS, NULL); ret = GetLastError(); - ok(hwinsta != NULL || ret == ERROR_ACCESS_DENIED, "CreateWindowStation failed (%u)\n", ret); + ok(hwinsta != NULL || ret == ERROR_ACCESS_DENIED, "CreateWindowStation failed (%lu)\n", ret); if (!hwinsta) { win_skip("Not enough privileges for CreateWindowStation\n"); @@ -397,13 +397,13 @@ static void test_enumstations(void)
SetLastError(0xdeadbeef); ret = EnumWindowStationsA(open_window_station_callbackA, 0x12345); - ok(ret == 0x12345, "EnumWindowStationsA returned %x\n", ret); - ok(GetLastError() == 0xdeadbeef, "LastError is set to %08x\n", GetLastError()); + ok(ret == 0x12345, "EnumWindowStationsA returned %lx\n", ret); + ok(GetLastError() == 0xdeadbeef, "LastError is set to %08lx\n", GetLastError());
SetLastError(0xdeadbeef); ret = EnumWindowStationsA(window_station_callbackA, 0); - ok(!ret, "EnumWindowStationsA returned %x\n", ret); - ok(GetLastError() == 0xdeadbeef, "LastError is set to %08x\n", GetLastError()); + ok(!ret, "EnumWindowStationsA returned %lx\n", ret); + ok(GetLastError() == 0xdeadbeef, "LastError is set to %08lx\n", GetLastError()); }
static BOOL CALLBACK desktop_callbackA(LPSTR desktop, LPARAM lp) @@ -438,28 +438,28 @@ static void test_enumdesktops(void) SetLastError(0xbabefeed); ret = EnumDesktopsA(GetProcessWindowStation(), NULL, 0); ok(!ret, "EnumDesktopsA returned successfully!\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "LastError is set to %08x\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "LastError is set to %08lx\n", GetLastError()); }
SetLastError(0xdeadbeef); ret = EnumDesktopsA(NULL, desktop_callbackA, 0x12345); ok(ret == 0x12345, "EnumDesktopsA returned %x\n", ret); - ok(GetLastError() == 0xdeadbeef, "LastError is set to %08x\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "LastError is set to %08lx\n", GetLastError());
SetLastError(0xdeadbeef); ret = EnumDesktopsA(GetProcessWindowStation(), open_desktop_callbackA, 0x12345); ok(ret == 0x12345, "EnumDesktopsA returned %x\n", ret); - ok(GetLastError() == 0xdeadbeef, "LastError is set to %08x\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "LastError is set to %08lx\n", GetLastError());
SetLastError(0xdeadbeef); ret = EnumDesktopsA(INVALID_HANDLE_VALUE, desktop_callbackA, 0x12345); ok(!ret, "EnumDesktopsA returned %x\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "LastError is set to %08x\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "LastError is set to %08lx\n", GetLastError());
SetLastError(0xdeadbeef); ret = EnumDesktopsA(GetProcessWindowStation(), desktop_callbackA, 0); ok(!ret, "EnumDesktopsA returned %x\n", ret); - ok(GetLastError() == 0xdeadbeef, "LastError is set to %08x\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "LastError is set to %08lx\n", GetLastError()); }
/* Miscellaneous tests */ @@ -489,8 +489,8 @@ static void test_getuserobjectinformation(void) ret = GetUserObjectInformationA(desk, UOI_NAME, NULL, 0, &size);
ok(!ret, "GetUserObjectInformationA returned %x\n", ret); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "LastError is set to %08x\n", GetLastError()); - ok(size == 22, "size is set to %d\n", size); /* Windows returns Unicode length (11*2) */ + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "LastError is set to %08lx\n", GetLastError()); + ok(size == 22, "size is set to %ld\n", size); /* Windows returns Unicode length (11*2) */
/* Get string */ SetLastError(0xdeadbeef); @@ -498,10 +498,10 @@ static void test_getuserobjectinformation(void) ret = GetUserObjectInformationA(desk, UOI_NAME, buffer, sizeof(buffer), &size);
ok(ret, "GetUserObjectInformationA returned %x\n", ret); - ok(GetLastError() == 0xdeadbeef, "LastError is set to %08x\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "LastError is set to %08lx\n", GetLastError());
ok(strcmp(buffer, "foobarTest") == 0, "Buffer is set to '%s'\n", buffer); - ok(size == 11, "size is set to %d\n", size); /* 11 bytes in 'foobarTest\0' */ + ok(size == 11, "size is set to %ld\n", size); /* 11 bytes in 'foobarTest\0' */
/* Get size, test size and return value/error code (Unicode) */ SetLastError(0xdeadbeef); @@ -509,8 +509,8 @@ static void test_getuserobjectinformation(void) ret = GetUserObjectInformationW(desk, UOI_NAME, NULL, 0, &size);
ok(!ret, "GetUserObjectInformationW returned %x\n", ret); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "LastError is set to %08x\n", GetLastError()); - ok(size == 22, "size is set to %d\n", size); /* 22 bytes in 'foobarTest\0' in Unicode */ + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "LastError is set to %08lx\n", GetLastError()); + ok(size == 22, "size is set to %ld\n", size); /* 22 bytes in 'foobarTest\0' in Unicode */
/* Get string (Unicode) */ SetLastError(0xdeadbeef); @@ -518,15 +518,15 @@ static void test_getuserobjectinformation(void) ret = GetUserObjectInformationW(desk, UOI_NAME, bufferW, sizeof(bufferW), &size);
ok(ret, "GetUserObjectInformationW returned %x\n", ret); - ok(GetLastError() == 0xdeadbeef, "LastError is set to %08x\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "LastError is set to %08lx\n", GetLastError());
ok(lstrcmpW(bufferW, foobarTestW + 1) == 0, "Buffer is not set to 'foobarTest'\n"); - ok(size == 22, "size is set to %d\n", size); /* 22 bytes in 'foobarTest\0' in Unicode */ + ok(size == 22, "size is set to %ld\n", size); /* 22 bytes in 'foobarTest\0' in Unicode */
/* ObjectNameInformation does not return the full desktop name */ name_info = (OBJECT_NAME_INFORMATION *)buffer; status = pNtQueryObject(desk, ObjectNameInformation, name_info, sizeof(buffer), NULL); - ok(!status, "expected STATUS_SUCCESS, got %08x\n", status); + ok(!status, "expected STATUS_SUCCESS, got %08lx\n", status); ok(lstrcmpW(name_info->Name.Buffer, foobarTestW) == 0, "expected '\foobarTest', got %s\n", wine_dbgstr_w(name_info->Name.Buffer));
@@ -538,8 +538,8 @@ static void test_getuserobjectinformation(void) ret = GetUserObjectInformationA(desk, UOI_TYPE, NULL, 0, &size);
ok(!ret, "GetUserObjectInformationA returned %x\n", ret); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "LastError is set to %08x\n", GetLastError()); - ok(size == 16, "size is set to %d\n", size); /* Windows returns Unicode length (8*2) */ + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "LastError is set to %08lx\n", GetLastError()); + ok(size == 16, "size is set to %ld\n", size); /* Windows returns Unicode length (8*2) */
/* Get string */ SetLastError(0xdeadbeef); @@ -547,10 +547,10 @@ static void test_getuserobjectinformation(void) ret = GetUserObjectInformationA(desk, UOI_TYPE, buffer, sizeof(buffer), &size);
ok(ret, "GetUserObjectInformationA returned %x\n", ret); - ok(GetLastError() == 0xdeadbeef, "LastError is set to %08x\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "LastError is set to %08lx\n", GetLastError());
ok(strcmp(buffer, "Desktop") == 0, "Buffer is set to '%s'\n", buffer); - ok(size == 8, "size is set to %d\n", size); /* 8 bytes in 'Desktop\0' */ + ok(size == 8, "size is set to %ld\n", size); /* 8 bytes in 'Desktop\0' */
/* Get size, test size and return value/error code (Unicode) */ size = 0xdeadbeef; @@ -558,8 +558,8 @@ static void test_getuserobjectinformation(void) ret = GetUserObjectInformationW(desk, UOI_TYPE, NULL, 0, &size);
ok(!ret, "GetUserObjectInformationW returned %x\n", ret); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "LastError is set to %08x\n", GetLastError()); - ok(size == 16, "size is set to %d\n", size); /* 16 bytes in 'Desktop\0' in Unicode */ + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "LastError is set to %08lx\n", GetLastError()); + ok(size == 16, "size is set to %ld\n", size); /* 16 bytes in 'Desktop\0' in Unicode */
/* Get string (Unicode) */ SetLastError(0xdeadbeef); @@ -567,10 +567,10 @@ static void test_getuserobjectinformation(void) ret = GetUserObjectInformationW(desk, UOI_TYPE, bufferW, sizeof(bufferW), &size);
ok(ret, "GetUserObjectInformationW returned %x\n", ret); - ok(GetLastError() == 0xdeadbeef, "LastError is set to %08x\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "LastError is set to %08lx\n", GetLastError());
ok(lstrcmpW(bufferW, DesktopW) == 0, "Buffer is not set to 'Desktop'\n"); - ok(size == 16, "size is set to %d\n", size); /* 16 bytes in 'Desktop\0' in Unicode */ + ok(size == 16, "size is set to %ld\n", size); /* 16 bytes in 'Desktop\0' in Unicode */
ok(CloseDesktop(desk), "CloseDesktop failed\n"); } @@ -615,8 +615,8 @@ static void test_inputdesktop(void)
SetLastError(0xdeadbeef); ret = SendInput(1, inputs, sizeof(INPUT)); - ok(GetLastError() == 0xdeadbeef, "unexpected last error %08x\n", GetLastError()); - ok(ret == 1, "unexpected return count %d\n", ret); + ok(GetLastError() == 0xdeadbeef, "unexpected last error %08lx\n", GetLastError()); + ok(ret == 1, "unexpected return count %ld\n", ret);
/* Set thread desktop to the new desktop, SendInput should fail. */ new_desk = CreateDesktopA("new_desk", NULL, NULL, 0, DESKTOP_ALL_ACCESS, NULL); @@ -641,8 +641,8 @@ static void test_inputdesktop(void) return; } todo_wine - ok(GetLastError() == ERROR_ACCESS_DENIED, "unexpected last error %08x\n", GetLastError()); - ok(ret == 1 || broken(ret == 0) /* Win64 */, "unexpected return count %d\n", ret); + ok(GetLastError() == ERROR_ACCESS_DENIED, "unexpected last error %08lx\n", GetLastError()); + ok(ret == 1 || broken(ret == 0) /* Win64 */, "unexpected return count %ld\n", ret);
/* Set thread desktop back to the old thread desktop, SendInput should success. */ ret = SetThreadDesktop(old_thread_desk); @@ -655,8 +655,8 @@ static void test_inputdesktop(void)
SetLastError(0xdeadbeef); ret = SendInput(1, inputs, sizeof(INPUT)); - ok(GetLastError() == 0xdeadbeef, "unexpected last error %08x\n", GetLastError()); - ok(ret == 1, "unexpected return count %d\n", ret); + ok(GetLastError() == 0xdeadbeef, "unexpected last error %08lx\n", GetLastError()); + ok(ret == 1, "unexpected return count %ld\n", ret);
/* Set thread desktop to the input desktop, SendInput should success. */ ret = SetThreadDesktop(old_input_desk); @@ -669,8 +669,8 @@ static void test_inputdesktop(void)
SetLastError(0xdeadbeef); ret = SendInput(1, inputs, sizeof(INPUT)); - ok(GetLastError() == 0xdeadbeef, "unexpected last error %08x\n", GetLastError()); - ok(ret == 1, "unexpected return count %d\n", ret); + ok(GetLastError() == 0xdeadbeef, "unexpected last error %08lx\n", GetLastError()); + ok(ret == 1, "unexpected return count %ld\n", ret);
/* Switch input desktop to the new desktop, SendInput should fail. */ ret = SwitchDesktop(new_desk); @@ -689,8 +689,8 @@ static void test_inputdesktop(void) SetLastError(0xdeadbeef); ret = SendInput(1, inputs, sizeof(INPUT)); todo_wine - ok(GetLastError() == ERROR_ACCESS_DENIED, "unexpected last error %08x\n", GetLastError()); - ok(ret == 1 || broken(ret == 0) /* Win64 */, "unexpected return count %d\n", ret); + ok(GetLastError() == ERROR_ACCESS_DENIED, "unexpected last error %08lx\n", GetLastError()); + ok(ret == 1 || broken(ret == 0) /* Win64 */, "unexpected return count %ld\n", ret);
/* Set thread desktop to the new desktop, SendInput should success. */ ret = SetThreadDesktop(new_desk); @@ -703,8 +703,8 @@ static void test_inputdesktop(void)
SetLastError(0xdeadbeef); ret = SendInput(1, inputs, sizeof(INPUT)); - ok(GetLastError() == 0xdeadbeef, "unexpected last error %08x\n", GetLastError()); - ok(ret == 1, "unexpected return count %d\n", ret); + ok(GetLastError() == 0xdeadbeef, "unexpected last error %08lx\n", GetLastError()); + ok(ret == 1, "unexpected return count %ld\n", ret);
/* Switch input desktop to the old input desktop, set thread desktop to the old * thread desktop, clean side effects. SendInput should success. */ @@ -727,8 +727,8 @@ static void test_inputdesktop(void)
SetLastError(0xdeadbeef); ret = SendInput(1, inputs, sizeof(INPUT)); - ok(GetLastError() == 0xdeadbeef, "unexpected last error %08x\n", GetLastError()); - ok(ret == 1, "unexpected return count %d\n", ret); + ok(GetLastError() == 0xdeadbeef, "unexpected last error %08lx\n", GetLastError()); + ok(ret == 1, "unexpected return count %ld\n", ret);
/* free resources */ ret = CloseDesktop(input_desk); @@ -752,7 +752,7 @@ static void test_inputdesktop2(void) SetLastError(0xdeadbeef); w2 = CreateWindowStationA("winsta_test", 0, WINSTA_ALL_ACCESS, NULL); ret = GetLastError(); - ok(w2 != NULL || ret == ERROR_ACCESS_DENIED, "CreateWindowStation failed (%u)\n", ret); + ok(w2 != NULL || ret == ERROR_ACCESS_DENIED, "CreateWindowStation failed (%lu)\n", ret); if (!w2) { win_skip("Not enough privileges for CreateWindowStation\n"); @@ -780,7 +780,7 @@ static void test_inputdesktop2(void) SetLastError(0xdeadbeef); input_desk = OpenInputDesktop(0, FALSE, DESKTOP_ALL_ACCESS); ok(input_desk == NULL, "OpenInputDesktop should fail on non default winstation!\n"); - ok(GetLastError() == ERROR_INVALID_FUNCTION || broken(GetLastError() == 0xdeadbeef), "last error %08x\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_FUNCTION || broken(GetLastError() == 0xdeadbeef), "last error %08lx\n", GetLastError());
hdesk = OpenDesktopA("desk_test", 0, TRUE, DESKTOP_ALL_ACCESS); ok(hdesk != NULL, "OpenDesktop failed!\n"); @@ -789,7 +789,7 @@ static void test_inputdesktop2(void) todo_wine ok(!ret, "Switch to desktop belong to non default winstation should fail!\n"); todo_wine - ok(GetLastError() == ERROR_ACCESS_DENIED || broken(GetLastError() == 0xdeadbeef), "last error %08x\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED || broken(GetLastError() == 0xdeadbeef), "last error %08lx\n", GetLastError()); ret = SetThreadDesktop(hdesk); ok(ret, "SetThreadDesktop failed!\n");
@@ -860,17 +860,17 @@ static DWORD set_foreground(HWND hwnd) GetWindowTextA(hwnd_fore, win_text, 1024); set_id = GetWindowThreadProcessId(hwnd, NULL); fore_id = GetWindowThreadProcessId(hwnd_fore, NULL); - trace(""%s" %p %08x hwnd %p %08x\n", win_text, hwnd_fore, fore_id, hwnd, set_id); + trace(""%s" %p %08lx hwnd %p %08lx\n", win_text, hwnd_fore, fore_id, hwnd, set_id); ret = AttachThreadInput(set_id, fore_id, TRUE); - trace("AttachThreadInput returned %08x\n", ret); + trace("AttachThreadInput returned %08lx\n", ret); ret = ShowWindow(hwnd, SW_SHOWNORMAL); - trace("ShowWindow returned %08x\n", ret); + trace("ShowWindow returned %08lx\n", ret); ret = SetWindowPos(hwnd, HWND_TOPMOST, 0,0,0,0, SWP_NOSIZE|SWP_NOMOVE); - trace("set topmost returned %08x\n", ret); + trace("set topmost returned %08lx\n", ret); ret = SetWindowPos(hwnd, HWND_NOTOPMOST, 0,0,0,0, SWP_NOSIZE|SWP_NOMOVE); - trace("set notopmost returned %08x\n", ret); + trace("set notopmost returned %08lx\n", ret); ret = SetForegroundWindow(hwnd); - trace("SetForegroundWindow returned %08x\n", ret); + trace("SetForegroundWindow returned %08lx\n", ret); Sleep(250); AttachThreadInput(set_id, fore_id, FALSE); return ret; @@ -899,7 +899,7 @@ static void test_foregroundwindow(void) SetLastError(0xdeadbeef); hdesks[1] = CreateDesktopA("desk2", NULL, NULL, 0, DESKTOP_ALL_ACCESS, NULL); ret = GetLastError(); - ok(hdesks[1] != NULL || ret == ERROR_ACCESS_DENIED, "CreateDesktop failed (%u)\n", ret); + ok(hdesks[1] != NULL || ret == ERROR_ACCESS_DENIED, "CreateDesktop failed (%lu)\n", ret); if(!hdesks[1]) { win_skip("Not enough privileges for CreateDesktop\n"); @@ -913,13 +913,13 @@ static void test_foregroundwindow(void) CloseDesktop(hdesks[1]); return; } - trace("old timeout %d\n", timeout_old); + trace("old timeout %ld\n", timeout_old); timeout = 0; ret = SystemParametersInfoA(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, 0, SPIF_SENDCHANGE | SPIF_UPDATEINIFILE); ok(ret, "set foreground lock timeout failed!\n"); ret = SystemParametersInfoA(SPI_GETFOREGROUNDLOCKTIMEOUT, 0, &timeout, 0); ok(ret, "get foreground lock timeout failed!\n"); - ok(timeout == 0, "unexpected timeout %d\n", timeout); + ok(timeout == 0, "unexpected timeout %ld\n", timeout);
for (thread_desk_id = 0; thread_desk_id < DESKTOPS; thread_desk_id++) { @@ -1011,7 +1011,7 @@ static void test_foregroundwindow(void) ok(ret, "set foreground lock timeout failed!\n"); ret = SystemParametersInfoA(SPI_GETFOREGROUNDLOCKTIMEOUT, 0, &timeout, 0); ok(ret, "get foreground lock timeout failed!\n"); - ok(timeout == timeout_old, "unexpected timeout %d\n", timeout); + ok(timeout == timeout_old, "unexpected timeout %ld\n", timeout); }
START_TEST(winstation) diff --git a/dlls/user32/tests/wsprintf.c b/dlls/user32/tests/wsprintf.c index 567ed2ff10b..f46cfa5aea3 100644 --- a/dlls/user32/tests/wsprintf.c +++ b/dlls/user32/tests/wsprintf.c @@ -79,7 +79,7 @@ static void wsprintfATest(void) int rc;
rc=wsprintfA(buf, "%010ld", -1); - ok(rc == 10, "wsprintfA length failure: rc=%d error=%d\n",rc,GetLastError()); + ok(rc == 10, "wsprintfA length failure: rc=%d error=%ld\n",rc,GetLastError()); ok((lstrcmpA(buf, "-000000001") == 0), "wsprintfA zero padded negative value failure: buf=[%s]\n",buf); rc = wsprintfA(buf, "%I64X", (ULONGLONG)0); @@ -157,7 +157,7 @@ static void wsprintfWTest(void) win_skip("wsprintfW is not implemented\n"); return; } - ok(rc == 10, "wsPrintfW length failure: rc=%d error=%d\n",rc,GetLastError()); + ok(rc == 10, "wsPrintfW length failure: rc=%d error=%ld\n",rc,GetLastError()); ok((lstrcmpW(buf, L"-000000001") == 0), "wsprintfW zero padded negative value failure\n"); rc = wsprintfW(buf, L"%I64x", (ULONGLONG)0 ); @@ -246,7 +246,7 @@ static void CharUpperTest(void) break; } } - ok(!failed,"CharUpper failed - 16bit input (0x%0lx) returned 32bit result (0x%0lx)\n",i,out); + ok(!failed,"CharUpper failed - 16bit input (0x%0Ix) returned 32bit result (0x%0Ix)\n",i,out); }
static void CharLowerTest(void) @@ -263,7 +263,7 @@ static void CharLowerTest(void) break; } } - ok(!failed,"CharLower failed - 16bit input (0x%0lx) returned 32bit result (0x%0lx)\n",i,out); + ok(!failed,"CharLower failed - 16bit input (0x%0Ix) returned 32bit result (0x%0Ix)\n",i,out); }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=110028
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
user32: input.c:757: Test failed: 0 (a4/0): 00 from 00 -> 80 unexpected input.c:757: Test failed: 0 (a4/0): 41 from 01 -> 00 unexpected
=== w1064v1809 (32 bit report) ===
user32: input.c:2793: Test failed: 0: expected WM_MOUSEMOVE message input.c:2793: Test failed: 1: expected WM_MOUSEMOVE message input.c:2793: Test failed: 2: expected WM_MOUSEMOVE message
=== w1064_tsign (64 bit report) ===
user32: input.c:1303: Test failed: Wrong set pos: (100,98) input.c:1323: Test failed: GetCursorPos: (100,98) input.c:1372: Test failed: Wrong new pos: (100,98)
=== w10pro64_ar (64 bit report) ===
user32: menu.c:2337: Test failed: test 6 menu.c:2337: Test failed: test 8 menu.c:2337: Test failed: test 10 menu.c:2337: Test failed: test 12 menu.c:2337: Test failed: test 14 menu.c:2337: Test failed: test 16
=== w10pro64_he (64 bit report) ===
user32: menu.c:2337: Test failed: test 6 menu.c:2337: Test failed: test 8 menu.c:2337: Test failed: test 10 menu.c:2337: Test failed: test 12 menu.c:2337: Test failed: test 14 menu.c:2337: Test failed: test 16
=== w8 (32 bit report) ===
user32: sysparams.c:2490: Test failed: Waiting for the WM_DISPLAYCHANGE message timed out sysparams.c:2501: Test failed: Set bpp 32, but WM_DISPLAYCHANGE reported bpp -1
=== w8adm (32 bit report) ===
user32: sysparams.c:2490: Test failed: Waiting for the WM_DISPLAYCHANGE message timed out sysparams.c:2501: Test failed: Set bpp 32, but WM_DISPLAYCHANGE reported bpp -1
=== w864 (32 bit report) ===
user32: sysparams.c:2490: Test failed: Waiting for the WM_DISPLAYCHANGE message timed out sysparams.c:2501: Test failed: Set bpp 32, but WM_DISPLAYCHANGE reported bpp -1
=== w1064v1809 (32 bit report) ===
user32: sysparams.c:2490: Test failed: Waiting for the WM_DISPLAYCHANGE message timed out sysparams.c:2501: Test failed: Set bpp 32, but WM_DISPLAYCHANGE reported bpp -1
=== w1064 (32 bit report) ===
user32: sysparams.c:2490: Test failed: Waiting for the WM_DISPLAYCHANGE message timed out sysparams.c:2501: Test failed: Set bpp 32, but WM_DISPLAYCHANGE reported bpp -1
=== w1064_tsign (32 bit report) ===
user32: sysparams.c:2490: Test failed: Waiting for the WM_DISPLAYCHANGE message timed out sysparams.c:2501: Test failed: Set bpp 32, but WM_DISPLAYCHANGE reported bpp -1
=== w10pro64 (32 bit report) ===
user32: sysparams.c:2490: Test failed: Waiting for the WM_DISPLAYCHANGE message timed out sysparams.c:2501: Test failed: Set bpp 32, but WM_DISPLAYCHANGE reported bpp -1
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/vbscript/tests/Makefile.in | 1 dlls/vbscript/tests/createobj.c | 84 ++-- dlls/vbscript/tests/run.c | 380 ++++++++++---------- dlls/vbscript/tests/vbscript.c | 738 ++++++++++++++++++++------------------- 4 files changed, 601 insertions(+), 602 deletions(-)
diff --git a/dlls/vbscript/tests/Makefile.in b/dlls/vbscript/tests/Makefile.in index bab23098f99..35379baf198 100644 --- a/dlls/vbscript/tests/Makefile.in +++ b/dlls/vbscript/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = vbscript.dll IMPORTS = oleaut32 ole32 advapi32
diff --git a/dlls/vbscript/tests/createobj.c b/dlls/vbscript/tests/createobj.c index c0a653fb1ea..552a849ea27 100644 --- a/dlls/vbscript/tests/createobj.c +++ b/dlls/vbscript/tests/createobj.c @@ -155,7 +155,7 @@ static HRESULT WINAPI ObjectWithSite_SetSite(IObjectWithSite *iface, IUnknown *p ok(pUnkSite != NULL, "pUnkSite == NULL\n");
hres = IUnknown_QueryInterface(pUnkSite, &IID_IServiceProvider, (void**)&sp); - ok(hres == S_OK, "Could not get IServiceProvider iface: %08x\n", hres); + ok(hres == S_OK, "Could not get IServiceProvider iface: %08lx\n", hres); IServiceProvider_Release(sp);
return SetSite_hres; @@ -241,7 +241,7 @@ static HRESULT WINAPI DispatchEx_Invoke(IDispatchEx *iface, DISPID dispIdMember,
static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex) { - ok(0, "unexpected call %s %x\n", wine_dbgstr_w(bstrName), grfdex); + ok(0, "unexpected call %s %lx\n", wine_dbgstr_w(bstrName), grfdex); return E_NOTIMPL; }
@@ -278,7 +278,7 @@ static HRESULT WINAPI DispatchEx_GetNameSpaceParent(IDispatchEx *iface, IUnknown static HRESULT WINAPI Test_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid) { if(!lstrcmpW(bstrName, L"reportSuccess")) { - ok(grfdex == fdexNameCaseInsensitive, "grfdex = %x\n", grfdex); + ok(grfdex == fdexNameCaseInsensitive, "grfdex = %lx\n", grfdex); *pid = DISPID_TEST_REPORTSUCCESS; return S_OK; } @@ -334,7 +334,7 @@ static IDispatchEx testObj = { &testObjVtbl }; static HRESULT WINAPI Global_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid) { if(!lstrcmpW(bstrName, L"ok")) { - ok(grfdex == fdexNameCaseSensitive, "grfdex = %x\n", grfdex); + ok(grfdex == fdexNameCaseSensitive, "grfdex = %lx\n", grfdex); *pid = DISPID_GLOBAL_OK; return S_OK; } @@ -467,14 +467,14 @@ static HRESULT WINAPI InternetHostSecurityManager_ProcessUrlAction(IInternetHost { CHECK_EXPECT(ProcessUrlAction);
- ok(dwAction == URLACTION_ACTIVEX_RUN, "dwAction = %x\n", dwAction); + ok(dwAction == URLACTION_ACTIVEX_RUN, "dwAction = %lx\n", dwAction); ok(pPolicy != NULL, "pPolicy == NULL\n"); - ok(cbPolicy == sizeof(DWORD), "cbPolicy = %d\n", cbPolicy); + ok(cbPolicy == sizeof(DWORD), "cbPolicy = %ld\n", cbPolicy); ok(pContext != NULL, "pContext == NULL\n"); - ok(cbContext == sizeof(GUID), "cbContext = %d\n", cbContext); + ok(cbContext == sizeof(GUID), "cbContext = %ld\n", cbContext); ok(IsEqualGUID(pContext, &CLSID_TestObj), "pContext = %s\n", wine_dbgstr_guid((const IID*)pContext)); - ok(!dwFlags, "dwFlags = %x\n", dwFlags); - ok(!dwReserved, "dwReserved = %x\n", dwReserved); + ok(!dwFlags, "dwFlags = %lx\n", dwFlags); + ok(!dwReserved, "dwReserved = %lx\n", dwReserved);
if(SUCCEEDED(ProcessUrlAction_hres)) *(DWORD*)pPolicy = ProcessUrlAction_policy; @@ -494,12 +494,12 @@ static HRESULT WINAPI InternetHostSecurityManager_QueryCustomPolicy(IInternetHos ok(ppPolicy != NULL, "ppPolicy == NULL\n"); ok(pcbPolicy != NULL, "pcbPolicy == NULL\n"); ok(pContext != NULL, "pContext == NULL\n"); - ok(cbContext == sizeof(struct CONFIRMSAFETY), "cbContext = %d\n", cbContext); - ok(!dwReserved, "dwReserved = %x\n", dwReserved); + ok(cbContext == sizeof(struct CONFIRMSAFETY), "cbContext = %ld\n", cbContext); + ok(!dwReserved, "dwReserved = %lx\n", dwReserved);
/* TODO: CLSID */ ok(cs->pUnk != NULL, "cs->pUnk == NULL\n"); - ok(!cs->dwFlags, "dwFlags = %x\n", cs->dwFlags); + ok(!cs->dwFlags, "dwFlags = %lx\n", cs->dwFlags);
if(FAILED(QueryCustomPolicy_hres)) return QueryCustomPolicy_hres; @@ -609,7 +609,7 @@ static HRESULT WINAPI ActiveScriptSite_GetLCID(IActiveScriptSite *iface, LCID *p static HRESULT WINAPI ActiveScriptSite_GetItemInfo(IActiveScriptSite *iface, LPCOLESTR pstrName, DWORD dwReturnMask, IUnknown **ppiunkItem, ITypeInfo **ppti) { - ok(dwReturnMask == SCRIPTINFO_IUNKNOWN, "unexpected dwReturnMask %x\n", dwReturnMask); + ok(dwReturnMask == SCRIPTINFO_IUNKNOWN, "unexpected dwReturnMask %lx\n", dwReturnMask); ok(!ppti, "ppti != NULL\n"); ok(!lstrcmpW(pstrName, L"test"), "pstrName = %s\n", wine_dbgstr_w(pstrName));
@@ -671,7 +671,7 @@ static void set_safety_options(IUnknown *unk, BOOL use_sec_mgr) HRESULT hres;
hres = IUnknown_QueryInterface(unk, &IID_IObjectSafety, (void**)&safety); - ok(hres == S_OK, "Could not get IObjectSafety: %08x\n", hres); + ok(hres == S_OK, "Could not get IObjectSafety: %08lx\n", hres); if(FAILED(hres)) return;
@@ -682,13 +682,13 @@ static void set_safety_options(IUnknown *unk, BOOL use_sec_mgr) options_set = INTERFACE_USES_DISPEX;
hres = IObjectSafety_SetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, options_all, options_set); - ok(hres == S_OK, "SetInterfaceSafetyOptions failed: %08x\n", hres); + ok(hres == S_OK, "SetInterfaceSafetyOptions failed: %08lx\n", hres);
supported = enabled = 0xdeadbeef; hres = IObjectSafety_GetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, &supported, &enabled); - ok(hres == S_OK, "GetInterfaceSafetyOptions failed: %08x\n", hres); - ok(supported == options_all, "supported=%x, expected %x\n", supported, options_all); - ok(enabled == options_set, "enabled=%x, expected %x\n", enabled, options_set); + ok(hres == S_OK, "GetInterfaceSafetyOptions failed: %08lx\n", hres); + ok(supported == options_all, "supported=%lx, expected %lx\n", supported, options_all); + ok(enabled == options_set, "enabled=%lx, expected %lx\n", enabled, options_set);
IObjectSafety_Release(safety); } @@ -702,7 +702,7 @@ static void _parse_script_a(unsigned line, IActiveScriptParse *parser, const cha str = a2bstr(script); hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, 0, NULL, NULL); SysFreeString(str); - ok_(__FILE__,line)(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok_(__FILE__,line)(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); }
static HRESULT parse_script_ae(IActiveScriptParse *parser, const char *script) @@ -736,27 +736,27 @@ static IActiveScriptParse *create_script(BOOL use_sec_mgr)
hres = CoCreateInstance(&CLSID_VBScript, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, &IID_IActiveScript, (void**)&script); - ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres); + ok(hres == S_OK, "CoCreateInstance failed: %08lx\n", hres); if(FAILED(hres)) return NULL;
set_safety_options((IUnknown*)script, use_sec_mgr);
hres = IActiveScript_QueryInterface(script, &IID_IActiveScriptParse, (void**)&parser); - ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres); + ok(hres == S_OK, "Could not get IActiveScriptParse: %08lx\n", hres);
hres = IActiveScriptParse_InitNew(parser); - ok(hres == S_OK, "InitNew failed: %08x\n", hres); + ok(hres == S_OK, "InitNew failed: %08lx\n", hres);
hres = IActiveScript_SetScriptSite(script, &ActiveScriptSite); - ok(hres == S_OK, "SetScriptSite failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptSite failed: %08lx\n", hres);
hres = IActiveScript_AddNamedItem(script, L"test", SCRIPTITEM_ISVISIBLE|SCRIPTITEM_ISSOURCE|SCRIPTITEM_GLOBALMEMBERS); - ok(hres == S_OK, "AddNamedItem failed: %08x\n", hres); + ok(hres == S_OK, "AddNamedItem failed: %08lx\n", hres);
hres = IActiveScript_SetScriptState(script, SCRIPTSTATE_STARTED); - ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08lx\n", hres);
IActiveScript_Release(script);
@@ -789,7 +789,7 @@ static void test_CreateObject(void) parser = create_script(TRUE);
hres = parse_script_ae(parser, "Call CreateObject("Wine.TestABC")"); - ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08x\n", hres); + ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08lx\n", hres);
IActiveScriptParse_Release(parser);
@@ -798,7 +798,7 @@ static void test_CreateObject(void)
SET_EXPECT(Host_QS_SecMgr); hres = parse_script_ae(parser, "Call CreateObject("Wine.Test")"); - ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08x\n", hres); + ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08lx\n", hres); CHECK_CALLED(Host_QS_SecMgr);
IActiveScriptParse_Release(parser); @@ -809,7 +809,7 @@ static void test_CreateObject(void) SET_EXPECT(Host_QS_SecMgr); SET_EXPECT(ProcessUrlAction); hres = parse_script_ae(parser, "Call CreateObject("Wine.Test")"); - ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08x\n", hres); + ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08lx\n", hres); CHECK_CALLED(Host_QS_SecMgr); CHECK_CALLED(ProcessUrlAction);
@@ -821,7 +821,7 @@ static void test_CreateObject(void) SET_EXPECT(Host_QS_SecMgr); SET_EXPECT(ProcessUrlAction); hres = parse_script_ae(parser, "Call CreateObject("Wine.Test")"); - ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08x\n", hres); + ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08lx\n", hres); CHECK_CALLED(Host_QS_SecMgr); CHECK_CALLED(ProcessUrlAction);
@@ -834,7 +834,7 @@ static void test_CreateObject(void) SET_EXPECT(ProcessUrlAction); SET_EXPECT(CreateInstance); hres = parse_script_ae(parser, "Call CreateObject("Wine.Test")"); - ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08x\n", hres); + ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08lx\n", hres); CHECK_CALLED(Host_QS_SecMgr); CHECK_CALLED(ProcessUrlAction); CHECK_CALLED(CreateInstance); @@ -849,7 +849,7 @@ static void test_CreateObject(void) SET_EXPECT(CreateInstance); SET_EXPECT(QueryCustomPolicy); hres = parse_script_ae(parser, "Call CreateObject("Wine.Test")"); - ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08x\n", hres); + ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08lx\n", hres); CHECK_CALLED(Host_QS_SecMgr); CHECK_CALLED(ProcessUrlAction); CHECK_CALLED(CreateInstance); @@ -884,7 +884,7 @@ static void test_CreateObject(void) SET_EXPECT(CreateInstance); SET_EXPECT(QueryCustomPolicy); hres = parse_script_ae(parser, "Call CreateObject("Wine.Test")"); - ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08x\n", hres); + ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08lx\n", hres); CHECK_CALLED(Host_QS_SecMgr); CHECK_CALLED(ProcessUrlAction); CHECK_CALLED(CreateInstance); @@ -896,7 +896,7 @@ static void test_CreateObject(void) SET_EXPECT(CreateInstance); SET_EXPECT(QueryCustomPolicy); hres = parse_script_ae(parser, "Call CreateObject("Wine.Test")"); - ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08x\n", hres); + ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08lx\n", hres); CHECK_CALLED(ProcessUrlAction); CHECK_CALLED(CreateInstance); CHECK_CALLED(QueryCustomPolicy); @@ -908,7 +908,7 @@ static void test_CreateObject(void) SET_EXPECT(CreateInstance); SET_EXPECT(QueryCustomPolicy); hres = parse_script_ae(parser, "Call CreateObject("Wine.Test")"); - ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08x\n", hres); + ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08lx\n", hres); CHECK_CALLED(ProcessUrlAction); CHECK_CALLED(CreateInstance); CHECK_CALLED(QueryCustomPolicy); @@ -953,7 +953,7 @@ static void test_CreateObject(void) SET_EXPECT(QI_IObjectWithSite); SET_EXPECT(SetSite); hres = parse_script_ae(parser, "Call CreateObject("Wine.Test")"); - ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08x\n", hres); + ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08lx\n", hres); CHECK_CALLED(ProcessUrlAction); CHECK_CALLED(CreateInstance); CHECK_CALLED(QueryCustomPolicy); @@ -971,7 +971,7 @@ static void test_GetObject(void) /* Never allowed with security manager */ parser = create_script(TRUE); hres = parse_script_ae(parser, "Call GetObject("clsid:" TESTOBJINST_CLSID "").reportSuccess()"); - ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08x\n", hres); + ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08lx\n", hres); IActiveScriptParse_Release(parser);
parser = create_script(FALSE); @@ -983,14 +983,14 @@ static void test_GetObject(void) if(broken(hres == VB_E_ACCESS_DENIED)) /* 64-bit win8 fails on the first try */ hres = parse_script_ae(parser, "Call GetObject("clsid:" TESTOBJINST_CLSID "").reportSuccess()"); if(hres == HRESULT_FROM_WIN32(ERROR_MOD_NOT_FOUND)) { /* Workaround for broken win2k */ - win_skip("got unexpected error %08x\n", hres); + win_skip("got unexpected error %08lx\n", hres); CLEAR_CALLED(QI_IObjectWithSite); CLEAR_CALLED(SetSite); CLEAR_CALLED(reportSuccess); IActiveScriptParse_Release(parser); return; } - ok(hres == S_OK, "hres = %08x\n", hres); + ok(hres == S_OK, "hres = %08lx\n", hres); CHECK_CALLED(QI_IObjectWithSite); CHECK_CALLED(SetSite); CHECK_CALLED(reportSuccess); @@ -999,7 +999,7 @@ static void test_GetObject(void) SET_EXPECT(QI_IObjectWithSite); SET_EXPECT(SetSite); hres = parse_script_ae(parser, "Call GetObject("clsid:" TESTOBJINST_CLSID "").reportSuccess()"); - ok(hres == E_FAIL, "hres = %08x\n", hres); + ok(hres == E_FAIL, "hres = %08lx\n", hres); CHECK_CALLED(QI_IObjectWithSite); CHECK_CALLED(SetSite);
@@ -1015,7 +1015,7 @@ static void test_GetObject(void) /* Invalid moniker */ parser = create_script(FALSE); hres = parse_script_ae(parser, "Call GetObject("nonexistent:test").reportSuccess()"); - ok(hres == MK_E_SYNTAX, "hres = %08x\n", hres); + ok(hres == MK_E_SYNTAX, "hres = %08lx\n", hres); IActiveScriptParse_Release(parser); }
@@ -1058,11 +1058,11 @@ static BOOL register_activex(void)
hres = CoRegisterClassObject(&CLSID_TestObj, (IUnknown *)&activex_cf, CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, ®id); - ok(hres == S_OK, "Could not register script engine: %08x\n", hres); + ok(hres == S_OK, "Could not register script engine: %08lx\n", hres);
hres = CoRegisterClassObject(&CLSID_TestObjInst, (IUnknown *)&testObj, CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, ®id); - ok(hres == S_OK, "Could not register script engine: %08x\n", hres); + ok(hres == S_OK, "Could not register script engine: %08lx\n", hres);
return TRUE; } diff --git a/dlls/vbscript/tests/run.c b/dlls/vbscript/tests/run.c index bb33e6576ea..556772e1f37 100644 --- a/dlls/vbscript/tests/run.c +++ b/dlls/vbscript/tests/run.c @@ -283,43 +283,43 @@ static void test_disp(IDispatch *disp) HRESULT hres;
hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex); - ok(hres == S_OK, "Could not get IDispatchEx iface: %08x\n", hres); + ok(hres == S_OK, "Could not get IDispatchEx iface: %08lx\n", hres);
str = a2bstr("publicProp"); hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseInsensitive, &public_prop_id); SysFreeString(str); - ok(hres == S_OK, "GetDispID(publicProp) failed: %08x\n", hres); + ok(hres == S_OK, "GetDispID(publicProp) failed: %08lx\n", hres);
str = a2bstr("PUBLICPROP"); hres = IDispatchEx_GetDispID(dispex, str, 0, &id); SysFreeString(str); - ok(hres == S_OK, "GetDispID(PUBLICPROP) failed: %08x\n", hres); - ok(public_prop_id == id, "id = %d\n", public_prop_id); + ok(hres == S_OK, "GetDispID(PUBLICPROP) failed: %08lx\n", hres); + ok(public_prop_id == id, "id = %ld\n", public_prop_id);
str = a2bstr("publicPROP2"); hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseInsensitive, &public_prop2_id); SysFreeString(str); - ok(hres == S_OK, "GetDispID(publicProp2) failed: %08x\n", hres); + ok(hres == S_OK, "GetDispID(publicProp2) failed: %08lx\n", hres);
str = a2bstr("defValGet"); hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseInsensitive, &defvalget_id); SysFreeString(str); - ok(hres == S_OK, "GetDispID(defValGet) failed: %08x\n", hres); - ok(defvalget_id == DISPID_VALUE, "id = %d\n", defvalget_id); + ok(hres == S_OK, "GetDispID(defValGet) failed: %08lx\n", hres); + ok(defvalget_id == DISPID_VALUE, "id = %ld\n", defvalget_id);
str = a2bstr("privateProp"); hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseInsensitive, &id); SysFreeString(str); - ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(privateProp) failed: %08x, expected DISP_E_UNKNOWNNAME\n", hres); - ok(id == -1, "id = %d\n", id); + ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(privateProp) failed: %08lx, expected DISP_E_UNKNOWNNAME\n", hres); + ok(id == -1, "id = %ld\n", id);
str = a2bstr("class_initialize"); hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseInsensitive, &id); SysFreeString(str); - ok(hres == S_OK, "GetDispID(publicProp2) failed: %08x\n", hres); + ok(hres == S_OK, "GetDispID(publicProp2) failed: %08lx\n", hres);
hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYGET|DISPATCH_METHOD, &dp, &v, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); ok(V_VT(&v) == VT_EMPTY, "V_VT(v) = %d\n", V_VT(&v));
V_VT(args) = VT_BOOL; @@ -327,30 +327,30 @@ static void test_disp(IDispatch *disp) dp.cArgs = dp.cNamedArgs = 1; V_VT(&v) = VT_BOOL; hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYPUT, &dp, &v, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); ok(V_VT(&v) == VT_EMPTY, "V_VT(v) = %d\n", V_VT(&v));
dp.cArgs = dp.cNamedArgs = 0; hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYGET|DISPATCH_METHOD, &dp, &v, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); ok(V_VT(&v) == VT_BOOL, "V_VT(v) = %d\n", V_VT(&v)); ok(V_BOOL(&v), "V_BOOL(v) = %x\n", V_BOOL(&v));
dp.cArgs = dp.cNamedArgs = 0; hres = IDispatchEx_Invoke(dispex, public_prop_id, &IID_NULL, 0, DISPATCH_PROPERTYGET|DISPATCH_METHOD, &dp, &v, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); ok(V_VT(&v) == VT_BOOL, "V_VT(v) = %d\n", V_VT(&v)); ok(V_BOOL(&v), "V_BOOL(v) = %x\n", V_BOOL(&v));
dp.cArgs = dp.cNamedArgs = 0; hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYGET, &dp, &v, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); ok(V_VT(&v) == VT_BOOL, "V_VT(v) = %d\n", V_VT(&v)); ok(V_BOOL(&v), "V_BOOL(v) = %x\n", V_BOOL(&v));
dp.cArgs = 1; hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYGET|DISPATCH_METHOD, &dp, &v, &ei, NULL); - ok(hres == DISP_E_MEMBERNOTFOUND, "InvokeEx failed: %08x, expected DISP_E_MEMBERNOTFOUND\n", hres); + ok(hres == DISP_E_MEMBERNOTFOUND, "InvokeEx failed: %08lx, expected DISP_E_MEMBERNOTFOUND\n", hres); ok(V_VT(&v) == VT_EMPTY, "V_VT(v) = %d\n", V_VT(&v));
SET_EXPECT(testobj_value_i); @@ -358,12 +358,12 @@ static void test_disp(IDispatch *disp) V_DISPATCH(args) = (IDispatch*)&testObj; dp.cArgs = dp.cNamedArgs = 1; hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYPUT, &dp, NULL, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); CHECK_CALLED(testobj_value_i);
dp.cArgs = dp.cNamedArgs = 0; hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYGET, &dp, &v, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); ok(V_VT(&v) == VT_I2, "V_VT(v) = %d\n", V_VT(&v)); ok(V_I2(&v) == 0, "V_I2(v) = %d\n", V_I2(&v));
@@ -371,17 +371,17 @@ static void test_disp(IDispatch *disp) V_DISPATCH(args) = (IDispatch*)&testObj; dp.cArgs = dp.cNamedArgs = 1; hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYPUT|DISPATCH_PROPERTYPUTREF, &dp, NULL, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
V_VT(args) = VT_DISPATCH; V_DISPATCH(args) = (IDispatch*)&testObj; dp.cArgs = dp.cNamedArgs = 1; hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYPUTREF, &dp, NULL, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
dp.cArgs = dp.cNamedArgs = 0; hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYGET, &dp, &v, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); ok(V_VT(&v) == VT_DISPATCH, "V_VT(v) = %d\n", V_VT(&v)); ok(V_DISPATCH(&v) == (IDispatch*)&testObj, "V_DISPATCH(v) != testObj\n");
@@ -389,11 +389,11 @@ static void test_disp(IDispatch *disp) V_BOOL(args) = VARIANT_TRUE; dp.cArgs = dp.cNamedArgs = 1; hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYPUT|DISPATCH_PROPERTYPUTREF, &dp, NULL, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
dp.cArgs = dp.cNamedArgs = 0; hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYGET, &dp, &v, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); ok(V_VT(&v) == VT_BOOL, "V_VT(v) = %d\n", V_VT(&v)); ok(V_BOOL(&v) == VARIANT_TRUE, "V_BOOL(v) = %x\n", V_BOOL(&v));
@@ -401,7 +401,7 @@ static void test_disp(IDispatch *disp) V_BOOL(args) = VARIANT_FALSE; dp.cArgs = dp.cNamedArgs = 1; hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYPUTREF, &dp, NULL, &ei, NULL); - ok(hres == DISP_E_EXCEPTION, "InvokeEx failed: %08x, expected DISP_E_EXCEPTION\n", hres); + ok(hres == DISP_E_EXCEPTION, "InvokeEx failed: %08lx, expected DISP_E_EXCEPTION\n", hres);
V_VT(args) = VT_BOOL; V_BOOL(args) = VARIANT_FALSE; @@ -409,124 +409,124 @@ static void test_disp(IDispatch *disp) dp.cNamedArgs = 0; V_VT(&v) = VT_BOOL; hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYPUT, &dp, NULL, &ei, NULL); - ok(hres == DISP_E_PARAMNOTOPTIONAL, "InvokeEx failed: %08x, expected DISP_E_PARAMNOTOPTIONAL\n", hres); + ok(hres == DISP_E_PARAMNOTOPTIONAL, "InvokeEx failed: %08lx, expected DISP_E_PARAMNOTOPTIONAL\n", hres);
str = a2bstr("publicFunction"); hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseInsensitive, &public_func_id); SysFreeString(str); - ok(hres == S_OK, "GetDispID(publicFunction) failed: %08x\n", hres); + ok(hres == S_OK, "GetDispID(publicFunction) failed: %08lx\n", hres); ok(public_func_id != -1, "public_func_id = -1\n");
str = a2bstr("publicSub"); hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseInsensitive, &public_sub_id); SysFreeString(str); - ok(hres == S_OK, "GetDispID(publicSub) failed: %08x\n", hres); + ok(hres == S_OK, "GetDispID(publicSub) failed: %08lx\n", hres); ok(public_sub_id != -1, "public_func_id = -1\n");
dp.cArgs = dp.cNamedArgs = 0; hres = IDispatchEx_InvokeEx(dispex, public_func_id, 0, DISPATCH_PROPERTYGET|DISPATCH_METHOD, &dp, &v, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); ok(V_VT(&v) == VT_I2, "V_VT(v) = %d\n", V_VT(&v)); ok(V_I2(&v) == 4, "V_I2(v) = %d\n", V_I2(&v));
dp.cArgs = dp.cNamedArgs = 0; hres = IDispatchEx_InvokeEx(dispex, public_func_id, 0, DISPATCH_PROPERTYGET, &dp, &v, &ei, NULL); - ok(hres == DISP_E_MEMBERNOTFOUND, "InvokeEx failed: %08x, expected DISP_E_MEMBERNOTFOUND\n", hres); + ok(hres == DISP_E_MEMBERNOTFOUND, "InvokeEx failed: %08lx, expected DISP_E_MEMBERNOTFOUND\n", hres); ok(V_VT(&v) == VT_EMPTY, "V_VT(v) = %d\n", V_VT(&v));
dp.cArgs = dp.cNamedArgs = 0; hres = IDispatchEx_InvokeEx(dispex, public_func_id, 0, DISPATCH_METHOD, &dp, &v, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); ok(V_VT(&v) == VT_I2, "V_VT(v) = %d\n", V_VT(&v)); ok(V_I2(&v) == 4, "V_I2(v) = %d\n", V_I2(&v));
dp.cArgs = dp.cNamedArgs = 0; hres = IDispatchEx_InvokeEx(dispex, public_sub_id, 0, DISPATCH_PROPERTYGET|DISPATCH_METHOD, &dp, &v, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); ok(V_VT(&v) == VT_EMPTY, "V_VT(v) = %d\n", V_VT(&v));
dp.cArgs = dp.cNamedArgs = 0; hres = IDispatchEx_InvokeEx(dispex, public_sub_id, 0, DISPATCH_PROPERTYGET, &dp, &v, &ei, NULL); - ok(hres == DISP_E_MEMBERNOTFOUND, "InvokeEx failed: %08x, expected DISP_E_MEMBERNOTFOUND\n", hres); + ok(hres == DISP_E_MEMBERNOTFOUND, "InvokeEx failed: %08lx, expected DISP_E_MEMBERNOTFOUND\n", hres); ok(V_VT(&v) == VT_EMPTY, "V_VT(v) = %d\n", V_VT(&v));
dp.cArgs = dp.cNamedArgs = 0; hres = IDispatchEx_InvokeEx(dispex, public_sub_id, 0, DISPATCH_METHOD, &dp, &v, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); ok(V_VT(&v) == VT_EMPTY, "V_VT(v) = %d\n", V_VT(&v));
V_VT(args) = VT_BOOL; V_BOOL(args) = VARIANT_TRUE; dp.cArgs = dp.cNamedArgs = 1; hres = IDispatchEx_InvokeEx(dispex, public_sub_id, 0, DISPATCH_PROPERTYPUT, &dp, NULL, &ei, NULL); - ok(FAILED(hres), "InvokeEx succeeded: %08x\n", hres); + ok(FAILED(hres), "InvokeEx succeeded: %08lx\n", hres);
dp.cArgs = dp.cNamedArgs = 0; hres = IDispatchEx_InvokeEx(dispex, public_func_id, 0, DISPATCH_PROPERTYGET|DISPATCH_METHOD, &dp, &v, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); ok(V_VT(&v) == VT_I2, "V_VT(v) = %d\n", V_VT(&v)); ok(V_I2(&v) == 4, "V_I2(v) = %d\n", V_I2(&v));
dp.cArgs = dp.cNamedArgs = 0; hres = IDispatchEx_InvokeEx(dispex, public_func_id, 0, DISPATCH_METHOD, &dp, &v, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); ok(V_VT(&v) == VT_I2, "V_VT(v) = %d\n", V_VT(&v)); ok(V_I2(&v) == 4, "V_I2(v) = %d\n", V_I2(&v));
dp.cArgs = dp.cNamedArgs = 0; hres = IDispatchEx_Invoke(dispex, public_func_id, &IID_NULL, 0, DISPATCH_METHOD, &dp, &v, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); ok(V_VT(&v) == VT_I2, "V_VT(v) = %d\n", V_VT(&v)); ok(V_I2(&v) == 4, "V_I2(v) = %d\n", V_I2(&v));
dp.cArgs = dp.cNamedArgs = 0; hres = IDispatchEx_InvokeEx(dispex, public_sub_id, 0, DISPATCH_PROPERTYGET|DISPATCH_METHOD, &dp, &v, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); ok(V_VT(&v) == VT_EMPTY, "V_VT(v) = %d\n", V_VT(&v));
dp.cArgs = dp.cNamedArgs = 0; hres = IDispatchEx_InvokeEx(dispex, public_sub_id, 0, DISPATCH_METHOD, &dp, &v, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); ok(V_VT(&v) == VT_EMPTY, "V_VT(v) = %d\n", V_VT(&v));
str = a2bstr("privateSub"); hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseInsensitive, &id); SysFreeString(str); - ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(privateSub) failed: %08x, expected DISP_E_UNKNOWNNAME\n", hres); - ok(id == -1, "id = %d\n", id); + ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(privateSub) failed: %08lx, expected DISP_E_UNKNOWNNAME\n", hres); + ok(id == -1, "id = %ld\n", id);
str = a2bstr("dynprop"); hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseInsensitive|fdexNameEnsure, &id); - ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(privateProp) failed: %08x, expected DISP_E_UNKNOWNNAME\n", hres); - ok(id == -1, "id = %d\n", id); + ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(privateProp) failed: %08lx, expected DISP_E_UNKNOWNNAME\n", hres); + ok(id == -1, "id = %ld\n", id); hres = IDispatchEx_GetDispID(dispex, str, fdexNameEnsure, &id); - ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(privateProp) failed: %08x, expected DISP_E_UNKNOWNNAME\n", hres); - ok(id == -1, "id = %d\n", id); + ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(privateProp) failed: %08lx, expected DISP_E_UNKNOWNNAME\n", hres); + ok(id == -1, "id = %ld\n", id); SysFreeString(str);
str = a2bstr("publicProp"); hres = IDispatchEx_GetDispID(dispex, str, 0x80000000|fdexNameCaseInsensitive, &public_prop_id); SysFreeString(str); - ok(hres == S_OK, "GetDispID(publicProp) failed: %08x\n", hres); + ok(hres == S_OK, "GetDispID(publicProp) failed: %08lx\n", hres);
id = 0xdeadbeef; str = a2bstr("publicProp"); hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseSensitive, &id); SysFreeString(str); - ok(hres == S_OK, "GetDispID(publicProp) failed: %08x\n", hres); - ok(id == public_prop_id, "id = %d, expected %d\n", id, public_prop_id); + ok(hres == S_OK, "GetDispID(publicProp) failed: %08lx\n", hres); + ok(id == public_prop_id, "id = %ld, expected %ld\n", id, public_prop_id);
id = 0xdeadbeef; str = a2bstr("publicprop"); hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseSensitive, &id); SysFreeString(str); - ok(hres == S_OK, "GetDispID(publicProp) failed: %08x\n", hres); - ok(id == public_prop_id, "id = %d, expected %d\n", id, public_prop_id); + ok(hres == S_OK, "GetDispID(publicProp) failed: %08lx\n", hres); + ok(id == public_prop_id, "id = %ld, expected %ld\n", id, public_prop_id);
str = a2bstr("gsGetProp"); hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseInsensitive, &gs_getter_id); SysFreeString(str); - ok(hres == S_OK, "GetDispID(publicFunction) failed: %08x\n", hres); + ok(hres == S_OK, "GetDispID(publicFunction) failed: %08lx\n", hres); ok(gs_getter_id != -1, "gs_getter_id = -1\n");
V_VT(args) = VT_BOOL; @@ -535,18 +535,18 @@ static void test_disp(IDispatch *disp) dp.cArgs = 1; V_VT(&v) = VT_I8; hres = IDispatchEx_InvokeEx(dispex, gs_getter_id, 0, DISPATCH_PROPERTYGET, &dp, &v, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); ok(V_VT(&v) == VT_BOOL && V_BOOL(&v), "V_VT(v) = %d\n", V_VT(&v));
hres = IDispatchEx_InvokeEx(dispex, gs_getter_id, 0, DISPATCH_PROPERTYGET, &dp, NULL, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
V_VT(args) = VT_BOOL; V_BOOL(args) = VARIANT_FALSE; dp.cArgs = 1; V_VT(&v) = VT_I8; hres = IDispatchEx_InvokeEx(dispex, gs_getter_id, 0, DISPATCH_PROPERTYGET|DISPATCH_METHOD, &dp, &v, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); ok(V_VT(&v) == VT_BOOL && !V_BOOL(&v), "V_VT(v) = %d\n", V_VT(&v));
V_VT(args) = VT_BOOL; @@ -554,7 +554,7 @@ static void test_disp(IDispatch *disp) V_VT(&v) = VT_I8; dp.cArgs = 1; hres = IDispatchEx_InvokeEx(dispex, gs_getter_id, 0, DISPATCH_METHOD, &dp, &v, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); ok(V_VT(&v) == VT_BOOL && V_BOOL(&v), "V_VT(v) = %d\n", V_VT(&v));
IDispatchEx_Release(dispex); @@ -570,20 +570,20 @@ static void test_safearray(SAFEARRAY *safearray, unsigned indims) todo_wine ok(safearray->fFeatures == (FADF_VARIANT|FADF_HAVEVARTYPE|FADF_FIXEDSIZE|FADF_STATIC), "safearray->fFeatures = %x\n", safearray->fFeatures); - ok(safearray->cbElements == sizeof(VARIANT), "safearray->cbElements = %x\n", safearray->cbElements); - ok(!safearray->cLocks, "safearray->cLocks = %x\n", safearray->cLocks); + ok(safearray->cbElements == sizeof(VARIANT), "safearray->cbElements = %lx\n", safearray->cbElements); + ok(!safearray->cLocks, "safearray->cLocks = %lx\n", safearray->cLocks);
for(i=0; i < safearray->cDims; i++) { - ok(safearray->rgsabound[i].cElements == (indims ? i+4 : 1), "safearray->rgsabound[%d].cElements = %d\n", i, + ok(safearray->rgsabound[i].cElements == (indims ? i+4 : 1), "safearray->rgsabound[%d].cElements = %ld\n", i, safearray->rgsabound[i].cElements); - ok(!safearray->rgsabound[i].lLbound, "safearray->rgsabound[%d].lLbound = %d\n", i, safearray->rgsabound[i].lLbound); + ok(!safearray->rgsabound[i].lLbound, "safearray->rgsabound[%d].lLbound = %ld\n", i, safearray->rgsabound[i].lLbound); } }
#define test_grfdex(a,b) _test_grfdex(__LINE__,a,b) static void _test_grfdex(unsigned line, DWORD grfdex, DWORD expect) { - ok_(__FILE__,line)(grfdex == expect, "grfdex = %x, expected %x\n", grfdex, expect); + ok_(__FILE__,line)(grfdex == expect, "grfdex = %lx, expected %lx\n", grfdex, expect); }
static IDispatchEx enumDisp; @@ -650,7 +650,7 @@ static HRESULT WINAPI EnumVARIANT_Next(IEnumVARIANT *iface, ULONG celt, VARIANT if(strict_dispid_check) CHECK_EXPECT2(Next);
- ok(celt == 1, "celt = %d\n", celt); + ok(celt == 1, "celt = %ld\n", celt); ok(V_VT(rgVar) == VT_EMPTY, "V_VT(rgVar) = %d\n", V_VT(rgVar)); ok(!pCeltFetched, "pCeltFetched = %p\n", pCeltFetched);
@@ -777,7 +777,7 @@ static HRESULT WINAPI DispatchEx_Invoke(IDispatchEx *iface, DISPID dispIdMember,
static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex) { - ok(0, "unexpected call %s %x\n", wine_dbgstr_w(bstrName), grfdex); + ok(0, "unexpected call %s %lx\n", wine_dbgstr_w(bstrName), grfdex); return E_NOTIMPL; }
@@ -820,7 +820,7 @@ static HRESULT WINAPI DispatchEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DW static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) { - ok(0, "unexpected call %d\n", id); + ok(0, "unexpected call %ld\n", id); return E_NOTIMPL; }
@@ -926,7 +926,7 @@ static HRESULT WINAPI testObj_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
ok(pdp->cArgs == 3, "cArgs = %d\n", pdp->cArgs); ok(pdp->cNamedArgs == 1, "cNamedArgs = %d\n", pdp->cNamedArgs); - ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %d\n", pdp->rgdispidNamedArgs[0]); + ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %ld\n", pdp->rgdispidNamedArgs[0]); ok(!pvarRes, "pvarRes != NULL\n"); ok(pei != NULL, "pei == NULL\n");
@@ -965,7 +965,7 @@ static HRESULT WINAPI testObj_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, ok(pdp->rgdispidNamedArgs != NULL, "rgdispidNamedArgs == NULL\n"); ok(pdp->cArgs == 1, "cArgs = %d\n", pdp->cArgs); ok(pdp->cNamedArgs == 1, "cNamedArgs = %d\n", pdp->cNamedArgs); - ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %d\n", pdp->rgdispidNamedArgs[0]); + ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %ld\n", pdp->rgdispidNamedArgs[0]); ok(!pvarRes, "pvarRes != NULL\n"); ok(pei != NULL, "pei == NULL\n");
@@ -979,7 +979,7 @@ static HRESULT WINAPI testObj_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, return S_OK; }
- ok(0, "unexpected call %d\n", id); + ok(0, "unexpected call %ld\n", id); return E_FAIL; }
@@ -1064,7 +1064,7 @@ static HRESULT WINAPI collectionObj_InvokeEx(IDispatchEx *iface, DISPID id, LCID return S_OK; }
- ok(0, "unexpected call %d\n", id); + ok(0, "unexpected call %ld\n", id); return E_NOTIMPL; }
@@ -1168,7 +1168,7 @@ static HRESULT WINAPI Global_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD if(get_dispid(bstrName, dispids, ARRAY_SIZE(dispids), pid)) return S_OK; if(strict_dispid_check && wcscmp(bstrName, L"x")) - ok(0, "unexpected call %s %x\n", wine_dbgstr_w(bstrName), grfdex); + ok(0, "unexpected call %s %lx\n", wine_dbgstr_w(bstrName), grfdex); return DISP_E_UNKNOWNNAME; }
@@ -1275,7 +1275,7 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, ok(pdp->rgdispidNamedArgs != NULL, "rgdispidNamedArgs == NULL\n"); ok(pdp->cArgs == 1, "cArgs = %d\n", pdp->cArgs); ok(pdp->cNamedArgs == 1, "cNamedArgs = %d\n", pdp->cNamedArgs); - ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %d\n", pdp->rgdispidNamedArgs[0]); + ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %ld\n", pdp->rgdispidNamedArgs[0]); ok(!pvarRes, "pvarRes != NULL\n"); ok(pei != NULL, "pei == NULL\n");
@@ -1292,7 +1292,7 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, ok(pdp->rgdispidNamedArgs != NULL, "rgdispidNamedArgs == NULL\n"); ok(pdp->cArgs == 1, "cArgs = %d\n", pdp->cArgs); ok(pdp->cNamedArgs == 1, "cNamedArgs = %d\n", pdp->cNamedArgs); - ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %d\n", pdp->rgdispidNamedArgs[0]); + ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %ld\n", pdp->rgdispidNamedArgs[0]); ok(!pvarRes, "pvarRes != NULL\n"); ok(pei != NULL, "pei == NULL\n");
@@ -1309,7 +1309,7 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, ok(pdp->rgdispidNamedArgs != NULL, "rgdispidNamedArgs == NULL\n"); ok(pdp->cArgs == 1, "cArgs = %d\n", pdp->cArgs); ok(pdp->cNamedArgs == 1, "cNamedArgs = %d\n", pdp->cNamedArgs); - ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %d\n", pdp->rgdispidNamedArgs[0]); + ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %ld\n", pdp->rgdispidNamedArgs[0]); ok(!pvarRes, "pvarRes != NULL\n"); ok(pei != NULL, "pei == NULL\n");
@@ -1408,7 +1408,7 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, ok(pdp->rgdispidNamedArgs != NULL, "rgdispidNamedArgs == NULL\n"); ok(pdp->cArgs == 3, "cArgs = %d\n", pdp->cArgs); ok(pdp->cNamedArgs == 1, "cNamedArgs = %d\n", pdp->cNamedArgs); - ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %d\n", pdp->rgdispidNamedArgs[0]); + ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %ld\n", pdp->rgdispidNamedArgs[0]); ok(!pvarRes, "pvarRes != NULL\n"); ok(pei != NULL, "pei == NULL\n");
@@ -1431,7 +1431,7 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, ok(pdp->rgdispidNamedArgs != NULL, "rgdispidNamedArgs == NULL\n"); ok(pdp->cArgs == 2, "cArgs = %d\n", pdp->cArgs); ok(pdp->cNamedArgs == 1, "cNamedArgs = %d\n", pdp->cNamedArgs); - ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %d\n", pdp->rgdispidNamedArgs[0]); + ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %ld\n", pdp->rgdispidNamedArgs[0]); ok(!pvarRes, "pvarRes != NULL\n"); ok(pei != NULL, "pei == NULL\n");
@@ -1452,7 +1452,7 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, ok(pdp->rgdispidNamedArgs != NULL, "rgdispidNamedArgs == NULL\n"); ok(pdp->cArgs == 2, "cArgs = %d\n", pdp->cArgs); ok(pdp->cNamedArgs == 1, "cNamedArgs = %d\n", pdp->cNamedArgs); - ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %d\n", pdp->rgdispidNamedArgs[0]); + ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %ld\n", pdp->rgdispidNamedArgs[0]); ok(!pvarRes, "pvarRes != NULL\n"); ok(pei != NULL, "pei == NULL\n");
@@ -1568,7 +1568,7 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, ok(opt == 1 || opt == 2, "opt = %d\n", opt); v = pdp->rgvarg+pdp->cArgs-opt; ok(V_VT(v) == VT_ERROR, "V_VT(v) = %d\n", V_VT(v)); - ok(V_ERROR(v) == DISP_E_PARAMNOTFOUND, "V_ERROR(v) = %08x\n", V_ERROR(v)); + ok(V_ERROR(v) == DISP_E_PARAMNOTFOUND, "V_ERROR(v) = %08lx\n", V_ERROR(v)); return S_OK; } case DISPID_GLOBAL_GLOBALCALLBACK: { @@ -1594,18 +1594,18 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, ok(pei != NULL, "pei == NULL\n");
hres = IDispatch_QueryInterface(V_DISPATCH(pdp->rgvarg), &IID_IDispatchEx, (void**)&dispex); - ok(hres == S_OK, "Could not get IDispatchEx iface: %08x\n", hres); + ok(hres == S_OK, "Could not get IDispatchEx iface: %08lx\n", hres);
str = SysAllocString(L"callback"); hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseInsensitive, &id); - ok(hres == S_OK, "GetDispID failed: %08x\n", hres); + ok(hres == S_OK, "GetDispID failed: %08lx\n", hres); SysFreeString(str);
SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); memset(&ei, 0, sizeof(ei)); hres = IDispatchEx_InvokeEx(dispex, id, 0, DISPATCH_METHOD, &dp, &v, &ei, pspCaller); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); ok(V_VT(&v) == VT_BOOL, "V_VT(v) = %d\n", V_VT(&v)); @@ -1644,40 +1644,40 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, ok(V_VT(pdp->rgvarg) == VT_DISPATCH, "V_VT(pdp->rgvarg) = %d\n", V_VT(pdp->rgvarg)); disp = V_DISPATCH(pdp->rgvarg); hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex); - ok(hres == E_NOINTERFACE, "Could not get IDispatchEx iface: %08x\n", hres); + ok(hres == E_NOINTERFACE, "Could not get IDispatchEx iface: %08lx\n", hres);
hres = IDispatch_GetTypeInfoCount(disp, &count); - ok(hres == S_OK, "GetTypeInfoCount returned: %08x\n", hres); + ok(hres == S_OK, "GetTypeInfoCount returned: %08lx\n", hres); ok(count == 0, "count = %u\n", count);
hres = IDispatch_GetTypeInfo(disp, 0, 0, &typeinfo); - ok(hres == DISP_E_BADINDEX, "GetTypeInfo returned: %08x\n", hres); + ok(hres == DISP_E_BADINDEX, "GetTypeInfo returned: %08lx\n", hres);
for(i = 0; i < ARRAY_SIZE(props); i++) { names[0] = props[i]; hres = IDispatch_GetIDsOfNames(disp, &IID_NULL, names, 1, 0, &id); - ok(hres == S_OK, "GetIDsOfNames failed: %08x\n", hres); - ok(id == i + 1, "%s id = %u\n", wine_dbgstr_w(props[i]), id); + ok(hres == S_OK, "GetIDsOfNames failed: %08lx\n", hres); + ok(id == i + 1, "%s id = %lu\n", wine_dbgstr_w(props[i]), id); }
memset(&dp, 0, sizeof(dp)); memset(&ei, 0, sizeof(ei)); V_VT(&v) = VT_ERROR; hres = IDispatch_Invoke(disp, 5, &IID_NULL, 0, DISPATCH_PROPERTYGET, &dp, &v, &ei, NULL); - ok(hres == S_OK, "Invoke failed: %08x\n", hres); + ok(hres == S_OK, "Invoke failed: %08lx\n", hres); ok(V_VT(&v) == VT_I4, "V_VT(v) = %d\n", V_VT(&v)); - ok(V_I4(&v) == 1, "V_I4(v) = %d\n", V_I4(&v)); + ok(V_I4(&v) == 1, "V_I4(v) = %ld\n", V_I4(&v)); hres = IDispatch_Invoke(disp, DISPID_VALUE, &IID_NULL, 0, DISPATCH_PROPERTYGET, &dp, &v, &ei, NULL); - ok(hres == S_OK, "Invoke failed: %08x\n", hres); + ok(hres == S_OK, "Invoke failed: %08lx\n", hres); ok(V_VT(&v) == VT_I4, "V_VT(v) = %d\n", V_VT(&v)); - ok(V_I4(&v) == 1, "V_I4(v) = %d\n", V_I4(&v)); + ok(V_I4(&v) == 1, "V_I4(v) = %ld\n", V_I4(&v));
dp.rgvarg = &v; V_VT(&v) = VT_I4; V_I4(&v) = 6; V_VT(&r) = VT_EMPTY; hres = IDispatch_Invoke(disp, DISPID_VALUE, &IID_NULL, 6, DISPATCH_METHOD|DISPATCH_PROPERTYGET, &dp, &r, &ei, NULL); - ok(hres == S_OK, "Invoke failed: %08x\n", hres); + ok(hres == S_OK, "Invoke failed: %08lx\n", hres); return S_OK; } case DISPID_GLOBAL_UNKOBJ: @@ -1686,7 +1686,7 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, return S_OK; }
- ok(0, "unexpected call %d\n", id); + ok(0, "unexpected call %ld\n", id); return DISP_E_MEMBERNOTFOUND; }
@@ -1828,7 +1828,7 @@ static HRESULT WINAPI ActiveScriptSite_GetLCID(IActiveScriptSite *iface, LCID *p static HRESULT WINAPI ActiveScriptSite_GetItemInfo(IActiveScriptSite *iface, LPCOLESTR pstrName, DWORD dwReturnMask, IUnknown **ppiunkItem, ITypeInfo **ppti) { - ok(dwReturnMask == SCRIPTINFO_IUNKNOWN, "unexpected dwReturnMask %x\n", dwReturnMask); + ok(dwReturnMask == SCRIPTINFO_IUNKNOWN, "unexpected dwReturnMask %lx\n", dwReturnMask); ok(!ppti, "ppti != NULL\n");
if(lstrcmpW(pstrName, L"test")) @@ -1864,19 +1864,19 @@ static HRESULT WINAPI ActiveScriptSite_OnScriptError(IActiveScriptSite *iface, I HRESULT hr = onerror_hres, hres;
hres = IActiveScriptError_GetSourcePosition(pscripterror, NULL, &error_line, &error_char); - ok(hres == S_OK, "GetSourcePosition failed: %08x\n", hres); + ok(hres == S_OK, "GetSourcePosition failed: %08lx\n", hres);
if(!expect_OnScriptError) { EXCEPINFO info;
hres = IActiveScriptError_GetExceptionInfo(pscripterror, &info); if(SUCCEEDED(hres)) - trace("Error in line %u: %x %s\n", error_line + 1, info.wCode, wine_dbgstr_w(info.bstrDescription)); + trace("Error in line %lu: %x %s\n", error_line + 1, info.wCode, wine_dbgstr_w(info.bstrDescription)); }else { IDispatchEx *dispex;
hres = IActiveScriptError_QueryInterface(pscripterror, &IID_IDispatchEx, (void**)&dispex); - ok(hres == E_NOINTERFACE, "QI(IDispatchEx) returned: %08x\n", hres); + ok(hres == E_NOINTERFACE, "QI(IDispatchEx) returned: %08lx\n", hres); }
if(store_script_error) { @@ -1928,7 +1928,7 @@ static IActiveScript *create_script(void)
hres = CoCreateInstance(&CLSID_VBScript, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, &IID_IActiveScript, (void**)&script); - ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres); + ok(hres == S_OK, "CoCreateInstance failed: %08lx\n", hres);
return script; } @@ -1944,24 +1944,24 @@ static IActiveScript *create_and_init_script(DWORD flags, BOOL start) return NULL;
hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (void**)&parser); - ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres); + ok(hres == S_OK, "Could not get IActiveScriptParse: %08lx\n", hres);
hres = IActiveScriptParse_InitNew(parser); - ok(hres == S_OK, "InitNew failed: %08x\n", hres); + ok(hres == S_OK, "InitNew failed: %08lx\n", hres);
IActiveScriptParse_Release(parser);
hres = IActiveScript_SetScriptSite(engine, &ActiveScriptSite); - ok(hres == S_OK, "SetScriptSite failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptSite failed: %08lx\n", hres);
hres = IActiveScript_AddNamedItem(engine, L"test", SCRIPTITEM_ISVISIBLE|SCRIPTITEM_ISSOURCE|flags); - ok(hres == S_OK, "AddNamedItem failed: %08x\n", hres); + ok(hres == S_OK, "AddNamedItem failed: %08lx\n", hres);
if (start) { hres = IActiveScript_SetScriptState(engine, SCRIPTSTATE_STARTED); - ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08lx\n", hres); }
return engine; @@ -1973,10 +1973,10 @@ static void close_script(IActiveScript *script) HRESULT hres;
hres = IActiveScript_Close(script); - ok(hres == S_OK, "Close failed: %08x\n", hres); + ok(hres == S_OK, "Close failed: %08lx\n", hres);
ref = IActiveScript_Release(script); - ok(!ref, "ref=%u\n", ref); + ok(!ref, "ref=%lu\n", ref); }
static HRESULT parse_script(DWORD flags, BSTR script_str, const WCHAR *delim) @@ -1991,7 +1991,7 @@ static HRESULT parse_script(DWORD flags, BSTR script_str, const WCHAR *delim) return S_OK;
hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (void**)&parser); - ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres); + ok(hres == S_OK, "Could not get IActiveScriptParse: %08lx\n", hres); if (FAILED(hres)) { IActiveScript_Release(engine); @@ -1999,7 +1999,7 @@ static HRESULT parse_script(DWORD flags, BSTR script_str, const WCHAR *delim) }
hres = IActiveScript_GetScriptDispatch(engine, NULL, &script_disp); - ok(hres == S_OK, "GetScriptDispatch failed: %08x\n", hres); + ok(hres == S_OK, "GetScriptDispatch failed: %08lx\n", hres); ok(script_disp != NULL, "script_disp == NULL\n"); ok(script_disp != (IDispatch*)&Global, "script_disp == Global\n");
@@ -2022,7 +2022,7 @@ static void parse_script_af(DWORD flags, const char *src) tmp = a2bstr(src); hres = parse_script(flags, tmp, NULL); SysFreeString(tmp); - ok(hres == S_OK, "parse_script failed: %08x\n", hres); + ok(hres == S_OK, "parse_script failed: %08lx\n", hres); }
static HRESULT parse_script_ar(const char *src) @@ -2049,16 +2049,16 @@ static void test_parse_context(void) return;
hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (void**)&parser); - ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres); + ok(hres == S_OK, "Could not get IActiveScriptParse: %08lx\n", hres);
/* NULL code text succeeds but does nothing */ hres = IActiveScriptParse_ParseScriptText(parser, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
/* unknown identifier context is not a valid argument */ str = a2bstr("Call reportSuccess()\n"); hres = IActiveScriptParse_ParseScriptText(parser, str, L"y", NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == E_INVALIDARG, "ParseScriptText failed: %08x\n", hres); + ok(hres == E_INVALIDARG, "ParseScriptText failed: %08lx\n", hres); SysFreeString(str);
str = a2bstr("class Cl\n" @@ -2069,27 +2069,27 @@ static void test_parse_context(void) "Dim x\n" "set x = new Cl\n"); hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); SysFreeString(str);
/* known global variable is not a valid context */ str = a2bstr("Call reportSuccess()\n"); hres = IActiveScriptParse_ParseScriptText(parser, str, L"x", NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == E_INVALIDARG, "ParseScriptText failed: %08x\n", hres); + ok(hres == E_INVALIDARG, "ParseScriptText failed: %08lx\n", hres); SysFreeString(str);
SET_EXPECT(global_success_d); SET_EXPECT(global_success_i); str = a2bstr("Call reportSuccess()\n"); hres = IActiveScriptParse_ParseScriptText(parser, str, L"test", NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); SysFreeString(str); CHECK_CALLED(global_success_d); CHECK_CALLED(global_success_i);
IActiveScriptParse_Release(parser); close_script(engine); - ok(global_ref == 1, "global_ref = %u\n", global_ref); + ok(global_ref == 1, "global_ref = %lu\n", global_ref); }
static void parse_script_a(const char *src) @@ -2106,7 +2106,7 @@ static void _parse_htmlscript_a(unsigned line, const char *src) tmp = a2bstr(src); hres = parse_script(SCRIPTITEM_GLOBALMEMBERS, tmp, L"</SCRIPT>"); SysFreeString(tmp); - ok_(__FILE__,line)(hres == S_OK, "parse_script failed: %08x\n", hres); + ok_(__FILE__,line)(hres == S_OK, "parse_script failed: %08lx\n", hres); }
static IDispatchEx *parse_procedure(IActiveScriptParseProcedure2 *parse_proc, const char *src, DWORD flags) @@ -2120,12 +2120,12 @@ static IDispatchEx *parse_procedure(IActiveScriptParseProcedure2 *parse_proc, co hres = IActiveScriptParseProcedure2_ParseProcedureText(parse_proc, str, NULL, L"", NULL, NULL, L""", 0, 0, SCRIPTPROC_HOSTMANAGESSOURCE|SCRIPTPROC_IMPLICIT_THIS|SCRIPTPROC_IMPLICIT_PARENTS|flags, &disp); SysFreeString(str); - ok(hres == S_OK, "ParseProcedureText failed: %08x\n", hres); + ok(hres == S_OK, "ParseProcedureText failed: %08lx\n", hres); ok(disp != NULL, "disp = NULL\n");
hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex); IDispatch_Release(disp); - ok(hres == S_OK, "Could not get IDispatchEx iface: %08x\n", hres); + ok(hres == S_OK, "Could not get IDispatchEx iface: %08lx\n", hres);
return dispex; } @@ -2146,10 +2146,10 @@ static void test_procedures(void) script = create_and_init_script(0, TRUE);
hres = IActiveScript_QueryInterface(script, &IID_IActiveScriptParseProcedure2, (void**)&parse_proc); - ok(hres == S_OK, "Could not get IActiveScriptParseProcedure2 iface: %08x\n", hres); + ok(hres == S_OK, "Could not get IActiveScriptParseProcedure2 iface: %08lx\n", hres);
hres = IActiveScriptParseProcedure2_ParseProcedureText(parse_proc, NULL, NULL, L"", NULL, NULL, NULL, 0, 0, 0, &disp); - ok(hres == S_OK, "ParseProcedureText failed: %08x\n", hres); + ok(hres == S_OK, "ParseProcedureText failed: %08lx\n", hres); IDispatch_Release(disp);
proc = parse_procedure(parse_proc, "dim x\nif true then x=false", 0); @@ -2158,7 +2158,7 @@ static void test_procedures(void) SET_EXPECT(OnLeaveScript); V_VT(&v) = VT_EMPTY; hres = IDispatchEx_InvokeEx(proc, DISPID_VALUE, 0, DISPATCH_METHOD, &dp, &v, &ei, &caller_sp); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); VariantClear(&v); @@ -2169,7 +2169,7 @@ static void test_procedures(void) SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); hres = IDispatchEx_InvokeEx(proc, DISPID_VALUE, 0, DISPATCH_METHOD, &dp, &v, &ei, &caller_sp); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); ok(V_VT(&v) == VT_BSTR, "Expected VT_BSTR, got %s\n", vt2a(&v)); @@ -2208,7 +2208,7 @@ static void test_callbacks(void) script = create_and_init_script(SCRIPTITEM_GLOBALMEMBERS, TRUE);
hres = IActiveScript_QueryInterface(script, &IID_IActiveScriptParse, (void**)&parser); - ok(hres == S_OK, "Could not get IActiveScriptParseProcedure2 iface: %08x\n", hres); + ok(hres == S_OK, "Could not get IActiveScriptParseProcedure2 iface: %08lx\n", hres);
SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); @@ -2226,27 +2226,27 @@ static void test_callbacks(void) L" call ok(err.number = 2, "err.number = " & err.number)\n" L"end function\n", NULL, NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript);
hres = IActiveScript_GetScriptDispatch(script, NULL, &disp); - ok(hres == S_OK, "GetScriptDispatch failed: %08x\n", hres); + ok(hres == S_OK, "GetScriptDispatch failed: %08lx\n", hres);
hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex); - ok(hres == S_OK, "Could not get IDispatchEx iface: %08x\n", hres); + ok(hres == S_OK, "Could not get IDispatchEx iface: %08lx\n", hres); IDispatch_Release(disp);
str = SysAllocString(L"callGlobalCallback"); hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseInsensitive, &id); - ok(hres == S_OK, "GetDispID failed: %08x\n", hres); + ok(hres == S_OK, "GetDispID failed: %08lx\n", hres); SysFreeString(str);
SET_EXPECT(OnEnterScript); /* OnLeaveScript will be set in global callback */ SET_EXPECT(global_globalcallback_i); hres = IDispatchEx_InvokeEx(dispex, id, 0, DISPATCH_METHOD, &dp, &v, &ei, &caller_sp); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); /* OnEnterScript was checked in global callback */ CHECK_CALLED(OnLeaveScript); CHECK_CALLED(global_globalcallback_i); @@ -2258,7 +2258,7 @@ static void test_callbacks(void) SET_EXPECT(OnScriptError); hres = IActiveScriptParse_ParseScriptText(parser, L"err.raise 2\n", NULL, NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == MAKE_VBSERROR(2), "ParseScriptText failed: %08x\n", hres); + ok(hres == MAKE_VBSERROR(2), "ParseScriptText failed: %08lx\n", hres); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); CHECK_CALLED(OnScriptError); @@ -2272,14 +2272,14 @@ static void test_callbacks(void) L"call ok(err.number = 0, "err.number = " & err.number)\n" L"err.raise &h86664004&, "src", "desc", "help", 1\n", NULL, NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == SCRIPT_E_RECORDED, "ParseScriptText failed: %08x\n", hres); + ok(hres == SCRIPT_E_RECORDED, "ParseScriptText failed: %08lx\n", hres); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); CHECK_CALLED(OnScriptError);
memset(&ei, 0xcc, sizeof(ei)); hres = IActiveScriptError_GetExceptionInfo(error1, &ei); - ok(hres == S_OK, "GetExceptionInfo returned %08x\n", hres); + ok(hres == S_OK, "GetExceptionInfo returned %08lx\n", hres); ok(!ei.wCode, "wCode = %x\n", ei.wCode); ok(!ei.wReserved, "wReserved = %x\n", ei.wReserved); if(is_english) { @@ -2289,26 +2289,26 @@ static void test_callbacks(void) "bstrDescription = %s\n", wine_dbgstr_w(ei.bstrDescription)); } ok(!ei.bstrHelpFile, "bstrHelpFile = %s\n", wine_dbgstr_w(ei.bstrHelpFile)); - ok(!ei.dwHelpContext, "dwHelpContext = %x\n", ei.dwHelpContext); + ok(!ei.dwHelpContext, "dwHelpContext = %lx\n", ei.dwHelpContext); ok(!ei.pvReserved, "pvReserved = %p\n", ei.pvReserved); ok(!ei.pfnDeferredFillIn, "pfnDeferredFillIn = %p\n", ei.pfnDeferredFillIn); - ok(ei.scode == MAKE_VBSERROR(2), "scode = %x\n", ei.scode); + ok(ei.scode == MAKE_VBSERROR(2), "scode = %lx\n", ei.scode); free_ei(&ei);
IActiveScriptError_Release(error1);
memset(&ei, 0xcc, sizeof(ei)); hres = IActiveScriptError_GetExceptionInfo(error2, &ei); - ok(hres == S_OK, "GetExceptionInfo returned %08x\n", hres); + ok(hres == S_OK, "GetExceptionInfo returned %08lx\n", hres); ok(!ei.wCode, "wCode = %x\n", ei.wCode); ok(!ei.wReserved, "wReserved = %x\n", ei.wReserved); ok(!wcscmp(ei.bstrSource, L"src"), "bstrSource = %s\n", wine_dbgstr_w(ei.bstrSource)); ok(!wcscmp(ei.bstrDescription, L"desc"), "bstrDescription = %s\n", wine_dbgstr_w(ei.bstrDescription)); ok(!wcscmp(ei.bstrHelpFile, L"help"), "bstrHelpFile = %s\n", wine_dbgstr_w(ei.bstrHelpFile)); - ok(ei.dwHelpContext == 1, "dwHelpContext = %x\n", ei.dwHelpContext); + ok(ei.dwHelpContext == 1, "dwHelpContext = %lx\n", ei.dwHelpContext); ok(!ei.pvReserved, "pvReserved = %p\n", ei.pvReserved); ok(!ei.pfnDeferredFillIn, "pfnDeferredFillIn = %p\n", ei.pfnDeferredFillIn); - ok(ei.scode == SCRIPT_E_RECORDED, "scode = %x\n", ei.scode); + ok(ei.scode == SCRIPT_E_RECORDED, "scode = %lx\n", ei.scode); free_ei(&ei);
IActiveScriptError_Release(error2); @@ -2318,7 +2318,7 @@ static void test_callbacks(void) SET_EXPECT(OnScriptError); hres = IActiveScriptParse_ParseScriptText(parser, L"err.raise &hffff&\n", NULL, NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == MAKE_VBSERROR(0xffff), "ParseScriptText failed: %08x\n", hres); + ok(hres == MAKE_VBSERROR(0xffff), "ParseScriptText failed: %08lx\n", hres); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); CHECK_CALLED(OnScriptError); @@ -2328,7 +2328,7 @@ static void test_callbacks(void) SET_EXPECT(OnScriptError); hres = IActiveScriptParse_ParseScriptText(parser, L"err.raise &h80102030&\n", NULL, NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == 0x80102030, "ParseScriptText failed: %08x\n", hres); + ok(hres == 0x80102030, "ParseScriptText failed: %08lx\n", hres); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); CHECK_CALLED(OnScriptError); @@ -2341,7 +2341,7 @@ static void test_callbacks(void) L"err.raise 1\n" L"testErrorObject err\n", NULL, NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); CHECK_CALLED(OnEnterScript); CHECK_CALLED(global_testerrorobject_i); CHECK_CALLED(OnLeaveScript); @@ -2367,20 +2367,20 @@ static void test_gc(void) return;
hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (void**)&parser); - ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres); + ok(hres == S_OK, "Could not get IActiveScriptParse: %08lx\n", hres);
hres = IActiveScriptParse_InitNew(parser); - ok(hres == S_OK, "InitNew failed: %08x\n", hres); + ok(hres == S_OK, "InitNew failed: %08lx\n", hres);
hres = IActiveScript_SetScriptSite(engine, &ActiveScriptSite); - ok(hres == S_OK, "SetScriptSite failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptSite failed: %08lx\n", hres);
hres = IActiveScript_AddNamedItem(engine, L"test", SCRIPTITEM_ISVISIBLE|SCRIPTITEM_ISSOURCE|SCRIPTITEM_GLOBALMEMBERS); - ok(hres == S_OK, "AddNamedItem failed: %08x\n", hres); + ok(hres == S_OK, "AddNamedItem failed: %08lx\n", hres);
hres = IActiveScript_SetScriptState(engine, SCRIPTSTATE_STARTED); - ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08lx\n", hres);
src = a2bstr( "class C\n" @@ -2395,13 +2395,13 @@ static void test_gc(void) "set x = nothing\n");
hres = IActiveScriptParse_ParseScriptText(parser, src, NULL, NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); SysFreeString(src);
SET_EXPECT(global_success_d); SET_EXPECT(global_success_i); hres = IActiveScript_Close(engine); - ok(hres == S_OK, "Close failed: %08x\n", hres); + ok(hres == S_OK, "Close failed: %08lx\n", hres); CHECK_CALLED(global_success_d); CHECK_CALLED(global_success_i);
@@ -2547,13 +2547,13 @@ static void test_parse_errors(void)
SET_EXPECT(OnScriptError); hres = parse_script_ar(invalid_scripts[i].src); - ok(hres == SCRIPT_E_REPORTED, "[%u] script returned: %08x\n", i, hres); + ok(hres == SCRIPT_E_REPORTED, "[%u] script returned: %08lx\n", i, hres); CHECK_CALLED(OnScriptError);
- ok(error_line == invalid_scripts[i].error_line, "[%u] error line %u expected %u\n", + ok(error_line == invalid_scripts[i].error_line, "[%u] error line %lu expected %u\n", i, error_line, invalid_scripts[i].error_line); todo_wine_if(invalid_scripts[i].error_char < 0) - ok(error_char == abs(invalid_scripts[i].error_char), "[%u] error char %d expected %d\n", + ok(error_char == abs(invalid_scripts[i].error_char), "[%u] error char %ld expected %d\n", i, error_char, invalid_scripts[i].error_char); } } @@ -2620,7 +2620,7 @@ static HRESULT test_global_vars_ref(BOOL use_close) return S_OK;
hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (void**)&parser); - ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres); + ok(hres == S_OK, "Could not get IActiveScriptParse: %08lx\n", hres); if (FAILED(hres)) { IActiveScript_Release(engine); @@ -2628,16 +2628,16 @@ static HRESULT test_global_vars_ref(BOOL use_close) }
hres = IActiveScriptParse_InitNew(parser); - ok(hres == S_OK, "InitNew failed: %08x\n", hres); + ok(hres == S_OK, "InitNew failed: %08lx\n", hres);
hres = IActiveScript_SetScriptSite(engine, &ActiveScriptSite); - ok(hres == S_OK, "SetScriptSite failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptSite failed: %08lx\n", hres);
hres = IActiveScript_AddNamedItem(engine, L"test", SCRIPTITEM_ISVISIBLE|SCRIPTITEM_ISSOURCE|SCRIPTITEM_GLOBALMEMBERS); - ok(hres == S_OK, "AddNamedItem failed: %08x\n", hres); + ok(hres == S_OK, "AddNamedItem failed: %08lx\n", hres);
hres = IActiveScript_SetScriptState(engine, SCRIPTSTATE_STARTED); - ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08lx\n", hres);
refobj_ref = 0;
@@ -2649,18 +2649,18 @@ static HRESULT test_global_vars_ref(BOOL use_close)
if(use_close) { hres = IActiveScript_Close(engine); - ok(hres == S_OK, "Close failed: %08x\n", hres); + ok(hres == S_OK, "Close failed: %08lx\n", hres); }else { hres = IActiveScript_SetScriptState(engine, SCRIPTSTATE_UNINITIALIZED); - ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08lx\n", hres); }
- ok(!refobj_ref, "refobj_ref = %d\n", refobj_ref); + ok(!refobj_ref, "refobj_ref = %ld\n", refobj_ref);
IActiveScript_Release(engine);
ref = IActiveScriptParse_Release(parser); - ok(!ref, "ref=%d\n", ref); + ok(!ref, "ref=%ld\n", ref); return hres; }
@@ -2678,7 +2678,7 @@ static void test_isexpression(void) return;
hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (void**)&parser); - ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres); + ok(hres == S_OK, "Could not get IActiveScriptParse: %08lx\n", hres); if (FAILED(hres)) { close_script(engine); @@ -2687,25 +2687,25 @@ static void test_isexpression(void)
/* Expression when script is not started is still executed */ hres = IActiveScript_GetScriptState(engine, &ss); - ok(hres == S_OK, "GetScriptState failed: %08x\n", hres); + ok(hres == S_OK, "GetScriptState failed: %08lx\n", hres); ok(ss == SCRIPTSTATE_INITIALIZED, "Wrong script state %u\n", ss);
str = a2bstr("13"); hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); ok(V_VT(&var) == VT_I2, "Expected VT_I2, got %s\n", vt2a(&var)); ok(V_I2(&var) == 13, "Expected 13, got %d\n", V_I2(&var)); VariantClear(&var); SysFreeString(str);
hres = IActiveScript_SetScriptState(engine, SCRIPTSTATE_STARTED); - ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08lx\n", hres);
/* Empty expressions */ V_VT(&var) = VT_I2; str = a2bstr(""); hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); ok(V_VT(&var) == VT_EMPTY, "Expected VT_EMPTY, got %s\n", vt2a(&var)); VariantClear(&var); SysFreeString(str); @@ -2714,7 +2714,7 @@ static void test_isexpression(void) str = a2bstr("1\n3"); SET_EXPECT(OnScriptError); hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL); - ok(FAILED(hres), "ParseScriptText did not fail: %08x\n", hres); + ok(FAILED(hres), "ParseScriptText did not fail: %08lx\n", hres); CHECK_CALLED(OnScriptError); VariantClear(&var); SysFreeString(str); @@ -2722,10 +2722,10 @@ static void test_isexpression(void) /* Simple numerical expression */ str = a2bstr("(1 + 7) * 2 - 3"); hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, NULL, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); ok(V_VT(&var) == VT_I2, "Expected VT_I2, got %s\n", vt2a(&var)); ok(V_I2(&var) == 13, "Expected 13, got %d\n", V_I2(&var)); VariantClear(&var); @@ -2733,10 +2733,10 @@ static void test_isexpression(void)
/* Without a global host or named item context, "me" returns the script dispatch */ hres = IActiveScript_GetScriptDispatch(engine, NULL, &disp); - ok(hres == S_OK, "GetScriptDispatch failed: %08x\n", hres); + ok(hres == S_OK, "GetScriptDispatch failed: %08lx\n", hres); str = a2bstr("me"); hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); ok(V_VT(&var) == VT_DISPATCH, "Expected VT_DISPATCH, got %s\n", vt2a(&var)); ok(V_DISPATCH(&var) == disp, "Wrong dispatch returned for 'me'\n"); IDispatch_Release(disp); @@ -2747,14 +2747,14 @@ static void test_isexpression(void) V_VT(&var) = VT_I2; str = a2bstr("If True Then foo = 42 Else foo = 0\n"); hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, 0, &var, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); ok(V_VT(&var) == VT_EMPTY, "Expected VT_EMPTY, got %s\n", vt2a(&var)); VariantClear(&var); SysFreeString(str);
str = a2bstr("foo\n\n"); hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); ok(V_VT(&var) == VT_I2, "Expected VT_I2, got %s\n", vt2a(&var)); ok(V_I2(&var) == 42, "Expected 42, got %d\n", V_I2(&var)); VariantClear(&var); @@ -2763,14 +2763,14 @@ static void test_isexpression(void) str = a2bstr("foo : "); SET_EXPECT(OnScriptError); hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL); - ok(FAILED(hres), "ParseScriptText did not fail: %08x\n", hres); + ok(FAILED(hres), "ParseScriptText did not fail: %08lx\n", hres); CHECK_CALLED(OnScriptError); VariantClear(&var); SysFreeString(str);
str = a2bstr(""foo is " & CStr(foo) \n \n\n "); hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); ok(V_VT(&var) == VT_BSTR, "Expected VT_BSTR, got %s\n", vt2a(&var)); ok(!lstrcmpW(V_BSTR(&var), L"foo is 42"), "Wrong string, got %s\n", wine_dbgstr_w(V_BSTR(&var))); VariantClear(&var); @@ -2780,12 +2780,12 @@ static void test_isexpression(void) " test = x + 0.5\n" "End Function\n"); hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); SysFreeString(str);
str = a2bstr("test(4) * 3\n"); hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); ok(V_VT(&var) == VT_R8, "Expected VT_R8, got %s\n", vt2a(&var)); ok(V_R8(&var) == 13.5, "Expected %lf, got %lf\n", 13.5, V_R8(&var)); VariantClear(&var); @@ -2797,12 +2797,12 @@ static void test_isexpression(void) "Set obj = New C\n" "obj.x = True\n"); hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); SysFreeString(str);
str = a2bstr("obj.x"); hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); ok(V_VT(&var) == VT_BOOL, "Expected VT_BOOL, got %s\n", vt2a(&var)); ok(V_BOOL(&var) == VARIANT_TRUE, "Expected %x, got %x\n", VARIANT_TRUE, V_BOOL(&var)); VariantClear(&var); @@ -2821,33 +2821,33 @@ static void test_multiple_parse(void) script = create_and_init_script(SCRIPTITEM_GLOBALMEMBERS, TRUE);
hres = IActiveScript_QueryInterface(script, &IID_IActiveScriptParse, (void**)&parser); - ok(hres == S_OK, "Could not get IActiveScriptParseProcedure2 iface: %08x\n", hres); + ok(hres == S_OK, "Could not get IActiveScriptParseProcedure2 iface: %08lx\n", hres);
hres = IActiveScriptParse_ParseScriptText(parser, L"function duplicatedfunc\n" L" ok false, "duplicatedfunc called"\n" L"end function\n", NULL, NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
hres = IActiveScriptParse_ParseScriptText(parser, L"sub duplicatedfunc\n" L" ok false, "duplicatedfunc called"\n" L"end sub\n", NULL, NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
hres = IActiveScriptParse_ParseScriptText(parser, L"function duplicatedfunc\n" L" duplicatedfunc = 2\n" L"end function\n", NULL, NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
hres = IActiveScriptParse_ParseScriptText(parser, L"ok duplicatedfunc() = 2, "duplicatedfunc = " & duplicatedfunc()\n", NULL, NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
IActiveScriptParse_Release(parser); close_script(script); @@ -2862,7 +2862,7 @@ static BSTR get_script_from_file(const char *filename)
file = CreateFileA(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_READONLY, NULL); if(file == INVALID_HANDLE_VALUE) { - trace("Could not open file: %u\n", GetLastError()); + trace("Could not open file: %lu\n", GetLastError()); return NULL; }
@@ -2871,14 +2871,14 @@ static BSTR get_script_from_file(const char *filename) map = CreateFileMappingW(file, NULL, PAGE_READONLY, 0, 0, NULL); CloseHandle(file); if(map == INVALID_HANDLE_VALUE) { - trace("Could not create file mapping: %u\n", GetLastError()); + trace("Could not create file mapping: %lu\n", GetLastError()); return NULL; }
file_map = MapViewOfFile(map, FILE_MAP_READ, 0, 0, 0); CloseHandle(map); if(!file_map) { - trace("MapViewOfFile failed: %u\n", GetLastError()); + trace("MapViewOfFile failed: %lu\n", GetLastError()); return NULL; }
@@ -2903,7 +2903,7 @@ static void run_from_file(const char *filename) strict_dispid_check = FALSE; hres = parse_script(SCRIPTITEM_GLOBALMEMBERS, script_str, NULL); SysFreeString(script_str); - ok(hres == S_OK, "parse_script failed: %08x\n", hres); + ok(hres == S_OK, "parse_script failed: %08lx\n", hres); }
static void run_from_res(const char *name) @@ -2933,7 +2933,7 @@ static void run_from_res(const char *name) CHECK_CALLED(global_success_d); CHECK_CALLED(global_success_i);
- ok(hres == S_OK, "parse_script failed: %08x\n", hres); + ok(hres == S_OK, "parse_script failed: %08lx\n", hres); SysFreeString(str); test_name = ""; } @@ -3006,7 +3006,7 @@ static void run_tests(void) CHECK_CALLED(global_setobj_i);
hres = parse_script_ar("dim x\nx = testObj.rem"); - ok(hres == S_OK, "use of 'rem' as dot identifier failed: %x08\n", hres); + ok(hres == S_OK, "use of 'rem' as dot identifier failed: %lx08\n", hres);
SET_EXPECT(testobj_propget_d); SET_EXPECT(testobj_propget_i); @@ -3103,36 +3103,36 @@ static void run_tests(void)
SET_EXPECT(OnScriptError); hres = parse_script_ar("throwInt(&h80080008&)"); - ok(hres == 0x80080008, "hres = %08x\n", hres); + ok(hres == 0x80080008, "hres = %08lx\n", hres); CHECK_CALLED(OnScriptError);
/* DISP_E_BADINDEX */ SET_EXPECT(OnScriptError); hres = parse_script_ar("throwInt(&h8002000b&)"); - ok(hres == MAKE_VBSERROR(9), "hres = %08x\n", hres); + ok(hres == MAKE_VBSERROR(9), "hres = %08lx\n", hres); CHECK_CALLED(OnScriptError);
SET_EXPECT(OnScriptError); hres = parse_script_ar("throwInt(&h800a0009&)"); - ok(hres == MAKE_VBSERROR(9), "hres = %08x\n", hres); + ok(hres == MAKE_VBSERROR(9), "hres = %08lx\n", hres); CHECK_CALLED(OnScriptError);
onerror_hres = S_OK; SET_EXPECT(OnScriptError); hres = parse_script_ar("throwInt(&h800a0009&)"); - ok(hres == SCRIPT_E_REPORTED, "hres = %08x\n", hres); + ok(hres == SCRIPT_E_REPORTED, "hres = %08lx\n", hres); CHECK_CALLED(OnScriptError);
/* E_NOTIMPL */ SET_EXPECT(OnScriptError); hres = parse_script_ar("throwInt(&h80004001&)"); - ok(hres == MAKE_VBSERROR(445), "hres = %08x\n", hres); + ok(hres == MAKE_VBSERROR(445), "hres = %08lx\n", hres); CHECK_CALLED(OnScriptError);
onerror_hres = S_OK; SET_EXPECT(OnScriptError); hres = parse_script_ar("throwInt(&h80004001&)"); - ok(hres == SCRIPT_E_REPORTED, "hres = %08x\n", hres); + ok(hres == SCRIPT_E_REPORTED, "hres = %08lx\n", hres); CHECK_CALLED(OnScriptError);
SET_EXPECT(global_testoptionalarg_i); @@ -3220,7 +3220,7 @@ static BOOL check_vbscript(void) &IID_IUnknown, (void**)&unk); if(hres == REGDB_E_CLASSNOTREG) return FALSE; - ok(hres == S_OK, "CoCreateInstance(CLSID_VBScriptRegExp) failed: %x\n", hres); + ok(hres == S_OK, "CoCreateInstance(CLSID_VBScriptRegExp) failed: %lx\n", hres);
hres = IUnknown_QueryInterface(unk, &IID_IRegExp2, (void**)®exp); if(SUCCEEDED(hres)) diff --git a/dlls/vbscript/tests/vbscript.c b/dlls/vbscript/tests/vbscript.c index a3cd77c13e8..65134fef1af 100644 --- a/dlls/vbscript/tests/vbscript.c +++ b/dlls/vbscript/tests/vbscript.c @@ -128,7 +128,7 @@ static void _test_state(unsigned line, IActiveScript *script, SCRIPTSTATE exstat HRESULT hres;
hres = IActiveScript_GetScriptState(script, &state); - ok_(__FILE__,line) (hres == S_OK, "GetScriptState failed: %08x\n", hres); + ok_(__FILE__,line) (hres == S_OK, "GetScriptState failed: %08lx\n", hres); ok_(__FILE__,line) (state == exstate, "state=%d, expected %d\n", state, exstate); }
@@ -246,7 +246,7 @@ static HRESULT WINAPI Dispatch_Invoke(IDispatch *iface, DISPID id, REFIID riid, DISPPARAMS *dp, VARIANT *res, EXCEPINFO *ei, UINT *err) { CHECK_EXPECT(testCall); - ok(id == 1, "id = %u\n", id); + ok(id == 1, "id = %lu\n", id); ok(flags == DISPATCH_METHOD, "flags = %x\n", flags); ok(!dp->cArgs, "cArgs = %u\n", dp->cArgs); ok(!res, "res = %p\n", res); @@ -347,7 +347,7 @@ static HRESULT WINAPI ActiveScriptSite_GetLCID(IActiveScriptSite *iface, LCID *p static HRESULT WINAPI ActiveScriptSite_GetItemInfo(IActiveScriptSite *iface, LPCOLESTR name, DWORD return_mask, IUnknown **item_unk, ITypeInfo **item_ti) { - ok(return_mask == SCRIPTINFO_IUNKNOWN, "return_mask = %x\n", return_mask); + ok(return_mask == SCRIPTINFO_IUNKNOWN, "return_mask = %lx\n", return_mask); if(!wcscmp(name, L"globalItem")) { CHECK_EXPECT(GetItemInfo_global); IDispatch_AddRef(&global_named_item); @@ -464,86 +464,86 @@ static void test_safety(IActiveScript *script) HRESULT hres;
hres = IActiveScript_QueryInterface(script, &IID_IObjectSafety, (void**)&safety); - ok(hres == S_OK, "Could not get IObjectSafety: %08x\n", hres); + ok(hres == S_OK, "Could not get IObjectSafety: %08lx\n", hres); if(FAILED(hres)) return;
hres = IObjectSafety_GetInterfaceSafetyOptions(safety, &IID_NULL, &supported, NULL); - ok(hres == E_POINTER, "GetInterfaceSafetyOptions failed: %08x, expected E_POINTER\n", hres); + ok(hres == E_POINTER, "GetInterfaceSafetyOptions failed: %08lx, expected E_POINTER\n", hres); hres = IObjectSafety_GetInterfaceSafetyOptions(safety, &IID_NULL, NULL, &enabled); - ok(hres == E_POINTER, "GetInterfaceSafetyOptions failed: %08x, expected E_POINTER\n", hres); + ok(hres == E_POINTER, "GetInterfaceSafetyOptions failed: %08lx, expected E_POINTER\n", hres);
supported = enabled = 0xdeadbeef; hres = IObjectSafety_GetInterfaceSafetyOptions(safety, &IID_NULL, &supported, &enabled); - ok(hres == S_OK, "GetInterfaceSafetyOptions failed: %08x\n", hres); + ok(hres == S_OK, "GetInterfaceSafetyOptions failed: %08lx\n", hres); ok(supported == (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER), - "supported=%x\n", supported); - ok(enabled == INTERFACE_USES_DISPEX, "enabled=%x\n", enabled); + "supported=%lx\n", supported); + ok(enabled == INTERFACE_USES_DISPEX, "enabled=%lx\n", enabled);
supported = enabled = 0xdeadbeef; hres = IObjectSafety_GetInterfaceSafetyOptions(safety, &IID_IActiveScript, &supported, &enabled); - ok(hres == S_OK, "GetInterfaceSafetyOptions failed: %08x\n", hres); + ok(hres == S_OK, "GetInterfaceSafetyOptions failed: %08lx\n", hres); ok(supported == (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER), - "supported=%x\n", supported); - ok(enabled == INTERFACE_USES_DISPEX, "enabled=%x\n", enabled); + "supported=%lx\n", supported); + ok(enabled == INTERFACE_USES_DISPEX, "enabled=%lx\n", enabled);
supported = enabled = 0xdeadbeef; hres = IObjectSafety_GetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, &supported, &enabled); - ok(hres == S_OK, "GetInterfaceSafetyOptions failed: %08x\n", hres); + ok(hres == S_OK, "GetInterfaceSafetyOptions failed: %08lx\n", hres); ok(supported == (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER), - "supported=%x\n", supported); - ok(enabled == INTERFACE_USES_DISPEX, "enabled=%x\n", enabled); + "supported=%lx\n", supported); + ok(enabled == INTERFACE_USES_DISPEX, "enabled=%lx\n", enabled);
hres = IObjectSafety_SetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER |INTERFACESAFE_FOR_UNTRUSTED_CALLER, INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER); - ok(hres == E_FAIL, "SetInterfaceSafetyOptions failed: %08x, expected E_FAIL\n", hres); + ok(hres == E_FAIL, "SetInterfaceSafetyOptions failed: %08lx, expected E_FAIL\n", hres);
hres = IObjectSafety_SetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER, INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER); - ok(hres == S_OK, "SetInterfaceSafetyOptions failed: %08x\n", hres); + ok(hres == S_OK, "SetInterfaceSafetyOptions failed: %08lx\n", hres);
supported = enabled = 0xdeadbeef; hres = IObjectSafety_GetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, &supported, &enabled); - ok(hres == S_OK, "GetInterfaceSafetyOptions failed: %08x\n", hres); + ok(hres == S_OK, "GetInterfaceSafetyOptions failed: %08lx\n", hres); ok(supported == (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER), - "supported=%x\n", supported); + "supported=%lx\n", supported); ok(enabled == (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER), - "enabled=%x\n", enabled); + "enabled=%lx\n", enabled);
hres = IObjectSafety_SetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, INTERFACESAFE_FOR_UNTRUSTED_DATA, 0); - ok(hres == S_OK, "SetInterfaceSafetyOptions failed: %08x\n", hres); + ok(hres == S_OK, "SetInterfaceSafetyOptions failed: %08lx\n", hres);
supported = enabled = 0xdeadbeef; hres = IObjectSafety_GetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, &supported, &enabled); - ok(hres == S_OK, "GetInterfaceSafetyOptions failed: %08x\n", hres); + ok(hres == S_OK, "GetInterfaceSafetyOptions failed: %08lx\n", hres); ok(supported == (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER), - "supported=%x\n", supported); - ok(enabled == (INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER), "enabled=%x\n", enabled); + "supported=%lx\n", supported); + ok(enabled == (INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER), "enabled=%lx\n", enabled);
hres = IObjectSafety_SetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER, 0); - ok(hres == S_OK, "SetInterfaceSafetyOptions failed: %08x\n", hres); + ok(hres == S_OK, "SetInterfaceSafetyOptions failed: %08lx\n", hres);
supported = enabled = 0xdeadbeef; hres = IObjectSafety_GetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, &supported, &enabled); - ok(hres == S_OK, "GetInterfaceSafetyOptions failed: %08x\n", hres); + ok(hres == S_OK, "GetInterfaceSafetyOptions failed: %08lx\n", hres); ok(supported == (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER), - "supported=%x\n", supported); - ok(enabled == INTERFACE_USES_DISPEX, "enabled=%x\n", enabled); + "supported=%lx\n", supported); + ok(enabled == INTERFACE_USES_DISPEX, "enabled=%lx\n", enabled);
hres = IObjectSafety_SetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, INTERFACE_USES_DISPEX, 0); - ok(hres == S_OK, "SetInterfaceSafetyOptions failed: %08x\n", hres); + ok(hres == S_OK, "SetInterfaceSafetyOptions failed: %08lx\n", hres);
supported = enabled = 0xdeadbeef; hres = IObjectSafety_GetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, &supported, &enabled); - ok(hres == S_OK, "GetInterfaceSafetyOptions failed: %08x\n", hres); + ok(hres == S_OK, "GetInterfaceSafetyOptions failed: %08lx\n", hres); ok(supported == (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER), - "supported=%x\n", supported); - ok(enabled == INTERFACE_USES_DISPEX, "enabled=%x\n", enabled); + "supported=%lx\n", supported); + ok(enabled == INTERFACE_USES_DISPEX, "enabled=%lx\n", enabled);
IObjectSafety_Release(safety); } @@ -556,13 +556,13 @@ static IDispatchEx *get_script_dispatch(IActiveScript *script, const WCHAR *item
disp = (void*)0xdeadbeef; hres = IActiveScript_GetScriptDispatch(script, item_name, &disp); - ok(hres == S_OK, "GetScriptDispatch failed: %08x\n", hres); + ok(hres == S_OK, "GetScriptDispatch failed: %08lx\n", hres); if(FAILED(hres)) return NULL;
hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex); IDispatch_Release(disp); - ok(hres == S_OK, "Could not get IDispatchEx iface: %08x\n", hres); + ok(hres == S_OK, "Could not get IDispatchEx iface: %08lx\n", hres); return dispex; }
@@ -577,7 +577,7 @@ static void parse_script(IActiveScriptParse *parse, const char *src) str = a2bstr(src); hres = IActiveScriptParse_ParseScriptText(parse, str, NULL, NULL, NULL, 0, 0, 0, NULL, NULL); SysFreeString(str); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); @@ -592,11 +592,11 @@ static void _get_disp_id(unsigned line, IDispatchEx *dispex, const char *name, H
str = a2bstr(name); hres = IDispatchEx_GetDispID(dispex, str, 0, id); - ok_(__FILE__,line)(hres == exhres, "GetDispID(%s) returned %08x, expected %08x\n", name, hres, exhres); + ok_(__FILE__,line)(hres == exhres, "GetDispID(%s) returned %08lx, expected %08lx\n", name, hres, exhres);
hres = IDispatchEx_GetIDsOfNames(dispex, &IID_NULL, &str, 1, 0, &id2); SysFreeString(str); - ok_(__FILE__,line)(hres == exhres, "GetIDsOfNames(%s) returned %08x, expected %08x\n", name, hres, exhres); + ok_(__FILE__,line)(hres == exhres, "GetIDsOfNames(%s) returned %08lx, expected %08lx\n", name, hres, exhres); ok_(__FILE__,line)(*id == id2, "GetIDsOfNames(%s) id != id2\n", name); }
@@ -607,7 +607,7 @@ static void test_no_script_dispatch(IActiveScript *script)
disp = (void*)0xdeadbeef; hres = IActiveScript_GetScriptDispatch(script, NULL, &disp); - ok(hres == E_UNEXPECTED, "hres = %08x, expected E_UNEXPECTED\n", hres); + ok(hres == E_UNEXPECTED, "hres = %08lx, expected E_UNEXPECTED\n", hres); ok(!disp, "disp != NULL\n"); }
@@ -618,7 +618,7 @@ static IActiveScript *create_vbscript(void)
hres = CoCreateInstance(&CLSID_VBScript, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, &IID_IActiveScript, (void**)&ret); - ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres); + ok(hres == S_OK, "CoCreateInstance failed: %08lx\n", hres);
return ret; } @@ -638,14 +638,14 @@ static void test_scriptdisp(void) vbscript = create_vbscript();
hres = IActiveScript_QueryInterface(vbscript, &IID_IActiveScriptParse, (void**)&parser); - ok(hres == S_OK, "Could not get IActiveScriptParse iface: %08x\n", hres); + ok(hres == S_OK, "Could not get IActiveScriptParse iface: %08lx\n", hres);
test_state(vbscript, SCRIPTSTATE_UNINITIALIZED); test_safety(vbscript);
SET_EXPECT(GetLCID); hres = IActiveScript_SetScriptSite(vbscript, &ActiveScriptSite); - ok(hres == S_OK, "SetScriptSite failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptSite failed: %08lx\n", hres); CHECK_CALLED(GetLCID);
script_disp2 = get_script_dispatch(vbscript, NULL); @@ -654,14 +654,14 @@ static void test_scriptdisp(void)
SET_EXPECT(OnStateChange_INITIALIZED); hres = IActiveScriptParse_InitNew(parser); - ok(hres == S_OK, "InitNew failed: %08x\n", hres); + ok(hres == S_OK, "InitNew failed: %08lx\n", hres); CHECK_CALLED(OnStateChange_INITIALIZED);
test_state(vbscript, SCRIPTSTATE_INITIALIZED);
SET_EXPECT(OnStateChange_CONNECTED); hres = IActiveScript_SetScriptState(vbscript, SCRIPTSTATE_CONNECTED); - ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_CONNECTED) failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_CONNECTED) failed: %08lx\n", hres); CHECK_CALLED(OnStateChange_CONNECTED);
test_state(vbscript, SCRIPTSTATE_CONNECTED); @@ -672,7 +672,7 @@ static void test_scriptdisp(void)
id = 100; get_disp_id(script_disp, "LCase", DISP_E_UNKNOWNNAME, &id); - ok(id == -1, "id = %d, expected -1\n", id); + ok(id == -1, "id = %ld, expected -1\n", id);
get_disp_id(script_disp, "globalVariable", DISP_E_UNKNOWNNAME, &id); parse_script(parser, "dim globalVariable\nglobalVariable = 3"); @@ -682,7 +682,7 @@ static void test_scriptdisp(void) memset(&ei, 0, sizeof(ei)); V_VT(&v) = VT_EMPTY; hres = IDispatchEx_InvokeEx(script_disp, id, 0, DISPATCH_PROPERTYGET|DISPATCH_METHOD, &dp, &v, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); ok(V_VT(&v) == VT_I2, "V_VT(v) = %d\n", V_VT(&v)); ok(V_I2(&v) == 3, "V_I2(v) = %d\n", V_I2(&v));
@@ -701,7 +701,7 @@ static void test_scriptdisp(void) memset(&ei, 0, sizeof(ei)); V_VT(&v) = VT_EMPTY; hres = IDispatchEx_InvokeEx(script_disp, id, 0, DISPATCH_PROPERTYGET|DISPATCH_METHOD, &dp, &v, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); ok(V_VT(&v) == VT_I2, "V_VT(v) = %d\n", V_VT(&v)); ok(V_I2(&v) == 5, "V_I2(v) = %d\n", V_I2(&v));
@@ -715,7 +715,7 @@ static void test_scriptdisp(void) memset(&ei, 0, sizeof(ei)); V_VT(&v) = VT_EMPTY; hres = IDispatchEx_Invoke(script_disp, id, &IID_NULL, 0, DISPATCH_PROPERTYGET|DISPATCH_METHOD, &dp, &v, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); ok(V_VT(&v) == VT_I2, "V_VT(v) = %d\n", V_VT(&v)); ok(V_I2(&v) == 5, "V_I2(v) = %d\n", V_I2(&v));
@@ -742,13 +742,13 @@ static void test_scriptdisp(void) SET_EXPECT(OnStateChange_INITIALIZED); SET_EXPECT(OnStateChange_CLOSED); hres = IActiveScript_Close(vbscript); - ok(hres == S_OK, "Close failed: %08x\n", hres); + ok(hres == S_OK, "Close failed: %08lx\n", hres); CHECK_CALLED(OnStateChange_DISCONNECTED); CHECK_CALLED(OnStateChange_INITIALIZED); CHECK_CALLED(OnStateChange_CLOSED);
ref = IActiveScript_Release(vbscript); - ok(!ref, "ref = %d\n", ref); + ok(!ref, "ref = %ld\n", ref); }
static void test_param_ids(void) @@ -765,21 +765,21 @@ static void test_param_ids(void) vbscript = create_vbscript();
hr = IActiveScript_QueryInterface(vbscript, &IID_IActiveScriptParse, (void**)&parser); - ok(hr == S_OK, "Could not get IActiveScriptParse iface: %08x\n", hr); + ok(hr == S_OK, "Could not get IActiveScriptParse iface: %08lx\n", hr);
SET_EXPECT(GetLCID); hr = IActiveScript_SetScriptSite(vbscript, &ActiveScriptSite); - ok(hr == S_OK, "SetScriptSite failed: %08x\n", hr); + ok(hr == S_OK, "SetScriptSite failed: %08lx\n", hr); CHECK_CALLED(GetLCID);
SET_EXPECT(OnStateChange_INITIALIZED); hr = IActiveScriptParse_InitNew(parser); - ok(hr == S_OK, "InitNew failed: %08x\n", hr); + ok(hr == S_OK, "InitNew failed: %08lx\n", hr); CHECK_CALLED(OnStateChange_INITIALIZED);
SET_EXPECT(OnStateChange_CONNECTED); hr = IActiveScript_SetScriptState(vbscript, SCRIPTSTATE_CONNECTED); - ok(hr == S_OK, "SetScriptState(SCRIPTSTATE_CONNECTED) failed: %08x\n", hr); + ok(hr == S_OK, "SetScriptState(SCRIPTSTATE_CONNECTED) failed: %08lx\n", hr); CHECK_CALLED(OnStateChange_CONNECTED);
parse_script(parser, "function test(byval a, byval b, byval c, byval foo)\ntest = a + b + c - foo\nend function\n" @@ -787,22 +787,22 @@ static void test_param_ids(void) script_disp = get_script_dispatch(vbscript, NULL);
hr = IDispatchEx_GetIDsOfNames(script_disp, &IID_NULL, (WCHAR**)names1, ARRAY_SIZE(names1), 0, id); - ok(hr == DISP_E_UNKNOWNNAME, "GetIDsOfNames returned %08x, expected %08x\n", hr, DISP_E_UNKNOWNNAME); - ok(id[0] > 0, "Unexpected DISPID for "test": %d\n", id[0]); - ok(id[4] == DISPID_UNKNOWN, "Unexpected DISPID for "a" parameter: %d\n", id[4]); - ok(id[3] == DISPID_UNKNOWN, "Unexpected DISPID for "b" parameter: %d\n", id[3]); - ok(id[1] == DISPID_UNKNOWN, "Unexpected DISPID for "c" parameter: %d\n", id[1]); - ok(id[2] == DISPID_UNKNOWN, "Unexpected DISPID for "foo" parameter: %d\n", id[2]); + ok(hr == DISP_E_UNKNOWNNAME, "GetIDsOfNames returned %08lx, expected %08lx\n", hr, DISP_E_UNKNOWNNAME); + ok(id[0] > 0, "Unexpected DISPID for "test": %ld\n", id[0]); + ok(id[4] == DISPID_UNKNOWN, "Unexpected DISPID for "a" parameter: %ld\n", id[4]); + ok(id[3] == DISPID_UNKNOWN, "Unexpected DISPID for "b" parameter: %ld\n", id[3]); + ok(id[1] == DISPID_UNKNOWN, "Unexpected DISPID for "c" parameter: %ld\n", id[1]); + ok(id[2] == DISPID_UNKNOWN, "Unexpected DISPID for "foo" parameter: %ld\n", id[2]);
hr = IDispatchEx_GetIDsOfNames(script_disp, &IID_NULL, (WCHAR**)names2, ARRAY_SIZE(names2), 0, id); - ok(hr == DISP_E_UNKNOWNNAME, "GetIDsOfNames returned %08x, expected %08x\n", hr, DISP_E_UNKNOWNNAME); - ok(id[0] > 0, "Unexpected DISPID for "test": %d\n", id[0]); - ok(id[1] == DISPID_UNKNOWN, "Unexpected DISPID for "bar": %d\n", id[1]); + ok(hr == DISP_E_UNKNOWNNAME, "GetIDsOfNames returned %08lx, expected %08lx\n", hr, DISP_E_UNKNOWNNAME); + ok(id[0] > 0, "Unexpected DISPID for "test": %ld\n", id[0]); + ok(id[1] == DISPID_UNKNOWN, "Unexpected DISPID for "bar": %ld\n", id[1]);
hr = IDispatchEx_GetIDsOfNames(script_disp, &IID_NULL, (WCHAR**)names3, ARRAY_SIZE(names3), 0, id); - ok(hr == DISP_E_UNKNOWNNAME, "GetIDsOfNames returned %08x, expected %08x\n", hr, DISP_E_UNKNOWNNAME); - ok(id[0] > 0, "Unexpected DISPID for "bar": %d\n", id[0]); - ok(id[1] == DISPID_UNKNOWN, "Unexpected DISPID for "test": %d\n", id[1]); + ok(hr == DISP_E_UNKNOWNNAME, "GetIDsOfNames returned %08lx, expected %08lx\n", hr, DISP_E_UNKNOWNNAME); + ok(id[0] > 0, "Unexpected DISPID for "bar": %ld\n", id[0]); + ok(id[1] == DISPID_UNKNOWN, "Unexpected DISPID for "test": %ld\n", id[1]);
IDispatchEx_Release(script_disp); IActiveScriptParse_Release(parser); @@ -811,7 +811,7 @@ static void test_param_ids(void) SET_EXPECT(OnStateChange_INITIALIZED); SET_EXPECT(OnStateChange_CLOSED); hr = IActiveScript_Close(vbscript); - ok(hr == S_OK, "Close failed: %08x\n", hr); + ok(hr == S_OK, "Close failed: %08lx\n", hr); CHECK_CALLED(OnStateChange_DISCONNECTED); CHECK_CALLED(OnStateChange_INITIALIZED); CHECK_CALLED(OnStateChange_CLOSED); @@ -832,18 +832,18 @@ static void test_code_persistence(void) vbscript = create_vbscript();
hr = IActiveScript_QueryInterface(vbscript, &IID_IActiveScriptParse, (void**)&parser); - ok(hr == S_OK, "Could not get IActiveScriptParse iface: %08x\n", hr); + ok(hr == S_OK, "Could not get IActiveScriptParse iface: %08lx\n", hr); test_state(vbscript, SCRIPTSTATE_UNINITIALIZED); test_safety(vbscript);
SET_EXPECT(GetLCID); hr = IActiveScript_SetScriptSite(vbscript, &ActiveScriptSite); - ok(hr == S_OK, "SetScriptSite failed: %08x\n", hr); + ok(hr == S_OK, "SetScriptSite failed: %08lx\n", hr); CHECK_CALLED(GetLCID);
SET_EXPECT(OnStateChange_INITIALIZED); hr = IActiveScriptParse_InitNew(parser); - ok(hr == S_OK, "InitNew failed: %08x\n", hr); + ok(hr == S_OK, "InitNew failed: %08lx\n", hr); CHECK_CALLED(OnStateChange_INITIALIZED); test_state(vbscript, SCRIPTSTATE_INITIALIZED);
@@ -851,50 +851,50 @@ static void test_code_persistence(void) "x = 1\n" "dim y\ny = 2\n", NULL, NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hr == S_OK, "ParseScriptText failed: %08x\n", hr); + ok(hr == S_OK, "ParseScriptText failed: %08lx\n", hr);
hr = IActiveScriptParse_ParseScriptText(parser, L"" "dim z\n" "y = 42\n" "var = 10\n", NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISPERSISTENT, NULL, NULL); - ok(hr == S_OK, "ParseScriptText failed: %08x\n", hr); + ok(hr == S_OK, "ParseScriptText failed: %08lx\n", hr);
/* Pending code does not add identifiers to the global scope */ script_disp = get_script_dispatch(vbscript, NULL); id = 0; get_disp_id(script_disp, "x", DISP_E_UNKNOWNNAME, &id); - ok(id == -1, "id = %d, expected -1\n", id); + ok(id == -1, "id = %ld, expected -1\n", id); id = 0; get_disp_id(script_disp, "y", DISP_E_UNKNOWNNAME, &id); - ok(id == -1, "id = %d, expected -1\n", id); + ok(id == -1, "id = %ld, expected -1\n", id); id = 0; get_disp_id(script_disp, "z", DISP_E_UNKNOWNNAME, &id); - ok(id == -1, "id = %d, expected -1\n", id); + ok(id == -1, "id = %ld, expected -1\n", id); IDispatchEx_Release(script_disp);
/* Uninitialized state removes code without SCRIPTTEXT_ISPERSISTENT */ SET_EXPECT(OnStateChange_UNINITIALIZED); hr = IActiveScript_SetScriptState(vbscript, SCRIPTSTATE_UNINITIALIZED); - ok(hr == S_OK, "SetScriptState(SCRIPTSTATE_UNINITIALIZED) failed: %08x\n", hr); + ok(hr == S_OK, "SetScriptState(SCRIPTSTATE_UNINITIALIZED) failed: %08lx\n", hr); CHECK_CALLED(OnStateChange_UNINITIALIZED); test_no_script_dispatch(vbscript);
SET_EXPECT(GetLCID); SET_EXPECT(OnStateChange_INITIALIZED); hr = IActiveScript_SetScriptSite(vbscript, &ActiveScriptSite); - ok(hr == S_OK, "SetScriptSite failed: %08x\n", hr); + ok(hr == S_OK, "SetScriptSite failed: %08lx\n", hr); CHECK_CALLED(GetLCID); CHECK_CALLED(OnStateChange_INITIALIZED);
hr = IActiveScriptParse_ParseScriptText(parser, L"var = 20\n", NULL, NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hr == S_OK, "ParseScriptText failed: %08x\n", hr); + ok(hr == S_OK, "ParseScriptText failed: %08lx\n", hr);
SET_EXPECT(OnStateChange_CONNECTED); SET_EXPECT_MULTI(OnEnterScript, 2); SET_EXPECT_MULTI(OnLeaveScript, 2); hr = IActiveScript_SetScriptState(vbscript, SCRIPTSTATE_CONNECTED); - ok(hr == S_OK, "SetScriptState(SCRIPTSTATE_CONNECTED) failed: %08x\n", hr); + ok(hr == S_OK, "SetScriptState(SCRIPTSTATE_CONNECTED) failed: %08lx\n", hr); CHECK_CALLED(OnStateChange_CONNECTED); CHECK_CALLED_MULTI(OnEnterScript, 2); CHECK_CALLED_MULTI(OnLeaveScript, 2); @@ -903,7 +903,7 @@ static void test_code_persistence(void) script_disp = get_script_dispatch(vbscript, NULL); id = 0; get_disp_id(script_disp, "x", DISP_E_UNKNOWNNAME, &id); - ok(id == -1, "id = %d, expected -1\n", id); + ok(id == -1, "id = %ld, expected -1\n", id); id = 0; get_disp_id(script_disp, "y", S_OK, &id); ok(id != -1, "id = -1\n"); @@ -915,7 +915,7 @@ static void test_code_persistence(void) SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); hr = IActiveScriptParse_ParseScriptText(parser, L"y", NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL); - ok(hr == S_OK, "ParseScriptText failed: %08x\n", hr); + ok(hr == S_OK, "ParseScriptText failed: %08lx\n", hr); ok(V_VT(&var) == VT_I2 && V_I2(&var) == 42, "V_VT(y) = %d, V_I2(y) = %d\n", V_VT(&var), V_I2(&var)); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); @@ -923,7 +923,7 @@ static void test_code_persistence(void) SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); hr = IActiveScriptParse_ParseScriptText(parser, L"var", NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL); - ok(hr == S_OK, "ParseScriptText failed: %08x\n", hr); + ok(hr == S_OK, "ParseScriptText failed: %08lx\n", hr); ok(V_VT(&var) == VT_I2 && V_I2(&var) == 20, "V_VT(var) = %d, V_I2(var) = %d\n", V_VT(&var), V_I2(&var)); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); @@ -933,7 +933,7 @@ static void test_code_persistence(void) SET_EXPECT(OnStateChange_INITIALIZED); SET_EXPECT(OnStateChange_UNINITIALIZED); hr = IActiveScript_SetScriptState(vbscript, SCRIPTSTATE_UNINITIALIZED); - ok(hr == S_OK, "SetScriptState(SCRIPTSTATE_UNINITIALIZED) failed: %08x\n", hr); + ok(hr == S_OK, "SetScriptState(SCRIPTSTATE_UNINITIALIZED) failed: %08lx\n", hr); CHECK_CALLED(OnStateChange_DISCONNECTED); CHECK_CALLED(OnStateChange_INITIALIZED); CHECK_CALLED(OnStateChange_UNINITIALIZED); @@ -942,21 +942,21 @@ static void test_code_persistence(void) SET_EXPECT(GetLCID); SET_EXPECT(OnStateChange_INITIALIZED); hr = IActiveScript_SetScriptSite(vbscript, &ActiveScriptSite); - ok(hr == S_OK, "SetScriptSite failed: %08x\n", hr); + ok(hr == S_OK, "SetScriptSite failed: %08lx\n", hr); CHECK_CALLED(GetLCID); CHECK_CALLED(OnStateChange_INITIALIZED);
script_disp = get_script_dispatch(vbscript, NULL); id = 0; get_disp_id(script_disp, "z", DISP_E_UNKNOWNNAME, &id); - ok(id == -1, "id = %d, expected -1\n", id); + ok(id == -1, "id = %ld, expected -1\n", id); IDispatchEx_Release(script_disp);
SET_EXPECT(OnStateChange_CONNECTED); SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); hr = IActiveScript_SetScriptState(vbscript, SCRIPTSTATE_CONNECTED); - ok(hr == S_OK, "SetScriptState(SCRIPTSTATE_CONNECTED) failed: %08x\n", hr); + ok(hr == S_OK, "SetScriptState(SCRIPTSTATE_CONNECTED) failed: %08lx\n", hr); CHECK_CALLED(OnStateChange_CONNECTED); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); @@ -971,7 +971,7 @@ static void test_code_persistence(void) SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); hr = IActiveScriptParse_ParseScriptText(parser, L"y", NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL); - ok(hr == S_OK, "ParseScriptText failed: %08x\n", hr); + ok(hr == S_OK, "ParseScriptText failed: %08lx\n", hr); ok(V_VT(&var) == VT_I2 && V_I2(&var) == 42, "V_VT(y) = %d, V_I2(y) = %d\n", V_VT(&var), V_I2(&var)); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); @@ -979,7 +979,7 @@ static void test_code_persistence(void) SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); hr = IActiveScriptParse_ParseScriptText(parser, L"var", NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL); - ok(hr == S_OK, "ParseScriptText failed: %08x\n", hr); + ok(hr == S_OK, "ParseScriptText failed: %08lx\n", hr); ok(V_VT(&var) == VT_I2 && V_I2(&var) == 10, "V_VT(var) = %d, V_I2(var) = %d\n", V_VT(&var), V_I2(&var)); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); @@ -988,7 +988,7 @@ static void test_code_persistence(void) SET_EXPECT(OnStateChange_INITIALIZED); SET_EXPECT(OnStateChange_UNINITIALIZED); hr = IActiveScript_SetScriptState(vbscript, SCRIPTSTATE_UNINITIALIZED); - ok(hr == S_OK, "SetScriptState(SCRIPTSTATE_UNINITIALIZED) failed: %08x\n", hr); + ok(hr == S_OK, "SetScriptState(SCRIPTSTATE_UNINITIALIZED) failed: %08lx\n", hr); CHECK_CALLED(OnStateChange_DISCONNECTED); CHECK_CALLED(OnStateChange_INITIALIZED); CHECK_CALLED(OnStateChange_UNINITIALIZED); @@ -996,17 +996,17 @@ static void test_code_persistence(void) SET_EXPECT(GetLCID); SET_EXPECT(OnStateChange_INITIALIZED); hr = IActiveScript_SetScriptSite(vbscript, &ActiveScriptSite); - ok(hr == S_OK, "SetScriptSite failed: %08x\n", hr); + ok(hr == S_OK, "SetScriptSite failed: %08lx\n", hr); CHECK_CALLED(GetLCID); CHECK_CALLED(OnStateChange_INITIALIZED);
hr = IActiveScriptParse_ParseScriptText(parser, L"dim y\ny = 2\n", NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISPERSISTENT, NULL, NULL); - ok(hr == S_OK, "ParseScriptText failed: %08x\n", hr); + ok(hr == S_OK, "ParseScriptText failed: %08lx\n", hr);
/* Closing the script engine removes all code (even if it's pending and persistent) */ SET_EXPECT(OnStateChange_CLOSED); hr = IActiveScript_Close(vbscript); - ok(hr == S_OK, "Close failed: %08x\n", hr); + ok(hr == S_OK, "Close failed: %08lx\n", hr); CHECK_CALLED(OnStateChange_CLOSED); test_state(vbscript, SCRIPTSTATE_CLOSED); test_no_script_dispatch(vbscript); @@ -1014,24 +1014,24 @@ static void test_code_persistence(void) SET_EXPECT(OnStateChange_INITIALIZED); SET_EXPECT(GetLCID); hr = IActiveScript_SetScriptSite(vbscript, &ActiveScriptSite); - ok(hr == S_OK, "SetScriptSite failed: %08x\n", hr); + ok(hr == S_OK, "SetScriptSite failed: %08lx\n", hr); CHECK_CALLED(OnStateChange_INITIALIZED); CHECK_CALLED(GetLCID); test_state(vbscript, SCRIPTSTATE_INITIALIZED);
SET_EXPECT(OnStateChange_CONNECTED); hr = IActiveScript_SetScriptState(vbscript, SCRIPTSTATE_CONNECTED); - ok(hr == S_OK, "SetScriptState(SCRIPTSTATE_CONNECTED) failed: %08x\n", hr); + ok(hr == S_OK, "SetScriptState(SCRIPTSTATE_CONNECTED) failed: %08lx\n", hr); CHECK_CALLED(OnStateChange_CONNECTED); test_state(vbscript, SCRIPTSTATE_CONNECTED);
script_disp = get_script_dispatch(vbscript, NULL); id = 0; get_disp_id(script_disp, "y", DISP_E_UNKNOWNNAME, &id); - ok(id == -1, "id = %d, expected -1\n", id); + ok(id == -1, "id = %ld, expected -1\n", id); id = 0; get_disp_id(script_disp, "z", DISP_E_UNKNOWNNAME, &id); - ok(id == -1, "id = %d, expected -1\n", id); + ok(id == -1, "id = %ld, expected -1\n", id); IDispatchEx_Release(script_disp);
IActiveScriptParse_Release(parser); @@ -1040,7 +1040,7 @@ static void test_code_persistence(void) SET_EXPECT(OnStateChange_INITIALIZED); SET_EXPECT(OnStateChange_CLOSED); ref = IActiveScript_Release(vbscript); - ok(!ref, "ref = %d\n", ref); + ok(!ref, "ref = %ld\n", ref); CHECK_CALLED(OnStateChange_DISCONNECTED); CHECK_CALLED(OnStateChange_INITIALIZED); CHECK_CALLED(OnStateChange_CLOSED); @@ -1093,21 +1093,21 @@ static void test_script_typeinfo(void) vbscript = create_vbscript();
hr = IActiveScript_QueryInterface(vbscript, &IID_IActiveScriptParse, (void**)&parser); - ok(hr == S_OK, "Could not get IActiveScriptParse iface: %08x\n", hr); + ok(hr == S_OK, "Could not get IActiveScriptParse iface: %08lx\n", hr);
SET_EXPECT(GetLCID); hr = IActiveScript_SetScriptSite(vbscript, &ActiveScriptSite); - ok(hr == S_OK, "SetScriptSite failed: %08x\n", hr); + ok(hr == S_OK, "SetScriptSite failed: %08lx\n", hr); CHECK_CALLED(GetLCID);
SET_EXPECT(OnStateChange_INITIALIZED); hr = IActiveScriptParse_InitNew(parser); - ok(hr == S_OK, "InitNew failed: %08x\n", hr); + ok(hr == S_OK, "InitNew failed: %08lx\n", hr); CHECK_CALLED(OnStateChange_INITIALIZED);
SET_EXPECT(OnStateChange_CONNECTED); hr = IActiveScript_SetScriptState(vbscript, SCRIPTSTATE_CONNECTED); - ok(hr == S_OK, "SetScriptState(SCRIPTSTATE_CONNECTED) failed: %08x\n", hr); + ok(hr == S_OK, "SetScriptState(SCRIPTSTATE_CONNECTED) failed: %08lx\n", hr); CHECK_CALLED(OnStateChange_CONNECTED);
parse_script(parser, @@ -1140,37 +1140,37 @@ static void test_script_typeinfo(void)
script_disp = get_script_dispatch(vbscript, NULL); hr = IDispatchEx_QueryInterface(script_disp, &IID_ITypeInfo, (void**)&typeinfo); - ok(hr == E_NOINTERFACE, "QueryInterface(IID_ITypeInfo) returned: %08x\n", hr); + ok(hr == E_NOINTERFACE, "QueryInterface(IID_ITypeInfo) returned: %08lx\n", hr); hr = IDispatchEx_GetTypeInfo(script_disp, 1, LOCALE_USER_DEFAULT, &typeinfo); - ok(hr == DISP_E_BADINDEX, "GetTypeInfo returned: %08x\n", hr); + ok(hr == DISP_E_BADINDEX, "GetTypeInfo returned: %08lx\n", hr); hr = IDispatchEx_GetTypeInfo(script_disp, 0, LOCALE_USER_DEFAULT, &typeinfo); - ok(hr == S_OK, "GetTypeInfo failed: %08x\n", hr); + ok(hr == S_OK, "GetTypeInfo failed: %08lx\n", hr); hr = IDispatchEx_GetTypeInfo(script_disp, 0, LOCALE_USER_DEFAULT, &typeinfo2); - ok(hr == S_OK, "GetTypeInfo failed: %08x\n", hr); + ok(hr == S_OK, "GetTypeInfo failed: %08lx\n", hr); ok(typeinfo != typeinfo2, "TypeInfo was not supposed to be shared.\n"); ITypeInfo_Release(typeinfo2);
obj = (void*)0xdeadbeef; hr = ITypeInfo_CreateInstance(typeinfo, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "CreateInstance returned: %08x\n", hr); + ok(hr == E_INVALIDARG, "CreateInstance returned: %08lx\n", hr); hr = ITypeInfo_CreateInstance(typeinfo, NULL, NULL, &obj); - ok(hr == TYPE_E_BADMODULEKIND, "CreateInstance returned: %08x\n", hr); + ok(hr == TYPE_E_BADMODULEKIND, "CreateInstance returned: %08lx\n", hr); hr = ITypeInfo_CreateInstance(typeinfo, NULL, &IID_IDispatch, &obj); - ok(hr == TYPE_E_BADMODULEKIND, "CreateInstance returned: %08x\n", hr); + ok(hr == TYPE_E_BADMODULEKIND, "CreateInstance returned: %08lx\n", hr); ok(!obj, "Unexpected non-null obj %p.\n", obj);
hr = ITypeInfo_GetDocumentation(typeinfo, MEMBERID_NIL, &bstr, NULL, NULL, NULL); - ok(hr == S_OK, "GetDocumentation(MEMBERID_NIL) failed: %08x\n", hr); + ok(hr == S_OK, "GetDocumentation(MEMBERID_NIL) failed: %08lx\n", hr); ok(!lstrcmpW(bstr, L"VBScriptTypeInfo"), "Unexpected TypeInfo name %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr);
hr = ITypeInfo_GetTypeAttr(typeinfo, &attr); - ok(hr == S_OK, "GetTypeAttr failed: %08x\n", hr); + ok(hr == S_OK, "GetTypeAttr failed: %08lx\n", hr); ok(IsEqualGUID(&attr->guid, &IID_IScriptTypeInfo), "Unexpected GUID %s\n", wine_dbgstr_guid(&attr->guid)); - ok(attr->lcid == LOCALE_USER_DEFAULT, "Unexpected LCID %u\n", attr->lcid); - ok(attr->memidConstructor == MEMBERID_NIL, "Unexpected constructor memid %u\n", attr->memidConstructor); - ok(attr->memidDestructor == MEMBERID_NIL, "Unexpected destructor memid %u\n", attr->memidDestructor); - ok(attr->cbSizeInstance == 4, "Unexpected cbSizeInstance %u\n", attr->cbSizeInstance); + ok(attr->lcid == LOCALE_USER_DEFAULT, "Unexpected LCID %lu\n", attr->lcid); + ok(attr->memidConstructor == MEMBERID_NIL, "Unexpected constructor memid %lu\n", attr->memidConstructor); + ok(attr->memidDestructor == MEMBERID_NIL, "Unexpected destructor memid %lu\n", attr->memidDestructor); + ok(attr->cbSizeInstance == 4, "Unexpected cbSizeInstance %lu\n", attr->cbSizeInstance); ok(attr->typekind == TKIND_DISPATCH, "Unexpected typekind %u\n", attr->typekind); ok(attr->cFuncs == ARRAY_SIZE(func), "Unexpected cFuncs %u\n", attr->cFuncs); ok(attr->cVars == ARRAY_SIZE(var), "Unexpected cVars %u\n", attr->cVars); @@ -1184,39 +1184,39 @@ static void test_script_typeinfo(void)
/* The type inherits from IDispatch */ hr = ITypeInfo_GetImplTypeFlags(typeinfo, 0, NULL); - ok(hr == E_INVALIDARG, "GetImplTypeFlags returned: %08x\n", hr); + ok(hr == E_INVALIDARG, "GetImplTypeFlags returned: %08lx\n", hr); hr = ITypeInfo_GetImplTypeFlags(typeinfo, 1, &implTypeFlags); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "GetImplTypeFlags returned: %08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "GetImplTypeFlags returned: %08lx\n", hr); hr = ITypeInfo_GetImplTypeFlags(typeinfo, -1, &implTypeFlags); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "GetImplTypeFlags returned: %08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "GetImplTypeFlags returned: %08lx\n", hr); hr = ITypeInfo_GetImplTypeFlags(typeinfo, 0, &implTypeFlags); - ok(hr == S_OK, "GetImplTypeFlags failed: %08x\n", hr); + ok(hr == S_OK, "GetImplTypeFlags failed: %08lx\n", hr); ok(implTypeFlags == 0, "Unexpected implTypeFlags 0x%x\n", implTypeFlags);
hr = ITypeInfo_GetRefTypeOfImplType(typeinfo, 0, NULL); - ok(hr == E_INVALIDARG, "GetRefTypeOfImplType returned: %08x\n", hr); + ok(hr == E_INVALIDARG, "GetRefTypeOfImplType returned: %08lx\n", hr); hr = ITypeInfo_GetRefTypeOfImplType(typeinfo, 1, &reftype); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "GetRefTypeOfImplType returned: %08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "GetRefTypeOfImplType returned: %08lx\n", hr); hr = ITypeInfo_GetRefTypeOfImplType(typeinfo, -1, &reftype); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "GetRefTypeOfImplType failed: %08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "GetRefTypeOfImplType failed: %08lx\n", hr); hr = ITypeInfo_GetRefTypeOfImplType(typeinfo, 0, &reftype); - ok(hr == S_OK, "GetRefTypeOfImplType failed: %08x\n", hr); - ok(reftype == 1, "Unexpected reftype %d\n", reftype); + ok(hr == S_OK, "GetRefTypeOfImplType failed: %08lx\n", hr); + ok(reftype == 1, "Unexpected reftype %ld\n", reftype);
hr = ITypeInfo_GetRefTypeInfo(typeinfo, reftype, NULL); - ok(hr == E_INVALIDARG, "GetRefTypeInfo returned: %08x\n", hr); + ok(hr == E_INVALIDARG, "GetRefTypeInfo returned: %08lx\n", hr); hr = ITypeInfo_GetRefTypeInfo(typeinfo, -1, &typeinfo2); - ok(hr == E_INVALIDARG, "GetRefTypeInfo returned: %08x\n", hr); + ok(hr == E_INVALIDARG, "GetRefTypeInfo returned: %08lx\n", hr); hr = ITypeInfo_GetRefTypeInfo(typeinfo, 4, &typeinfo2); - ok(hr == E_FAIL, "GetRefTypeInfo returned: %08x\n", hr); + ok(hr == E_FAIL, "GetRefTypeInfo returned: %08lx\n", hr); hr = ITypeInfo_GetRefTypeInfo(typeinfo, 0, &typeinfo2); - ok(hr == S_OK, "GetRefTypeInfo failed: %08x\n", hr); + ok(hr == S_OK, "GetRefTypeInfo failed: %08lx\n", hr); ok(typeinfo == typeinfo2, "Unexpected TypeInfo %p (expected %p)\n", typeinfo2, typeinfo); ITypeInfo_Release(typeinfo2); hr = ITypeInfo_GetRefTypeInfo(typeinfo, reftype, &typeinfo2); - ok(hr == S_OK, "GetRefTypeInfo failed: %08x\n", hr); + ok(hr == S_OK, "GetRefTypeInfo failed: %08lx\n", hr); hr = ITypeInfo_GetDocumentation(typeinfo2, MEMBERID_NIL, &bstr, NULL, NULL, NULL); - ok(hr == S_OK, "GetDocumentation(MEMBERID_NIL) failed: %08x\n", hr); + ok(hr == S_OK, "GetDocumentation(MEMBERID_NIL) failed: %08lx\n", hr); ok(!lstrcmpW(bstr, L"IDispatch"), "Unexpected TypeInfo name %s\n", wine_dbgstr_w(bstr)); ITypeInfo_Release(typeinfo2); SysFreeString(bstr); @@ -1224,31 +1224,31 @@ static void test_script_typeinfo(void) /* GetIDsOfNames looks into the inherited types as well */ wcscpy(str, L"queryinterface"); hr = ITypeInfo_GetIDsOfNames(typeinfo, NULL, 1, &memid); - ok(hr == E_INVALIDARG, "GetIDsOfNames returned: %08x\n", hr); + ok(hr == E_INVALIDARG, "GetIDsOfNames returned: %08lx\n", hr); hr = ITypeInfo_GetIDsOfNames(typeinfo, &names, 1, NULL); - ok(hr == E_INVALIDARG, "GetIDsOfNames returned: %08x\n", hr); + ok(hr == E_INVALIDARG, "GetIDsOfNames returned: %08lx\n", hr); hr = ITypeInfo_GetIDsOfNames(typeinfo, &names, 0, &memid); - ok(hr == E_INVALIDARG, "GetIDsOfNames returned: %08x\n", hr); + ok(hr == E_INVALIDARG, "GetIDsOfNames returned: %08lx\n", hr); hr = ITypeInfo_GetIDsOfNames(typeinfo, &names, 1, &memid); - ok(hr == S_OK, "GetIDsOfNames failed: %08x\n", hr); + ok(hr == S_OK, "GetIDsOfNames failed: %08lx\n", hr); ok(!lstrcmpW(str, L"queryinterface"), "Unexpected string %s\n", wine_dbgstr_w(str)); wcscpy(str, L"C"); hr = ITypeInfo_GetIDsOfNames(typeinfo, &names, 1, &memid); - ok(hr == DISP_E_UNKNOWNNAME, "GetIDsOfNames returned: %08x\n", hr); + ok(hr == DISP_E_UNKNOWNNAME, "GetIDsOfNames returned: %08lx\n", hr); wcscpy(str, L"SUBtract"); hr = ITypeInfo_GetIDsOfNames(typeinfo, &names, 1, &memid); - ok(hr == S_OK, "GetIDsOfNames failed: %08x\n", hr); + ok(hr == S_OK, "GetIDsOfNames failed: %08lx\n", hr); ok(!lstrcmpW(str, L"SUBtract"), "Unexpected string %s\n", wine_dbgstr_w(str));
hr = ITypeInfo_GetNames(typeinfo, memid, NULL, 1, &count); - ok(hr == E_INVALIDARG, "GetNames returned: %08x\n", hr); + ok(hr == E_INVALIDARG, "GetNames returned: %08lx\n", hr); hr = ITypeInfo_GetNames(typeinfo, memid, bstrs, 1, NULL); - ok(hr == E_INVALIDARG, "GetNames returned: %08x\n", hr); + ok(hr == E_INVALIDARG, "GetNames returned: %08lx\n", hr); hr = ITypeInfo_GetNames(typeinfo, memid, bstrs, 0, &count); - ok(hr == S_OK, "GetNames failed: %08x\n", hr); + ok(hr == S_OK, "GetNames failed: %08lx\n", hr); ok(count == 0, "Unexpected count %u\n", count); hr = ITypeInfo_GetNames(typeinfo, memid, bstrs, ARRAY_SIZE(bstrs), &count); - ok(hr == S_OK, "GetNames failed: %08x\n", hr); + ok(hr == S_OK, "GetNames failed: %08lx\n", hr); ok(count == 3, "Unexpected count %u\n", count); ok(!lstrcmpW(bstrs[0], L"subtract"), "Unexpected function name %s\n", wine_dbgstr_w(bstrs[0])); ok(!lstrcmpW(bstrs[1], L"x"), "Unexpected function first param name %s\n", wine_dbgstr_w(bstrs[1])); @@ -1256,54 +1256,54 @@ static void test_script_typeinfo(void) for (i = 0; i < count; i++) SysFreeString(bstrs[i]);
hr = ITypeInfo_GetMops(typeinfo, memid, NULL); - ok(hr == E_INVALIDARG, "GetMops returned: %08x\n", hr); + ok(hr == E_INVALIDARG, "GetMops returned: %08lx\n", hr); hr = ITypeInfo_GetMops(typeinfo, memid, &bstr); - ok(hr == S_OK, "GetMops failed: %08x\n", hr); + ok(hr == S_OK, "GetMops failed: %08lx\n", hr); ok(!bstr, "Unexpected non-null string %s\n", wine_dbgstr_w(bstr)); hr = ITypeInfo_GetMops(typeinfo, MEMBERID_NIL, &bstr); - ok(hr == S_OK, "GetMops failed: %08x\n", hr); + ok(hr == S_OK, "GetMops failed: %08lx\n", hr); ok(!bstr, "Unexpected non-null string %s\n", wine_dbgstr_w(bstr));
/* These always fail */ obj = (void*)0xdeadbeef; hr = ITypeInfo_AddressOfMember(typeinfo, memid, INVOKE_FUNC, NULL); - ok(hr == E_INVALIDARG, "AddressOfMember returned: %08x\n", hr); + ok(hr == E_INVALIDARG, "AddressOfMember returned: %08lx\n", hr); hr = ITypeInfo_AddressOfMember(typeinfo, memid, INVOKE_FUNC, &obj); - ok(hr == TYPE_E_BADMODULEKIND, "AddressOfMember returned: %08x\n", hr); + ok(hr == TYPE_E_BADMODULEKIND, "AddressOfMember returned: %08lx\n", hr); ok(!obj, "Unexpected non-null obj %p.\n", obj); bstr = (BSTR)0xdeadbeef; hr = ITypeInfo_GetDllEntry(typeinfo, memid, INVOKE_FUNC, &bstr, NULL, NULL); - ok(hr == TYPE_E_BADMODULEKIND, "GetDllEntry returned: %08x\n", hr); + ok(hr == TYPE_E_BADMODULEKIND, "GetDllEntry returned: %08lx\n", hr); ok(!bstr, "Unexpected non-null str %p.\n", bstr); wcscpy(str, L"Invoke"); hr = ITypeInfo_GetIDsOfNames(typeinfo, &names, 1, &memid); - ok(hr == S_OK, "GetIDsOfNames failed: %08x\n", hr); + ok(hr == S_OK, "GetIDsOfNames failed: %08lx\n", hr); obj = (void*)0xdeadbeef; hr = ITypeInfo_AddressOfMember(typeinfo, memid, INVOKE_FUNC, &obj); - ok(hr == TYPE_E_BADMODULEKIND, "AddressOfMember returned: %08x\n", hr); + ok(hr == TYPE_E_BADMODULEKIND, "AddressOfMember returned: %08lx\n", hr); ok(!obj, "Unexpected non-null obj %p.\n", obj); bstr = (BSTR)0xdeadbeef; hr = ITypeInfo_GetDllEntry(typeinfo, memid, INVOKE_FUNC, &bstr, NULL, NULL); - ok(hr == TYPE_E_BADMODULEKIND, "GetDllEntry returned: %08x\n", hr); + ok(hr == TYPE_E_BADMODULEKIND, "GetDllEntry returned: %08lx\n", hr); ok(!bstr, "Unexpected non-null str %p.\n", bstr);
/* Check variable descriptions */ hr = ITypeInfo_GetVarDesc(typeinfo, 0, NULL); - ok(hr == E_INVALIDARG, "GetVarDesc returned: %08x\n", hr); + ok(hr == E_INVALIDARG, "GetVarDesc returned: %08lx\n", hr); hr = ITypeInfo_GetVarDesc(typeinfo, 1337, &vardesc); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "GetVarDesc returned: %08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "GetVarDesc returned: %08lx\n", hr); for (i = 0; i < ARRAY_SIZE(var); i++) { hr = ITypeInfo_GetVarDesc(typeinfo, i, &vardesc); - ok(hr == S_OK, "GetVarDesc(%u) failed: %08x\n", i, hr); + ok(hr == S_OK, "GetVarDesc(%u) failed: %08lx\n", i, hr); hr = ITypeInfo_GetDocumentation(typeinfo, vardesc->memid, &bstr, &bstrs[0], NULL, NULL); - ok(hr == S_OK, "[%u] GetDocumentation failed: %08x\n", i, hr); + ok(hr == S_OK, "[%u] GetDocumentation failed: %08lx\n", i, hr); ok(!lstrcmpW(bstr, var[i].name), "[%u] Unexpected variable name %s (expected %s)\n", i, wine_dbgstr_w(bstr), wine_dbgstr_w(var[i].name)); ok(!bstrs[0], "[%u] Unexpected doc string %s\n", i, wine_dbgstr_w(bstrs[0])); SysFreeString(bstr); ok(vardesc->lpstrSchema == NULL, "[%u] Unexpected lpstrSchema %p\n", i, vardesc->lpstrSchema); - ok(vardesc->oInst == 0, "[%u] Unexpected oInst %u\n", i, vardesc->oInst); + ok(vardesc->oInst == 0, "[%u] Unexpected oInst %lu\n", i, vardesc->oInst); ok(vardesc->varkind == VAR_DISPATCH, "[%u] Unexpected varkind %d\n", i, vardesc->varkind); ok(vardesc->wVarFlags == 0, "[%u] Unexpected wVarFlags 0x%x\n", i, vardesc->wVarFlags); ok(vardesc->elemdescVar.tdesc.vt == VT_VARIANT, @@ -1317,15 +1317,15 @@ static void test_script_typeinfo(void)
/* Check function descriptions */ hr = ITypeInfo_GetFuncDesc(typeinfo, 0, NULL); - ok(hr == E_INVALIDARG, "GetFuncDesc returned: %08x\n", hr); + ok(hr == E_INVALIDARG, "GetFuncDesc returned: %08lx\n", hr); hr = ITypeInfo_GetFuncDesc(typeinfo, 1337, &funcdesc); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "GetFuncDesc returned: %08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "GetFuncDesc returned: %08lx\n", hr); for (i = 0; i < ARRAY_SIZE(func); i++) { hr = ITypeInfo_GetFuncDesc(typeinfo, i, &funcdesc); - ok(hr == S_OK, "GetFuncDesc(%u) failed: %08x\n", i, hr); + ok(hr == S_OK, "GetFuncDesc(%u) failed: %08lx\n", i, hr); hr = ITypeInfo_GetDocumentation(typeinfo, funcdesc->memid, &bstr, &bstrs[0], NULL, NULL); - ok(hr == S_OK, "[%u] GetDocumentation failed: %08x\n", i, hr); + ok(hr == S_OK, "[%u] GetDocumentation failed: %08lx\n", i, hr); ok(!lstrcmpW(bstr, func[i].name), "[%u] Unexpected function name %s (expected %s)\n", i, wine_dbgstr_w(bstr), wine_dbgstr_w(func[i].name)); ok(!bstrs[0], "[%u] Unexpected doc string %s\n", i, wine_dbgstr_w(bstrs[0])); @@ -1362,37 +1362,37 @@ static void test_script_typeinfo(void)
/* Test TypeComp Binds */ hr = ITypeInfo_QueryInterface(typeinfo, &IID_ITypeComp, (void**)&typecomp); - ok(hr == S_OK, "QueryInterface(IID_ITypeComp) failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface(IID_ITypeComp) failed: %08lx\n", hr); hr = ITypeInfo_GetTypeComp(typeinfo, NULL); - ok(hr == E_INVALIDARG, "GetTypeComp returned: %08x\n", hr); + ok(hr == E_INVALIDARG, "GetTypeComp returned: %08lx\n", hr); hr = ITypeInfo_GetTypeComp(typeinfo, &typecomp2); - ok(hr == S_OK, "GetTypeComp failed: %08x\n", hr); + ok(hr == S_OK, "GetTypeComp failed: %08lx\n", hr); ok(typecomp == typecomp2, "QueryInterface(IID_ITypeComp) and GetTypeComp returned different TypeComps\n"); ITypeComp_Release(typecomp2); wcscpy(str, L"not_found"); hr = ITypeComp_Bind(typecomp, NULL, 0, 0, &typeinfo2, &desckind, &bindptr); - ok(hr == E_INVALIDARG, "Bind returned: %08x\n", hr); + ok(hr == E_INVALIDARG, "Bind returned: %08lx\n", hr); hr = ITypeComp_Bind(typecomp, str, 0, 0, NULL, &desckind, &bindptr); - ok(hr == E_INVALIDARG, "Bind returned: %08x\n", hr); + ok(hr == E_INVALIDARG, "Bind returned: %08lx\n", hr); hr = ITypeComp_Bind(typecomp, str, 0, 0, &typeinfo2, NULL, &bindptr); - ok(hr == E_INVALIDARG, "Bind returned: %08x\n", hr); + ok(hr == E_INVALIDARG, "Bind returned: %08lx\n", hr); hr = ITypeComp_Bind(typecomp, str, 0, 0, &typeinfo2, &desckind, NULL); - ok(hr == E_INVALIDARG, "Bind returned: %08x\n", hr); + ok(hr == E_INVALIDARG, "Bind returned: %08lx\n", hr);
hr = ITypeComp_Bind(typecomp, str, 0, 0, &typeinfo2, &desckind, &bindptr); - ok(hr == S_OK, "Bind failed: %08x\n", hr); + ok(hr == S_OK, "Bind failed: %08lx\n", hr); ok(desckind == DESCKIND_NONE, "Unexpected desckind %u\n", desckind); wcscpy(str, L"GLOBAL_VAR"); hr = ITypeComp_Bind(typecomp, str, 0, INVOKE_FUNC, &typeinfo2, &desckind, &bindptr); - ok(hr == TYPE_E_TYPEMISMATCH, "Bind returned: %08x\n", hr); + ok(hr == TYPE_E_TYPEMISMATCH, "Bind returned: %08lx\n", hr); ok(!lstrcmpW(str, L"GLOBAL_VAR"), "Unexpected string %s\n", wine_dbgstr_w(str)); wcscpy(str, L"C"); hr = ITypeComp_Bind(typecomp, str, 0, 0, &typeinfo2, &desckind, &bindptr); - ok(hr == S_OK, "Bind failed: %08x\n", hr); + ok(hr == S_OK, "Bind failed: %08lx\n", hr); ok(desckind == DESCKIND_NONE, "Unexpected desckind %u\n", desckind); wcscpy(str, L"addRef"); hr = ITypeComp_Bind(typecomp, str, 0, 0, &typeinfo2, &desckind, &bindptr); - ok(hr == S_OK, "Bind failed: %08x\n", hr); + ok(hr == S_OK, "Bind failed: %08lx\n", hr); ok(desckind == DESCKIND_FUNCDESC, "Unexpected desckind %u\n", desckind); ok(!lstrcmpW(str, L"addRef"), "Unexpected string %s\n", wine_dbgstr_w(str)); ITypeInfo_ReleaseFuncDesc(typeinfo2, bindptr.lpfuncdesc); @@ -1401,7 +1401,7 @@ static void test_script_typeinfo(void) { wcscpy(str, var[i].name); hr = ITypeComp_Bind(typecomp, str, 0, INVOKE_PROPERTYGET, &typeinfo2, &desckind, &bindptr); - ok(hr == S_OK, "Bind failed: %08x\n", hr); + ok(hr == S_OK, "Bind failed: %08lx\n", hr); ok(desckind == DESCKIND_VARDESC, "Unexpected desckind %u\n", desckind); ITypeInfo_ReleaseVarDesc(typeinfo2, bindptr.lpvardesc); ITypeInfo_Release(typeinfo2); @@ -1410,30 +1410,30 @@ static void test_script_typeinfo(void) { wcscpy(str, func[i].name); hr = ITypeComp_Bind(typecomp, str, 0, INVOKE_FUNC, &typeinfo2, &desckind, &bindptr); - ok(hr == S_OK, "Bind failed: %08x\n", hr); + ok(hr == S_OK, "Bind failed: %08lx\n", hr); ok(desckind == DESCKIND_FUNCDESC, "Unexpected desckind %u\n", desckind); ITypeInfo_ReleaseFuncDesc(typeinfo2, bindptr.lpfuncdesc); ITypeInfo_Release(typeinfo2); } wcscpy(str, L"VBScriptTypeInfo"); hr = ITypeComp_BindType(typecomp, NULL, 0, &typeinfo2, &typecomp2); - ok(hr == E_INVALIDARG, "BindType returned: %08x\n", hr); + ok(hr == E_INVALIDARG, "BindType returned: %08lx\n", hr); hr = ITypeComp_BindType(typecomp, str, 0, NULL, &typecomp2); - ok(hr == E_INVALIDARG, "BindType returned: %08x\n", hr); + ok(hr == E_INVALIDARG, "BindType returned: %08lx\n", hr); hr = ITypeComp_BindType(typecomp, str, 0, &typeinfo2, NULL); - ok(hr == E_INVALIDARG, "BindType returned: %08x\n", hr); + ok(hr == E_INVALIDARG, "BindType returned: %08lx\n", hr); hr = ITypeComp_BindType(typecomp, str, 0, &typeinfo2, &typecomp2); - ok(hr == S_OK, "BindType failed: %08x\n", hr); + ok(hr == S_OK, "BindType failed: %08lx\n", hr); ok(!typeinfo2, "Unexpected TypeInfo %p (expected null)\n", typeinfo2); ok(!typecomp2, "Unexpected TypeComp %p (expected null)\n", typecomp2); wcscpy(str, L"C"); hr = ITypeComp_BindType(typecomp, str, 0, &typeinfo2, &typecomp2); - ok(hr == S_OK, "BindType failed: %08x\n", hr); + ok(hr == S_OK, "BindType failed: %08lx\n", hr); ok(!typeinfo2, "Unexpected TypeInfo %p (expected null)\n", typeinfo2); ok(!typecomp2, "Unexpected TypeComp %p (expected null)\n", typecomp2); wcscpy(str, L"IDispatch"); hr = ITypeComp_BindType(typecomp, str, 0, &typeinfo2, &typecomp2); - ok(hr == S_OK, "BindType failed: %08x\n", hr); + ok(hr == S_OK, "BindType failed: %08lx\n", hr); ok(!typeinfo2, "Unexpected TypeInfo %p (expected null)\n", typeinfo2); ok(!typecomp2, "Unexpected TypeComp %p (expected null)\n", typecomp2);
@@ -1449,31 +1449,31 @@ static void test_script_typeinfo(void) "function foobar(x, y, z)\nend function\n");
hr = IDispatchEx_GetTypeInfo(script_disp, 0, LOCALE_USER_DEFAULT, &typeinfo2); - ok(hr == S_OK, "GetTypeInfo failed: %08x\n", hr); + ok(hr == S_OK, "GetTypeInfo failed: %08lx\n", hr); hr = ITypeInfo_GetTypeAttr(typeinfo, &attr); - ok(hr == S_OK, "GetTypeAttr failed: %08x\n", hr); + ok(hr == S_OK, "GetTypeAttr failed: %08lx\n", hr); ok(attr->cFuncs == ARRAY_SIZE(func), "Unexpected cFuncs %u\n", attr->cFuncs); ok(attr->cVars == ARRAY_SIZE(var), "Unexpected cVars %u\n", attr->cVars); ITypeInfo_ReleaseTypeAttr(typeinfo, attr); hr = ITypeInfo_GetTypeAttr(typeinfo2, &attr); - ok(hr == S_OK, "GetTypeAttr failed: %08x\n", hr); + ok(hr == S_OK, "GetTypeAttr failed: %08lx\n", hr); ok(attr->cFuncs == ARRAY_SIZE(func) + 1, "Unexpected cFuncs %u\n", attr->cFuncs); ok(attr->cVars == ARRAY_SIZE(var) + 1, "Unexpected cVars %u\n", attr->cVars); ITypeInfo_ReleaseTypeAttr(typeinfo2, attr); hr = ITypeInfo_GetVarDesc(typeinfo2, ARRAY_SIZE(var), &vardesc); - ok(hr == S_OK, "GetVarDesc failed: %08x\n", hr); + ok(hr == S_OK, "GetVarDesc failed: %08lx\n", hr); hr = ITypeInfo_GetDocumentation(typeinfo2, vardesc->memid, &bstr, &bstrs[0], NULL, NULL); - ok(hr == S_OK, "GetDocumentation failed: %08x\n", hr); + ok(hr == S_OK, "GetDocumentation failed: %08lx\n", hr); ok(!lstrcmpW(bstr, L"new_var"), "Unexpected variable name %s\n", wine_dbgstr_w(bstr)); ok(!bstrs[0], "Unexpected doc string %s\n", wine_dbgstr_w(bstrs[0])); ITypeInfo_ReleaseVarDesc(typeinfo2, vardesc); SysFreeString(bstr); hr = ITypeInfo_GetFuncDesc(typeinfo, 0, &funcdesc); - ok(hr == S_OK, "GetFuncDesc failed: %08x\n", hr); + ok(hr == S_OK, "GetFuncDesc failed: %08lx\n", hr); ok(funcdesc->cParams == 0, "Unexpected cParams %d\n", funcdesc->cParams); ITypeInfo_ReleaseFuncDesc(typeinfo, funcdesc); hr = ITypeInfo_GetFuncDesc(typeinfo2, 0, &funcdesc); - ok(hr == S_OK, "GetFuncDesc failed: %08x\n", hr); + ok(hr == S_OK, "GetFuncDesc failed: %08lx\n", hr); ok(funcdesc->cParams == 3, "Unexpected cParams %d\n", funcdesc->cParams); ITypeInfo_ReleaseFuncDesc(typeinfo2, funcdesc); ITypeInfo_Release(typeinfo2); @@ -1486,7 +1486,7 @@ static void test_script_typeinfo(void) SET_EXPECT(OnStateChange_INITIALIZED); SET_EXPECT(OnStateChange_CLOSED); hr = IActiveScript_Close(vbscript); - ok(hr == S_OK, "Close failed: %08x\n", hr); + ok(hr == S_OK, "Close failed: %08lx\n", hr); CHECK_CALLED(OnStateChange_DISCONNECTED); CHECK_CALLED(OnStateChange_INITIALIZED); CHECK_CALLED(OnStateChange_CLOSED); @@ -1505,7 +1505,7 @@ static void test_vbscript(void) vbscript = create_vbscript();
hres = IActiveScript_QueryInterface(vbscript, &IID_IActiveScriptParse, (void**)&parser); - ok(hres == S_OK, "Could not get IActiveScriptParse iface: %08x\n", hres); + ok(hres == S_OK, "Could not get IActiveScriptParse iface: %08lx\n", hres);
test_state(vbscript, SCRIPTSTATE_UNINITIALIZED); test_safety(vbscript); @@ -1513,24 +1513,24 @@ static void test_vbscript(void)
SET_EXPECT(GetLCID); hres = IActiveScript_SetScriptSite(vbscript, &ActiveScriptSite); - ok(hres == S_OK, "SetScriptSite failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptSite failed: %08lx\n", hres); CHECK_CALLED(GetLCID);
test_state(vbscript, SCRIPTSTATE_UNINITIALIZED);
SET_EXPECT(OnStateChange_INITIALIZED); hres = IActiveScriptParse_InitNew(parser); - ok(hres == S_OK, "InitNew failed: %08x\n", hres); + ok(hres == S_OK, "InitNew failed: %08lx\n", hres); CHECK_CALLED(OnStateChange_INITIALIZED);
test_state(vbscript, SCRIPTSTATE_INITIALIZED);
hres = IActiveScriptParse_InitNew(parser); - ok(hres == E_UNEXPECTED, "InitNew failed: %08x, expected E_UNEXPECTED\n", hres); + ok(hres == E_UNEXPECTED, "InitNew failed: %08lx, expected E_UNEXPECTED\n", hres);
SET_EXPECT(OnStateChange_CONNECTED); hres = IActiveScript_SetScriptState(vbscript, SCRIPTSTATE_CONNECTED); - ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_CONNECTED) failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_CONNECTED) failed: %08lx\n", hres); CHECK_CALLED(OnStateChange_CONNECTED);
test_state(vbscript, SCRIPTSTATE_CONNECTED); @@ -1539,7 +1539,7 @@ static void test_vbscript(void) SET_EXPECT(OnStateChange_INITIALIZED); SET_EXPECT(OnStateChange_CLOSED); hres = IActiveScript_Close(vbscript); - ok(hres == S_OK, "Close failed: %08x\n", hres); + ok(hres == S_OK, "Close failed: %08lx\n", hres); CHECK_CALLED(OnStateChange_DISCONNECTED); CHECK_CALLED(OnStateChange_INITIALIZED); CHECK_CALLED(OnStateChange_CLOSED); @@ -1557,7 +1557,7 @@ static void test_vbscript(void) IActiveScriptParseProcedure2_Release(parse_proc);
ref = IActiveScript_Release(vbscript); - ok(!ref, "ref = %d\n", ref); + ok(!ref, "ref = %ld\n", ref); }
static void test_vbscript_uninitializing(void) @@ -1571,49 +1571,49 @@ static void test_vbscript_uninitializing(void) script = create_vbscript();
hres = IActiveScript_QueryInterface(script, &IID_IActiveScriptParse, (void**)&parse); - ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres); + ok(hres == S_OK, "Could not get IActiveScriptParse: %08lx\n", hres);
test_state(script, SCRIPTSTATE_UNINITIALIZED);
hres = IActiveScriptParse_InitNew(parse); - ok(hres == S_OK, "InitNew failed: %08x\n", hres); + ok(hres == S_OK, "InitNew failed: %08lx\n", hres);
test_no_script_dispatch(script);
hres = IActiveScript_SetScriptState(script, SCRIPTSTATE_STARTED); - ok(hres == E_UNEXPECTED, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n", hres); + ok(hres == E_UNEXPECTED, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08lx\n", hres); hres = IActiveScript_SetScriptState(script, SCRIPTSTATE_INITIALIZED); - ok(hres == E_UNEXPECTED, "SetScriptState(SCRIPTSTATE_INITIALIZED) failed: %08x\n", hres); + ok(hres == E_UNEXPECTED, "SetScriptState(SCRIPTSTATE_INITIALIZED) failed: %08lx\n", hres);
SET_EXPECT(GetLCID); SET_EXPECT(OnStateChange_INITIALIZED); hres = IActiveScript_SetScriptSite(script, &ActiveScriptSite); - ok(hres == S_OK, "SetScriptSite failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptSite failed: %08lx\n", hres); CHECK_CALLED(GetLCID); CHECK_CALLED(OnStateChange_INITIALIZED);
test_state(script, SCRIPTSTATE_INITIALIZED);
hres = IActiveScriptParse_ParseScriptText(parse, L"Function f\nEnd Function\n", NULL, NULL, NULL, 0, 1, 0x42, NULL, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
hres = IActiveScript_SetScriptSite(script, &ActiveScriptSite); - ok(hres == E_UNEXPECTED, "SetScriptSite failed: %08x, expected E_UNEXPECTED\n", hres); + ok(hres == E_UNEXPECTED, "SetScriptSite failed: %08lx, expected E_UNEXPECTED\n", hres);
SET_EXPECT(OnStateChange_UNINITIALIZED); hres = IActiveScript_SetScriptState(script, SCRIPTSTATE_UNINITIALIZED); - ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_UNINITIALIZED) failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_UNINITIALIZED) failed: %08lx\n", hres); CHECK_CALLED(OnStateChange_UNINITIALIZED);
test_state(script, SCRIPTSTATE_UNINITIALIZED);
hres = IActiveScript_SetScriptState(script, SCRIPTSTATE_UNINITIALIZED); - ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_UNINITIALIZED) failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_UNINITIALIZED) failed: %08lx\n", hres);
SET_EXPECT(GetLCID); SET_EXPECT(OnStateChange_INITIALIZED); hres = IActiveScript_SetScriptSite(script, &ActiveScriptSite); - ok(hres == S_OK, "SetScriptSite failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptSite failed: %08lx\n", hres); CHECK_CALLED(GetLCID); CHECK_CALLED(OnStateChange_INITIALIZED);
@@ -1621,7 +1621,7 @@ static void test_vbscript_uninitializing(void) SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); hres = IActiveScript_SetScriptState(script, SCRIPTSTATE_CONNECTED); - ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_CONNECTED) failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_CONNECTED) failed: %08lx\n", hres); CHECK_CALLED(OnStateChange_CONNECTED); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); @@ -1637,7 +1637,7 @@ static void test_vbscript_uninitializing(void) SET_EXPECT(OnStateChange_INITIALIZED); SET_EXPECT(OnStateChange_UNINITIALIZED); hres = IActiveScript_SetScriptState(script, SCRIPTSTATE_UNINITIALIZED); - ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_UNINITIALIZED) failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_UNINITIALIZED) failed: %08lx\n", hres); CHECK_CALLED(OnStateChange_DISCONNECTED); CHECK_CALLED(OnStateChange_INITIALIZED); CHECK_CALLED(OnStateChange_UNINITIALIZED); @@ -1645,19 +1645,19 @@ static void test_vbscript_uninitializing(void) test_state(script, SCRIPTSTATE_UNINITIALIZED);
hres = IActiveScript_Close(script); - ok(hres == S_OK, "Close failed: %08x\n", hres); + ok(hres == S_OK, "Close failed: %08lx\n", hres);
test_state(script, SCRIPTSTATE_CLOSED);
hres = IActiveScript_SetScriptState(script, SCRIPTSTATE_UNINITIALIZED); - ok(hres == E_UNEXPECTED, "SetScriptState(SCRIPTSTATE_UNINITIALIZED) failed: %08x, expected E_UNEXPECTED\n", hres); + ok(hres == E_UNEXPECTED, "SetScriptState(SCRIPTSTATE_UNINITIALIZED) failed: %08lx, expected E_UNEXPECTED\n", hres);
test_state(script, SCRIPTSTATE_CLOSED);
SET_EXPECT(GetLCID); SET_EXPECT(OnStateChange_INITIALIZED); hres = IActiveScript_SetScriptSite(script, &ActiveScriptSite); - ok(hres == S_OK, "SetScriptSite failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptSite failed: %08lx\n", hres); CHECK_CALLED(GetLCID); CHECK_CALLED(OnStateChange_INITIALIZED);
@@ -1665,20 +1665,20 @@ static void test_vbscript_uninitializing(void)
SET_EXPECT(OnStateChange_STARTED); hres = IActiveScript_SetScriptState(script, SCRIPTSTATE_STARTED); - ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_UNINITIALIZED) failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_UNINITIALIZED) failed: %08lx\n", hres); CHECK_CALLED(OnStateChange_STARTED);
SET_EXPECT(OnStateChange_INITIALIZED); hres = IActiveScript_SetScriptState(script, SCRIPTSTATE_INITIALIZED); - ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_UNINITIALIZED) failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_UNINITIALIZED) failed: %08lx\n", hres); CHECK_CALLED(OnStateChange_INITIALIZED);
hres = IActiveScript_SetScriptState(script, SCRIPTSTATE_INITIALIZED); - ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_UNINITIALIZED) failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_UNINITIALIZED) failed: %08lx\n", hres);
SET_EXPECT(OnStateChange_CLOSED); hres = IActiveScript_Close(script); - ok(hres == S_OK, "Close failed: %08x\n", hres); + ok(hres == S_OK, "Close failed: %08lx\n", hres); CHECK_CALLED(OnStateChange_CLOSED);
test_state(script, SCRIPTSTATE_CLOSED); @@ -1686,7 +1686,7 @@ static void test_vbscript_uninitializing(void) SET_EXPECT(GetLCID); SET_EXPECT(OnStateChange_INITIALIZED); hres = IActiveScript_SetScriptSite(script, &ActiveScriptSite); - ok(hres == S_OK, "SetScriptSite failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptSite failed: %08lx\n", hres); CHECK_CALLED(GetLCID); CHECK_CALLED(OnStateChange_INITIALIZED);
@@ -1694,33 +1694,33 @@ static void test_vbscript_uninitializing(void)
SET_EXPECT(OnStateChange_CLOSED); hres = IActiveScript_Close(script); - ok(hres == S_OK, "Close failed: %08x\n", hres); + ok(hres == S_OK, "Close failed: %08lx\n", hres); CHECK_CALLED(OnStateChange_CLOSED);
test_state(script, SCRIPTSTATE_CLOSED);
hres = IActiveScriptParse_InitNew(parse); - ok(hres == E_UNEXPECTED, "InitNew failed: %08x\n", hres); + ok(hres == E_UNEXPECTED, "InitNew failed: %08lx\n", hres);
/* initialize again and use SetScriptState(SCRIPTSTATE_CLOSED) to uninitialize it */
SET_EXPECT(GetLCID); SET_EXPECT(OnStateChange_INITIALIZED); hres = IActiveScript_SetScriptSite(script, &ActiveScriptSite); - ok(hres == S_OK, "SetScriptSite failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptSite failed: %08lx\n", hres); CHECK_CALLED(GetLCID); CHECK_CALLED(OnStateChange_INITIALIZED);
SET_EXPECT(OnStateChange_CONNECTED); hres = IActiveScript_SetScriptState(script, SCRIPTSTATE_CONNECTED); - ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_CONNECTED) failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_CONNECTED) failed: %08lx\n", hres); CHECK_CALLED(OnStateChange_CONNECTED);
SET_EXPECT(OnStateChange_DISCONNECTED); SET_EXPECT(OnStateChange_INITIALIZED); SET_EXPECT(OnStateChange_CLOSED); hres = IActiveScript_SetScriptState(script, SCRIPTSTATE_CLOSED); - ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_CLOSED) failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_CLOSED) failed: %08lx\n", hres); CHECK_CALLED(OnStateChange_DISCONNECTED); CHECK_CALLED(OnStateChange_INITIALIZED); CHECK_CALLED(OnStateChange_CLOSED); @@ -1728,31 +1728,31 @@ static void test_vbscript_uninitializing(void) test_state(script, SCRIPTSTATE_CLOSED);
hres = IActiveScript_SetScriptState(script, SCRIPTSTATE_CLOSED); - ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_CLOSED) failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_CLOSED) failed: %08lx\n", hres);
hres = IActiveScript_SetScriptState(script, SCRIPTSTATE_INITIALIZED); - ok(hres == E_UNEXPECTED, "SetScriptState(SCRIPTSTATE_INITIALIZED) failed: %08x\n", hres); + ok(hres == E_UNEXPECTED, "SetScriptState(SCRIPTSTATE_INITIALIZED) failed: %08lx\n", hres);
hres = IActiveScript_Close(script); - ok(hres == S_OK, "Close failed: %08x\n", hres); + ok(hres == S_OK, "Close failed: %08lx\n", hres);
SET_EXPECT(GetLCID); SET_EXPECT(OnStateChange_INITIALIZED); hres = IActiveScript_SetScriptSite(script, &ActiveScriptSite); - ok(hres == S_OK, "SetScriptSite failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptSite failed: %08lx\n", hres); CHECK_CALLED(GetLCID); CHECK_CALLED(OnStateChange_INITIALIZED);
SET_EXPECT(OnStateChange_CONNECTED); hres = IActiveScript_SetScriptState(script, SCRIPTSTATE_CONNECTED); - ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_CONNECTED) failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_CONNECTED) failed: %08lx\n", hres); CHECK_CALLED(OnStateChange_CONNECTED);
SET_EXPECT(OnStateChange_DISCONNECTED); SET_EXPECT(OnStateChange_INITIALIZED); SET_EXPECT(OnStateChange_CLOSED); hres = IActiveScript_Close(script); - ok(hres == S_OK, "Close failed: %08x\n", hres); + ok(hres == S_OK, "Close failed: %08lx\n", hres); CHECK_CALLED(OnStateChange_DISCONNECTED); CHECK_CALLED(OnStateChange_INITIALIZED); CHECK_CALLED(OnStateChange_CLOSED); @@ -1760,23 +1760,23 @@ static void test_vbscript_uninitializing(void) test_state(script, SCRIPTSTATE_CLOSED);
hres = IActiveScript_SetScriptState(script, SCRIPTSTATE_CLOSED); - ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_CLOSED) failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_CLOSED) failed: %08lx\n", hres);
hres = IActiveScript_SetScriptState(script, SCRIPTSTATE_INITIALIZED); - ok(hres == E_UNEXPECTED, "SetScriptState(SCRIPTSTATE_INITIALIZED) failed: %08x\n", hres); + ok(hres == E_UNEXPECTED, "SetScriptState(SCRIPTSTATE_INITIALIZED) failed: %08lx\n", hres);
IActiveScriptParse_Release(parse);
ref = IActiveScript_Release(script); - ok(!ref, "ref = %d\n", ref); + ok(!ref, "ref = %ld\n", ref);
script = create_vbscript();
hres = IActiveScript_SetScriptState(script, SCRIPTSTATE_CLOSED); - ok(hres == E_UNEXPECTED, "SetScriptState(SCRIPTSTATE_CLOSED) failed: %08x\n", hres); + ok(hres == E_UNEXPECTED, "SetScriptState(SCRIPTSTATE_CLOSED) failed: %08lx\n", hres);
ref = IActiveScript_Release(script); - ok(!ref, "ref = %d\n", ref); + ok(!ref, "ref = %ld\n", ref); }
static void test_vbscript_release(void) @@ -1789,28 +1789,28 @@ static void test_vbscript_release(void) vbscript = create_vbscript();
hres = IActiveScript_QueryInterface(vbscript, &IID_IActiveScriptParse, (void**)&parser); - ok(hres == S_OK, "Could not get IActiveScriptParse iface: %08x\n", hres); + ok(hres == S_OK, "Could not get IActiveScriptParse iface: %08lx\n", hres);
test_state(vbscript, SCRIPTSTATE_UNINITIALIZED); test_safety(vbscript);
SET_EXPECT(GetLCID); hres = IActiveScript_SetScriptSite(vbscript, &ActiveScriptSite); - ok(hres == S_OK, "SetScriptSite failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptSite failed: %08lx\n", hres); CHECK_CALLED(GetLCID);
test_state(vbscript, SCRIPTSTATE_UNINITIALIZED);
SET_EXPECT(OnStateChange_INITIALIZED); hres = IActiveScriptParse_InitNew(parser); - ok(hres == S_OK, "InitNew failed: %08x\n", hres); + ok(hres == S_OK, "InitNew failed: %08lx\n", hres); CHECK_CALLED(OnStateChange_INITIALIZED);
test_state(vbscript, SCRIPTSTATE_INITIALIZED);
SET_EXPECT(OnStateChange_CONNECTED); hres = IActiveScript_SetScriptState(vbscript, SCRIPTSTATE_CONNECTED); - ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_CONNECTED) failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_CONNECTED) failed: %08lx\n", hres); CHECK_CALLED(OnStateChange_CONNECTED);
test_state(vbscript, SCRIPTSTATE_CONNECTED); @@ -1821,7 +1821,7 @@ static void test_vbscript_release(void) SET_EXPECT(OnStateChange_INITIALIZED); SET_EXPECT(OnStateChange_CLOSED); ref = IActiveScript_Release(vbscript); - ok(!ref, "ref = %d\n", ref); + ok(!ref, "ref = %ld\n", ref); CHECK_CALLED(OnStateChange_DISCONNECTED); CHECK_CALLED(OnStateChange_INITIALIZED); CHECK_CALLED(OnStateChange_CLOSED); @@ -1836,10 +1836,10 @@ static void test_vbscript_simplecreate(void) script = create_vbscript();
hres = IActiveScript_SetScriptState(script, SCRIPTSTATE_UNINITIALIZED); - ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_UNINITIALIZED) failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_UNINITIALIZED) failed: %08lx\n", hres);
ref = IActiveScript_Release(script); - ok(!ref, "ref = %d\n", ref); + ok(!ref, "ref = %ld\n", ref); }
static void test_vbscript_initializing(void) @@ -1852,26 +1852,26 @@ static void test_vbscript_initializing(void) script = create_vbscript();
hres = IActiveScript_QueryInterface(script, &IID_IActiveScriptParse, (void**)&parse); - ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres); + ok(hres == S_OK, "Could not get IActiveScriptParse: %08lx\n", hres);
test_state(script, SCRIPTSTATE_UNINITIALIZED);
SET_EXPECT(GetLCID); hres = IActiveScript_SetScriptSite(script, &ActiveScriptSite); - ok(hres == S_OK, "SetScriptSite failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptSite failed: %08lx\n", hres); CHECK_CALLED(GetLCID);
SET_EXPECT(OnStateChange_INITIALIZED); hres = IActiveScriptParse_InitNew(parse); - ok(hres == S_OK, "InitNew failed: %08x\n", hres); + ok(hres == S_OK, "InitNew failed: %08lx\n", hres); CHECK_CALLED(OnStateChange_INITIALIZED);
hres = IActiveScript_SetScriptSite(script, &ActiveScriptSite); - ok(hres == E_UNEXPECTED, "SetScriptSite failed: %08x, expected E_UNEXPECTED\n", hres); + ok(hres == E_UNEXPECTED, "SetScriptSite failed: %08lx, expected E_UNEXPECTED\n", hres);
SET_EXPECT(OnStateChange_CLOSED); hres = IActiveScript_Close(script); - ok(hres == S_OK, "Close failed: %08x\n", hres); + ok(hres == S_OK, "Close failed: %08lx\n", hres); CHECK_CALLED(OnStateChange_CLOSED);
test_state(script, SCRIPTSTATE_CLOSED); @@ -1879,7 +1879,7 @@ static void test_vbscript_initializing(void) IActiveScriptParse_Release(parse);
ref = IActiveScript_Release(script); - ok(!ref, "ref = %d\n", ref); + ok(!ref, "ref = %ld\n", ref); }
static void test_named_items(void) @@ -1926,49 +1926,49 @@ static void test_named_items(void) script = create_vbscript();
hres = IActiveScript_QueryInterface(script, &IID_IActiveScriptParse, (void**)&parse); - ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres); + ok(hres == S_OK, "Could not get IActiveScriptParse: %08lx\n", hres);
test_state(script, SCRIPTSTATE_UNINITIALIZED);
hres = IActiveScript_AddNamedItem(script, L"visibleItem", SCRIPTITEM_ISVISIBLE); - ok(hres == E_UNEXPECTED, "AddNamedItem returned: %08x\n", hres); + ok(hres == E_UNEXPECTED, "AddNamedItem returned: %08lx\n", hres); hres = IActiveScript_AddNamedItem(script, L"globalItem", SCRIPTITEM_GLOBALMEMBERS); - ok(hres == E_UNEXPECTED, "AddNamedItem returned: %08x\n", hres); + ok(hres == E_UNEXPECTED, "AddNamedItem returned: %08lx\n", hres); hres = IActiveScript_AddNamedItem(script, L"codeOnlyItem", SCRIPTITEM_CODEONLY); - ok(hres == E_UNEXPECTED, "AddNamedItem returned: %08x\n", hres); + ok(hres == E_UNEXPECTED, "AddNamedItem returned: %08lx\n", hres); hres = IActiveScript_AddNamedItem(script, L"persistent", SCRIPTITEM_ISPERSISTENT | SCRIPTITEM_CODEONLY); - ok(hres == E_UNEXPECTED, "AddNamedItem returned: %08x\n", hres); + ok(hres == E_UNEXPECTED, "AddNamedItem returned: %08lx\n", hres);
SET_EXPECT(GetLCID); hres = IActiveScript_SetScriptSite(script, &ActiveScriptSite); - ok(hres == S_OK, "SetScriptSite failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptSite failed: %08lx\n", hres); CHECK_CALLED(GetLCID);
SET_EXPECT(GetItemInfo_global); hres = IActiveScript_AddNamedItem(script, L"globalItem", SCRIPTITEM_GLOBALMEMBERS); - ok(hres == S_OK, "AddNamedItem failed: %08x\n", hres); + ok(hres == S_OK, "AddNamedItem failed: %08lx\n", hres); CHECK_CALLED(GetItemInfo_global);
hres = IActiveScript_AddNamedItem(script, L"visibleItem", SCRIPTITEM_ISVISIBLE); - ok(hres == S_OK, "AddNamedItem failed: %08x\n", hres); + ok(hres == S_OK, "AddNamedItem failed: %08lx\n", hres); hres = IActiveScript_AddNamedItem(script, L"visibleCodeItem", SCRIPTITEM_ISVISIBLE | SCRIPTITEM_CODEONLY); - ok(hres == S_OK, "AddNamedItem failed: %08x\n", hres); + ok(hres == S_OK, "AddNamedItem failed: %08lx\n", hres); hres = IActiveScript_AddNamedItem(script, L"codeOnlyItem", SCRIPTITEM_CODEONLY); - ok(hres == S_OK, "AddNamedItem failed: %08x\n", hres); + ok(hres == S_OK, "AddNamedItem failed: %08lx\n", hres); hres = IActiveScript_AddNamedItem(script, L"persistent", SCRIPTITEM_ISPERSISTENT | SCRIPTITEM_CODEONLY); - ok(hres == S_OK, "AddNamedItem failed: %08x\n", hres); + ok(hres == S_OK, "AddNamedItem failed: %08lx\n", hres);
- ok(global_named_item_ref > 0, "global_named_item_ref = %u\n", global_named_item_ref); - ok(visible_named_item_ref == 0, "visible_named_item_ref = %u\n", visible_named_item_ref); - ok(visible_code_named_item_ref == 0, "visible_code_named_item_ref = %u\n", visible_code_named_item_ref); - ok(persistent_named_item_ref == 0, "persistent_named_item_ref = %u\n", persistent_named_item_ref); + ok(global_named_item_ref > 0, "global_named_item_ref = %lu\n", global_named_item_ref); + ok(visible_named_item_ref == 0, "visible_named_item_ref = %lu\n", visible_named_item_ref); + ok(visible_code_named_item_ref == 0, "visible_code_named_item_ref = %lu\n", visible_code_named_item_ref); + ok(persistent_named_item_ref == 0, "persistent_named_item_ref = %lu\n", persistent_named_item_ref);
hres = IActiveScript_GetScriptDispatch(script, L"noContext", &disp); - ok(hres == E_INVALIDARG, "GetScriptDispatch returned: %08x\n", hres); + ok(hres == E_INVALIDARG, "GetScriptDispatch returned: %08lx\n", hres);
SET_EXPECT(GetItemInfo_global_code); hres = IActiveScript_AddNamedItem(script, L"globalCodeItem", SCRIPTITEM_GLOBALMEMBERS | SCRIPTITEM_CODEONLY); - ok(hres == S_OK, "AddNamedItem failed: %08x\n", hres); + ok(hres == S_OK, "AddNamedItem failed: %08lx\n", hres); CHECK_CALLED(GetItemInfo_global_code);
script_disp = get_script_dispatch(script, NULL); @@ -1983,12 +1983,12 @@ static void test_named_items(void)
SET_EXPECT(OnStateChange_INITIALIZED); hres = IActiveScriptParse_InitNew(parse); - ok(hres == S_OK, "InitNew failed: %08x\n", hres); + ok(hres == S_OK, "InitNew failed: %08lx\n", hres); CHECK_CALLED(OnStateChange_INITIALIZED);
SET_EXPECT(OnStateChange_CONNECTED); hres = IActiveScript_SetScriptState(script, SCRIPTSTATE_CONNECTED); - ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_CONNECTED) failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_CONNECTED) failed: %08lx\n", hres); CHECK_CALLED(OnStateChange_CONNECTED);
SET_EXPECT(testCall); @@ -2005,7 +2005,7 @@ static void test_named_items(void) SET_EXPECT(OnLeaveScript); SET_EXPECT(testCall); hres = IActiveScriptParse_ParseScriptText(parse, L"testCall\n", L"visibleCodeItem", NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); CHECK_CALLED(testCall); @@ -2015,18 +2015,18 @@ static void test_named_items(void) SET_EXPECT(OnScriptError); SET_EXPECT(OnLeaveScript); hres = IActiveScriptParse_ParseScriptText(parse, L"codeOnlyItem\n", L"codeOnlyItem", NULL, NULL, 0, 0, 0, NULL, NULL); - ok(FAILED(hres), "ParseScriptText returned: %08x\n", hres); + ok(FAILED(hres), "ParseScriptText returned: %08lx\n", hres); CHECK_CALLED(OnEnterScript); CHECK_CALLED(GetIDsOfNames); CHECK_CALLED(OnScriptError); CHECK_CALLED(OnLeaveScript);
hres = IActiveScript_GetScriptDispatch(script, L"visibleCodeItem", &disp); - ok(hres == S_OK, "GetScriptDispatch returned: %08x\n", hres); + ok(hres == S_OK, "GetScriptDispatch returned: %08lx\n", hres); SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); hres = IActiveScriptParse_ParseScriptText(parse, L"me", L"visibleCodeItem", NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); ok(V_VT(&var) == VT_DISPATCH && V_DISPATCH(&var) == disp, "Unexpected 'me': V_VT = %d, V_DISPATCH = %p\n", V_VT(&var), V_DISPATCH(&var)); VariantClear(&var); @@ -2040,17 +2040,17 @@ static void test_named_items(void) CHECK_CALLED(GetItemInfo_visible_code); CHECK_CALLED(testCall);
- ok(global_named_item_ref > 0, "global_named_item_ref = %u\n", global_named_item_ref); - ok(visible_named_item_ref == 1, "visible_named_item_ref = %u\n", visible_named_item_ref); - ok(visible_code_named_item_ref == 1, "visible_code_named_item_ref = %u\n", visible_code_named_item_ref); - ok(persistent_named_item_ref == 0, "persistent_named_item_ref = %u\n", persistent_named_item_ref); + ok(global_named_item_ref > 0, "global_named_item_ref = %lu\n", global_named_item_ref); + ok(visible_named_item_ref == 1, "visible_named_item_ref = %lu\n", visible_named_item_ref); + ok(visible_code_named_item_ref == 1, "visible_code_named_item_ref = %lu\n", visible_code_named_item_ref); + ok(persistent_named_item_ref == 0, "persistent_named_item_ref = %lu\n", persistent_named_item_ref);
SET_EXPECT(testCall); parse_script(parse, "visibleItem.testCall\n"); CHECK_CALLED(testCall);
hres = IActiveScriptParse_ParseScriptText(parse, L"sub testSub\nend sub\n", L"noContext", NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == E_INVALIDARG, "ParseScriptText returned: %08x\n", hres); + ok(hres == E_INVALIDARG, "ParseScriptText returned: %08lx\n", hres); SET_EXPECT(OnEnterScript); SET_EXPECT(GetIDsOfNames); SET_EXPECT(OnLeaveScript); @@ -2062,7 +2062,7 @@ static void test_named_items(void) "testVar_global = 10\n" "class testClass_global\nend class\n", NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISPERSISTENT, NULL, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); CHECK_CALLED(OnEnterScript); CHECK_CALLED(GetIDsOfNames); CHECK_CALLED(OnLeaveScript); @@ -2073,7 +2073,7 @@ static void test_named_items(void) "dim testExplicitVar\ntestExplicitVar = 42\n" "class testClass\nend class\n", L"codeOnlyItem", NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); SET_EXPECT(OnEnterScript); @@ -2083,7 +2083,7 @@ static void test_named_items(void) "testVar = 99\n" "testVar_global = 5\n", L"CodeOnlyITEM", NULL, NULL, 0, 0, SCRIPTTEXT_ISPERSISTENT, NULL, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); CHECK_CALLED(OnEnterScript); CHECK_CALLED(GetIDsOfNames); CHECK_CALLED(OnLeaveScript); @@ -2093,7 +2093,7 @@ static void test_named_items(void) SET_EXPECT(GetIDsOfNames_visible); SET_EXPECT(OnLeaveScript); hres = IActiveScriptParse_ParseScriptText(parse, L"dim abc\n", L"visibleItem", NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); CHECK_CALLED(OnEnterScript); todo_wine CHECK_CALLED(GetItemInfo_visible); todo_wine CHECK_CALLED(GetIDsOfNames_visible); @@ -2101,14 +2101,14 @@ static void test_named_items(void) SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); hres = IActiveScriptParse_ParseScriptText(parse, L"abc = 5\n", L"visibleItem", NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); SET_EXPECT(OnEnterScript); SET_EXPECT(GetIDsOfNames_visible); SET_EXPECT(OnLeaveScript); hres = IActiveScriptParse_ParseScriptText(parse, L"testVar_global = 5\n", L"visibleItem", NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); CHECK_CALLED(OnEnterScript); CHECK_CALLED(GetIDsOfNames_visible); CHECK_CALLED(OnLeaveScript); @@ -2116,20 +2116,20 @@ static void test_named_items(void) SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); hres = IActiveScriptParse_ParseScriptText(parse, L"dim abc\ntestVar_global = 5\n", L"visibleCodeItem", NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript);
SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); hres = IActiveScriptParse_ParseScriptText(parse, L"set global_me = me\n", L"globalItem", NULL, NULL, 0, 0, SCRIPTTEXT_ISPERSISTENT, NULL, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); hres = IActiveScriptParse_ParseScriptText(parse, L"set globalCode_me = me\n", L"globalCodeItem", NULL, NULL, 0, 0, SCRIPTTEXT_ISPERSISTENT, NULL, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript);
@@ -2138,12 +2138,12 @@ static void test_named_items(void) bstr = SysAllocString(global_idents[i]); id = 0; hres = IDispatchEx_GetDispID(script_disp, bstr, 0, &id); - ok(hres == S_OK, "GetDispID(%s) returned %08x\n", wine_dbgstr_w(global_idents[i]), hres); + ok(hres == S_OK, "GetDispID(%s) returned %08lx\n", wine_dbgstr_w(global_idents[i]), hres); ok(id != -1, "[%s] id = -1\n", wine_dbgstr_w(global_idents[i])); id = 0; hres = IDispatchEx_GetDispID(script_disp2, bstr, 0, &id); - ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(%s) returned %08x\n", wine_dbgstr_w(global_idents[i]), hres); - ok(id == -1, "[%s] id = %d, expected -1\n", wine_dbgstr_w(global_idents[i]), id); + ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(%s) returned %08lx\n", wine_dbgstr_w(global_idents[i]), hres); + ok(id == -1, "[%s] id = %ld, expected -1\n", wine_dbgstr_w(global_idents[i]), id); SysFreeString(bstr); } for (i = 0; i < ARRAY_SIZE(context_idents); i++) @@ -2151,11 +2151,11 @@ static void test_named_items(void) bstr = SysAllocString(context_idents[i]); id = 0; hres = IDispatchEx_GetDispID(script_disp, bstr, 0, &id); - ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(%s) returned %08x\n", wine_dbgstr_w(context_idents[i]), hres); - ok(id == -1, "[%s] id = %d, expected -1\n", wine_dbgstr_w(context_idents[i]), id); + ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(%s) returned %08lx\n", wine_dbgstr_w(context_idents[i]), hres); + ok(id == -1, "[%s] id = %ld, expected -1\n", wine_dbgstr_w(context_idents[i]), id); id = 0; hres = IDispatchEx_GetDispID(script_disp2, bstr, 0, &id); - ok(hres == S_OK, "GetDispID(%s) returned %08x\n", wine_dbgstr_w(context_idents[i]), hres); + ok(hres == S_OK, "GetDispID(%s) returned %08lx\n", wine_dbgstr_w(context_idents[i]), hres); ok(id != -1, "[%s] id = -1\n", wine_dbgstr_w(context_idents[i])); SysFreeString(bstr); } @@ -2165,14 +2165,14 @@ static void test_named_items(void) SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); hres = IActiveScriptParse_ParseScriptText(parse, global_code_test[i], NULL, NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == S_OK, "ParseScriptText(%s) failed: %08x\n", wine_dbgstr_w(global_code_test[i]), hres); + ok(hres == S_OK, "ParseScriptText(%s) failed: %08lx\n", wine_dbgstr_w(global_code_test[i]), hres); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); SET_EXPECT(OnEnterScript); SET_EXPECT(GetIDsOfNames); SET_EXPECT(OnLeaveScript); hres = IActiveScriptParse_ParseScriptText(parse, global_code_test[i], L"codeOnlyItem", NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == S_OK, "ParseScriptText(%s) failed: %08x\n", wine_dbgstr_w(global_code_test[i]), hres); + ok(hres == S_OK, "ParseScriptText(%s) failed: %08lx\n", wine_dbgstr_w(global_code_test[i]), hres); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); } @@ -2183,7 +2183,7 @@ static void test_named_items(void) SET_EXPECT(OnScriptError); SET_EXPECT(OnLeaveScript); hres = IActiveScriptParse_ParseScriptText(parse, context_code_test[i], NULL, NULL, NULL, 0, 0, 0, NULL, NULL); - ok(FAILED(hres), "ParseScriptText(%s) returned: %08x\n", wine_dbgstr_w(context_code_test[i]), hres); + ok(FAILED(hres), "ParseScriptText(%s) returned: %08lx\n", wine_dbgstr_w(context_code_test[i]), hres); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnScriptError); CHECK_CALLED(OnLeaveScript); @@ -2191,7 +2191,7 @@ static void test_named_items(void) SET_EXPECT(GetIDsOfNames); SET_EXPECT(OnLeaveScript); hres = IActiveScriptParse_ParseScriptText(parse, context_code_test[i], L"codeOnlyItem", NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == S_OK, "ParseScriptText(%s) failed: %08x\n", wine_dbgstr_w(context_code_test[i]), hres); + ok(hres == S_OK, "ParseScriptText(%s) failed: %08lx\n", wine_dbgstr_w(context_code_test[i]), hres); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); } @@ -2199,7 +2199,7 @@ static void test_named_items(void) SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); hres = IActiveScriptParse_ParseScriptText(parse, L"testSub_global = 10\n", L"codeOnlyItem", NULL, NULL, 0, 0, 0, NULL, NULL); - ok(FAILED(hres), "ParseScriptText returned: %08x\n", hres); + ok(FAILED(hres), "ParseScriptText returned: %08lx\n", hres); CHECK_CALLED(OnScriptError); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); @@ -2207,7 +2207,7 @@ static void test_named_items(void) SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); hres = IActiveScriptParse_ParseScriptText(parse, L"me", NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); ok(V_VT(&var) == VT_DISPATCH && V_DISPATCH(&var) == &global_named_item, "Unexpected 'me': V_VT = %d, V_DISPATCH = %p\n", V_VT(&var), V_DISPATCH(&var)); VariantClear(&var); @@ -2216,7 +2216,7 @@ static void test_named_items(void) SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); hres = IActiveScriptParse_ParseScriptText(parse, L"me", L"globalItem", NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); ok(V_VT(&var) == VT_DISPATCH && V_DISPATCH(&var) == &global_named_item, "Unexpected 'me': V_VT = %d, V_DISPATCH = %p\n", V_VT(&var), V_DISPATCH(&var)); VariantClear(&var); @@ -2225,7 +2225,7 @@ static void test_named_items(void) SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); hres = IActiveScriptParse_ParseScriptText(parse, L"me", L"codeOnlyItem", NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); ok(V_VT(&var) == VT_DISPATCH && V_DISPATCH(&var) == (IDispatch*)script_disp2, "Unexpected 'me': V_VT = %d, V_DISPATCH = %p\n", V_VT(&var), V_DISPATCH(&var)); VariantClear(&var); @@ -2234,7 +2234,7 @@ static void test_named_items(void) SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); hres = IActiveScriptParse_ParseScriptText(parse, L"globalCode_me", NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); ok(V_VT(&var) == VT_DISPATCH && V_DISPATCH(&var) == &global_named_item, "Unexpected 'me': V_VT = %d, V_DISPATCH = %p\n", V_VT(&var), V_DISPATCH(&var)); VariantClear(&var); @@ -2248,7 +2248,7 @@ static void test_named_items(void) SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); hres = IActiveScriptParse_ParseScriptText(parse, L"me", L"persistent", NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); ok(V_VT(&var) == VT_DISPATCH && V_DISPATCH(&var) == (IDispatch*)script_disp, "Unexpected 'me': V_VT = %d, V_DISPATCH = %p\n", V_VT(&var), V_DISPATCH(&var)); VariantClear(&var); @@ -2259,19 +2259,19 @@ static void test_named_items(void) SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); hres = IActiveScriptParse_ParseScriptText(parse, L"x = 13\n", L"persistent", NULL, NULL, 0, 0, SCRIPTTEXT_ISPERSISTENT, NULL, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); hres = IActiveScriptParse_ParseScriptText(parse, L"x = 10\n", L"persistent", NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); hres = IActiveScriptParse_ParseScriptText(parse, L"x", L"persistent", NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); ok(V_VT(&var) == VT_I2 && V_I2(&var) == 10, "Unexpected 'x': V_VT = %d, V_I2 = %d\n", V_VT(&var), V_I2(&var)); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); @@ -2282,39 +2282,39 @@ static void test_named_items(void) SET_EXPECT(OnStateChange_INITIALIZED); SET_EXPECT(OnStateChange_UNINITIALIZED); hres = IActiveScript_SetScriptState(script, SCRIPTSTATE_UNINITIALIZED); - ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_UNINITIALIZED) failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_UNINITIALIZED) failed: %08lx\n", hres); CHECK_CALLED(OnStateChange_DISCONNECTED); CHECK_CALLED(OnStateChange_INITIALIZED); CHECK_CALLED(OnStateChange_UNINITIALIZED); test_no_script_dispatch(script);
- ok(global_named_item_ref == 0, "global_named_item_ref = %u\n", global_named_item_ref); - ok(visible_named_item_ref == 0, "visible_named_item_ref = %u\n", visible_named_item_ref); - ok(visible_code_named_item_ref == 0, "visible_code_named_item_ref = %u\n", visible_code_named_item_ref); - ok(persistent_named_item_ref == 0, "persistent_named_item_ref = %u\n", persistent_named_item_ref); + ok(global_named_item_ref == 0, "global_named_item_ref = %lu\n", global_named_item_ref); + ok(visible_named_item_ref == 0, "visible_named_item_ref = %lu\n", visible_named_item_ref); + ok(visible_code_named_item_ref == 0, "visible_code_named_item_ref = %lu\n", visible_code_named_item_ref); + ok(persistent_named_item_ref == 0, "persistent_named_item_ref = %lu\n", persistent_named_item_ref);
hres = IActiveScript_GetScriptDispatch(script, L"codeOnlyItem", &disp); - ok(hres == E_UNEXPECTED, "hres = %08x, expected E_UNEXPECTED\n", hres); + ok(hres == E_UNEXPECTED, "hres = %08lx, expected E_UNEXPECTED\n", hres);
SET_EXPECT(GetLCID); SET_EXPECT(OnStateChange_INITIALIZED); SET_EXPECT(GetItemInfo_persistent); hres = IActiveScript_SetScriptSite(script, &ActiveScriptSite); - ok(hres == S_OK, "SetScriptSite failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptSite failed: %08lx\n", hres); CHECK_CALLED(GetLCID); CHECK_CALLED(OnStateChange_INITIALIZED); CHECK_CALLED(GetItemInfo_persistent); - ok(persistent_named_item_ref > 0, "persistent_named_item_ref = %u\n", persistent_named_item_ref); + ok(persistent_named_item_ref > 0, "persistent_named_item_ref = %lu\n", persistent_named_item_ref);
hres = IActiveScript_AddNamedItem(script, L"codeOnlyItem", SCRIPTITEM_CODEONLY); - ok(hres == S_OK, "AddNamedItem failed: %08x\n", hres); + ok(hres == S_OK, "AddNamedItem failed: %08lx\n", hres);
SET_EXPECT(OnStateChange_CONNECTED); SET_EXPECT_MULTI(OnEnterScript, 5); SET_EXPECT_MULTI(OnLeaveScript, 5); SET_EXPECT(GetIDsOfNames_persistent); hres = IActiveScript_SetScriptState(script, SCRIPTSTATE_CONNECTED); - ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_CONNECTED) failed: %08x\n", hres); + ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_CONNECTED) failed: %08lx\n", hres); CHECK_CALLED(OnStateChange_CONNECTED); CHECK_CALLED_MULTI(OnEnterScript, 5); CHECK_CALLED_MULTI(OnLeaveScript, 5); @@ -2328,7 +2328,7 @@ static void test_named_items(void) SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); hres = IActiveScriptParse_ParseScriptText(parse, L"x", L"persistent", NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); ok(V_VT(&var) == VT_I2 && V_I2(&var) == 13, "Unexpected 'x': V_VT = %d, V_I2 = %d\n", V_VT(&var), V_I2(&var)); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); @@ -2337,7 +2337,7 @@ static void test_named_items(void) SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); hres = IActiveScriptParse_ParseScriptText(parse, L"me", L"persistent", NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); ok(V_VT(&var) == VT_DISPATCH && V_DISPATCH(&var) == &persistent_named_item, "Unexpected 'me': V_VT = %d, V_DISPATCH = %p\n", V_VT(&var), V_DISPATCH(&var)); VariantClear(&var); @@ -2349,7 +2349,7 @@ static void test_named_items(void) SET_EXPECT(OnLeaveScript); SET_EXPECT(GetIDsOfNames_persistent); hres = IActiveScriptParse_ParseScriptText(parse, L"abc123 = 10\n", L"persistent", NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); CHECK_CALLED(GetIDsOfNames_persistent); @@ -2359,7 +2359,7 @@ static void test_named_items(void) SET_EXPECT(GetIDsOfNames_persistent); SET_EXPECT(OnScriptError); hres = IActiveScriptParse_ParseScriptText(parse, L"testCall\n", L"persistent", NULL, NULL, 0, 0, 0, NULL, NULL); - ok(FAILED(hres), "ParseScriptText returned: %08x\n", hres); + ok(FAILED(hres), "ParseScriptText returned: %08lx\n", hres); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); CHECK_CALLED(GetIDsOfNames_persistent); @@ -2371,7 +2371,7 @@ static void test_named_items(void) bstr = SysAllocString(global_idents[i]); id = 0; hres = IDispatchEx_GetDispID(script_disp, bstr, 0, &id); - ok(hres == S_OK, "GetDispID(%s) returned %08x\n", wine_dbgstr_w(global_idents[i]), hres); + ok(hres == S_OK, "GetDispID(%s) returned %08lx\n", wine_dbgstr_w(global_idents[i]), hres); ok(id != -1, "[%s] id = -1\n", wine_dbgstr_w(global_idents[i])); SysFreeString(bstr); } @@ -2380,14 +2380,14 @@ static void test_named_items(void) bstr = SysAllocString(context_idents[i]); id = 0; hres = IDispatchEx_GetDispID(script_disp, bstr, 0, &id); - ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(%s) returned %08x\n", wine_dbgstr_w(context_idents[i]), hres); - ok(id == -1, "[%s] id = %d, expected -1\n", wine_dbgstr_w(context_idents[i]), id); + ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(%s) returned %08lx\n", wine_dbgstr_w(context_idents[i]), hres); + ok(id == -1, "[%s] id = %ld, expected -1\n", wine_dbgstr_w(context_idents[i]), id); SysFreeString(bstr); } SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); hres = IActiveScriptParse_ParseScriptText(parse, L"global_me", NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); ok(V_VT(&var) == VT_DISPATCH && V_DISPATCH(&var) == (IDispatch*)script_disp, "Unexpected 'me': V_VT = %d, V_DISPATCH = %p\n", V_VT(&var), V_DISPATCH(&var)); VariantClear(&var); @@ -2396,7 +2396,7 @@ static void test_named_items(void) SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); hres = IActiveScriptParse_ParseScriptText(parse, L"globalCode_me", NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); ok(V_VT(&var) == VT_DISPATCH && V_DISPATCH(&var) == (IDispatch*)script_disp, "Unexpected 'me': V_VT = %d, V_DISPATCH = %p\n", V_VT(&var), V_DISPATCH(&var)); VariantClear(&var); @@ -2405,7 +2405,7 @@ static void test_named_items(void) SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); hres = IActiveScriptParse_ParseScriptText(parse, L"global_me = 0\nglobalCode_me = 0\n", NULL, NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); IDispatchEx_Release(script_disp); @@ -2416,8 +2416,8 @@ static void test_named_items(void) bstr = SysAllocString(global_idents[i]); id = 0; hres = IDispatchEx_GetDispID(script_disp, bstr, 0, &id); - ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(%s) returned %08x\n", wine_dbgstr_w(global_idents[i]), hres); - ok(id == -1, "[%s] id = %d, expected -1\n", wine_dbgstr_w(global_idents[i]), id); + ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(%s) returned %08lx\n", wine_dbgstr_w(global_idents[i]), hres); + ok(id == -1, "[%s] id = %ld, expected -1\n", wine_dbgstr_w(global_idents[i]), id); SysFreeString(bstr); } for (i = 0; i < ARRAY_SIZE(context_idents); i++) @@ -2425,8 +2425,8 @@ static void test_named_items(void) bstr = SysAllocString(context_idents[i]); id = 0; hres = IDispatchEx_GetDispID(script_disp, bstr, 0, &id); - ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(%s) returned %08x\n", wine_dbgstr_w(context_idents[i]), hres); - ok(id == -1, "[%s] id = %d, expected -1\n", wine_dbgstr_w(context_idents[i]), id); + ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(%s) returned %08lx\n", wine_dbgstr_w(context_idents[i]), hres); + ok(id == -1, "[%s] id = %ld, expected -1\n", wine_dbgstr_w(context_idents[i]), id); SysFreeString(bstr); } IDispatchEx_Release(script_disp); @@ -2436,13 +2436,13 @@ static void test_named_items(void) SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); hres = IActiveScriptParse_ParseScriptText(parse, global_code_test[i], NULL, NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == S_OK, "ParseScriptText(%s) failed: %08x\n", wine_dbgstr_w(global_code_test[i]), hres); + ok(hres == S_OK, "ParseScriptText(%s) failed: %08lx\n", wine_dbgstr_w(global_code_test[i]), hres); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); hres = IActiveScriptParse_ParseScriptText(parse, global_code_test[i], L"codeOnlyItem", NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == S_OK, "ParseScriptText(%s) failed: %08x\n", wine_dbgstr_w(global_code_test[i]), hres); + ok(hres == S_OK, "ParseScriptText(%s) failed: %08lx\n", wine_dbgstr_w(global_code_test[i]), hres); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); } @@ -2452,7 +2452,7 @@ static void test_named_items(void) SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); hres = IActiveScriptParse_ParseScriptText(parse, context_code_test[i], NULL, NULL, NULL, 0, 0, 0, NULL, NULL); - ok(FAILED(hres), "ParseScriptText(%s) returned: %08x\n", wine_dbgstr_w(context_code_test[i]), hres); + ok(FAILED(hres), "ParseScriptText(%s) returned: %08lx\n", wine_dbgstr_w(context_code_test[i]), hres); CHECK_CALLED(OnScriptError); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); @@ -2460,7 +2460,7 @@ static void test_named_items(void) SET_EXPECT(OnEnterScript); SET_EXPECT(OnLeaveScript); hres = IActiveScriptParse_ParseScriptText(parse, context_code_test[i], L"codeOnlyItem", NULL, NULL, 0, 0, 0, NULL, NULL); - ok(FAILED(hres), "ParseScriptText(%s) returned: %08x\n", wine_dbgstr_w(context_code_test[i]), hres); + ok(FAILED(hres), "ParseScriptText(%s) returned: %08lx\n", wine_dbgstr_w(context_code_test[i]), hres); CHECK_CALLED(OnScriptError); CHECK_CALLED(OnEnterScript); CHECK_CALLED(OnLeaveScript); @@ -2470,22 +2470,22 @@ static void test_named_items(void) SET_EXPECT(OnStateChange_INITIALIZED); SET_EXPECT(OnStateChange_CLOSED); hres = IActiveScript_Close(script); - ok(hres == S_OK, "Close failed: %08x\n", hres); + ok(hres == S_OK, "Close failed: %08lx\n", hres); CHECK_CALLED(OnStateChange_DISCONNECTED); CHECK_CALLED(OnStateChange_INITIALIZED); CHECK_CALLED(OnStateChange_CLOSED);
- ok(global_named_item_ref == 0, "global_named_item_ref = %u\n", global_named_item_ref); - ok(visible_named_item_ref == 0, "visible_named_item_ref = %u\n", visible_named_item_ref); - ok(visible_code_named_item_ref == 0, "visible_code_named_item_ref = %u\n", visible_code_named_item_ref); - ok(persistent_named_item_ref == 0, "persistent_named_item_ref = %u\n", persistent_named_item_ref); + ok(global_named_item_ref == 0, "global_named_item_ref = %lu\n", global_named_item_ref); + ok(visible_named_item_ref == 0, "visible_named_item_ref = %lu\n", visible_named_item_ref); + ok(visible_code_named_item_ref == 0, "visible_code_named_item_ref = %lu\n", visible_code_named_item_ref); + ok(persistent_named_item_ref == 0, "persistent_named_item_ref = %lu\n", persistent_named_item_ref);
test_state(script, SCRIPTSTATE_CLOSED);
IActiveScriptParse_Release(parse);
ref = IActiveScript_Release(script); - ok(!ref, "ref = %d\n", ref); + ok(!ref, "ref = %ld\n", ref); }
static void test_RegExp(void) @@ -2510,118 +2510,118 @@ static void test_RegExp(void) win_skip("VBScriptRegExp is not registered\n"); return; } - ok(hres == S_OK, "CoCreateInstance(CLSID_VBScriptRegExp) failed: %x\n", hres); + ok(hres == S_OK, "CoCreateInstance(CLSID_VBScriptRegExp) failed: %lx\n", hres);
hres = IUnknown_QueryInterface(unk, &IID_IRegExp2, (void**)®exp); if(hres == E_NOINTERFACE) { win_skip("IRegExp2 interface is not available\n"); return; } - ok(hres == S_OK, "QueryInterface(IID_IRegExp2) failed: %x\n", hres); + ok(hres == S_OK, "QueryInterface(IID_IRegExp2) failed: %lx\n", hres); IUnknown_Release(unk);
hres = IRegExp2_QueryInterface(regexp, &IID_IRegExp, (void**)&unk); - ok(hres == S_OK, "QueryInterface(IID_IRegExp) returned %x\n", hres); + ok(hres == S_OK, "QueryInterface(IID_IRegExp) returned %lx\n", hres); IUnknown_Release(unk);
hres = IRegExp2_QueryInterface(regexp, &IID_IDispatchEx, (void**)&unk); - ok(hres == E_NOINTERFACE, "QueryInterface(IID_IDispatchEx) returned %x\n", hres); + ok(hres == E_NOINTERFACE, "QueryInterface(IID_IDispatchEx) returned %lx\n", hres);
hres = IRegExp2_get_Pattern(regexp, &bstr); ok(bstr == NULL, "bstr != NULL\n"); - ok(hres == S_OK, "get_Pattern returned %x, expected S_OK\n", hres); + ok(hres == S_OK, "get_Pattern returned %lx, expected S_OK\n", hres);
hres = IRegExp2_get_Pattern(regexp, NULL); - ok(hres == E_POINTER, "get_Pattern returned %x, expected E_POINTER\n", hres); + ok(hres == E_POINTER, "get_Pattern returned %lx, expected E_POINTER\n", hres);
hres = IRegExp2_get_IgnoreCase(regexp, NULL); - ok(hres == E_POINTER, "get_IgnoreCase returned %x, expected E_POINTER\n", hres); + ok(hres == E_POINTER, "get_IgnoreCase returned %lx, expected E_POINTER\n", hres);
hres = IRegExp2_get_Global(regexp, NULL); - ok(hres == E_POINTER, "get_Global returned %x, expected E_POINTER\n", hres); + ok(hres == E_POINTER, "get_Global returned %lx, expected E_POINTER\n", hres);
hres = IRegExp2_Execute(regexp, NULL, &disp); - ok(hres == S_OK, "Execute returned %x, expected S_OK\n", hres); + ok(hres == S_OK, "Execute returned %lx, expected S_OK\n", hres); hres = IDispatch_QueryInterface(disp, &IID_IMatchCollection2, (void**)&mc); - ok(hres == S_OK, "QueryInterface(IID_IMatchCollection2) returned %x\n", hres); + ok(hres == S_OK, "QueryInterface(IID_IMatchCollection2) returned %lx\n", hres); IDispatch_Release(disp);
hres = IMatchCollection2_QueryInterface(mc, &IID_IMatchCollection, (void**)&unk); - ok(hres == S_OK, "QueryInterface(IID_IMatchCollection) returned %x\n", hres); + ok(hres == S_OK, "QueryInterface(IID_IMatchCollection) returned %lx\n", hres); IUnknown_Release(unk);
hres = IMatchCollection2_get_Count(mc, NULL); - ok(hres == E_POINTER, "get_Count returned %x, expected E_POINTER\n", hres); + ok(hres == E_POINTER, "get_Count returned %lx, expected E_POINTER\n", hres);
hres = IMatchCollection2_get_Count(mc, &count); - ok(hres == S_OK, "get_Count returned %x, expected S_OK\n", hres); - ok(count == 1, "count = %d\n", count); + ok(hres == S_OK, "get_Count returned %lx, expected S_OK\n", hres); + ok(count == 1, "count = %ld\n", count);
hres = IMatchCollection2_get_Item(mc, 1, &disp); - ok(hres == E_INVALIDARG, "get_Item returned %x, expected E_INVALIDARG\n", hres); + ok(hres == E_INVALIDARG, "get_Item returned %lx, expected E_INVALIDARG\n", hres);
hres = IMatchCollection2_get_Item(mc, 1, NULL); - ok(hres == E_POINTER, "get_Item returned %x, expected E_POINTER\n", hres); + ok(hres == E_POINTER, "get_Item returned %lx, expected E_POINTER\n", hres);
hres = IMatchCollection2_get_Item(mc, 0, &disp); - ok(hres == S_OK, "get_Item returned %x, expected S_OK\n", hres); + ok(hres == S_OK, "get_Item returned %lx, expected S_OK\n", hres); hres = IDispatch_QueryInterface(disp, &IID_IMatch2, (void**)&match); - ok(hres == S_OK, "QueryInterface(IID_IMatch2) returned %x\n", hres); + ok(hres == S_OK, "QueryInterface(IID_IMatch2) returned %lx\n", hres); IDispatch_Release(disp);
hres = IMatch2_QueryInterface(match, &IID_IMatch, (void**)&unk); - ok(hres == S_OK, "QueryInterface(IID_IMatch) returned %x\n", hres); + ok(hres == S_OK, "QueryInterface(IID_IMatch) returned %lx\n", hres); IUnknown_Release(unk);
hres = IMatch2_get_Value(match, NULL); - ok(hres == E_POINTER, "get_Value returned %x, expected E_POINTER\n", hres); + ok(hres == E_POINTER, "get_Value returned %lx, expected E_POINTER\n", hres);
hres = IMatch2_get_FirstIndex(match, NULL); - ok(hres == E_POINTER, "get_FirstIndex returned %x, expected E_POINTER\n", hres); + ok(hres == E_POINTER, "get_FirstIndex returned %lx, expected E_POINTER\n", hres);
hres = IMatch2_get_Length(match, NULL); - ok(hres == E_POINTER, "get_Length returned %x, expected E_POINTER\n", hres); + ok(hres == E_POINTER, "get_Length returned %lx, expected E_POINTER\n", hres);
hres = IMatch2_get_SubMatches(match, NULL); - ok(hres == E_POINTER, "get_SubMatches returned %x, expected E_POINTER\n", hres); + ok(hres == E_POINTER, "get_SubMatches returned %lx, expected E_POINTER\n", hres);
hres = IMatch2_get_SubMatches(match, &disp); - ok(hres == S_OK, "get_SubMatches returned %x, expected S_OK\n", hres); + ok(hres == S_OK, "get_SubMatches returned %lx, expected S_OK\n", hres); IMatch2_Release(match); hres = IDispatch_QueryInterface(disp, &IID_ISubMatches, (void**)&sm); - ok(hres == S_OK, "QueryInterface(IID_ISubMatches) returned %x\n", hres); + ok(hres == S_OK, "QueryInterface(IID_ISubMatches) returned %lx\n", hres); IDispatch_Release(disp);
hres = ISubMatches_get_Item(sm, 0, &v); - ok(hres == E_INVALIDARG, "get_Item returned %x, expected E_INVALIDARG\n", hres); + ok(hres == E_INVALIDARG, "get_Item returned %lx, expected E_INVALIDARG\n", hres);
hres = ISubMatches_get_Item(sm, 0, NULL); - ok(hres == E_POINTER, "get_Item returned %x, expected E_POINTER\n", hres); + ok(hres == E_POINTER, "get_Item returned %lx, expected E_POINTER\n", hres);
hres = ISubMatches_get_Count(sm, NULL); - ok(hres == E_POINTER, "get_Count returned %x, expected E_POINTER\n", hres); + ok(hres == E_POINTER, "get_Count returned %lx, expected E_POINTER\n", hres); ISubMatches_Release(sm);
hres = IMatchCollection2_get__NewEnum(mc, &unk); - ok(hres == S_OK, "get__NewEnum returned %x, expected S_OK\n", hres); + ok(hres == S_OK, "get__NewEnum returned %lx, expected S_OK\n", hres); hres = IUnknown_QueryInterface(unk, &IID_IEnumVARIANT, (void**)&ev); - ok(hres == S_OK, "QueryInterface(IID_IEnumVARIANT) returned %x\n", hres); + ok(hres == S_OK, "QueryInterface(IID_IEnumVARIANT) returned %lx\n", hres); IUnknown_Release(unk); IMatchCollection2_Release(mc);
hres = IEnumVARIANT_Skip(ev, 2); - ok(hres == S_OK, "Skip returned %x\n", hres); + ok(hres == S_OK, "Skip returned %lx\n", hres);
hres = IEnumVARIANT_Next(ev, 1, &v, &fetched); - ok(hres == S_FALSE, "Next returned %x, expected S_FALSE\n", hres); - ok(fetched == 0, "fetched = %d\n", fetched); + ok(hres == S_FALSE, "Next returned %lx, expected S_FALSE\n", hres); + ok(fetched == 0, "fetched = %ld\n", fetched);
hres = IEnumVARIANT_Skip(ev, -1); - ok(hres == S_OK, "Skip returned %x\n", hres); + ok(hres == S_OK, "Skip returned %lx\n", hres);
hres = IEnumVARIANT_Next(ev, 1, &v, &fetched); - ok(hres == S_OK, "Next returned %x\n", hres); - ok(fetched == 1, "fetched = %d\n", fetched); + ok(hres == S_OK, "Next returned %lx\n", hres); + ok(fetched == 1, "fetched = %ld\n", fetched); VariantClear(&v); IEnumVARIANT_Release(ev);
@@ -2658,23 +2658,23 @@ static void test_RegExp_Replace(void) win_skip("VBScriptRegExp is not registered\n"); return; } - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
for (i = 0; i < ARRAY_SIZE(test); i++) { hr = IRegExp2_put_Global(regexp, test[i].global ? VARIANT_TRUE : VARIANT_FALSE); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
str = a2bstr(test[i].pattern); hr = IRegExp2_put_Pattern(regexp, str); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); SysFreeString(str);
str = a2bstr(test[i].source); V_VT(&var) = VT_BSTR; V_BSTR(&var) = a2bstr(test[i].replace); hr = IRegExp2_Replace(regexp, str, var, &ret); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); result = a2bstr(test[i].result); ok(!wcscmp(ret, result), "got %s, expected %s\n", wine_dbgstr_w(ret), wine_dbgstr_w(result)); SysFreeString(result);
Signed-off-by: Jacek Caban jacek@codeweavers.com
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/vcomp110/tests/Makefile.in | 1 - dlls/vcomp110/tests/vcomp110.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/vcomp110/tests/Makefile.in b/dlls/vcomp110/tests/Makefile.in index cc48f6e9fc8..98fba09e5b4 100644 --- a/dlls/vcomp110/tests/Makefile.in +++ b/dlls/vcomp110/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = vcomp110.dll
C_SRCS = \ diff --git a/dlls/vcomp110/tests/vcomp110.c b/dlls/vcomp110/tests/vcomp110.c index e0be668dffd..214e52428c0 100644 --- a/dlls/vcomp110/tests/vcomp110.c +++ b/dlls/vcomp110/tests/vcomp110.c @@ -271,14 +271,14 @@ static void test_C2VectParallel(void) pC2VectParallel(test->start, test->end, test->step, test->end_included, test->thread_count, FALSE, test_C2VectParallel_payload, 6, (void *)0xdeadbeef, test, i, FALSE); ok(test_C2VectParallel_call_count == test->expected_call_count, - "Got unexpected call count %u, expected %u, test %u.\n", + "Got unexpected call count %lu, expected %u, test %u.\n", test_C2VectParallel_call_count, test->expected_call_count, i);
test_C2VectParallel_call_count = 0; pC2VectParallel(test->start, test->end, test->step, test->end_included, test->thread_count, ~0u, test_C2VectParallel_payload, 6, (void *)0xdeadbeef, test, i, TRUE); ok(test_C2VectParallel_call_count == test->expected_dynamic_call_count, - "Got unexpected call count %u, expected %u, test %u.\n", + "Got unexpected call count %lu, expected %u, test %u.\n", test_C2VectParallel_call_count, test->expected_dynamic_call_count, i); } }
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/vcomp/tests/Makefile.in | 1 dlls/vcomp/tests/vcomp.c | 156 +++++++++++++++++++++--------------------- 2 files changed, 78 insertions(+), 79 deletions(-)
diff --git a/dlls/vcomp/tests/Makefile.in b/dlls/vcomp/tests/Makefile.in index f8a66a74d92..d1b7b1291bd 100644 --- a/dlls/vcomp/tests/Makefile.in +++ b/dlls/vcomp/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = vcomp.dll
C_SRCS = \ diff --git a/dlls/vcomp/tests/vcomp.c b/dlls/vcomp/tests/vcomp.c index a229e0198f7..639291a1772 100644 --- a/dlls/vcomp/tests/vcomp.c +++ b/dlls/vcomp/tests/vcomp.c @@ -396,7 +396,7 @@ static void CDECL num_threads_cb(BOOL nested, int parallel, int nested_threads, p_vcomp_barrier();
num_threads = pomp_get_num_threads(); - ok(num_threads == *count, "expected num_threads == %d, got %d\n", *count, num_threads); + ok(num_threads == *count, "expected num_threads == %ld, got %d\n", *count, num_threads); thread_num = pomp_get_thread_num(); ok(thread_num >= 0 && thread_num < num_threads, "expected thread_num in range [0, %d], got %d\n", num_threads - 1, thread_num); @@ -409,16 +409,16 @@ static void CDECL num_threads_cb(BOOL nested, int parallel, int nested_threads, thread_count = 0; p_vcomp_fork(TRUE, 2, num_threads_cb2, TRUE, &thread_count); if (nested) - ok(thread_count == nested_threads, "expected %d threads, got %d\n", nested_threads, thread_count); + ok(thread_count == nested_threads, "expected %d threads, got %ld\n", nested_threads, thread_count); else - ok(thread_count == 1, "expected 1 thread, got %d\n", thread_count); + ok(thread_count == 1, "expected 1 thread, got %ld\n", thread_count);
is_parallel = pomp_in_parallel(); ok(is_parallel == parallel, "expected %d, got %d\n", parallel, is_parallel);
thread_count = 0; p_vcomp_fork(FALSE, 2, num_threads_cb2, parallel, &thread_count); - ok(thread_count == 1, "expected 1 thread, got %d\n", thread_count); + ok(thread_count == 1, "expected 1 thread, got %ld\n", thread_count);
is_parallel = pomp_in_parallel(); ok(is_parallel == parallel, "expected %d, got %d\n", parallel, is_parallel); @@ -427,9 +427,9 @@ static void CDECL num_threads_cb(BOOL nested, int parallel, int nested_threads, thread_count = 0; p_vcomp_fork(TRUE, 2, num_threads_cb2, TRUE, &thread_count); if (nested) - ok(thread_count == 4, "expected 4 threads, got %d\n", thread_count); + ok(thread_count == 4, "expected 4 threads, got %ld\n", thread_count); else - ok(thread_count == 1, "expected 1 thread, got %d\n", thread_count); + ok(thread_count == 1, "expected 1 thread, got %ld\n", thread_count);
is_parallel = pomp_in_parallel(); ok(is_parallel == parallel, "expected %d, got %d\n", parallel, is_parallel); @@ -459,7 +459,7 @@ static void test_omp_get_num_threads(BOOL nested) ok(num_threads == 1, "expected num_threads == 1, got %d\n", num_threads); thread_count = 0; p_vcomp_fork(TRUE, 4, num_threads_cb, nested, TRUE, max_threads, &thread_count); - ok(thread_count == max_threads, "expected %d threads, got %d\n", max_threads, thread_count); + ok(thread_count == max_threads, "expected %d threads, got %ld\n", max_threads, thread_count);
is_parallel = pomp_in_parallel(); ok(is_parallel == FALSE, "expected FALSE, got %d\n", is_parallel); @@ -468,7 +468,7 @@ static void test_omp_get_num_threads(BOOL nested) ok(num_threads == 1, "expected num_threads == 1, got %d\n", num_threads); thread_count = 0; p_vcomp_fork(FALSE, 4, num_threads_cb, TRUE, FALSE, max_threads, &thread_count); - ok(thread_count == 1, "expected 1 thread, got %d\n", thread_count); + ok(thread_count == 1, "expected 1 thread, got %ld\n", thread_count);
is_parallel = pomp_in_parallel(); ok(is_parallel == FALSE, "expected FALSE, got %d\n", is_parallel); @@ -478,7 +478,7 @@ static void test_omp_get_num_threads(BOOL nested) ok(num_threads == 1, "expected num_threads == 1, got %d\n", num_threads); thread_count = 0; p_vcomp_fork(TRUE, 4, num_threads_cb, nested, TRUE, 1, &thread_count); - ok(thread_count == 1, "expected 1 thread, got %d\n", thread_count); + ok(thread_count == 1, "expected 1 thread, got %ld\n", thread_count);
is_parallel = pomp_in_parallel(); ok(is_parallel == FALSE, "expected FALSE, got %d\n", is_parallel); @@ -488,38 +488,38 @@ static void test_omp_get_num_threads(BOOL nested) ok(num_threads == 1, "expected num_threads == 1, got %d\n", num_threads); thread_count = 0; p_vcomp_fork(TRUE, 4, num_threads_cb, nested, TRUE, 2, &thread_count); - ok(thread_count == 2, "expected 2 threads, got %d\n", thread_count); + ok(thread_count == 2, "expected 2 threads, got %ld\n", thread_count);
pomp_set_num_threads(4); num_threads = pomp_get_num_threads(); ok(num_threads == 1, "expected num_threads == 1, got %d\n", num_threads); thread_count = 0; p_vcomp_fork(TRUE, 4, num_threads_cb, nested, TRUE, 4, &thread_count); - ok(thread_count == 4, "expected 4 threads, got %d\n", thread_count); + ok(thread_count == 4, "expected 4 threads, got %ld\n", thread_count);
p_vcomp_set_num_threads(8); num_threads = pomp_get_num_threads(); ok(num_threads == 1, "expected num_threads == 1, got %d\n", num_threads); thread_count = 0; p_vcomp_fork(TRUE, 4, num_threads_cb, nested, TRUE, 4, &thread_count); - ok(thread_count == 8, "expected 8 threads, got %d\n", thread_count); + ok(thread_count == 8, "expected 8 threads, got %ld\n", thread_count); thread_count = 0; p_vcomp_fork(TRUE, 4, num_threads_cb, nested, TRUE, 4, &thread_count); - ok(thread_count == 4, "expected 4 threads, got %d\n", thread_count); + ok(thread_count == 4, "expected 4 threads, got %ld\n", thread_count);
p_vcomp_set_num_threads(0); num_threads = pomp_get_num_threads(); ok(num_threads == 1, "expected num_threads == 1, got %d\n", num_threads); thread_count = 0; p_vcomp_fork(TRUE, 4, num_threads_cb, nested, TRUE, 4, &thread_count); - ok(thread_count == 4, "expected 4 threads, got %d\n", thread_count); + ok(thread_count == 4, "expected 4 threads, got %ld\n", thread_count);
pomp_set_num_threads(0); num_threads = pomp_get_num_threads(); ok(num_threads == 1, "expected num_threads == 1, got %d\n", num_threads); thread_count = 0; p_vcomp_fork(TRUE, 4, num_threads_cb, nested, TRUE, 4, &thread_count); - ok(thread_count == 4, "expected 4 threads, got %d\n", thread_count); + ok(thread_count == 4, "expected 4 threads, got %ld\n", thread_count);
pomp_set_num_threads(max_threads); pomp_set_nested(FALSE); @@ -570,19 +570,19 @@ static void test_vcomp_fork(void)
a = 0; b = 1; c = 2; d = 3; e = 4; p_vcomp_fork(FALSE, 5, fork_ptr_cb, &a, &b, &c, &d, &e); - ok(a == 1, "expected a == 1, got %d\n", a); - ok(b == 2, "expected b == 2, got %d\n", b); - ok(c == 3, "expected c == 3, got %d\n", c); - ok(d == 4, "expected d == 4, got %d\n", d); - ok(e == 5, "expected e == 5, got %d\n", e); + ok(a == 1, "expected a == 1, got %ld\n", a); + ok(b == 2, "expected b == 2, got %ld\n", b); + ok(c == 3, "expected c == 3, got %ld\n", c); + ok(d == 4, "expected d == 4, got %ld\n", d); + ok(e == 5, "expected e == 5, got %ld\n", e);
a = 0; b = 1; c = 2; d = 3; e = 4; p_vcomp_fork(TRUE, 5, fork_ptr_cb, &a, &b, &c, &d, &e); - ok(a == 4, "expected a == 4, got %d\n", a); - ok(b == 5, "expected b == 5, got %d\n", b); - ok(c == 6, "expected c == 6, got %d\n", c); - ok(d == 7, "expected d == 7, got %d\n", d); - ok(e == 8, "expected e == 8, got %d\n", e); + ok(a == 4, "expected a == 4, got %ld\n", a); + ok(b == 5, "expected b == 5, got %ld\n", b); + ok(c == 6, "expected c == 6, got %ld\n", c); + ok(d == 7, "expected d == 7, got %ld\n", d); + ok(e == 8, "expected e == 8, got %ld\n", e);
p_vcomp_fork(TRUE, 11, fork_uintptr_cb, (UINT_PTR)1, (UINT_PTR)(MAXUINT_PTR - 2), (UINT_PTR)3, (UINT_PTR)(MAXUINT_PTR - 4), (UINT_PTR)5, @@ -643,9 +643,9 @@ if (0)
a = b = c = 0; section_cb(&a, &b, &c); - ok(a == 20, "expected a == 20, got %d\n", a); - ok(b == 30, "expected b == 30, got %d\n", b); - ok(c == 40, "expected c == 40, got %d\n", c); + ok(a == 20, "expected a == 20, got %ld\n", a); + ok(b == 30, "expected b == 30, got %ld\n", b); + ok(c == 40, "expected c == 40, got %ld\n", c);
for (i = 1; i <= 4; i++) { @@ -653,15 +653,15 @@ if (0)
a = b = c = 0; p_vcomp_fork(TRUE, 3, section_cb, &a, &b, &c); - ok(a == 20, "expected a == 20, got %d\n", a); - ok(b == 30, "expected b == 30, got %d\n", b); - ok(c == 40, "expected c == 40, got %d\n", c); + ok(a == 20, "expected a == 20, got %ld\n", a); + ok(b == 30, "expected b == 30, got %ld\n", b); + ok(c == 40, "expected c == 40, got %ld\n", c);
a = b = c = 0; p_vcomp_fork(FALSE, 3, section_cb, &a, &b, &c); - ok(a == 20, "expected a == 20, got %d\n", a); - ok(b == 30, "expected b == 30, got %d\n", b); - ok(c == 40, "expected c == 40, got %d\n", c); + ok(a == 20, "expected a == 20, got %ld\n", a); + ok(b == 30, "expected b == 30, got %ld\n", b); + ok(c == 40, "expected c == 40, got %ld\n", c); }
pomp_set_num_threads(max_threads); @@ -1644,10 +1644,10 @@ static void test_vcomp_for_dynamic_init(void) /* test chunked scheduling */ a = b = c = d = 0; for_dynamic_chunked_cb(&a, &b, &c, &d); - ok(a == 71071, "expected a == 71071, got %d\n", a); - ok(b == 71929, "expected b == 71929, got %d\n", b); - ok(c == 14210, "expected c == 14210, got %d\n", c); - ok(d == 14790, "expected d == 14790, got %d\n", d); + ok(a == 71071, "expected a == 71071, got %ld\n", a); + ok(b == 71929, "expected b == 71929, got %ld\n", b); + ok(c == 14210, "expected c == 14210, got %ld\n", c); + ok(d == 14790, "expected d == 14790, got %ld\n", d);
for (i = 1; i <= 4; i++) { @@ -1655,26 +1655,26 @@ static void test_vcomp_for_dynamic_init(void)
a = b = c = d = 0; p_vcomp_fork(TRUE, 4, for_dynamic_chunked_cb, &a, &b, &c, &d); - ok(a == 71071, "expected a == 71071, got %d\n", a); - ok(b == 71929, "expected b == 71929, got %d\n", b); - ok(c == 14210, "expected c == 14210, got %d\n", c); - ok(d == 14790, "expected d == 14790, got %d\n", d); + ok(a == 71071, "expected a == 71071, got %ld\n", a); + ok(b == 71929, "expected b == 71929, got %ld\n", b); + ok(c == 14210, "expected c == 14210, got %ld\n", c); + ok(d == 14790, "expected d == 14790, got %ld\n", d);
a = b = c = d = 0; p_vcomp_fork(FALSE, 4, for_dynamic_chunked_cb, &a, &b, &c, &d); - ok(a == 71071, "expected a == 71071, got %d\n", a); - ok(b == 71929, "expected b == 71929, got %d\n", b); - ok(c == 14210, "expected c == 14210, got %d\n", c); - ok(d == 14790, "expected d == 14790, got %d\n", d); + ok(a == 71071, "expected a == 71071, got %ld\n", a); + ok(b == 71929, "expected b == 71929, got %ld\n", b); + ok(c == 14210, "expected c == 14210, got %ld\n", c); + ok(d == 14790, "expected d == 14790, got %ld\n", d); }
/* test guided scheduling */ a = b = c = d = 0; for_dynamic_guided_cb(VCOMP_DYNAMIC_FLAGS_GUIDED, &a, &b, &c, &d); - ok(a == guided_a[0], "expected a == %d, got %d\n", guided_a[0], a); - ok(b == guided_b[0], "expected b == %d, got %d\n", guided_b[0], b); - ok(c == guided_c[0], "expected c == %d, got %d\n", guided_c[0], c); - ok(d == guided_d[0], "expected d == %d, got %d\n", guided_d[0], d); + ok(a == guided_a[0], "expected a == %d, got %ld\n", guided_a[0], a); + ok(b == guided_b[0], "expected b == %d, got %ld\n", guided_b[0], b); + ok(c == guided_c[0], "expected c == %d, got %ld\n", guided_c[0], c); + ok(d == guided_d[0], "expected d == %d, got %ld\n", guided_d[0], d);
for (i = 1; i <= 4; i++) { @@ -1682,26 +1682,26 @@ static void test_vcomp_for_dynamic_init(void)
a = b = c = d = 0; p_vcomp_fork(TRUE, 5, for_dynamic_guided_cb, VCOMP_DYNAMIC_FLAGS_GUIDED, &a, &b, &c, &d); - ok(a == guided_a[i - 1], "expected a == %d, got %d\n", guided_a[i - 1], a); - ok(b == guided_b[i - 1], "expected b == %d, got %d\n", guided_b[i - 1], b); - ok(c == guided_c[i - 1], "expected c == %d, got %d\n", guided_c[i - 1], c); - ok(d == guided_d[i - 1], "expected d == %d, got %d\n", guided_d[i - 1], d); + ok(a == guided_a[i - 1], "expected a == %d, got %ld\n", guided_a[i - 1], a); + ok(b == guided_b[i - 1], "expected b == %d, got %ld\n", guided_b[i - 1], b); + ok(c == guided_c[i - 1], "expected c == %d, got %ld\n", guided_c[i - 1], c); + ok(d == guided_d[i - 1], "expected d == %d, got %ld\n", guided_d[i - 1], d);
a = b = c = d = 0; p_vcomp_fork(FALSE, 5, for_dynamic_guided_cb, VCOMP_DYNAMIC_FLAGS_GUIDED, &a, &b, &c, &d); - ok(a == guided_a[0], "expected a == %d, got %d\n", guided_a[0], a); - ok(b == guided_b[0], "expected b == %d, got %d\n", guided_b[0], b); - ok(c == guided_c[0], "expected c == %d, got %d\n", guided_c[0], c); - ok(d == guided_d[0], "expected d == %d, got %d\n", guided_d[0], d); + ok(a == guided_a[0], "expected a == %d, got %ld\n", guided_a[0], a); + ok(b == guided_b[0], "expected b == %d, got %ld\n", guided_b[0], b); + ok(c == guided_c[0], "expected c == %d, got %ld\n", guided_c[0], c); + ok(d == guided_d[0], "expected d == %d, got %ld\n", guided_d[0], d); }
/* test with empty flags */ a = b = c = d = 0; for_dynamic_guided_cb(0, &a, &b, &c, &d); - ok(a == guided_a[0], "expected a == %d, got %d\n", guided_a[0], a); - ok(b == guided_b[0], "expected b == %d, got %d\n", guided_b[0], b); - ok(c == guided_c[0], "expected c == %d, got %d\n", guided_c[0], c); - ok(d == guided_d[0], "expected d == %d, got %d\n", guided_d[0], d); + ok(a == guided_a[0], "expected a == %d, got %ld\n", guided_a[0], a); + ok(b == guided_b[0], "expected b == %d, got %ld\n", guided_b[0], b); + ok(c == guided_c[0], "expected c == %d, got %ld\n", guided_c[0], c); + ok(d == guided_d[0], "expected d == %d, got %ld\n", guided_d[0], d);
for (i = 1; i <= 4; i++) { @@ -1709,17 +1709,17 @@ static void test_vcomp_for_dynamic_init(void)
a = b = c = d = 0; p_vcomp_fork(TRUE, 5, for_dynamic_guided_cb, 0, &a, &b, &c, &d); - ok(a == guided_a[i - 1], "expected a == %d, got %d\n", guided_a[i - 1], a); - ok(b == guided_b[i - 1], "expected b == %d, got %d\n", guided_b[i - 1], b); - ok(c == guided_c[i - 1], "expected c == %d, got %d\n", guided_c[i - 1], c); - ok(d == guided_d[i - 1], "expected d == %d, got %d\n", guided_d[i - 1], d); + ok(a == guided_a[i - 1], "expected a == %d, got %ld\n", guided_a[i - 1], a); + ok(b == guided_b[i - 1], "expected b == %d, got %ld\n", guided_b[i - 1], b); + ok(c == guided_c[i - 1], "expected c == %d, got %ld\n", guided_c[i - 1], c); + ok(d == guided_d[i - 1], "expected d == %d, got %ld\n", guided_d[i - 1], d);
a = b = c = d = 0; p_vcomp_fork(FALSE, 5, for_dynamic_guided_cb, 0, &a, &b, &c, &d); - ok(a == guided_a[0], "expected a == %d, got %d\n", guided_a[0], a); - ok(b == guided_b[0], "expected b == %d, got %d\n", guided_b[0], b); - ok(c == guided_c[0], "expected c == %d, got %d\n", guided_c[0], c); - ok(d == guided_d[0], "expected d == %d, got %d\n", guided_d[0], d); + ok(a == guided_a[0], "expected a == %d, got %ld\n", guided_a[0], a); + ok(b == guided_b[0], "expected b == %d, got %ld\n", guided_b[0], b); + ok(c == guided_c[0], "expected c == %d, got %ld\n", guided_c[0], c); + ok(d == guided_d[0], "expected d == %d, got %ld\n", guided_d[0], d); }
pomp_set_num_threads(max_threads); @@ -1736,7 +1736,7 @@ static void CDECL master_cb(HANDLE semaphore) if (num_threads >= 2) { DWORD result = WaitForSingleObject(semaphore, 1000); - ok(result == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", result); + ok(result == WAIT_OBJECT_0, "WaitForSingleObject returned %lu\n", result); } p_vcomp_master_end(); } @@ -1752,7 +1752,7 @@ static void test_vcomp_master_begin(void) int i;
semaphore = CreateSemaphoreA(NULL, 0, 1, NULL); - ok(semaphore != NULL, "CreateSemaphoreA failed %u\n", GetLastError()); + ok(semaphore != NULL, "CreateSemaphoreA failed %lu\n", GetLastError());
master_cb(semaphore);
@@ -1776,7 +1776,7 @@ static void CDECL single_cb(int flags, HANDLE semaphore) if (num_threads >= 2) { DWORD result = WaitForSingleObject(semaphore, 1000); - ok(result == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", result); + ok(result == WAIT_OBJECT_0, "WaitForSingleObject returned %lu\n", result); } } p_vcomp_single_end(); @@ -1796,7 +1796,7 @@ static void test_vcomp_single_begin(void) int i;
semaphore = CreateSemaphoreA(NULL, 0, 1, NULL); - ok(semaphore != NULL, "CreateSemaphoreA failed %u\n", GetLastError()); + ok(semaphore != NULL, "CreateSemaphoreA failed %lu\n", GetLastError());
single_cb(0, semaphore); single_cb(1, semaphore); @@ -1842,7 +1842,7 @@ static void test_vcomp_enter_critsect(void)
a = 0; critsect_cb(&a); - ok(a == 2, "expected a == 2, got %d\n", a); + ok(a == 2, "expected a == 2, got %ld\n", a);
for (i = 1; i <= 4; i++) { @@ -1850,11 +1850,11 @@ static void test_vcomp_enter_critsect(void)
a = 0; p_vcomp_fork(TRUE, 1, critsect_cb, &a); - ok(a == 2 * i, "expected a == %d, got %d\n", 2 * i, a); + ok(a == 2 * i, "expected a == %d, got %ld\n", 2 * i, a);
a = 0; p_vcomp_fork(FALSE, 1, critsect_cb, &a); - ok(a == 2, "expected a == 2, got %d\n", a); + ok(a == 2, "expected a == 2, got %ld\n", a); }
pomp_set_num_threads(max_threads); @@ -2628,7 +2628,7 @@ static void test_omp_get_num_procs(void) ok(num_procs > 0, "expected non-zero num_procs\n"); GetSystemInfo(&sysinfo); ok(sysinfo.dwNumberOfProcessors > 0, "expected non-zero dwNumberOfProcessors\n"); - ok(num_procs == sysinfo.dwNumberOfProcessors, "got dwNumberOfProcessors %d num_procs %d\n", sysinfo.dwNumberOfProcessors, num_procs); + ok(num_procs == sysinfo.dwNumberOfProcessors, "got dwNumberOfProcessors %ld num_procs %d\n", sysinfo.dwNumberOfProcessors, num_procs); }
START_TEST(vcomp)
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/version/tests/Makefile.in | 1 dlls/version/tests/info.c | 138 ++++++++++++++++++++-------------------- dlls/version/tests/install.c | 76 +++++++++++----------- 3 files changed, 107 insertions(+), 108 deletions(-)
diff --git a/dlls/version/tests/Makefile.in b/dlls/version/tests/Makefile.in index 8cc84e2d89c..a1e24f9be22 100644 --- a/dlls/version/tests/Makefile.in +++ b/dlls/version/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = version.dll IMPORTS = version shell32
diff --git a/dlls/version/tests/info.c b/dlls/version/tests/info.c index f35af902f9b..61ff05b2559 100644 --- a/dlls/version/tests/info.c +++ b/dlls/version/tests/info.c @@ -39,7 +39,7 @@ (ERROR_SUCCESS == GetLastError()), \ "Last error wrong! ERROR_RESOURCE_DATA_NOT_FOUND/ERROR_BAD_PATHNAME (98)/" \ "ERROR_PATH_NOT_FOUND (NT4)/ERROR_FILE_NOT_FOUND (2k3) " \ - "ERROR_SUCCESS (2k) expected, got %u\n", GetLastError()); + "ERROR_SUCCESS (2k) expected, got %lu\n", GetLastError()); #define EXPECT_INVALID__NOT_FOUND \ ok( (ERROR_PATH_NOT_FOUND == GetLastError()) || \ (ERROR_RESOURCE_DATA_NOT_FOUND == GetLastError()) || \ @@ -48,7 +48,7 @@ (ERROR_SUCCESS == GetLastError()), \ "Last error wrong! ERROR_RESOURCE_DATA_NOT_FOUND/ERROR_INVALID_PARAMETER (98)/" \ "ERROR_PATH_NOT_FOUND (NT4)/ERROR_FILE_NOT_FOUND (2k3) " \ - "ERROR_SUCCESS (2k) expected, got %u\n", GetLastError()); + "ERROR_SUCCESS (2k) expected, got %lu\n", GetLastError());
static void create_file(const CHAR *name) { @@ -69,7 +69,7 @@ static void test_info_size(void) SetLastError(MY_LAST_ERROR); retval = GetFileVersionInfoSizeA( NULL, NULL); ok( !retval, - "GetFileVersionInfoSizeA result wrong! 0L expected, got 0x%08x\n", + "GetFileVersionInfoSizeA result wrong! 0L expected, got 0x%08lx\n", retval); EXPECT_INVALID__NOT_FOUND;
@@ -77,16 +77,16 @@ static void test_info_size(void) SetLastError(MY_LAST_ERROR); retval = GetFileVersionInfoSizeA( NULL, &hdl); ok( !retval, - "GetFileVersionInfoSizeA result wrong! 0L expected, got 0x%08x\n", + "GetFileVersionInfoSizeA result wrong! 0L expected, got 0x%08lx\n", retval); EXPECT_INVALID__NOT_FOUND; ok( hdl == 0L, - "Handle wrong! 0L expected, got 0x%08x\n", hdl); + "Handle wrong! 0L expected, got 0x%08lx\n", hdl);
SetLastError(MY_LAST_ERROR); retval = GetFileVersionInfoSizeA( "", NULL); ok( !retval, - "GetFileVersionInfoSizeA result wrong! 0L expected, got 0x%08x\n", + "GetFileVersionInfoSizeA result wrong! 0L expected, got 0x%08lx\n", retval); EXPECT_BAD_PATH__NOT_FOUND;
@@ -94,44 +94,44 @@ static void test_info_size(void) SetLastError(MY_LAST_ERROR); retval = GetFileVersionInfoSizeA( "", &hdl); ok( !retval, - "GetFileVersionInfoSizeA result wrong! 0L expected, got 0x%08x\n", + "GetFileVersionInfoSizeA result wrong! 0L expected, got 0x%08lx\n", retval); EXPECT_BAD_PATH__NOT_FOUND; ok( hdl == 0L, - "Handle wrong! 0L expected, got 0x%08x\n", hdl); + "Handle wrong! 0L expected, got 0x%08lx\n", hdl);
SetLastError(MY_LAST_ERROR); retval = GetFileVersionInfoSizeA( "kernel32.dll", NULL); ok( retval, - "GetFileVersionInfoSizeA result wrong! <> 0L expected, got 0x%08x\n", + "GetFileVersionInfoSizeA result wrong! <> 0L expected, got 0x%08lx\n", retval); ok((NO_ERROR == GetLastError()) || (MY_LAST_ERROR == GetLastError()), - "Last error wrong! NO_ERROR/0x%08x (NT4) expected, got %u\n", + "Last error wrong! NO_ERROR/0x%08lx (NT4) expected, got %lu\n", MY_LAST_ERROR, GetLastError());
hdl = 0x55555555; SetLastError(MY_LAST_ERROR); retval = GetFileVersionInfoSizeA( "kernel32.dll", &hdl); ok( retval, - "GetFileVersionInfoSizeA result wrong! <> 0L expected, got 0x%08x\n", + "GetFileVersionInfoSizeA result wrong! <> 0L expected, got 0x%08lx\n", retval); ok((NO_ERROR == GetLastError()) || (MY_LAST_ERROR == GetLastError()), - "Last error wrong! NO_ERROR/0x%08x (NT4) expected, got %u\n", + "Last error wrong! NO_ERROR/0x%08lx (NT4) expected, got %lu\n", MY_LAST_ERROR, GetLastError()); ok( hdl == 0L, - "Handle wrong! 0L expected, got 0x%08x\n", hdl); + "Handle wrong! 0L expected, got 0x%08lx\n", hdl);
SetLastError(MY_LAST_ERROR); retval = GetFileVersionInfoSizeA( "notexist.dll", NULL); ok( !retval, - "GetFileVersionInfoSizeA result wrong! 0L expected, got 0x%08x\n", + "GetFileVersionInfoSizeA result wrong! 0L expected, got 0x%08lx\n", retval); ok( (ERROR_FILE_NOT_FOUND == GetLastError()) || (ERROR_RESOURCE_DATA_NOT_FOUND == GetLastError()) || (MY_LAST_ERROR == GetLastError()) || (ERROR_SUCCESS == GetLastError()), /* win2k */ "Last error wrong! ERROR_FILE_NOT_FOUND/ERROR_RESOURCE_DATA_NOT_FOUND " - "(XP)/0x%08x (NT4) expected, got %u\n", MY_LAST_ERROR, GetLastError()); + "(XP)/0x%08lx (NT4) expected, got %lu\n", MY_LAST_ERROR, GetLastError());
/* test a currently loaded executable */ if(GetModuleFileNameA(NULL, mypath, MAX_PATH)) { @@ -139,13 +139,13 @@ static void test_info_size(void) SetLastError(MY_LAST_ERROR); retval = GetFileVersionInfoSizeA( mypath, &hdl); ok( retval, - "GetFileVersionInfoSizeA result wrong! <> 0L expected, got 0x%08x\n", + "GetFileVersionInfoSizeA result wrong! <> 0L expected, got 0x%08lx\n", retval); ok((NO_ERROR == GetLastError()) || (MY_LAST_ERROR == GetLastError()), - "Last error wrong! NO_ERROR/0x%08x (NT4) expected, got %u\n", + "Last error wrong! NO_ERROR/0x%08lx (NT4) expected, got %lu\n", MY_LAST_ERROR, GetLastError()); ok( hdl == 0L, - "Handle wrong! 0L expected, got 0x%08x\n", hdl); + "Handle wrong! 0L expected, got 0x%08lx\n", hdl); } else trace("skipping GetModuleFileNameA(NULL,..) failed\n"); @@ -161,13 +161,13 @@ static void test_info_size(void) SetLastError(MY_LAST_ERROR); retval = GetFileVersionInfoSizeA( mypath, &hdl); ok( retval, - "GetFileVersionInfoSizeA result wrong! <> 0L expected, got 0x%08x\n", + "GetFileVersionInfoSizeA result wrong! <> 0L expected, got 0x%08lx\n", retval); ok((NO_ERROR == GetLastError()) || (MY_LAST_ERROR == GetLastError()), - "Last error wrong! NO_ERROR/0x%08x (NT4) expected, got %u\n", + "Last error wrong! NO_ERROR/0x%08lx (NT4) expected, got %lu\n", MY_LAST_ERROR, GetLastError()); ok( hdl == 0L, - "Handle wrong! 0L expected, got 0x%08x\n", hdl); + "Handle wrong! 0L expected, got 0x%08lx\n", hdl); } } else @@ -179,11 +179,11 @@ static void test_info_size(void) SetLastError(0xdeadbeef); hdl = 0xcafe; retval = GetFileVersionInfoSizeA("test.txt", &hdl); - ok(retval == 0, "Expected 0, got %d\n", retval); - ok(hdl == 0, "Expected 0, got %d\n", hdl); + ok(retval == 0, "Expected 0, got %ld\n", retval); + ok(hdl == 0, "Expected 0, got %ld\n", hdl); ok(GetLastError() == ERROR_RESOURCE_DATA_NOT_FOUND || GetLastError() == ERROR_SUCCESS, /* win2k */ - "Expected ERROR_RESOURCE_DATA_NOT_FOUND, got %d\n", GetLastError()); + "Expected ERROR_RESOURCE_DATA_NOT_FOUND, got %ld\n", GetLastError());
DeleteFileA("test.txt"); } @@ -215,13 +215,13 @@ static void test_info(void) SetLastError(MY_LAST_ERROR); retval = GetFileVersionInfoSizeA( "kernel32.dll", &hdl); ok( retval, - "GetFileVersionInfoSizeA result wrong! <> 0L expected, got 0x%08x\n", + "GetFileVersionInfoSizeA result wrong! <> 0L expected, got 0x%08lx\n", retval); ok((NO_ERROR == GetLastError()) || (MY_LAST_ERROR == GetLastError()), - "Last error wrong! NO_ERROR/0x%08x (NT4) expected, got %u\n", + "Last error wrong! NO_ERROR/0x%08lx (NT4) expected, got %lu\n", MY_LAST_ERROR, GetLastError()); ok( hdl == 0L, - "Handle wrong! 0L expected, got 0x%08x\n", hdl); + "Handle wrong! 0L expected, got 0x%08lx\n", hdl);
if ( retval == 0 || hdl != 0) return; @@ -236,28 +236,28 @@ static void test_info(void) /* this test crashes on WinNT4 */ boolret = GetFileVersionInfoA( "kernel32.dll", 0, retval, 0); - ok (!boolret, "GetFileVersionInfoA should have failed: GetLastError = %u\n", GetLastError()); + ok (!boolret, "GetFileVersionInfoA should have failed: GetLastError = %lu\n", GetLastError()); ok ((GetLastError() == ERROR_INVALID_DATA) || (GetLastError() == ERROR_BAD_PATHNAME) || (GetLastError() == NO_ERROR), "Last error wrong! ERROR_INVALID_DATA/ERROR_BAD_PATHNAME (ME)/" - "NO_ERROR (95) expected, got %u\n", + "NO_ERROR (95) expected, got %lu\n", GetLastError()); }
boolret = GetFileVersionInfoA( "kernel32.dll", 0, retval, pVersionInfo ); - ok (boolret, "GetFileVersionInfoA failed: GetLastError = %u\n", GetLastError()); + ok (boolret, "GetFileVersionInfoA failed: GetLastError = %lu\n", GetLastError()); if (!boolret) goto cleanup;
boolret = VerQueryValueA( pVersionInfo, NULL, (LPVOID *)&pFixedVersionInfo, &uiLength ); ok (boolret || GetLastError() == NO_ERROR /* Win98 */, - "VerQueryValueA failed: GetLastError = %u\n", GetLastError()); + "VerQueryValueA failed: GetLastError = %lu\n", GetLastError());
boolret = VerQueryValueA( pVersionInfo, "", (LPVOID *)&pFixedVersionInfo, &uiLength ); - ok (boolret, "VerQueryValueA failed: GetLastError = %u\n", GetLastError()); + ok (boolret, "VerQueryValueA failed: GetLastError = %lu\n", GetLastError());
boolret = VerQueryValueA( pVersionInfo, backslash, (LPVOID *)&pFixedVersionInfo, &uiLength ); - ok (boolret, "VerQueryValueA failed: GetLastError = %u\n", GetLastError()); + ok (boolret, "VerQueryValueA failed: GetLastError = %lu\n", GetLastError()); if (!boolret) goto cleanup;
@@ -273,7 +273,7 @@ static void test_info(void) /* this test crashes on WinNT4 */ boolret = VerQueryValueA( pVersionInfo, backslash, (LPVOID *)&pFixedVersionInfo, 0); - ok (boolret, "VerQueryValue failed: GetLastError = %u\n", GetLastError()); + ok (boolret, "VerQueryValue failed: GetLastError = %lu\n", GetLastError()); }
cleanup: @@ -336,18 +336,18 @@ static void test_32bit_win(void) retvalW = GetFileVersionInfoSizeW( mypathW, &hdlW); pVersionInfoW = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, retvalW ); retW = GetFileVersionInfoW( mypathW, 0, retvalW, pVersionInfoW ); - ok(retW, "GetFileVersionInfo failed: GetLastError = %u\n", GetLastError()); + ok(retW, "GetFileVersionInfo failed: GetLastError = %lu\n", GetLastError()); }
GetModuleFileNameA(NULL, mypathA, MAX_PATH); retvalA = GetFileVersionInfoSizeA( mypathA, &hdlA); pVersionInfoA = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, retvalA ); retA = GetFileVersionInfoA( mypathA, 0, retvalA, pVersionInfoA ); - ok(retA, "GetFileVersionInfo failed: GetLastError = %u\n", GetLastError()); + ok(retA, "GetFileVersionInfo failed: GetLastError = %lu\n", GetLastError());
if (is_unicode_enabled) { - ok( retvalA == retvalW, "The size of the struct should be the same for both A/W calls, it is (%d) vs. (%d)\n", + ok( retvalA == retvalW, "The size of the struct should be the same for both A/W calls, it is (%ld) vs. (%ld)\n", retvalA, retvalW); ok( !memcmp(pVersionInfoA, pVersionInfoW, retvalA), "Both structs should be the same, they aren't\n"); } @@ -392,7 +392,7 @@ static void test_32bit_win(void) /* Get the VS_FIXEDFILEINFO information, this must be the same for both A- and W-Calls */
retA = VerQueryValueA( pVersionInfoA, "\", (void **)&pBufA, &uiLengthA ); - ok (retA, "VerQueryValueA failed: GetLastError = %u\n", GetLastError()); + ok (retA, "VerQueryValueA failed: GetLastError = %lu\n", GetLastError()); ok ( uiLengthA == sizeof(VS_FIXEDFILEINFO), "Size (%d) doesn't match the size of the VS_FIXEDFILEINFO struct\n", uiLengthA);
if (is_unicode_enabled) @@ -400,14 +400,14 @@ static void test_32bit_win(void) if(0) { /* This causes Vista and w2k8 to crash */ retW = VerQueryValueW( pVersionInfoW, NULL, (LPVOID *)&pBufW, &uiLengthW ); - ok (retW, "VerQueryValueW failed: GetLastError = %u\n", GetLastError()); + ok (retW, "VerQueryValueW failed: GetLastError = %lu\n", GetLastError()); }
retW = VerQueryValueW( pVersionInfoW, L"", (void **)&pBufW, &uiLengthW ); - ok (retW, "VerQueryValueW failed: GetLastError = %u\n", GetLastError()); + ok (retW, "VerQueryValueW failed: GetLastError = %lu\n", GetLastError());
retW = VerQueryValueW( pVersionInfoW, L"\", (void **)&pBufW, &uiLengthW ); - ok (retW, "VerQueryValueW failed: GetLastError = %u\n", GetLastError()); + ok (retW, "VerQueryValueW failed: GetLastError = %lu\n", GetLastError()); ok ( uiLengthW == sizeof(VS_FIXEDFILEINFO), "Size (%d) doesn't match the size of the VS_FIXEDFILEINFO struct\n", uiLengthW );
ok( uiLengthA == uiLengthW, "The size of VS_FIXEDFILEINFO should be the same for both A/W calls, it is (%d) vs. (%d)\n", @@ -418,13 +418,13 @@ static void test_32bit_win(void) /* Get some VarFileInfo information, this must be the same for both A- and W-Calls */
retA = VerQueryValueA( pVersionInfoA, varfileinfoA, (LPVOID *)&pBufA, &uiLengthA ); - ok (retA, "VerQueryValueA failed: GetLastError = %u\n", GetLastError()); + ok (retA, "VerQueryValueA failed: GetLastError = %lu\n", GetLastError()); ok( !memcmp(pBufA, WineVarFileInfoA, uiLengthA), "The VarFileInfo should have matched 0904e404 (non case sensitive)\n");
if (is_unicode_enabled) { retW = VerQueryValueW( pVersionInfoW, varfileinfoW, (LPVOID *)&pBufW, &uiLengthW ); - ok (retW, "VerQueryValueW failed: GetLastError = %u\n", GetLastError()); + ok (retW, "VerQueryValueW failed: GetLastError = %lu\n", GetLastError()); ok( uiLengthA == uiLengthW, "The size of the VarFileInfo information should be the same for both A/W calls, it is (%d) vs. (%d)\n", uiLengthA, uiLengthW); ok( !memcmp(pBufA, pBufW, uiLengthA), "Both values should be the same, they aren't\n"); @@ -433,20 +433,20 @@ static void test_32bit_win(void) /* Get some StringFileInfo information, this will be ANSI for A-Calls and Unicode for W-Calls */
retA = VerQueryValueA( pVersionInfoA, FileDescriptionA, (LPVOID *)&pBufA, &uiLengthA ); - ok (retA, "VerQueryValueA failed: GetLastError = %u\n", GetLastError()); + ok (retA, "VerQueryValueA failed: GetLastError = %lu\n", GetLastError()); ok( !lstrcmpA(WineFileDescriptionA, pBufA), "expected '%s' got '%s'\n", WineFileDescriptionA, pBufA);
/* Test a second time */ retA = VerQueryValueA( pVersionInfoA, FileDescriptionA, (LPVOID *)&pBufA, &uiLengthA ); - ok (retA, "VerQueryValueA failed: GetLastError = %u\n", GetLastError()); + ok (retA, "VerQueryValueA failed: GetLastError = %lu\n", GetLastError()); ok( !lstrcmpA(WineFileDescriptionA, pBufA), "expected '%s' got '%s'\n", WineFileDescriptionA, pBufA);
if (is_unicode_enabled) { retW = VerQueryValueW( pVersionInfoW, FileDescriptionW, (LPVOID *)&pBufW, &uiLengthW ); - ok (retW, "VerQueryValueW failed: GetLastError = %u\n", GetLastError()); + ok (retW, "VerQueryValueW failed: GetLastError = %lu\n", GetLastError()); ok( !lstrcmpW(WineFileDescriptionW, pBufW), "FileDescription should have been '%s'\n", WineFileDescriptionA); }
@@ -471,20 +471,20 @@ static void test_VerQueryValueA(void)
SetLastError(0xdeadbeef); len = GetFileVersionInfoSizeA(buf, NULL); - ok(len, "GetFileVersionInfoSizeA(%s) error %u\n", buf, GetLastError()); + ok(len, "GetFileVersionInfoSizeA(%s) error %lu\n", buf, GetLastError());
ver = HeapAlloc(GetProcessHeap(), 0, len); assert(ver);
SetLastError(0xdeadbeef); ret = GetFileVersionInfoA(buf, 0, len, ver); - ok(ret, "GetFileVersionInfoA error %u\n", GetLastError()); + ok(ret, "GetFileVersionInfoA error %lu\n", GetLastError());
p = (char *)0xdeadbeef; len = 0xdeadbeef; SetLastError(0xdeadbeef); ret = VerQueryValueA(ver, "\VarFileInfo\Translation", (LPVOID*)&p, &len); - ok(ret, "VerQueryValue error %u\n", GetLastError()); + ok(ret, "VerQueryValue error %lu\n", GetLastError()); ok(len == 4, "VerQueryValue returned %u, expected 4\n", len);
translation = *(UINT *)p; @@ -497,7 +497,7 @@ static void test_VerQueryValueA(void) ok(!ret, "VerQueryValue should fail\n"); ok(GetLastError() == ERROR_RESOURCE_TYPE_NOT_FOUND || GetLastError() == 0xdeadbeef /* NT4, W2K */, - "VerQueryValue returned %u\n", GetLastError()); + "VerQueryValue returned %lu\n", GetLastError()); ok(p == (char *)0xdeadbeef, "expected 0xdeadbeef got %p\n", p); ok(len == 0, "expected 0 got %x\n", len);
@@ -505,7 +505,7 @@ static void test_VerQueryValueA(void) len = 0xdeadbeef; SetLastError(0xdeadbeef); ret = VerQueryValueA(ver, "StringFileInfo", (LPVOID*)&p, &len); - ok(ret, "VerQueryValue error %u\n", GetLastError()); + ok(ret, "VerQueryValue error %lu\n", GetLastError()); ok(len == 0, "VerQueryValue returned %u, expected 0\n", len); ok(p != (char *)0xdeadbeef, "not expected 0xdeadbeef\n");
@@ -513,7 +513,7 @@ static void test_VerQueryValueA(void) len = 0xdeadbeef; SetLastError(0xdeadbeef); ret = VerQueryValueA(ver, "\StringFileInfo", (LPVOID*)&p, &len); - ok(ret, "VerQueryValue error %u\n", GetLastError()); + ok(ret, "VerQueryValue error %lu\n", GetLastError()); ok(len == 0, "VerQueryValue returned %u, expected 0\n", len); ok(p != (char *)0xdeadbeef, "not expected 0xdeadbeef\n");
@@ -521,7 +521,7 @@ static void test_VerQueryValueA(void) len = 0xdeadbeef; SetLastError(0xdeadbeef); ret = VerQueryValueA(ver, "\\StringFileInfo", (LPVOID*)&p, &len); - ok(ret, "VerQueryValue error %u\n", GetLastError()); + ok(ret, "VerQueryValue error %lu\n", GetLastError()); ok(len == 0, "VerQueryValue returned %u, expected 0\n", len); ok(p != (char *)0xdeadbeef, "not expected 0xdeadbeef\n");
@@ -529,7 +529,7 @@ static void test_VerQueryValueA(void) len = 0xdeadbeef; SetLastError(0xdeadbeef); ret = VerQueryValueA(ver, "\StringFileInfo\\", (LPVOID*)&p, &len); - ok(ret, "VerQueryValue error %u\n", GetLastError()); + ok(ret, "VerQueryValue error %lu\n", GetLastError()); ok(len == 0, "VerQueryValue returned %u, expected 0\n", len); ok(p != (char *)0xdeadbeef, "not expected 0xdeadbeef\n");
@@ -538,7 +538,7 @@ static void test_VerQueryValueA(void) len = 0xdeadbeef; SetLastError(0xdeadbeef); ret = VerQueryValueA(ver, buf, (LPVOID*)&p, &len); - ok(ret, "VerQueryValue error %u\n", GetLastError()); + ok(ret, "VerQueryValue error %lu\n", GetLastError()); ok(len == 0, "VerQueryValue returned %u, expected 0\n", len); ok(p != (char *)0xdeadbeef, "not expected 0xdeadbeef\n");
@@ -549,7 +549,7 @@ static void test_VerQueryValueA(void) len = 0xdeadbeef; SetLastError(0xdeadbeef); ret = VerQueryValueA(ver, buf, (LPVOID*)&p, &len); - ok(ret, "VerQueryValueA(%s) error %u\n", buf, GetLastError()); + ok(ret, "VerQueryValueA(%s) error %lu\n", buf, GetLastError()); ok(len == strlen(value_name[i]) + 1, "VerQueryValue returned %u\n", len); ok(!strcmp(value_name[i], p), "expected "%s", got "%s"\n", value_name[i], p); @@ -564,7 +564,7 @@ static void test_VerQueryValueA(void) ok(!ret, "VerQueryValueA(%s) succeeded\n", buf); ok(GetLastError() == ERROR_RESOURCE_TYPE_NOT_FOUND || GetLastError() == 0xdeadbeef /* NT4, W2K */, - "VerQueryValue returned %u\n", GetLastError()); + "VerQueryValue returned %lu\n", GetLastError()); ok(p == (char *)0xdeadbeef, "expected 0xdeadbeef got %p\n", p); ok(len == 0, "expected 0 or 0xbeef, got %x\n", len); } @@ -589,13 +589,13 @@ static void test_extra_block(void) ok(ret, "GetModuleFileNameA failed\n");
len = GetFileVersionInfoSizeA(buf, NULL); - ok(len, "GetFileVersionInfoSizeA(%s) error %u\n", buf, GetLastError()); + ok(len, "GetFileVersionInfoSizeA(%s) error %lu\n", buf, GetLastError());
ver = HeapAlloc(GetProcessHeap(), 0, len + sizeof(extra_block) * 2); ok(ver != NULL, "Can't allocate memory\n");
ret = GetFileVersionInfoA(buf, 0, len, ver); - ok(ret, "GetFileVersionInfoA error %u\n", GetLastError()); + ok(ret, "GetFileVersionInfoA error %lu\n", GetLastError());
/* forge the string table, as windres dislike an extra block */ length = (WORD *)ver; /* see VS_VERSION_INFO_STRUCT32 for details */ @@ -606,15 +606,15 @@ static void test_extra_block(void) len = 0xdeadbeef; w = 0xdeadbeef; ret = VerQueryValueA(ver, "WineTest\Binary", (LPVOID*)&p, &len); - ok(ret, "VerQueryValue error %u\n", GetLastError()); + ok(ret, "VerQueryValue error %lu\n", GetLastError()); ok(len == 4, "VerQueryValue returned %u, expected 4\n", len); ok(p != (char *)0xdeadbeef, "not expected 0xdeadbeef\n"); - ok(memcmp(p, &w, sizeof(w)) == 0, "got 0x%08x, expected 0x%08x\n", *(PULONG)p, w); + ok(memcmp(p, &w, sizeof(w)) == 0, "got 0x%08lx, expected 0x%08lx\n", *(PULONG)p, w);
p = (char *)0xdeadbeef; len = 0xdeadbeef; ret = VerQueryValueA(ver, "WineTest\Text", (LPVOID*)&p, &len); - ok(ret, "VerQueryValue error %u\n", GetLastError()); + ok(ret, "VerQueryValue error %lu\n", GetLastError()); ok(len == 4, "VerQueryValue returned %u, expected 4\n", len); ok(p != (char *)0xdeadbeef, "not expected 0xdeadbeef\n"); ok(strcmp(p, "B-)") == 0, "got '%s', expected '%s'\n", p, "B-)"); @@ -652,17 +652,17 @@ static void test_GetFileVersionInfoEx(void) }
size = GetFileVersionInfoSizeW(L"kernel32.dll", NULL); - ok(size, "GetFileVersionInfoSize(kernel32) error %u\n", GetLastError()); + ok(size, "GetFileVersionInfoSize(kernel32) error %lu\n", GetLastError());
ver = HeapAlloc(GetProcessHeap(), 0, size); assert(ver);
ret = GetFileVersionInfoW(L"kernel32.dll", 0, size, ver); - ok(ret, "GetFileVersionInfo error %u\n", GetLastError()); + ok(ret, "GetFileVersionInfo error %lu\n", GetLastError());
ret = VerQueryValueA(ver, "\VarFileInfo\Translation", (void **)&p, &size); translation = *(UINT *)p; - ok(ret, "VerQueryValue error %u\n", GetLastError()); + ok(ret, "VerQueryValue error %lu\n", GetLastError()); ok(size == 4, "VerQueryValue returned %u, expected 4\n", size);
/* test default version resource */ @@ -688,16 +688,16 @@ static void test_GetFileVersionInfoEx(void) for (i = 0; i < ARRAY_SIZE(test_flags); i++) { size = pGetFileVersionInfoSizeExW(test_flags[i], L"kernel32.dll", NULL); - ok(size, "[%u] GetFileVersionInfoSizeEx(kernel32) error %u\n", i, GetLastError()); + ok(size, "[%u] GetFileVersionInfoSizeEx(kernel32) error %lu\n", i, GetLastError());
ver = HeapAlloc(GetProcessHeap(), 0, size); assert(ver);
ret = pGetFileVersionInfoExW(test_flags[i], L"kernel32.dll", 0, size, ver); - ok(ret, "[%u] GetFileVersionInfoEx error %u\n", i, GetLastError()); + ok(ret, "[%u] GetFileVersionInfoEx error %lu\n", i, GetLastError());
ret = VerQueryValueA(ver, "\VarFileInfo\Translation", (void **)&p, &size); - ok(ret, "[%u] VerQueryValue error %u\n", i, GetLastError()); + ok(ret, "[%u] VerQueryValue error %lu\n", i, GetLastError()); ok(size == 4, "[%u] VerQueryValue returned %u, expected 4\n", i, size); translation = *(UINT *)p;
@@ -716,7 +716,7 @@ static void test_GetFileVersionInfoEx(void) sprintf(desc, "\StringFileInfo\%04x%04x\FileDescription", LOWORD(translation), HIWORD(translation)); ret = VerQueryValueA(ver, desc, (void **)&p, &size); - ok(ret, "[%u] VerQueryValue error %u\n", i, GetLastError()); + ok(ret, "[%u] VerQueryValue error %lu\n", i, GetLastError()); ok(size == strlen(p) + 1, "[%u] VerQueryValue returned %u\n", i, size);
HeapFree(GetProcessHeap(), 0, ver); diff --git a/dlls/version/tests/install.c b/dlls/version/tests/install.c index d0e37e28094..a4625cffa43 100644 --- a/dlls/version/tests/install.c +++ b/dlls/version/tests/install.c @@ -62,7 +62,7 @@ static void test_find_file(void) "got %d(%s) expected MAX_PATH\n", dwOut, outBuf); break; default: - ok(0, "Got unexpected return value %x\n", ret); + ok(0, "Got unexpected return value %lx\n", ret); }
if(!GetWindowsDirectoryA(windir, MAX_PATH)) @@ -91,7 +91,7 @@ static void test_find_file(void) "got %d(%s) expected MAX_PATH\n", dwOut, outBuf); break; default: - ok(0, "Got unexpected return value %x\n", ret); + ok(0, "Got unexpected return value %lx\n", ret); }
dwCur=MAX_PATH; @@ -113,7 +113,7 @@ static void test_find_file(void) "got %d(%s) expected MAX_PATH\n", dwOut, outBuf); break; default: - ok(0, "Got unexpected return value %x\n", ret); + ok(0, "Got unexpected return value %lx\n", ret); } } } @@ -145,7 +145,7 @@ static void test_find_file(void) "got %d(%s) expected MAX_PATH\n", dwOut, outBuf); break; default: - todo_wine ok(0, "Got unexpected return value %x\n", ret); + todo_wine ok(0, "Got unexpected return value %lx\n", ret); }
dwCur=MAX_PATH; @@ -153,7 +153,7 @@ static void test_find_file(void) memset(outBuf, 0, MAX_PATH); memset(curdir, 0, MAX_PATH); ret = VerFindFileA(VFFF_ISSHAREDFILE, filename, NULL, appdir, curdir, &dwCur, outBuf, &dwOut); - ok(VFF_CURNEDEST == ret, "Wrong return value got %x expected VFF_CURNEDEST\n", ret); + ok(VFF_CURNEDEST == ret, "Wrong return value got %lx expected VFF_CURNEDEST\n", ret); ok(dwOut == 1 + strlen(windir), "Wrong length of buffer for current location: " "got %d(%s) expected %d\n", dwOut, outBuf, lstrlenA(windir)+1);
@@ -162,7 +162,7 @@ static void test_find_file(void) memset(outBuf, 0, MAX_PATH); memset(curdir, 0, MAX_PATH); ret = VerFindFileA(0, filename, NULL, appdir, curdir, &dwCur, outBuf, &dwOut); - ok(VFF_CURNEDEST == ret, "Wrong return value got %x expected VFF_CURNEDEST\n", ret); + ok(VFF_CURNEDEST == ret, "Wrong return value got %lx expected VFF_CURNEDEST\n", ret); ok(dwOut == 1 + strlen(appdir), "Wrong length of buffer for current location: " "got %d(%s) expected %d\n", dwOut, outBuf, lstrlenA(appdir)+1);
@@ -170,135 +170,135 @@ static void test_find_file(void) dwCur=MAX_PATH; dwOut=MAX_PATH; ret = VerFindFileA(0, filename, NULL, NULL, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); + ok(ret & VFF_CURNEDEST, "Wrong return value got %lx expected VFF_CURNEDEST set\n", ret);
dwCur=MAX_PATH; dwOut=MAX_PATH; ret = VerFindFileA(0, filename, NULL, empty, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); + ok(ret & VFF_CURNEDEST, "Wrong return value got %lx expected VFF_CURNEDEST set\n", ret);
dwCur=MAX_PATH; dwOut=MAX_PATH; ret = VerFindFileA(0, filename, NULL, appdir, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); + ok(ret & VFF_CURNEDEST, "Wrong return value got %lx expected VFF_CURNEDEST set\n", ret);
dwCur=MAX_PATH; dwOut=MAX_PATH; ret = VerFindFileA(VFFF_ISSHAREDFILE, filename, NULL, NULL, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); + ok(ret & VFF_CURNEDEST, "Wrong return value got %lx expected VFF_CURNEDEST set\n", ret);
dwCur=MAX_PATH; dwOut=MAX_PATH; ret = VerFindFileA(VFFF_ISSHAREDFILE, filename, NULL, empty, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); + ok(ret & VFF_CURNEDEST, "Wrong return value got %lx expected VFF_CURNEDEST set\n", ret);
dwCur=MAX_PATH; dwOut=MAX_PATH; ret = VerFindFileA(VFFF_ISSHAREDFILE, filename, NULL, appdir, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); + ok(ret & VFF_CURNEDEST, "Wrong return value got %lx expected VFF_CURNEDEST set\n", ret);
/* search for regedit */ dwCur=MAX_PATH; dwOut=MAX_PATH; ret = VerFindFileA(0, "regedit", NULL, NULL, curdir, &dwCur, outBuf, &dwOut); - ok(!ret, "Wrong return value got %x expected 0\n", ret); + ok(!ret, "Wrong return value got %lx expected 0\n", ret);
dwCur=MAX_PATH; dwOut=MAX_PATH; ret = VerFindFileA(0, "regedit", NULL, empty, curdir, &dwCur, outBuf, &dwOut); - ok(!ret, "Wrong return value got %x expected 0\n", ret); + ok(!ret, "Wrong return value got %lx expected 0\n", ret);
dwCur=MAX_PATH; dwOut=MAX_PATH; ret = VerFindFileA(0, "regedit", NULL, appdir, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); + ok(ret & VFF_CURNEDEST, "Wrong return value got %lx expected VFF_CURNEDEST set\n", ret);
dwCur=MAX_PATH; dwOut=MAX_PATH; ret = VerFindFileA(VFFF_ISSHAREDFILE, "regedit", NULL, NULL, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); + ok(ret & VFF_CURNEDEST, "Wrong return value got %lx expected VFF_CURNEDEST set\n", ret);
dwCur=MAX_PATH; dwOut=MAX_PATH; ret = VerFindFileA(VFFF_ISSHAREDFILE, "regedit", NULL, empty, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); + ok(ret & VFF_CURNEDEST, "Wrong return value got %lx expected VFF_CURNEDEST set\n", ret);
dwCur=MAX_PATH; dwOut=MAX_PATH; ret = VerFindFileA(VFFF_ISSHAREDFILE, "regedit", NULL, appdir, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); + ok(ret & VFF_CURNEDEST, "Wrong return value got %lx expected VFF_CURNEDEST set\n", ret);
/* search for regedit.exe */ dwCur=MAX_PATH; dwOut=MAX_PATH; ret = VerFindFileA(0, "regedit.exe", NULL, NULL, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); + ok(ret & VFF_CURNEDEST, "Wrong return value got %lx expected VFF_CURNEDEST set\n", ret);
dwCur=MAX_PATH; dwOut=MAX_PATH; ret = VerFindFileA(0, "regedit.exe", NULL, empty, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); + ok(ret & VFF_CURNEDEST, "Wrong return value got %lx expected VFF_CURNEDEST set\n", ret);
dwCur=MAX_PATH; dwOut=MAX_PATH; ret = VerFindFileA(0, "regedit.exe", NULL, appdir, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); + ok(ret & VFF_CURNEDEST, "Wrong return value got %lx expected VFF_CURNEDEST set\n", ret);
dwCur=MAX_PATH; dwOut=MAX_PATH; ret = VerFindFileA(VFFF_ISSHAREDFILE, "regedit.exe", NULL, NULL, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); + ok(ret & VFF_CURNEDEST, "Wrong return value got %lx expected VFF_CURNEDEST set\n", ret);
dwCur=MAX_PATH; dwOut=MAX_PATH; ret = VerFindFileA(VFFF_ISSHAREDFILE, "regedit.exe", NULL, empty, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); + ok(ret & VFF_CURNEDEST, "Wrong return value got %lx expected VFF_CURNEDEST set\n", ret);
dwCur=MAX_PATH; dwOut=MAX_PATH; ret = VerFindFileA(VFFF_ISSHAREDFILE, "regedit.exe", NULL, appdir, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); + ok(ret & VFF_CURNEDEST, "Wrong return value got %lx expected VFF_CURNEDEST set\n", ret);
/* nonexistent filename */ dwCur=MAX_PATH; dwOut=MAX_PATH; ret = VerFindFileA(0, "doesnotexist.exe", NULL, NULL, curdir, &dwCur, outBuf, &dwOut); - ok(!ret, "Wrong return value got %x expected 0\n", ret); + ok(!ret, "Wrong return value got %lx expected 0\n", ret);
dwCur=MAX_PATH; dwOut=MAX_PATH; ret = VerFindFileA(0, "doesnotexist.exe", NULL, empty, curdir, &dwCur, outBuf, &dwOut); - ok(!ret, "Wrong return value got %x expected 0\n", ret); + ok(!ret, "Wrong return value got %lx expected 0\n", ret);
dwCur=MAX_PATH; dwOut=MAX_PATH; ret = VerFindFileA(0, "doesnotexist.exe", NULL, appdir, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); + ok(ret & VFF_CURNEDEST, "Wrong return value got %lx expected VFF_CURNEDEST set\n", ret);
dwCur=MAX_PATH; dwOut=MAX_PATH; ret = VerFindFileA(0, "doesnotexist.exe", NULL, "C:\random_path_does_not_exist", curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); + ok(ret & VFF_CURNEDEST, "Wrong return value got %lx expected VFF_CURNEDEST set\n", ret);
dwCur=MAX_PATH; dwOut=MAX_PATH; ret = VerFindFileA(VFFF_ISSHAREDFILE, "doesnotexist.exe", NULL, NULL, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); + ok(ret & VFF_CURNEDEST, "Wrong return value got %lx expected VFF_CURNEDEST set\n", ret);
dwCur=MAX_PATH; dwOut=MAX_PATH; ret = VerFindFileA(VFFF_ISSHAREDFILE, "doesnotexist.exe", NULL, empty, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); + ok(ret & VFF_CURNEDEST, "Wrong return value got %lx expected VFF_CURNEDEST set\n", ret);
dwCur=MAX_PATH; dwOut=MAX_PATH; ret = VerFindFileA(VFFF_ISSHAREDFILE, "doesnotexist.exe", NULL, appdir, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); + ok(ret & VFF_CURNEDEST, "Wrong return value got %lx expected VFF_CURNEDEST set\n", ret);
dwCur=MAX_PATH; dwOut=MAX_PATH; ret = VerFindFileA(VFFF_ISSHAREDFILE, "doesnotexist.exe", NULL, "C:\random_path_does_not_exist", curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); + ok(ret & VFF_CURNEDEST, "Wrong return value got %lx expected VFF_CURNEDEST set\n", ret);
DeleteFileA(filename); } @@ -318,30 +318,30 @@ static void test_install_file(void) /* testing Invalid Parameters */ memset(tmpname,0,sizeof(tmpname)); rc = VerInstallFileA(0x0, NULL, NULL, NULL, NULL, NULL, tmpname, &size); - ok (rc == 0x10000 && tmpname[0]==0," expected return 0x10000 and no tempname, got %08x/'%s'\n",rc,tmpname); + ok (rc == 0x10000 && tmpname[0]==0," expected return 0x10000 and no tempname, got %08lx/'%s'\n",rc,tmpname); memset(tmpname,0,sizeof(tmpname)); size = MAX_PATH; rc = VerInstallFileA(0x0, szSrcFileName, NULL, NULL, NULL, NULL, tmpname, &size); - ok (rc == 0x10000 && tmpname[0]==0," expected return 0x10000 and no tempname, got %08x/'%s'\n",rc,tmpname); + ok (rc == 0x10000 && tmpname[0]==0," expected return 0x10000 and no tempname, got %08lx/'%s'\n",rc,tmpname); memset(tmpname,0,sizeof(tmpname)); size = MAX_PATH; rc = VerInstallFileA(0x0, szSrcFileName, szDestFileName, NULL, NULL, NULL, tmpname, &size); - ok (rc == 0x10000 && tmpname[0]==0," expected return 0x10000 and no tempname, got %08x/'%s'\n",rc,tmpname); + ok (rc == 0x10000 && tmpname[0]==0," expected return 0x10000 and no tempname, got %08lx/'%s'\n",rc,tmpname); memset(tmpname,0,sizeof(tmpname)); size = MAX_PATH; rc = VerInstallFileA(0x0, szSrcFileName, szDestFileName, szSrcDir, NULL, NULL, tmpname, &size); - ok (rc == 0x10000 && tmpname[0]==0," expected return 0x10000 and no tempname, got %08x/'%s'\n",rc,tmpname); + ok (rc == 0x10000 && tmpname[0]==0," expected return 0x10000 and no tempname, got %08lx/'%s'\n",rc,tmpname);
/* Source file does not exist*/
memset(tmpname,0,sizeof(tmpname)); size = MAX_PATH; rc = VerInstallFileA(0x0, szSrcFileName, szDestFileName, szSrcDir, szDestDir, NULL, tmpname, &size); - ok (rc == 0x10000 && tmpname[0]==0," expected return 0x10000 and no tempname, got %08x/'%s'\n",rc,tmpname); + ok (rc == 0x10000 && tmpname[0]==0," expected return 0x10000 and no tempname, got %08lx/'%s'\n",rc,tmpname); memset(tmpname,0,sizeof(tmpname)); size = MAX_PATH; rc = VerInstallFileA(0x0, szSrcFileName, szDestFileName, szSrcDir, szDestDir, szCurDir, tmpname, &size); - ok (rc == 0x10000 && tmpname[0]==0," expected return 0x10000 and no tempname, got %08x/'%s'\n",rc,tmpname); + ok (rc == 0x10000 && tmpname[0]==0," expected return 0x10000 and no tempname, got %08lx/'%s'\n",rc,tmpname); }
START_TEST(install)
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/virtdisk/tests/Makefile.in | 1 - dlls/virtdisk/tests/virtdisk.c | 16 ++++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/dlls/virtdisk/tests/Makefile.in b/dlls/virtdisk/tests/Makefile.in index 6d573f357e9..3ace1a702d3 100644 --- a/dlls/virtdisk/tests/Makefile.in +++ b/dlls/virtdisk/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = virtdisk.dll
C_SRCS = \ diff --git a/dlls/virtdisk/tests/virtdisk.c b/dlls/virtdisk/tests/virtdisk.c index 34118e532b1..bbbaf4d45e4 100644 --- a/dlls/virtdisk/tests/virtdisk.c +++ b/dlls/virtdisk/tests/virtdisk.c @@ -40,10 +40,10 @@ static void test_GetStorageDependencyInformation(void) info = heap_alloc(size);
ret = pGetStorageDependencyInformation(handle, GET_STORAGE_DEPENDENCY_FLAG_DISK_HANDLE, 0, info, 0); - ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", ret);
ret = pGetStorageDependencyInformation(handle, GET_STORAGE_DEPENDENCY_FLAG_DISK_HANDLE, size, NULL, 0); - ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", ret);
heap_free(info); CloseHandle(handle); @@ -58,27 +58,27 @@ static void test_OpenVirtualDisk(void) static const WCHAR vdisk[] = L"test.vhd";
ret = pOpenVirtualDisk(NULL, NULL, VIRTUAL_DISK_ACCESS_NONE, OPEN_VIRTUAL_DISK_FLAG_NO_PARENTS, NULL, &handle); - ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", ret);
stgtype.DeviceId = VIRTUAL_STORAGE_TYPE_DEVICE_UNKNOWN; stgtype.VendorId = VIRTUAL_STORAGE_TYPE_VENDOR_UNKNOWN; ret = pOpenVirtualDisk(&stgtype, NULL, VIRTUAL_DISK_ACCESS_NONE, OPEN_VIRTUAL_DISK_FLAG_NO_PARENTS, NULL, &handle); - ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", ret);
param.Version = OPEN_VIRTUAL_DISK_VERSION_3; ret = pOpenVirtualDisk(&stgtype, vdisk, VIRTUAL_DISK_ACCESS_NONE, OPEN_VIRTUAL_DISK_FLAG_NO_PARENTS, ¶m, &handle); - ok((ret == ERROR_INVALID_PARAMETER) || (ret == ERROR_FILE_NOT_FOUND), "Expected ERROR_INVALID_PARAMETER or ERROR_FILE_NOT_FOUND (>= Win 10), got %d\n", ret); + ok((ret == ERROR_INVALID_PARAMETER) || (ret == ERROR_FILE_NOT_FOUND), "Expected ERROR_INVALID_PARAMETER or ERROR_FILE_NOT_FOUND (>= Win 10), got %ld\n", ret);
param.Version = OPEN_VIRTUAL_DISK_VERSION_2; ret = pOpenVirtualDisk(&stgtype, vdisk, VIRTUAL_DISK_ACCESS_NONE, OPEN_VIRTUAL_DISK_FLAG_NO_PARENTS, ¶m, &handle); - ok((ret == ERROR_INVALID_PARAMETER) || (ret == ERROR_FILE_NOT_FOUND), "Expected ERROR_INVALID_PARAMETER or ERROR_FILE_NOT_FOUND (>= Win 8), got %d\n", ret); + ok((ret == ERROR_INVALID_PARAMETER) || (ret == ERROR_FILE_NOT_FOUND), "Expected ERROR_INVALID_PARAMETER or ERROR_FILE_NOT_FOUND (>= Win 8), got %ld\n", ret);
param.Version = OPEN_VIRTUAL_DISK_VERSION_1; ret = pOpenVirtualDisk(&stgtype, vdisk, 0xffffff, OPEN_VIRTUAL_DISK_FLAG_NO_PARENTS, ¶m, &handle); - ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", ret);
ret = pOpenVirtualDisk(&stgtype, vdisk, VIRTUAL_DISK_ACCESS_NONE, OPEN_VIRTUAL_DISK_FLAG_NONE, ¶m, &handle); - todo_wine ok(ret == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", ret); + todo_wine ok(ret == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", ret); }
START_TEST(virtdisk)
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/vulkan-1/tests/Makefile.in | 1 - dlls/vulkan-1/tests/vulkan.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/vulkan-1/tests/Makefile.in b/dlls/vulkan-1/tests/Makefile.in index 6bff576d70f..c9f9f0727c8 100644 --- a/dlls/vulkan-1/tests/Makefile.in +++ b/dlls/vulkan-1/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = vulkan-1.dll IMPORTS = vulkan-1
diff --git a/dlls/vulkan-1/tests/vulkan.c b/dlls/vulkan-1/tests/vulkan.c index 75e48bfc9d1..11d20120d1d 100644 --- a/dlls/vulkan-1/tests/vulkan.c +++ b/dlls/vulkan-1/tests/vulkan.c @@ -209,7 +209,7 @@ static void test_enumerate_physical_device2(void)
pfn_vkGetPhysicalDeviceProperties2(vk_physical_devices[j], &properties2); luid = (const LUID *)id.deviceLUID; - trace("Device '%s', device UUID: %s, driver UUID: %s, device LUID: %08x:%08x.\n", + trace("Device '%s', device UUID: %s, driver UUID: %s, device LUID: %08lx:%08lx.\n", properties2.properties.deviceName, wine_dbgstr_guid((const GUID *)id.deviceUUID), wine_dbgstr_guid((const GUID *)id.driverUUID), luid->HighPart, luid->LowPart); ok(id.deviceLUIDValid == VK_TRUE, "Expected valid device LUID.\n"); @@ -584,7 +584,7 @@ static void test_cross_process_resource(VkPhysicalDeviceIDPropertiesKHR *device_ sprintf(buf, ""%s" vulkan resource %s %s %s %p", argv[0], driver_uuid, device_uuid, kmt ? "kmt" : "nt", handle); res = CreateProcessA(NULL, buf, NULL, NULL, TRUE, 0L, NULL, NULL, &si, &info); - ok(res, "CreateProcess failed: %u\n", GetLastError()); + ok(res, "CreateProcess failed: %lu\n", GetLastError()); CloseHandle(info.hThread);
wait_child_process(info.hProcess);
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/wer/tests/Makefile.in | 1 - dlls/wer/tests/main.c | 82 ++++++++++++++++++++++---------------------- 2 files changed, 41 insertions(+), 42 deletions(-)
diff --git a/dlls/wer/tests/Makefile.in b/dlls/wer/tests/Makefile.in index 51d7216d821..ec7bb5c1df5 100644 --- a/dlls/wer/tests/Makefile.in +++ b/dlls/wer/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = wer.dll IMPORTS = wer
diff --git a/dlls/wer/tests/main.c b/dlls/wer/tests/main.c index 038b29c25a9..6e7d62ffabb 100644 --- a/dlls/wer/tests/main.c +++ b/dlls/wer/tests/main.c @@ -42,43 +42,43 @@ static void test_WerAddExcludedApplication(void) /* clean state */ hr = WerRemoveExcludedApplication(winetest_wer, FALSE); ok((hr == S_OK) || (hr == E_FAIL) || (hr == __HRESULT_FROM_WIN32(ERROR_ENVVAR_NOT_FOUND)), - "got 0x%x (expected S_OK, E_FAIL or HRESULT_FROM_WIN32(ERROR_ENVVAR_NOT_FOUND))\n", hr); + "got 0x%lx (expected S_OK, E_FAIL or HRESULT_FROM_WIN32(ERROR_ENVVAR_NOT_FOUND))\n", hr);
hr = WerAddExcludedApplication(NULL, FALSE); - ok(hr == E_INVALIDARG, "got 0x%x (expected E_INVALIDARG)\n", hr); + ok(hr == E_INVALIDARG, "got 0x%lx (expected E_INVALIDARG)\n", hr);
hr = WerAddExcludedApplication(L"", FALSE); - ok(hr == E_INVALIDARG, "got 0x%x (expected E_INVALIDARG)\n", hr); + ok(hr == E_INVALIDARG, "got 0x%lx (expected E_INVALIDARG)\n", hr);
hr = WerAddExcludedApplication(winetest_wer, FALSE); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr); /* app already in the list */ hr = WerAddExcludedApplication(winetest_wer, FALSE); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr);
/* cleanup */ hr = WerRemoveExcludedApplication(winetest_wer, FALSE); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr);
/* appname has a path */ res = GetWindowsDirectoryW(buffer, ARRAY_SIZE(buffer)); if (res > 0) { /* the last part from the path is added to the inclusion list */ hr = WerAddExcludedApplication(buffer, FALSE); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr); hr = WerRemoveExcludedApplication(buffer, FALSE); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr);
lstrcatW(buffer, L"\"); hr = WerAddExcludedApplication(buffer, FALSE); - ok(hr == E_INVALIDARG, "got 0x%x (expected E_INVALIDARG)\n", hr); + ok(hr == E_INVALIDARG, "got 0x%lx (expected E_INVALIDARG)\n", hr);
lstrcatW(buffer, winetest_wer); hr = WerAddExcludedApplication(buffer, FALSE); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr); hr = WerRemoveExcludedApplication(buffer, FALSE); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr); }
} @@ -94,49 +94,49 @@ static void test_WerRemoveExcludedApplication(void) /* clean state */ hr = WerRemoveExcludedApplication(winetest_wer, FALSE); ok((hr == S_OK) || (hr == E_FAIL) || (hr == __HRESULT_FROM_WIN32(ERROR_ENVVAR_NOT_FOUND)), - "got 0x%x (expected S_OK, E_FAIL or HRESULT_FROM_WIN32(ERROR_ENVVAR_NOT_FOUND))\n", hr); + "got 0x%lx (expected S_OK, E_FAIL or HRESULT_FROM_WIN32(ERROR_ENVVAR_NOT_FOUND))\n", hr);
hr = WerAddExcludedApplication(winetest_wer, FALSE); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr);
hr = WerRemoveExcludedApplication(NULL, FALSE); - ok(hr == E_INVALIDARG, "got 0x%x (expected E_INVALIDARG)\n", hr); + ok(hr == E_INVALIDARG, "got 0x%lx (expected E_INVALIDARG)\n", hr);
hr = WerRemoveExcludedApplication(L"", FALSE); - ok(hr == E_INVALIDARG, "got 0x%x (expected E_INVALIDARG)\n", hr); + ok(hr == E_INVALIDARG, "got 0x%lx (expected E_INVALIDARG)\n", hr);
hr = WerRemoveExcludedApplication(winetest_wer, FALSE); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr);
/* app not in the list */ hr = WerRemoveExcludedApplication(winetest_wer, FALSE); ok((hr == E_FAIL) || (hr == __HRESULT_FROM_WIN32(ERROR_ENVVAR_NOT_FOUND)), - "got 0x%x (expected E_FAIL or HRESULT_FROM_WIN32(ERROR_ENVVAR_NOT_FOUND))\n", hr); + "got 0x%lx (expected E_FAIL or HRESULT_FROM_WIN32(ERROR_ENVVAR_NOT_FOUND))\n", hr);
/* appname has a path */ res = GetWindowsDirectoryW(buffer, ARRAY_SIZE(buffer)); if (res > 0) { hr = WerRemoveExcludedApplication(buffer, FALSE); ok((hr == E_FAIL) || (hr == __HRESULT_FROM_WIN32(ERROR_ENVVAR_NOT_FOUND)), - "got 0x%x (expected E_FAIL or HRESULT_FROM_WIN32(ERROR_ENVVAR_NOT_FOUND))\n", hr); + "got 0x%lx (expected E_FAIL or HRESULT_FROM_WIN32(ERROR_ENVVAR_NOT_FOUND))\n", hr);
/* the last part from the path is added to the inclusion list */ hr = WerAddExcludedApplication(buffer, FALSE); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr); hr = WerRemoveExcludedApplication(buffer, FALSE); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr);
lstrcatW(buffer, L"\"); hr = WerAddExcludedApplication(buffer, FALSE); - ok(hr == E_INVALIDARG, "got 0x%x (expected E_INVALIDARG)\n", hr); + ok(hr == E_INVALIDARG, "got 0x%lx (expected E_INVALIDARG)\n", hr); hr = WerRemoveExcludedApplication(buffer, FALSE); - ok(hr == E_INVALIDARG, "got 0x%x (expected E_INVALIDARG)\n", hr); + ok(hr == E_INVALIDARG, "got 0x%lx (expected E_INVALIDARG)\n", hr);
lstrcatW(buffer, winetest_wer); hr = WerAddExcludedApplication(buffer, FALSE); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr); hr = WerRemoveExcludedApplication(buffer, FALSE); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr); } }
@@ -149,7 +149,7 @@ static void test_WerReportCloseHandle(void)
report = (void *) 0xdeadbeef; hr = WerReportCreate(L"APPCRASH", WerReportCritical, NULL, &report); - ok(hr == S_OK, "got 0x%x and %p (expected S_OK)\n", hr, report); + ok(hr == S_OK, "got 0x%lx and %p (expected S_OK)\n", hr, report);
if (!report) { skip("Nothing left to test\n"); @@ -158,14 +158,14 @@ static void test_WerReportCloseHandle(void)
/* close the handle */ hr = WerReportCloseHandle(report); - ok(hr == S_OK, "got 0x%x for %p (expected S_OK)\n", hr, report); + ok(hr == S_OK, "got 0x%lx for %p (expected S_OK)\n", hr, report);
/* close the handle again */ hr = WerReportCloseHandle(report); - ok(hr == E_INVALIDARG, "got 0x%x for %p again (expected E_INVALIDARG)\n", hr, report); + ok(hr == E_INVALIDARG, "got 0x%lx for %p again (expected E_INVALIDARG)\n", hr, report);
hr = WerReportCloseHandle(NULL); - ok(hr == E_INVALIDARG, "got 0x%x for NULL(expected E_INVALIDARG)\n", hr); + ok(hr == E_INVALIDARG, "got 0x%lx for NULL(expected E_INVALIDARG)\n", hr); }
/* #### */ @@ -180,7 +180,7 @@ static void test_WerReportCreate(void) report = (void *) 0xdeadbeef; /* test a simple valid case */ hr = WerReportCreate(L"APPCRASH", WerReportCritical, NULL, &report); - ok(hr == S_OK, "got 0x%x and %p (expected S_OK)\n", hr, report); + ok(hr == S_OK, "got 0x%lx and %p (expected S_OK)\n", hr, report);
if (!report) { skip("Nothing left to test\n"); @@ -188,29 +188,29 @@ static void test_WerReportCreate(void) }
hr = WerReportCloseHandle(report); - ok(hr == S_OK, "got 0x%x for %p (expected S_OK)\n", hr, report); + ok(hr == S_OK, "got 0x%lx for %p (expected S_OK)\n", hr, report);
/* the ptr to store the created handle is always needed */ hr = WerReportCreate(L"APPCRASH", WerReportCritical, NULL, NULL); - ok(hr == E_INVALIDARG, "got 0x%x (expected E_INVALIDARG)\n", hr); + ok(hr == E_INVALIDARG, "got 0x%lx (expected E_INVALIDARG)\n", hr);
/* the event type must be a valid string */ report = (void *) 0xdeadbeef; hr = WerReportCreate(NULL, WerReportCritical, NULL, &report); - ok(hr == E_INVALIDARG, "got 0x%x and %p(expected E_INVALIDARG)\n", hr, report); + ok(hr == E_INVALIDARG, "got 0x%lx and %p(expected E_INVALIDARG)\n", hr, report);
report = (void *) 0xdeadbeef; hr = WerReportCreate(L"", WerReportCritical, NULL, &report); - ok(hr == E_INVALIDARG, "got 0x%x and %p(expected E_INVALIDARG)\n", hr, report); + ok(hr == E_INVALIDARG, "got 0x%lx and %p(expected E_INVALIDARG)\n", hr, report);
/* a valid WER_REPORT_TYPE works */ for (i = 0; i < WerReportInvalid; i++) { report = (void *) 0xdeadbeef; hr = WerReportCreate(L"APPCRASH", i, NULL, &report); - ok(hr == S_OK, "%d: got 0x%x and %p (expected S_OK)\n", i, hr, report); + ok(hr == S_OK, "%d: got 0x%lx and %p (expected S_OK)\n", i, hr, report);
hr = WerReportCloseHandle(report); - ok(hr == S_OK, "%d: got 0x%x for %p (expected S_OK)\n", i, hr, report); + ok(hr == S_OK, "%d: got 0x%lx for %p (expected S_OK)\n", i, hr, report);
}
@@ -220,19 +220,19 @@ static void test_WerReportCreate(void) report = (void *) 0xdeadbeef; hr = WerReportCreate(L"APPCRASH", WerReportInvalid, NULL, &report); ok((hr == E_INVALIDARG) | broken(hr == S_OK), - "%d: got 0x%x and %p (expected E_INVALIDARG or a broken S_OK)\n", i, hr, report); + "%d: got 0x%lx and %p (expected E_INVALIDARG or a broken S_OK)\n", i, hr, report); if (hr == S_OK) { hr = WerReportCloseHandle(report); - ok(hr == S_OK, "%d: got 0x%x for %p (expected S_OK)\n", i, hr, report); + ok(hr == S_OK, "%d: got 0x%lx for %p (expected S_OK)\n", i, hr, report); }
report = (void *) 0xdeadbeef; hr = WerReportCreate(L"APPCRASH", 42, NULL, &report); ok((hr == E_INVALIDARG) | broken(hr == S_OK), - "%d: got 0x%x and %p (expected E_INVALIDARG or a broken S_OK)\n", i, hr, report); + "%d: got 0x%lx and %p (expected E_INVALIDARG or a broken S_OK)\n", i, hr, report); if (hr == S_OK) { hr = WerReportCloseHandle(report); - ok(hr == S_OK, "%d: got 0x%x for %p (expected S_OK)\n", i, hr, report); + ok(hr == S_OK, "%d: got 0x%lx for %p (expected S_OK)\n", i, hr, report); }
/* multiple active reports are possible */ @@ -240,13 +240,13 @@ static void test_WerReportCreate(void) for (i = 0; i < (ARRAY_SIZE(table) - 1); i++) { report = (void *) 0xdeadbeef; hr = WerReportCreate(L"APPCRASH", WerReportCritical, NULL, &table[i]); - ok(hr == S_OK, "%02d: got 0x%x and %p (expected S_OK)\n", i, hr, table[i]); + ok(hr == S_OK, "%02d: got 0x%lx and %p (expected S_OK)\n", i, hr, table[i]); }
while (i > 0) { i--; hr = WerReportCloseHandle(table[i]); - ok(hr == S_OK, "got 0x%x for %p (expected S_OK)\n", hr, table[i]); + ok(hr == S_OK, "got 0x%lx for %p (expected S_OK)\n", hr, table[i]); }
}
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/wevtapi/tests/Makefile.in | 1 - dlls/wevtapi/tests/wevtapi.c | 16 ++++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/dlls/wevtapi/tests/Makefile.in b/dlls/wevtapi/tests/Makefile.in index db69ecb71d2..47fde74b0eb 100644 --- a/dlls/wevtapi/tests/Makefile.in +++ b/dlls/wevtapi/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = wevtapi.dll IMPORTS = wevtapi advapi32
diff --git a/dlls/wevtapi/tests/wevtapi.c b/dlls/wevtapi/tests/wevtapi.c index a0a21aa9971..51dbbd33970 100644 --- a/dlls/wevtapi/tests/wevtapi.c +++ b/dlls/wevtapi/tests/wevtapi.c @@ -42,24 +42,24 @@ static void test_EvtGetChannelConfigProperty(void) skip("Not enough privileges to modify HKLM\n"); return; } - ok(ret == ERROR_SUCCESS, "RegCreateKey error %u\n", ret); + ok(ret == ERROR_SUCCESS, "RegCreateKey error %lu\n", ret);
config = EvtOpenChannelConfig(NULL, L"Winetest", 0); - ok(config != NULL, "EvtOpenChannelConfig error %u\n", GetLastError()); + ok(config != NULL, "EvtOpenChannelConfig error %lu\n", GetLastError());
ret = EvtGetChannelConfigProperty(config, EvtChannelLoggingConfigLogFilePath, 0, 0, NULL, &size); ok(!ret, "EvtGetChannelConfigProperty should fail\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %u\n", GetLastError()); - ok(size < sizeof(path), "got %u\n", size); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %lu\n", GetLastError()); + ok(size < sizeof(path), "got %lu\n", size);
memset(&path, 0, sizeof(path)); path.var.Count = 0xdeadbeef; path.var.Type = 0xdeadbeef; ret = EvtGetChannelConfigProperty(config, EvtChannelLoggingConfigLogFilePath, 0, size, (EVT_VARIANT *)&path, &size); - ok(ret, "EvtGetChannelConfigProperty error %u\n", GetLastError()); - ok(path.var.Count == 0xdeadbeef, "got %u\n", path.var.Count); - ok(path.var.Type == EvtVarTypeString, "got %u\n", path.var.Type); - ok(size == sizeof(EVT_VARIANT) + (wcslen(path.var.u.StringVal) + 1) * sizeof(WCHAR), "got %u\n", size); + ok(ret, "EvtGetChannelConfigProperty error %lu\n", GetLastError()); + ok(path.var.Count == 0xdeadbeef, "got %lu\n", path.var.Count); + ok(path.var.Type == EvtVarTypeString, "got %lu\n", path.var.Type); + ok(size == sizeof(EVT_VARIANT) + (wcslen(path.var.u.StringVal) + 1) * sizeof(WCHAR), "got %lu\n", size); ok(path.var.u.StringVal == path.buf, "path.var.u.StringVal = %p, path.buf = %p\n", path.var.u.StringVal, path.buf);
EvtClose(config);