[WINESYNC] setupapi/tests: Enable compilation with long types.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id b73e3102009cc7151ab58321800aeded24c1307f by Eric Pouech <eric.pouech@gmail.com>
This commit is contained in:
winesync 2023-09-14 21:54:28 +02:00 committed by Hermès Bélusca-Maïto
parent 20c488b2b3
commit 515a47a67b
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
11 changed files with 1015 additions and 1014 deletions

View file

@ -1,4 +1,5 @@
remove_definitions(-D__ROS_LONG64__)
remove_definitions(-D_CRT_NON_CONFORMING_SWPRINTFS)
spec2def(coinst.dll coinst.spec)

File diff suppressed because it is too large Load diff

View file

@ -42,13 +42,13 @@ static void test_SetupPromptForDiskA(void)
memset(buffer, 0, sizeof(buffer));
ret = SetupPromptForDiskA(0, "Test", "Testdisk", path, "kernel32.dll", NULL, IDF_CHECKFIRST, buffer, sizeof(buffer) - 1, &length);
ok(ret == DPROMPT_SUCCESS, "Expected DPROMPT_SUCCESS, got %u\n", ret);
ok(length == strlen(path) + 1, "Expect length %u, got %u\n", lstrlenA(path) + 1, length);
ok(length == strlen(path) + 1, "Expect length %u, got %lu\n", lstrlenA(path) + 1, length);
ok(!strcmp(path, buffer), "Expected path %s, got %s\n", debugstr_a(path), debugstr_a(buffer));
memset(buffer, 0, sizeof(buffer));
ret = SetupPromptForDiskA(0, "Test", "Testdisk", path, "kernel32.dll", NULL, IDF_CHECKFIRST, NULL, 0, &length);
ok(ret == DPROMPT_SUCCESS, "Expected DPROMPT_SUCCESS, got %d\n", ret);
ok(length == strlen(path) + 1, "Expect length %u, got %u\n", lstrlenA(path) + 1, length);
ok(length == strlen(path) + 1, "Expect length %u, got %lu\n", lstrlenA(path) + 1, length);
memset(buffer, 0, sizeof(buffer));
ret = SetupPromptForDiskA(0, "Test", "Testdisk", path, "kernel32.dll", NULL, IDF_CHECKFIRST, buffer, 1, &length);
@ -61,7 +61,7 @@ static void test_SetupPromptForDiskA(void)
memset(buffer, 0, sizeof(buffer));
ret = SetupPromptForDiskA(0, "Test", "Testdisk", path, "kernel32.dll", NULL, IDF_CHECKFIRST, buffer, strlen(path) + 1, &length);
ok(ret == DPROMPT_SUCCESS, "Expected DPROMPT_SUCCESS, got %u\n", ret);
ok(length == strlen(path) + 1, "Expect length %u, got %u\n", lstrlenA(path) + 1, length);
ok(length == strlen(path) + 1, "Expect length %u, got %lu\n", lstrlenA(path) + 1, length);
ok(!strcmp(path, buffer), "Expected path %s, got %s\n", debugstr_a(path), debugstr_a(buffer));
}
@ -77,13 +77,13 @@ static void test_SetupPromptForDiskW(void)
memset(buffer, 0, sizeof(buffer));
ret = SetupPromptForDiskW(0, L"Test", L"Testdisk", path, L"kernel32.dll", NULL, IDF_CHECKFIRST, buffer, ARRAY_SIZE(buffer) - 1, &length);
ok(ret == DPROMPT_SUCCESS, "Expected DPROMPT_SUCCESS, got %u\n", ret);
ok(length == lstrlenW(path) + 1, "Expect length %u, got %u\n", lstrlenW(path) + 1, length);
ok(length == lstrlenW(path) + 1, "Expect length %u, got %lu\n", lstrlenW(path) + 1, length);
ok(!lstrcmpW(path, buffer), "Expected path %s, got %s\n", debugstr_w(path), debugstr_w(buffer));
memset(buffer, 0, sizeof(buffer));
ret = SetupPromptForDiskW(0, L"Test", L"Testdisk", path, L"kernel32.dll", NULL, IDF_CHECKFIRST, NULL, 0, &length);
ok(ret == DPROMPT_SUCCESS, "Expected DPROMPT_SUCCESS, got %d\n", ret);
ok(length == lstrlenW(path) + 1, "Expect length %u, got %u\n", lstrlenW(path) + 1, length);
ok(length == lstrlenW(path) + 1, "Expect length %u, got %lu\n", lstrlenW(path) + 1, length);
memset(buffer, 0, sizeof(buffer));
ret = SetupPromptForDiskW(0, L"Test", L"Testdisk", path, L"kernel32.dll", NULL, IDF_CHECKFIRST, buffer, 1, &length);
@ -96,7 +96,7 @@ static void test_SetupPromptForDiskW(void)
memset(buffer, 0, sizeof(buffer));
ret = SetupPromptForDiskW(0, L"Test", L"Testdisk", path, L"kernel32.dll", NULL, IDF_CHECKFIRST, buffer, lstrlenW(path) + 1, &length);
ok(ret == DPROMPT_SUCCESS, "Expected DPROMPT_SUCCESS, got %u\n", ret);
ok(length == lstrlenW(path) + 1, "Expect length %u, got %u\n", lstrlenW(path) + 1, length);
ok(length == lstrlenW(path) + 1, "Expect length %u, got %lu\n", lstrlenW(path) + 1, length);
ok(!lstrcmpW(path, buffer), "Expected path %s, got %s\n", debugstr_w(path), debugstr_w(buffer));
}

View file

