https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1b4acd3c6542a16ddcc679...
commit 1b4acd3c6542a16ddcc6791c0d69e3e7fb2bb52c Author: winesync ros-dev@reactos.org AuthorDate: Mon Mar 14 21:24:16 2022 +0100 Commit: Mark Jansen mark.jansen@reactos.org CommitDate: Sun Mar 20 19:28:45 2022 +0100
[WINESYNC] msi/tests: Build without -DWINE_NO_LONG_TYPES.
Signed-off-by: Hans Leidekker hans@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
wine commit id 54b8c8c7eaafd19780cb4d91b763fe2f20327f50 by Hans Leidekker hans@codeweavers.com --- modules/rostests/winetests/msi/CMakeLists.txt | 3 +- modules/rostests/winetests/msi/action.c | 472 ++--- modules/rostests/winetests/msi/automation.c | 397 ++-- modules/rostests/winetests/msi/custom.c | 2 +- modules/rostests/winetests/msi/db.c | 164 +- modules/rostests/winetests/msi/format.c | 207 +- modules/rostests/winetests/msi/install.c | 102 +- modules/rostests/winetests/msi/msi.c | 2651 ++++++++++++------------- modules/rostests/winetests/msi/package.c | 454 ++--- modules/rostests/winetests/msi/patch.c | 25 +- modules/rostests/winetests/msi/record.c | 22 +- modules/rostests/winetests/msi/source.c | 654 +++--- modules/rostests/winetests/msi/suminfo.c | 2 +- 13 files changed, 2579 insertions(+), 2576 deletions(-)
diff --git a/modules/rostests/winetests/msi/CMakeLists.txt b/modules/rostests/winetests/msi/CMakeLists.txt index 03ad557e08b..631c09abc15 100644 --- a/modules/rostests/winetests/msi/CMakeLists.txt +++ b/modules/rostests/winetests/msi/CMakeLists.txt @@ -44,7 +44,8 @@ add_typelib(typelib.idl) target_compile_definitions(msi_winetest PRIVATE __WINESRC__ USE_WINE_TODOS)
if(CMAKE_C_COMPILER_ID STREQUAL "GNU") - target_compile_options(msi_winetest PRIVATE -Wno-format-overflow) + target_compile_options(msi_winetest PRIVATE -Wno-format-overflow -Wno-format) + target_compile_options(custom PRIVATE -Wno-format) endif()
# msi_winetest.rc: let rc.exe find custom.dll in its subdirectory, i.e. Debug. diff --git a/modules/rostests/winetests/msi/action.c b/modules/rostests/winetests/msi/action.c index b5b80efe63e..24881d87636 100644 --- a/modules/rostests/winetests/msi/action.c +++ b/modules/rostests/winetests/msi/action.c @@ -2475,7 +2475,7 @@ static void remove_restore_point(DWORD seq_number)
res = pSRRemoveRestorePoint(seq_number); if (res != ERROR_SUCCESS) - trace("Failed to remove the restore point : %08x\n", res); + trace("Failed to remove the restore point : %#lx\n", res); }
static LONG delete_key( HKEY key, LPCSTR subkey, REGSAM access ) @@ -2516,8 +2516,8 @@ static void check_reg_str(HKEY prodkey, LPCSTR name, LPCSTR expected, BOOL bcase size = MAX_PATH; val[0] = '\0'; res = RegQueryValueExA(prodkey, name, NULL, &type, (BYTE *)val, &size); - ok_(__FILE__, line)(!res, "Failed to query value, error %u\n", res); - ok_(__FILE__, line)(type == REG_SZ || type == REG_EXPAND_SZ, "Got wrong type %u\n", type); + ok_(__FILE__, line)(!res, "Failed to query value, error %ld\n", res); + ok_(__FILE__, line)(type == REG_SZ || type == REG_EXPAND_SZ, "Got wrong type %lu\n", type); todo_wine_if (todo) { if (bcase) @@ -2541,9 +2541,9 @@ static void check_reg_multi(HKEY prodkey, const char *name, const char *expect, size = MAX_PATH; val[0] = '\0'; res = RegQueryValueExA(prodkey, name, NULL, &type, (BYTE *)val, &size); - ok_(__FILE__, line)(!res, "Failed to query value, error %u\n", res); - ok_(__FILE__, line)(type == REG_MULTI_SZ, "Got wrong type %u\n", type); - ok_(__FILE__, line)(size == expect_size, "expected size %u, got %u\n", expect_size, size); + ok_(__FILE__, line)(!res, "Failed to query value, error %ld\n", res); + ok_(__FILE__, line)(type == REG_MULTI_SZ, "Got wrong type %lu\n", type); + ok_(__FILE__, line)(size == expect_size, "expected size %lu, got %lu\n", expect_size, size); ok_(__FILE__, line)(!memcmp(val, expect, size), "got %s\n", debugstr_an(val, size)); }
@@ -2554,10 +2554,10 @@ static void check_reg_dword(HKEY prodkey, LPCSTR name, DWORD expected, BOOL todo
size = sizeof(DWORD); res = RegQueryValueExA(prodkey, name, NULL, &type, (BYTE *)&val, &size); - ok_(__FILE__, line)(!res, "Failed to query value, error %u\n", res); - ok_(__FILE__, line)(type == REG_DWORD, "Got wrong type %u\n", type); + ok_(__FILE__, line)(!res, "Failed to query value, error %ld\n", res); + ok_(__FILE__, line)(type == REG_DWORD, "Got wrong type %lu\n", type); todo_wine_if (todo) - ok_(__FILE__, line)(val == expected, "Expected %d, got %d\n", expected, val); + ok_(__FILE__, line)(val == expected, "Expected %lu, got %lu\n", expected, val); }
#define CHECK_REG_STR(prodkey, name, expected) \ @@ -2644,7 +2644,7 @@ static void extract_resource(const char *name, const char *type, const char *pat void *ptr;
file = CreateFileA(path, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); - ok(file != INVALID_HANDLE_VALUE, "file creation failed, at %s, error %d\n", path, GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "file creation failed, at %s, error %lu\n", path, GetLastError());
res = FindResourceA(NULL, name, type); ok( res != 0, "couldn't find resource\n" ); @@ -2703,10 +2703,10 @@ static void test_register_product(void) ok(delete_pf("msitest", FALSE), "Directory not created\n");
res = RegOpenKeyA(HKEY_CURRENT_USER, userugkey, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, uninstall, 0, KEY_READ | KEY_WOW64_32KEY, &hkey); - ok(!res, "got %d\n", res); + ok(!res, "got %ld\n", res);
CHECK_DEL_REG_STR(hkey, "DisplayName", "MSITEST"); CHECK_DEL_REG_STR(hkey, "DisplayVersion", "1.1.1"); @@ -2734,15 +2734,15 @@ static void test_register_product(void) CHECK_DEL_REG_DWORD_TODO(hkey, "EstimatedSize", get_estimated_size());
res = RegDeleteKeyA(hkey, ""); - ok(!res, "got %d\n", res); + ok(!res, "got %ld\n", res); RegCloseKey(hkey);
sprintf(keypath, userdata, usersid); res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, KEY_ALL_ACCESS | KEY_WOW64_64KEY, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegOpenKeyExA(hkey, "InstallProperties", 0, KEY_READ, &props); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
size = sizeof(path); RegQueryValueExA(props, "LocalPackage", NULL, &type, (LPBYTE)path, &size); @@ -2775,43 +2775,43 @@ static void test_register_product(void) CHECK_DEL_REG_DWORD_TODO(props, "EstimatedSize", get_estimated_size());
res = RegDeleteKeyA(props, ""); - ok(!res, "got %d\n", res); + ok(!res, "got %ld\n", res); RegCloseKey(props);
res = RegOpenKeyExA(hkey, "Usage", 0, KEY_READ, &usage); todo_wine { - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); }
res = RegDeleteKeyA(usage, ""); todo_wine - ok(!res, "got %d\n", res); + ok(!res, "got %ld\n", res); RegCloseKey(usage); res = RegDeleteKeyA(hkey, ""); - ok(!res, "got %d\n", res); + ok(!res, "got %ld\n", res); RegCloseKey(hkey);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ugkey, 0, KEY_READ | KEY_WOW64_64KEY, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", "");
res = RegDeleteKeyA(hkey, ""); - ok(!res, "got %d\n", res); + ok(!res, "got %ld\n", res); RegCloseKey(hkey);
/* RegisterProduct, machine */ r = MsiInstallProductA(msifile, "REGISTER_PRODUCT=1 ALLUSERS=1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); ok(delete_pf("msitest\maximus", TRUE), "File not installed\n"); ok(delete_pf("msitest", FALSE), "Directory not created\n");
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, userugkey, 0, KEY_READ | KEY_WOW64_64KEY, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, uninstall, 0, KEY_READ | KEY_WOW64_32KEY, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_DEL_REG_STR(hkey, "DisplayName", "MSITEST"); CHECK_DEL_REG_STR(hkey, "DisplayVersion", "1.1.1"); @@ -2839,15 +2839,15 @@ static void test_register_product(void) CHECK_DEL_REG_DWORD_TODO(hkey, "EstimatedSize", get_estimated_size());
res = RegDeleteKeyA(hkey, ""); - ok(!res, "got %d\n", res); + ok(!res, "got %ld\n", res); RegCloseKey(hkey);
sprintf(keypath, userdata, "S-1-5-18"); res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, KEY_READ | KEY_WOW64_64KEY, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegOpenKeyExA(hkey, "InstallProperties", 0, KEY_READ, &props); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
size = sizeof(path); RegQueryValueExA(props, "LocalPackage", NULL, &type, (LPBYTE)path, &size); @@ -2880,30 +2880,30 @@ static void test_register_product(void) CHECK_DEL_REG_DWORD_TODO(props, "EstimatedSize", get_estimated_size());
res = RegDeleteKeyA(props, ""); - ok(!res, "got %d\n", res); + ok(!res, "got %ld\n", res); RegCloseKey(props);
res = RegOpenKeyExA(hkey, "Usage", 0, KEY_READ, &usage); todo_wine { - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); }
res = RegDeleteKeyA(usage, ""); todo_wine - ok(!res, "got %d\n", res); + ok(!res, "got %ld\n", res); RegCloseKey(usage); res = RegDeleteKeyA(hkey, ""); - ok(!res, "got %d\n", res); + ok(!res, "got %ld\n", res); RegCloseKey(hkey);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ugkey, 0, KEY_READ | KEY_WOW64_64KEY, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", "");
res = RegDeleteKeyA(hkey, ""); - ok(!res, "got %d\n", res); + ok(!res, "got %ld\n", res); RegCloseKey(hkey);
if (is_wow64 || is_64bit) @@ -2917,13 +2917,13 @@ static void test_register_product(void) ok(delete_pf("msitest", FALSE), "Directory not created\n");
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, userugkey, 0, KEY_READ | KEY_WOW64_64KEY, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, uninstall, 0, KEY_READ | KEY_WOW64_32KEY, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, uninstall, 0, KEY_READ | KEY_WOW64_64KEY, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_DEL_REG_STR(hkey, "DisplayName", "MSITEST"); CHECK_DEL_REG_STR(hkey, "DisplayVersion", "1.1.1"); @@ -2951,15 +2951,15 @@ static void test_register_product(void) CHECK_DEL_REG_DWORD_TODO(hkey, "EstimatedSize", get_estimated_size());
res = RegDeleteKeyA(hkey, ""); - ok(!res, "got %d\n", res); + ok(!res, "got %ld\n", res); RegCloseKey(hkey);
sprintf(keypath, userdata, "S-1-5-18"); res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, KEY_READ | KEY_WOW64_64KEY, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegOpenKeyExA(hkey, "InstallProperties", 0, KEY_READ, &props); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
size = sizeof(path); RegQueryValueExA(props, "LocalPackage", NULL, &type, (LPBYTE)path, &size); @@ -2992,30 +2992,30 @@ static void test_register_product(void) CHECK_DEL_REG_DWORD_TODO(props, "EstimatedSize", get_estimated_size());
res = RegDeleteKeyA(props, ""); - ok(!res, "got %d\n", res); + ok(!res, "got %ld\n", res); RegCloseKey(props);
res = RegOpenKeyExA(hkey, "Usage", 0, KEY_READ, &usage); todo_wine { - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); }
res = RegDeleteKeyA(usage, ""); todo_wine - ok(!res, "got %d\n", res); + ok(!res, "got %ld\n", res); RegCloseKey(usage); res = RegDeleteKeyA(hkey, ""); - ok(!res, "got %d\n", res); + ok(!res, "got %ld\n", res); RegCloseKey(hkey);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ugkey, 0, KEY_READ | KEY_WOW64_64KEY, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", "");
res = RegDeleteKeyA(hkey, ""); - ok(!res, "got %d\n", res); + ok(!res, "got %ld\n", res); RegCloseKey(hkey); } else @@ -3088,7 +3088,7 @@ static void test_publish_product(void) ok(delete_pf("msitest", FALSE), "Directory not created\n");
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, badprod, 0, access, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
sprintf(keypath, prodpath, usersid); res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey); @@ -3108,13 +3108,13 @@ static void test_publish_product(void) return; } } - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegOpenKeyExA(hkey, "InstallProperties", 0, access, &props); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
res = RegOpenKeyExA(hkey, "Patches", 0, access, &patches); - todo_wine ok(!res, "Expected ERROR_SUCCESS, got %d\n", res); + todo_wine ok(!res, "Expected ERROR_SUCCESS, got %ld\n", res); if (!res) CHECK_DEL_REG_STR(patches, "AllPatches", "");
@@ -3125,7 +3125,7 @@ static void test_publish_product(void)
currentuser: res = RegOpenKeyA(HKEY_CURRENT_USER, cuprodpath, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_DEL_REG_STR(hkey, "ProductName", "MSITEST"); CHECK_DEL_REG_STR(hkey, "PackageCode", "AC75740029052C94DA02821EECD05F2F"); @@ -3139,7 +3139,7 @@ currentuser: CHECK_DEL_REG_MULTI(hkey, "Clients", ":\0");
res = RegOpenKeyA(hkey, "SourceList", &sourcelist); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
lstrcpyA(path, "n;1;"); lstrcatA(path, temp); @@ -3147,7 +3147,7 @@ currentuser: CHECK_DEL_REG_STR(sourcelist, "PackageName", "msitest.msi");
res = RegOpenKeyA(sourcelist, "Net", &net); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_DEL_REG_STR(net, "1", temp);
@@ -3155,7 +3155,7 @@ currentuser: RegCloseKey(net);
res = RegOpenKeyA(sourcelist, "Media", &media); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_DEL_REG_STR(media, "1", "DISK1;");
@@ -3167,7 +3167,7 @@ currentuser: RegCloseKey(hkey);
res = RegOpenKeyA(HKEY_CURRENT_USER, cuupgrades, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", "");
@@ -3183,17 +3183,17 @@ currentuser: ok(delete_pf("msitest", FALSE), "Directory not created\n");
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, badprod, 0, access, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
sprintf(keypath, prodpath, "S-1-5-18"); res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegOpenKeyExA(hkey, "InstallProperties", 0, access, &props); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
res = RegOpenKeyExA(hkey, "Patches", 0, access, &patches); - todo_wine ok(!res, "Expected ERROR_SUCCESS, got %d\n", res); + todo_wine ok(!res, "Expected ERROR_SUCCESS, got %ld\n", res); if (!res) CHECK_DEL_REG_STR(patches, "AllPatches", "");
@@ -3204,7 +3204,7 @@ currentuser:
machprod: res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, machprod, 0, access, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_DEL_REG_STR(hkey, "ProductName", "MSITEST"); CHECK_DEL_REG_STR(hkey, "PackageCode", "AC75740029052C94DA02821EECD05F2F"); @@ -3218,7 +3218,7 @@ machprod: CHECK_DEL_REG_MULTI(hkey, "Clients", ":\0");
res = RegOpenKeyExA(hkey, "SourceList", 0, access, &sourcelist); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
lstrcpyA(path, "n;1;"); lstrcatA(path, temp); @@ -3226,36 +3226,36 @@ machprod: CHECK_DEL_REG_STR(sourcelist, "PackageName", "msitest.msi");
res = RegOpenKeyExA(sourcelist, "Net", 0, access, &net); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_DEL_REG_STR(net, "1", temp);
res = delete_key(net, "", access); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); RegCloseKey(net);
res = RegOpenKeyExA(sourcelist, "Media", 0, access, &media); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_DEL_REG_STR(media, "1", "DISK1;");
res = delete_key(media, "", access); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); RegCloseKey(media); res = delete_key(sourcelist, "", access); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); RegCloseKey(sourcelist); res = delete_key(hkey, "", access); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); RegCloseKey(hkey);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, machup, 0, access, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", "");
res = delete_key(hkey, "", access); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); RegCloseKey(hkey);
error: @@ -3317,13 +3317,13 @@ static void test_publish_features(void) ok(delete_pf("msitest", FALSE), "Directory not created\n");
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, featkey, 0, access, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, classfeat, 0, access, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
res = RegOpenKeyA(HKEY_CURRENT_USER, cupath, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_STR(hkey, "feature", ""); CHECK_REG_STR(hkey, "montecristo", ""); @@ -3335,7 +3335,7 @@ static void test_publish_features(void)
sprintf(keypath, udfeatpath, usersid); res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_STR(hkey, "feature", "VGtfp^p+,?82@JU1j_KE"); CHECK_REG_STR(hkey, "montecristo", "VGtfp^p+,?82@JU1j_KE"); @@ -3354,12 +3354,12 @@ static void test_publish_features(void) ok(delete_pf("msitest", FALSE), "Directory not created\n");
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, featkey, 0, access, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
res = RegOpenKeyA(HKEY_CURRENT_USER, cupath, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res); res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, classfeat, 0, access, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_STR(hkey, "feature", ""); CHECK_REG_STR(hkey, "montecristo", ""); @@ -3371,7 +3371,7 @@ static void test_publish_features(void)
sprintf(keypath, udfeatpath, "S-1-5-18"); res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_STR(hkey, "feature", "VGtfp^p+,?82@JU1j_KE"); CHECK_REG_STR(hkey, "montecristo", "VGtfp^p+,?82@JU1j_KE"); @@ -3504,7 +3504,7 @@ static void test_register_user(void)
sprintf(keypath, keypropsfmt, usersid); res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &props); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_STR(props, "ProductID", "none"); CHECK_REG_STR(props, "RegCompany", company); @@ -3526,7 +3526,7 @@ static void test_register_user(void)
sprintf(keypath, keypropsfmt, "S-1-5-18"); res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &props); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_STR(props, "ProductID", "none"); CHECK_REG_STR(props, "RegCompany", company); @@ -3598,12 +3598,12 @@ static void test_process_components(void)
sprintf(keypath, keyfmt, usersid, "CBABC2FDCCB35E749A8944D8C1C098B5"); res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &comp); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
size = MAX_PATH; res = RegQueryValueExA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB", NULL, NULL, (LPBYTE)val, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
lstrcpyA(program_files_maximus,PROG_FILES_DIR); lstrcatA(program_files_maximus,"\msitest\maximus"); @@ -3612,7 +3612,7 @@ static void test_process_components(void) "Expected "%s", got "%s"\n", program_files_maximus, val);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, compkey, 0, access, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
RegDeleteValueA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB"); delete_key(comp, "", access); @@ -3620,17 +3620,17 @@ static void test_process_components(void)
sprintf(keypath, keyfmt, usersid, "241C3DA58FECD0945B9687D408766058"); res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &comp); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
size = MAX_PATH; res = RegQueryValueExA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB", NULL, NULL, (LPBYTE)val, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); ok(!lstrcmpA(val, "01\msitest\augustus"), "Expected "01\msitest\augustus", got "%s"\n", val);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, compkey, 0, access, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
RegDeleteValueA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB"); delete_key(comp, "", access); @@ -3644,17 +3644,17 @@ static void test_process_components(void)
sprintf(keypath, keyfmt, "S-1-5-18", "CBABC2FDCCB35E749A8944D8C1C098B5"); res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &comp); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
size = MAX_PATH; res = RegQueryValueExA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB", NULL, NULL, (LPBYTE)val, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); ok(!lstrcmpiA(val, program_files_maximus), "Expected "%s", got "%s"\n", program_files_maximus, val);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, compkey, 0, access, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
RegDeleteValueA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB"); delete_key(comp, "", access); @@ -3662,17 +3662,17 @@ static void test_process_components(void)
sprintf(keypath, keyfmt, "S-1-5-18", "241C3DA58FECD0945B9687D408766058"); res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &comp); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
size = MAX_PATH; res = RegQueryValueExA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB", NULL, NULL, (LPBYTE)val, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); ok(!lstrcmpA(val, "01\msitest\augustus"), "Expected "01\msitest\augustus", got "%s"\n", val);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, compkey, 0, access, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
RegDeleteValueA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB"); delete_key(comp, "", access); @@ -3715,12 +3715,12 @@ static void test_publish(void) access |= KEY_WOW64_64KEY;
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, subkey, 0, KEY_ALL_ACCESS, &uninstall); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
if (is_64bit) { res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, subkey_32node, 0, KEY_ALL_ACCESS, &uninstall_32node); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); }
CreateDirectoryA("msitest", NULL); @@ -3742,7 +3742,7 @@ static void test_publish(void) error = GetLastError(); ok(r == ERROR_UNKNOWN_PRODUCT, "got %u\n", r); ok(state == 0xdead, "got %d\n", state); - ok(error == 0xdeadbeef, "got %u\n", error); + ok(error == 0xdeadbeef, "got %lu\n", error);
state = 0xdead; SetLastError(0xdeadbeef); @@ -3750,7 +3750,7 @@ static void test_publish(void) error = GetLastError(); ok(r == ERROR_UNKNOWN_PRODUCT, "got %u\n", r); ok(state == 0xdead, "got %d\n", state); - ok(error == ERROR_SUCCESS, "got %u\n", error); + ok(error == ERROR_SUCCESS, "got %lu\n", error);
state = 0xdead; SetLastError(0xdeadbeef); @@ -3758,7 +3758,7 @@ static void test_publish(void) error = GetLastError(); ok(r == ERROR_UNKNOWN_PRODUCT, "got %u\n", r); ok(state == 0xdead, "got %d\n", state); - ok(error == ERROR_SUCCESS, "got %u\n", error); + ok(error == ERROR_SUCCESS, "got %lu\n", error);
state = MsiQueryFeatureStateA(prodcode, "feature"); ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); @@ -3772,7 +3772,7 @@ static void test_publish(void) ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
res = RegOpenKeyExA(uninstall, prodcode, 0, access, &prodkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
/* nothing published */ r = MsiInstallProductA(msifile, NULL); @@ -3800,7 +3800,7 @@ static void test_publish(void) ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
res = RegOpenKeyExA(uninstall, prodcode, 0, access, &prodkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
/* PublishProduct and RegisterProduct */ r = MsiInstallProductA(msifile, "REGISTER_PRODUCT=1 PUBLISH_PRODUCT=1"); @@ -3825,14 +3825,14 @@ static void test_publish(void) if (is_64bit) { res = RegOpenKeyExA(uninstall_32node, prodcode, 0, KEY_ALL_ACCESS, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); } else { res = RegOpenKeyExA(uninstall, prodcode, 0, access, &prodkey); if (is_wow64 && res == ERROR_FILE_NOT_FOUND) /* XP - Vista, Wow64 */ res = RegOpenKeyExA(uninstall, prodcode, 0, KEY_ALL_ACCESS, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); }
CHECK_REG_STR(prodkey, "DisplayName", "MSITEST"); @@ -3882,7 +3882,7 @@ static void test_publish(void) ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
res = RegOpenKeyExA(uninstall, prodcode, 0, access, &prodkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
/* complete install */ r = MsiInstallProductA(msifile, "FULL=1"); @@ -3902,7 +3902,7 @@ static void test_publish(void) error = GetLastError(); ok(r == ERROR_UNKNOWN_PRODUCT, "got %u\n", r); ok(state == 0xdead, "got %d\n", state); - ok(error == 0xdeadbeef, "got %u\n", error); + ok(error == 0xdeadbeef, "got %lu\n", error);
state = 0xdead; SetLastError(0xdeadbeef); @@ -3910,7 +3910,7 @@ static void test_publish(void) error = GetLastError(); ok(r == ERROR_UNKNOWN_PRODUCT, "got %u\n", r); ok(state == 0xdead, "got %d\n", state); - ok(error == ERROR_SUCCESS, "got %u\n", error); + ok(error == ERROR_SUCCESS, "got %lu\n", error);
state = 0xdead; SetLastError(0xdeadbeef); @@ -3918,7 +3918,7 @@ static void test_publish(void) error = GetLastError(); ok(r == ERROR_SUCCESS, "got %u\n", r); ok(state == INSTALLSTATE_LOCAL, "got %d\n", state); - ok(error == ERROR_SUCCESS, "got %u\n", error); + ok(error == ERROR_SUCCESS, "got %lu\n", error);
state = MsiQueryFeatureStateA(prodcode, "montecristo"); ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); @@ -3931,12 +3931,12 @@ static void test_publish(void) if (is_64bit) { res = RegOpenKeyExA(uninstall_32node, prodcode, 0, KEY_ALL_ACCESS, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); } else { res = RegOpenKeyExA(uninstall, prodcode, 0, KEY_ALL_ACCESS, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); }
CHECK_REG_STR(prodkey, "DisplayName", "MSITEST"); @@ -3987,7 +3987,7 @@ static void test_publish(void) ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
res = RegOpenKeyExA(uninstall, prodcode, 0, access, &prodkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
/* complete install */ r = MsiInstallProductA(msifile, "FULL=1"); @@ -4012,12 +4012,12 @@ static void test_publish(void) if (is_64bit) { res = RegOpenKeyExA(uninstall_32node, prodcode, 0, KEY_ALL_ACCESS, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); } else { res = RegOpenKeyExA(uninstall, prodcode, 0, KEY_ALL_ACCESS, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); }
CHECK_REG_STR(prodkey, "DisplayName", "MSITEST"); @@ -4070,12 +4070,12 @@ static void test_publish(void) if (is_64bit) { res = RegOpenKeyExA(uninstall_32node, prodcode, 0, KEY_ALL_ACCESS, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); } else { res = RegOpenKeyExA(uninstall, prodcode, 0, KEY_ALL_ACCESS, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); }
CHECK_REG_STR(prodkey, "DisplayName", "MSITEST"); @@ -4128,12 +4128,12 @@ static void test_publish(void) if (is_64bit) { res = RegOpenKeyExA(uninstall_32node, prodcode, 0, KEY_ALL_ACCESS, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); } else { res = RegOpenKeyExA(uninstall, prodcode, 0, KEY_ALL_ACCESS, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); }
CHECK_REG_STR(prodkey, "DisplayName", "MSITEST"); @@ -4184,7 +4184,7 @@ static void test_publish(void) ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
res = RegOpenKeyExA(uninstall, prodcode, 0, access, &prodkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
/* complete install */ r = MsiInstallProductA(msifile, "FULL=1"); @@ -4209,12 +4209,12 @@ static void test_publish(void) if (is_64bit) { res = RegOpenKeyExA(uninstall_32node, prodcode, 0, KEY_ALL_ACCESS, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); } else { res = RegOpenKeyExA(uninstall, prodcode, 0, KEY_ALL_ACCESS, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); }
CHECK_REG_STR(prodkey, "DisplayName", "MSITEST"); @@ -4265,7 +4265,7 @@ static void test_publish(void) ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
res = RegOpenKeyExA(uninstall, prodcode, 0, access, &prodkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
/* make sure 'Program Files\msitest' is removed */ delete_pfmsitest_files(); @@ -4320,7 +4320,7 @@ static void test_publish_sourcelist(void) r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAMEA, value, &size); ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size); + ok(size == MAX_PATH, "got %lu\n", size); ok(!lstrcmpA(value, "aaa"), "Expected "aaa", got "%s"\n", value);
size = MAX_PATH; @@ -4328,7 +4328,7 @@ static void test_publish_sourcelist(void) r = pMsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size); + ok(size == MAX_PATH, "got %lu\n", size); ok(!lstrcmpA(value, "aaa"), "Expected "aaa", got "%s"\n", value);
r = MsiInstallProductA(msifile, "REGISTER_PRODUCT=1"); @@ -4342,7 +4342,7 @@ static void test_publish_sourcelist(void) r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAMEA, value, &size); ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size); + ok(size == MAX_PATH, "got %lu\n", size); ok(!lstrcmpA(value, "aaa"), "Expected "aaa", got "%s"\n", value);
size = MAX_PATH; @@ -4350,7 +4350,7 @@ static void test_publish_sourcelist(void) r = pMsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size); + ok(size == MAX_PATH, "got %lu\n", size); ok(!lstrcmpA(value, "aaa"), "Expected "aaa", got "%s"\n", value);
r = MsiInstallProductA(msifile, "PROCESS_COMPONENTS=1"); @@ -4364,7 +4364,7 @@ static void test_publish_sourcelist(void) r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAMEA, value, &size); ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size); + ok(size == MAX_PATH, "got %lu\n", size); ok(!lstrcmpA(value, "aaa"), "Expected "aaa", got "%s"\n", value);
size = MAX_PATH; @@ -4372,7 +4372,7 @@ static void test_publish_sourcelist(void) r = pMsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size); + ok(size == MAX_PATH, "got %lu\n", size); ok(!lstrcmpA(value, "aaa"), "Expected "aaa", got "%s"\n", value);
r = MsiInstallProductA(msifile, "PUBLISH_FEATURES=1"); @@ -4386,7 +4386,7 @@ static void test_publish_sourcelist(void) r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAMEA, value, &size); ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size); + ok(size == MAX_PATH, "got %lu\n", size); ok(!lstrcmpA(value, "aaa"), "Expected "aaa", got "%s"\n", value);
size = MAX_PATH; @@ -4394,7 +4394,7 @@ static void test_publish_sourcelist(void) r = pMsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size); + ok(size == MAX_PATH, "got %lu\n", size); ok(!lstrcmpA(value, "aaa"), "Expected "aaa", got "%s"\n", value);
r = MsiInstallProductA(msifile, "PUBLISH_PRODUCT=1"); @@ -4409,7 +4409,7 @@ static void test_publish_sourcelist(void) MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAMEA, value, &size); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(!lstrcmpA(value, "msitest.msi"), "Expected 'msitest.msi', got %s\n", value); - ok(size == 11, "Expected 11, got %d\n", size); + ok(size == 11, "Expected 11, got %lu\n", size);
size = MAX_PATH; lstrcpyA(value, "aaa"); @@ -4417,7 +4417,7 @@ static void test_publish_sourcelist(void) MSICODE_PRODUCT, INSTALLPROPERTY_MEDIAPACKAGEPATHA, value, &size); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(!lstrcmpA(value, ""), "Expected "", got "%s"\n", value); - ok(size == 0, "Expected 0, got %d\n", size); + ok(size == 0, "Expected 0, got %lu\n", size);
size = MAX_PATH; lstrcpyA(value, "aaa"); @@ -4425,7 +4425,7 @@ static void test_publish_sourcelist(void) MSICODE_PRODUCT, INSTALLPROPERTY_DISKPROMPTA, value, &size); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(!lstrcmpA(value, ""), "Expected "", got "%s"\n", value); - ok(size == 0, "Expected 0, got %d\n", size); + ok(size == 0, "Expected 0, got %lu\n", size);
lstrcpyA(path, CURR_DIR); lstrcatA(path, "\"); @@ -4436,7 +4436,7 @@ static void test_publish_sourcelist(void) MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDSOURCEA, value, &size); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(!lstrcmpA(value, path), "Expected "%s", got "%s"\n", path, value); - ok(size == lstrlenA(path), "Expected %d, got %d\n", lstrlenA(path), size); + ok(size == lstrlenA(path), "Expected %d, got %lu\n", lstrlenA(path), size);
size = MAX_PATH; lstrcpyA(value, "aaa"); @@ -4444,7 +4444,7 @@ static void test_publish_sourcelist(void) MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDTYPEA, value, &size); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(!lstrcmpA(value, "n"), "Expected "n", got "%s"\n", value); - ok(size == 1, "Expected 1, got %d\n", size); + ok(size == 1, "Expected 1, got %lu\n", size);
size = MAX_PATH; lstrcpyA(value, "aaa"); @@ -4452,7 +4452,7 @@ static void test_publish_sourcelist(void) MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); + ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
size = MAX_PATH; lstrcpyA(value, "aaa"); @@ -4460,7 +4460,7 @@ static void test_publish_sourcelist(void) MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(!lstrcmpA(value, path), "Expected "%s", got "%s"\n", path, value); - ok(size == lstrlenA(path), "Expected %d, got %d\n", lstrlenA(path), size); + ok(size == lstrlenA(path), "Expected %d, got %lu\n", lstrlenA(path), size);
size = MAX_PATH; lstrcpyA(value, "aaa"); @@ -4468,7 +4468,7 @@ static void test_publish_sourcelist(void) MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 1, value, &size); ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); + ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
/* complete uninstall */ r = MsiInstallProductA(msifile, "FULL=1 REMOVE=ALL"); @@ -4826,28 +4826,28 @@ static void test_write_registry_values(void) MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL);
res = RegCreateKeyA(HKEY_CURRENT_USER, "msitest", &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(hkey, "Value1", 0, REG_MULTI_SZ, (const BYTE *)"two\0", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); res = RegSetValueExA(hkey, "Value2", 0, REG_MULTI_SZ, (const BYTE *)"one\0", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); res = RegSetValueExA(hkey, "Value3", 0, REG_MULTI_SZ, (const BYTE *)"two\0", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); res = RegSetValueExA(hkey, "Value4", 0, REG_MULTI_SZ, (const BYTE *)"one\0", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); res = RegSetValueExA(hkey, "Value5", 0, REG_MULTI_SZ, (const BYTE *)"one\0two\0", 9); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); res = RegSetValueExA(hkey, "Value6", 0, REG_MULTI_SZ, (const BYTE *)"one\0", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); res = RegSetValueExA(hkey, "Value7", 0, REG_SZ, (const BYTE *)"one", 4); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(hkey, "instremove", 0, REG_SZ, (const BYTE *)"val", 3); - ok(!res, "got %u\n", res); + ok(!res, "got %ld\n", res);
res = RegCreateKeyA(hkey, "instremove", &subkey); - ok(!res, "got %u\n", res); + ok(!res, "got %ld\n", res); RegCloseKey(subkey);
r = MsiInstallProductA(msifile, NULL); @@ -4864,21 +4864,21 @@ static void test_write_registry_values(void)
size = sizeof(buf); res = RegQueryValueExA(hkey, "expandsz", NULL, &type, (BYTE *)buf, &size); - ok(!res, "got %u\n", res); - ok(type == REG_EXPAND_SZ, "got %d\n", type); + ok(!res, "got %ld\n", res); + ok(type == REG_EXPAND_SZ, "got %ld\n", type); ok(!strcmp(buf, "string"), "got %s\n", buf);
size = sizeof(buf); res = RegQueryValueExA(hkey, "binary", NULL, &type, (BYTE *)buf, &size); - ok(!res, "got %u\n", res); - ok(type == REG_BINARY, "got %d\n", type); - ok(size == 4, "got size %u\n", size); + ok(!res, "got %ld\n", res); + ok(type == REG_BINARY, "got %ld\n", type); + ok(size == 4, "got size %lu\n", size); ok(!memcmp(buf, "\x01\x23\x45\x67", 4), "wrong data\n");
CHECK_REG_STR(hkey, "", "default");
res = RegOpenKeyA(hkey, "VisualStudio", &subkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); RegCloseKey(subkey);
CHECK_REG_MULTI(hkey, "Value1", "one\0"); @@ -4893,55 +4893,55 @@ static void test_write_registry_values(void) CHECK_REG_DWORD(hkey, "source", 1);
res = RegOpenKeyA(hkey, "subkey", &subkey); - ok(!res, "got %u\n", res); + ok(!res, "got %ld\n", res); res = RegQueryValueExA(subkey, "", NULL, NULL, NULL, NULL); - ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res); RegCloseKey(subkey);
res = RegOpenKeyA(hkey, "create", &subkey); - ok(!res, "got %u\n", res); + ok(!res, "got %ld\n", res); RegCloseKey(subkey);
res = RegOpenKeyA(hkey, "delete", &subkey); - ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res); res = RegCreateKeyA(hkey, "delete", &subkey); - ok(!res, "got %u\n", res); + ok(!res, "got %ld\n", res); RegCloseKey(subkey);
res = RegQueryValueExA(hkey, "instremove", NULL, NULL, NULL, NULL); - ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res); res = RegOpenKeyA(hkey, "instremove", &subkey); - ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
r = MsiInstallProductA(msifile, "REMOVE=ALL"); ok(!r, "got %u\n", r);
res = RegQueryValueExA(hkey, "sz", NULL, NULL, NULL, NULL); - ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res); res = RegQueryValueExA(hkey, "multisz", NULL, NULL, NULL, NULL); - ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res); res = RegQueryValueExA(hkey, "dword", NULL, NULL, NULL, NULL); - ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res); res = RegQueryValueExA(hkey, "expandsz", NULL, NULL, NULL, NULL); - ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res); res = RegQueryValueExA(hkey, "binary", NULL, NULL, NULL, NULL); - ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res); res = RegQueryValueExA(hkey, "", NULL, NULL, NULL, NULL); - ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
res = RegOpenKeyA(hkey, "VisualStudio", &subkey); - ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
res = RegQueryValueExA(hkey, "Value1", NULL, NULL, NULL, NULL); - ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res); res = RegQueryValueExA(hkey, "Value4", NULL, NULL, NULL, NULL); - ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res); res = RegQueryValueExA(hkey, "Value5", NULL, NULL, NULL, NULL); - ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res); res = RegQueryValueExA(hkey, "Value6", NULL, NULL, NULL, NULL); - ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res); res = RegQueryValueExA(hkey, "Value7", NULL, NULL, NULL, NULL); - ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
todo_wine { CHECK_REG_MULTI(hkey, "Value2", "one\0"); @@ -4949,25 +4949,25 @@ todo_wine { }
res = RegQueryValueExA(hkey, "format", NULL, NULL, NULL, NULL); - ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res); res = RegQueryValueExA(hkey, "source", NULL, NULL, NULL, NULL); - ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
res = RegOpenKeyA(hkey, "subkey", &subkey); - ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
res = RegOpenKeyA(hkey, "create", &subkey); - ok(!res, "got %u\n", res); + ok(!res, "got %ld\n", res); RegCloseKey(subkey); res = RegDeleteKeyA(hkey, "create"); - ok(!res, "got %u\n", res); + ok(!res, "got %ld\n", res);
res = RegOpenKeyA(hkey, "delete", &subkey); - ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
RegCloseKey(hkey); res = RegDeleteKeyA(HKEY_CURRENT_USER, "msitest"); - ok(!res, "got %u\n", res); + ok(!res, "got %ld\n", res);
error: DeleteFileA(msifile); @@ -4990,20 +4990,20 @@ static void test_envvar(void) create_database(msifile, env_tables, ARRAY_SIZE(env_tables));
res = RegCreateKeyExA(HKEY_CURRENT_USER, "Environment", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &env, NULL); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Control\Session Manager\Environment", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &env2, NULL); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(env, "MSITESTVAR1", 0, REG_SZ, (const BYTE *)"0", 2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(env, "MSITESTVAR2", 0, REG_SZ, (const BYTE *)"0", 2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(env, "MSITESTVAR21", 0, REG_SZ, (const BYTE *)"1", 2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL);
@@ -5021,22 +5021,22 @@ static void test_envvar(void) CHECK_REG_STR(env, "MSITESTVAR4", "1");
res = RegDeleteValueA(env, "MSITESTVAR5"); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
res = RegDeleteValueA(env, "MSITESTVAR6"); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
res = RegDeleteValueA(env, "MSITESTVAR7"); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
res = RegDeleteValueA(env, "MSITESTVAR8"); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
res = RegDeleteValueA(env, "MSITESTVAR9"); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
res = RegDeleteValueA(env, "MSITESTVAR10"); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
CHECK_REG_STR(env, "MSITESTVAR11", "1;2"); CHECK_REG_STR(env, "MSITESTVAR12", "1"); @@ -5053,13 +5053,13 @@ static void test_envvar(void) CHECK_REG_STR(env2, "MSITESTVAR100", "1");
res = RegSetValueExA(env, "MSITESTVAR22", 0, REG_SZ, (const BYTE *)"1", 2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(env, "MSITESTVAR23", 0, REG_SZ, (const BYTE *)"1", 2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegDeleteValueA(env, "MSITESTVAR25"); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
r = MsiInstallProductA(msifile, "REMOVE=ALL"); ok(!r, "got %u\n", r); @@ -5076,11 +5076,11 @@ static void test_envvar(void) { sprintf(buffer, "MSITESTVAR%i", i); res = RegDeleteValueA(env, buffer); - ok(res == ERROR_FILE_NOT_FOUND, "[%d] got %u\n", i, res); + ok(res == ERROR_FILE_NOT_FOUND, "[%d] got %ld\n", i, res); }
res = RegDeleteValueA(env2, "MSITESTVAR100"); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
error: RegDeleteValueA(env, "MSITESTVAR1"); @@ -5168,7 +5168,7 @@ static void test_start_stop_services(void) CloseServiceHandle(scm); return; } - ok(service != NULL, "Failed to open Spooler, error %d\n", GetLastError()); + ok(service != NULL, "Failed to open Spooler, error %lu\n", GetLastError()); if (!service) { CloseServiceHandle(scm); return; @@ -5202,7 +5202,7 @@ static void test_start_stop_services(void) service = OpenServiceA(scm, "Spooler", SC_MANAGER_ALL_ACCESS);
ret = ControlService(service, SERVICE_CONTROL_STOP, &status); - ok(ret, "ControlService failed %u\n", GetLastError()); + ok(ret, "ControlService failed %lu\n", GetLastError());
CloseServiceHandle(service); CloseServiceHandle(scm); @@ -5233,7 +5233,7 @@ static void test_start_stop_services(void) service = OpenServiceA(scm, "Spooler", SC_MANAGER_ALL_ACCESS);
ret = ControlService(service, SERVICE_CONTROL_STOP, &status); - ok(ret, "ControlService failed %u\n", GetLastError()); + ok(ret, "ControlService failed %lu\n", GetLastError());
CloseServiceHandle(service); CloseServiceHandle(scm); @@ -5256,7 +5256,7 @@ static void delete_test_service(const char *name) if (service) { ret = DeleteService( service ); - ok( ret, "failed to delete service %u\n", GetLastError() ); + ok( ret, "failed to delete service %lu\n", GetLastError() ); CloseServiceHandle(service); } CloseServiceHandle(manager); @@ -5275,13 +5275,13 @@ static void test_delete_services(void) }
manager = OpenSCManagerA(NULL, NULL, SC_MANAGER_ALL_ACCESS); - ok(manager != NULL, "can't open service manager %u\n", GetLastError()); + ok(manager != NULL, "can't open service manager %lu\n", GetLastError()); if (!manager) return;
service = CreateServiceA(manager, "TestService3", "TestService3", SERVICE_ALL_ACCESS, SERVICE_WIN32_OWN_PROCESS, SERVICE_DEMAND_START, SERVICE_ERROR_NORMAL, "C:\doesnt_exist.exe", NULL, NULL, NULL, NULL, NULL); - ok(service != NULL, "can't create service %u\n", GetLastError()); + ok(service != NULL, "can't create service %lu\n", GetLastError()); CloseServiceHandle(service); CloseServiceHandle(manager); if (!service) return; @@ -5306,7 +5306,7 @@ static void test_delete_services(void) service = OpenServiceA(manager, "TestService3", GENERIC_ALL); error = GetLastError(); ok(service == NULL, "TestService3 not deleted\n"); - ok(error == ERROR_SERVICE_DOES_NOT_EXIST, "wrong error %u\n", error); + ok(error == ERROR_SERVICE_DOES_NOT_EXIST, "wrong error %lu\n", error); CloseServiceHandle(manager);
r = MsiInstallProductA(msifile, "REMOVE=ALL"); @@ -5373,7 +5373,7 @@ static void test_install_services(void) ok(service == NULL, "TestService4 installed\n");
res = RegOpenKeyA(HKEY_LOCAL_MACHINE, "SYSTEM\CurrentControlSet\Services\TestService", &hKey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
if (res == ERROR_SUCCESS) { @@ -5381,7 +5381,7 @@ static void test_install_services(void) err_controltype = REG_DWORD; err_controlsize = sizeof(err_control); res = RegQueryValueExA(hKey, "ErrorControl", NULL, &err_controltype, (LPBYTE)&err_control, &err_controlsize); - ok(err_control == 0, "TestService.ErrorControl wrong, expected 0, got %u\n", err_control); + ok(err_control == 0, "TestService.ErrorControl wrong, expected 0, got %lu\n", err_control); RegCloseKey(hKey); }
@@ -5494,7 +5494,7 @@ static void test_register_font(void) RegOpenKeyExA(HKEY_LOCAL_MACHINE, regfont2, 0, access, &key);
ret = RegQueryValueExA(key, "msi test font", NULL, NULL, NULL, NULL); - ok(ret != ERROR_FILE_NOT_FOUND, "unexpected result %d\n", ret); + ok(ret != ERROR_FILE_NOT_FOUND, "unexpected result %ld\n", ret);
r = MsiInstallProductA(msifile, "REMOVE=ALL"); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); @@ -5502,7 +5502,7 @@ static void test_register_font(void) ok(!delete_pf("msitest", FALSE), "directory not removed\n");
ret = RegQueryValueExA(key, "msi test font", NULL, NULL, NULL, NULL); - ok(ret == ERROR_FILE_NOT_FOUND, "unexpected result %d\n", ret); + ok(ret == ERROR_FILE_NOT_FOUND, "unexpected result %ld\n", ret);
RegDeleteValueA(key, "msi test font"); RegCloseKey(key); @@ -5682,14 +5682,14 @@ static void test_register_typelib(void) ok(r == ERROR_SUCCESS, "got %u\n", r);
hr = LoadRegTypeLib(&LIBID_register_test, 7, 1, 0, &tlb); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); ITypeLib_Release(tlb);
r = MsiInstallProductA(msifile, "REMOVE=ALL"); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
hr = LoadRegTypeLib(&LIBID_register_test, 7, 1, 0, &tlb); - ok(hr == TYPE_E_LIBNOTREGISTERED, "got %#x\n", hr); + ok(hr == TYPE_E_LIBNOTREGISTERED, "got %#lx\n", hr);
ok(!delete_pf("msitest\typelib.dll", TRUE), "file not removed\n"); ok(!delete_pf("msitest", FALSE), "directory not removed\n"); @@ -5779,24 +5779,24 @@ static void test_publish_components(void) ok(r == ERROR_SUCCESS, "MsiProvideQualifiedComponent returned %d\n", r);
res = RegOpenKeyA(HKEY_CURRENT_USER, keypath, &key); - ok(res == ERROR_SUCCESS, "components key not created %d\n", res); + ok(res == ERROR_SUCCESS, "components key not created %ld\n", res);
res = RegQueryValueExA(key, "english.txt", NULL, NULL, NULL, &size); - ok(res == ERROR_SUCCESS, "value not found %d\n", res); + ok(res == ERROR_SUCCESS, "value not found %ld\n", res);
data = malloc(size); res = RegQueryValueExA(key, "english.txt", NULL, NULL, data, &size); - ok(res == ERROR_SUCCESS, "value not found %d\n", res); + ok(res == ERROR_SUCCESS, "value not found %ld\n", res); RegCloseKey(key);
res = RegDeleteKeyA(HKEY_CURRENT_USER, keypath); - ok(res == ERROR_SUCCESS, "RegDeleteKey failed %d\n", res); + ok(res == ERROR_SUCCESS, "RegDeleteKey failed %ld\n", res);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath2, 0, NULL, REG_OPTION_NON_VOLATILE, MAXIMUM_ALLOWED | KEY_WOW64_64KEY, NULL, &key, NULL ); - ok(res == ERROR_SUCCESS, "RegCreateKeyEx failed %d\n", res); + ok(res == ERROR_SUCCESS, "RegCreateKeyEx failed %ld\n", res); res = RegSetValueExA(key, "english.txt", 0, REG_MULTI_SZ, data, size); - ok(res == ERROR_SUCCESS, "RegSetValueEx failed %d\n", res); + ok(res == ERROR_SUCCESS, "RegSetValueEx failed %ld\n", res); RegCloseKey(key);
size = 0; @@ -5808,13 +5808,13 @@ static void test_publish_components(void) res = pRegDeleteKeyExA(HKEY_LOCAL_MACHINE, keypath2, KEY_WOW64_64KEY, 0); else res = RegDeleteKeyA(HKEY_LOCAL_MACHINE, keypath2); - ok(res == ERROR_SUCCESS, "RegDeleteKey failed %d\n", res); + ok(res == ERROR_SUCCESS, "RegDeleteKey failed %ld\n", res);
res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &key); - ok(res == ERROR_SUCCESS, "RegCreateKey failed %d\n", res); + ok(res == ERROR_SUCCESS, "RegCreateKey failed %ld\n", res);
res = RegSetValueExA(key, "english.txt", 0, REG_MULTI_SZ, data, size); - ok(res == ERROR_SUCCESS, "RegSetValueEx failed %d\n", res); + ok(res == ERROR_SUCCESS, "RegSetValueEx failed %ld\n", res); free(data); RegCloseKey(key);
@@ -5822,7 +5822,7 @@ static void test_publish_components(void) ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
res = RegOpenKeyA(HKEY_CURRENT_USER, keypath, &key); - ok(res == ERROR_FILE_NOT_FOUND, "unexpected result %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "unexpected result %ld\n", res);
ok(!delete_pf("msitest\english.txt", TRUE), "file not removed\n"); ok(!delete_pf("msitest", FALSE), "directory not removed\n"); @@ -5954,7 +5954,7 @@ static void test_ini_values(void) CloseHandle(file);
ret = WritePrivateProfileStringA("sectionA", "keyA", "valueA", inifile); - ok(ret, "failed to write profile string %u\n", GetLastError()); + ok(ret, "failed to write profile string %lu\n", GetLastError());
MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL);
@@ -5962,19 +5962,19 @@ static void test_ini_values(void) ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
len = GetPrivateProfileStringA("section1", "key1", NULL, buf, sizeof(buf), inifile); - ok(len == 6, "got %u expected 6\n", len); + ok(len == 6, "got %lu expected 6\n", len);
len = GetPrivateProfileStringA("sectionA", "keyA", NULL, buf, sizeof(buf), inifile); - ok(!len, "got %u expected 0\n", len); + ok(!len, "got %lu expected 0\n", len);
r = MsiInstallProductA(msifile, "REMOVE=ALL"); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
len = GetPrivateProfileStringA("section1", "key1", NULL, buf, sizeof(buf), inifile); - ok(!len, "got %u expected 0\n", len); + ok(!len, "got %lu expected 0\n", len);
len = GetPrivateProfileStringA("sectionA", "keyA", NULL, buf, sizeof(buf), inifile); - ok(!len, "got %u expected 0\n", len); + ok(!len, "got %lu expected 0\n", len);
todo_wine ok(!delete_pf("msitest\test.ini", TRUE), "file removed\n"); ok(!delete_pf("msitest\inifile.txt", TRUE), "file not removed\n"); @@ -6363,31 +6363,31 @@ static void test_publish_assemblies(void) ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
res = RegOpenKeyA(HKEY_CURRENT_USER, path_dotnet, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); CHECK_REG_MULTI(hkey, name_dotnet, "rcHQPHq?CA@Uv-XqMI1e>Z'q,T*76M@=YEg6My?~]\0"); RegCloseKey(hkey);
path = (is_wow64 || is_64bit) ? path_dotnet_local_wow64 : path_dotnet_local; res = RegOpenKeyA(HKEY_CURRENT_USER, path, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); CHECK_REG_MULTI(hkey, name_dotnet_local, "rcHQPHq?CA@Uv-XqMI1e>LF,8A?0d.AW@vcZ$Cgox\0"); RegCloseKey(hkey);
res = RegOpenKeyA(HKEY_CURRENT_USER, path_win32, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); CHECK_REG_MULTI(hkey, name_win32, "rcHQPHq?CA@Uv-XqMI1e>}NJjwR'%D9v1p!v{WV(%\0"); RegCloseKey(hkey);
path = (is_wow64 || is_64bit) ? path_win32_local_wow64 : path_win32_local; res = RegOpenKeyA(HKEY_CURRENT_USER, path, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); CHECK_REG_MULTI(hkey, name_win32_local, "rcHQPHq?CA@Uv-XqMI1e>C)Uvlj*53A)u(QQ9=)X!\0"); RegCloseKey(hkey);
/* No registration is done for a local assembly with no matching file */ path = (is_wow64 || is_64bit) ? path_fake_local_wow64 : path_fake_local; res = RegOpenKeyA(HKEY_CURRENT_USER, path, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
r = MsiInstallProductA(msifile, "REMOVE=ALL"); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); @@ -6396,25 +6396,25 @@ static void test_publish_assemblies(void) if (res == ERROR_SUCCESS) { res = RegDeleteValueA(hkey, name_dotnet); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res); RegCloseKey(hkey); }
path = (is_wow64 || is_64bit) ? path_dotnet_local_wow64 : path_dotnet_local; res = RegOpenKeyA(HKEY_CURRENT_USER, path, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
res = RegOpenKeyA(HKEY_CURRENT_USER, path_win32, &hkey); if (res == ERROR_SUCCESS) { res = RegDeleteValueA(hkey, name_win32); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res); RegCloseKey(hkey); }
path = (is_wow64 || is_64bit) ? path_win32_local_wow64 : path_win32_local; res = RegOpenKeyA(HKEY_CURRENT_USER, path, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
r = MsiInstallProductA(msifile, "ALLUSERS=1"); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); @@ -6427,31 +6427,31 @@ static void test_publish_assemblies(void) access = KEY_QUERY_VALUE | KEY_WOW64_64KEY; res = RegOpenKeyExA(HKEY_CLASSES_ROOT, classes_path_dotnet, 0, access, &hkey); } - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); CHECK_REG_MULTI(hkey, name_dotnet, "rcHQPHq?CA@Uv-XqMI1e>Z'q,T*76M@=YEg6My?~]\0"); RegCloseKey(hkey);
path = (is_wow64 || is_64bit) ? classes_path_dotnet_local_wow64 : classes_path_dotnet_local; res = RegOpenKeyExA(HKEY_CLASSES_ROOT, path, 0, access, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); CHECK_REG_MULTI(hkey, name_dotnet_local, "rcHQPHq?CA@Uv-XqMI1e>LF,8A?0d.AW@vcZ$Cgox\0"); RegCloseKey(hkey);
res = RegOpenKeyExA(HKEY_CLASSES_ROOT, classes_path_win32, 0, access, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); CHECK_REG_MULTI(hkey, name_win32, "rcHQPHq?CA@Uv-XqMI1e>}NJjwR'%D9v1p!v{WV(%\0"); RegCloseKey(hkey);
path = (is_wow64 || is_64bit) ? classes_path_win32_local_wow64 : classes_path_win32_local; res = RegOpenKeyExA(HKEY_CLASSES_ROOT, path, 0, access, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); CHECK_REG_MULTI(hkey, name_win32_local, "rcHQPHq?CA@Uv-XqMI1e>C)Uvlj*53A)u(QQ9=)X!\0"); RegCloseKey(hkey);
/* No registration is done for a local assembly with no matching file */ path = (is_wow64 || is_64bit) ? classes_path_fake_local_wow64 : classes_path_fake_local; res = RegOpenKeyExA(HKEY_CLASSES_ROOT, path, 0, access, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
r = MsiInstallProductA(msifile, "REMOVE=ALL ALLUSERS=1"); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); @@ -6460,25 +6460,25 @@ static void test_publish_assemblies(void) if (res == ERROR_SUCCESS) { res = RegDeleteValueA(hkey, name_dotnet); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res); RegCloseKey(hkey); }
path = (is_wow64 || is_64bit) ? classes_path_dotnet_local_wow64 : classes_path_dotnet_local; res = RegOpenKeyA(HKEY_CLASSES_ROOT, path, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
res = RegOpenKeyA(HKEY_CLASSES_ROOT, classes_path_win32, &hkey); if (res == ERROR_SUCCESS) { res = RegDeleteValueA(hkey, name_win32); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res); RegCloseKey(hkey); }
path = (is_wow64 || is_64bit) ? classes_path_win32_local_wow64 : classes_path_win32_local; res = RegOpenKeyA(HKEY_CLASSES_ROOT, path, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
done: DeleteFileA("msitest\win32.txt"); diff --git a/modules/rostests/winetests/msi/automation.c b/modules/rostests/winetests/msi/automation.c index bd040b153da..bc79701c707 100644 --- a/modules/rostests/winetests/msi/automation.c +++ b/modules/rostests/winetests/msi/automation.c @@ -347,7 +347,7 @@ static BOOL create_package(LPWSTR path)
len = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, CURR_DIR, -1, path, MAX_PATH); - ok(len, "MultiByteToWideChar returned error %d\n", GetLastError()); + ok(len, "MultiByteToWideChar returned error %lu\n", GetLastError()); if (!len) return FALSE;
@@ -585,32 +585,32 @@ static void test_dispid(void) { dispid = get_dispid(pInstaller, ptr->name); todo_wine_if (ptr->todo) - ok(dispid == ptr->did, "%s: expected %d, got %d\n", ptr->name, ptr->did, dispid); + ok(dispid == ptr->did, "%s: expected %ld, got %ld\n", ptr->name, ptr->did, dispid); ptr++; }
dispid = get_dispid(pInstaller, "RemovePatches"); - ok(dispid == 49 || dispid == -1, "Expected 49 or -1, got %d\n", dispid); + ok(dispid == 49 || dispid == -1, "Expected 49 or -1, got %ld\n", dispid); dispid = get_dispid(pInstaller, "ApplyMultiplePatches"); - ok(dispid == 51 || dispid == -1, "Expected 51 or -1, got %d\n", dispid); + ok(dispid == 51 || dispid == -1, "Expected 51 or -1, got %ld\n", dispid); dispid = get_dispid(pInstaller, "ProductsEx"); - ok(dispid == 52 || dispid == -1, "Expected 52 or -1, got %d\n", dispid); + ok(dispid == 52 || dispid == -1, "Expected 52 or -1, got %ld\n", dispid); dispid = get_dispid(pInstaller, "PatchesEx"); - ok(dispid == 55 || dispid == -1, "Expected 55 or -1, got %d\n", dispid); + ok(dispid == 55 || dispid == -1, "Expected 55 or -1, got %ld\n", dispid); dispid = get_dispid(pInstaller, "ExtractPatchXMLData"); - ok(dispid == 57 || dispid == -1, "Expected 57 or -1, got %d\n", dispid); + ok(dispid == 57 || dispid == -1, "Expected 57 or -1, got %ld\n", dispid); dispid = get_dispid( pInstaller, "ProductElevated" ); - ok(dispid == 59 || dispid == -1, "Expected 59 or -1, got %d\n", dispid); + ok(dispid == 59 || dispid == -1, "Expected 59 or -1, got %ld\n", dispid); dispid = get_dispid( pInstaller, "ProvideAssembly" ); - ok(dispid == 60 || dispid == -1, "Expected 60 or -1, got %d\n", dispid); + ok(dispid == 60 || dispid == -1, "Expected 60 or -1, got %ld\n", dispid); dispid = get_dispid( pInstaller, "ProductInfoFromScript" ); - ok(dispid == 61 || dispid == -1, "Expected 61 or -1, got %d\n", dispid); + ok(dispid == 61 || dispid == -1, "Expected 61 or -1, got %ld\n", dispid); dispid = get_dispid( pInstaller, "AdvertiseProduct" ); - ok(dispid == 62 || dispid == -1, "Expected 62 or -1, got %d\n", dispid); + ok(dispid == 62 || dispid == -1, "Expected 62 or -1, got %ld\n", dispid); dispid = get_dispid( pInstaller, "CreateAdvertiseScript" ); - ok(dispid == 63 || dispid == -1, "Expected 63 or -1, got %d\n", dispid); + ok(dispid == 63 || dispid == -1, "Expected 63 or -1, got %ld\n", dispid); dispid = get_dispid( pInstaller, "PatchFiles" ); - ok(dispid == 65 || dispid == -1, "Expected 65 or -1, got %d\n", dispid); + ok(dispid == 65 || dispid == -1, "Expected 65 or -1, got %ld\n", dispid); }
/* Test basic IDispatch functions */ @@ -627,16 +627,16 @@ static void test_dispatch(void) /* Test getting ID of a function name that does not exist */ name = (WCHAR *)L"winetest-automation.msi"; hr = IDispatch_GetIDsOfNames(pInstaller, &IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &dispid); - ok(hr == DISP_E_UNKNOWNNAME, "IDispatch::GetIDsOfNames returned 0x%08x\n", hr); + ok(hr == DISP_E_UNKNOWNNAME, "IDispatch::GetIDsOfNames returned %#lx\n", hr);
/* Test invoking this function */ hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, NULL, NULL, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned %#lx\n", hr);
/* Test getting ID of a function name that does exist */ name = (WCHAR *)L"OpenPackage"; hr = IDispatch_GetIDsOfNames(pInstaller, &IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &dispid); - ok(hr == S_OK, "IDispatch::GetIDsOfNames returned 0x%08x\n", hr); + ok(hr == S_OK, "IDispatch::GetIDsOfNames returned %#lx\n", hr);
/* Test invoking this function (without parameters passed) */ if (0) /* All of these crash MSI on Windows XP */ @@ -649,21 +649,21 @@ static void test_dispatch(void)
/* Try with NULL params */ hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned 0x%08x\n", hr); + ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned %#lx\n", hr);
/* Try one empty parameter */ dispparams.rgvarg = vararg; dispparams.cArgs = 1; VariantInit(&vararg[0]); hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned 0x%08x\n", hr); + ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned %#lx\n", hr);
/* Try two empty parameters */ dispparams.cArgs = 2; VariantInit(&vararg[0]); VariantInit(&vararg[1]); hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned 0x%08x\n", hr); + ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned %#lx\n", hr);
/* Try one parameter, the required BSTR. Second parameter is optional. * NOTE: The specified package does not exist, which is why the call fails. @@ -673,7 +673,7 @@ static void test_dispatch(void) V_VT(&vararg[0]) = VT_BSTR; V_BSTR(&vararg[0]) = SysAllocString(L"winetest-automation.msi"); hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_EXCEPTION, "IDispatch::Invoke returned 0x%08x\n", hr); + ok(hr == DISP_E_EXCEPTION, "IDispatch::Invoke returned %#lx\n", hr); ok_exception(hr, L"OpenPackage,PackagePath,Options"); VariantClear(&vararg[0]);
@@ -686,7 +686,7 @@ static void test_dispatch(void) V_BSTR(&vararg[1]) = SysAllocString(L"winetest-automation.msi"); VariantInit(&vararg[0]); hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_EXCEPTION, "IDispatch::Invoke returned 0x%08x\n", hr); + ok(hr == DISP_E_EXCEPTION, "IDispatch::Invoke returned %#lx\n", hr); ok_exception(hr, L"OpenPackage,PackagePath,Options"); VariantClear(&vararg[1]);
@@ -700,7 +700,7 @@ static void test_dispatch(void) VariantInit(&vararg[1]); VariantInit(&vararg[0]); hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_EXCEPTION, "IDispatch::Invoke returned 0x%08x\n", hr); + ok(hr == DISP_E_EXCEPTION, "IDispatch::Invoke returned %#lx\n", hr); ok_exception(hr, L"OpenPackage,PackagePath,Options"); VariantClear(&vararg[2]);
@@ -713,7 +713,7 @@ static void test_dispatch(void) V_VT(&vararg[0]) = VT_BSTR; V_BSTR(&vararg[0]) = SysAllocString(L"winetest-automation.msi"); hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned 0x%08x\n", hr); + ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned %#lx\n", hr); VariantClear(&vararg[0]); VariantClear(&vararg[1]);
@@ -728,7 +728,7 @@ static void test_dispatch(void) V_VT(&vararg[0]) = VT_BSTR; V_BSTR(&vararg[0]) = SysAllocString(L"winetest-automation.msi"); hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - todo_wine ok(hr == DISP_E_EXCEPTION, "IDispatch::Invoke returned 0x%08x\n", hr); + todo_wine ok(hr == DISP_E_EXCEPTION, "IDispatch::Invoke returned %#lx\n", hr); ok_exception(hr, L"OpenPackage,PackagePath,Options"); VariantClear(&vararg[0]); if (hr != DISP_E_EXCEPTION) @@ -748,7 +748,7 @@ static void test_dispatch(void) DeleteFileW(path); return; } - ok(hr == S_OK, "IDispatch::Invoke returned 0x%08x\n", hr); + ok(hr == S_OK, "IDispatch::Invoke returned %#lx\n", hr); VariantClear(&vararg[0]); VariantClear(&varresult);
@@ -761,7 +761,7 @@ static void test_dispatch(void) V_BSTR(&vararg[1]) = SysAllocString(path); VariantInit(&vararg[0]); hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == S_OK, "IDispatch::Invoke returned 0x%08x\n", hr); + ok(hr == S_OK, "IDispatch::Invoke returned %#lx\n", hr); VariantClear(&vararg[1]); VariantClear(&varresult);
@@ -775,7 +775,7 @@ static void test_dispatch(void) VariantInit(&vararg[1]); VariantInit(&vararg[0]); hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == S_OK, "IDispatch::Invoke returned 0x%08x\n", hr); + ok(hr == S_OK, "IDispatch::Invoke returned %#lx\n", hr); VariantClear(&vararg[2]); VariantClear(&varresult);
@@ -788,7 +788,7 @@ static void test_dispatch(void) V_VT(&vararg[0]) = VT_BSTR; V_BSTR(&vararg[0]) = SysAllocString(path); hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned 0x%08x\n", hr); + ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned %#lx\n", hr); VariantClear(&vararg[0]); VariantClear(&vararg[1]);
@@ -803,7 +803,7 @@ static void test_dispatch(void) V_VT(&vararg[0]) = VT_I2; V_BSTR(&vararg[0]) = 0; hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == S_OK, "IDispatch::Invoke returned 0x%08x\n", hr); + ok(hr == S_OK, "IDispatch::Invoke returned %#lx\n", hr); VariantClear(&vararg[1]); VariantClear(&varresult);
@@ -812,26 +812,26 @@ static void test_dispatch(void) /* Test invoking a method as a DISPATCH_PROPERTYGET or DISPATCH_PROPERTYPUT */ VariantInit(&vararg[0]); hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned %#lx\n", hr);
VariantInit(&vararg[0]); hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYPUT, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned %#lx\n", hr);
/* Test invoking a read-only property as DISPATCH_PROPERTYPUT or as a DISPATCH_METHOD */ name = (WCHAR *)L"ProductState"; hr = IDispatch_GetIDsOfNames(pInstaller, &IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &dispid); - ok(hr == S_OK, "IDispatch::GetIDsOfNames returned 0x%08x\n", hr); + ok(hr == S_OK, "IDispatch::GetIDsOfNames returned %#lx\n", hr);
dispparams.rgvarg = NULL; dispparams.cArgs = 0; hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYPUT, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned %#lx\n", hr);
dispparams.rgvarg = NULL; dispparams.cArgs = 0; hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned %#lx\n", hr); }
/* invocation helper function */ @@ -854,7 +854,7 @@ static HRESULT invoke(IDispatch *pDispatch, LPCSTR szName, WORD wFlags, DISPPARA MultiByteToWideChar(CP_ACP, 0, szName, -1, name, len ); hr = IDispatch_GetIDsOfNames(pDispatch, &IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &dispid); free(name); - ok(hr == S_OK, "IDispatch::GetIDsOfNames returned 0x%08x\n", hr); + ok(hr == S_OK, "IDispatch::GetIDsOfNames returned %#lx\n", hr); if (hr != S_OK) return hr;
memset(&excepinfo, 0, sizeof(excepinfo)); @@ -867,7 +867,7 @@ static HRESULT invoke(IDispatch *pDispatch, LPCSTR szName, WORD wFlags, DISPPARA if (vtResult != VT_EMPTY) { hr = VariantChangeTypeEx(pVarResult, pVarResult, LOCALE_NEUTRAL, 0, vtResult); - ok(hr == S_OK, "VariantChangeTypeEx returned 0x%08x\n", hr); + ok(hr == S_OK, "VariantChangeTypeEx returned %#lx\n", hr); } }
@@ -1588,7 +1588,7 @@ static void test_SummaryInfo(IDispatch *pSummaryInfo, const msi_summary_info *in
/* SummaryInfo::PropertyCount */ hr = SummaryInfo_PropertyCountGet(pSummaryInfo, &j); - ok(hr == S_OK, "SummaryInfo_PropertyCount failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "SummaryInfo_PropertyCount failed, hresult %#lx\n", hr); ok(j == num_info, "SummaryInfo_PropertyCount returned %d, expected %d\n", j, num_info);
/* SummaryInfo::Property, get for properties we have set */ @@ -1602,11 +1602,11 @@ static void test_SummaryInfo(IDispatch *pSummaryInfo, const msi_summary_info *in else if (vt == VT_I2) vt = VT_I4;
hr = SummaryInfo_PropertyGet(pSummaryInfo, entry->property, &varresult, vt); - ok(hr == S_OK, "SummaryInfo_Property (pid %d) failed, hresult 0x%08x\n", entry->property, hr); + ok(hr == S_OK, "SummaryInfo_Property (pid %d) failed, hresult %#lx\n", entry->property, hr); if (V_VT(&varresult) != vt) skip("Skipping property tests due to type mismatch\n"); else if (vt == VT_I4) - ok(V_I4(&varresult) == entry->iValue, "SummaryInfo_Property (pid %d) I4 result expected to be %d, but was %d\n", + ok(V_I4(&varresult) == entry->iValue, "SummaryInfo_Property (pid %d) I4 result expected to be %d, but was %ld\n", entry->property, entry->iValue, V_I4(&varresult)); else if (vt == VT_DATE) { @@ -1632,32 +1632,32 @@ static void test_SummaryInfo(IDispatch *pSummaryInfo, const msi_summary_info *in
/* Invalid pids */ hr = SummaryInfo_PropertyGet(pSummaryInfo, -1, &varresult, VT_EMPTY); - ok(hr == DISP_E_EXCEPTION, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr); + ok(hr == DISP_E_EXCEPTION, "SummaryInfo_PropertyGet failed, hresult %#lx\n", hr); ok_exception(hr, L"Property,Pid");
hr = SummaryInfo_PropertyGet(pSummaryInfo, 1000, &varresult, VT_EMPTY); - ok(hr == DISP_E_EXCEPTION, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr); + ok(hr == DISP_E_EXCEPTION, "SummaryInfo_PropertyGet failed, hresult %#lx\n", hr); ok_exception(hr, L"Property,Pid");
/* Unsupported pids */ hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_DICTIONARY, &varresult, VT_EMPTY); - ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult %#lx\n", hr);
hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_THUMBNAIL, &varresult, VT_EMPTY); - ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult %#lx\n", hr);
/* Pids we have not set, one for each type */ hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_CODEPAGE, &varresult, VT_EMPTY); - ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult %#lx\n", hr);
hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_TITLE, &varresult, VT_EMPTY); - ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult %#lx\n", hr);
hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_EDITTIME, &varresult, VT_EMPTY); - ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult %#lx\n", hr);
hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_CHARCOUNT, &varresult, VT_EMPTY); - ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult %#lx\n", hr);
if (!readonly) { @@ -1668,10 +1668,10 @@ static void test_SummaryInfo(IDispatch *pSummaryInfo, const msi_summary_info *in V_VT(&var) = VT_I2; V_I2(&var) = 1; hr = SummaryInfo_PropertyPut(pSummaryInfo, PID_CODEPAGE, &var); - ok(hr == S_OK, "SummaryInfo_PropertyPut failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "SummaryInfo_PropertyPut failed, hresult %#lx\n", hr);
hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_CODEPAGE, &varresult, VT_I4 /* NOT VT_I2 */); - ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult %#lx\n", hr); ok(V_I2(&var) == V_I2(&varresult), "SummaryInfo_PropertyGet expected %d, but returned %d\n", V_I2(&var), V_I2(&varresult)); VariantClear(&varresult); VariantClear(&var); @@ -1680,10 +1680,10 @@ static void test_SummaryInfo(IDispatch *pSummaryInfo, const msi_summary_info *in V_VT(&var) = VT_BSTR; V_BSTR(&var) = SysAllocString(L"Title"); hr = SummaryInfo_PropertyPut(pSummaryInfo, PID_TITLE, &var); - ok(hr == S_OK, "SummaryInfo_PropertyPut failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "SummaryInfo_PropertyPut failed, hresult %#lx\n", hr);
hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_TITLE, &varresult, V_VT(&var)); - ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult %#lx\n", hr); ok_w2("SummaryInfo_PropertyGet expected %s, but returned %s\n", V_BSTR(&var), V_BSTR(&varresult)); VariantClear(&varresult); VariantClear(&var); @@ -1693,10 +1693,10 @@ static void test_SummaryInfo(IDispatch *pSummaryInfo, const msi_summary_info *in FileTimeToSystemTime(&systemtime, &st); SystemTimeToVariantTime(&st, &V_DATE(&var)); hr = SummaryInfo_PropertyPut(pSummaryInfo, PID_LASTSAVE_DTM, &var); - ok(hr == S_OK, "SummaryInfo_PropertyPut failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "SummaryInfo_PropertyPut failed, hresult %#lx\n", hr);
hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_LASTSAVE_DTM, &varresult, V_VT(&var)); - ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult %#lx\n", hr); ok(V_DATE(&var) == V_DATE(&varresult), "SummaryInfo_PropertyGet expected %lf, but returned %lf\n", V_DATE(&var), V_DATE(&varresult)); VariantClear(&varresult); VariantClear(&var); @@ -1705,17 +1705,17 @@ static void test_SummaryInfo(IDispatch *pSummaryInfo, const msi_summary_info *in V_VT(&var) = VT_I4; V_I4(&var) = 1000; hr = SummaryInfo_PropertyPut(pSummaryInfo, PID_CHARCOUNT, &var); - ok(hr == S_OK, "SummaryInfo_PropertyPut failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "SummaryInfo_PropertyPut failed, hresult %#lx\n", hr);
hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_CHARCOUNT, &varresult, V_VT(&var)); - ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr); - ok(V_I4(&var) == V_I4(&varresult), "SummaryInfo_PropertyGet expected %d, but returned %d\n", V_I4(&var), V_I4(&varresult)); + ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult %#lx\n", hr); + ok(V_I4(&var) == V_I4(&varresult), "SummaryInfo_PropertyGet expected %ld, but returned %ld\n", V_I4(&var), V_I4(&varresult)); VariantClear(&varresult); VariantClear(&var);
/* SummaryInfo::PropertyCount */ hr = SummaryInfo_PropertyCountGet(pSummaryInfo, &j); - ok(hr == S_OK, "SummaryInfo_PropertyCount failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "SummaryInfo_PropertyCount failed, hresult %#lx\n", hr); ok(j == num_info+4, "SummaryInfo_PropertyCount returned %d, expected %d\n", j, num_info); } } @@ -1726,7 +1726,7 @@ static void test_Database(IDispatch *pDatabase, BOOL readonly) HRESULT hr;
hr = Database_OpenView(pDatabase, L"SELECT `Feature` FROM `Feature` WHERE `Feature_Parent`='One'", &pView); - ok(hr == S_OK, "Database_OpenView failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Database_OpenView failed, hresult %#lx\n", hr); if (hr == S_OK) { IDispatch *pRecord = NULL; @@ -1734,55 +1734,55 @@ static void test_Database(IDispatch *pDatabase, BOOL readonly)
/* View::Execute */ hr = View_Execute(pView, NULL); - ok(hr == S_OK, "View_Execute failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "View_Execute failed, hresult %#lx\n", hr);
/* View::Fetch */ hr = View_Fetch(pView, &pRecord); - ok(hr == S_OK, "View_Fetch failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "View_Fetch failed, hresult %#lx\n", hr); ok(pRecord != NULL, "View_Fetch should not have returned NULL record\n"); if (pRecord) { /* Record::StringDataGet */ memset(szString, 0, sizeof(szString)); hr = Record_StringDataGet(pRecord, 1, szString); - ok(hr == S_OK, "Record_StringDataGet failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Record_StringDataGet failed, hresult %#lx\n", hr); ok_w2("Record_StringDataGet result was %s but expected %s\n", szString, L"Three");
/* Record::StringDataPut with correct index */ hr = Record_StringDataPut(pRecord, 1, L"Two"); - ok(hr == S_OK, "Record_StringDataPut failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Record_StringDataPut failed, hresult %#lx\n", hr);
/* Record::StringDataGet */ memset(szString, 0, sizeof(szString)); hr = Record_StringDataGet(pRecord, 1, szString); - ok(hr == S_OK, "Record_StringDataGet failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Record_StringDataGet failed, hresult %#lx\n", hr); ok_w2("Record_StringDataGet result was %s but expected %s\n", szString, L"Two");
/* Record::StringDataPut with incorrect index */ hr = Record_StringDataPut(pRecord, -1, szString); - ok(hr == DISP_E_EXCEPTION, "Record_StringDataPut failed, hresult 0x%08x\n", hr); + ok(hr == DISP_E_EXCEPTION, "Record_StringDataPut failed, hresult %#lx\n", hr); ok_exception(hr, L"StringData,Field");
/* View::Modify with incorrect parameters */ hr = View_Modify(pView, -5, NULL); - ok(hr == DISP_E_EXCEPTION, "View_Modify failed, hresult 0x%08x\n", hr); + ok(hr == DISP_E_EXCEPTION, "View_Modify failed, hresult %#lx\n", hr); ok_exception(hr, L"Modify,Mode,Record");
hr = View_Modify(pView, -5, pRecord); - ok(hr == DISP_E_EXCEPTION, "View_Modify failed, hresult 0x%08x\n", hr); + ok(hr == DISP_E_EXCEPTION, "View_Modify failed, hresult %#lx\n", hr); ok_exception(hr, L"Modify,Mode,Record");
hr = View_Modify(pView, MSIMODIFY_REFRESH, NULL); - ok(hr == DISP_E_EXCEPTION, "View_Modify failed, hresult 0x%08x\n", hr); + ok(hr == DISP_E_EXCEPTION, "View_Modify failed, hresult %#lx\n", hr); ok_exception(hr, L"Modify,Mode,Record");
hr = View_Modify(pView, MSIMODIFY_REFRESH, pRecord); - ok(hr == S_OK, "View_Modify failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "View_Modify failed, hresult %#lx\n", hr);
/* Record::StringDataGet, confirm that the record is back to its unmodified value */ memset(szString, 0, sizeof(szString)); hr = Record_StringDataGet(pRecord, 1, szString); - ok(hr == S_OK, "Record_StringDataGet failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Record_StringDataGet failed, hresult %#lx\n", hr); todo_wine ok_w2("Record_StringDataGet result was %s but expected %s\n", szString, L"Three");
IDispatch_Release(pRecord); @@ -1790,14 +1790,14 @@ static void test_Database(IDispatch *pDatabase, BOOL readonly)
/* View::Fetch */ hr = View_Fetch(pView, &pRecord); - ok(hr == S_OK, "View_Fetch failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "View_Fetch failed, hresult %#lx\n", hr); ok(pRecord != NULL, "View_Fetch should not have returned NULL record\n"); if (pRecord) { /* Record::StringDataGet */ memset(szString, 0, sizeof(szString)); hr = Record_StringDataGet(pRecord, 1, szString); - ok(hr == S_OK, "Record_StringDataGet failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Record_StringDataGet failed, hresult %#lx\n", hr); ok_w2("Record_StringDataGet result was %s but expected %s\n", szString, L"Two");
IDispatch_Release(pRecord); @@ -1805,21 +1805,21 @@ static void test_Database(IDispatch *pDatabase, BOOL readonly)
/* View::Fetch */ hr = View_Fetch(pView, &pRecord); - ok(hr == S_OK, "View_Fetch failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "View_Fetch failed, hresult %#lx\n", hr); ok(pRecord == NULL, "View_Fetch should have returned NULL record\n"); if (pRecord) IDispatch_Release(pRecord);
/* View::Close */ hr = View_Close(pView); - ok(hr == S_OK, "View_Close failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "View_Close failed, hresult %#lx\n", hr);
IDispatch_Release(pView); }
/* Database::SummaryInformation */ hr = Database_SummaryInformation(pDatabase, TEST_SUMMARYINFO_PROPERTIES_MODIFIED, &pSummaryInfo); - ok(hr == S_OK, "Database_SummaryInformation failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Database_SummaryInformation failed, hresult %#lx\n", hr); ok(pSummaryInfo != NULL, "Database_SummaryInformation should not have returned NULL record\n"); if (pSummaryInfo) { @@ -1841,93 +1841,93 @@ static void test_Session(IDispatch *pSession)
/* Session::Installer */ hr = Session_Installer(pSession, &pInst); - ok(hr == S_OK, "Session_Installer failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Session_Installer failed, hresult %#lx\n", hr); ok(pInst != NULL, "Session_Installer returned NULL IDispatch pointer\n"); ok(pInst == pInstaller, "Session_Installer does not match Installer instance from CoCreateInstance\n"); refs_before = IDispatch_AddRef(pInst);
hr = Session_Installer(pSession, &pInst); - ok(hr == S_OK, "Session_Installer failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Session_Installer failed, hresult %#lx\n", hr); ok(pInst != NULL, "Session_Installer returned NULL IDispatch pointer\n"); ok(pInst == pInstaller, "Session_Installer does not match Installer instance from CoCreateInstance\n"); refs_after = IDispatch_Release(pInst); - ok(refs_before == refs_after, "got %u and %u\n", refs_before, refs_after); + ok(refs_before == refs_after, "got %lu and %lu\n", refs_before, refs_after);
/* Session::Property, get */ memset(stringw, 0, sizeof(stringw)); hr = Session_PropertyGet(pSession, L"ProductName", stringw); - ok(hr == S_OK, "Session_PropertyGet failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Session_PropertyGet failed, hresult %#lx\n", hr); if (lstrcmpW(stringw, L"MSITEST") != 0) { len = WideCharToMultiByte(CP_ACP, 0, stringw, -1, string, MAX_PATH, NULL, NULL); - ok(len, "WideCharToMultiByteChar returned error %d\n", GetLastError()); + ok(len, "WideCharToMultiByteChar returned error %lu\n", GetLastError()); ok(0, "Property "ProductName" expected to be "MSITEST" but was "%s"\n", string); }
/* Session::Property, put */ hr = Session_PropertyPut(pSession, L"ProductName", L"ProductName"); - ok(hr == S_OK, "Session_PropertyPut failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Session_PropertyPut failed, hresult %#lx\n", hr); memset(stringw, 0, sizeof(stringw)); hr = Session_PropertyGet(pSession, L"ProductName", stringw); - ok(hr == S_OK, "Session_PropertyGet failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Session_PropertyGet failed, hresult %#lx\n", hr); if (lstrcmpW(stringw, L"ProductName") != 0) { len = WideCharToMultiByte(CP_ACP, 0, stringw, -1, string, MAX_PATH, NULL, NULL); - ok(len, "WideCharToMultiByteChar returned error %d\n", GetLastError()); + ok(len, "WideCharToMultiByteChar returned error %lu\n", GetLastError()); ok(0, "Property "ProductName" expected to be "ProductName" but was "%s"\n", string); }
/* Try putting a property using empty property identifier */ hr = Session_PropertyPut(pSession, L"", L"ProductName"); - ok(hr == DISP_E_EXCEPTION, "Session_PropertyPut failed, hresult 0x%08x\n", hr); + ok(hr == DISP_E_EXCEPTION, "Session_PropertyPut failed, hresult %#lx\n", hr); ok_exception(hr, L"Property,Name");
/* Try putting a property using illegal property identifier */ hr = Session_PropertyPut(pSession, L"=", L"ProductName"); - ok(hr == S_OK, "Session_PropertyPut failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Session_PropertyPut failed, hresult %#lx\n", hr);
/* Session::Language, get */ hr = Session_LanguageGet(pSession, &len); - ok(hr == S_OK, "Session_LanguageGet failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Session_LanguageGet failed, hresult %#lx\n", hr); /* Not sure how to check the language is correct */
/* Session::Mode, get */ hr = Session_ModeGet(pSession, MSIRUNMODE_REBOOTATEND, &bool); - ok(hr == S_OK, "Session_ModeGet failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Session_ModeGet failed, hresult %#lx\n", hr); ok(!bool, "Reboot at end session mode is %d\n", bool);
hr = Session_ModeGet(pSession, MSIRUNMODE_MAINTENANCE, &bool); - ok(hr == S_OK, "Session_ModeGet failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Session_ModeGet failed, hresult %#lx\n", hr); ok(!bool, "Maintenance mode is %d\n", bool);
/* Session::Mode, put */ hr = Session_ModePut(pSession, MSIRUNMODE_REBOOTATEND, VARIANT_TRUE); - ok(hr == S_OK, "Session_ModePut failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Session_ModePut failed, hresult %#lx\n", hr); hr = Session_ModeGet(pSession, MSIRUNMODE_REBOOTATEND, &bool); - ok(hr == S_OK, "Session_ModeGet failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Session_ModeGet failed, hresult %#lx\n", hr); ok(bool, "Reboot at end session mode is %d, expected 1\n", bool); hr = Session_ModePut(pSession, MSIRUNMODE_REBOOTATEND, VARIANT_FALSE); /* set it again so we don't reboot */ - ok(hr == S_OK, "Session_ModePut failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Session_ModePut failed, hresult %#lx\n", hr);
hr = Session_ModePut(pSession, MSIRUNMODE_REBOOTNOW, VARIANT_TRUE); - ok(hr == S_OK, "Session_ModePut failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Session_ModePut failed, hresult %#lx\n", hr); ok_exception(hr, L"Mode,Flag");
hr = Session_ModeGet(pSession, MSIRUNMODE_REBOOTNOW, &bool); - ok(hr == S_OK, "Session_ModeGet failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Session_ModeGet failed, hresult %#lx\n", hr); ok(bool, "Reboot now mode is %d, expected 1\n", bool);
hr = Session_ModePut(pSession, MSIRUNMODE_REBOOTNOW, VARIANT_FALSE); /* set it again so we don't reboot */ - ok(hr == S_OK, "Session_ModePut failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Session_ModePut failed, hresult %#lx\n", hr); ok_exception(hr, L"Mode,Flag");
hr = Session_ModePut(pSession, MSIRUNMODE_MAINTENANCE, VARIANT_TRUE); - ok(hr == DISP_E_EXCEPTION, "Session_ModePut failed, hresult 0x%08x\n", hr); + ok(hr == DISP_E_EXCEPTION, "Session_ModePut failed, hresult %#lx\n", hr); ok_exception(hr, L"Mode,Flag");
/* Session::Database, get */ hr = Session_Database(pSession, &pDatabase); - ok(hr == S_OK, "Session_Database failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Session_Database failed, hresult %#lx\n", hr); if (hr == S_OK) { test_Database(pDatabase, TRUE); @@ -1936,61 +1936,61 @@ static void test_Session(IDispatch *pSession)
/* Session::EvaluateCondition */ hr = Session_EvaluateCondition(pSession, NULL, &myint); - ok(hr == S_OK, "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Session_EvaluateCondition failed, hresult %#lx\n", hr); ok(myint == MSICONDITION_NONE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN);
hr = Session_EvaluateCondition(pSession, L"", &myint); - ok(hr == S_OK, "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Session_EvaluateCondition failed, hresult %#lx\n", hr); ok(myint == MSICONDITION_NONE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN);
hr = Session_EvaluateCondition(pSession, L"=", &myint); - ok(hr == S_OK, "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Session_EvaluateCondition failed, hresult %#lx\n", hr); ok(myint == MSICONDITION_ERROR, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN);
/* Session::DoAction(CostInitialize) must occur before the next statements */ hr = Session_DoAction(pSession, L"CostInitialize", &myint); - ok(hr == S_OK, "Session_DoAction failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Session_DoAction failed, hresult %#lx\n", hr); ok(myint == IDOK, "DoAction(CostInitialize) returned %d, %d expected\n", myint, IDOK);
/* Session::SetInstallLevel */ hr = Session_SetInstallLevel(pSession, INSTALLLEVEL_MINIMUM); - ok(hr == S_OK, "Session_SetInstallLevel failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Session_SetInstallLevel failed, hresult %#lx\n", hr);
/* Session::FeatureCurrentState, get */ hr = Session_FeatureCurrentState(pSession, L"One", &myint); - ok(hr == S_OK, "Session_FeatureCurrentState failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Session_FeatureCurrentState failed, hresult %#lx\n", hr); ok(myint == INSTALLSTATE_UNKNOWN, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN);
/* Session::Message */ hr = Installer_CreateRecord(0, &record); - ok(hr == S_OK, "Installer_CreateRecord failed: %08x\n", hr); + ok(hr == S_OK, "Installer_CreateRecord failed: %#lx\n", hr); hr = Session_Message(pSession, INSTALLMESSAGE_INFO, record, &myint); - ok(hr == S_OK, "Session_Message failed: %08x\n", hr); + ok(hr == S_OK, "Session_Message failed: %#lx\n", hr); ok(myint == 0, "Session_Message returned %x\n", myint);
/* Session::EvaluateCondition */ hr = Session_EvaluateCondition(pSession, L"!One>0", &myint); - ok(hr == S_OK, "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Session_EvaluateCondition failed, hresult %#lx\n", hr); ok(myint == MSICONDITION_FALSE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN);
hr = Session_EvaluateCondition(pSession, L"!One=-1", &myint); - ok(hr == S_OK, "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Session_EvaluateCondition failed, hresult %#lx\n", hr); ok(myint == MSICONDITION_TRUE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN);
/* Session::FeatureRequestState, put */ hr = Session_FeatureRequestStatePut(pSession, L"One", INSTALLSTATE_ADVERTISED); - ok(hr == S_OK, "Session_FeatureRequestStatePut failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Session_FeatureRequestStatePut failed, hresult %#lx\n", hr); hr = Session_FeatureRequestStateGet(pSession, L"One", &myint); - ok(hr == S_OK, "Session_FeatureRequestStateGet failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Session_FeatureRequestStateGet failed, hresult %#lx\n", hr); ok(myint == INSTALLSTATE_ADVERTISED, "Feature request state was %d but expected %d\n", myint, INSTALLSTATE_ADVERTISED);
/* Session::EvaluateCondition */ hr = Session_EvaluateCondition(pSession, L"$One=-1", &myint); - ok(hr == S_OK, "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Session_EvaluateCondition failed, hresult %#lx\n", hr); ok(myint == MSICONDITION_FALSE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN);
hr = Session_EvaluateCondition(pSession, L"$One>0", &myint); - ok(hr == S_OK, "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Session_EvaluateCondition failed, hresult %#lx\n", hr); ok(myint == MSICONDITION_TRUE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); }
@@ -2040,16 +2040,16 @@ static void test_Installer_RegistryValue(void)
/* Does our key exist? Shouldn't; check with all three possible value parameter types */ hr = Installer_RegistryValueE(curr_user, L"Software\Wine\Test", &bRet); - ok(hr == S_OK, "Installer_RegistryValueE failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Installer_RegistryValueE failed, hresult %#lx\n", hr); ok(!bRet, "Registry key expected to not exist, but Installer_RegistryValue claims it does\n");
memset(szString, 0, sizeof(szString)); hr = Installer_RegistryValueW(curr_user, L"Software\Wine\Test", NULL, szString); - ok(hr == DISP_E_BADINDEX, "Installer_RegistryValueW failed, hresult 0x%08x\n", hr); + ok(hr == DISP_E_BADINDEX, "Installer_RegistryValueW failed, hresult %#lx\n", hr);
memset(szString, 0, sizeof(szString)); hr = Installer_RegistryValueI(curr_user, L"Software\Wine\Test", 0, szString, VT_BSTR); - ok(hr == DISP_E_BADINDEX, "Installer_RegistryValueI failed, hresult 0x%08x\n", hr); + ok(hr == DISP_E_BADINDEX, "Installer_RegistryValueI failed, hresult %#lx\n", hr);
/* Create key */ ok(!RegCreateKeyW( HKEY_CURRENT_USER, L"Software\Wine\Test", &hkey ), "RegCreateKeyW failed\n"); @@ -2061,7 +2061,7 @@ static void test_Installer_RegistryValue(void) ok(!RegSetValueExW(hkey, L"Three", 0, REG_BINARY, (const BYTE *)qw, 4), "RegSetValueExW failed\n"); bRet = SetEnvironmentVariableA("MSITEST", "Four"); - ok(bRet, "SetEnvironmentVariableA failed %d\n", GetLastError()); + ok(bRet, "SetEnvironmentVariableA failed %lu\n", GetLastError()); ok(!RegSetValueExW(hkey, L"Four", 0, REG_EXPAND_SZ, (const BYTE *)L"%MSITEST%", sizeof(L"%MSITEST%")), "RegSetValueExW failed\n"); ok(!RegSetValueExW(hkey, L"Five\0Hi\0", 0, REG_MULTI_SZ, (const BYTE *)L"Five\0Hi\0", sizeof(L"Five\0Hi\0")), @@ -2079,53 +2079,53 @@ static void test_Installer_RegistryValue(void) /* Does our key exist? It should, and make sure we retrieve the correct default value */ bRet = FALSE; hr = Installer_RegistryValueE(curr_user, L"Software\Wine\Test", &bRet); - ok(hr == S_OK, "Installer_RegistryValueE failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Installer_RegistryValueE failed, hresult %#lx\n", hr); ok(bRet, "Registry key expected to exist, but Installer_RegistryValue claims it does not\n");
memset(szString, 0, sizeof(szString)); hr = Installer_RegistryValueW(curr_user, L"Software\Wine\Test", NULL, szString); - ok(hr == S_OK, "Installer_RegistryValueW failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Installer_RegistryValueW failed, hresult %#lx\n", hr); ok_w2("Default registry value "%s" does not match expected "%s"\n", szString, L"One");
/* Ask for the value of a nonexistent key */ memset(szString, 0, sizeof(szString)); hr = Installer_RegistryValueW(curr_user, L"Software\Wine\Test", L"%MSITEST%", szString); - ok(hr == DISP_E_BADINDEX, "Installer_RegistryValueW failed, hresult 0x%08x\n", hr); + ok(hr == DISP_E_BADINDEX, "Installer_RegistryValueW failed, hresult %#lx\n", hr);
/* Get values of keys */ memset(szString, 0, sizeof(szString)); hr = Installer_RegistryValueW(curr_user, L"Software\Wine\Test", L"One", szString); - ok(hr == S_OK, "Installer_RegistryValueW failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Installer_RegistryValueW failed, hresult %#lx\n", hr); ok_w2("Registry value "%s" does not match expected "%s"\n", szString, L"One");
VariantInit(&vararg); V_VT(&vararg) = VT_BSTR; V_BSTR(&vararg) = SysAllocString(L"Two"); hr = Installer_RegistryValue(curr_user, L"Software\Wine\Test", vararg, &varresult, VT_I4); - ok(hr == S_OK, "Installer_RegistryValue failed, hresult 0x%08x\n", hr); - ok(V_I4(&varresult) == 305419896, "Registry value %d does not match expected value\n", V_I4(&varresult)); + ok(hr == S_OK, "Installer_RegistryValue failed, hresult %#lx\n", hr); + ok(V_I4(&varresult) == 305419896, "Registry value %ld does not match expected value\n", V_I4(&varresult)); VariantClear(&varresult);
memset(szString, 0, sizeof(szString)); hr = Installer_RegistryValueW(curr_user, L"Software\Wine\Test", L"Three", szString); - ok(hr == S_OK, "Installer_RegistryValueW failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Installer_RegistryValueW failed, hresult %#lx\n", hr); ok_w2("Registry value "%s" does not match expected "%s"\n", szString, L"(REG_BINARY)");
memset(szString, 0, sizeof(szString)); hr = Installer_RegistryValueW(curr_user, L"Software\Wine\Test", L"Four", szString); - ok(hr == S_OK, "Installer_RegistryValueW failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Installer_RegistryValueW failed, hresult %#lx\n", hr); ok_w2("Registry value "%s" does not match expected "%s"\n", szString, L"Four");
/* Vista does not NULL-terminate this case */ memset(szString, 0, sizeof(szString)); hr = Installer_RegistryValueW(curr_user, L"Software\Wine\Test", L"Five\0Hi\0", szString); - ok(hr == S_OK, "Installer_RegistryValueW failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Installer_RegistryValueW failed, hresult %#lx\n", hr); ok_w2n("Registry value "%s" does not match expected "%s"\n", szString, L"Five\nHi", lstrlenW(L"Five\nHi"));
memset(szString, 0, sizeof(szString)); hr = Installer_RegistryValueW(curr_user, L"Software\Wine\Test", L"Six", szString); - ok(hr == S_OK, "Installer_RegistryValueW failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Installer_RegistryValueW failed, hresult %#lx\n", hr); ok(!lstrcmpW(szString, L"(REG_??)") || broken(!lstrcmpW(szString, L"(REG_]")), "Registry value does not match\n");
@@ -2133,36 +2133,36 @@ static void test_Installer_RegistryValue(void) V_VT(&vararg) = VT_BSTR; V_BSTR(&vararg) = SysAllocString(L"Seven"); hr = Installer_RegistryValue(curr_user, L"Software\Wine\Test", vararg, &varresult, VT_EMPTY); - ok(hr == S_OK, "Installer_RegistryValue failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Installer_RegistryValue failed, hresult %#lx\n", hr);
/* Get string class name for the key */ memset(szString, 0, sizeof(szString)); hr = Installer_RegistryValueI(curr_user, L"Software\Wine\Test", 0, szString, VT_BSTR); - ok(hr == S_OK, "Installer_RegistryValueI failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Installer_RegistryValueI failed, hresult %#lx\n", hr); ok_w2("Registry name "%s" does not match expected "%s"\n", szString, L"");
/* Get name of a value by positive number (RegEnumValue like), valid index */ memset(szString, 0, sizeof(szString)); hr = Installer_RegistryValueI(curr_user, L"Software\Wine\Test", 2, szString, VT_BSTR); - ok(hr == S_OK, "Installer_RegistryValueI failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Installer_RegistryValueI failed, hresult %#lx\n", hr); /* RegEnumValue order seems different on wine */ todo_wine ok_w2("Registry name "%s" does not match expected "%s"\n", szString, L"Two");
/* Get name of a value by positive number (RegEnumValue like), invalid index */ memset(szString, 0, sizeof(szString)); hr = Installer_RegistryValueI(curr_user, L"Software\Wine\Test", 10, szString, VT_EMPTY); - ok(hr == S_OK, "Installer_RegistryValueI failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Installer_RegistryValueI failed, hresult %#lx\n", hr);
/* Get name of a subkey by negative number (RegEnumValue like), valid index */ memset(szString, 0, sizeof(szString)); hr = Installer_RegistryValueI(curr_user, L"Software\Wine\Test", -1, szString, VT_BSTR); - ok(hr == S_OK, "Installer_RegistryValueI failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Installer_RegistryValueI failed, hresult %#lx\n", hr); ok_w2("Registry name "%s" does not match expected "%s"\n", szString, L"Eight");
/* Get name of a subkey by negative number (RegEnumValue like), invalid index */ memset(szString, 0, sizeof(szString)); hr = Installer_RegistryValueI(curr_user, L"Software\Wine\Test", -10, szString, VT_EMPTY); - ok(hr == S_OK, "Installer_RegistryValueI failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Installer_RegistryValueI failed, hresult %#lx\n", hr);
/* clean up */ delete_key(hkey); @@ -2183,38 +2183,39 @@ static void test_Installer_Products(BOOL bProductInstalled)
/* Installer::Products */ hr = Installer_Products(&pStringList); - ok(hr == S_OK, "Installer_Products failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Installer_Products failed, hresult %#lx\n", hr); if (hr == S_OK) { /* StringList::_NewEnum */ hr = StringList__NewEnum(pStringList, &pUnk); - ok(hr == S_OK, "StringList_NewEnum failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "StringList_NewEnum failed, hresult %#lx\n", hr); if (hr == S_OK) { hr = IUnknown_QueryInterface(pUnk, &IID_IEnumVARIANT, (void **)&pEnum); - ok (hr == S_OK, "IUnknown::QueryInterface returned 0x%08x\n", hr); + ok (hr == S_OK, "IUnknown::QueryInterface returned %#lx\n", hr); } if (!pEnum) skip("IEnumVARIANT tests\n");
/* StringList::Count */ hr = StringList_Count(pStringList, &iCount); - ok(hr == S_OK, "StringList_Count failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "StringList_Count failed, hresult %#lx\n", hr);
for (idx=0; idx<iCount; idx++) { /* StringList::Item */ memset(szString, 0, sizeof(szString)); hr = StringList_Item(pStringList, idx, szString); - ok(hr == S_OK, "StringList_Item failed (idx %d, count %d), hresult 0x%08x\n", idx, iCount, hr); + ok(hr == S_OK, "StringList_Item failed (idx %d, count %d), hresult %#lx\n", idx, iCount, hr);
if (hr == S_OK) { /* Installer::ProductState */ hr = Installer_ProductState(szString, &iValue); - ok(hr == S_OK, "Installer_ProductState failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Installer_ProductState failed, hresult %#lx\n", hr); if (hr == S_OK) - ok(iValue == INSTALLSTATE_DEFAULT || iValue == INSTALLSTATE_ADVERTISED, "Installer_ProductState returned %d, expected %d or %d\n", iValue, INSTALLSTATE_DEFAULT, INSTALLSTATE_ADVERTISED); + ok(iValue == INSTALLSTATE_DEFAULT || iValue == INSTALLSTATE_ADVERTISED, + "Installer_ProductState returned %d, expected %d or %d\n", iValue, INSTALLSTATE_DEFAULT, INSTALLSTATE_ADVERTISED);
/* Not found our product code yet? Check */ if (!bProductFound && !lstrcmpW(szString, L"{837450fa-a39b-4bc8-b321-08b393f784b3}")) @@ -2224,8 +2225,8 @@ static void test_Installer_Products(BOOL bProductInstalled) if (pEnum) { hr = IEnumVARIANT_Next(pEnum, 1, &var, &celt); - ok(hr == S_OK, "IEnumVARIANT_Next failed (idx %d, count %d), hresult 0x%08x\n", idx, iCount, hr); - ok(celt == 1, "%d items were retrieved, expected 1\n", celt); + ok(hr == S_OK, "IEnumVARIANT_Next failed (idx %d, count %d), hresult %#lx\n", idx, iCount, hr); + ok(celt == 1, "%lu items were retrieved, expected 1\n", celt); ok(V_VT(&var) == VT_BSTR, "IEnumVARIANT_Next returned variant of type %d, expected %d\n", V_VT(&var), VT_BSTR); ok_w2("%s returned by StringList_Item does not match %s returned by IEnumVARIANT_Next\n", szString, V_BSTR(&var)); VariantClear(&var); @@ -2252,7 +2253,7 @@ static void test_Installer_Products(BOOL bProductInstalled)
/* IEnumVARIANT::Clone */ hr = IEnumVARIANT_Clone(pEnum, &pEnum2); - ok(hr == S_OK, "IEnumVARIANT_Clone failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "IEnumVARIANT_Clone failed, hresult %#lx\n", hr); if (hr == S_OK) { /* IEnumVARIANT::Clone is supposed to save the position, but it actually just goes back to the beginning */ @@ -2261,8 +2262,8 @@ static void test_Installer_Products(BOOL bProductInstalled) if (iCount) { hr = IEnumVARIANT_Next(pEnum2, 1, &var, &celt); - ok(hr == S_OK, "IEnumVARIANT_Next failed, hresult 0x%08x\n", hr); - ok(celt == 1, "%d items were retrieved, expected 0\n", celt); + ok(hr == S_OK, "IEnumVARIANT_Next failed, hresult %#lx\n", hr); + ok(celt == 1, "%lu items were retrieved, expected 0\n", celt); ok(V_VT(&var) == VT_BSTR, "IEnumVARIANT_Next returned variant of type %d, expected %d\n", V_VT(&var), VT_BSTR); VariantClear(&var); } @@ -2274,33 +2275,33 @@ static void test_Installer_Products(BOOL bProductInstalled)
/* IEnumVARIANT::Skip should fail */ hr = IEnumVARIANT_Skip(pEnum, 1); - ok(hr == S_FALSE, "IEnumVARIANT_Skip failed, hresult 0x%08x\n", hr); + ok(hr == S_FALSE, "IEnumVARIANT_Skip failed, hresult %#lx\n", hr);
/* IEnumVARIANT::Next, NULL variant pointer */ hr = IEnumVARIANT_Next(pEnum, 1, NULL, &celt); - ok(hr == S_FALSE, "IEnumVARIANT_Next failed, hresult 0x%08x\n", hr); - ok(celt == 0, "%d items were retrieved, expected 0\n", celt); + ok(hr == S_FALSE, "IEnumVARIANT_Next failed, hresult %#lx\n", hr); + ok(celt == 0, "%lu items were retrieved, expected 0\n", celt);
/* IEnumVARIANT::Next, should not return any more items */ hr = IEnumVARIANT_Next(pEnum, 1, &var, &celt); - ok(hr == S_FALSE, "IEnumVARIANT_Next failed, hresult 0x%08x\n", hr); - ok(celt == 0, "%d items were retrieved, expected 0\n", celt); + ok(hr == S_FALSE, "IEnumVARIANT_Next failed, hresult %#lx\n", hr); + ok(celt == 0, "%lu items were retrieved, expected 0\n", celt); VariantClear(&var);
/* IEnumVARIANT::Reset */ hr = IEnumVARIANT_Reset(pEnum); - ok(hr == S_OK, "IEnumVARIANT_Reset failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "IEnumVARIANT_Reset failed, hresult %#lx\n", hr);
if (iCount) { /* IEnumVARIANT::Skip to the last product */ hr = IEnumVARIANT_Skip(pEnum, iCount-1); - ok(hr == S_OK, "IEnumVARIANT_Skip failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "IEnumVARIANT_Skip failed, hresult %#lx\n", hr);
/* IEnumVARIANT::Next should match the very last retrieved value, also makes sure it works with * NULL celt pointer. */ hr = IEnumVARIANT_Next(pEnum, 1, &var, NULL); - ok(hr == S_OK, "IEnumVARIANT_Next failed (idx %d, count %d), hresult 0x%08x\n", idx, iCount, hr); + ok(hr == S_OK, "IEnumVARIANT_Next failed (idx %d, count %d), hresult %#lx\n", idx, iCount, hr); ok(V_VT(&var) == VT_BSTR, "IEnumVARIANT_Next returned variant of type %d, expected %d\n", V_VT(&var), VT_BSTR); ok_w2("%s returned by StringList_Item does not match %s returned by IEnumVARIANT_Next\n", szString, V_BSTR(&var)); VariantClear(&var); @@ -2312,7 +2313,7 @@ static void test_Installer_Products(BOOL bProductInstalled) /* StringList::Item using an invalid index */ memset(szString, 0, sizeof(szString)); hr = StringList_Item(pStringList, iCount, szString); - ok(hr == DISP_E_BADINDEX, "StringList_Item for an invalid index did not return DISP_E_BADINDEX, hresult 0x%08x\n", hr); + ok(hr == DISP_E_BADINDEX, "StringList_Item for an invalid index did not return DISP_E_BADINDEX, hresult %#lx\n", hr);
if (pEnum) IEnumVARIANT_Release(pEnum); if (pUnk) IUnknown_Release(pUnk); @@ -2406,7 +2407,7 @@ static void test_Installer_InstallProduct(void)
/* Avoid an interactive dialog in case of insufficient privileges. */ hr = Installer_UILevelPut(INSTALLUILEVEL_NONE); - ok(hr == S_OK, "Expected UILevel property put invoke to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected UILevel property put invoke to return S_OK, got %#lx\n", hr);
/* Installer::InstallProduct */ hr = Installer_InstallProduct(L"winetest-automation.msi", NULL); @@ -2416,11 +2417,11 @@ static void test_Installer_InstallProduct(void) delete_test_files(); return; } - ok(hr == S_OK, "Installer_InstallProduct failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Installer_InstallProduct failed, hresult %#lx\n", hr);
/* Installer::ProductState for our product code, which has been installed */ hr = Installer_ProductState(L"{837450fa-a39b-4bc8-b321-08b393f784b3}", &iValue); - ok(hr == S_OK, "Installer_ProductState failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Installer_ProductState failed, hresult %#lx\n", hr); ok(iValue == INSTALLSTATE_DEFAULT, "Installer_ProductState returned %d, expected %d\n", iValue, INSTALLSTATE_DEFAULT);
/* Installer::ProductInfo for our product code */ @@ -2428,25 +2429,25 @@ static void test_Installer_InstallProduct(void) /* NULL attribute */ memset(szString, 0, sizeof(szString)); hr = Installer_ProductInfo(L"{837450fa-a39b-4bc8-b321-08b393f784b3}", NULL, szString); - ok(hr == DISP_E_EXCEPTION, "Installer_ProductInfo failed, hresult 0x%08x\n", hr); + ok(hr == DISP_E_EXCEPTION, "Installer_ProductInfo failed, hresult %#lx\n", hr); ok_exception(hr, L"ProductInfo,Product,Attribute");
/* Nonexistent attribute */ memset(szString, 0, sizeof(szString)); hr = Installer_ProductInfo(L"{837450fa-a39b-4bc8-b321-08b393f784b3}", L"winetest-automation.msi", szString); - ok(hr == DISP_E_EXCEPTION, "Installer_ProductInfo failed, hresult 0x%08x\n", hr); + ok(hr == DISP_E_EXCEPTION, "Installer_ProductInfo failed, hresult %#lx\n", hr); ok_exception(hr, L"ProductInfo,Product,Attribute");
/* Package name */ memset(szString, 0, sizeof(szString)); hr = Installer_ProductInfo(L"{837450fa-a39b-4bc8-b321-08b393f784b3}", L"PackageName", szString); - ok(hr == S_OK, "Installer_ProductInfo failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Installer_ProductInfo failed, hresult %#lx\n", hr); todo_wine ok_w2("Installer_ProductInfo returned %s but expected %s\n", szString, L"winetest-automation.msi");
/* Product name */ memset(szString, 0, sizeof(szString)); hr = Installer_ProductInfo(L"{837450fa-a39b-4bc8-b321-08b393f784b3}", L"ProductName", szString); - ok(hr == S_OK, "Installer_ProductInfo failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Installer_ProductInfo failed, hresult %#lx\n", hr); todo_wine ok_w2("Installer_ProductInfo returned %s but expected %s\n", szString, L"MSITEST");
/* Installer::Products */ @@ -2454,25 +2455,25 @@ static void test_Installer_InstallProduct(void)
/* Installer::RelatedProducts for our upgrade code */ hr = Installer_RelatedProducts(L"{CE067E8D-2E1A-4367-B734-4EB2BDAD6565}", &pStringList); - ok(hr == S_OK, "Installer_RelatedProducts failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Installer_RelatedProducts failed, hresult %#lx\n", hr); if (hr == S_OK) { /* StringList::Count */ hr = StringList_Count(pStringList, &iCount); - ok(hr == S_OK, "StringList_Count failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "StringList_Count failed, hresult %#lx\n", hr); ok(iCount == 1, "Expected one related product but found %d\n", iCount);
/* StringList::Item */ memset(szString, 0, sizeof(szString)); hr = StringList_Item(pStringList, 0, szString); - ok(hr == S_OK, "StringList_Item failed (idx 0, count %d), hresult 0x%08x\n", iCount, hr); + ok(hr == S_OK, "StringList_Item failed (idx 0, count %d), hresult %#lx\n", iCount, hr); ok_w2("StringList_Item returned %s but expected %s\n", szString, L"{837450fa-a39b-4bc8-b321-08b393f784b3}");
IDispatch_Release(pStringList); }
hr = Installer_ProductInfo(L"{837450fa-a39b-4bc8-b321-08b393f784b3}", L"LocalPackage", szString); - ok(hr == S_OK, "Installer_ProductInfo failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Installer_ProductInfo failed, hresult %#lx\n", hr); DeleteFileW( szString );
/* Check & clean up installed files & registry keys */ @@ -2489,67 +2490,67 @@ static void test_Installer_InstallProduct(void) ok(delete_pf("msitest", FALSE), "Directory not created\n");
res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\Wine\msitest", &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
size = MAX_PATH; type = REG_SZ; res = RegQueryValueExA(hkey, "Name", NULL, &type, (LPBYTE)path, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); ok(!lstrcmpA(path, "imaname"), "Expected imaname, got %s\n", path);
size = MAX_PATH; type = REG_SZ; res = RegQueryValueExA(hkey, "blah", NULL, &type, (LPBYTE)path, &size); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
size = sizeof(num); type = REG_DWORD; res = RegQueryValueExA(hkey, "number", NULL, &type, (LPBYTE)&num, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(num == 314, "Expected 314, got %d\n", num); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); + ok(num == 314, "Expected 314, got %lu\n", num);
size = MAX_PATH; type = REG_SZ; res = RegQueryValueExA(hkey, "OrderTestName", NULL, &type, (LPBYTE)path, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); ok(!lstrcmpA(path, "OrderTestValue"), "Expected imaname, got %s\n", path);
RegCloseKey(hkey);
res = RegDeleteKeyA(HKEY_CURRENT_USER, "SOFTWARE\Wine\msitest"); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Remove registry keys written by RegisterProduct standard action */ res = delete_key_portable(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{837450fa-a39b-4bc8-b321-08b393f784b3}", KEY_WOW64_32KEY); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = delete_key_portable(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UpgradeCodes\D8E760ECA1E276347B43E42BDBDA5656", access); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = find_registry_key(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData", "af054738b93a8cb43b12803b397f483b", access, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = delete_registry_key(hkey, "af054738b93a8cb43b12803b397f483b", access); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); RegCloseKey(hkey);
res = delete_key_portable(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\Products\af054738b93a8cb43b12803b397f483b", access); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
/* Remove registry keys written by PublishProduct standard action */ res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\Microsoft\Installer", &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = delete_registry_key(hkey, "Products\af054738b93a8cb43b12803b397f483b", KEY_ALL_ACCESS); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegDeleteKeyA(hkey, "UpgradeCodes\D8E760ECA1E276347B43E42BDBDA5656"); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
RegCloseKey(hkey);
@@ -2570,42 +2571,42 @@ static void test_Installer(void)
/* Test for error */ hr = Installer_CreateRecord(-1, &pRecord); - ok(hr == DISP_E_EXCEPTION, "Installer_CreateRecord failed, hresult 0x%08x\n", hr); + ok(hr == DISP_E_EXCEPTION, "Installer_CreateRecord failed, hresult %#lx\n", hr); ok_exception(hr, L"CreateRecord,Count");
/* Test for success */ hr = Installer_CreateRecord(1, &pRecord); - ok(hr == S_OK, "Installer_CreateRecord failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Installer_CreateRecord failed, hresult %#lx\n", hr); ok(pRecord != NULL, "Installer_CreateRecord should not have returned NULL record\n"); if (pRecord) { /* Record::FieldCountGet */ hr = Record_FieldCountGet(pRecord, &iValue); - ok(hr == S_OK, "Record_FiledCountGet failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Record_FiledCountGet failed, hresult %#lx\n", hr); ok(iValue == 1, "Record_FieldCountGet result was %d but expected 1\n", iValue);
/* Record::IntegerDataGet */ hr = Record_IntegerDataGet(pRecord, 1, &iValue); - ok(hr == S_OK, "Record_IntegerDataGet failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Record_IntegerDataGet failed, hresult %#lx\n", hr); ok(iValue == MSI_NULL_INTEGER, "Record_IntegerDataGet result was %d but expected %d\n", iValue, MSI_NULL_INTEGER);
/* Record::IntegerDataGet, bad index */ hr = Record_IntegerDataGet(pRecord, 10, &iValue); - ok(hr == S_OK, "Record_IntegerDataGet failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Record_IntegerDataGet failed, hresult %#lx\n", hr); ok(iValue == MSI_NULL_INTEGER, "Record_IntegerDataGet result was %d but expected %d\n", iValue, MSI_NULL_INTEGER);
/* Record::IntegerDataPut */ hr = Record_IntegerDataPut(pRecord, 1, 100); - ok(hr == S_OK, "Record_IntegerDataPut failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Record_IntegerDataPut failed, hresult %#lx\n", hr);
/* Record::IntegerDataPut, bad index */ hr = Record_IntegerDataPut(pRecord, 10, 100); - ok(hr == DISP_E_EXCEPTION, "Record_IntegerDataPut failed, hresult 0x%08x\n", hr); + ok(hr == DISP_E_EXCEPTION, "Record_IntegerDataPut failed, hresult %#lx\n", hr); ok_exception(hr, L"IntegerData,Field");
/* Record::IntegerDataGet */ hr = Record_IntegerDataGet(pRecord, 1, &iValue); - ok(hr == S_OK, "Record_IntegerDataGet failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Record_IntegerDataGet failed, hresult %#lx\n", hr); ok(iValue == 100, "Record_IntegerDataGet result was %d but expected 100\n", iValue);
IDispatch_Release(pRecord); @@ -2621,7 +2622,7 @@ static void test_Installer(void) DeleteFileW(szPath); return; } - ok(hr == S_OK, "Installer_OpenPackage failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Installer_OpenPackage failed, hresult %#lx\n", hr); if (hr == S_OK) { test_Session(pSession); @@ -2630,7 +2631,7 @@ static void test_Installer(void)
/* Installer::OpenDatabase */ hr = Installer_OpenDatabase(szPath, (INT_PTR)MSIDBOPEN_TRANSACT, &pDatabase); - ok(hr == S_OK, "Installer_OpenDatabase failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Installer_OpenDatabase failed, hresult %#lx\n", hr); if (hr == S_OK) { test_Database(pDatabase, FALSE); @@ -2639,7 +2640,7 @@ static void test_Installer(void)
/* Installer::SummaryInformation */ hr = Installer_SummaryInformation(szPath, 0, &pSumInfo); - ok(hr == S_OK, "Installer_SummaryInformation failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Installer_SummaryInformation failed, hresult %#lx\n", hr); if (hr == S_OK) { test_SummaryInfo(pSumInfo, summary_info, ARRAY_SIZE(summary_info), TRUE); @@ -2647,14 +2648,14 @@ static void test_Installer(void) }
hr = Installer_SummaryInformation(NULL, 0, &pSumInfo); - ok(hr == DISP_E_EXCEPTION, "Installer_SummaryInformation failed, hresult 0x%08x\n", hr); + ok(hr == DISP_E_EXCEPTION, "Installer_SummaryInformation failed, hresult %#lx\n", hr);
/* Installer::RegistryValue */ test_Installer_RegistryValue();
/* Installer::ProductState for our product code, which should not be installed */ hr = Installer_ProductState(L"{837450fa-a39b-4bc8-b321-08b393f784b3}", &iValue); - ok(hr == S_OK, "Installer_ProductState failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Installer_ProductState failed, hresult %#lx\n", hr); ok(iValue == INSTALLSTATE_UNKNOWN, "Installer_ProductState returned %d, expected %d\n", iValue, INSTALLSTATE_UNKNOWN);
/* Installer::ProductInfo for our product code, which should not be installed */ @@ -2662,13 +2663,13 @@ static void test_Installer(void) /* Package name */ memset(szPath, 0, sizeof(szPath)); hr = Installer_ProductInfo(L"{837450fa-a39b-4bc8-b321-08b393f784b3}", L"PackageName", szPath); - ok(hr == DISP_E_EXCEPTION, "Installer_ProductInfo failed, hresult 0x%08x\n", hr); + ok(hr == DISP_E_EXCEPTION, "Installer_ProductInfo failed, hresult %#lx\n", hr); ok_exception(hr, L"ProductInfo,Product,Attribute");
/* NULL attribute and NULL product code */ memset(szPath, 0, sizeof(szPath)); hr = Installer_ProductInfo(NULL, NULL, szPath); - ok(hr == DISP_E_EXCEPTION, "Installer_ProductInfo failed, hresult 0x%08x\n", hr); + ok(hr == DISP_E_EXCEPTION, "Installer_ProductInfo failed, hresult %#lx\n", hr); ok_exception(hr, L"ProductInfo,Product,Attribute");
/* Installer::Products */ @@ -2676,12 +2677,12 @@ static void test_Installer(void)
/* Installer::RelatedProducts for our upgrade code, should not find anything */ hr = Installer_RelatedProducts(L"{CE067E8D-2E1A-4367-B734-4EB2BDAD6565}", &pStringList); - ok(hr == S_OK, "Installer_RelatedProducts failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Installer_RelatedProducts failed, hresult %#lx\n", hr); if (hr == S_OK) { /* StringList::Count */ hr = StringList_Count(pStringList, &iCount); - ok(hr == S_OK, "StringList_Count failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "StringList_Count failed, hresult %#lx\n", hr); ok(!iCount, "Expected no related products but found %d\n", iCount);
IDispatch_Release(pStringList); @@ -2690,7 +2691,7 @@ static void test_Installer(void) /* Installer::Version */ memset(szPath, 0, sizeof(szPath)); hr = Installer_VersionGet(szPath); - ok(hr == S_OK, "Installer_VersionGet failed, hresult 0x%08x\n", hr); + ok(hr == S_OK, "Installer_VersionGet failed, hresult %#lx\n", hr);
/* Installer::InstallProduct and other tests that depend on our product being installed */ test_Installer_InstallProduct(); @@ -2724,16 +2725,16 @@ START_TEST(automation) get_program_files_dir(PROG_FILES_DIR);
hr = OleInitialize(NULL); - ok (hr == S_OK, "OleInitialize returned 0x%08x\n", hr); + ok (hr == S_OK, "OleInitialize returned %#lx\n", hr); hr = CLSIDFromProgID(L"WindowsInstaller.Installer", &clsid); - ok (hr == S_OK, "CLSIDFromProgID returned 0x%08x\n", hr); + ok (hr == S_OK, "CLSIDFromProgID returned %#lx\n", hr); hr = CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&pUnk); - ok(hr == S_OK, "CoCreateInstance returned 0x%08x\n", hr); + ok(hr == S_OK, "CoCreateInstance returned %#lx\n", hr);
if (pUnk) { hr = IUnknown_QueryInterface(pUnk, &IID_IDispatch, (void **)&pInstaller); - ok (hr == S_OK, "IUnknown::QueryInterface returned 0x%08x\n", hr); + ok (hr == S_OK, "IUnknown::QueryInterface returned %#lx\n", hr);
test_dispid(); test_dispatch(); diff --git a/modules/rostests/winetests/msi/custom.c b/modules/rostests/winetests/msi/custom.c index 75e234c6583..c1b011c8871 100644 --- a/modules/rostests/winetests/msi/custom.c +++ b/modules/rostests/winetests/msi/custom.c @@ -1141,7 +1141,7 @@ static void test_invalid_functions(MSIHANDLE hinst) r = MsiEnableUIPreview(db, &preview); ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r);
- sprintf(package_name, "#%u", db); + sprintf(package_name, "#%lu", db); r = MsiOpenPackageA(package_name, &package); ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r);
diff --git a/modules/rostests/winetests/msi/db.c b/modules/rostests/winetests/msi/db.c index b2a60f5b304..59dcf87a47c 100644 --- a/modules/rostests/winetests/msi/db.c +++ b/modules/rostests/winetests/msi/db.c @@ -548,7 +548,7 @@ static void test_msidecomposedesc(void) comp[0] = 0x55; r = pMsiDecomposeDescriptorA(desc, prod, feature, comp, &len); ok(r == ERROR_SUCCESS, "returned an error\n"); - ok(len == 41, "got %u\n", len); + ok(len == 41, "got %lu\n", len); ok(!strcmp(prod,"{90110409-6000-11D3-8CFE-0150048383C9}"), "got '%s'\n", prod); ok(!strcmp(feature,"FollowTheWhiteRabbit"), "got '%s'\n", feature); ok(!comp[0], "got '%s'\n", comp); @@ -558,7 +558,7 @@ static void test_msidecomposedesc(void) comp[0] = 0x55; r = pMsiDecomposeDescriptorA("yh1BVN)8A$!!!!!MKKSkAlwaysInstalledIntl_1033<", prod, feature, comp, &len); ok(r == ERROR_SUCCESS, "got %u\n", r); - ok(len == 45, "got %u\n", len); + ok(len == 45, "got %lu\n", len); ok(!strcmp(prod, "{90150000-006E-0409-0000-0000000FF1CE}"), "got '%s'\n", prod); ok(!strcmp(feature, "AlwaysInstalledIntl_1033"), "got '%s'\n", feature); ok(!comp[0], "got '%s'\n", comp); @@ -907,7 +907,7 @@ static void test_viewmodify(void) err = MsiViewGetErrorA( hview, buffer, &sz ); ok(err == MSIDBERROR_NOERROR, "got %d\n", err); ok(!buffer[0], "got "%s"\n", buffer); - ok(sz == 0, "got size %u\n", sz); + ok(sz == 0, "got size %lu\n", sz);
r = MsiViewExecute(hview, 0); ok(r == ERROR_SUCCESS, "MsiViewExecute failed\n"); @@ -928,7 +928,7 @@ static void test_viewmodify(void) err = MsiViewGetErrorA( hview, buffer, &sz ); ok(err == MSIDBERROR_NOERROR, "got %d\n", err); ok(!buffer[0], "got "%s"\n", buffer); - ok(sz == 0, "got size %u\n", sz); + ok(sz == 0, "got size %lu\n", sz);
r = MsiCloseHandle(hrec); ok(r == ERROR_SUCCESS, "failed to close record\n"); @@ -960,7 +960,7 @@ static void test_viewmodify(void) err = MsiViewGetErrorA( hview, buffer, &sz ); ok(err == MSIDBERROR_DUPLICATEKEY, "got %d\n", err); ok(!strcmp(buffer, "id"), "got "%s"\n", buffer); - ok(sz == 2, "got size %u\n", sz); + ok(sz == 2, "got size %lu\n", sz);
/* insert the same thing again */ r = MsiViewExecute(hview, 0); @@ -1809,7 +1809,7 @@ static void test_streamtable(void) memset(buf, 0, MAX_PATH); r = MsiRecordReadStream( rec, 2, buf, &size ); ok( r == ERROR_SUCCESS, "Failed to get stream: %d\n", r); - ok( !lstrcmpA(buf, "test.txt\n"), "Expected 'test.txt\n', got '%s' (%d)\n", buf, size); + ok( !lstrcmpA(buf, "test.txt\n"), "Expected 'test.txt\n', got '%s' (%lu)\n", buf, size); MsiCloseHandle( rec );
/* open a handle to the "data" stream (and keep it open during removal) */ @@ -1841,7 +1841,7 @@ static void test_streamtable(void) memset(buf, 0, MAX_PATH); r = MsiRecordReadStream( rec, 2, buf, &size ); ok( r == ERROR_SUCCESS, "Failed to get stream: %d\n", r); - todo_wine ok( size == 0, "Expected empty buffer, got %d bytes\n", size); + todo_wine ok( size == 0, "Expected empty buffer, got %lu bytes\n", size); MsiCloseHandle( rec );
MsiCloseHandle( hdb ); @@ -2246,7 +2246,8 @@ static void test_suminfo_import(void) { MSIHANDLE hdb, hsi, view = 0; LPCSTR query; - UINT r, count, size, type; + UINT r, count, type; + DWORD size; char str_value[50]; INT int_value; FILETIME ft_value; @@ -2284,7 +2285,7 @@ static void test_suminfo_import(void) r = MsiSummaryInfoGetPropertyA(hsi, PID_TITLE, &type, NULL, NULL, str_value, &size); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); ok(type == VT_LPSTR, "Expected VT_LPSTR, got %u\n", type); - ok(size == 18, "Expected 18, got %u\n", size); + ok(size == 18, "Expected 18, got %lu\n", size); ok(!strcmp(str_value, "Installer Database"), "Expected "Installer Database", got %s\n", str_value);
@@ -2980,7 +2981,7 @@ static void generate_transform_manual(void) STGM_WRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stm ); if (FAILED(r)) { - ok(0, "failed to create stream %08x\n", r); + ok(0, "failed to create stream %#lx\n", r); continue; }
@@ -3068,7 +3069,7 @@ static UINT package_from_db(MSIHANDLE hdb, MSIHANDLE *handle) CHAR szPackage[12]; MSIHANDLE hPackage;
- sprintf(szPackage, "#%u", hdb); + sprintf(szPackage, "#%lu", hdb); res = MsiOpenPackageA(szPackage, &hPackage); if (res != ERROR_SUCCESS) return res; @@ -3512,7 +3513,7 @@ static void test_join(void) i++; MsiCloseHandle(hrec); } - ok( i == 5, "Expected 5 rows, got %d\n", i ); + ok( i == 5, "Expected 5 rows, got %lu\n", i ); ok( r == ERROR_NO_MORE_ITEMS, "expected no more items: %d\n", r );
MsiViewClose(hview); @@ -3533,7 +3534,7 @@ static void test_join(void) i++; MsiCloseHandle(hrec); } - ok( i == 24, "Expected 24 rows, got %d\n", i ); + ok( i == 24, "Expected 24 rows, got %lu\n", i );
MsiViewClose(hview); MsiCloseHandle(hview); @@ -3555,7 +3556,7 @@ static void test_join(void) MsiCloseHandle(hrec); }
- ok( i == 2, "Expected 2 rows, got %d\n", i ); + ok( i == 2, "Expected 2 rows, got %lu\n", i ); ok( r == ERROR_NO_MORE_ITEMS, "expected no more items: %d\n", r );
MsiViewClose(hview); @@ -3578,7 +3579,7 @@ static void test_join(void) i++; MsiCloseHandle(hrec); } - ok( i == 2, "Expected 2 rows, got %d\n", i ); + ok( i == 2, "Expected 2 rows, got %lu\n", i ); ok( r == ERROR_NO_MORE_ITEMS, "expected no more items: %d\n", r );
MsiViewClose(hview); @@ -3601,7 +3602,7 @@ static void test_join(void) i++; MsiCloseHandle(hrec); } - ok( i == 1, "Expected 1 rows, got %d\n", i ); + ok( i == 1, "Expected 1 rows, got %lu\n", i ); ok( r == ERROR_NO_MORE_ITEMS, "expected no more items: %d\n", r );
MsiViewClose(hview); @@ -3625,7 +3626,7 @@ static void test_join(void) i++; MsiCloseHandle(hrec); } - ok( i == 1, "Expected 1 rows, got %d\n", i ); + ok( i == 1, "Expected 1 rows, got %lu\n", i ); ok( r == ERROR_NO_MORE_ITEMS, "expected no more items: %d\n", r );
MsiViewClose(hview); @@ -3648,7 +3649,7 @@ static void test_join(void) i++; MsiCloseHandle(hrec); } - ok( i == 6, "Expected 6 rows, got %d\n", i ); + ok( i == 6, "Expected 6 rows, got %lu\n", i ); ok( r == ERROR_NO_MORE_ITEMS, "expected no more items: %d\n", r );
MsiViewClose(hview); @@ -3672,7 +3673,7 @@ static void test_join(void) i++; MsiCloseHandle(hrec); } - ok( i == 3, "Expected 3 rows, got %d\n", i ); + ok( i == 3, "Expected 3 rows, got %lu\n", i ); ok( r == ERROR_NO_MORE_ITEMS, "expected no more items: %d\n", r );
MsiViewClose(hview); @@ -3693,7 +3694,7 @@ static void test_join(void) i++; MsiCloseHandle(hrec); } - ok( i == 6, "Expected 6 rows, got %d\n", i ); + ok( i == 6, "Expected 6 rows, got %lu\n", i ); ok( r == ERROR_NO_MORE_ITEMS, "expected no more items: %d\n", r );
MsiViewClose(hview); @@ -3714,7 +3715,7 @@ static void test_join(void) i++; MsiCloseHandle(hrec); } - ok( i == 6, "Expected 6 rows, got %d\n", i ); + ok( i == 6, "Expected 6 rows, got %lu\n", i ); ok( r == ERROR_NO_MORE_ITEMS, "expected no more items: %d\n", r );
MsiViewClose(hview); @@ -3736,7 +3737,7 @@ static void test_join(void) i++; MsiCloseHandle(hrec); } - ok( i == 6, "Expected 6 rows, got %d\n", i ); + ok( i == 6, "Expected 6 rows, got %lu\n", i ); ok( r == ERROR_NO_MORE_ITEMS, "expected no more items: %d\n", r );
MsiViewClose(hview); @@ -4240,21 +4241,21 @@ static void test_integers(void) ok(r == 8, "record count wrong: %d\n", r);
i = MsiRecordGetInteger(rec, 1); - ok(i == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %d\n", i); + ok(i == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %lu\n", i); i = MsiRecordGetInteger(rec, 3); - ok(i == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %d\n", i); + ok(i == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %lu\n", i); i = MsiRecordGetInteger(rec, 2); - ok(i == 2, "Expected 2, got %d\n", i); + ok(i == 2, "Expected 2, got %lu\n", i); i = MsiRecordGetInteger(rec, 4); - ok(i == 4, "Expected 4, got %d\n", i); + ok(i == 4, "Expected 4, got %lu\n", i); i = MsiRecordGetInteger(rec, 5); - ok(i == 5, "Expected 5, got %d\n", i); + ok(i == 5, "Expected 5, got %lu\n", i); i = MsiRecordGetInteger(rec, 6); - ok(i == 6, "Expected 6, got %d\n", i); + ok(i == 6, "Expected 6, got %lu\n", i); i = MsiRecordGetInteger(rec, 7); - ok(i == 7, "Expected 7, got %d\n", i); + ok(i == 7, "Expected 7, got %lu\n", i); i = MsiRecordGetInteger(rec, 8); - ok(i == 8, "Expected 8, got %d\n", i); + ok(i == 8, "Expected 8, got %lu\n", i);
MsiCloseHandle(rec); MsiViewClose(view); @@ -5714,65 +5715,65 @@ static void test_stringtable(void)
MultiByteToWideChar(CP_ACP, 0, msifile, -1, name, 0x20); hr = StgOpenStorage(name, NULL, mode, NULL, 0, &stg); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); + ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr); ok(stg != NULL, "Expected non-NULL storage\n");
hr = IStorage_OpenStream(stg, moo, NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stm); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); + ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr); ok(stm != NULL, "Expected non-NULL stream\n");
hr = IStream_Read(stm, data, MAX_PATH, &read); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); - ok(read == 4, "Expected 4, got %d\n", read); + ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr); + ok(read == 4, "Expected 4, got %lu\n", read); todo_wine ok(!memcmp(data, data10, read), "Unexpected data\n");
hr = IStream_Release(stm); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); + ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
hr = IStorage_OpenStream(stg, aar, NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stm); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); + ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr); ok(stm != NULL, "Expected non-NULL stream\n");
hr = IStream_Read(stm, data, MAX_PATH, &read); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); - ok(read == 8, "Expected 8, got %d\n", read); + ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr); + ok(read == 8, "Expected 8, got %lu\n", read); todo_wine { ok(!memcmp(data, data11, read), "Unexpected data\n"); }
hr = IStream_Release(stm); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); + ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
hr = IStorage_OpenStream(stg, stringdata, NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stm); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); + ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr); ok(stm != NULL, "Expected non-NULL stream\n");
hr = IStream_Read(stm, buffer, MAX_PATH, &read); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); - ok(read == 24, "Expected 24, got %d\n", read); + ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr); + ok(read == 24, "Expected 24, got %lu\n", read); ok(!memcmp(buffer, data12, read), "Unexpected data\n");
hr = IStream_Release(stm); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); + ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
hr = IStorage_OpenStream(stg, stringpool, NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stm); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); + ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr); ok(stm != NULL, "Expected non-NULL stream\n");
hr = IStream_Read(stm, data, MAX_PATH, &read); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); + ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr); todo_wine { - ok(read == 64, "Expected 64, got %d\n", read); + ok(read == 64, "Expected 64, got %lu\n", read); ok(!memcmp(data, data13, read), "Unexpected data\n"); }
hr = IStream_Release(stm); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); + ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
hr = IStorage_Release(stg); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); + ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
DeleteFileA(msifile); } @@ -5895,7 +5896,7 @@ static void enum_stream_names(IStorage *stg) memset(check, 'a', MAX_PATH);
hr = IStorage_EnumElements(stg, 0, NULL, 0, &stgenum); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
n = 0; while(TRUE) @@ -5906,12 +5907,12 @@ static void enum_stream_names(IStorage *stg) break;
ok(!lstrcmpW(stat.pwcsName, database_table_data[n].name), - "Expected table %d name to match\n", n); + "Expected table %lu name to match\n", n);
stm = NULL; hr = IStorage_OpenStream(stg, stat.pwcsName, NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stm); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr); ok(stm != NULL, "Expected non-NULL stream\n");
CoTaskMemFree(stat.pwcsName); @@ -5919,22 +5920,22 @@ static void enum_stream_names(IStorage *stg) sz = MAX_PATH; memset(data, 'a', MAX_PATH); hr = IStream_Read(stm, data, sz, &count); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
ok(count == database_table_data[n].size, - "Expected %d, got %d\n", database_table_data[n].size, count); + "Expected %lu, got %lu\n", database_table_data[n].size, count);
if (!database_table_data[n].size) ok(!memcmp(data, check, MAX_PATH), "data should not be changed\n"); else ok(!memcmp(data, database_table_data[n].data, database_table_data[n].size), - "Expected table %d data to match\n", n); + "Expected table %lu data to match\n", n);
IStream_Release(stm); n++; }
- ok(n == 3, "Expected 3, got %d\n", n); + ok(n == 3, "Expected 3, got %lu\n", n);
IEnumSTATSTG_Release(stgenum); } @@ -5957,7 +5958,7 @@ static void test_defaultdatabase(void) MsiCloseHandle(hdb);
hr = StgOpenStorage(msifileW, NULL, STGM_READ | STGM_SHARE_DENY_WRITE, NULL, 0, &stg); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr); ok(stg != NULL, "Expected non-NULL stg\n");
enum_stream_names(stg); @@ -7188,7 +7189,7 @@ static void test_storages_table(void) r = MsiRecordReadStream(hrec, 2, buf, &size); ok(r == ERROR_INVALID_DATA, "Expected ERROR_INVALID_DATA, got %d\n", r); ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(size == 0, "Expected 0, got %d\n", size); + ok(size == 0, "Expected 0, got %lu\n", size);
MsiCloseHandle(hrec);
@@ -7204,23 +7205,23 @@ static void test_storages_table(void) MultiByteToWideChar(CP_ACP, 0, msifile, -1, name, MAX_PATH); hr = StgOpenStorage(name, NULL, STGM_DIRECT | STGM_READ | STGM_SHARE_DENY_WRITE, NULL, 0, &stg); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr); ok(stg != NULL, "Expected non-NULL storage\n");
MultiByteToWideChar(CP_ACP, 0, "stgname", -1, name, MAX_PATH); hr = IStorage_OpenStorage(stg, name, NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, NULL, 0, &inner); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr); ok(inner != NULL, "Expected non-NULL storage\n");
MultiByteToWideChar(CP_ACP, 0, "storage.bin", -1, name, MAX_PATH); hr = IStorage_OpenStream(inner, name, NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stm); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr); ok(stm != NULL, "Expected non-NULL stream\n");
hr = IStream_Read(stm, buf, MAX_PATH, &size); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); - ok(size == 8, "Expected 8, got %d\n", size); + ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr); + ok(size == 8, "Expected 8, got %lu\n", size); ok(!lstrcmpA(buf, "stgdata"), "Expected "stgdata", got "%s"\n", buf);
IStream_Release(stm); @@ -7248,7 +7249,7 @@ static void test_dbtopackage(void) create_custom_action_table(hdb); add_custom_action_entry(hdb, "'SetProp', 51, 'MYPROP', 'grape'");
- sprintf(package, "#%u", hdb); + sprintf(package, "#%lu", hdb); r = MsiOpenPackageA(package, &hpkg); if (r == ERROR_INSTALL_PACKAGE_REJECTED) { @@ -7263,7 +7264,7 @@ static void test_dbtopackage(void) r = MsiGetPropertyA(hpkg, "MYPROP", buf, &size); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(!lstrcmpA(buf, ""), "Expected "", got "%s"\n", buf); - ok(size == 0, "Expected 0, got %d\n", size); + ok(size == 0, "Expected 0, got %lu\n", size);
/* run the custom action to set the property */ r = MsiDoActionA(hpkg, "SetProp"); @@ -7275,7 +7276,7 @@ static void test_dbtopackage(void) r = MsiGetPropertyA(hpkg, "MYPROP", buf, &size); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(!lstrcmpA(buf, "grape"), "Expected "grape", got "%s"\n", buf); - ok(size == 5, "Expected 5, got %d\n", size); + ok(size == 5, "Expected 5, got %lu\n", size);
MsiCloseHandle(hpkg);
@@ -7291,7 +7292,7 @@ static void test_dbtopackage(void) todo_wine { ok(!lstrcmpA(buf, ""), "Expected "", got "%s"\n", buf); - ok(size == 0, "Expected 0, got %d\n", size); + ok(size == 0, "Expected 0, got %lu\n", size); }
MsiCloseHandle(hdb); @@ -7308,7 +7309,7 @@ static void test_dbtopackage(void) create_custom_action_table(hdb); add_custom_action_entry(hdb, "'SetProp', 51, 'MYPROP', 'grape'");
- sprintf(package, "#%u", hdb); + sprintf(package, "#%lu", hdb); r = MsiOpenPackageA(package, &hpkg); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
@@ -7318,7 +7319,7 @@ static void test_dbtopackage(void) r = MsiGetPropertyA(hpkg, "MYPROP", buf, &size); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(!lstrcmpA(buf, ""), "Expected "", got "%s"\n", buf); - ok(size == 0, "Expected 0, got %d\n", size); + ok(size == 0, "Expected 0, got %lu\n", size);
/* run the custom action to set the property */ r = MsiDoActionA(hpkg, "SetProp"); @@ -7330,7 +7331,7 @@ static void test_dbtopackage(void) r = MsiGetPropertyA(hpkg, "MYPROP", buf, &size); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(!lstrcmpA(buf, "grape"), "Expected "grape", got "%s"\n", buf); - ok(size == 5, "Expected 5, got %d\n", size); + ok(size == 5, "Expected 5, got %lu\n", size);
MsiCloseHandle(hpkg);
@@ -7346,7 +7347,7 @@ static void test_dbtopackage(void) todo_wine { ok(!lstrcmpA(buf, ""), "Expected "", got "%s"\n", buf); - ok(size == 0, "Expected 0, got %d\n", size); + ok(size == 0, "Expected 0, got %lu\n", size); }
MsiCloseHandle(hpkg); @@ -8583,7 +8584,8 @@ static void test_embedded_nulls(void) "s72\tL0\n" "Control\tDialog\n" "LicenseAgreementDlg\ttext\x11\x19text\0text"; - UINT r, sz; + UINT r; + DWORD sz; MSIHANDLE hdb, hrec; char buffer[32];
@@ -9208,7 +9210,7 @@ static void test_view_get_error(void) sz = 0; err = MsiViewGetErrorA(0, NULL, &sz); ok(err == MSIDBERROR_INVALIDARG, "got %d\n", err); - ok(sz == 0, "got size %u\n", sz); + ok(sz == 0, "got size %lu\n", sz);
err = MsiViewGetErrorA(view, NULL, NULL); ok(err == MSIDBERROR_INVALIDARG, "got %d\n", err); @@ -9216,21 +9218,21 @@ static void test_view_get_error(void) sz = 0; err = MsiViewGetErrorA(view, NULL, &sz); ok(err == MSIDBERROR_NOERROR, "got %d\n", err); - ok(sz == 0, "got size %u\n", sz); + ok(sz == 0, "got size %lu\n", sz);
sz = 0; strcpy(buffer, "x"); err = MsiViewGetErrorA(view, buffer, &sz); ok(err == MSIDBERROR_MOREDATA, "got %d\n", err); ok(!strcmp(buffer, "x"), "got "%s"\n", buffer); - ok(sz == 0, "got size %u\n", sz); + ok(sz == 0, "got size %lu\n", sz);
sz = 1; strcpy(buffer, "x"); err = MsiViewGetErrorA(view, buffer, &sz); ok(err == MSIDBERROR_NOERROR, "got %d\n", err); ok(!buffer[0], "got "%s"\n", buffer); - ok(sz == 0, "got size %u\n", sz); + ok(sz == 0, "got size %lu\n", sz);
rec = MsiCreateRecord(2); MsiRecordSetInteger(rec, 1, 1); @@ -9243,14 +9245,14 @@ static void test_view_get_error(void) err = MsiViewGetErrorA(view, buffer, &sz); ok(err == MSIDBERROR_DUPLICATEKEY, "got %d\n", err); ok(!strcmp(buffer, "A"), "got "%s"\n", buffer); - ok(sz == 1, "got size %u\n", sz); + ok(sz == 1, "got size %lu\n", sz);
sz = 2; strcpy(buffer, "x"); err = MsiViewGetErrorA(view, buffer, &sz); todo_wine ok(err == MSIDBERROR_NOERROR, "got %d\n", err); todo_wine ok(!buffer[0], "got "%s"\n", buffer); - todo_wine ok(sz == 0, "got size %u\n", sz); + todo_wine ok(sz == 0, "got size %lu\n", sz);
r = MsiViewModify(view, MSIMODIFY_VALIDATE_NEW, rec); ok(r == ERROR_INVALID_DATA, "got %u\n", r); @@ -9260,14 +9262,14 @@ static void test_view_get_error(void) err = MsiViewGetErrorA(view, buffer, &sz); ok(err == MSIDBERROR_MOREDATA, "got %d\n", err); ok(!buffer[0], "got "%s"\n", buffer); - ok(sz == 1, "got size %u\n", sz); + ok(sz == 1, "got size %lu\n", sz);
sz = 1; strcpy(buffer, "x"); err = MsiViewGetErrorA(view, buffer, &sz); todo_wine ok(err == MSIDBERROR_NOERROR, "got %d\n", err); ok(!buffer[0], "got "%s"\n", buffer); - todo_wine ok(sz == 0, "got size %u\n", sz); + todo_wine ok(sz == 0, "got size %lu\n", sz);
r = MsiViewModify(view, MSIMODIFY_VALIDATE_NEW, rec); ok(r == ERROR_INVALID_DATA, "got %u\n", r); @@ -9277,14 +9279,14 @@ static void test_view_get_error(void) err = MsiViewGetErrorA(view, buffer, &sz); ok(err == MSIDBERROR_MOREDATA, "got %d\n", err); ok(!strcmp(buffer, "x"), "got "%s"\n", buffer); - ok(sz == 1, "got size %u\n", sz); + ok(sz == 1, "got size %lu\n", sz);
sz = 0; strcpy(buffer, "x"); err = MsiViewGetErrorA(view, buffer, &sz); ok(err == MSIDBERROR_MOREDATA, "got %d\n", err); ok(!strcmp(buffer, "x"), "got "%s"\n", buffer); - todo_wine ok(sz == 0, "got size %u\n", sz); + todo_wine ok(sz == 0, "got size %lu\n", sz);
MsiCloseHandle(rec); MsiCloseHandle(view); diff --git a/modules/rostests/winetests/msi/format.c b/modules/rostests/winetests/msi/format.c index 06f901fb84c..1cf2021214c 100644 --- a/modules/rostests/winetests/msi/format.c +++ b/modules/rostests/winetests/msi/format.c @@ -35,7 +35,7 @@ static UINT package_from_db(MSIHANDLE hdb, MSIHANDLE *handle) CHAR szPackage[12]; MSIHANDLE hPackage;
- sprintf(szPackage, "#%u", hdb); + sprintf(szPackage, "#%lu", hdb); res = MsiOpenPackageA(szPackage, &hPackage); if (res != ERROR_SUCCESS) return res; @@ -205,7 +205,7 @@ static void test_formatrecord(void) sz = 123; r = MsiFormatRecordA(0, hrec, NULL, &sz); ok( r == ERROR_SUCCESS, "format failed with empty buffer\n"); - ok( sz == 2, "size wrong (%i)\n",sz); + ok( sz == 2, "size wrong (%lu)\n",sz); sz = sizeof buffer; buffer[0] = 'x'; buffer[1] = 0; @@ -296,7 +296,7 @@ static void test_formatrecord(void) sz = sizeof buffer; r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 30, "size wrong %i\n",sz); + ok( sz == 30, "size wrong %lu\n",sz); ok( 0 == strcmp(buffer,"1: boo 2: hoo 3: 4: 5: 6: "), "wrong output(%s)\n",buffer);
@@ -308,7 +308,7 @@ static void test_formatrecord(void) sz = sizeof buffer; r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 31, "size wrong %i\n",sz); + ok( sz == 31, "size wrong %lu\n",sz); ok( 0 == strcmp(buffer,"1: 123 2: 4567 3: 4: 5: 6: "), "wrong output(%s)\n",buffer);
@@ -322,7 +322,7 @@ static void test_formatrecord(void) sz = sizeof buffer; r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 7, "size wrong,(%i)\n",sz); + ok( sz == 7, "size wrong,(%lu)\n",sz); ok( 0 == strcmp(buffer,"hey hey"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "[[1]] [2]"); @@ -334,7 +334,7 @@ static void test_formatrecord(void) sz = sizeof buffer; r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 9, "size wrong,(%i)\n",sz); + ok( sz == 9, "size wrong,(%lu)\n",sz); ok( 0 == strcmp(buffer,"[[2]] hey"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "[[[3]]] [2]"); @@ -348,7 +348,7 @@ static void test_formatrecord(void) sz = sizeof buffer; r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 7, "size wrong,(%i)\n",sz); + ok( sz == 7, "size wrong,(%lu)\n",sz); ok( 0 == strcmp(buffer,"hey hey"), "wrong output (%s)\n",buffer);
r = MsiCloseHandle(hrec); @@ -369,7 +369,7 @@ static void test_formatrecord(void) sz = sizeof buffer; r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 7, "size wrong,(%i)\n",sz); + ok( sz == 7, "size wrong,(%lu)\n",sz); ok( 0 == strcmp(buffer,"big hey"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "[[3][4][1]] [2]"); @@ -387,7 +387,7 @@ static void test_formatrecord(void) sz = sizeof buffer; r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 7, "size wrong,(%i)\n",sz); + ok( sz == 7, "size wrong,(%lu)\n",sz); ok( 0 == strcmp(buffer,"big hey"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "[[3][[4]][1]] [2]"); @@ -405,7 +405,7 @@ static void test_formatrecord(void) sz = sizeof buffer; r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 10, "size wrong,(%i)\n",sz); + ok( sz == 10, "size wrong,(%lu)\n",sz); ok( 0 == strcmp(buffer,"[1[]2] hey"), "wrong output (%s)\n",buffer);
/* incorrect formats */ @@ -424,7 +424,7 @@ static void test_formatrecord(void) sz = sizeof buffer; r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 18, "size wrong,(%i)\n",sz); + ok( sz == 18, "size wrong,(%lu)\n",sz); ok( 0 == strcmp(buffer,"[[[3][[4]][1]] [2]"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "[[3][[4]][1]] [2]]"); @@ -442,7 +442,7 @@ static void test_formatrecord(void) sz = sizeof buffer; r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 11, "size wrong,(%i)\n",sz); + ok( sz == 11, "size wrong,(%lu)\n",sz); ok( 0 == strcmp(buffer,"[1[]2] hey]"), "wrong output (%s)\n",buffer);
@@ -463,7 +463,7 @@ static void test_formatrecord(void) sz = sizeof buffer; r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 6, "size wrong,(%i)\n",sz); + ok( sz == 6, "size wrong,(%lu)\n",sz); ok( 0 == strcmp(buffer,"12 hey"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "[{[3][1]}] [2]"); @@ -481,10 +481,9 @@ static void test_formatrecord(void) sz = sizeof buffer; r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 8, "size wrong,(%i)\n",sz); + ok( sz == 8, "size wrong,(%lu)\n",sz); ok( 0 == strcmp(buffer,"[12] hey"), "wrong output (%s)\n",buffer);
- r = MsiRecordSetStringA(hrec, 0, "{test} [2]"); ok( r == ERROR_SUCCESS, "set string failed\n"); r = MsiRecordSetStringA(hrec, 1, "2"); @@ -500,7 +499,7 @@ static void test_formatrecord(void) sz = sizeof buffer; r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 10, "size wrong,(%i)\n",sz); + ok( sz == 10, "size wrong,(%lu)\n",sz); ok( 0 == strcmp(buffer,"{test} hey"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "{[test]} [2]"); @@ -518,7 +517,7 @@ static void test_formatrecord(void) sz = sizeof buffer; r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 12, "size wrong,(%i)\n",sz); + ok( sz == 12, "size wrong,(%lu)\n",sz); ok( 0 == strcmp(buffer,"{[test]} hey"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "{[1][2][3][4]} [2]"); @@ -536,7 +535,7 @@ static void test_formatrecord(void) sz = sizeof buffer; r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 4, "size wrong,(%i)\n",sz); + ok( sz == 4, "size wrong,(%lu)\n",sz); ok( 0 == strcmp(buffer," hey"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "{[1][2][3][dummy]} [2]"); @@ -554,7 +553,7 @@ static void test_formatrecord(void) sz = sizeof buffer; r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 18, "size wrong,(%i)\n",sz); + ok( sz == 18, "size wrong,(%lu)\n",sz); ok( 0 == strcmp(buffer,"{2hey1[dummy]} hey"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "{[1][2][3][4][dummy]} [2]"); @@ -572,7 +571,7 @@ static void test_formatrecord(void) sz = sizeof buffer; r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 18, "size wrong,(%i)\n",sz); + ok( sz == 18, "size wrong,(%lu)\n",sz); ok( 0 == strcmp(buffer,"{2hey1[dummy]} hey"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "{{[1][2]}[3][4][dummy]}"); @@ -590,7 +589,7 @@ static void test_formatrecord(void) sz = sizeof buffer; r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 16, "size wrong,(%i)\n",sz); + ok( sz == 16, "size wrong,(%lu)\n",sz); ok( 0 == strcmp(buffer,"{{2hey}1[dummy]}"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "{{[1][2]}[3]{[4][dummy]}}"); @@ -608,7 +607,7 @@ static void test_formatrecord(void) sz = sizeof buffer; r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 0, "size wrong,(%i)\n",sz); + ok( sz == 0, "size wrong,(%lu)\n",sz); ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "{{[1][2]}[3]} {[1][2]}"); @@ -626,7 +625,7 @@ static void test_formatrecord(void) sz = sizeof buffer; r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 12, "size wrong,(%i)\n",sz); + ok( sz == 12, "size wrong,(%lu)\n",sz); ok( 0 == strcmp(buffer,"{{12}3} {12}"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "{[1][2]} {{[1][2]}[3]} {[1][2]}"); @@ -644,7 +643,7 @@ static void test_formatrecord(void) sz = sizeof buffer; r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 15, "size wrong,(%i)\n",sz); + ok( sz == 15, "size wrong,(%lu)\n",sz); ok( 0 == strcmp(buffer,"12 {{12}3} {12}"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "{[4]}{[1][2]} {{[1][2]}[3]} {[1][2]}"); @@ -662,7 +661,7 @@ static void test_formatrecord(void) sz = sizeof buffer; r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 15, "size wrong,(%i)\n",sz); + ok( sz == 15, "size wrong,(%lu)\n",sz); ok( 0 == strcmp(buffer,"12 {{12}3} {12}"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "{blah} {[4]}{[1][2]} {{[1][2]}[3]} {[1][2]}"); @@ -680,7 +679,7 @@ static void test_formatrecord(void) sz = sizeof buffer; r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 22, "size wrong,(%i)\n",sz); + ok( sz == 22, "size wrong,(%lu)\n",sz); ok( 0 == strcmp(buffer,"{blah} 12 {{12}3} {12}"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "{{[1]}[2]} {[4]}{[1][2]}"); @@ -698,7 +697,7 @@ static void test_formatrecord(void) sz = sizeof buffer; r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 13, "size wrong,(%i)\n",sz); + ok( sz == 13, "size wrong,(%lu)\n",sz); ok( 0 == strcmp(buffer,"{{1}2} {}{12}"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "{{[1]}} {[4]}{[1][2]}"); @@ -716,7 +715,7 @@ static void test_formatrecord(void) sz = sizeof buffer; r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 3, "size wrong,(%i)\n",sz); + ok( sz == 3, "size wrong,(%lu)\n",sz); ok( 0 == strcmp(buffer," 12"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "{{{[1]}} {[4]}{[1][2]}"); @@ -735,10 +734,10 @@ static void test_formatrecord(void) r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); todo_wine{ - ok( sz == 3, "size wrong,(%i)\n",sz); + ok( sz == 3, "size wrong,(%lu)\n",sz); ok( 0 == strcmp(buffer," 12"), "wrong output (%s)\n",buffer); } - + /* now put play games with escaping */ r = MsiRecordSetStringA(hrec, 0, "[1] [2] [\3asdf]"); ok( r == ERROR_SUCCESS, "set string failed\n"); @@ -770,7 +769,7 @@ static void test_formatrecord(void) sz = sizeof buffer; r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 4, "size wrong: %d\n", sz); + ok( sz == 4, "size wrong: %lu\n", sz); ok( 0 == strcmp(buffer,"[\x]"), "wrong output: %s\n", buffer);
r = MsiRecordSetStringA(hrec, 0, "{\x}"); @@ -778,7 +777,7 @@ static void test_formatrecord(void) sz = sizeof buffer; r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 4, "size wrong: %d\n", sz); + ok( sz == 4, "size wrong: %lu\n", sz); ok( 0 == strcmp(buffer,"{\x}"), "wrong output: %s\n", buffer);
r = MsiRecordSetStringA(hrec, 0, "[abc\x]"); @@ -786,7 +785,7 @@ static void test_formatrecord(void) sz = sizeof buffer; r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 7, "size wrong: %d\n", sz); + ok( sz == 7, "size wrong: %lu\n", sz); ok( 0 == strcmp(buffer,"[abc\x]"), "wrong output: %s\n", buffer);
r = MsiRecordSetStringA(hrec, 0, "[\[]Bracket Text[\]]"); @@ -794,7 +793,7 @@ static void test_formatrecord(void) sz = sizeof buffer; r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 20, "size wrong: %d\n", sz); + ok( sz == 20, "size wrong: %lu\n", sz); ok( 0 == strcmp(buffer,"[\[]Bracket Text[\]]"), "wrong output: %s\n", buffer);
/* now try other formats without a package */ @@ -1091,7 +1090,7 @@ static void test_formatrecord(void) sz = sizeof(buffer); r = MsiFormatRecordA(0, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 4, "Expected 4, got %d\n", sz); + ok(sz == 4, "Expected 4, got %lu\n", sz); ok(!lstrcmpA(buffer, "[\[]"), "Expected "[\[]", got "%s"\n", buffer);
r = MsiRecordSetStringA(hrec, 0, "[foo]"); @@ -1329,7 +1328,7 @@ static void test_formatrecord(void) r = MsiFormatRecordA(0, hrec, buffer, &sz); todo_wine { - ok( sz == 12, "size wrong: got %u, expected 12\n", sz); + ok( sz == 12, "size wrong: got %lu, expected 12\n", sz); ok( 0 == strcmp(buffer,"{[1{{boo}}]}"), "wrong output: got %s, expected [1]\n", buffer); } ok( r == ERROR_SUCCESS, "format failed\n"); @@ -1340,7 +1339,7 @@ static void test_formatrecord(void) ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; r = MsiFormatRecordA(0, hrec, buffer, &sz); - ok( sz == 6, "size wrong: got %u, expected 3\n", sz); + ok( sz == 6, "size wrong: got %lu, expected 3\n", sz); ok( 0 == strcmp(buffer,"{{hoo}"), "wrong output: got %s, expected [1]\n", buffer); ok( r == ERROR_SUCCESS, "format failed\n");
@@ -1525,7 +1524,7 @@ static void test_formatrecord(void) ok( r == ERROR_SUCCESS, "set string failed\n"); r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 6, "size wrong(%i)\n",sz); + ok( sz == 6, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,"{abcd}"), "wrong output (%s)\n",buffer);
sz = sizeof buffer; @@ -1533,7 +1532,7 @@ static void test_formatrecord(void) ok( r == ERROR_SUCCESS, "set string failed\n"); r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 23, "size wrong(%i)\n",sz); + ok( sz == 23, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,"{a[one]bc[two]de[one]f}"), "wrong output (%s)\n",buffer);
sz = sizeof buffer; @@ -1541,7 +1540,7 @@ static void test_formatrecord(void) ok( r == ERROR_SUCCESS, "set string failed\n"); r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 23, "size wrong(%i)\n",sz); + ok( sz == 23, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,"{a[one]bc[bad]de[two]f}"), "wrong output (%s)\n",buffer);
sz = sizeof buffer; @@ -1549,7 +1548,7 @@ static void test_formatrecord(void) ok( r == ERROR_SUCCESS, "set string failed\n"); r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 7, "size wrong(%i)\n",sz); + ok( sz == 7, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,"{[bad]}"), "wrong output (%s)\n",buffer);
sz = sizeof buffer; @@ -1557,7 +1556,7 @@ static void test_formatrecord(void) ok( r == ERROR_SUCCESS, "set string failed\n"); r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 14, "size wrong(%i)\n",sz); + ok( sz == 14, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,"{abc{d[one]ef}"), "wrong output (%s)\n",buffer);
sz = sizeof buffer; @@ -1565,7 +1564,7 @@ static void test_formatrecord(void) ok( r == ERROR_SUCCESS, "set string failed\n"); r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 15, "size wrong(%i)\n",sz); + ok( sz == 15, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,"{abc{d[one]ef}}"), "wrong output (%s)\n",buffer);
sz = sizeof buffer; @@ -1573,7 +1572,7 @@ static void test_formatrecord(void) ok( r == ERROR_SUCCESS, "set string failed\n"); r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 5, "size wrong(%i)\n",sz); + ok( sz == 5, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,"{abc}"), "wrong output (%s)\n",buffer);
sz = sizeof buffer; @@ -1581,7 +1580,7 @@ static void test_formatrecord(void) ok( r == ERROR_SUCCESS, "set string failed\n"); r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 0, "size wrong(%i)\n",sz); + ok( sz == 0, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer);
sz = sizeof buffer; @@ -1589,7 +1588,7 @@ static void test_formatrecord(void) ok( r == ERROR_SUCCESS, "set string failed\n"); r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 0, "size wrong(%i)\n",sz); + ok( sz == 0, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer);
sz = sizeof buffer; @@ -1599,7 +1598,7 @@ static void test_formatrecord(void) ok( r == ERROR_SUCCESS, "format failed\n"); todo_wine { - ok( sz == 7, "size wrong(%i)\n",sz); + ok( sz == 7, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,"hi{jk}}"), "wrong output (%s)\n",buffer); }
@@ -1610,7 +1609,7 @@ static void test_formatrecord(void) ok( r == ERROR_SUCCESS, "format failed\n"); todo_wine { - ok( sz == 1, "size wrong(%i)\n",sz); + ok( sz == 1, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,"}"), "wrong output (%s)\n",buffer); }
@@ -1619,7 +1618,7 @@ static void test_formatrecord(void) ok( r == ERROR_SUCCESS, "set string failed\n"); r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 0, "size wrong(%i)\n",sz); + ok( sz == 0, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer);
sz = sizeof buffer; @@ -1627,7 +1626,7 @@ static void test_formatrecord(void) ok( r == ERROR_SUCCESS, "set string failed\n"); r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 0, "size wrong(%i)\n",sz); + ok( sz == 0, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer);
sz = sizeof buffer; @@ -1635,7 +1634,7 @@ static void test_formatrecord(void) ok( r == ERROR_SUCCESS, "set string failed\n"); r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 7, "size wrong(%i)\n",sz); + ok( sz == 7, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,"{a{b}c}"), "wrong output (%s)\n",buffer);
sz = sizeof buffer; @@ -1643,7 +1642,7 @@ static void test_formatrecord(void) ok( r == ERROR_SUCCESS, "set string failed\n"); r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 6, "size wrong(%i)\n",sz); + ok( sz == 6, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,"{a{b}}"), "wrong output (%s)\n",buffer);
sz = sizeof buffer; @@ -1651,7 +1650,7 @@ static void test_formatrecord(void) ok( r == ERROR_SUCCESS, "set string failed\n"); r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 6, "size wrong(%i)\n",sz); + ok( sz == 6, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,"{{b}c}"), "wrong output (%s)\n",buffer);
sz = sizeof buffer; @@ -1661,7 +1660,7 @@ static void test_formatrecord(void) ok( r == ERROR_SUCCESS, "format failed\n"); todo_wine { - ok( sz == 2, "size wrong(%i)\n",sz); + ok( sz == 2, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,"}}"), "wrong output (%s)\n",buffer); }
@@ -1672,7 +1671,7 @@ static void test_formatrecord(void) ok( r == ERROR_SUCCESS, "set string failed\n"); r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 8, "size wrong(%i)\n",sz); + ok( sz == 8, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,"100 -100"), "wrong output (%s)\n",buffer);
sz = sizeof(buffer); @@ -1682,7 +1681,7 @@ static void test_formatrecord(void) ok( r == ERROR_SUCCESS, "set string failed\n"); r = MsiFormatRecordA(0, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 33, "Expected 33, got %d\n",sz); + ok(sz == 33, "Expected 33, got %lu\n",sz); ok(!lstrcmpA(buffer, "one {[noprop] [twoprop]} {abcdef}"), "Expected "one {[noprop] [twoprop]} {abcdef}", got "%s"\n", buffer);
@@ -1693,7 +1692,7 @@ static void test_formatrecord(void) ok( r == ERROR_SUCCESS, "set string failed\n"); r = MsiFormatRecordA(0, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 29, "Expected 29, got %d\n",sz); + ok(sz == 29, "Expected 29, got %lu\n",sz); ok(!lstrcmpA(buffer, "one {[noprop] [one]} {abcdef}"), "Expected "one {[noprop] [one]} {abcdef}", got "%s"\n", buffer);
@@ -1704,7 +1703,7 @@ static void test_formatrecord(void) ok( r == ERROR_SUCCESS, "set string failed\n"); r = MsiFormatRecordA(0, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 20, "Expected 20, got %d\n",sz); + ok(sz == 20, "Expected 20, got %lu\n",sz); ok(!lstrcmpA(buffer, "one {[one]} {abcdef}"), "Expected "one {[one]} {abcdef}", got "%s"\n", buffer);
@@ -1766,7 +1765,7 @@ static void test_formatrecord_package(void) sz = sizeof buffer; r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed with empty buffer (%i)\n",r); - ok( sz == 51, "size wrong (%i)\n",sz); + ok( sz == 51, "size wrong (%lu)\n",sz); ok( 0 == strcmp(buffer,"1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: "), "wrong output(%s)\n",buffer);
r = MsiSetPropertyA(package, "prop", "val"); @@ -1789,7 +1788,7 @@ static void test_formatrecord_package(void) ok( r == ERROR_SUCCESS, "format failed with empty buffer (%i)\n",r); todo_wine { - ok( sz == 66, "size wrong (%i)\n",sz); + ok( sz == 66, "size wrong (%lu)\n",sz); ok( !lstrcmpA(buffer, "1: [2] 2: stuff 3: prop 4: val 5: 6: 7: 8: 9: 10: 11: 12: "), "wrong output(%s)\n",buffer); @@ -1805,7 +1804,7 @@ static void test_formatrecord_package(void) sz = sizeof buffer; r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 9, "size wrong(%i)\n",sz); + ok( sz == 9, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,"boo hoo 3"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "[1] [2] [\x]"); @@ -1817,77 +1816,77 @@ static void test_formatrecord_package(void) sz = sizeof buffer; r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 9, "size wrong(%i)\n",sz); + ok( sz == 9, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,"boo hoo x"), "wrong output (%s)\n",buffer);
MsiRecordSetStringA(hrec, 0, "[\x]"); sz = sizeof buffer; r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 1, "size wrong: %d\n", sz); + ok( sz == 1, "size wrong: %lu\n", sz); ok( 0 == strcmp(buffer,"x"), "wrong output: %s\n", buffer);
MsiRecordSetStringA(hrec, 0, "{\x}"); sz = sizeof buffer; r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 4, "size wrong: %d\n", sz); + ok( sz == 4, "size wrong: %lu\n", sz); ok( 0 == strcmp(buffer,"{\x}"), "wrong output: %s\n", buffer);
MsiRecordSetStringA(hrec, 0, "[abc\x]"); sz = sizeof buffer; r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 0, "size wrong: %d\n", sz); + ok( sz == 0, "size wrong: %lu\n", sz); ok( 0 == strcmp(buffer,""), "wrong output: %s\n", buffer);
MsiRecordSetStringA(hrec, 0, "[abc\xdef]"); sz = sizeof buffer; r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 0, "size wrong: %d\n", sz); + ok( sz == 0, "size wrong: %lu\n", sz); ok( 0 == strcmp(buffer,""), "wrong output: %s\n", buffer);
MsiRecordSetStringA(hrec, 0, "\x"); sz = sizeof(buffer); r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 2, "Expected 2, got %d\n", sz); + ok(sz == 2, "Expected 2, got %lu\n", sz); ok(!lstrcmpA(buffer, "\x"), "Expected "\x", got "%s"\n", buffer);
MsiRecordSetStringA(hrec, 0, "[\["); sz = sizeof(buffer); r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 3, "Expected 3, got %d\n", sz); + ok(sz == 3, "Expected 3, got %lu\n", sz); ok(!lstrcmpA(buffer, "[\["), "Expected "[\[", got "%s"\n", buffer);
MsiRecordSetStringA(hrec, 0, "[\[]"); sz = sizeof(buffer); r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 1, "Expected 1, got %d\n", sz); + ok(sz == 1, "Expected 1, got %lu\n", sz); ok(!lstrcmpA(buffer, "["), "Expected "[", got "%s"\n", buffer);
MsiRecordSetStringA(hrec, 0, "[[]"); sz = sizeof(buffer); r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 3, "Expected 3, got %d\n", sz); + ok(sz == 3, "Expected 3, got %lu\n", sz); ok(!lstrcmpA(buffer, "[[]"), "Expected "[]", got "%s"\n", buffer);
MsiRecordSetStringA(hrec, 0, "[\[]]"); sz = sizeof(buffer); r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 2, "Expected 2, got %d\n", sz); + ok(sz == 2, "Expected 2, got %lu\n", sz); ok(!lstrcmpA(buffer, "[]"), "Expected "[]", got "%s"\n", buffer);
MsiRecordSetStringA(hrec, 0, "[\[a]"); sz = sizeof(buffer); r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 1, "Expected 1, got %d\n", sz); + ok(sz == 1, "Expected 1, got %lu\n", sz); ok(!lstrcmpA(buffer, "["), "Expected "[", got "%s"\n", buffer);
MsiRecordSetStringA(hrec, 0, "[\a[]"); @@ -1896,7 +1895,7 @@ static void test_formatrecord_package(void) ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); todo_wine { - ok(sz == 1, "Expected 1, got %d\n", sz); + ok(sz == 1, "Expected 1, got %lu\n", sz); ok(!lstrcmpA(buffer, "a"), "Expected "a", got "%s"\n", buffer); }
@@ -1904,14 +1903,14 @@ static void test_formatrecord_package(void) sz = sizeof(buffer); r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 3, "Expected 3, got %d\n", sz); + ok(sz == 3, "Expected 3, got %lu\n", sz); ok(!lstrcmpA(buffer, "val"), "Expected "val", got "%s"\n", buffer);
MsiRecordSetStringA(hrec, 0, "[prop] [pro\pblah] [prop]"); sz = sizeof(buffer); r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 8, "Expected 8, got %d\n", sz); + ok(sz == 8, "Expected 8, got %lu\n", sz); ok(!lstrcmpA(buffer, "val val"), "Expected "val val", got "%s"\n", buffer);
MsiSetPropertyA(package, "b", "ball"); @@ -1919,35 +1918,35 @@ static void test_formatrecord_package(void) sz = sizeof(buffer); r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 1, "Expected 1, got %d\n", sz); + ok(sz == 1, "Expected 1, got %lu\n", sz); ok(!lstrcmpA(buffer, "b"), "Expected "b", got "%s"\n", buffer);
MsiRecordSetStringA(hrec, 0, "[\c]"); sz = sizeof(buffer); r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 1, "Expected 1, got %d\n", sz); + ok(sz == 1, "Expected 1, got %lu\n", sz); ok(!lstrcmpA(buffer, "c"), "Expected "c", got "%s"\n", buffer);
MsiRecordSetStringA(hrec, 0, "[\[]prop]"); sz = sizeof(buffer); r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 6, "Expected 6, got %d\n", sz); + ok(sz == 6, "Expected 6, got %lu\n", sz); ok(!lstrcmpA(buffer, "[prop]"), "Expected "[prop]", got "%s"\n", buffer);
MsiRecordSetStringA(hrec, 0, "[\a]prop]"); sz = sizeof(buffer); r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 6, "Expected 6, got %d\n", sz); + ok(sz == 6, "Expected 6, got %lu\n", sz); ok(!lstrcmpA(buffer, "aprop]"), "Expected "aprop]", got "%s"\n", buffer);
MsiRecordSetStringA(hrec, 0, "[\[]Bracket Text[\]]"); sz = sizeof buffer; r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 14, "size wrong: %d\n", sz); + ok( sz == 14, "size wrong: %lu\n", sz); ok( 0 == strcmp(buffer,"[Bracket Text]"), "wrong output: %s\n", buffer);
/* null characters */ @@ -1960,7 +1959,7 @@ static void test_formatrecord_package(void) sz = sizeof buffer; r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 9, "size wrong: %d\n", sz); + ok( sz == 9, "size wrong: %lu\n", sz); ok( 0 == strcmp(buffer,"boo "), "wrong output: %s\n", buffer); ok(!lstrcmpA(&buffer[5], " hoo"), "Expected " hoo", got "%s"\n", &buffer[5]); @@ -1974,7 +1973,7 @@ static void test_formatrecord_package(void) sz = sizeof(buffer); r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 8, "Expected 8, got %d\n", sz); + ok(sz == 8, "Expected 8, got %lu\n", sz); ok(!lstrcmpA(buffer, "boo hoo"), "Expected "boo hoo", got "%s"\n", buffer);
/* properties */ @@ -2022,7 +2021,7 @@ static void test_formatrecord_package(void) sz = sizeof buffer; r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 12, "size wrong(%i)\n",sz); + ok( sz == 12, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,"foo baa whoa"), "wrong output (%s)\n",buffer);
r = MsiSetPropertyA(package,"dummya","1"); @@ -2042,7 +2041,7 @@ static void test_formatrecord_package(void) ok( r == ERROR_SUCCESS, "format failed\n"); todo_wine { - ok( sz == 9, "size wrong(%i)\n",sz); + ok( sz == 9, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,"1 [1] [2]"), "wrong output (%s)\n",buffer); }
@@ -2065,7 +2064,7 @@ static void test_formatrecord_package(void) sz = sizeof buffer; r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 10, "size wrong(%i)\n",sz); + ok( sz == 10, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,"\blath b 1"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "[1] [2] [[\3asdf]]"); @@ -2081,7 +2080,7 @@ static void test_formatrecord_package(void) ok( r == ERROR_SUCCESS, "format failed\n"); todo_wine { - ok( sz == 11, "size wrong(%i)\n",sz); + ok( sz == 11, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,"boo hoo [3]"), "wrong output (%s)\n",buffer); }
@@ -2096,7 +2095,7 @@ static void test_formatrecord_package(void) sz = sizeof buffer; r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 9, "size wrong(%i)\n",sz); + ok( sz == 9, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,"boo hoo h"), "wrong output (%s)\n",buffer);
/* nested properties */ @@ -2107,7 +2106,7 @@ static void test_formatrecord_package(void) MsiRecordSetStringA(hrec, 0, "[PropC]"); r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 7, "size wrong(%i)\n",sz); + ok( sz == 7, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,"[PropB]"), "wrong output (%s)\n",buffer);
MsiSetPropertyA(package, "PropA", "surprise"); @@ -2117,7 +2116,7 @@ static void test_formatrecord_package(void) MsiRecordSetStringA(hrec, 0, "[PropC]"); r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 5, "size wrong(%i)\n",sz); + ok( sz == 5, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,"PropB"), "wrong output (%s)\n",buffer);
MsiSetPropertyA(package, "PropA", "surprise"); @@ -2127,7 +2126,7 @@ static void test_formatrecord_package(void) MsiRecordSetStringA(hrec, 0, "[[PropC]]"); r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 0, "size wrong(%i)\n",sz); + ok( sz == 0, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer);
MsiSetPropertyA(package, "PropA", "surprise"); @@ -2137,7 +2136,7 @@ static void test_formatrecord_package(void) MsiRecordSetStringA(hrec, 0, "[[PropC]]"); r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 7, "size wrong(%i)\n",sz); + ok( sz == 7, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,"[PropA]"), "wrong output (%s)\n",buffer);
MsiSetPropertyA(package, "PropA", "surprise"); @@ -2147,7 +2146,7 @@ static void test_formatrecord_package(void) MsiRecordSetStringA(hrec, 0, "[[PropC]]"); r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 5, "size wrong(%i)\n",sz); + ok( sz == 5, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,"PropA"), "wrong output (%s)\n",buffer);
MsiSetPropertyA(package, "PropA", "surprise"); @@ -2157,7 +2156,7 @@ static void test_formatrecord_package(void) MsiRecordSetStringA(hrec, 0, "[[[PropC]]]"); r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 8, "size wrong(%i)\n",sz); + ok( sz == 8, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,"surprise"), "wrong output (%s)\n",buffer);
/* properties inside braces */ @@ -2165,7 +2164,7 @@ static void test_formatrecord_package(void) MsiRecordSetStringA(hrec, 0, "{abcd}"); r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 6, "size wrong(%i)\n",sz); + ok( sz == 6, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,"{abcd}"), "wrong output (%s)\n",buffer);
MsiSetPropertyA(package, "one", "mercury"); @@ -2174,7 +2173,7 @@ static void test_formatrecord_package(void) MsiRecordSetStringA(hrec, 0, "{a[one]bc[two]de[one]f}"); r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed: %d\n", r); - ok( sz == 25, "size wrong(%i)\n",sz); + ok( sz == 25, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,"amercurybcvenusdemercuryf"), "wrong output (%s)\n",buffer);
MsiSetPropertyA(package, "one", "mercury"); @@ -2184,7 +2183,7 @@ static void test_formatrecord_package(void) MsiRecordSetStringA(hrec, 0, "{a[one]bc[bad]de[two]f}"); r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 0, "size wrong(%i)\n",sz); + ok( sz == 0, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer);
MsiSetPropertyA(package, "bad", ""); @@ -2192,7 +2191,7 @@ static void test_formatrecord_package(void) MsiRecordSetStringA(hrec, 0, "{[bad]}"); r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 0, "size wrong(%i)\n",sz); + ok( sz == 0, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer);
MsiSetPropertyA(package, "one", "mercury"); @@ -2202,7 +2201,7 @@ static void test_formatrecord_package(void) ok( r == ERROR_SUCCESS, "format failed\n"); todo_wine { - ok( sz == 14, "size wrong(%i)\n",sz); + ok( sz == 14, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,"abc{dmercuryef"), "wrong output (%s)\n",buffer); }
@@ -2213,7 +2212,7 @@ static void test_formatrecord_package(void) ok( r == ERROR_SUCCESS, "format failed\n"); todo_wine { - ok( sz == 15, "size wrong(%i)\n",sz); + ok( sz == 15, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,"abc{dmercuryef}"), "wrong output (%s)\n",buffer); }
@@ -2222,7 +2221,7 @@ static void test_formatrecord_package(void) MsiRecordSetStringA(hrec, 0, "{abc}{{def}hi{j[one]k}}"); r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 5, "size wrong(%i)\n",sz); + ok( sz == 5, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,"{abc}"), "wrong output (%s)\n",buffer);
MsiSetPropertyA(package, "one", "mercury"); @@ -2231,7 +2230,7 @@ static void test_formatrecord_package(void) MsiRecordSetStringA(hrec, 0, "{{def}hi{j[one]k}}"); r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 0, "size wrong(%i)\n",sz); + ok( sz == 0, "size wrong(%lu)\n",sz); ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer);
sz = sizeof(buffer); @@ -2239,7 +2238,7 @@ static void test_formatrecord_package(void) MsiRecordSetStringA(hrec, 1, "one"); r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 13, "Expected 13, got %d\n",sz); + ok(sz == 13, "Expected 13, got %lu\n",sz); ok(!lstrcmpA(buffer, "one {abcdef}"), "Expected "one {abcdef}", got "%s"\n", buffer);
@@ -2248,7 +2247,7 @@ static void test_formatrecord_package(void) MsiRecordSetStringA(hrec, 1, "one"); r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 13, "Expected 13, got %d\n",sz); + ok(sz == 13, "Expected 13, got %lu\n",sz); ok(!lstrcmpA(buffer, "one {abcdef}"), "Expected "one {abcdef}", got "%s"\n", buffer);
@@ -2257,7 +2256,7 @@ static void test_formatrecord_package(void) MsiRecordSetStringA(hrec, 1, "one"); r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 20, "Expected 20, got %d\n",sz); + ok(sz == 20, "Expected 20, got %lu\n",sz); ok(!lstrcmpA(buffer, "one mercury {abcdef}"), "Expected "one mercury {abcdef}", got "%s"\n", buffer);
diff --git a/modules/rostests/winetests/msi/install.c b/modules/rostests/winetests/msi/install.c index ae5b03e248c..a7388a917d8 100644 --- a/modules/rostests/winetests/msi/install.c +++ b/modules/rostests/winetests/msi/install.c @@ -2640,7 +2640,7 @@ static char *load_resource(const char *name) GetTempFileNameA(".", name, 0, path);
file = CreateFileA(path, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); - ok(file != INVALID_HANDLE_VALUE, "file creation failed, at %s, error %d\n", path, GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "file creation failed, at %s, error %lu\n", path, GetLastError());
res = FindResourceA(NULL, name, "TESTDLL"); ok( res != 0, "couldn't find resource\n" ); @@ -2752,7 +2752,7 @@ static void remove_restore_point(DWORD seq_number)
res = pSRRemoveRestorePoint(seq_number); if (res != ERROR_SUCCESS) - trace("Failed to remove the restore point : %08x\n", res); + trace("Failed to remove the restore point: %#lx\n", res); }
static LONG delete_key( HKEY key, LPCSTR subkey, REGSAM access ) @@ -2811,29 +2811,29 @@ static void test_MsiInstallProduct(void) delete_pf_files();
res = RegOpenKeyExA(HKEY_CURRENT_USER, "SOFTWARE\Wine\msitest", 0, access, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
size = MAX_PATH; type = REG_SZ; res = RegQueryValueExA(hkey, "Name", NULL, &type, (LPBYTE)path, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); ok(!lstrcmpA(path, "imaname"), "Expected imaname, got %s\n", path);
size = MAX_PATH; type = REG_SZ; res = RegQueryValueExA(hkey, "blah", NULL, &type, (LPBYTE)path, &size); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
size = sizeof(num); type = REG_DWORD; res = RegQueryValueExA(hkey, "number", NULL, &type, (LPBYTE)&num, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(num == 314, "Expected 314, got %d\n", num); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); + ok(num == 314, "Expected 314, got %lu\n", num);
size = MAX_PATH; type = REG_SZ; res = RegQueryValueExA(hkey, "OrderTestName", NULL, &type, (LPBYTE)path, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); ok(!lstrcmpA(path, "OrderTestValue"), "Expected OrderTestValue, got %s\n", path);
delete_key(HKEY_CURRENT_USER, "SOFTWARE\Wine\msitest", access); @@ -2845,7 +2845,7 @@ static void test_MsiInstallProduct(void) delete_pf_files();
res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\Wine\msitest", &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); RegDeleteKeyA(HKEY_CURRENT_USER, "SOFTWARE\Wine\msitest");
create_database(msifile, up_tables, ARRAY_SIZE(up_tables)); @@ -2857,7 +2857,7 @@ static void test_MsiInstallProduct(void) delete_pf_files();
res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\Wine\msitest", &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); RegDeleteKeyA(HKEY_CURRENT_USER, "SOFTWARE\Wine\msitest");
create_database(msifile, up2_tables, ARRAY_SIZE(up2_tables)); @@ -2869,7 +2869,7 @@ static void test_MsiInstallProduct(void) delete_pf_files();
res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\Wine\msitest", &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); RegDeleteKeyA(HKEY_CURRENT_USER, "SOFTWARE\Wine\msitest");
create_database(msifile, up3_tables, ARRAY_SIZE(up3_tables)); @@ -2881,7 +2881,7 @@ static void test_MsiInstallProduct(void) delete_pf_files();
res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\Wine\msitest", &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res); RegDeleteKeyA(HKEY_CURRENT_USER, "SOFTWARE\Wine\msitest");
create_database(msifile, up4_tables, ARRAY_SIZE(up4_tables)); @@ -2893,7 +2893,7 @@ static void test_MsiInstallProduct(void) delete_pf_files();
res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\Wine\msitest", &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
create_database(msifile, up4_tables, ARRAY_SIZE(up4_tables));
@@ -2904,7 +2904,7 @@ static void test_MsiInstallProduct(void) delete_pf_files();
res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\Wine\msitest", &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
create_database(msifile, up5_tables, ARRAY_SIZE(up5_tables));
@@ -2915,7 +2915,7 @@ static void test_MsiInstallProduct(void) delete_pf_files();
res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\Wine\msitest", &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
create_database(msifile, up6_tables, ARRAY_SIZE(up6_tables));
@@ -2926,7 +2926,7 @@ static void test_MsiInstallProduct(void) delete_pf_files();
res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\Wine\msitest", &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
create_database(msifile, up7_tables, ARRAY_SIZE(up7_tables));
@@ -2937,7 +2937,7 @@ static void test_MsiInstallProduct(void) delete_pf_files();
res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\Wine\msitest", &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
r = MsiInstallProductA(msifile, "REMOVE=ALL FULL=1"); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); @@ -3789,7 +3789,7 @@ static void generate_transform_manual(void) STGM_WRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stm); if (FAILED(r)) { - ok(0, "failed to create stream %08x\n", r); + ok(0, "failed to create stream %#lx\n", r); continue; }
@@ -3996,16 +3996,16 @@ static void set_admin_property_stream(LPCSTR file) MultiByteToWideChar(CP_ACP, 0, file, -1, fileW, MAX_PATH);
hr = StgOpenStorage(fileW, NULL, mode, NULL, 0, &stg); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); + ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr); if (!stg) return;
hr = IStorage_CreateStream(stg, L"\x41ca\x4330\x3e71\x44b5\x4233\x45f5\x422c\x4836", STGM_WRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stm); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); + ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
hr = IStream_Write(stm, L"MYPROP=2718 MyProp=42", sizeof(L"MYPROP=2718 MyProp=42"), &count); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); + ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
IStream_Release(stm); IStorage_Release(stg); @@ -4725,7 +4725,7 @@ static void test_sourcepath(void) r = MsiInstallProductA(msifile, NULL); ok(r == spmap[i].err, "%d: Expected %d, got %d\n", i, spmap[i].err, r); ok(get_pf_file_size("msitest\augustus") == spmap[i].size, - "%d: Expected %d, got %d\n", i, spmap[i].size, + "%u: Expected %lu, got %lu\n", i, spmap[i].size, get_pf_file_size("msitest\augustus"));
if (r == ERROR_SUCCESS) @@ -5062,7 +5062,7 @@ static void test_shortcut(void) ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
hr = CoInitializeEx(NULL, COINIT_MULTITHREADED); - ok(SUCCEEDED(hr), "CoInitialize failed 0x%08x\n", hr); + ok(SUCCEEDED(hr), "CoInitialize failed %#lx\n", hr);
r = MsiInstallProductA(msifile, NULL); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); @@ -5070,7 +5070,7 @@ static void test_shortcut(void) CoUninitialize();
hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - ok(SUCCEEDED(hr), "CoInitialize failed 0x%08x\n", hr); + ok(SUCCEEDED(hr), "CoInitialize failed %#lx\n", hr);
r = MsiInstallProductA(msifile, NULL); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); @@ -5262,14 +5262,14 @@ static void process_pending_renames(HKEY hkey) BOOL found = FALSE;
ret = RegQueryValueExA(hkey, rename_ops, NULL, NULL, NULL, &size); - ok(!ret, "RegQueryValueExA failed %d\n", ret); + ok(!ret, "RegQueryValueExA failed %ld\n", ret);
buf = malloc(size + 1); buf2ptr = buf2 = calloc(1, size + 1);
ret = RegQueryValueExA(hkey, rename_ops, NULL, NULL, (LPBYTE)buf, &size); buf[size] = 0; - ok(!ret, "RegQueryValueExA failed %d\n", ret); + ok(!ret, "RegQueryValueExA failed %ld\n", ret); if (ret) return;
for (src = buf; *src; src = dst + strlen(dst) + 1) @@ -5300,12 +5300,12 @@ static void process_pending_renames(HKEY hkey) { if (dst[0] == '\' && dst[1] == '?' && dst[2] == '?' && dst[3] == '\') dst += 4; fileret = MoveFileExA(src, dst, flags); - ok(fileret, "Failed to move file %s -> %s (%u)\n", src, dst, GetLastError()); + ok(fileret, "Failed to move file %s -> %s (%lu)\n", src, dst, GetLastError()); } else { fileret = DeleteFileA(src); - ok(fileret || broken(!fileret) /* win2k3 */, "Failed to delete file %s (%u)\n", src, GetLastError()); + ok(fileret || broken(!fileret) /* win2k3 */, "Failed to delete file %s (%lu)\n", src, GetLastError()); } }
@@ -5327,7 +5327,7 @@ static BOOL file_matches_data(LPCSTR file, LPCSTR data) char buf[128];
handle = CreateFileA(file, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); - ok(handle != INVALID_HANDLE_VALUE, "failed to open %s (%u)\n", file, GetLastError()); + ok(handle != INVALID_HANDLE_VALUE, "failed to open %s (%lu)\n", file, GetLastError());
if (ReadFile(handle, buf, sizeof(buf), &len, NULL) && len >= data_len) { @@ -5872,25 +5872,25 @@ static void test_mixed_package(void) ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\Wine\msitest", 0, KEY_ALL_ACCESS|KEY_WOW64_32KEY, &hkey); - ok(!res, "can't open 32-bit component key, got %d\n", res); + ok(!res, "can't open 32-bit component key, got %ld\n", res); res = RegQueryValueExA(hkey, "test1", NULL, NULL, NULL, NULL); - ok(!res, "expected RegQueryValueEx to succeed, got %d\n", res); + ok(!res, "expected RegQueryValueEx to succeed, got %ld\n", res); res = RegQueryValueExA(hkey, "test2", NULL, NULL, NULL, NULL); - ok(res, "expected RegQueryValueEx to fail, got %d\n", res); + ok(res, "expected RegQueryValueEx to fail, got %ld\n", res); RegCloseKey(hkey);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\Wine\msitest", 0, KEY_ALL_ACCESS|KEY_WOW64_64KEY, &hkey); - ok(!res, "can't open 64-bit component key, got %d\n", res); + ok(!res, "can't open 64-bit component key, got %ld\n", res); res = RegQueryValueExA(hkey, "test1", NULL, NULL, NULL, NULL); - ok(res, "expected RegQueryValueEx to fail, got %d\n", res); + ok(res, "expected RegQueryValueEx to fail, got %ld\n", res); res = RegQueryValueExA(hkey, "test2", NULL, NULL, NULL, NULL); - ok(!res, "expected RegQueryValueEx to succeed, got %d\n", res); + ok(!res, "expected RegQueryValueEx to succeed, got %ld\n", res); RegCloseKey(hkey);
res = RegOpenKeyExA(HKEY_CLASSES_ROOT, "CLSID\{8dfef911-6885-41eb-b280-8f0304728e8b}\InProcServer32", 0, KEY_ALL_ACCESS|KEY_WOW64_32KEY, &hkey); - ok(res == ERROR_SUCCESS, "can't open 32-bit CLSID key, got %d\n", res); + ok(res == ERROR_SUCCESS, "can't open 32-bit CLSID key, got %ld\n", res); if (res == ERROR_SUCCESS) { size = sizeof(value); res = RegQueryValueExA(hkey, "", NULL, NULL, (LPBYTE)value, &size); @@ -5901,7 +5901,7 @@ static void test_mixed_package(void) res = RegOpenKeyExA(HKEY_CLASSES_ROOT, "CLSID\{8dfef911-6885-41eb-b280-8f0304728e8b}\InProcServer32", 0, KEY_ALL_ACCESS|KEY_WOW64_64KEY, &hkey); - ok(res == ERROR_SUCCESS, "can't open 64-bit CLSID key, got %d\n", res); + ok(res == ERROR_SUCCESS, "can't open 64-bit CLSID key, got %ld\n", res); if (res == ERROR_SUCCESS) { size = sizeof(value); res = RegQueryValueExA(hkey, "", NULL, NULL, (LPBYTE)value, &size); @@ -5935,25 +5935,25 @@ static void test_mixed_package(void) ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\Wine\msitest", 0, KEY_ALL_ACCESS|KEY_WOW64_32KEY, &hkey); - ok(!res, "can't open 32-bit component key, got %d\n", res); + ok(!res, "can't open 32-bit component key, got %ld\n", res); res = RegQueryValueExA(hkey, "test1", NULL, NULL, NULL, NULL); - ok(!res, "expected RegQueryValueEx to succeed, got %d\n", res); + ok(!res, "expected RegQueryValueEx to succeed, got %ld\n", res); res = RegQueryValueExA(hkey, "test2", NULL, NULL, NULL, NULL); - ok(res, "expected RegQueryValueEx to fail, got %d\n", res); + ok(res, "expected RegQueryValueEx to fail, got %ld\n", res); RegCloseKey(hkey);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\Wine\msitest", 0, KEY_ALL_ACCESS|KEY_WOW64_64KEY, &hkey); - ok(!res, "can't open 64-bit component key, got %d\n", res); + ok(!res, "can't open 64-bit component key, got %ld\n", res); res = RegQueryValueExA(hkey, "test1", NULL, NULL, NULL, NULL); - ok(res, "expected RegQueryValueEx to fail, got %d\n", res); + ok(res, "expected RegQueryValueEx to fail, got %ld\n", res); res = RegQueryValueExA(hkey, "test2", NULL, NULL, NULL, NULL); - ok(!res, "expected RegQueryValueEx to succeed, got %d\n", res); + ok(!res, "expected RegQueryValueEx to succeed, got %ld\n", res); RegCloseKey(hkey);
res = RegOpenKeyExA(HKEY_CLASSES_ROOT, "CLSID\{8dfef911-6885-41eb-b280-8f0304728e8b}\InProcServer32", 0, KEY_ALL_ACCESS|KEY_WOW64_32KEY, &hkey); - ok(res == ERROR_SUCCESS, "can't open 32-bit CLSID key, got %d\n", res); + ok(res == ERROR_SUCCESS, "can't open 32-bit CLSID key, got %ld\n", res); if (res == ERROR_SUCCESS) { size = sizeof(value); res = RegQueryValueExA(hkey, "", NULL, NULL, (LPBYTE)value, &size); @@ -5964,7 +5964,7 @@ static void test_mixed_package(void) res = RegOpenKeyExA(HKEY_CLASSES_ROOT, "CLSID\{8dfef911-6885-41eb-b280-8f0304728e8b}\InProcServer32", 0, KEY_ALL_ACCESS|KEY_WOW64_64KEY, &hkey); - ok(res == ERROR_SUCCESS, "can't open 64-bit CLSID key, got %d\n", res); + ok(res == ERROR_SUCCESS, "can't open 64-bit CLSID key, got %ld\n", res); if (res == ERROR_SUCCESS) { size = sizeof(value); res = RegQueryValueExA(hkey, "", NULL, NULL, (LPBYTE)value, &size); @@ -6092,15 +6092,15 @@ static void test_remove_upgrade_code(void) res = RegOpenKeyExA( HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Installer\UpgradeCodes\51AAE0C44620A5E4788506E91F249BD2", 0, access, &hkey ); - ok( res == ERROR_SUCCESS, "got %d\n", res ); + ok( res == ERROR_SUCCESS, "got %ld\n", res );
type = 0xdeadbeef; buf[0] = 0x55; size = sizeof(buf); res = RegQueryValueExA( hkey, "94A88FD7F6998CE40A22FB59F6B9C2BB", NULL, &type, (BYTE *)buf, &size ); - ok( res == ERROR_SUCCESS, "got %d\n", res ); - ok( type == REG_SZ, "got %u\n", type ); - ok( size == 1, "got %u\n", size ); + ok( res == ERROR_SUCCESS, "got %ld\n", res ); + ok( type == REG_SZ, "got %lu\n", type ); + ok( size == 1, "got %lu\n", size ); ok( !buf[0], "wrong data\n" ); RegCloseKey( hkey );
@@ -6110,7 +6110,7 @@ static void test_remove_upgrade_code(void) res = RegOpenKeyExA( HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Installer\UpgradeCodes\51AAE0C44620A5E4788506E91F249BD2", 0, access, &hkey ); - ok( res == ERROR_FILE_NOT_FOUND, "got %d\n", res ); + ok( res == ERROR_FILE_NOT_FOUND, "got %ld\n", res );
RemoveDirectoryA( "msitest" ); DeleteFileA( msifile ); @@ -6153,7 +6153,7 @@ static void check_file_matches(const char *filename, const char *text)
file = CreateFileA(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL); ReadFile(file, buffer, sizeof(buffer), &size, NULL); - ok(size == strlen(text) && !memcmp(buffer, text, size), "got %.*s\n", size, buffer); + ok(size == strlen(text) && !memcmp(buffer, text, size), "got %.*s\n", (int)size, buffer); CloseHandle(file); }
diff --git a/modules/rostests/winetests/msi/msi.c b/modules/rostests/winetests/msi/msi.c index 6e7ef68872d..d9b3a6d6756 100644 --- a/modules/rostests/winetests/msi/msi.c +++ b/modules/rostests/winetests/msi/msi.c @@ -1231,7 +1231,7 @@ static void create_test_guid(LPSTR prodcode, LPSTR squashed) int size;
hr = CoCreateGuid(&guid); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); + ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
size = StringFromGUID2(&guid, guidW, ARRAY_SIZE(guidW)); ok(size == GUID_SIZE, "Expected %d, got %d.\n", GUID_SIZE, size); @@ -1287,42 +1287,42 @@ static void test_MsiQueryProductState(void) state = MsiQueryProductStateA(NULL); error = GetLastError(); ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state); - ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error); + ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
/* empty prodcode */ SetLastError(0xdeadbeef); state = MsiQueryProductStateA(""); error = GetLastError(); ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state); - ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error); + ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
/* garbage prodcode */ SetLastError(0xdeadbeef); state = MsiQueryProductStateA("garbage"); error = GetLastError(); ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state); - ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error); + ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
/* guid without brackets */ SetLastError(0xdeadbeef); state = MsiQueryProductStateA("6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D"); error = GetLastError(); ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state); - ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error); + ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
/* guid with brackets */ SetLastError(0xdeadbeef); state = MsiQueryProductStateA("{6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D}"); error = GetLastError(); ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error); + ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
/* same length as guid, but random */ SetLastError(0xdeadbeef); state = MsiQueryProductStateA("A938G02JF-2NF3N93-VN3-2NNF-3KGKALDNF93"); error = GetLastError(); ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error); + ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
/* MSIINSTALLCONTEXT_USERUNMANAGED */
@@ -1330,20 +1330,20 @@ static void test_MsiQueryProductState(void) state = MsiQueryProductStateA(prodcode); error = GetLastError(); ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error); + ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
lstrcpyA(keypath, "Software\Microsoft\Installer\Products\"); lstrcatA(keypath, prod_squashed);
res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &userkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* user product key exists */ SetLastError(0xdeadbeef); state = MsiQueryProductStateA(prodcode); error = GetLastError(); ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error); + ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
lstrcpyA(keypath, "Software\Microsoft\Windows\CurrentVersion\Uninstall\"); lstrcatA(keypath, prodcode); @@ -1357,25 +1357,25 @@ static void test_MsiQueryProductState(void) LocalFree(usersid); return; } - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* local uninstall key exists */ SetLastError(0xdeadbeef); state = MsiQueryProductStateA(prodcode); error = GetLastError(); ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error); + ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
data = 1; res = RegSetValueExA(localkey, "WindowsInstaller", 0, REG_DWORD, (const BYTE *)&data, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* WindowsInstaller value exists */ SetLastError(0xdeadbeef); state = MsiQueryProductStateA(prodcode); error = GetLastError(); ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error); + ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
RegDeleteValueA(localkey, "WindowsInstaller"); delete_key(localkey, "", access & KEY_WOW64_64KEY); @@ -1394,28 +1394,28 @@ static void test_MsiQueryProductState(void) LocalFree(usersid); return; } - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* local product key exists */ SetLastError(0xdeadbeef); state = MsiQueryProductStateA(prodcode); error = GetLastError(); ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error); + ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
res = RegCreateKeyExA(localkey, "InstallProperties", 0, NULL, 0, access, NULL, &props, NULL); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* install properties key exists */ SetLastError(0xdeadbeef); state = MsiQueryProductStateA(prodcode); error = GetLastError(); ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error); + ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
data = 1; res = RegSetValueExA(props, "WindowsInstaller", 0, REG_DWORD, (const BYTE *)&data, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* WindowsInstaller value exists */ SetLastError(0xdeadbeef); @@ -1435,18 +1435,18 @@ static void test_MsiQueryProductState(void) return; } ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state); - ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error); + ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
data = 2; res = RegSetValueExA(props, "WindowsInstaller", 0, REG_DWORD, (const BYTE *)&data, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* WindowsInstaller value is not 1 */ SetLastError(0xdeadbeef); state = MsiQueryProductStateA(prodcode); error = GetLastError(); ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state); - ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error); + ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
RegDeleteKeyA(userkey, "");
@@ -1455,7 +1455,7 @@ static void test_MsiQueryProductState(void) state = MsiQueryProductStateA(prodcode); error = GetLastError(); ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error); + ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
RegDeleteValueA(props, "WindowsInstaller"); delete_key(props, "", access & KEY_WOW64_64KEY); @@ -1473,7 +1473,7 @@ static void test_MsiQueryProductState(void) lstrcatA(keypath, prod_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &prodkey, NULL); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MsiQueryProductStateA(prodcode); ok(state == INSTALLSTATE_ADVERTISED, @@ -1485,14 +1485,14 @@ static void test_MsiQueryProductState(void) lstrcatA(keypath, prod_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &localkey, NULL); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MsiQueryProductStateA(prodcode); ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
res = RegCreateKeyExA(localkey, "InstallProperties", 0, NULL, 0, access, NULL, &props, NULL); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MsiQueryProductStateA(prodcode); ok(state == INSTALLSTATE_ADVERTISED, @@ -1500,7 +1500,7 @@ static void test_MsiQueryProductState(void)
data = 1; res = RegSetValueExA(props, "WindowsInstaller", 0, REG_DWORD, (const BYTE *)&data, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* WindowsInstaller value exists */ state = MsiQueryProductStateA(prodcode); @@ -1526,7 +1526,7 @@ static void test_MsiQueryProductState(void) LocalFree( usersid ); return; } - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MsiQueryProductStateA(prodcode); ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); @@ -1536,14 +1536,14 @@ static void test_MsiQueryProductState(void) lstrcatA(keypath, prod_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &localkey, NULL); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MsiQueryProductStateA(prodcode); ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
res = RegCreateKeyExA(localkey, "InstallProperties", 0, NULL, 0, access, NULL, &props, NULL); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MsiQueryProductStateA(prodcode); ok(state == INSTALLSTATE_ADVERTISED, @@ -1551,7 +1551,7 @@ static void test_MsiQueryProductState(void)
data = 1; res = RegSetValueExA(props, "WindowsInstaller", 0, REG_DWORD, (const BYTE *)&data, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* WindowsInstaller value exists */ state = MsiQueryProductStateA(prodcode); @@ -1608,10 +1608,10 @@ static void compose_base85_guid(LPSTR component, LPSTR comp_base85, LPSTR squash int size;
hr = CoCreateGuid(&guid); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); + ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
size = StringFromGUID2(&guid, guidW, MAX_PATH); - ok(size == 39, "Expected 39, got %d\n", hr); + ok(size == 39, "Expected 39, got %d\n", size);
WideCharToMultiByte(CP_ACP, 0, guidW, size, component, MAX_PATH, NULL, NULL); encode_base85_guid(&guid, base85W); @@ -1648,63 +1648,63 @@ static void test_MsiQueryFeatureState(void) state = MsiQueryFeatureStateA(NULL, "feature"); error = GetLastError(); ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state); - ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error); + ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
/* empty prodcode */ SetLastError(0xdeadbeef); state = MsiQueryFeatureStateA("", "feature"); error = GetLastError(); ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state); - ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error); + ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
/* garbage prodcode */ SetLastError(0xdeadbeef); state = MsiQueryFeatureStateA("garbage", "feature"); error = GetLastError(); ... 13356 lines suppressed ...