@ -52,7 +52,7 @@ static void test_SetupCreateDiskSpaceListA(void)
"Expected SetupCreateDiskSpaceListA to return NULL, got %p\n", ret);
if (!ret)
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
else
ok(SetupDestroyDiskSpaceList(ret), "Expected SetupDestroyDiskSpaceList to succeed\n");
@ -63,7 +63,7 @@ static void test_SetupCreateDiskSpaceListA(void)
"Expected SetupCreateDiskSpaceListA to return NULL, got %p\n", ret);
ok(GetLastError() == ERROR_INVALID_PARAMETER ||
broken(GetLastError() == 0xdeadbeef), /* NT4/Win9x/Win2k */
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
SetLastError(0xdeadbeef);
@ -72,7 +72,7 @@ static void test_SetupCreateDiskSpaceListA(void)
"Expected SetupCreateDiskSpaceListA to return NULL, got %p\n", ret);
ok(GetLastError() == ERROR_INVALID_PARAMETER ||
broken(GetLastError() == 0xdeadbeef), /* NT4/Win9x/Win2k */
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
SetLastError(0xdeadbeef);
@ -81,7 +81,7 @@ static void test_SetupCreateDiskSpaceListA(void)
"Expected SetupCreateDiskSpaceListA to return NULL, got %p\n", ret);
ok(GetLastError() == ERROR_INVALID_PARAMETER ||
broken(GetLastError() == 0xdeadbeef), /* NT4/Win9x/Win2k */
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
}
@ -113,7 +113,7 @@ static void test_SetupCreateDiskSpaceListW(void)
"Expected SetupCreateDiskSpaceListW to return NULL, got %p\n", ret);
if (!ret)
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
else
ok(SetupDestroyDiskSpaceList(ret), "Expected SetupDestroyDiskSpaceList to succeed\n");
@ -124,7 +124,7 @@ static void test_SetupCreateDiskSpaceListW(void)
"Expected SetupCreateDiskSpaceListW to return NULL, got %p\n", ret);
ok(GetLastError() == ERROR_INVALID_PARAMETER ||
broken(GetLastError() == 0xdeadbeef), /* NT4/Win2k */
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
SetLastError(0xdeadbeef);
@ -133,7 +133,7 @@ static void test_SetupCreateDiskSpaceListW(void)
"Expected SetupCreateDiskSpaceListW to return NULL, got %p\n", ret);
ok(GetLastError() == ERROR_INVALID_PARAMETER ||
broken(GetLastError() == 0xdeadbeef), /* NT4/Win2k */
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
SetLastError(0xdeadbeef);
@ -142,7 +142,7 @@ static void test_SetupCreateDiskSpaceListW(void)
"Expected SetupCreateDiskSpaceListW to return NULL, got %p\n", ret);
ok(GetLastError() == ERROR_INVALID_PARAMETER ||
broken(GetLastError() == 0xdeadbeef), /* NT4/Win2k */
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
}
@ -154,25 +154,25 @@ static void test_SetupDuplicateDiskSpaceListA(void)
duplicate = SetupDuplicateDiskSpaceListA(NULL, NULL, 0, 0);
ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
ok(GetLastError() == ERROR_INVALID_HANDLE,
"Expected GetLastError() to return ERROR_INVALID_HANDLE, got %u\n", GetLastError());
"Expected GetLastError() to return ERROR_INVALID_HANDLE, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
duplicate = SetupDuplicateDiskSpaceListA(NULL, (void *)0xdeadbeef, 0, 0);
ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
duplicate = SetupDuplicateDiskSpaceListA(NULL, NULL, 0xdeadbeef, 0);
ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
duplicate = SetupDuplicateDiskSpaceListA(NULL, NULL, 0, ~0U);
ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
handle = SetupCreateDiskSpaceListA(NULL, 0, 0);
ok(handle != NULL,
@ -188,25 +188,25 @@ static void test_SetupDuplicateDiskSpaceListA(void)
duplicate = SetupDuplicateDiskSpaceListA(handle, (void *)0xdeadbeef, 0, 0);
ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
duplicate = SetupDuplicateDiskSpaceListA(handle, NULL, 0xdeadbeef, 0);
ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
duplicate = SetupDuplicateDiskSpaceListA(handle, NULL, 0, SPDSL_IGNORE_DISK);
ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
duplicate = SetupDuplicateDiskSpaceListA(handle, NULL, 0, ~0U);
ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
duplicate = SetupDuplicateDiskSpaceListA(handle, NULL, 0, 0);
ok(duplicate != NULL, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
@ -230,25 +230,25 @@ static void test_SetupDuplicateDiskSpaceListW(void)
}
ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
ok(GetLastError() == ERROR_INVALID_HANDLE,
"Expected GetLastError() to return ERROR_INVALID_HANDLE, got %u\n", GetLastError());
"Expected GetLastError() to return ERROR_INVALID_HANDLE, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
duplicate = SetupDuplicateDiskSpaceListW(NULL, (void *)0xdeadbeef, 0, 0);
ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
duplicate = SetupDuplicateDiskSpaceListW(NULL, NULL, 0xdeadbeef, 0);
ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
duplicate = SetupDuplicateDiskSpaceListW(NULL, NULL, 0, ~0U);
ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
handle = SetupCreateDiskSpaceListW(NULL, 0, 0);
ok(handle != NULL,
@ -264,25 +264,25 @@ static void test_SetupDuplicateDiskSpaceListW(void)
duplicate = SetupDuplicateDiskSpaceListW(handle, (void *)0xdeadbeef, 0, 0);
ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
duplicate = SetupDuplicateDiskSpaceListW(handle, NULL, 0xdeadbeef, 0);
ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
duplicate = SetupDuplicateDiskSpaceListW(handle, NULL, 0, SPDSL_IGNORE_DISK);
ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
duplicate = SetupDuplicateDiskSpaceListW(handle, NULL, 0, ~0U);
ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
duplicate = SetupDuplicateDiskSpaceListW(handle, NULL, 0, 0);
ok(duplicate != NULL, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
@ -303,7 +303,7 @@ static void test_SetupQuerySpaceRequiredOnDriveA(void)
ret = SetupQuerySpaceRequiredOnDriveA(NULL, NULL, NULL, NULL, 0);
ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveA to return FALSE, got %d\n", ret);
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
SetLastError(0xdeadbeef);
@ -312,14 +312,14 @@ static void test_SetupQuerySpaceRequiredOnDriveA(void)
ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveA to return FALSE, got %d\n", ret);
ok(space == 0xdeadbeef, "Expected output space parameter to be untouched\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
SetLastError(0xdeadbeef);
ret = SetupQuerySpaceRequiredOnDriveA(NULL, "", NULL, NULL, 0);
ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveA to return FALSE, got %d\n", ret);
ok(GetLastError() == ERROR_INVALID_HANDLE,
"Expected GetLastError() to return ERROR_INVALID_HANDLE, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_HANDLE, got %lu\n",
GetLastError());
SetLastError(0xdeadbeef);
@ -328,7 +328,7 @@ static void test_SetupQuerySpaceRequiredOnDriveA(void)
ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveA to return FALSE, got %d\n", ret);
ok(space == 0xdeadbeef, "Expected output space parameter to be untouched\n");
ok(GetLastError() == ERROR_INVALID_HANDLE,
"Expected GetLastError() to return ERROR_INVALID_HANDLE, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_HANDLE, got %lu\n",
GetLastError());
handle = SetupCreateDiskSpaceListA(NULL, 0, 0);
@ -340,7 +340,7 @@ static void test_SetupQuerySpaceRequiredOnDriveA(void)
ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveA to return FALSE, got %d\n", ret);
ok(GetLastError() == ERROR_INVALID_PARAMETER ||
GetLastError() == ERROR_INVALID_DRIVE, /* Win9x */
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
SetLastError(0xdeadbeef);
@ -350,14 +350,14 @@ static void test_SetupQuerySpaceRequiredOnDriveA(void)
ok(space == 0xdeadbeef, "Expected output space parameter to be untouched\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER ||
GetLastError() == ERROR_INVALID_DRIVE, /* Win9x */
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
SetLastError(0xdeadbeef);
ret = SetupQuerySpaceRequiredOnDriveA(handle, "", NULL, NULL, 0);
ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveA to return FALSE, got %d\n", ret);
ok(GetLastError() == ERROR_INVALID_DRIVE,
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
SetLastError(0xdeadbeef);
@ -366,7 +366,7 @@ static void test_SetupQuerySpaceRequiredOnDriveA(void)
ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveA to return FALSE, got %d\n", ret);
ok(space == 0xdeadbeef, "Expected output space parameter to be untouched\n");
ok(GetLastError() == ERROR_INVALID_DRIVE,
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
ok(SetupDestroyDiskSpaceList(handle),
@ -390,7 +390,7 @@ static void test_SetupQuerySpaceRequiredOnDriveW(void)
}
ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveW to return FALSE, got %d\n", ret);
ok(GetLastError() == ERROR_INVALID_HANDLE,
"Expected GetLastError() to return ERROR_INVALID_HANDLE, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_HANDLE, got %lu\n",
GetLastError());
SetLastError(0xdeadbeef);
@ -399,14 +399,14 @@ static void test_SetupQuerySpaceRequiredOnDriveW(void)
ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveW to return FALSE, got %d\n", ret);
ok(space == 0xdeadbeef, "Expected output space parameter to be untouched\n");
ok(GetLastError() == ERROR_INVALID_HANDLE,
"Expected GetLastError() to return ERROR_INVALID_HANDLE, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_HANDLE, got %lu\n",
GetLastError());
SetLastError(0xdeadbeef);
ret = SetupQuerySpaceRequiredOnDriveW(NULL, emptyW, NULL, NULL, 0);
ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveW to return FALSE, got %d\n", ret);
ok(GetLastError() == ERROR_INVALID_HANDLE,
"Expected GetLastError() to return ERROR_INVALID_HANDLE, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_HANDLE, got %lu\n",
GetLastError());
SetLastError(0xdeadbeef);
@ -415,7 +415,7 @@ static void test_SetupQuerySpaceRequiredOnDriveW(void)
ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveW to return FALSE, got %d\n", ret);
ok(space == 0xdeadbeef, "Expected output space parameter to be untouched\n");
ok(GetLastError() == ERROR_INVALID_HANDLE,
"Expected GetLastError() to return ERROR_INVALID_HANDLE, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_HANDLE, got %lu\n",
GetLastError());
handle = SetupCreateDiskSpaceListA(NULL, 0, 0);
@ -427,7 +427,7 @@ static void test_SetupQuerySpaceRequiredOnDriveW(void)
ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveW to return FALSE, got %d\n", ret);
ok(GetLastError() == ERROR_INVALID_PARAMETER ||
GetLastError() == ERROR_INVALID_DRIVE, /* NT4/Win2k/XP/Win2k3 */
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
SetLastError(0xdeadbeef);
@ -437,14 +437,14 @@ static void test_SetupQuerySpaceRequiredOnDriveW(void)
ok(space == 0xdeadbeef, "Expected output space parameter to be untouched\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER ||
GetLastError() == ERROR_INVALID_DRIVE, /* NT4/Win2k/XP/Win2k3 */
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
SetLastError(0xdeadbeef);
ret = SetupQuerySpaceRequiredOnDriveW(handle, emptyW, NULL, NULL, 0);
ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveW to return FALSE, got %d\n", ret);
ok(GetLastError() == ERROR_INVALID_DRIVE,
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
SetLastError(0xdeadbeef);
@ -453,7 +453,7 @@ static void test_SetupQuerySpaceRequiredOnDriveW(void)
ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveW to return FALSE, got %d\n", ret);
ok(space == 0xdeadbeef, "Expected output space parameter to be untouched\n");
ok(GetLastError() == ERROR_INVALID_DRIVE,
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
ok(SetupDestroyDiskSpaceList(handle),

File diff suppressed because it is too large Load diff

View file

@ -63,9 +63,9 @@ static void create_file(const char *name, const char *data)
BOOL ret;
file = CreateFileA(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL);
ok(file != INVALID_HANDLE_VALUE, "Failed to create %s, error %u.\n", name, GetLastError());
ok(file != INVALID_HANDLE_VALUE, "Failed to create %s, error %lu.\n", name, GetLastError());
ret = WriteFile(file, data, strlen(data), &size, NULL);
ok(ret && size == strlen(data), "Failed to write %s, error %u.\n", name, GetLastError());
ok(ret && size == strlen(data), "Failed to write %s, error %lu.\n", name, GetLastError());
CloseHandle(file);
}
@ -109,24 +109,24 @@ static void test_original_file_name(LPCSTR original, LPCSTR dest)
}
hinf = SetupOpenInfFileA(dest, NULL, INF_STYLE_WIN4, NULL);
ok(hinf != NULL, "SetupOpenInfFileA failed with error %d\n", GetLastError());
ok(hinf != NULL, "SetupOpenInfFileA failed with error %ld\n", GetLastError());
res = SetupGetInfInformationA(hinf, INFINFO_INF_SPEC_IS_HINF, NULL, 0, &size);
ok(res, "SetupGetInfInformation failed with error %d\n", GetLastError());
ok(res, "SetupGetInfInformation failed with error %ld\n", GetLastError());
pspii = HeapAlloc(GetProcessHeap(), 0, size);
res = SetupGetInfInformationA(hinf, INFINFO_INF_SPEC_IS_HINF, pspii, size, NULL);
ok(res, "SetupGetInfInformation failed with error %d\n", GetLastError());
ok(res, "SetupGetInfInformation failed with error %ld\n", GetLastError());
spofi.cbSize = 0;
res = pSetupQueryInfOriginalFileInformationA(pspii, 0, NULL, &spofi);
ok(!res && GetLastError() == ERROR_INVALID_USER_BUFFER,
"SetupQueryInfOriginalFileInformationA should have failed with ERROR_INVALID_USER_BUFFER instead of %d\n", GetLastError());
"SetupQueryInfOriginalFileInformationA should have failed with ERROR_INVALID_USER_BUFFER instead of %ld\n", GetLastError());
spofi.cbSize = sizeof(spofi);
res = pSetupQueryInfOriginalFileInformationA(pspii, 0, NULL, &spofi);
ok(res, "SetupQueryInfOriginalFileInformationA failed with error %d\n", GetLastError());
ok(res, "SetupQueryInfOriginalFileInformationA failed with error %ld\n", GetLastError());
ok(!spofi.OriginalCatalogName[0], "spofi.OriginalCatalogName should have been \"\" instead of \"%s\"\n", spofi.OriginalCatalogName);
ok(!strcmp(original, spofi.OriginalInfName), "spofi.OriginalInfName of %s didn't match real original name %s\n", spofi.OriginalInfName, original);
@ -157,7 +157,7 @@ static void test_SetupCopyOEMInf(void)
res = SetupCopyOEMInfA(NULL, NULL, 0, SP_COPY_NOOVERWRITE, NULL, 0, NULL, NULL);
ok(res == FALSE, "Expected FALSE, got %d\n", res);
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
"Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* try empty SourceInfFileName */
SetLastError(0xdeadbeef);
@ -165,14 +165,14 @@ static void test_SetupCopyOEMInf(void)
ok(res == FALSE, "Expected FALSE, got %d\n", res);
ok(GetLastError() == ERROR_FILE_NOT_FOUND ||
GetLastError() == ERROR_INVALID_PARAMETER, /* Vista, W2K8 */
"Unexpected error : %d\n", GetLastError());
"Unexpected error : %ld\n", GetLastError());
/* try a relative nonexistent SourceInfFileName */
SetLastError(0xdeadbeef);
res = SetupCopyOEMInfA("nonexistent", NULL, 0, SP_COPY_NOOVERWRITE, NULL, 0, NULL, NULL);
ok(res == FALSE, "Expected FALSE, got %d\n", res);
ok(GetLastError() == ERROR_FILE_NOT_FOUND,
"Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError());
"Expected ERROR_FILE_NOT_FOUND, got %ld\n", GetLastError());
/* try an absolute nonexistent SourceInfFileName */
strcpy(path, CURR_DIR);
@ -181,7 +181,7 @@ static void test_SetupCopyOEMInf(void)
res = SetupCopyOEMInfA(path, NULL, 0, SP_COPY_NOOVERWRITE, NULL, 0, NULL, NULL);
ok(res == FALSE, "Expected FALSE, got %d\n", res);
ok(GetLastError() == ERROR_FILE_NOT_FOUND,
"Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError());
"Expected ERROR_FILE_NOT_FOUND, got %ld\n", GetLastError());
get_temp_filename(tmpfile);
create_file(tmpfile, inf_data1);
@ -201,7 +201,7 @@ static void test_SetupCopyOEMInf(void)
return;
}
ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError());
ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", GetLastError());
ok(file_exists(tmpfile), "Expected tmpfile to exist\n");
/* try SP_COPY_REPLACEONLY, dest does not exist */
@ -209,7 +209,7 @@ static void test_SetupCopyOEMInf(void)
res = SetupCopyOEMInfA(path, NULL, SPOST_NONE, SP_COPY_REPLACEONLY, NULL, 0, NULL, NULL);
ok(res == FALSE, "Expected FALSE, got %d\n", res);
ok(GetLastError() == ERROR_FILE_NOT_FOUND,
"Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError());
"Expected ERROR_FILE_NOT_FOUND, got %ld\n", GetLastError());
ok(file_exists(tmpfile), "Expected source inf to exist\n");
/* Test a successful call. */
@ -225,7 +225,7 @@ static void test_SetupCopyOEMInf(void)
return;
}
ok(res == TRUE, "Expected TRUE, got %d\n", res);
ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError());
ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError());
ok(file_exists(path), "Expected source inf to exist.\n");
ok(file_exists(dest), "Expected dest file to exist.\n");
ok(is_in_inf_dir(dest), "Got unexpected path '%s'.\n", dest);
@ -235,7 +235,7 @@ static void test_SetupCopyOEMInf(void)
SetLastError(0xdeadbeef);
res = SetupCopyOEMInfA(path, NULL, SPOST_NONE, 0, dest, sizeof(dest), NULL, NULL);
ok(res == TRUE, "Expected TRUE, got %d\n", res);
ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError());
ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError());
ok(file_exists(path), "Expected source inf to exist.\n");
ok(file_exists(dest), "Expected dest file to exist.\n");
ok(!strcmp(orig_dest, dest), "Expected '%s', got '%s'.\n", orig_dest, dest);
@ -244,7 +244,7 @@ static void test_SetupCopyOEMInf(void)
SetLastError(0xdeadbeef);
res = SetupCopyOEMInfA(path, NULL, SPOST_NONE, SP_COPY_REPLACEONLY, dest, sizeof(dest), NULL, NULL);
ok(res == TRUE, "Expected TRUE, got %d\n", res);
ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError());
ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError());
ok(file_exists(path), "Expected source inf to exist.\n");
ok(file_exists(dest), "Expected dest file to exist.\n");
ok(!strcmp(orig_dest, dest), "Expected '%s', got '%s'.\n", orig_dest, dest);
@ -254,13 +254,13 @@ static void test_SetupCopyOEMInf(void)
res = SetupCopyOEMInfA(path, NULL, SPOST_NONE, SP_COPY_NOOVERWRITE, dest, sizeof(dest), NULL, NULL);
ok(res == FALSE, "Expected FALSE, got %d\n", res);
ok(GetLastError() == ERROR_FILE_EXISTS,
"Expected ERROR_FILE_EXISTS, got %d\n", GetLastError());
"Expected ERROR_FILE_EXISTS, got %ld\n", GetLastError());
ok(!strcmp(orig_dest, dest), "Expected '%s', got '%s'.\n", orig_dest, dest);
SetLastError(0xdeadbeef);
res = SetupCopyOEMInfA(path, NULL, SPOST_NONE, 0, NULL, 0, NULL, NULL);
ok(res == TRUE, "Expected TRUE, got %d\n", res);
ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError());
ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError());
ok(file_exists(path), "Expected source inf to exist.\n");
ok(file_exists(orig_dest), "Expected dest file to exist.\n");
@ -270,39 +270,39 @@ static void test_SetupCopyOEMInf(void)
res = SetupCopyOEMInfA(path, NULL, SPOST_NONE, 0, dest, 5, &size, NULL);
ok(res == FALSE, "Expected FALSE, got %d\n", res);
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER,
"Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError());
"Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError());
ok(file_exists(path), "Expected source inf to exist\n");
ok(file_exists(orig_dest), "Expected dest inf to exist\n");
ok(!strcmp(dest, "aaa"), "Expected dest to be unchanged\n");
ok(size == strlen(orig_dest) + 1, "Got %d.\n", size);
ok(size == strlen(orig_dest) + 1, "Got %ld.\n", size);
SetLastError(0xdeadbeef);
res = SetupCopyOEMInfA(path, NULL, SPOST_NONE, 0, dest, sizeof(dest), &size, NULL);
ok(res == TRUE, "Expected TRUE, got %d\n", res);
ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError());
ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError());
ok(!strcmp(orig_dest, dest), "Expected '%s', got '%s'.\n", orig_dest, dest);
ok(size == strlen(dest) + 1, "Got %d.\n", size);
ok(size == strlen(dest) + 1, "Got %ld.\n", size);
test_original_file_name(strrchr(path, '\\') + 1, dest);
SetLastError(0xdeadbeef);
res = SetupCopyOEMInfA(path, NULL, SPOST_NONE, 0, dest, sizeof(dest), NULL, &filepart);
ok(res == TRUE, "Expected TRUE, got %d\n", res);
ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError());
ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError());
ok(!strcmp(orig_dest, dest), "Expected '%s', got '%s'.\n", orig_dest, dest);
ok(filepart == strrchr(dest, '\\') + 1, "Got unexpected file part %s.\n", filepart);
SetLastError(0xdeadbeef);
res = SetupCopyOEMInfA(path, NULL, SPOST_NONE, SP_COPY_DELETESOURCE, NULL, 0, NULL, NULL);
ok(res == TRUE, "Expected TRUE, got %d\n", res);
ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError());
ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError());
ok(!file_exists(path), "Expected source inf to not exist\n");
strcpy(pnf, dest);
*(strrchr(pnf, '.') + 1) = 'p';
res = SetupUninstallOEMInfA(strrchr(dest, '\\') + 1, 0, NULL);
ok(res, "Failed to uninstall '%s', error %u.\n", dest, GetLastError());
ok(res, "Failed to uninstall '%s', error %lu.\n", dest, GetLastError());
todo_wine ok(!file_exists(dest), "Expected inf '%s' to not exist\n", dest);
DeleteFileA(dest);
ok(!file_exists(pnf), "Expected pnf '%s' to not exist\n", pnf);
@ -311,7 +311,7 @@ static void test_SetupCopyOEMInf(void)
SetLastError(0xdeadbeef);
res = SetupCopyOEMInfA(path, NULL, SPOST_NONE, 0, dest, sizeof(dest), NULL, NULL);
ok(res == TRUE, "Expected TRUE, got %d\n", res);
ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError());
ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError());
ok(is_in_inf_dir(dest), "Got unexpected path '%s'.\n", dest);
strcpy(orig_dest, dest);
@ -319,12 +319,12 @@ static void test_SetupCopyOEMInf(void)
SetLastError(0xdeadbeef);
res = SetupCopyOEMInfA(path, NULL, SPOST_NONE, 0, dest, sizeof(dest), NULL, NULL);
ok(res == TRUE, "Expected TRUE, got %d\n", res);
ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError());
ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError());
ok(is_in_inf_dir(dest), "Got unexpected path '%s'.\n", dest);
ok(strcmp(dest, orig_dest), "Expected INF files to be copied to different paths.\n");
res = SetupUninstallOEMInfA(strrchr(dest, '\\') + 1, 0, NULL);
ok(res, "Failed to uninstall '%s', error %u.\n", dest, GetLastError());
ok(res, "Failed to uninstall '%s', error %lu.\n", dest, GetLastError());
todo_wine ok(!file_exists(dest), "Expected inf '%s' to not exist\n", dest);
DeleteFileA(dest);
strcpy(pnf, dest);
@ -332,7 +332,7 @@ static void test_SetupCopyOEMInf(void)
todo_wine ok(!file_exists(pnf), "Expected pnf '%s' to not exist\n", pnf);
res = SetupUninstallOEMInfA(strrchr(orig_dest, '\\') + 1, 0, NULL);
ok(res, "Failed to uninstall '%s', error %u.\n", orig_dest, GetLastError());
ok(res, "Failed to uninstall '%s', error %lu.\n", orig_dest, GetLastError());
todo_wine ok(!file_exists(orig_dest), "Expected inf '%s' to not exist\n", dest);
DeleteFileA(orig_dest);
strcpy(pnf, dest);
@ -343,19 +343,19 @@ static void test_SetupCopyOEMInf(void)
strcat(orig_dest, "\\inf\\");
strcat(orig_dest, tmpfile);
res = CopyFileA(tmpfile, orig_dest, TRUE);
ok(res, "Failed to copy file, error %u.\n", GetLastError());
ok(res, "Failed to copy file, error %lu.\n", GetLastError());
SetLastError(0xdeadbeef);
res = SetupCopyOEMInfA(path, NULL, SPOST_NONE, 0, dest, sizeof(dest), NULL, NULL);
ok(res == TRUE, "Expected TRUE, got %d\n", res);
ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError());
ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError());
ok(!strcasecmp(dest, orig_dest), "Expected '%s', got '%s'.\n", orig_dest, dest);
/* Since it wasn't actually installed, SetupUninstallOEMInf would fail here. */
res = DeleteFileA(dest);
ok(res, "Failed to delete '%s', error %u.\n", tmpfile, GetLastError());
ok(res, "Failed to delete '%s', error %lu.\n", tmpfile, GetLastError());
res = DeleteFileA(tmpfile);
ok(res, "Failed to delete '%s', error %u.\n", tmpfile, GetLastError());
ok(res, "Failed to delete '%s', error %lu.\n", tmpfile, GetLastError());
}
static void create_source_file(LPSTR filename, const BYTE *data, DWORD size)
@ -472,8 +472,8 @@ static void test_SetupGetFileCompressionInfo(void)
ret = SetupGetFileCompressionInfoA(source, &name, &source_size, &target_size, &type);
ok(!ret, "SetupGetFileCompressionInfo failed unexpectedly\n");
ok(name && !lstrcmpA(name, source), "got %s, expected %s\n", name, source);
ok(source_size == sizeof(uncompressed), "got %d\n", source_size);
ok(target_size == sizeof(uncompressed), "got %d\n", target_size);
ok(source_size == sizeof(uncompressed), "got %ld\n", source_size);
ok(target_size == sizeof(uncompressed), "got %ld\n", target_size);
ok(type == FILE_COMPRESSION_NONE, "got %d, expected FILE_COMPRESSION_NONE\n", type);
MyFree(name);
@ -498,16 +498,16 @@ static void test_SetupGetFileCompressionInfoEx(void)
ret = pSetupGetFileCompressionInfoExA(source, NULL, 0, &required_len, NULL, NULL, NULL);
ok(!ret, "SetupGetFileCompressionInfoEx succeeded unexpectedly\n");
ok(required_len == lstrlenA(source) + 1, "got %d, expected %d\n", required_len, lstrlenA(source) + 1);
ok(required_len == lstrlenA(source) + 1, "got %ld, expected %d\n", required_len, lstrlenA(source) + 1);
create_source_file(source, comp_lzx, sizeof(comp_lzx));
ret = pSetupGetFileCompressionInfoExA(source, name, sizeof(name), &required_len, &source_size, &target_size, &type);
ok(ret, "SetupGetFileCompressionInfoEx failed unexpectedly: %d\n", ret);
ok(!lstrcmpA(name, source), "got %s, expected %s\n", name, source);
ok(required_len == lstrlenA(source) + 1, "got %d, expected %d\n", required_len, lstrlenA(source) + 1);
ok(source_size == sizeof(comp_lzx), "got %d\n", source_size);
ok(target_size == sizeof(uncompressed), "got %d\n", target_size);
ok(required_len == lstrlenA(source) + 1, "got %ld, expected %d\n", required_len, lstrlenA(source) + 1);
ok(source_size == sizeof(comp_lzx), "got %ld\n", source_size);
ok(target_size == sizeof(uncompressed), "got %ld\n", target_size);
ok(type == FILE_COMPRESSION_WINLZA, "got %d, expected FILE_COMPRESSION_WINLZA\n", type);
DeleteFileA(source);
@ -516,9 +516,9 @@ static void test_SetupGetFileCompressionInfoEx(void)
ret = pSetupGetFileCompressionInfoExA(source, name, sizeof(name), &required_len, &source_size, &target_size, &type);
ok(ret, "SetupGetFileCompressionInfoEx failed unexpectedly: %d\n", ret);
ok(!lstrcmpA(name, source), "got %s, expected %s\n", name, source);
ok(required_len == lstrlenA(source) + 1, "got %d, expected %d\n", required_len, lstrlenA(source) + 1);
ok(source_size == sizeof(comp_zip), "got %d\n", source_size);
ok(target_size == sizeof(comp_zip), "got %d\n", target_size);
ok(required_len == lstrlenA(source) + 1, "got %ld, expected %d\n", required_len, lstrlenA(source) + 1);
ok(source_size == sizeof(comp_zip), "got %ld\n", source_size);
ok(target_size == sizeof(comp_zip), "got %ld\n", target_size);
ok(type == FILE_COMPRESSION_NONE, "got %d, expected FILE_COMPRESSION_NONE\n", type);
DeleteFileA(source);
@ -527,9 +527,9 @@ static void test_SetupGetFileCompressionInfoEx(void)
ret = pSetupGetFileCompressionInfoExA(source, name, sizeof(name), &required_len, &source_size, &target_size, &type);
ok(ret, "SetupGetFileCompressionInfoEx failed unexpectedly: %d\n", ret);
ok(!lstrcmpA(name, source), "got %s, expected %s\n", name, source);
ok(required_len == lstrlenA(source) + 1, "got %d, expected %d\n", required_len, lstrlenA(source) + 1);
ok(source_size == sizeof(comp_cab_lzx), "got %d\n", source_size);
ok(target_size == sizeof(uncompressed), "got %d\n", target_size);
ok(required_len == lstrlenA(source) + 1, "got %ld, expected %d\n", required_len, lstrlenA(source) + 1);
ok(source_size == sizeof(comp_cab_lzx), "got %ld\n", source_size);
ok(target_size == sizeof(uncompressed), "got %ld\n", target_size);
ok(type == FILE_COMPRESSION_MSZIP, "got %d, expected FILE_COMPRESSION_MSZIP\n", type);
DeleteFileA(source);
@ -538,9 +538,9 @@ static void test_SetupGetFileCompressionInfoEx(void)
ret = pSetupGetFileCompressionInfoExA(source, name, sizeof(name), &required_len, &source_size, &target_size, &type);
ok(ret, "SetupGetFileCompressionInfoEx failed unexpectedly: %d\n", ret);
ok(!lstrcmpA(name, source), "got %s, expected %s\n", name, source);
ok(required_len == lstrlenA(source) + 1, "got %d, expected %d\n", required_len, lstrlenA(source) + 1);
ok(source_size == sizeof(comp_cab_zip), "got %d\n", source_size);
ok(target_size == sizeof(uncompressed), "got %d\n", target_size);
ok(required_len == lstrlenA(source) + 1, "got %ld, expected %d\n", required_len, lstrlenA(source) + 1);
ok(source_size == sizeof(comp_cab_zip), "got %ld\n", source_size);
ok(target_size == sizeof(uncompressed), "got %ld\n", target_size);
ok(type == FILE_COMPRESSION_MSZIP, "got %d, expected FILE_COMPRESSION_MSZIP\n", type);
DeleteFileA(source);
}
@ -599,7 +599,7 @@ static void test_SetupDecompressOrCopyFile(void)
invalid_parameters[i].target,
invalid_parameters[i].type);
ok(ret == ERROR_INVALID_PARAMETER,
"[%d] Expected SetupDecompressOrCopyFileA to return ERROR_INVALID_PARAMETER, got %u\n",
"[%d] Expected SetupDecompressOrCopyFileA to return ERROR_INVALID_PARAMETER, got %lu\n",
i, ret);
/* try an invalid compression type */
@ -608,7 +608,7 @@ static void test_SetupDecompressOrCopyFile(void)
invalid_parameters[i].target,
invalid_parameters[i].type);
ok(ret == ERROR_INVALID_PARAMETER,
"[%d] Expected SetupDecompressOrCopyFileA to return ERROR_INVALID_PARAMETER, got %u\n",
"[%d] Expected SetupDecompressOrCopyFileA to return ERROR_INVALID_PARAMETER, got %lu\n",
i, ret);
}
@ -621,23 +621,23 @@ static void test_SetupDecompressOrCopyFile(void)
/* no compression tests */
ret = SetupDecompressOrCopyFileA(source, target, NULL);
ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %d\n", ret);
ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %ld\n", ret);
ok(compare_file_data(target, uncompressed, sizeof(uncompressed)), "incorrect target file\n");
/* try overwriting existing file */
ret = SetupDecompressOrCopyFileA(source, target, NULL);
ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %d\n", ret);
ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %ld\n", ret);
DeleteFileA(target);
type = FILE_COMPRESSION_NONE;
ret = SetupDecompressOrCopyFileA(source, target, &type);
ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %d\n", ret);
ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %ld\n", ret);
ok(compare_file_data(target, uncompressed, sizeof(uncompressed)), "incorrect target file\n");
DeleteFileA(target);
type = FILE_COMPRESSION_WINLZA;
ret = SetupDecompressOrCopyFileA(source, target, &type);
ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %d\n", ret);
ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %ld\n", ret);
ok(compare_file_data(target, uncompressed, sizeof(uncompressed)), "incorrect target file\n");
DeleteFileA(target);
@ -646,7 +646,7 @@ static void test_SetupDecompressOrCopyFile(void)
create_source_file(source, comp_lzx, sizeof(comp_lzx));
ret = SetupDecompressOrCopyFileA(source, target, NULL);
ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %d\n", ret);
ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %ld\n", ret);
DeleteFileA(target);
/* zip compression tests */
@ -654,7 +654,7 @@ static void test_SetupDecompressOrCopyFile(void)
create_source_file(source, comp_zip, sizeof(comp_zip));
ret = SetupDecompressOrCopyFileA(source, target, NULL);
ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %d\n", ret);
ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %ld\n", ret);
ok(compare_file_data(target, comp_zip, sizeof(comp_zip)), "incorrect target file\n");
DeleteFileA(target);
@ -666,23 +666,23 @@ static void test_SetupDecompressOrCopyFile(void)
lstrcpyA(p + 1, "wine");
ret = SetupDecompressOrCopyFileA(source, target, NULL);
ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %d\n", ret);
ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %ld\n", ret);
ok(compare_file_data(target, uncompressed, sizeof(uncompressed)), "incorrect target file\n");
/* try overwriting existing file */
ret = SetupDecompressOrCopyFileA(source, target, NULL);
ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %d\n", ret);
ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %ld\n", ret);
/* try zip compression */
type = FILE_COMPRESSION_MSZIP;
ret = SetupDecompressOrCopyFileA(source, target, &type);
ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %d\n", ret);
ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %ld\n", ret);
ok(compare_file_data(target, uncompressed, sizeof(uncompressed)), "incorrect target file\n");
/* try no compression */
type = FILE_COMPRESSION_NONE;
ret = SetupDecompressOrCopyFileA(source, target, &type);
ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %d\n", ret);
ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %ld\n", ret);
ok(compare_file_data(target, comp_cab_zip, sizeof(comp_cab_zip)), "incorrect target file\n");
/* Show that SetupDecompressOrCopyFileA simply extracts the first file it
@ -700,7 +700,7 @@ static void test_SetupDecompressOrCopyFile(void)
lstrcpyA(p + 1, zip_multi_tests[i].filename);
ret = SetupDecompressOrCopyFileA(source, target, NULL);
ok(!ret, "[%d] SetupDecompressOrCopyFile failed unexpectedly: %d\n", i, ret);
ok(!ret, "[%d] SetupDecompressOrCopyFile failed unexpectedly: %ld\n", i, ret);
ok(compare_file_data(target, zip_multi_tests[i].expected_buffer, zip_multi_tests[i].buffer_size),
"[%d] incorrect target file\n", i);
DeleteFileA(target);
@ -716,14 +716,14 @@ static void test_SetupUninstallOEMInf(void)
SetLastError(0xdeadbeef);
ret = SetupUninstallOEMInfA(NULL, 0, NULL);
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef);
ret = SetupUninstallOEMInfA("", 0, NULL);
todo_wine
{
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError());
ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %08lx\n", GetLastError());
}
SetLastError(0xdeadbeef);
@ -731,7 +731,7 @@ static void test_SetupUninstallOEMInf(void)
todo_wine
{
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError());
ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %08lx\n", GetLastError());
}
}
@ -757,7 +757,7 @@ static void test_defaultcallback(void)
ctxt = SetupInitDefaultQueueCallbackEx(owner, progress, WM_USER, 0, NULL);
ok(ctxt != NULL, "got %p\n", ctxt);
ok(ctxt->magic == magic || broken(ctxt->magic != magic) /* win2000 */, "got magic 0x%08x\n", ctxt->magic);
ok(ctxt->magic == magic || broken(ctxt->magic != magic) /* win2000 */, "got magic 0x%08lx\n", ctxt->magic);
if (ctxt->magic == magic)
{
ok(ctxt->owner == owner, "got %p, expected %p\n", ctxt->owner, owner);
@ -773,7 +773,7 @@ static void test_defaultcallback(void)
}
ctxt = SetupInitDefaultQueueCallback(owner);
ok(ctxt->magic == magic, "got magic 0x%08x\n", ctxt->magic);
ok(ctxt->magic == magic, "got magic 0x%08lx\n", ctxt->magic);
ok(ctxt->owner == owner, "got %p, expected %p\n", ctxt->owner, owner);
ok(ctxt->progress == NULL, "got %p, expected %p\n", ctxt->progress, progress);
ok(ctxt->message == 0, "got %d\n", ctxt->message);
@ -789,7 +789,7 @@ static void test_SetupLogError(void)
ret = SetupLogErrorA("Test without opening\r\n", LogSevInformation);
error = GetLastError();
ok(!ret, "SetupLogError succeeded\n");
ok(error == ERROR_FILE_INVALID, "got wrong error: %d\n", error);
ok(error == ERROR_FILE_INVALID, "got wrong error: %ld\n", error);
SetLastError(0xdeadbeef);
ret = SetupOpenLog(FALSE);
@ -798,24 +798,24 @@ static void test_SetupLogError(void)
skip("SetupOpenLog() failed on insufficient permissions\n");
return;
}
ok(ret, "SetupOpenLog failed, error %d\n", GetLastError());
ok(ret, "SetupOpenLog failed, error %ld\n", GetLastError());
SetLastError(0xdeadbeef);
ret = SetupLogErrorA("Test with wrong log severity\r\n", LogSevMaximum);
error = GetLastError();
ok(!ret, "SetupLogError succeeded\n");
ok(error == 0xdeadbeef, "got wrong error: %d\n", error);
ok(error == 0xdeadbeef, "got wrong error: %ld\n", error);
ret = SetupLogErrorA("Test without EOL", LogSevInformation);
ok(ret, "SetupLogError failed\n");
SetLastError(0xdeadbeef);
ret = SetupLogErrorA(NULL, LogSevInformation);
ok(ret || broken(!ret && GetLastError() == ERROR_INVALID_PARAMETER /* Win Vista+ */),
"SetupLogError failed: %08x\n", GetLastError());
"SetupLogError failed: %08lx\n", GetLastError());
SetLastError(0xdeadbeef);
ret = SetupOpenLog(FALSE);
ok(ret, "SetupOpenLog failed, error %d\n", GetLastError());
ok(ret, "SetupOpenLog failed, error %ld\n", GetLastError());
SetupCloseLog();
}
@ -839,14 +839,14 @@ static void _check_device_interface(int line, const char *instance_id, const GUI
devinfo = SetupDiGetClassDevsA(guid, instance_id, NULL, DIGCF_DEVICEINTERFACE | DIGCF_PRESENT);
ret = SetupDiEnumDeviceInfo(devinfo, 0, &device_data);
ok_(__FILE__, line)(ret || broken(!ret) /* <= Win7 */,
"SetupDiEnumDeviceInfo failed, error %u.\n", GetLastError());
"SetupDiEnumDeviceInfo failed, error %lu.\n", GetLastError());
if (!ret)
{
SetupDiDestroyDeviceInfoList(devinfo);
return;
}
ret = SetupDiEnumDeviceInterfaces(devinfo, &device_data, guid, 0, &iface_data);
ok_(__FILE__, line)(ret, "SetupDiEnumDeviceInterfaces failed, error %u.\n", GetLastError());
ok_(__FILE__, line)(ret, "SetupDiEnumDeviceInterfaces failed, error %lu.\n", GetLastError());
ok_(__FILE__, line)(IsEqualGUID(&iface_data.InterfaceClassGuid, guid),
"Expected guid %s, got %s.\n", wine_dbgstr_guid(guid),
wine_dbgstr_guid(&iface_data.InterfaceClassGuid));
@ -865,14 +865,14 @@ static void test_device_interfaces(void)
/* GPUs */
devinfo = SetupDiGetClassDevsW(&GUID_DEVCLASS_DISPLAY, NULL, NULL, DIGCF_PRESENT);
ok(devinfo != INVALID_HANDLE_VALUE, "SetupDiGetClassDevsW failed, error %u.\n", GetLastError());
ok(devinfo != INVALID_HANDLE_VALUE, "SetupDiGetClassDevsW failed, error %lu.\n", GetLastError());
while ((ret = SetupDiEnumDeviceInfo(devinfo, device_idx, &device_data)))
{
ret = SetupDiGetDeviceInstanceIdA(devinfo, &device_data, instance_id,
ARRAY_SIZE(instance_id), &size);
ok(ret, "SetupDiGetDeviceInstanceIdA failed, error %u.\n", GetLastError());
ok(ret, "SetupDiGetDeviceInstanceIdA failed, error %lu.\n", GetLastError());
winetest_push_context("GPU %d", device_idx);
winetest_push_context("GPU %ld", device_idx);
check_device_interface(instance_id, &GUID_DEVINTERFACE_DISPLAY_ADAPTER);
check_device_interface(instance_id, &GUID_DISPLAY_DEVICE_ARRIVAL);
@ -881,21 +881,21 @@ static void test_device_interfaces(void)
++device_idx;
}
error = GetLastError();
ok(error == ERROR_NO_MORE_ITEMS, "Expected error %u, got %u.\n", ERROR_NO_MORE_ITEMS, error);
ok(error == ERROR_NO_MORE_ITEMS, "Expected error %u, got %lu.\n", ERROR_NO_MORE_ITEMS, error);
ok(device_idx > 0, "Expected at least one GPU.\n");
SetupDiDestroyDeviceInfoList(devinfo);
/* Monitors */
device_idx = 0;
devinfo = SetupDiGetClassDevsW(&GUID_DEVCLASS_MONITOR, L"DISPLAY", NULL, DIGCF_PRESENT);
ok(devinfo != INVALID_HANDLE_VALUE, "SetupDiGetClassDevsW failed, error %u.\n", GetLastError());
ok(devinfo != INVALID_HANDLE_VALUE, "SetupDiGetClassDevsW failed, error %lu.\n", GetLastError());
while ((ret = SetupDiEnumDeviceInfo(devinfo, device_idx, &device_data)))
{
ret = SetupDiGetDeviceInstanceIdA(devinfo, &device_data, instance_id,
ARRAY_SIZE(instance_id), &size);
ok(ret, "SetupDiGetDeviceInstanceIdA failed, error %u.\n", GetLastError());
ok(ret, "SetupDiGetDeviceInstanceIdA failed, error %lu.\n", GetLastError());
winetest_push_context("Monitor %d", device_idx);
winetest_push_context("Monitor %ld", device_idx);
check_device_interface(instance_id, &GUID_DEVINTERFACE_MONITOR);
@ -903,7 +903,7 @@ static void test_device_interfaces(void)
++device_idx;
}
error = GetLastError();
ok(error == ERROR_NO_MORE_ITEMS, "Expected error %u, got %u.\n", ERROR_NO_MORE_ITEMS, error);
ok(error == ERROR_NO_MORE_ITEMS, "Expected error %u, got %lu.\n", ERROR_NO_MORE_ITEMS, error);
ok(device_idx > 0 || broken(device_idx == 0) /* w7u_2qxl TestBot */,
"Expected at least one monitor.\n");
SetupDiDestroyDeviceInfoList(devinfo);

View file

@ -164,13 +164,13 @@ static void test_invalid_files(void)
err_line = 0xdeadbeef;
hinf = test_file_contents( invalid_files[i].data, invalid_files[i].data_size, &err_line );
err = GetLastError();
trace( "hinf=%p err=0x%x line=%d\n", hinf, err, err_line );
trace( "hinf=%p err=0x%lx line=%d\n", hinf, err, err_line );
if (invalid_files[i].error) /* should fail */
{
ok( hinf == INVALID_HANDLE_VALUE, "file %u: Open succeeded\n", i );
todo_wine_if (invalid_files[i].todo)
{
ok( err == invalid_files[i].error, "file %u: Bad error %u/%u\n",
ok( err == invalid_files[i].error, "file %u: Bad error %lu/%lu\n",
i, err, invalid_files[i].error );
ok( err_line == invalid_files[i].err_line, "file %u: Bad error line %d/%d\n",
i, err_line, invalid_files[i].err_line );
@ -181,7 +181,7 @@ static void test_invalid_files(void)
todo_wine_if (invalid_files[i].todo)
{
ok( hinf != INVALID_HANDLE_VALUE, "file %u: Open failed\n", i );
ok( err == 0, "file %u: Error code set to %u\n", i, err );
ok( err == 0, "file %u: Error code set to %lu\n", i, err );
}
}
SetupCloseInfFile( hinf );
@ -240,23 +240,23 @@ static void test_section_names(void)
{
SetLastError( 0xdeadbeef );
hinf = test_file_contents( section_names[i].data, strlen(section_names[i].data), &err_line );
ok( hinf != INVALID_HANDLE_VALUE, "line %u: open failed err %u\n", i, GetLastError() );
ok( hinf != INVALID_HANDLE_VALUE, "line %u: open failed err %lu\n", i, GetLastError() );
if (hinf == INVALID_HANDLE_VALUE) continue;
ret = SetupGetLineCountA( hinf, section_names[i].section );
err = GetLastError();
trace( "hinf=%p ret=%d err=0x%x\n", hinf, ret, err );
trace( "hinf=%p ret=%ld err=0x%lx\n", hinf, ret, err );
if (ret != -1)
{
ok( !section_names[i].error, "line %u: section name %s found\n",
i, section_names[i].section );
ok( !err, "line %u: bad error code %u\n", i, err );
ok( !err, "line %u: bad error code %lu\n", i, err );
}
else
{
ok( section_names[i].error, "line %u: section name %s not found\n",
i, section_names[i].section );
ok( err == section_names[i].error, "line %u: bad error %u/%u\n",
ok( err == section_names[i].error, "line %u: bad error %lu/%lu\n",
i, err, section_names[i].error );
}
SetupCloseInfFile( hinf );
@ -299,7 +299,7 @@ static void test_enum_sections(void)
SetLastError( 0xdeadbeef );
ret = pSetupEnumInfSectionsA( hinf, index, buffer, sizeof(buffer), &len );
ok( ret, "SetupEnumInfSectionsA failed err %u\n", GetLastError() );
ok( ret, "SetupEnumInfSectionsA failed err %lu\n", GetLastError() );
ok( len == 3 || len == 8, "wrong len %u\n", len );
ok( !lstrcmpiA( buffer, "version" ) || !lstrcmpiA( buffer, "s1" ) ||
!lstrcmpiA( buffer, "s2" ) || !lstrcmpiA( buffer, "s3" ) || !lstrcmpiA( buffer, "strings" ),
@ -408,12 +408,12 @@ static const char *check_key( INFCONTEXT *context, const char *wanted )
if (!key)
{
ok( !wanted, "missing key %s\n", wanted );
ok( err == 0 || err == ERROR_INVALID_PARAMETER, "last error set to %u\n", err );
ok( err == 0 || err == ERROR_INVALID_PARAMETER, "last error set to %lu\n", err );
}
else
{
ok( !strcmp( key, wanted ), "bad key %s/%s\n", key, wanted );
ok( err == 0, "last error set to %u\n", err );
ok( err == 0, "last error set to %lu\n", err );
}
return key;
}
@ -439,7 +439,7 @@ static void test_key_names(void)
data_size += key_names[i].data_size;
SetLastError( 0xdeadbeef );
hinf = test_file_contents( buffer, data_size, &err_line );
ok( hinf != INVALID_HANDLE_VALUE, "line %u: open failed err %u\n", i, GetLastError() );
ok( hinf != INVALID_HANDLE_VALUE, "line %u: open failed err %lu\n", i, GetLastError() );
if (hinf == INVALID_HANDLE_VALUE) continue;
ret = SetupFindFirstLineA( hinf, "Test", key_names[i].key, &context );
@ -449,11 +449,11 @@ static void test_key_names(void)
{
ret = SetupFindFirstLineA( hinf, "Test", "%foo%", &context );
ok(!ret, "SetupFindFirstLine() should not match unsubstituted keys\n");
ok(GetLastError() == ERROR_LINE_NOT_FOUND, "got wrong error %u\n", GetLastError());
ok(GetLastError() == ERROR_LINE_NOT_FOUND, "got wrong error %lu\n", GetLastError());
}
ret = SetupFindFirstLineA( hinf, "Test", 0, &context );
ok(ret, "SetupFindFirstLineA failed: le=%u\n", GetLastError());
ok(ret, "SetupFindFirstLineA failed: le=%lu\n", GetLastError());
if (!ret)
{
SetupCloseInfFile( hinf );
@ -469,7 +469,7 @@ static void test_key_names(void)
err = GetLastError();
if (field)
{
ok( err == 0, "line %u: bad error %u\n", i, err );
ok( err == 0, "line %u: bad error %lu\n", i, err );
if (key_names[i].fields[index])
{
if (i == 52)
@ -499,7 +499,7 @@ static void test_key_names(void)
else
{
ok( err == 0 || err == ERROR_INVALID_PARAMETER,
"line %u: bad error %u\n", i, err );
"line %u: bad error %lu\n", i, err );
if (key_names[i].fields[index])
ok( 0, "line %u: missing field %s\n", i, key_names[i].fields[index] );
}
@ -523,13 +523,13 @@ static void test_close_inf_file(void)
SetupCloseInfFile(NULL);
ok(GetLastError() == 0xdeadbeef ||
GetLastError() == ERROR_INVALID_PARAMETER, /* Win9x, WinMe */
"Expected 0xdeadbeef, got %u\n", GetLastError());
"Expected 0xdeadbeef, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
SetupCloseInfFile(INVALID_HANDLE_VALUE);
ok(GetLastError() == 0xdeadbeef ||
GetLastError() == ERROR_INVALID_PARAMETER, /* Win9x, WinMe */
"Expected 0xdeadbeef, got %u\n", GetLastError());
"Expected 0xdeadbeef, got %lu\n", GetLastError());
}
static const char *contents = "[Version]\n"
@ -610,7 +610,7 @@ static void test_pSetupGetField(void)
fieldW = pSetupGetFieldW( &context, 4 );
ok( fieldW == NULL, "Expected NULL, got %p\n", fieldW );
ok( GetLastError() == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError() );
"Expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError() );
}
else
{
@ -623,7 +623,7 @@ static void test_pSetupGetField(void)
fieldA = pSetupGetFieldA( &context, 4 );
ok( fieldA == NULL, "Expected NULL, got %p\n", fieldA );
ok( GetLastError() == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError() );
"Expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError() );
}
SetupCloseInfFile( hinf );
@ -677,13 +677,13 @@ static void test_SetupGetIntField(void)
ok( retb, "%u: Expected success\n", i );
ok( GetLastError() == ERROR_SUCCESS ||
GetLastError() == 0xdeadbeef /* win9x, NT4 */,
"%u: Expected ERROR_SUCCESS or 0xdeadbeef, got %u\n", i, GetLastError() );
"%u: Expected ERROR_SUCCESS or 0xdeadbeef, got %lu\n", i, GetLastError() );
}
else
{
ok( !retb, "%u: Expected failure\n", i );
ok( GetLastError() == keys[i].err,
"%u: Expected %d, got %u\n", i, keys[i].err, GetLastError() );
"%u: Expected %ld, got %lu\n", i, keys[i].err, GetLastError() );
}
ok( intfield == keys[i].value, "%u: Expected %d, got %d\n", i, keys[i].value, intfield );
@ -716,91 +716,91 @@ static void test_GLE(void)
retb = SetupFindFirstLineA( hinf, "ImNotThere", NULL, &context );
ok(!retb, "Expected failure\n");
ok(GetLastError() == ERROR_LINE_NOT_FOUND,
"Expected ERROR_LINE_NOT_FOUND, got %08x\n", GetLastError());
"Expected ERROR_LINE_NOT_FOUND, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef);
retb = SetupFindFirstLineA( hinf, "ImNotThere", "ImNotThere", &context );
ok(!retb, "Expected failure\n");
ok(GetLastError() == ERROR_LINE_NOT_FOUND,
"Expected ERROR_LINE_NOT_FOUND, got %08x\n", GetLastError());
"Expected ERROR_LINE_NOT_FOUND, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef);
retb = SetupFindFirstLineA( hinf, "Sectionname", NULL, &context );
ok(retb, "Expected success\n");
ok(GetLastError() == ERROR_SUCCESS,
"Expected ERROR_SUCCESS, got %08x\n", GetLastError());
"Expected ERROR_SUCCESS, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef);
retb = SetupFindFirstLineA( hinf, "Sectionname", "ImNotThere", &context );
ok(!retb, "Expected failure\n");
ok(GetLastError() == ERROR_LINE_NOT_FOUND,
"Expected ERROR_LINE_NOT_FOUND, got %08x\n", GetLastError());
"Expected ERROR_LINE_NOT_FOUND, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef);
retb = SetupFindFirstLineA( hinf, "Sectionname", "Keyname1", &context );
ok(retb, "Expected success\n");
ok(GetLastError() == ERROR_SUCCESS,
"Expected ERROR_SUCCESS, got %08x\n", GetLastError());
"Expected ERROR_SUCCESS, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef);
retb = SetupFindNextMatchLineA( &context, "ImNotThere", &context );
ok(!retb, "Expected failure\n");
ok(GetLastError() == ERROR_LINE_NOT_FOUND,
"Expected ERROR_LINE_NOT_FOUND, got %08x\n", GetLastError());
"Expected ERROR_LINE_NOT_FOUND, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef);
retb = SetupFindNextMatchLineA( &context, "Keyname2", &context );
ok(retb, "Expected success\n");
ok(GetLastError() == ERROR_SUCCESS,
"Expected ERROR_SUCCESS, got %08x\n", GetLastError());
"Expected ERROR_SUCCESS, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef);
retl = SetupGetLineCountA( hinf, "ImNotThere");
ok(retl == -1, "Expected -1, got %d\n", retl);
ok(retl == -1, "Expected -1, got %ld\n", retl);
ok(GetLastError() == ERROR_SECTION_NOT_FOUND,
"Expected ERROR_SECTION_NOT_FOUND, got %08x\n", GetLastError());
"Expected ERROR_SECTION_NOT_FOUND, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef);
retl = SetupGetLineCountA( hinf, "Sectionname");
ok(retl == 2, "Expected 2, got %d\n", retl);
ok(retl == 2, "Expected 2, got %ld\n", retl);
ok(GetLastError() == ERROR_SUCCESS,
"Expected ERROR_SUCCESS, got %08x\n", GetLastError());
"Expected ERROR_SUCCESS, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef);
retb = SetupGetLineTextA( NULL, hinf, "ImNotThere", "ImNotThere", buf, bufsize, &retsize);
ok(!retb, "Expected failure\n");
ok(GetLastError() == ERROR_LINE_NOT_FOUND,
"Expected ERROR_LINE_NOT_FOUND, got %08x\n", GetLastError());
"Expected ERROR_LINE_NOT_FOUND, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef);
retb = SetupGetLineTextA( NULL, hinf, "Sectionname", "ImNotThere", buf, bufsize, &retsize);
ok(!retb, "Expected failure\n");
ok(GetLastError() == ERROR_LINE_NOT_FOUND,
"Expected ERROR_LINE_NOT_FOUND, got %08x\n", GetLastError());
"Expected ERROR_LINE_NOT_FOUND, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef);
retb = SetupGetLineTextA( NULL, hinf, "Sectionname", "Keyname1", buf, bufsize, &retsize);
ok(retb, "Expected success\n");
ok(GetLastError() == ERROR_SUCCESS,
"Expected ERROR_SUCCESS, got %08x\n", GetLastError());
"Expected ERROR_SUCCESS, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef);
retb = SetupGetLineByIndexA( hinf, "ImNotThere", 1, &context );
ok(!retb, "Expected failure\n");
ok(GetLastError() == ERROR_LINE_NOT_FOUND,
"Expected ERROR_LINE_NOT_FOUND, got %08x\n", GetLastError());
"Expected ERROR_LINE_NOT_FOUND, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef);
retb = SetupGetLineByIndexA( hinf, "Sectionname", 1, &context );
ok(retb, "Expected success\n");
ok(GetLastError() == ERROR_SUCCESS,
"Expected ERROR_SUCCESS, got %08x\n", GetLastError());
"Expected ERROR_SUCCESS, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef);
retb = SetupGetLineByIndexA( hinf, "Sectionname", 3, &context );
ok(!retb, "Expected failure\n");
ok(GetLastError() == ERROR_LINE_NOT_FOUND,
"Expected ERROR_LINE_NOT_FOUND, got %08x\n", GetLastError());
"Expected ERROR_LINE_NOT_FOUND, got %08lx\n", GetLastError());
SetupCloseInfFile( hinf );
}

View file

@ -171,7 +171,7 @@ static void test_SetupGetInfInformation(void)
broken(GetLastError() == ERROR_PATH_NOT_FOUND) || /* NT4 */
broken(GetLastError() == ERROR_INVALID_NAME) || /* win2k */
broken(GetLastError() == ERROR_GENERAL_SYNTAX), /* another win2k / winMe */
"Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
"Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
ok(size == 0xdeadbeef, "Expected size to remain unchanged\n");
/* try an invalid inf filename */
@ -185,7 +185,7 @@ static void test_SetupGetInfInformation(void)
ret = SetupGetInfInformationA(NULL, INFINFO_INF_NAME_IS_ABSOLUTE, NULL, 0, &size);
ok(ret == FALSE, "Expected SetupGetInfInformation to fail\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
"Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ok(size == 0xdeadbeef, "Expected size to remain unchanged\n");
}
@ -197,7 +197,7 @@ static void test_SetupGetInfInformation(void)
ret = SetupGetInfInformationA(inf_filename, -1, NULL, 0, &size);
ok(ret == FALSE, "Expected SetupGetInfInformation to fail\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
"Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ok(size == 0xdeadbeef, "Expected size to remain unchanged\n");
/* try a nonexistent inf file */
@ -206,7 +206,7 @@ static void test_SetupGetInfInformation(void)
ret = SetupGetInfInformationA("idontexist", INFINFO_INF_NAME_IS_ABSOLUTE, NULL, 0, &size);
ok(ret == FALSE, "Expected SetupGetInfInformation to fail\n");
ok(GetLastError() == ERROR_FILE_NOT_FOUND,
"Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError());
"Expected ERROR_FILE_NOT_FOUND, got %ld\n", GetLastError());
ok(size == 0xdeadbeef, "Expected size to remain unchanged\n");
/* successfully open the inf file */
@ -220,7 +220,7 @@ static void test_SetupGetInfInformation(void)
ret = SetupGetInfInformationA(inf_filename, INFINFO_INF_NAME_IS_ABSOLUTE, NULL, size, &size);
ok(ret == FALSE, "Expected SetupGetInfInformation to fail\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
"Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* set ReturnBuffer to NULL and ReturnBufferSize to non-zero value 'size-1' */
ret = SetupGetInfInformationA(inf_filename, INFINFO_INF_NAME_IS_ABSOLUTE, NULL, size-1, &size);
@ -241,7 +241,7 @@ static void test_SetupGetInfInformation(void)
ret = SetupGetInfInformationA(inf_filename, INFINFO_INF_NAME_IS_ABSOLUTE, info, size - 1, &size);
ok(ret == FALSE, "Expected SetupGetInfInformation to fail\n");
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER,
"Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError());
"Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError());
/* successfully get the inf information */
ret = SetupGetInfInformationA(inf_filename, INFINFO_INF_NAME_IS_ABSOLUTE, info, size, &size);
@ -267,7 +267,7 @@ static void test_SetupGetInfInformation(void)
skip("need admin rights\n");
goto done;
}
ok(ret, "can't create inf file %u\n", GetLastError());
ok(ret, "can't create inf file %lu\n", GetLastError());
HeapFree(GetProcessHeap(), 0, info);
info = alloc_inf_info("test.inf", INFINFO_DEFAULT_SEARCH, &size);
@ -289,7 +289,7 @@ static void test_SetupGetInfInformation(void)
/* test the INFINFO_DEFAULT_SEARCH search flag */
ret = SetupGetInfInformationA("test.inf", INFINFO_DEFAULT_SEARCH, info, size, &size);
ok(ret == TRUE, "Expected SetupGetInfInformation to succeed: %d\n", GetLastError());
ok(ret == TRUE, "Expected SetupGetInfInformation to succeed: %ld\n", GetLastError());
ok(check_info_filename(info, inf_one), "Expected returned filename to be equal\n");
HeapFree(GetProcessHeap(), 0, info);
@ -330,7 +330,7 @@ static void test_SetupGetSourceFileLocation(void)
ret = SetupGetSourceFileLocationA(hinf, NULL, "lanconf.exe", &source_id, buffer, sizeof(buffer), &required);
ok(ret, "SetupGetSourceFileLocation failed\n");
ok(required == 1, "unexpected required size: %d\n", required);
ok(required == 1, "unexpected required size: %ld\n", required);
ok(source_id == 2, "unexpected source id: %d\n", source_id);
ok(!lstrcmpA("", buffer), "unexpected result string: %s\n", buffer);
@ -343,7 +343,7 @@ static void test_SetupGetSourceFileLocation(void)
hinf = SetupOpenInfFileA(inf_filename, NULL, INF_STYLE_WIN4, NULL);
error = GetLastError();
ok(hinf == INVALID_HANDLE_VALUE, "could open inf file\n");
ok(error == ERROR_WRONG_INF_STYLE, "got wrong error: %d\n", error);
ok(error == ERROR_WRONG_INF_STYLE, "got wrong error: %ld\n", error);
hinf = SetupOpenInfFileA(inf_filename, NULL, INF_STYLE_OLDNT, NULL);
ok(hinf != INVALID_HANDLE_VALUE, "could not open inf file\n");
@ -376,7 +376,7 @@ static void test_SetupGetSourceInfo(void)
ret = SetupGetSourceInfoA(hinf, 2, SRCINFO_PATH, buffer, sizeof(buffer), &required);
ok(ret, "SetupGetSourceInfoA failed\n");
ok(required == 1, "unexpected required size: %d\n", required);
ok(required == 1, "unexpected required size: %ld\n", required);
ok(!lstrcmpA("", buffer), "unexpected result string: %s\n", buffer);
required = 0;
@ -385,7 +385,7 @@ static void test_SetupGetSourceInfo(void)
ret = SetupGetSourceInfoA(hinf, 2, SRCINFO_TAGFILE, buffer, sizeof(buffer), &required);
ok(ret, "SetupGetSourceInfoA failed\n");
ok(required == 28, "unexpected required size: %d\n", required);
ok(required == 28, "unexpected required size: %ld\n", required);
ok(!lstrcmpA("LANCOM\\LANtools\\lanconf.cab", buffer), "unexpected result string: %s\n", buffer);
required = 0;
@ -394,7 +394,7 @@ static void test_SetupGetSourceInfo(void)
ret = SetupGetSourceInfoA(hinf, 2, SRCINFO_DESCRIPTION, buffer, sizeof(buffer), &required);
ok(ret, "SetupGetSourceInfoA failed\n");
ok(required == 19, "unexpected required size: %d\n", required);
ok(required == 19, "unexpected required size: %ld\n", required);
ok(!lstrcmpA("LANCOM Software CD", buffer), "unexpected result string: %s\n", buffer);
SetupCloseInfFile(hinf);
@ -428,7 +428,7 @@ static void test_SetupGetTargetPath(void)
ret = SetupGetTargetPathA(hinf, &ctx, NULL, buffer, sizeof(buffer), &required);
ok(ret, "SetupGetTargetPathA failed\n");
ok(required == 10, "unexpected required size: %d\n", required);
ok(required == 10, "unexpected required size: %ld\n", required);
/* Retrieve the system drive from the windows directory.
* (%SystemDrive% is not available on Win9x)
*/
@ -452,7 +452,7 @@ static void test_SetupGetTargetPath(void)
lstrcpyA(destfile, WIN_DIR);
ok(required == lstrlenA(destfile) + 1, "unexpected required size: %d\n", required);
ok(required == lstrlenA(destfile) + 1, "unexpected required size: %ld\n", required);
ok(!lstrcmpiA(buffer, destfile), "unexpected path: %s\n", buffer);
SetupCloseInfFile(hinf);
@ -470,7 +470,7 @@ static void test_SetupGetTargetPath(void)
GetSystemDirectoryA(destfile, MAX_PATH);
ok(required == lstrlenA(destfile) + 1, "unexpected required size: %d\n", required);
ok(required == lstrlenA(destfile) + 1, "unexpected required size: %ld\n", required);
ok(!lstrcmpiA(buffer, destfile), "unexpected path: %s\n", buffer);
SetupCloseInfFile(hinf);
@ -488,7 +488,7 @@ static void test_SetupGetTargetPath(void)
lstrcpyA(destfile, WIN_DIR);
ok(required == lstrlenA(destfile) + 1, "unexpected required size: %d\n", required);
ok(required == lstrlenA(destfile) + 1, "unexpected required size: %ld\n", required);
ok(!lstrcmpiA(buffer, destfile), "unexpected path: %s\n", buffer);
SetupCloseInfFile(hinf);
@ -506,7 +506,7 @@ static void test_SetupGetTargetPath(void)
lstrcpyA(destfile, WIN_DIR);
ok(required == lstrlenA(destfile) + 1, "unexpected required size: %d\n", required);
ok(required == lstrlenA(destfile) + 1, "unexpected required size: %ld\n", required);
ok(!lstrcmpiA(buffer, destfile), "unexpected path: %s\n", buffer);
SetupCloseInfFile(hinf);

View file

@ -69,7 +69,7 @@ static void create_source_fileW(LPWSTR filename, const BYTE *data, DWORD size)
static UINT CALLBACK dummy_callbackA(PVOID Context, UINT Notification,
UINT_PTR Param1, UINT_PTR Param2)
{
ok(0, "Received unexpected notification (%p, %u, %lu, %lu)\n", Context,
ok(0, "Received unexpected notification (%p, %u, %Iu, %Iu)\n", Context,
Notification, Param1, Param2);
return 0;
}
@ -77,7 +77,7 @@ static UINT CALLBACK dummy_callbackA(PVOID Context, UINT Notification,
static UINT CALLBACK dummy_callbackW(PVOID Context, UINT Notification,
UINT_PTR Param1, UINT_PTR Param2)
{
ok(0, "Received unexpected notification (%p, %u, %lu, %lu)\n", Context,
ok(0, "Received unexpected notification (%p, %u, %Iu, %Iu)\n", Context,
Notification, Param1, Param2);
return 0;
}
@ -117,7 +117,7 @@ static void test_invalid_parametersA(void)
ok(!ret, "[%d] Expected SetupIterateCabinetA to return 0, got %d\n", i, ret);
todo_wine_if (invalid_parameters[i].todo_lasterror)
ok(GetLastError() == invalid_parameters[i].expected_lasterror,
"[%d] Expected GetLastError() to return %u, got %u\n",
"[%d] Expected GetLastError() to return %lu, got %lu\n",
i, invalid_parameters[i].expected_lasterror, GetLastError());
}
@ -126,7 +126,7 @@ static void test_invalid_parametersA(void)
ok(!ret, "Expected SetupIterateCabinetA to return 0, got %d\n", ret);
ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY ||
GetLastError() == ERROR_FILE_NOT_FOUND, /* Win9x/NT4/Win2k */
"Expected GetLastError() to return ERROR_NOT_ENOUGH_MEMORY, got %u\n",
"Expected GetLastError() to return ERROR_NOT_ENOUGH_MEMORY, got %lu\n",
GetLastError());
SetLastError(0xdeadbeef);
@ -134,7 +134,7 @@ static void test_invalid_parametersA(void)
ok(!ret, "Expected SetupIterateCabinetA to return 0, got %d\n", ret);
ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY ||
GetLastError() == ERROR_FILE_NOT_FOUND, /* Win9x/NT4/Win2k */
"Expected GetLastError() to return ERROR_NOT_ENOUGH_MEMORY, got %u\n",
"Expected GetLastError() to return ERROR_NOT_ENOUGH_MEMORY, got %lu\n",
GetLastError());
DeleteFileA(source);
@ -183,7 +183,7 @@ static void test_invalid_parametersW(void)
ok(!ret, "[%d] Expected SetupIterateCabinetW to return 0, got %d\n", i, ret);
todo_wine_if (invalid_parameters[i].todo_lasterror)
ok(GetLastError() == invalid_parameters[i].expected_lasterror,
"[%d] Expected GetLastError() to return %u, got %u\n",
"[%d] Expected GetLastError() to return %lu, got %lu\n",
i, invalid_parameters[i].expected_lasterror, GetLastError());
}
@ -192,7 +192,7 @@ static void test_invalid_parametersW(void)
ok(!ret, "Expected SetupIterateCabinetW to return 0, got %d\n", ret);
ok(GetLastError() == ERROR_INVALID_PARAMETER ||
GetLastError() == ERROR_NOT_ENOUGH_MEMORY, /* Vista/Win2k8 */
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
SetLastError(0xdeadbeef);
@ -200,7 +200,7 @@ static void test_invalid_parametersW(void)
ok(!ret, "Expected SetupIterateCabinetW to return 0, got %d\n", ret);
ok(GetLastError() == ERROR_INVALID_PARAMETER ||
GetLastError() == ERROR_NOT_ENOUGH_MEMORY, /* Vista/Win2k8 */
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
SetLastError(0xdeadbeef);
@ -208,7 +208,7 @@ static void test_invalid_parametersW(void)
ok(!ret, "Expected SetupIterateCabinetW to return 0, got %d\n", ret);
ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY ||
GetLastError() == ERROR_FILE_NOT_FOUND, /* NT4/Win2k */
"Expected GetLastError() to return ERROR_NOT_ENOUGH_MEMORY, got %u\n",
"Expected GetLastError() to return ERROR_NOT_ENOUGH_MEMORY, got %lu\n",
GetLastError());
SetLastError(0xdeadbeef);
@ -216,7 +216,7 @@ static void test_invalid_parametersW(void)
ok(!ret, "Expected SetupIterateCabinetW to return 0, got %d\n", ret);
ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY ||
GetLastError() == ERROR_FILE_NOT_FOUND, /* NT4/Win2k */
"Expected GetLastError() to return ERROR_NOT_ENOUGH_MEMORY, got %u\n",
"Expected GetLastError() to return ERROR_NOT_ENOUGH_MEMORY, got %lu\n",
GetLastError());
DeleteFileW(source);
@ -250,14 +250,14 @@ static void test_invalid_callbackA(void)
ret = SetupIterateCabinetA(source, 0, NULL, NULL);
ok(!ret, "Expected SetupIterateCabinetA to return 0, got %d\n", ret);
ok(GetLastError() == ERROR_INVALID_DATA,
"Expected GetLastError() to return ERROR_INVALID_DATA, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_DATA, got %lu\n",
GetLastError());
SetLastError(0xdeadbeef);
ret = SetupIterateCabinetA(source, 0, crash_callbackA, NULL);
ok(!ret, "Expected SetupIterateCabinetA to return 0, got %d\n", ret);
ok(GetLastError() == ERROR_INVALID_DATA,
"Expected GetLastError() to return ERROR_INVALID_DATA, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_DATA, got %lu\n",
GetLastError());
DeleteFileA(source);
@ -284,14 +284,14 @@ static void test_invalid_callbackW(void)
ret = SetupIterateCabinetW(source, 0, NULL, NULL);
ok(!ret, "Expected SetupIterateCabinetW to return 0, got %d\n", ret);
ok(GetLastError() == ERROR_INVALID_DATA,
"Expected GetLastError() to return ERROR_INVALID_DATA, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_DATA, got %lu\n",
GetLastError());
SetLastError(0xdeadbeef);
ret = SetupIterateCabinetW(source, 0, crash_callbackW, NULL);
ok(!ret, "Expected SetupIterateCabinetW to return 0, got %d\n", ret);
ok(GetLastError() == ERROR_INVALID_DATA,
"Expected GetLastError() to return ERROR_INVALID_DATA, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_DATA, got %lu\n",
GetLastError());
DeleteFileW(source);
@ -342,8 +342,8 @@ static UINT CALLBACK simple_callbackA(void *context, UINT message, UINT_PTR para
ok(index < ARRAY_SIZE(expected_files), "%u: Got unexpected file.\n", index);
ok(!strcmp(info->NameInCabinet, expected_files[index].nameA),
"%u: Got file name %s.\n", index, debugstr_a(info->NameInCabinet));
ok(info->FileSize == expected_files[index].size, "%u: Got file size %u.\n", index, info->FileSize);
ok(!info->Win32Error, "%u: Got error %u.\n", index, info->Win32Error);
ok(info->FileSize == expected_files[index].size, "%u: Got file size %lu.\n", index, info->FileSize);
ok(!info->Win32Error, "%u: Got error %lu.\n", index, info->Win32Error);
ok(info->DosDate == 14545, "%u: Got date %u.\n", index, info->DosDate);
ok(info->DosTime == 18672, "%u: Got time %u.\n", index, info->DosTime);
ok(info->DosAttribs == FILE_ATTRIBUTE_ARCHIVE, "%u: Got attributes %#x.\n", index, info->DosAttribs);
@ -410,12 +410,12 @@ static void test_simple_enumerationA(void)
{
snprintf(path, ARRAY_SIZE(path), "%s\\%s", temp, expected_files[i].nameA);
ret = DeleteFileA(path);
ok(ret, "Failed to delete %s, error %u.\n", debugstr_a(path), GetLastError());
ok(ret, "Failed to delete %s, error %lu.\n", debugstr_a(path), GetLastError());
}
snprintf(path, ARRAY_SIZE(path), "%s\\testcab.cab", temp);
ret = DeleteFileA(path);
ok(ret, "Failed to delete %s, error %u.\n", debugstr_a(path), GetLastError());
ok(ret, "Failed to delete %s, error %lu.\n", debugstr_a(path), GetLastError());
}
static UINT CALLBACK simple_callbackW(void *context, UINT message, UINT_PTR param1, UINT_PTR param2)
@ -450,8 +450,8 @@ static UINT CALLBACK simple_callbackW(void *context, UINT message, UINT_PTR para
ok(index < ARRAY_SIZE(expected_files), "%u: Got unexpected file.\n", index);
ok(!wcscmp(info->NameInCabinet, expected_files[index].nameW),
"%u: Got file name %s.\n", index, debugstr_w(info->NameInCabinet));
ok(info->FileSize == expected_files[index].size, "%u: Got file size %u.\n", index, info->FileSize);
ok(!info->Win32Error, "%u: Got error %u.\n", index, info->Win32Error);
ok(info->FileSize == expected_files[index].size, "%u: Got file size %lu.\n", index, info->FileSize);
ok(!info->Win32Error, "%u: Got error %lu.\n", index, info->Win32Error);
ok(info->DosDate == 14545, "%u: Got date %u.\n", index, info->DosDate);
ok(info->DosTime == 18672, "%u: Got time %u.\n", index, info->DosTime);
ok(info->DosAttribs == FILE_ATTRIBUTE_ARCHIVE, "%u: Got attributes %#x.\n", index, info->DosAttribs);
@ -518,12 +518,12 @@ static void test_simple_enumerationW(void)
{
swprintf(path, ARRAY_SIZE(path), L"%s\\%s", temp, expected_files[i].nameW);
ret = DeleteFileW(path);
ok(ret, "Failed to delete %s, error %u.\n", debugstr_w(path), GetLastError());
ok(ret, "Failed to delete %s, error %lu.\n", debugstr_w(path), GetLastError());
}
swprintf(path, ARRAY_SIZE(path), L"%s\\testcab.cab", temp);
ret = DeleteFileW(path);
ok(ret, "Failed to delete %s, error %u.\n", debugstr_w(path), GetLastError());
ok(ret, "Failed to delete %s, error %lu.\n", debugstr_w(path), GetLastError());
}
START_TEST(setupcab)

View file

@ -88,15 +88,15 @@ static void test_StringTableAddString(void)
retval=pStringTableAddString(table,String,0);
ok(retval!=-1,"Failed to add String to String Table\n");
ok(hstring==retval,"string handle %x != String handle %x in String Table\n", hstring, retval);
ok(hstring==retval,"string handle %lx != String handle %lx in String Table\n", hstring, retval);
hfoo=pStringTableAddString(table,foo,0);
ok(hfoo!=-1,"Failed to add foo to String Table\n");
ok(hfoo!=hstring,"foo and string share the same ID %x in String Table\n", hfoo);
ok(hfoo!=hstring,"foo and string share the same ID %lx in String Table\n", hfoo);
/* case sensitive */
hString=pStringTableAddString(table,String,ST_CASE_SENSITIVE_COMPARE);
ok(hstring!=hString,"String handle and string share same ID %x in Table\n", hstring);
ok(hstring!=hString,"String handle and string share same ID %lx in Table\n", hstring);
pStringTableDestroy(table);
}
@ -116,15 +116,15 @@ static void test_StringTableAddStringEx(void)
retval = pStringTableAddStringEx(table, String, 0, NULL, 0);
ok(retval != -1, "Failed to add String to String Table\n");
ok(hstring == retval, "string handle %x != String handle %x in String Table\n", hstring, retval);
ok(hstring == retval, "string handle %lx != String handle %lx in String Table\n", hstring, retval);
hfoo = pStringTableAddStringEx(table, foo, 0, NULL, 0);
ok(hfoo != -1, "Failed to add foo to String Table\n");
ok(hfoo != hstring, "foo and string share the same ID %x in String Table\n", hfoo);
ok(hfoo != hstring, "foo and string share the same ID %lx in String Table\n", hfoo);
/* case sensitive */
hString = pStringTableAddStringEx(table, String, ST_CASE_SENSITIVE_COMPARE, NULL, 0);
ok(hstring != hString, "String handle and string share same ID %x in Table\n", hstring);
ok(hstring != hString, "String handle and string share same ID %lx in Table\n", hstring);
pStringTableDestroy(table);
@ -134,19 +134,19 @@ static void test_StringTableAddStringEx(void)
extra = 10;
hstring = pStringTableAddStringEx(table, string, 0, &extra, 4);
ok(hstring != -1, "failed to add string, %d\n", hstring);
ok(hstring != -1, "failed to add string, %ld\n", hstring);
extra = 0;
ret = pStringTableGetExtraData(table, hstring, &extra, 4);
ok(ret && extra == 10, "got %d, extra %d\n", ret, extra);
ok(ret && extra == 10, "got %d, extra %ld\n", ret, extra);
extra = 11;
hstring = pStringTableAddStringEx(table, string, 0, &extra, 4);
ok(hstring != -1, "failed to add string, %d\n", hstring);
ok(hstring != -1, "failed to add string, %ld\n", hstring);
extra = 0;
ret = pStringTableGetExtraData(table, hstring, &extra, 4);
ok(ret && extra == 10, "got %d, extra %d\n", ret, extra);
ok(ret && extra == 10, "got %d, extra %ld\n", ret, extra);
pStringTableDestroy(table);
}
@ -189,7 +189,7 @@ static void test_StringTableLookUpString(void)
retval=pStringTableLookUpString(table,string,0);
ok(retval!=-1,"Failed find string in String Table 1\n");
ok(retval==hstring,
"Lookup for string (%x) does not match previous handle (%x) in String Table 1\n",
"Lookup for string (%lx) does not match previous handle (%lx) in String Table 1\n",
retval, hstring);
retval=pStringTableLookUpString(table2,string,0);
@ -204,7 +204,7 @@ static void test_StringTableLookUpString(void)
retval=pStringTableLookUpString(table,foo,0);
ok(retval!=-1,"Failed find foo in String Table 1\n");
ok(retval==hfoo,
"Lookup for foo (%x) does not match previous handle (%x) in String Table 1\n",
"Lookup for foo (%lx) does not match previous handle (%lx) in String Table 1\n",
retval, hfoo);
retval=pStringTableLookUpString(table2,foo,0);
@ -215,7 +215,7 @@ static void test_StringTableLookUpString(void)
retval2=pStringTableLookUpString(table,String,ST_CASE_SENSITIVE_COMPARE);
ok(retval!=retval2,"Lookup of string equals String in Table 1\n");
ok(retval==hString,
"Lookup for String (%x) does not match previous handle (%x) in String Table 1\n",
"Lookup for String (%lx) does not match previous handle (%lx) in String Table 1\n",
retval, hString);
pStringTableDestroy(table);
@ -248,7 +248,7 @@ static void test_StringTableLookUpStringEx(void)
retval = pStringTableLookUpStringEx(table, string, 0, NULL, 0);
ok(retval != ~0u, "Failed find string in String Table 1\n");
ok(retval == hstring,
"Lookup for string (%x) does not match previous handle (%x) in String Table 1\n",
"Lookup for string (%lx) does not match previous handle (%lx) in String Table 1\n",
retval, hstring);
retval = pStringTableLookUpStringEx(table2, string, 0, NULL, 0);
@ -263,7 +263,7 @@ static void test_StringTableLookUpStringEx(void)
retval=pStringTableLookUpStringEx(table, foo, 0, NULL, 0);
ok(retval != ~0u, "Failed find foo in String Table 1\n");
ok(retval == hfoo,
"Lookup for foo (%x) does not match previous handle (%x) in String Table 1\n",
"Lookup for foo (%lx) does not match previous handle (%lx) in String Table 1\n",
retval, hfoo);
retval = pStringTableLookUpStringEx(table2, foo, 0, NULL, 0);
@ -274,7 +274,7 @@ static void test_StringTableLookUpStringEx(void)
retval2 = pStringTableLookUpStringEx(table, String, ST_CASE_SENSITIVE_COMPARE, NULL, 0);
ok(retval != retval2, "Lookup of string equals String in Table 1\n");
ok(retval == hString,
"Lookup for String (%x) does not match previous handle (%x) in String Table 1\n",
"Lookup for String (%lx) does not match previous handle (%lx) in String Table 1\n",
retval, hString);
pStringTableDestroy(table);
@ -319,10 +319,10 @@ static void test_StringTableStringFromId(void)
/* correct */
id2 = pStringTableLookUpString(table, string, 0);
ok(id2 == id, "got %d and %d\n", id2, id);
ok(id2 == id, "got %ld and %ld\n", id2, id);
string2 = pStringTableStringFromId(table, id2);
ok(string2 != NULL, "failed to lookup string %d\n", id2);
ok(string2 != NULL, "failed to lookup string %ld\n", id2);
ok(!lstrcmpiW(string, string2), "got %s, expected %s\n", wine_dbgstr_w(string2), wine_dbgstr_w(string));
pStringTableDestroy(table);
@ -348,14 +348,14 @@ static void test_stringtable_layout(void)
ptr = (struct stringtable*)table;
ok(ptr->data != NULL, "got %p\n", ptr->data);
/* first data offset is right after bucket area */
ok(ptr->nextoffset == 509*sizeof(DWORD), "got %d\n", ptr->nextoffset);
ok(ptr->allocated != 0, "got %d\n", ptr->allocated);
ok(ptr->nextoffset == 509*sizeof(DWORD), "got %ld\n", ptr->nextoffset);
ok(ptr->allocated != 0, "got %ld\n", ptr->allocated);
todo_wine {
ok(ptr->unk[0] != 0, "got %lx\n", ptr->unk[0]);
ok(ptr->unk[1] != 0, "got %lx\n", ptr->unk[1]);
ok(ptr->unk[0] != 0, "got %Ix\n", ptr->unk[0]);
ok(ptr->unk[1] != 0, "got %Ix\n", ptr->unk[1]);
}
ok(ptr->max_extra_size == 0, "got %d\n", ptr->max_extra_size);
ok(ptr->lcid == GetThreadLocale(), "got %x, thread lcid %x\n", ptr->lcid, GetThreadLocale());
ok(ptr->max_extra_size == 0, "got %ld\n", ptr->max_extra_size);
ok(ptr->lcid == GetThreadLocale(), "got %lx, thread lcid %lx\n", ptr->lcid, GetThreadLocale());
pStringTableDestroy(table);
}

View file

@ -10,4 +10,4 @@ files:
dlls/setupapi/setupcab.c: dll/win32/setupapi/setupcab.c
dlls/setupapi/stringtable.c: dll/win32/setupapi/stringtable_wine.c
tags:
wine: 0e4c108490db8d1c7b3c5d016979ace327d2c8ab
wine: b73e3102009cc7151ab58321800aeded24c1307f