Wine-Devel
Threads by month
- ----- 2026 -----
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- 4 participants
- 84517 discussions
March 3, 2022
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
dlls/dinput/joystick_hid.c | 5 +++++
dlls/dinput/tests/joystick8.c | 9 ---------
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/dlls/dinput/joystick_hid.c b/dlls/dinput/joystick_hid.c
index 80991e8c150..87e343bb47b 100644
--- a/dlls/dinput/joystick_hid.c
+++ b/dlls/dinput/joystick_hid.c
@@ -414,6 +414,11 @@ static const WCHAR *object_usage_to_string( DIDEVICEOBJECTINSTANCEW *instance )
case MAKELONG(PID_USAGE_TRIGGER_BUTTON, HID_USAGE_PAGE_PID): return L"Trigger Button";
case MAKELONG(HID_USAGE_SIMULATION_RUDDER, HID_USAGE_PAGE_SIMULATION): return L"Rudder";
+ case MAKELONG(HID_USAGE_SIMULATION_THROTTLE, HID_USAGE_PAGE_SIMULATION): return L"Throttle";
+ case MAKELONG(HID_USAGE_SIMULATION_ACCELERATOR, HID_USAGE_PAGE_SIMULATION): return L"Accelerator";
+ case MAKELONG(HID_USAGE_SIMULATION_BRAKE, HID_USAGE_PAGE_SIMULATION): return L"Brake";
+ case MAKELONG(HID_USAGE_SIMULATION_CLUTCH, HID_USAGE_PAGE_SIMULATION): return L"Clutch";
+ case MAKELONG(HID_USAGE_SIMULATION_STEERING, HID_USAGE_PAGE_SIMULATION): return L"Steering";
default: return NULL;
}
}
diff --git a/dlls/dinput/tests/joystick8.c b/dlls/dinput/tests/joystick8.c
index e65e3ca9970..8899cbdfecf 100644
--- a/dlls/dinput/tests/joystick8.c
+++ b/dlls/dinput/tests/joystick8.c
@@ -2773,20 +2773,11 @@ static void test_driving_wheel_axes(void)
.wUsage = HID_USAGE_GENERIC_JOYSTICK,
},
};
- struct check_objects_todos object_todos[ARRAY_SIZE(expect_objects)] =
- {
- {.name = TRUE},
- {.name = TRUE},
- {.name = TRUE},
- {.name = TRUE},
- {.name = TRUE},
- };
struct check_objects_params check_objects_params =
{
.version = DIRECTINPUT_VERSION,
.expect_count = ARRAY_SIZE(expect_objects),
.expect_objs = expect_objects,
- .todo_objs = object_todos,
};
WCHAR cwd[MAX_PATH], tempdir[MAX_PATH];
--
2.34.1
2
7
[PATCH 01/20] dlls/kernel32/tests/actctx.c: enable compilation with long types
by Eric Pouech March 3, 2022
by Eric Pouech March 3, 2022
March 3, 2022
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/kernel32/tests/actctx.c | 605 +++++++++++++++++++++---------------------
1 file changed, 303 insertions(+), 302 deletions(-)
diff --git a/dlls/kernel32/tests/actctx.c b/dlls/kernel32/tests/actctx.c
index c26eb08f306..66b945230aa 100644
--- a/dlls/kernel32/tests/actctx.c
+++ b/dlls/kernel32/tests/actctx.c
@@ -15,6 +15,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#undef WINE_NO_LONG_TYPES /* temporary for migration */
#include "ntstatus.h"
#define WIN32_NO_STATUS
@@ -562,7 +563,7 @@ static BOOL create_manifest_file(const char *filename, const char *manifest, int
file = CreateFileW(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL, NULL);
- ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %u\n", GetLastError());
+ ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %lu\n", GetLastError());
if(file == INVALID_HANDLE_VALUE)
return FALSE;
WriteFile(file, manifest, manifest_len, &size, NULL);
@@ -574,7 +575,7 @@ static BOOL create_manifest_file(const char *filename, const char *manifest, int
GetFullPathNameW(path, ARRAY_SIZE(depmanifest_path), depmanifest_path, NULL);
file = CreateFileW(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL, NULL);
- ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %u\n", GetLastError());
+ ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %lu\n", GetLastError());
if(file == INVALID_HANDLE_VALUE)
return FALSE;
WriteFile(file, depmanifest, strlen(depmanifest), &size, NULL);
@@ -651,8 +652,8 @@ static void test_detailed_info(HANDLE handle, const detailed_info_t *exinfo, int
b = QueryActCtxW(0, handle, NULL, ActivationContextDetailedInformation, &detailed_info_tmp,
sizeof(detailed_info_tmp), &size);
ok_(__FILE__, line)(!b, "QueryActCtx succeeded\n");
- ok_(__FILE__, line)(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetLastError() = %u\n", GetLastError());
- ok_(__FILE__, line)(size == exsize, "size=%ld, expected %ld\n", size, exsize);
+ ok_(__FILE__, line)(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetLastError() = %lu\n", GetLastError());
+ ok_(__FILE__, line)(size == exsize, "size=%Id, expected %Id\n", size, exsize);
}else {
size = sizeof(ACTIVATION_CONTEXT_DETAILED_INFORMATION);
}
@@ -660,35 +661,35 @@ static void test_detailed_info(HANDLE handle, const detailed_info_t *exinfo, int
detailed_info = HeapAlloc(GetProcessHeap(), 0, size);
memset(detailed_info, 0xfe, size);
b = QueryActCtxW(0, handle, NULL, ActivationContextDetailedInformation, detailed_info, size, &retsize);
- ok_(__FILE__, line)(b, "QueryActCtx failed: %u\n", GetLastError());
- ok_(__FILE__, line)(retsize == exsize, "size=%ld, expected %ld\n", retsize, exsize);
+ ok_(__FILE__, line)(b, "QueryActCtx failed: %lu\n", GetLastError());
+ ok_(__FILE__, line)(retsize == exsize, "size=%Id, expected %Id\n", retsize, exsize);
- ok_(__FILE__, line)(detailed_info->dwFlags == 0, "detailed_info->dwFlags=%x\n", detailed_info->dwFlags);
+ ok_(__FILE__, line)(detailed_info->dwFlags == 0, "detailed_info->dwFlags=%lx\n", detailed_info->dwFlags);
ok_(__FILE__, line)(detailed_info->ulFormatVersion == exinfo->format_version,
- "detailed_info->ulFormatVersion=%u, expected %u\n", detailed_info->ulFormatVersion,
+ "detailed_info->ulFormatVersion=%lu, expected %lu\n", detailed_info->ulFormatVersion,
exinfo->format_version);
ok_(__FILE__, line)(exinfo->assembly_cnt_min <= detailed_info->ulAssemblyCount &&
detailed_info->ulAssemblyCount <= exinfo->assembly_cnt_max,
- "detailed_info->ulAssemblyCount=%u, expected between %u and %u\n", detailed_info->ulAssemblyCount,
+ "detailed_info->ulAssemblyCount=%lu, expected between %lu and %lu\n", detailed_info->ulAssemblyCount,
exinfo->assembly_cnt_min, exinfo->assembly_cnt_max);
ok_(__FILE__, line)(detailed_info->ulRootManifestPathType == exinfo->root_manifest_type,
- "detailed_info->ulRootManifestPathType=%u, expected %u\n",
+ "detailed_info->ulRootManifestPathType=%lu, expected %lu\n",
detailed_info->ulRootManifestPathType, exinfo->root_manifest_type);
ok_(__FILE__, line)(detailed_info->ulRootManifestPathChars ==
(exinfo->root_manifest_path ? lstrlenW(exinfo->root_manifest_path) : 0),
- "detailed_info->ulRootManifestPathChars=%u, expected %u\n",
+ "detailed_info->ulRootManifestPathChars=%lu, expected %u\n",
detailed_info->ulRootManifestPathChars,
exinfo->root_manifest_path ?lstrlenW(exinfo->root_manifest_path) : 0);
ok_(__FILE__, line)(detailed_info->ulRootConfigurationPathType == exinfo->root_config_type,
- "detailed_info->ulRootConfigurationPathType=%u, expected %u\n",
+ "detailed_info->ulRootConfigurationPathType=%lu, expected %lu\n",
detailed_info->ulRootConfigurationPathType, exinfo->root_config_type);
ok_(__FILE__, line)(detailed_info->ulRootConfigurationPathChars == 0,
- "detailed_info->ulRootConfigurationPathChars=%d\n", detailed_info->ulRootConfigurationPathChars);
+ "detailed_info->ulRootConfigurationPathChars=%ld\n", detailed_info->ulRootConfigurationPathChars);
ok_(__FILE__, line)(detailed_info->ulAppDirPathType == exinfo->app_dir_type,
- "detailed_info->ulAppDirPathType=%u, expected %u\n", detailed_info->ulAppDirPathType,
+ "detailed_info->ulAppDirPathType=%lu, expected %lu\n", detailed_info->ulAppDirPathType,
exinfo->app_dir_type);
ok_(__FILE__, line)(detailed_info->ulAppDirPathChars == (exinfo->app_dir ? lstrlenW(exinfo->app_dir) : 0),
- "detailed_info->ulAppDirPathChars=%u, expected %u\n",
+ "detailed_info->ulAppDirPathChars=%lu, expected %u\n",
detailed_info->ulAppDirPathChars, exinfo->app_dir ? lstrlenW(exinfo->app_dir) : 0);
if(exinfo->root_manifest_path) {
ok_(__FILE__, line)(detailed_info->lpRootManifestPath != NULL, "detailed_info->lpRootManifestPath == NULL\n");
@@ -789,9 +790,9 @@ static void test_info_in_assembly(HANDLE handle, DWORD id, const info_in_assembl
size = 0xdeadbeef;
b = QueryActCtxW(0, handle, &id, AssemblyDetailedInformationInActivationContext, &info_tmp, sizeof(info_tmp), &size);
ok_(__FILE__, line)(!b, "QueryActCtx succeeded\n");
- ok_(__FILE__, line)(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetLastError() = %u\n", GetLastError());
+ ok_(__FILE__, line)(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetLastError() = %lu\n", GetLastError());
- ok_(__FILE__, line)(size >= exsize, "size=%lu, expected %lu\n", size, exsize);
+ ok_(__FILE__, line)(size >= exsize, "size=%Iu, expected %Iu\n", size, exsize);
if (size == 0xdeadbeef)
{
@@ -804,52 +805,52 @@ static void test_info_in_assembly(HANDLE handle, DWORD id, const info_in_assembl
size = 0xdeadbeef;
b = QueryActCtxW(0, handle, &id, AssemblyDetailedInformationInActivationContext, info, size, &size);
- ok_(__FILE__, line)(b, "QueryActCtx failed: %u\n", GetLastError());
+ ok_(__FILE__, line)(b, "QueryActCtx failed: %lu\n", GetLastError());
if (!exinfo->manifest_path)
exsize += info->ulManifestPathLength + sizeof(WCHAR);
if (!exinfo->encoded_assembly_id)
exsize += info->ulEncodedAssemblyIdentityLength + sizeof(WCHAR);
if (exinfo->has_assembly_dir)
exsize += info->ulAssemblyDirectoryNameLength + sizeof(WCHAR);
- ok_(__FILE__, line)(size == exsize, "size=%lu, expected %lu\n", size, exsize);
+ ok_(__FILE__, line)(size == exsize, "size=%Iu, expected %Iu\n", size, exsize);
if (0) /* FIXME: flags meaning unknown */
{
- ok_(__FILE__, line)((info->ulFlags) == exinfo->flags, "info->ulFlags = %x, expected %x\n",
+ ok_(__FILE__, line)((info->ulFlags) == exinfo->flags, "info->ulFlags = %lx, expected %lx\n",
info->ulFlags, exinfo->flags);
}
if(exinfo->encoded_assembly_id) {
len = lstrlenW(exinfo->encoded_assembly_id)*sizeof(WCHAR);
ok_(__FILE__, line)(info->ulEncodedAssemblyIdentityLength == len,
- "info->ulEncodedAssemblyIdentityLength = %u, expected %u\n",
+ "info->ulEncodedAssemblyIdentityLength = %lu, expected %lu\n",
info->ulEncodedAssemblyIdentityLength, len);
} else {
ok_(__FILE__, line)(info->ulEncodedAssemblyIdentityLength != 0,
"info->ulEncodedAssemblyIdentityLength == 0\n");
}
ok_(__FILE__, line)(info->ulManifestPathType == ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE,
- "info->ulManifestPathType = %x\n", info->ulManifestPathType);
+ "info->ulManifestPathType = %lx\n", info->ulManifestPathType);
if(exinfo->manifest_path) {
len = lstrlenW(exinfo->manifest_path)*sizeof(WCHAR);
- ok_(__FILE__, line)(info->ulManifestPathLength == len, "info->ulManifestPathLength = %u, expected %u\n",
+ ok_(__FILE__, line)(info->ulManifestPathLength == len, "info->ulManifestPathLength = %lu, expected %lu\n",
info->ulManifestPathLength, len);
} else {
ok_(__FILE__, line)(info->ulManifestPathLength != 0, "info->ulManifestPathLength == 0\n");
}
ok_(__FILE__, line)(info->ulPolicyPathType == ACTIVATION_CONTEXT_PATH_TYPE_NONE,
- "info->ulPolicyPathType = %x\n", info->ulPolicyPathType);
+ "info->ulPolicyPathType = %lx\n", info->ulPolicyPathType);
ok_(__FILE__, line)(info->ulPolicyPathLength == 0,
- "info->ulPolicyPathLength = %u, expected 0\n", info->ulPolicyPathLength);
- ok_(__FILE__, line)(info->ulMetadataSatelliteRosterIndex == 0, "info->ulMetadataSatelliteRosterIndex = %x\n",
+ "info->ulPolicyPathLength = %lu, expected 0\n", info->ulPolicyPathLength);
+ ok_(__FILE__, line)(info->ulMetadataSatelliteRosterIndex == 0, "info->ulMetadataSatelliteRosterIndex = %lx\n",
info->ulMetadataSatelliteRosterIndex);
- ok_(__FILE__, line)(info->ulManifestVersionMajor == 1,"info->ulManifestVersionMajor = %x\n",
+ ok_(__FILE__, line)(info->ulManifestVersionMajor == 1,"info->ulManifestVersionMajor = %lx\n",
info->ulManifestVersionMajor);
- ok_(__FILE__, line)(info->ulManifestVersionMinor == 0, "info->ulManifestVersionMinor = %x\n",
+ ok_(__FILE__, line)(info->ulManifestVersionMinor == 0, "info->ulManifestVersionMinor = %lx\n",
info->ulManifestVersionMinor);
- ok_(__FILE__, line)(info->ulPolicyVersionMajor == 0, "info->ulPolicyVersionMajor = %x\n",
+ ok_(__FILE__, line)(info->ulPolicyVersionMajor == 0, "info->ulPolicyVersionMajor = %lx\n",
info->ulPolicyVersionMajor);
- ok_(__FILE__, line)(info->ulPolicyVersionMinor == 0, "info->ulPolicyVersionMinor = %x\n",
+ ok_(__FILE__, line)(info->ulPolicyVersionMinor == 0, "info->ulPolicyVersionMinor = %lx\n",
info->ulPolicyVersionMinor);
if(exinfo->has_assembly_dir)
ok_(__FILE__, line)(info->ulAssemblyDirectoryNameLength != 0,
@@ -899,8 +900,8 @@ static void test_file_info(HANDLE handle, ULONG assid, ULONG fileid, LPCWSTR fil
b = QueryActCtxW(0, handle, &index, FileInformationInAssemblyOfAssemblyInActivationContext, &info_tmp,
sizeof(info_tmp), &size);
ok_(__FILE__, line)(!b, "QueryActCtx succeeded\n");
- ok_(__FILE__, line)(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetLastError() = %u\n", GetLastError());
- ok_(__FILE__, line)(size == exsize, "size=%lu, expected %lu\n", size, exsize);
+ ok_(__FILE__, line)(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetLastError() = %lu\n", GetLastError());
+ ok_(__FILE__, line)(size == exsize, "size=%Iu, expected %Iu\n", size, exsize);
if(size == 0xdeadbeef)
{
@@ -912,14 +913,14 @@ static void test_file_info(HANDLE handle, ULONG assid, ULONG fileid, LPCWSTR fil
memset(info, 0xfe, size);
b = QueryActCtxW(0, handle, &index, FileInformationInAssemblyOfAssemblyInActivationContext, info, size, &size);
- ok_(__FILE__, line)(b, "QueryActCtx failed: %u\n", GetLastError());
- ok_(__FILE__, line)(!size, "size=%lu, expected 0\n", size);
+ ok_(__FILE__, line)(b, "QueryActCtx failed: %lu\n", GetLastError());
+ ok_(__FILE__, line)(!size, "size=%Iu, expected 0\n", size);
- ok_(__FILE__, line)(info->ulFlags == 2, "info->ulFlags=%x, expected 2\n", info->ulFlags);
+ ok_(__FILE__, line)(info->ulFlags == 2, "info->ulFlags=%lx, expected 2\n", info->ulFlags);
ok_(__FILE__, line)(info->ulFilenameLength == lstrlenW(filename)*sizeof(WCHAR),
- "info->ulFilenameLength=%u, expected %u*sizeof(WCHAR)\n",
+ "info->ulFilenameLength=%lu, expected %u*sizeof(WCHAR)\n",
info->ulFilenameLength, lstrlenW(filename));
- ok_(__FILE__, line)(info->ulPathLength == 0, "info->ulPathLength=%u\n", info->ulPathLength);
+ ok_(__FILE__, line)(info->ulPathLength == 0, "info->ulPathLength=%lu\n", info->ulPathLength);
ok_(__FILE__, line)(info->lpFileName != NULL, "info->lpFileName == NULL\n");
if(info->lpFileName)
ok_(__FILE__, line)(!lstrcmpiW(info->lpFileName, filename), "unexpected info->lpFileName\n");
@@ -967,14 +968,14 @@ static void test_runlevel_info(HANDLE handle, const runlevel_info_t *exinfo, int
return;
}
- ok_(__FILE__, line)(b, "QueryActCtx failed: %u\n", GetLastError());
- ok_(__FILE__, line)(retsize == size, "size=%ld, expected %ld\n", retsize, size);
+ ok_(__FILE__, line)(b, "QueryActCtx failed: %lu\n", GetLastError());
+ ok_(__FILE__, line)(retsize == size, "size=%Id, expected %Id\n", retsize, size);
- ok_(__FILE__, line)(runlevel_info.ulFlags == 0, "runlevel_info.ulFlags=%x\n", runlevel_info.ulFlags);
+ ok_(__FILE__, line)(runlevel_info.ulFlags == 0, "runlevel_info.ulFlags=%lx\n", runlevel_info.ulFlags);
ok_(__FILE__, line)(runlevel_info.RunLevel == exinfo->run_level,
"runlevel_info.RunLevel=%u, expected %u\n", runlevel_info.RunLevel, exinfo->run_level);
ok_(__FILE__, line)(runlevel_info.UiAccess == exinfo->ui_access,
- "runlevel_info.UiAccess=%u, expected %u\n", runlevel_info.UiAccess, exinfo->ui_access);
+ "runlevel_info.UiAccess=%lu, expected %lu\n", runlevel_info.UiAccess, exinfo->ui_access);
}
static HANDLE test_create(const char *file)
@@ -992,8 +993,8 @@ static HANDLE test_create(const char *file)
/* to be tested outside of this helper, including last error */
if (handle == INVALID_HANDLE_VALUE) return handle;
- ok(actctx.cbSize == sizeof(actctx), "actctx.cbSize=%d\n", actctx.cbSize);
- ok(actctx.dwFlags == 0, "actctx.dwFlags=%d\n", actctx.dwFlags);
+ ok(actctx.cbSize == sizeof(actctx), "actctx.cbSize=%ld\n", actctx.cbSize);
+ ok(actctx.dwFlags == 0, "actctx.dwFlags=%ld\n", actctx.dwFlags);
ok(actctx.lpSource == path, "actctx.lpSource=%p\n", actctx.lpSource);
ok(actctx.wProcessorArchitecture == 0,
"actctx.wProcessorArchitecture=%d\n", actctx.wProcessorArchitecture);
@@ -1030,7 +1031,7 @@ static void test_create_and_fail(const char *manifest, const char *depmanifest,
ok(handle == INVALID_HANDLE_VALUE, "Unexpected context handle %p.\n", handle);
if (handle == INVALID_HANDLE_VALUE)
- ok(GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX, "Unexpected error %d.\n", GetLastError());
+ ok(GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX, "Unexpected error %ld.\n", GetLastError());
}
if (handle != INVALID_HANDLE_VALUE) ReleaseActCtx( handle );
DeleteFileA("bad.manifest");
@@ -1051,7 +1052,7 @@ static void test_create_wide_and_fail(const char *manifest, BOOL fBOM)
create_wide_manifest("bad.manifest", manifest, fBOM, FALSE);
handle = CreateActCtxW(&actctx);
ok(handle == INVALID_HANDLE_VALUE, "handle != INVALID_HANDLE_VALUE\n");
- ok(GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX, "GetLastError == %u\n", GetLastError());
+ ok(GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX, "GetLastError == %lu\n", GetLastError());
if (handle != INVALID_HANDLE_VALUE) ReleaseActCtx( handle );
DeleteFileA("bad.manifest");
@@ -1070,7 +1071,7 @@ static void test_create_fail(void)
handle = CreateActCtxW(&actctx);
ok(handle == INVALID_HANDLE_VALUE, "handle != INVALID_HANDLE_VALUE\n");
- ok(GetLastError() == ERROR_FILE_NOT_FOUND, "GetLastError == %u\n", GetLastError());
+ ok(GetLastError() == ERROR_FILE_NOT_FOUND, "GetLastError == %lu\n", GetLastError());
trace("wrong_manifest1\n");
test_create_and_fail(wrong_manifest1, NULL, 0, FALSE);
@@ -1203,34 +1204,34 @@ static void test_find_dll_redirection(HANDLE handle, LPCWSTR libname, ULONG exid
data.cbSize = sizeof(data);
ret = FindActCtxSectionStringW(0, NULL, ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, libname, &data);
- ok_(__FILE__, line)(ret, "FindActCtxSectionStringW failed: %u\n", GetLastError());
+ ok_(__FILE__, line)(ret, "FindActCtxSectionStringW failed: %lu\n", GetLastError());
if (!ret) return;
- ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%u\n", data.cbSize);
- ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%u\n", data.ulDataFormatVersion);
+ ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%lu\n", data.cbSize);
+ ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%lu\n", data.ulDataFormatVersion);
ok_(__FILE__, line)(data.lpData != NULL, "data.lpData == NULL\n");
- ok_(__FILE__, line)(data.ulLength == offsetof( struct dllredirect_data, paths[0]), "data.ulLength=%u\n", data.ulLength);
+ ok_(__FILE__, line)(data.ulLength == offsetof( struct dllredirect_data, paths[0]), "data.ulLength=%lu\n", data.ulLength);
if (data.lpData)
{
struct dllredirect_data *dlldata = (struct dllredirect_data*)data.lpData;
ok_(__FILE__, line)(dlldata->size == offsetof( struct dllredirect_data, paths[dlldata->paths_count]),
- "got wrong size %d\n", dlldata->size);
+ "got wrong size %ld\n", dlldata->size);
ok_(__FILE__, line)(dlldata->flags == DLL_REDIRECT_PATH_OMITS_ASSEMBLY_ROOT,
- "got wrong flags value %x\n", dlldata->flags);
- ok_(__FILE__, line)(dlldata->total_len == 0, "got wrong total len value %d\n", dlldata->total_len);
- ok_(__FILE__, line)(dlldata->paths_count == 0, "got wrong paths count value %d\n", dlldata->paths_count);
- ok_(__FILE__, line)(dlldata->paths_offset == 0, "got wrong paths offset value %d\n", dlldata->paths_offset);
+ "got wrong flags value %lx\n", dlldata->flags);
+ ok_(__FILE__, line)(dlldata->total_len == 0, "got wrong total len value %ld\n", dlldata->total_len);
+ ok_(__FILE__, line)(dlldata->paths_count == 0, "got wrong paths count value %ld\n", dlldata->paths_count);
+ ok_(__FILE__, line)(dlldata->paths_offset == 0, "got wrong paths offset value %ld\n", dlldata->paths_offset);
}
ok_(__FILE__, line)(data.lpSectionGlobalData == NULL, "data.lpSectionGlobalData != NULL\n");
- ok_(__FILE__, line)(data.ulSectionGlobalDataLength == 0, "data.ulSectionGlobalDataLength=%u\n",
+ ok_(__FILE__, line)(data.ulSectionGlobalDataLength == 0, "data.ulSectionGlobalDataLength=%lu\n",
data.ulSectionGlobalDataLength);
ok_(__FILE__, line)(data.lpSectionBase != NULL, "data.lpSectionBase == NULL\n");
- ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%u\n",
+ ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%lu\n",
data.ulSectionTotalLength);
ok_(__FILE__, line)(data.hActCtx == NULL, "data.hActCtx=%p\n", data.hActCtx);
- ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%u, expected %u\n",
+ ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%lu, expected %lu\n",
data.ulAssemblyRosterIndex, exid);
memset(&data, 0xfe, sizeof(data));
@@ -1238,21 +1239,21 @@ static void test_find_dll_redirection(HANDLE handle, LPCWSTR libname, ULONG exid
ret = FindActCtxSectionStringW(FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX, NULL,
ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, libname, &data);
- ok_(__FILE__, line)(ret, "FindActCtxSectionStringW failed: %u\n", GetLastError());
+ ok_(__FILE__, line)(ret, "FindActCtxSectionStringW failed: %lu\n", GetLastError());
if (!ret) return;
- ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%u\n", data.cbSize);
- ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%u\n", data.ulDataFormatVersion);
+ ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%lu\n", data.cbSize);
+ ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%lu\n", data.ulDataFormatVersion);
ok_(__FILE__, line)(data.lpData != NULL, "data.lpData == NULL\n");
- ok_(__FILE__, line)(data.ulLength == 20, "data.ulLength=%u\n", data.ulLength);
+ ok_(__FILE__, line)(data.ulLength == 20, "data.ulLength=%lu\n", data.ulLength);
ok_(__FILE__, line)(data.lpSectionGlobalData == NULL, "data.lpSectionGlobalData != NULL\n");
- ok_(__FILE__, line)(data.ulSectionGlobalDataLength == 0, "data.ulSectionGlobalDataLength=%u\n",
+ ok_(__FILE__, line)(data.ulSectionGlobalDataLength == 0, "data.ulSectionGlobalDataLength=%lu\n",
data.ulSectionGlobalDataLength);
ok_(__FILE__, line)(data.lpSectionBase != NULL, "data.lpSectionBase == NULL\n");
- ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%u\n",
+ ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%lu\n",
data.ulSectionTotalLength);
ok_(__FILE__, line)(data.hActCtx == handle, "data.hActCtx=%p\n", data.hActCtx);
- ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%u, expected %u\n",
+ ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%lu, expected %lu\n",
data.ulAssemblyRosterIndex, exid);
ReleaseActCtx(handle);
@@ -1269,19 +1270,19 @@ static void test_find_window_class(HANDLE handle, LPCWSTR clsname, ULONG exid, i
data.cbSize = sizeof(data);
ret = FindActCtxSectionStringW(0, NULL, ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, clsname, &data);
- ok_(__FILE__, line)(ret, "FindActCtxSectionStringW failed: %u, class %s\n", GetLastError(),
+ ok_(__FILE__, line)(ret, "FindActCtxSectionStringW failed: %lu, class %s\n", GetLastError(),
wine_dbgstr_w(clsname));
if (!ret) return;
header = (struct strsection_header*)data.lpSectionBase;
wnddata = (struct wndclass_redirect_data*)data.lpData;
- ok_(__FILE__, line)(header->magic == 0x64487353, "got wrong magic 0x%08x\n", header->magic);
- ok_(__FILE__, line)(header->count > 0, "got count %d\n", header->count);
- ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%u\n", data.cbSize);
- ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%u\n", data.ulDataFormatVersion);
+ ok_(__FILE__, line)(header->magic == 0x64487353, "got wrong magic 0x%08lx\n", header->magic);
+ ok_(__FILE__, line)(header->count > 0, "got count %ld\n", header->count);
+ ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%lu\n", data.cbSize);
+ ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%lu\n", data.ulDataFormatVersion);
ok_(__FILE__, line)(data.lpData != NULL, "data.lpData == NULL\n");
- ok_(__FILE__, line)(wnddata->size == sizeof(*wnddata), "got %d for header size\n", wnddata->size);
+ ok_(__FILE__, line)(wnddata->size == sizeof(*wnddata), "got %ld for header size\n", wnddata->size);
if (data.lpData && wnddata->size == sizeof(*wnddata))
{
static const WCHAR verW[] = {'6','.','5','.','4','.','3','!',0};
@@ -1289,10 +1290,10 @@ static void test_find_window_class(HANDLE handle, LPCWSTR clsname, ULONG exid, i
WCHAR *ptr;
ULONG len;
- ok_(__FILE__, line)(wnddata->res == 0, "got reserved as %d\n", wnddata->res);
+ ok_(__FILE__, line)(wnddata->res == 0, "got reserved as %ld\n", wnddata->res);
/* redirect class name (versioned or not) is stored just after header data */
- ok_(__FILE__, line)(wnddata->name_offset == wnddata->size, "got name offset as %d\n", wnddata->name_offset);
- ok_(__FILE__, line)(wnddata->module_len > 0, "got module name length as %d\n", wnddata->module_len);
+ ok_(__FILE__, line)(wnddata->name_offset == wnddata->size, "got name offset as %ld\n", wnddata->name_offset);
+ ok_(__FILE__, line)(wnddata->module_len > 0, "got module name length as %ld\n", wnddata->module_len);
/* expected versioned name */
lstrcpyW(buff, verW);
@@ -1300,11 +1301,11 @@ static void test_find_window_class(HANDLE handle, LPCWSTR clsname, ULONG exid, i
ptr = (WCHAR*)((BYTE*)wnddata + wnddata->name_offset);
ok_(__FILE__, line)(!lstrcmpW(ptr, buff), "got wrong class name %s, expected %s\n", wine_dbgstr_w(ptr), wine_dbgstr_w(buff));
ok_(__FILE__, line)(lstrlenW(ptr)*sizeof(WCHAR) == wnddata->name_len,
- "got wrong class name length %d, expected %d\n", wnddata->name_len, lstrlenW(ptr));
+ "got wrong class name length %ld, expected %d\n", wnddata->name_len, lstrlenW(ptr));
/* data length is simply header length + string data length including nulls */
len = wnddata->size + wnddata->name_len + wnddata->module_len + 2*sizeof(WCHAR);
- ok_(__FILE__, line)(data.ulLength == len, "got wrong data length %d, expected %d\n", data.ulLength, len);
+ ok_(__FILE__, line)(data.ulLength == len, "got wrong data length %ld, expected %ld\n", data.ulLength, len);
if (data.ulSectionTotalLength > wnddata->module_offset)
{
@@ -1318,13 +1319,13 @@ static void test_find_window_class(HANDLE handle, LPCWSTR clsname, ULONG exid, i
}
ok_(__FILE__, line)(data.lpSectionGlobalData == NULL, "data.lpSectionGlobalData != NULL\n");
- ok_(__FILE__, line)(data.ulSectionGlobalDataLength == 0, "data.ulSectionGlobalDataLength=%u\n",
+ ok_(__FILE__, line)(data.ulSectionGlobalDataLength == 0, "data.ulSectionGlobalDataLength=%lu\n",
data.ulSectionGlobalDataLength);
ok_(__FILE__, line)(data.lpSectionBase != NULL, "data.lpSectionBase == NULL\n");
- ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%u\n",
+ ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%lu\n",
data.ulSectionTotalLength);
ok_(__FILE__, line)(data.hActCtx == NULL, "data.hActCtx=%p\n", data.hActCtx);
- ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%u, expected %u\n",
+ ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%lu, expected %lu\n",
data.ulAssemblyRosterIndex, exid);
memset(&data, 0xfe, sizeof(data));
@@ -1332,21 +1333,21 @@ static void test_find_window_class(HANDLE handle, LPCWSTR clsname, ULONG exid, i
ret = FindActCtxSectionStringW(FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX, NULL,
ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, clsname, &data);
- ok_(__FILE__, line)(ret, "FindActCtxSectionStringW failed: %u, class %s\n", GetLastError(),
+ ok_(__FILE__, line)(ret, "FindActCtxSectionStringW failed: %lu, class %s\n", GetLastError(),
wine_dbgstr_w(clsname));
if (!ret) return;
- ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%u\n", data.cbSize);
- ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%u\n", data.ulDataFormatVersion);
+ ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%lu\n", data.cbSize);
+ ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%lu\n", data.ulDataFormatVersion);
ok_(__FILE__, line)(data.lpData != NULL, "data.lpData == NULL\n");
- ok_(__FILE__, line)(data.ulLength > 0, "data.ulLength=%u\n", data.ulLength);
+ ok_(__FILE__, line)(data.ulLength > 0, "data.ulLength=%lu\n", data.ulLength);
ok_(__FILE__, line)(data.lpSectionGlobalData == NULL, "data.lpSectionGlobalData != NULL\n");
- ok_(__FILE__, line)(data.ulSectionGlobalDataLength == 0, "data.ulSectionGlobalDataLength=%u\n",
+ ok_(__FILE__, line)(data.ulSectionGlobalDataLength == 0, "data.ulSectionGlobalDataLength=%lu\n",
data.ulSectionGlobalDataLength);
ok_(__FILE__, line)(data.lpSectionBase != NULL, "data.lpSectionBase == NULL\n");
- ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%u\n", data.ulSectionTotalLength);
+ ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%lu\n", data.ulSectionTotalLength);
ok_(__FILE__, line)(data.hActCtx == handle, "data.hActCtx=%p\n", data.hActCtx);
- ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%u, expected %u\n",
+ ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%lu, expected %lu\n",
data.ulAssemblyRosterIndex, exid);
ReleaseActCtx(handle);
@@ -1359,29 +1360,29 @@ static void test_find_string_fail(void)
ret = FindActCtxSectionStringW(0, NULL, 100, testlib_dll, &data);
ok(!ret, "FindActCtxSectionStringW succeeded\n");
- ok(GetLastError() == ERROR_SXS_SECTION_NOT_FOUND, "GetLastError()=%u\n", GetLastError());
+ ok(GetLastError() == ERROR_SXS_SECTION_NOT_FOUND, "GetLastError()=%lu\n", GetLastError());
ret = FindActCtxSectionStringW(0, NULL, ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, testlib2_dll, &data);
ok(!ret, "FindActCtxSectionStringW succeeded\n");
- ok(GetLastError() == ERROR_SXS_KEY_NOT_FOUND, "GetLastError()=%u\n", GetLastError());
+ ok(GetLastError() == ERROR_SXS_KEY_NOT_FOUND, "GetLastError()=%lu\n", GetLastError());
ret = FindActCtxSectionStringW(0, NULL, ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, testlib_dll, NULL);
ok(!ret, "FindActCtxSectionStringW succeeded\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError()=%u\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError()=%lu\n", GetLastError());
ret = FindActCtxSectionStringW(0, NULL, ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, NULL, &data);
ok(!ret, "FindActCtxSectionStringW succeeded\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError()=%u\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError()=%lu\n", GetLastError());
data.cbSize = 0;
ret = FindActCtxSectionStringW(0, NULL, ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, testlib_dll, &data);
ok(!ret, "FindActCtxSectionStringW succeeded\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError()=%u\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError()=%lu\n", GetLastError());
data.cbSize = 35;
ret = FindActCtxSectionStringW(0, NULL, ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, testlib_dll, &data);
ok(!ret, "FindActCtxSectionStringW succeeded\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError()=%u\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError()=%lu\n", GetLastError());
}
@@ -1396,7 +1397,7 @@ static void test_basic_info(HANDLE handle, int line)
ok_(__FILE__, line) (b,"ActivationContextBasicInformation failed\n");
ok_(__FILE__, line) (size == sizeof(ACTIVATION_CONTEXT_BASIC_INFORMATION),"size mismatch\n");
- ok_(__FILE__, line) (basic.dwFlags == 0, "unexpected flags %x\n",basic.dwFlags);
+ ok_(__FILE__, line) (basic.dwFlags == 0, "unexpected flags %lx\n",basic.dwFlags);
ok_(__FILE__, line) (basic.hActCtx == handle, "unexpected handle\n");
b = QueryActCtxW(QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX | QUERY_ACTCTX_FLAG_NO_ADDREF, handle, NULL,
@@ -1407,14 +1408,14 @@ static void test_basic_info(HANDLE handle, int line)
ok_(__FILE__, line) (!b,"ActivationContextBasicInformation succeeded\n");
ok_(__FILE__, line) (size == 0,"size mismatch\n");
ok_(__FILE__, line) (GetLastError() == ERROR_INVALID_PARAMETER, "Wrong last error\n");
- ok_(__FILE__, line) (basic.dwFlags == 0, "unexpected flags %x\n",basic.dwFlags);
+ ok_(__FILE__, line) (basic.dwFlags == 0, "unexpected flags %lx\n",basic.dwFlags);
ok_(__FILE__, line) (basic.hActCtx == handle, "unexpected handle\n");
}
else
{
ok_(__FILE__, line) (b,"ActivationContextBasicInformation failed\n");
ok_(__FILE__, line) (size == sizeof(ACTIVATION_CONTEXT_BASIC_INFORMATION),"size mismatch\n");
- ok_(__FILE__, line) (basic.dwFlags == 0, "unexpected flags %x\n",basic.dwFlags);
+ ok_(__FILE__, line) (basic.dwFlags == 0, "unexpected flags %lx\n",basic.dwFlags);
ok_(__FILE__, line) (basic.hActCtx == handle, "unexpected handle\n");
}
}
@@ -1484,66 +1485,66 @@ static void test_find_com_redirection(HANDLE handle, const GUID *clsid, const GU
skip("failed for guid %s\n", wine_dbgstr_guid(clsid));
return;
}
- ok_(__FILE__, line)(ret, "FindActCtxSectionGuid failed: %u\n", GetLastError());
+ ok_(__FILE__, line)(ret, "FindActCtxSectionGuid failed: %lu\n", GetLastError());
comclass = (struct comclassredirect_data*)data.lpData;
- ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%u\n", data.cbSize);
- ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%u\n", data.ulDataFormatVersion);
+ ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%lu\n", data.cbSize);
+ ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%lu\n", data.ulDataFormatVersion);
ok_(__FILE__, line)(data.lpData != NULL, "data.lpData == NULL\n");
- ok_(__FILE__, line)(comclass->size == sizeof(*comclass), "got %d for header size\n", comclass->size);
+ ok_(__FILE__, line)(comclass->size == sizeof(*comclass), "got %ld for header size\n", comclass->size);
if (data.lpData && comclass->size == sizeof(*comclass))
{
ULONG len, miscmask;
WCHAR *ptr;
- ok_(__FILE__, line)(comclass->model == ThreadingModel_Neutral, "got model %d\n", comclass->model);
+ ok_(__FILE__, line)(comclass->model == ThreadingModel_Neutral, "got model %ld\n", comclass->model);
ok_(__FILE__, line)(IsEqualGUID(&comclass->clsid, clsid), "got wrong clsid %s\n", wine_dbgstr_guid(&comclass->clsid));
ok_(__FILE__, line)(IsEqualGUID(&comclass->clsid2, clsid), "got wrong clsid2 %s\n", wine_dbgstr_guid(&comclass->clsid2));
if (tlid)
ok_(__FILE__, line)(IsEqualGUID(&comclass->tlid, tlid), "got wrong tlid %s\n", wine_dbgstr_guid(&comclass->tlid));
- ok_(__FILE__, line)(comclass->name_len > 0, "got modulename len %d\n", comclass->name_len);
+ ok_(__FILE__, line)(comclass->name_len > 0, "got modulename len %ld\n", comclass->name_len);
if (progid)
{
len = comclass->size + comclass->clrdata_len;
- ok_(__FILE__, line)(comclass->progid_offset == len, "got progid offset %d, expected %d\n", comclass->progid_offset, len);
+ ok_(__FILE__, line)(comclass->progid_offset == len, "got progid offset %ld, expected %ld\n", comclass->progid_offset, len);
}
else
- ok_(__FILE__, line)(comclass->progid_offset == 0, "got progid offset %d, expected 0\n", comclass->progid_offset);
+ ok_(__FILE__, line)(comclass->progid_offset == 0, "got progid offset %ld, expected 0\n", comclass->progid_offset);
if (comclass->progid_offset)
{
ptr = (WCHAR*)((BYTE*)comclass + comclass->progid_offset);
ok_(__FILE__, line)(!lstrcmpW(ptr, progid), "got wrong progid %s, expected %s\n", wine_dbgstr_w(ptr), wine_dbgstr_w(progid));
ok_(__FILE__, line)(lstrlenW(progid)*sizeof(WCHAR) == comclass->progid_len,
- "got progid name length %d\n", comclass->progid_len);
+ "got progid name length %ld\n", comclass->progid_len);
}
/* data length is simply header length + string data length including nulls */
len = comclass->size + comclass->clrdata_len;
if (comclass->progid_len) len += comclass->progid_len + sizeof(WCHAR);
- ok_(__FILE__, line)(data.ulLength == len, "got wrong data length %d, expected %d\n", data.ulLength, len);
+ ok_(__FILE__, line)(data.ulLength == len, "got wrong data length %ld, expected %ld\n", data.ulLength, len);
/* keyed data structure doesn't include module name, it's available from section data */
- ok_(__FILE__, line)(data.ulSectionTotalLength > comclass->name_offset, "got wrong offset %d\n", comclass->name_offset);
+ ok_(__FILE__, line)(data.ulSectionTotalLength > comclass->name_offset, "got wrong offset %ld\n", comclass->name_offset);
/* check misc fields are set */
miscmask = (comclass->flags >> 8) & 0xff;
if (miscmask)
{
if (miscmask & MiscStatus)
- ok_(__FILE__, line)(comclass->miscstatus != 0, "got miscstatus 0x%08x\n", comclass->miscstatus);
+ ok_(__FILE__, line)(comclass->miscstatus != 0, "got miscstatus 0x%08lx\n", comclass->miscstatus);
if (miscmask & MiscStatusIcon)
- ok_(__FILE__, line)(comclass->miscstatusicon != 0, "got miscstatusicon 0x%08x\n", comclass->miscstatusicon);
+ ok_(__FILE__, line)(comclass->miscstatusicon != 0, "got miscstatusicon 0x%08lx\n", comclass->miscstatusicon);
if (miscmask & MiscStatusContent)
- ok_(__FILE__, line)(comclass->miscstatuscontent != 0, "got miscstatuscontent 0x%08x\n", comclass->miscstatuscontent);
+ ok_(__FILE__, line)(comclass->miscstatuscontent != 0, "got miscstatuscontent 0x%08lx\n", comclass->miscstatuscontent);
if (miscmask & MiscStatusThumbnail)
- ok_(__FILE__, line)(comclass->miscstatusthumbnail != 0, "got miscstatusthumbnail 0x%08x\n", comclass->miscstatusthumbnail);
+ ok_(__FILE__, line)(comclass->miscstatusthumbnail != 0, "got miscstatusthumbnail 0x%08lx\n", comclass->miscstatusthumbnail);
if (miscmask & MiscStatusDocPrint)
- ok_(__FILE__, line)(comclass->miscstatusdocprint != 0, "got miscstatusdocprint 0x%08x\n", comclass->miscstatusdocprint);
+ ok_(__FILE__, line)(comclass->miscstatusdocprint != 0, "got miscstatusdocprint 0x%08lx\n", comclass->miscstatusdocprint);
}
- ok_(__FILE__, line)(!(comclass->flags & 0xffff00ff), "Unexpected flags %#x.\n", comclass->flags);
+ ok_(__FILE__, line)(!(comclass->flags & 0xffff00ff), "Unexpected flags %#lx.\n", comclass->flags);
/* part used for clrClass only */
if (comclass->clrdata_len)
@@ -1554,24 +1555,24 @@ static void test_find_com_redirection(HANDLE handle, const GUID *clsid, const GU
WCHAR *ptrW;
clrclass = (struct clrclass_data*)((BYTE*)data.lpData + comclass->clrdata_offset);
- ok_(__FILE__, line)(clrclass->size == sizeof(*clrclass), "clrclass: got size %d\n", clrclass->size);
- ok_(__FILE__, line)(clrclass->res[0] == 0, "clrclass: got res[0]=0x%08x\n", clrclass->res[0]);
- ok_(__FILE__, line)(clrclass->res[1] == 2, "clrclass: got res[1]=0x%08x\n", clrclass->res[1]);
- ok_(__FILE__, line)(clrclass->module_len == lstrlenW(mscoreeW)*sizeof(WCHAR), "clrclass: got module len %d\n", clrclass->module_len);
- ok_(__FILE__, line)(clrclass->module_offset > 0, "clrclass: got module offset %d\n", clrclass->module_offset);
+ ok_(__FILE__, line)(clrclass->size == sizeof(*clrclass), "clrclass: got size %ld\n", clrclass->size);
+ ok_(__FILE__, line)(clrclass->res[0] == 0, "clrclass: got res[0]=0x%08lx\n", clrclass->res[0]);
+ ok_(__FILE__, line)(clrclass->res[1] == 2, "clrclass: got res[1]=0x%08lx\n", clrclass->res[1]);
+ ok_(__FILE__, line)(clrclass->module_len == lstrlenW(mscoreeW)*sizeof(WCHAR), "clrclass: got module len %ld\n", clrclass->module_len);
+ ok_(__FILE__, line)(clrclass->module_offset > 0, "clrclass: got module offset %ld\n", clrclass->module_offset);
- ok_(__FILE__, line)(clrclass->name_len > 0, "clrclass: got name len %d\n", clrclass->name_len);
- ok_(__FILE__, line)(clrclass->name_offset == clrclass->size, "clrclass: got name offset %d\n", clrclass->name_offset);
- ok_(__FILE__, line)(clrclass->version_len > 0, "clrclass: got version len %d\n", clrclass->version_len);
- ok_(__FILE__, line)(clrclass->version_offset > 0, "clrclass: got version offset %d\n", clrclass->version_offset);
+ ok_(__FILE__, line)(clrclass->name_len > 0, "clrclass: got name len %ld\n", clrclass->name_len);
+ ok_(__FILE__, line)(clrclass->name_offset == clrclass->size, "clrclass: got name offset %ld\n", clrclass->name_offset);
+ ok_(__FILE__, line)(clrclass->version_len > 0, "clrclass: got version len %ld\n", clrclass->version_len);
+ ok_(__FILE__, line)(clrclass->version_offset > 0, "clrclass: got version offset %ld\n", clrclass->version_offset);
- ok_(__FILE__, line)(clrclass->res2[0] == 0, "clrclass: got res2[0]=0x%08x\n", clrclass->res2[0]);
- ok_(__FILE__, line)(clrclass->res2[1] == 0, "clrclass: got res2[1]=0x%08x\n", clrclass->res2[1]);
+ ok_(__FILE__, line)(clrclass->res2[0] == 0, "clrclass: got res2[0]=0x%08lx\n", clrclass->res2[0]);
+ ok_(__FILE__, line)(clrclass->res2[1] == 0, "clrclass: got res2[1]=0x%08lx\n", clrclass->res2[1]);
/* clrClass uses mscoree.dll as module name, but in two variants - comclass data points to module name
in lower case, clsclass subsection - in upper case */
- ok_(__FILE__, line)(comclass->name_len == lstrlenW(mscoree2W)*sizeof(WCHAR), "clrclass: got com name len %d\n", comclass->name_len);
- ok_(__FILE__, line)(comclass->name_offset > 0, "clrclass: got name offset %d\n", clrclass->name_offset);
+ ok_(__FILE__, line)(comclass->name_len == lstrlenW(mscoree2W)*sizeof(WCHAR), "clrclass: got com name len %ld\n", comclass->name_len);
+ ok_(__FILE__, line)(comclass->name_offset > 0, "clrclass: got name offset %ld\n", clrclass->name_offset);
ptrW = (WCHAR*)((BYTE*)data.lpSectionBase + comclass->name_offset);
ok_(__FILE__, line)(!lstrcmpW(ptrW, mscoreeW), "clrclass: module name %s\n", wine_dbgstr_w(ptrW));
@@ -1583,23 +1584,23 @@ static void test_find_com_redirection(HANDLE handle, const GUID *clsid, const GU
header = (struct guidsection_header*)data.lpSectionBase;
ok_(__FILE__, line)(data.lpSectionGlobalData == ((BYTE*)header + header->names_offset), "data.lpSectionGlobalData == NULL\n");
- ok_(__FILE__, line)(data.ulSectionGlobalDataLength == header->names_len, "data.ulSectionGlobalDataLength=%u\n",
+ ok_(__FILE__, line)(data.ulSectionGlobalDataLength == header->names_len, "data.ulSectionGlobalDataLength=%lu\n",
data.ulSectionGlobalDataLength);
ok_(__FILE__, line)(data.lpSectionBase != NULL, "data.lpSectionBase == NULL\n");
- ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%u\n",
+ ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%lu\n",
data.ulSectionTotalLength);
ok_(__FILE__, line)(data.hActCtx == NULL, "data.hActCtx=%p\n", data.hActCtx);
- ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%u, expected %u\n",
+ ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%lu, expected %lu\n",
data.ulAssemblyRosterIndex, exid);
/* generated guid for this class works as key guid in search */
memset(&data2, 0xfe, sizeof(data2));
data2.cbSize = sizeof(data2);
ret = FindActCtxSectionGuid(0, NULL, ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION, &comclass->alias, &data2);
- ok_(__FILE__, line)(ret, "FindActCtxSectionGuid failed: %u\n", GetLastError());
+ ok_(__FILE__, line)(ret, "FindActCtxSectionGuid failed: %lu\n", GetLastError());
comclass2 = (struct comclassredirect_data*)data2.lpData;
- ok_(__FILE__, line)(comclass->size == comclass2->size, "got wrong data length %d, expected %d\n", comclass2->size, comclass->size);
+ ok_(__FILE__, line)(comclass->size == comclass2->size, "got wrong data length %ld, expected %ld\n", comclass2->size, comclass->size);
ok_(__FILE__, line)(!memcmp(comclass, comclass2, comclass->size), "got wrong data\n");
}
@@ -1632,14 +1633,14 @@ static void test_find_ifaceps_redirection(HANDLE handle, const GUID *iid, const
data.cbSize = sizeof(data);
ret = FindActCtxSectionGuid(0, NULL, ACTIVATION_CONTEXT_SECTION_COM_INTERFACE_REDIRECTION, iid, &data);
- ok_(__FILE__, line)(ret, "FindActCtxSectionGuid failed: %u\n", GetLastError());
+ ok_(__FILE__, line)(ret, "FindActCtxSectionGuid failed: %lu\n", GetLastError());
ifaceps = (struct ifacepsredirect_data*)data.lpData;
- ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%u\n", data.cbSize);
- ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%u\n", data.ulDataFormatVersion);
+ ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%lu\n", data.cbSize);
+ ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%lu\n", data.ulDataFormatVersion);
ok_(__FILE__, line)(data.lpData != NULL, "data.lpData == NULL\n");
- ok_(__FILE__, line)(ifaceps->size == sizeof(*ifaceps), "got %d for header size\n", ifaceps->size);
+ ok_(__FILE__, line)(ifaceps->size == sizeof(*ifaceps), "got %ld for header size\n", ifaceps->size);
if (data.lpData && ifaceps->size == sizeof(*ifaceps))
{
ULONG len;
@@ -1653,29 +1654,29 @@ static void test_find_ifaceps_redirection(HANDLE handle, const GUID *iid, const
ok_(__FILE__, line)(IsEqualGUID(&ifaceps->iid, iid), "got wrong iid %s\n", wine_dbgstr_guid(&ifaceps->iid));
ok_(__FILE__, line)(IsEqualGUID(&ifaceps->tlbid, tlbid), "got wrong tlid %s\n", wine_dbgstr_guid(&ifaceps->tlbid));
- ok_(__FILE__, line)(ifaceps->name_len > 0, "got modulename len %d\n", ifaceps->name_len);
- ok_(__FILE__, line)(ifaceps->name_offset == ifaceps->size, "got progid offset %d\n", ifaceps->name_offset);
+ ok_(__FILE__, line)(ifaceps->name_len > 0, "got modulename len %ld\n", ifaceps->name_len);
+ ok_(__FILE__, line)(ifaceps->name_offset == ifaceps->size, "got progid offset %ld\n", ifaceps->name_offset);
/* data length is simply header length + string data length including nulls */
len = ifaceps->size + ifaceps->name_len + sizeof(WCHAR);
- ok_(__FILE__, line)(data.ulLength == len, "got wrong data length %d, expected %d\n", data.ulLength, len);
+ ok_(__FILE__, line)(data.ulLength == len, "got wrong data length %ld, expected %ld\n", data.ulLength, len);
/* mask purpose is to indicate if attribute was specified, for testing purposes assume that manifest
always has non-zero value for it */
if (ifaceps->mask & NumMethods)
- ok_(__FILE__, line)(ifaceps->nummethods != 0, "got nummethods %d\n", ifaceps->nummethods);
+ ok_(__FILE__, line)(ifaceps->nummethods != 0, "got nummethods %ld\n", ifaceps->nummethods);
if (ifaceps->mask & BaseIface)
ok_(__FILE__, line)(IsEqualGUID(&ifaceps->base, base), "got base %s\n", wine_dbgstr_guid(&ifaceps->base));
}
ok_(__FILE__, line)(data.lpSectionGlobalData == NULL, "data.lpSectionGlobalData != NULL\n");
- ok_(__FILE__, line)(data.ulSectionGlobalDataLength == 0, "data.ulSectionGlobalDataLength=%u\n",
+ ok_(__FILE__, line)(data.ulSectionGlobalDataLength == 0, "data.ulSectionGlobalDataLength=%lu\n",
data.ulSectionGlobalDataLength);
ok_(__FILE__, line)(data.lpSectionBase != NULL, "data.lpSectionBase == NULL\n");
- ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%u\n",
+ ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%lu\n",
data.ulSectionTotalLength);
ok_(__FILE__, line)(data.hActCtx == NULL, "data.hActCtx=%p\n", data.hActCtx);
- ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%u, expected %u\n",
+ ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%lu, expected %lu\n",
data.ulAssemblyRosterIndex, exid);
}
@@ -1706,30 +1707,30 @@ static void test_find_surrogate(HANDLE handle, const GUID *clsid, const WCHAR *n
skip("surrogate sections are not supported\n");
return;
}
- ok_(__FILE__, line)(ret, "FindActCtxSectionGuid failed: %u\n", GetLastError());
+ ok_(__FILE__, line)(ret, "FindActCtxSectionGuid failed: %lu\n", GetLastError());
surrogate = (struct clrsurrogate_data*)data.lpData;
- ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%u\n", data.cbSize);
- ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%u\n", data.ulDataFormatVersion);
+ ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%lu\n", data.cbSize);
+ ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%lu\n", data.ulDataFormatVersion);
ok_(__FILE__, line)(data.lpData != NULL, "data.lpData == NULL\n");
- ok_(__FILE__, line)(surrogate->size == sizeof(*surrogate), "got %d for header size\n", surrogate->size);
+ ok_(__FILE__, line)(surrogate->size == sizeof(*surrogate), "got %ld for header size\n", surrogate->size);
if (data.lpData && surrogate->size == sizeof(*surrogate))
{
WCHAR *ptrW;
ULONG len;
- ok_(__FILE__, line)(surrogate->res == 0, "invalid res value %d\n", surrogate->res);
+ ok_(__FILE__, line)(surrogate->res == 0, "invalid res value %ld\n", surrogate->res);
ok_(__FILE__, line)(IsEqualGUID(&surrogate->clsid, clsid), "got wrong clsid %s\n", wine_dbgstr_guid(&surrogate->clsid));
- ok_(__FILE__, line)(surrogate->version_len == lstrlenW(version)*sizeof(WCHAR), "got version len %d\n", surrogate->version_len);
- ok_(__FILE__, line)(surrogate->version_offset == surrogate->size, "got version offset %d\n", surrogate->version_offset);
+ ok_(__FILE__, line)(surrogate->version_len == lstrlenW(version)*sizeof(WCHAR), "got version len %ld\n", surrogate->version_len);
+ ok_(__FILE__, line)(surrogate->version_offset == surrogate->size, "got version offset %ld\n", surrogate->version_offset);
- ok_(__FILE__, line)(surrogate->name_len == lstrlenW(name)*sizeof(WCHAR), "got name len %d\n", surrogate->name_len);
- ok_(__FILE__, line)(surrogate->name_offset > surrogate->version_offset, "got name offset %d\n", surrogate->name_offset);
+ ok_(__FILE__, line)(surrogate->name_len == lstrlenW(name)*sizeof(WCHAR), "got name len %ld\n", surrogate->name_len);
+ ok_(__FILE__, line)(surrogate->name_offset > surrogate->version_offset, "got name offset %ld\n", surrogate->name_offset);
len = surrogate->size + surrogate->name_len + surrogate->version_len + 2*sizeof(WCHAR);
- ok_(__FILE__, line)(data.ulLength == len, "got wrong data length %d, expected %d\n", data.ulLength, len);
+ ok_(__FILE__, line)(data.ulLength == len, "got wrong data length %ld, expected %ld\n", data.ulLength, len);
ptrW = (WCHAR*)((BYTE*)surrogate + surrogate->name_offset);
ok(!lstrcmpW(ptrW, name), "got wrong name %s\n", wine_dbgstr_w(ptrW));
@@ -1739,13 +1740,13 @@ static void test_find_surrogate(HANDLE handle, const GUID *clsid, const WCHAR *n
}
ok_(__FILE__, line)(data.lpSectionGlobalData == NULL, "data.lpSectionGlobalData != NULL\n");
- ok_(__FILE__, line)(data.ulSectionGlobalDataLength == 0, "data.ulSectionGlobalDataLength=%u\n",
+ ok_(__FILE__, line)(data.ulSectionGlobalDataLength == 0, "data.ulSectionGlobalDataLength=%lu\n",
data.ulSectionGlobalDataLength);
ok_(__FILE__, line)(data.lpSectionBase != NULL, "data.lpSectionBase == NULL\n");
- ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%u\n",
+ ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%lu\n",
data.ulSectionTotalLength);
ok_(__FILE__, line)(data.hActCtx == NULL, "data.hActCtx=%p\n", data.hActCtx);
- ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%u, expected %u\n",
+ ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%lu, expected %lu\n",
data.ulAssemblyRosterIndex, exid);
}
@@ -1761,20 +1762,20 @@ static void test_find_progid_redirection(HANDLE handle, const GUID *clsid, const
data.cbSize = sizeof(data);
ret = FindActCtxSectionStringA(0, NULL, ACTIVATION_CONTEXT_SECTION_COM_PROGID_REDIRECTION, progid, &data);
- ok_(__FILE__, line)(ret, "FindActCtxSectionStringA failed: %u\n", GetLastError());
+ ok_(__FILE__, line)(ret, "FindActCtxSectionStringA failed: %lu\n", GetLastError());
progiddata = (struct progidredirect_data*)data.lpData;
- ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%u\n", data.cbSize);
- ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%u\n", data.ulDataFormatVersion);
+ ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%lu\n", data.cbSize);
+ ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%lu\n", data.ulDataFormatVersion);
ok_(__FILE__, line)(data.lpData != NULL, "data.lpData == NULL\n");
- ok_(__FILE__, line)(progiddata->size == sizeof(*progiddata), "got %d for header size\n", progiddata->size);
+ ok_(__FILE__, line)(progiddata->size == sizeof(*progiddata), "got %ld for header size\n", progiddata->size);
if (data.lpData && progiddata->size == sizeof(*progiddata))
{
GUID *guid;
- ok_(__FILE__, line)(progiddata->reserved == 0, "got reserved as %d\n", progiddata->reserved);
- ok_(__FILE__, line)(progiddata->clsid_offset > 0, "got clsid_offset as %d\n", progiddata->clsid_offset);
+ ok_(__FILE__, line)(progiddata->reserved == 0, "got reserved as %ld\n", progiddata->reserved);
+ ok_(__FILE__, line)(progiddata->clsid_offset > 0, "got clsid_offset as %ld\n", progiddata->clsid_offset);
/* progid data points to generated alias guid */
guid = (GUID*)((BYTE*)data.lpSectionBase + progiddata->clsid_offset);
@@ -1782,7 +1783,7 @@ static void test_find_progid_redirection(HANDLE handle, const GUID *clsid, const
memset(&data2, 0, sizeof(data2));
data2.cbSize = sizeof(data2);
ret = FindActCtxSectionGuid(0, NULL, ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION, guid, &data2);
- ok_(__FILE__, line)(ret, "FindActCtxSectionGuid failed: %u\n", GetLastError());
+ ok_(__FILE__, line)(ret, "FindActCtxSectionGuid failed: %lu\n", GetLastError());
comclass = (struct comclassredirect_data*)data2.lpData;
ok_(__FILE__, line)(IsEqualGUID(guid, &comclass->alias), "got wrong alias referenced from progid %s, %s\n", progid, wine_dbgstr_guid(guid));
@@ -1791,11 +1792,11 @@ static void test_find_progid_redirection(HANDLE handle, const GUID *clsid, const
header = (struct strsection_header*)data.lpSectionBase;
ok_(__FILE__, line)(data.lpSectionGlobalData == (BYTE*)header + header->global_offset, "data.lpSectionGlobalData == NULL\n");
- ok_(__FILE__, line)(data.ulSectionGlobalDataLength == header->global_len, "data.ulSectionGlobalDataLength=%u\n", data.ulSectionGlobalDataLength);
+ ok_(__FILE__, line)(data.ulSectionGlobalDataLength == header->global_len, "data.ulSectionGlobalDataLength=%lu\n", data.ulSectionGlobalDataLength);
ok_(__FILE__, line)(data.lpSectionBase != NULL, "data.lpSectionBase == NULL\n");
- ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%u\n", data.ulSectionTotalLength);
+ ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%lu\n", data.ulSectionTotalLength);
ok_(__FILE__, line)(data.hActCtx == NULL, "data.hActCtx=%p\n", data.hActCtx);
- ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%u, expected %u\n",
+ ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%lu, expected %lu\n",
data.ulAssemblyRosterIndex, exid);
}
@@ -1816,14 +1817,14 @@ static void test_wndclass_section(void)
create_manifest_file("main_wndcls.manifest", manifest_wndcls_main, -1, NULL, NULL);
handle = test_create("main_wndcls.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("testdep1.manifest");
DeleteFileA("testdep2.manifest");
DeleteFileA("main_wndcls.manifest");
ret = ActivateActCtx(handle, &cookie);
- ok(ret, "ActivateActCtx failed: %u\n", GetLastError());
+ ok(ret, "ActivateActCtx failed: %lu\n", GetLastError());
memset(&data, 0, sizeof(data));
memset(&data2, 0, sizeof(data2));
@@ -1837,12 +1838,12 @@ static void test_wndclass_section(void)
ok(ret, "got %d\n", ret);
section = (struct strsection_header*)data.lpSectionBase;
- ok(section->count == 4, "got %d\n", section->count);
- ok(section->size == sizeof(*section), "got %d\n", section->size);
+ ok(section->count == 4, "got %ld\n", section->count);
+ ok(section->size == sizeof(*section), "got %ld\n", section->size);
/* For both string same section is returned, meaning it's one wndclass section per context */
ok(data.lpSectionBase == data2.lpSectionBase, "got %p, %p\n", data.lpSectionBase, data2.lpSectionBase);
- ok(data.ulSectionTotalLength == data2.ulSectionTotalLength, "got %u, %u\n", data.ulSectionTotalLength,
+ ok(data.ulSectionTotalLength == data2.ulSectionTotalLength, "got %lu, %lu\n", data.ulSectionTotalLength,
data2.ulSectionTotalLength);
/* wndClass1 is versioned, wndClass3 is not */
@@ -1855,7 +1856,7 @@ static void test_wndclass_section(void)
ok(!lstrcmpW(ptrW, wndClass3W), "got %s\n", wine_dbgstr_w(ptrW));
ret = DeactivateActCtx(0, cookie);
- ok(ret, "DeactivateActCtx failed: %u\n", GetLastError());
+ ok(ret, "DeactivateActCtx failed: %lu\n", GetLastError());
ReleaseActCtx(handle);
}
@@ -1876,14 +1877,14 @@ static void test_dllredirect_section(void)
create_manifest_file("main_wndcls.manifest", manifest_wndcls_main, -1, NULL, NULL);
handle = test_create("main_wndcls.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("testdep1.manifest");
DeleteFileA("testdep2.manifest");
DeleteFileA("main_wndcls.manifest");
ret = ActivateActCtx(handle, &cookie);
- ok(ret, "ActivateActCtx failed: %u\n", GetLastError());
+ ok(ret, "ActivateActCtx failed: %lu\n", GetLastError());
memset(&data, 0, sizeof(data));
memset(&data2, 0, sizeof(data2));
@@ -1897,16 +1898,16 @@ static void test_dllredirect_section(void)
ok(ret, "got %d\n", ret);
section = (struct strsection_header*)data.lpSectionBase;
- ok(section->count == 4, "got %d\n", section->count);
- ok(section->size == sizeof(*section), "got %d\n", section->size);
+ ok(section->count == 4, "got %ld\n", section->count);
+ ok(section->size == sizeof(*section), "got %ld\n", section->size);
/* For both string same section is returned, meaning it's one dll redirect section per context */
ok(data.lpSectionBase == data2.lpSectionBase, "got %p, %p\n", data.lpSectionBase, data2.lpSectionBase);
- ok(data.ulSectionTotalLength == data2.ulSectionTotalLength, "got %u, %u\n", data.ulSectionTotalLength,
+ ok(data.ulSectionTotalLength == data2.ulSectionTotalLength, "got %lu, %lu\n", data.ulSectionTotalLength,
data2.ulSectionTotalLength);
ret = DeactivateActCtx(0, cookie);
- ok(ret, "DeactivateActCtx failed: %u\n", GetLastError());
+ ok(ret, "DeactivateActCtx failed: %lu\n", GetLastError());
ReleaseActCtx(handle);
}
@@ -1927,14 +1928,14 @@ static void test_typelib_section(void)
create_manifest_file("main_wndcls.manifest", manifest_wndcls_main, -1, NULL, NULL);
handle = test_create("main_wndcls.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("testdep1.manifest");
DeleteFileA("testdep2.manifest");
DeleteFileA("main_wndcls.manifest");
ret = ActivateActCtx(handle, &cookie);
- ok(ret, "ActivateActCtx failed: %u\n", GetLastError());
+ ok(ret, "ActivateActCtx failed: %lu\n", GetLastError());
memset(&data, 0, sizeof(data));
memset(&data2, 0, sizeof(data2));
@@ -1950,29 +1951,29 @@ static void test_typelib_section(void)
ok(ret, "got %d\n", ret);
section = (struct guidsection_header*)data.lpSectionBase;
- ok(section->count == 4, "got %d\n", section->count);
- ok(section->size == sizeof(*section), "got %d\n", section->size);
+ ok(section->count == 4, "got %ld\n", section->count);
+ ok(section->size == sizeof(*section), "got %ld\n", section->size);
/* For both GUIDs same section is returned */
ok(data.lpSectionBase == data2.lpSectionBase, "got %p, %p\n", data.lpSectionBase, data2.lpSectionBase);
- ok(data.ulSectionTotalLength == data2.ulSectionTotalLength, "got %u, %u\n", data.ulSectionTotalLength,
+ ok(data.ulSectionTotalLength == data2.ulSectionTotalLength, "got %lu, %lu\n", data.ulSectionTotalLength,
data2.ulSectionTotalLength);
ok(data.lpSectionGlobalData == ((BYTE*)section + section->names_offset), "data.lpSectionGlobalData == NULL\n");
- ok(data.ulSectionGlobalDataLength == section->names_len, "data.ulSectionGlobalDataLength=%u\n",
+ ok(data.ulSectionGlobalDataLength == section->names_len, "data.ulSectionGlobalDataLength=%lu\n",
data.ulSectionGlobalDataLength);
/* test some actual data */
tlib = (struct tlibredirect_data*)data.lpData;
- ok(tlib->size == sizeof(*tlib), "got %d\n", tlib->size);
+ ok(tlib->size == sizeof(*tlib), "got %ld\n", tlib->size);
ok(tlib->major_version == 1, "got %d\n", tlib->major_version);
ok(tlib->minor_version == 0, "got %d\n", tlib->minor_version);
- ok(tlib->help_offset > 0, "got %d\n", tlib->help_offset);
- ok(tlib->help_len == sizeof(helpW), "got %d\n", tlib->help_len);
+ ok(tlib->help_offset > 0, "got %ld\n", tlib->help_offset);
+ ok(tlib->help_len == sizeof(helpW), "got %ld\n", tlib->help_len);
ok(tlib->flags == (LIBFLAG_FHIDDEN|LIBFLAG_FCONTROL|LIBFLAG_FRESTRICTED), "got %x\n", tlib->flags);
ret = DeactivateActCtx(0, cookie);
- ok(ret, "DeactivateActCtx failed: %u\n", GetLastError());
+ ok(ret, "DeactivateActCtx failed: %lu\n", GetLastError());
ReleaseActCtx(handle);
}
@@ -2010,7 +2011,7 @@ static void test_actctx(void)
b = GetCurrentActCtx(&handle);
ok(handle == NULL, "handle = %p, expected NULL\n", handle);
- ok(b, "GetCurrentActCtx failed: %u\n", GetLastError());
+ ok(b, "GetCurrentActCtx failed: %lu\n", GetLastError());
if(b) {
test_basic_info(handle, __LINE__);
test_detailed_info(handle, &detailed_info0, __LINE__);
@@ -2021,7 +2022,7 @@ static void test_actctx(void)
/* test for whitespace handling in Eq ::= S? '=' S? */
create_manifest_file("test1_1.manifest", manifest1_1, -1, NULL, NULL);
handle = test_create("test1_1.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("test1_1.manifest");
ReleaseActCtx(handle);
@@ -2033,7 +2034,7 @@ static void test_actctx(void)
trace("manifest1\n");
handle = test_create("test1.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("test1.manifest");
if(handle != INVALID_HANDLE_VALUE) {
test_basic_info(handle, __LINE__);
@@ -2045,7 +2046,7 @@ static void test_actctx(void)
/* CloseHandle will generate an exception if a debugger is present */
b = CloseHandle(handle);
ok(!b, "CloseHandle succeeded\n");
- ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError() == %u\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError() == %lu\n", GetLastError());
}
ReleaseActCtx(handle);
@@ -2059,7 +2060,7 @@ static void test_actctx(void)
trace("manifest2 depmanifest1\n");
handle = test_create("test2.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("test2.manifest");
DeleteFileA("testdep.manifest");
if(handle != INVALID_HANDLE_VALUE) {
@@ -2078,7 +2079,7 @@ static void test_actctx(void)
trace("manifest2 depmanifest2\n");
handle = test_create("test2-2.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("test2-2.manifest");
DeleteFileA("testdep.manifest");
if(handle != INVALID_HANDLE_VALUE) {
@@ -2090,11 +2091,11 @@ static void test_actctx(void)
test_file_info(handle, 1, 1, testlib2_dll, __LINE__);
b = ActivateActCtx(handle, &cookie);
- ok(b, "ActivateActCtx failed: %u\n", GetLastError());
+ ok(b, "ActivateActCtx failed: %lu\n", GetLastError());
test_find_dll_redirection(handle, testlib_dll, 2, __LINE__);
test_find_dll_redirection(handle, testlib2_dll, 2, __LINE__);
b = DeactivateActCtx(0, cookie);
- ok(b, "DeactivateActCtx failed: %u\n", GetLastError());
+ ok(b, "DeactivateActCtx failed: %lu\n", GetLastError());
ReleaseActCtx(handle);
}
@@ -2107,7 +2108,7 @@ static void test_actctx(void)
}
handle = test_create("test2-3.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("test2-3.manifest");
DeleteFileA("testdep.manifest");
if(handle != INVALID_HANDLE_VALUE) {
@@ -2119,13 +2120,13 @@ static void test_actctx(void)
test_file_info(handle, 1, 1, testlib2_dll, __LINE__);
b = ActivateActCtx(handle, &cookie);
- ok(b, "ActivateActCtx failed: %u\n", GetLastError());
+ ok(b, "ActivateActCtx failed: %lu\n", GetLastError());
test_find_dll_redirection(handle, testlib_dll, 2, __LINE__);
test_find_dll_redirection(handle, testlib2_dll, 2, __LINE__);
test_find_window_class(handle, wndClassW, 2, __LINE__);
test_find_window_class(handle, wndClass2W, 2, __LINE__);
b = DeactivateActCtx(0, cookie);
- ok(b, "DeactivateActCtx failed: %u\n", GetLastError());
+ ok(b, "DeactivateActCtx failed: %lu\n", GetLastError());
ReleaseActCtx(handle);
}
@@ -2139,7 +2140,7 @@ static void test_actctx(void)
handle = test_create("test3.manifest");
ok(handle != INVALID_HANDLE_VALUE || broken(handle == INVALID_HANDLE_VALUE) /* XP pre-SP2, win2k3 w/o SP */,
- "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
if (handle == INVALID_HANDLE_VALUE)
win_skip("Some activation context features not supported, skipping a test (possibly old XP/Win2k3 system\n");
DeleteFileA("test3.manifest");
@@ -2155,7 +2156,7 @@ static void test_actctx(void)
test_file_info(handle, 0, 0, testlib_dll, __LINE__);
b = ActivateActCtx(handle, &cookie);
- ok(b, "ActivateActCtx failed: %u\n", GetLastError());
+ ok(b, "ActivateActCtx failed: %lu\n", GetLastError());
test_find_dll_redirection(handle, testlib_dll, 1, __LINE__);
test_find_dll_redirection(handle, testlib_dll, 1, __LINE__);
test_find_com_redirection(handle, &IID_CoTest, &IID_TlibTest, progidW, 1, __LINE__);
@@ -2182,7 +2183,7 @@ static void test_actctx(void)
test_find_string_fail();
b = DeactivateActCtx(0, cookie);
- ok(b, "DeactivateActCtx failed: %u\n", GetLastError());
+ ok(b, "DeactivateActCtx failed: %lu\n", GetLastError());
ReleaseActCtx(handle);
}
@@ -2207,7 +2208,7 @@ static void test_actctx(void)
if(create_manifest_file("test7.manifest", manifest7, -1, NULL, NULL)) {
handle = test_create("test7.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("test7.manifest");
DeleteFileA("testdep.manifest");
if(handle != INVALID_HANDLE_VALUE)
@@ -2223,7 +2224,7 @@ static void test_actctx(void)
if(create_manifest_file("test8.manifest", manifest8, -1, NULL, NULL)) {
handle = test_create("test8.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("test8.manifest");
DeleteFileA("testdep.manifest");
if(handle != INVALID_HANDLE_VALUE)
@@ -2239,7 +2240,7 @@ static void test_actctx(void)
if(create_manifest_file("test9.manifest", manifest9, -1, NULL, NULL)) {
handle = test_create("test9.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("test9.manifest");
DeleteFileA("testdep.manifest");
if(handle != INVALID_HANDLE_VALUE)
@@ -2253,7 +2254,7 @@ static void test_actctx(void)
if(create_manifest_file("test10.manifest", manifest10, -1, NULL, NULL)) {
handle = test_create("test10.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("test10.manifest");
DeleteFileA("testdep.manifest");
if(handle != INVALID_HANDLE_VALUE)
@@ -2268,7 +2269,7 @@ static void test_actctx(void)
if (create_manifest_file("test11.manifest", manifest11, -1, NULL, NULL))
{
handle = test_create("test11.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "Failed to create activation context for %s, error %u\n",
+ ok(handle != INVALID_HANDLE_VALUE, "Failed to create activation context for %s, error %lu\n",
"manifest11", GetLastError());
DeleteFileA("test11.manifest");
if (handle != INVALID_HANDLE_VALUE)
@@ -2285,7 +2286,7 @@ static void test_actctx(void)
}
handle = test_create("test4.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("test4.manifest");
DeleteFileA("testdep.manifest");
if(handle != INVALID_HANDLE_VALUE) {
@@ -2306,7 +2307,7 @@ static void test_actctx(void)
return;
}
handle = test_create("..\\test1.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("..\\test1.manifest");
if(handle != INVALID_HANDLE_VALUE) {
test_basic_info(handle, __LINE__);
@@ -2327,7 +2328,7 @@ static void test_actctx(void)
}
handle = test_create("test1.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("test1.manifest");
if (handle != INVALID_HANDLE_VALUE) {
test_basic_info(handle, __LINE__);
@@ -2343,7 +2344,7 @@ static void test_actctx(void)
}
handle = test_create("test1.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("test1.manifest");
if (handle != INVALID_HANDLE_VALUE) {
test_basic_info(handle, __LINE__);
@@ -2367,7 +2368,7 @@ static void test_app_manifest(void)
b = GetCurrentActCtx(&handle);
ok(handle == NULL, "handle != NULL\n");
- ok(b, "GetCurrentActCtx failed: %u\n", GetLastError());
+ ok(b, "GetCurrentActCtx failed: %lu\n", GetLastError());
if(b) {
test_basic_info(handle, __LINE__);
test_detailed_info(handle, &detailed_info1_child, __LINE__);
@@ -2383,7 +2384,7 @@ static HANDLE create_manifest(const char *filename, const char *data, int line)
handle = test_create(filename);
ok_(__FILE__, line)(handle != INVALID_HANDLE_VALUE,
- "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA(filename);
return handle;
@@ -2408,7 +2409,7 @@ static void kernel32_find(ULONG section, const char *string_to_find, BOOL should
"FindActCtxSectionStringA: expected ret = %u, got %u\n", should_find, ret);
todo_wine_if(todo)
ok_(__FILE__, line)(err == (should_find ? ERROR_SUCCESS : ERROR_SXS_KEY_NOT_FOUND),
- "FindActCtxSectionStringA: unexpected error %u\n", err);
+ "FindActCtxSectionStringA: unexpected error %lu\n", err);
memset(&data, 0xfe, sizeof(data));
data.cbSize = sizeof(data);
@@ -2420,7 +2421,7 @@ static void kernel32_find(ULONG section, const char *string_to_find, BOOL should
"FindActCtxSectionStringW: expected ret = %u, got %u\n", should_find, ret);
todo_wine_if(todo)
ok_(__FILE__, line)(err == (should_find ? ERROR_SUCCESS : ERROR_SXS_KEY_NOT_FOUND),
- "FindActCtxSectionStringW: unexpected error %u\n", err);
+ "FindActCtxSectionStringW: unexpected error %lu\n", err);
SetLastError(0);
ret = FindActCtxSectionStringA(0, NULL, section, string_to_find, NULL);
@@ -2428,7 +2429,7 @@ static void kernel32_find(ULONG section, const char *string_to_find, BOOL should
ok_(__FILE__, line)(!ret,
"FindActCtxSectionStringA: expected failure, got %u\n", ret);
ok_(__FILE__, line)(err == ERROR_INVALID_PARAMETER,
- "FindActCtxSectionStringA: unexpected error %u\n", err);
+ "FindActCtxSectionStringA: unexpected error %lu\n", err);
SetLastError(0);
ret = FindActCtxSectionStringW(0, NULL, section, string_to_findW.Buffer, NULL);
@@ -2436,7 +2437,7 @@ static void kernel32_find(ULONG section, const char *string_to_find, BOOL should
ok_(__FILE__, line)(!ret,
"FindActCtxSectionStringW: expected failure, got %u\n", ret);
ok_(__FILE__, line)(err == ERROR_INVALID_PARAMETER,
- "FindActCtxSectionStringW: unexpected error %u\n", err);
+ "FindActCtxSectionStringW: unexpected error %lu\n", err);
pRtlFreeUnicodeString(&string_to_findW);
}
@@ -2455,12 +2456,12 @@ static void ntdll_find(ULONG section, const char *string_to_find, BOOL should_fi
ret = pRtlFindActivationContextSectionString(0, NULL, section, &string_to_findW, &data);
todo_wine_if(todo)
ok_(__FILE__, line)(ret == (should_find ? STATUS_SUCCESS : STATUS_SXS_KEY_NOT_FOUND),
- "RtlFindActivationContextSectionString: unexpected status 0x%x\n", ret);
+ "RtlFindActivationContextSectionString: unexpected status 0x%lx\n", ret);
ret = pRtlFindActivationContextSectionString(0, NULL, section, &string_to_findW, NULL);
todo_wine_if(todo)
ok_(__FILE__, line)(ret == (should_find ? STATUS_SUCCESS : STATUS_SXS_KEY_NOT_FOUND),
- "RtlFindActivationContextSectionString: unexpected status 0x%x\n", ret);
+ "RtlFindActivationContextSectionString: unexpected status 0x%lx\n", ret);
pRtlFreeUnicodeString(&string_to_findW);
}
@@ -2473,7 +2474,7 @@ static void test_findsectionstring(void)
handle = create_manifest("test.manifest", testdep_manifest3, __LINE__);
ret = ActivateActCtx(handle, &cookie);
- ok(ret, "ActivateActCtx failed: %u\n", GetLastError());
+ ok(ret, "ActivateActCtx failed: %lu\n", GetLastError());
/* first we show the parameter validation from kernel32 */
kernel32_find(ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION, "testdep", FALSE, TRUE, __LINE__);
@@ -2494,7 +2495,7 @@ static void test_findsectionstring(void)
ntdll_find(ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, "wndClass3", FALSE, FALSE, __LINE__);
ret = DeactivateActCtx(0, cookie);
- ok(ret, "DeactivateActCtx failed: %u\n", GetLastError());
+ ok(ret, "DeactivateActCtx failed: %lu\n", GetLastError());
ReleaseActCtx(handle);
}
@@ -2529,7 +2530,7 @@ static void run_child_process(void)
}
sprintf(cmdline, "\"%s\" %s manifest1", argv[0], argv[1]);
ret = CreateProcessA(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
- ok(ret, "Could not create process: %u\n", GetLastError());
+ ok(ret, "Could not create process: %lu\n", GetLastError());
wait_child_process( pi.hProcess );
CloseHandle(pi.hThread);
CloseHandle(pi.hProcess);
@@ -2570,7 +2571,7 @@ static void write_manifest(const char *filename, const char *manifest)
strcat(path, filename);
file = CreateFileA(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
- ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %u\n", GetLastError());
+ ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %lu\n", GetLastError());
WriteFile(file, manifest, strlen(manifest), &size, NULL);
CloseHandle(file);
}
@@ -2592,7 +2593,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 %ld\n", path, GetLastError());
res = FindResourceA(NULL, name, type);
ok( res != 0, "couldn't find resource\n" );
@@ -2621,7 +2622,7 @@ static void test_CreateActCtx(void)
/* create using lpSource without specified directory */
handle = CreateActCtxA(&actctx);
- ok(handle != INVALID_HANDLE_VALUE, "failed to generate context, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "failed to generate context, error %lu\n", GetLastError());
ReleaseActCtx(handle);
/* with specified directory, that doesn't contain dependent assembly */
@@ -2637,7 +2638,7 @@ static void test_CreateActCtx(void)
handle = CreateActCtxA(&actctx);
todo_wine {
ok(handle == INVALID_HANDLE_VALUE, "got handle %p\n", handle);
- ok(GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX, "got error %d\n", GetLastError());
+ ok(GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX, "got error %ld\n", GetLastError());
}
if (handle != INVALID_HANDLE_VALUE) ReleaseActCtx(handle);
@@ -2653,7 +2654,7 @@ todo_wine {
strcat(dll, "testdep1.dll");
extract_resource("dummy.dll", "TESTDLL", dll);
handle = CreateActCtxA(&actctx);
- ok(handle != INVALID_HANDLE_VALUE || broken(GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX) , "got error %d\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE || broken(GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX) , "got error %ld\n", GetLastError());
ReleaseActCtx(handle);
DeleteFileA(dll);
@@ -2670,7 +2671,7 @@ todo_wine {
ok(handle == INVALID_HANDLE_VALUE, "got handle %p\n", handle);
todo_wine
ok(GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX || broken(GetLastError() == ERROR_NOT_ENOUGH_MEMORY) /* XP, win2k3 */,
- "got error %d\n", GetLastError());
+ "got error %ld\n", GetLastError());
/* create from HMODULE - resource doesn't exist, lpSource is set */
memset(&actctx, 0, sizeof(ACTCTXA));
@@ -2683,7 +2684,7 @@ todo_wine {
SetLastError(0xdeadbeef);
handle = CreateActCtxA(&actctx);
ok(handle == INVALID_HANDLE_VALUE, "got handle %p\n", handle);
- ok(GetLastError() == ERROR_RESOURCE_NAME_NOT_FOUND, "got error %d\n", GetLastError());
+ ok(GetLastError() == ERROR_RESOURCE_NAME_NOT_FOUND, "got error %ld\n", GetLastError());
/* load manifest from lpAssemblyDirectory directory */
write_manifest("testdir.manifest", manifest1);
@@ -2704,7 +2705,7 @@ todo_wine {
ok(handle == INVALID_HANDLE_VALUE, "got handle %p\n", handle);
ok(GetLastError()==ERROR_PATH_NOT_FOUND ||
broken(GetLastError()==ERROR_FILE_NOT_FOUND) /* WinXP */,
- "got error %d\n", GetLastError());
+ "got error %ld\n", GetLastError());
CreateDirectoryA(dir, NULL);
memset(&actctx, 0, sizeof(actctx));
@@ -2716,7 +2717,7 @@ todo_wine {
SetLastError(0xdeadbeef);
handle = CreateActCtxA(&actctx);
ok(handle == INVALID_HANDLE_VALUE, "got handle %p\n", handle);
- ok(GetLastError() == ERROR_FILE_NOT_FOUND, "got error %d\n", GetLastError());
+ ok(GetLastError() == ERROR_FILE_NOT_FOUND, "got error %ld\n", GetLastError());
SetCurrentDirectoryW(work_dir);
write_manifest("assembly_dir\\testdir.manifest", manifest1);
@@ -2771,33 +2772,33 @@ static void test_ZombifyActCtx(void)
SetLastError(0xdeadbeef);
ret = ZombifyActCtx(NULL);
todo_wine
- ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "got %d, error %d\n", ret, GetLastError());
+ ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "got %d, error %ld\n", ret, GetLastError());
handle = create_manifest("test.manifest", testdep_manifest3, __LINE__);
ret = GetCurrentActCtx(¤t);
- ok(ret, "got %d, error %d\n", ret, GetLastError());
+ ok(ret, "got %d, error %ld\n", ret, GetLastError());
ok(current == NULL, "got %p\n", current);
ret = ActivateActCtx(handle, &cookie);
- ok(ret, "ActivateActCtx failed: %u\n", GetLastError());
+ ok(ret, "ActivateActCtx failed: %lu\n", GetLastError());
ret = GetCurrentActCtx(¤t);
- ok(ret, "got %d, error %d\n", ret, GetLastError());
+ ok(ret, "got %d, error %ld\n", ret, GetLastError());
ok(handle == current, "got %p, %p\n", current, handle);
memset(&basicinfo, 0xff, sizeof(basicinfo));
ret = QueryActCtxW(0, handle, 0, ActivationContextBasicInformation, &basicinfo, sizeof(basicinfo), NULL);
- ok(ret, "got %d, error %d\n", ret, GetLastError());
+ ok(ret, "got %d, error %ld\n", ret, GetLastError());
ok(basicinfo.hActCtx == handle, "got %p\n", basicinfo.hActCtx);
- ok(basicinfo.dwFlags == 0, "got %x\n", basicinfo.dwFlags);
+ ok(basicinfo.dwFlags == 0, "got %lx\n", basicinfo.dwFlags);
memset(&basicinfo, 0xff, sizeof(basicinfo));
ret = QueryActCtxW(QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX, NULL, 0, ActivationContextBasicInformation,
&basicinfo, sizeof(basicinfo), NULL);
- ok(ret, "got %d, error %d\n", ret, GetLastError());
+ ok(ret, "got %d, error %ld\n", ret, GetLastError());
ok(basicinfo.hActCtx == handle, "got %p\n", basicinfo.hActCtx);
- ok(basicinfo.dwFlags == 0, "got %x\n", basicinfo.dwFlags);
+ ok(basicinfo.dwFlags == 0, "got %lx\n", basicinfo.dwFlags);
ret = ZombifyActCtx(handle);
todo_wine
@@ -2805,19 +2806,19 @@ static void test_ZombifyActCtx(void)
memset(&basicinfo, 0xff, sizeof(basicinfo));
ret = QueryActCtxW(0, handle, 0, ActivationContextBasicInformation, &basicinfo, sizeof(basicinfo), NULL);
- ok(ret, "got %d, error %d\n", ret, GetLastError());
+ ok(ret, "got %d, error %ld\n", ret, GetLastError());
ok(basicinfo.hActCtx == handle, "got %p\n", basicinfo.hActCtx);
- ok(basicinfo.dwFlags == 0, "got %x\n", basicinfo.dwFlags);
+ ok(basicinfo.dwFlags == 0, "got %lx\n", basicinfo.dwFlags);
memset(&basicinfo, 0xff, sizeof(basicinfo));
ret = QueryActCtxW(QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX, NULL, 0, ActivationContextBasicInformation,
&basicinfo, sizeof(basicinfo), NULL);
- ok(ret, "got %d, error %d\n", ret, GetLastError());
+ ok(ret, "got %d, error %ld\n", ret, GetLastError());
ok(basicinfo.hActCtx == handle, "got %p\n", basicinfo.hActCtx);
- ok(basicinfo.dwFlags == 0, "got %x\n", basicinfo.dwFlags);
+ ok(basicinfo.dwFlags == 0, "got %lx\n", basicinfo.dwFlags);
ret = GetCurrentActCtx(¤t);
- ok(ret, "got %d, error %d\n", ret, GetLastError());
+ ok(ret, "got %d, error %ld\n", ret, GetLastError());
ok(current == handle, "got %p\n", current);
/* one more time */
@@ -2826,7 +2827,7 @@ static void test_ZombifyActCtx(void)
ok(ret, "got %d\n", ret);
ret = DeactivateActCtx(0, cookie);
- ok(ret, "DeactivateActCtx failed: %u\n", GetLastError());
+ ok(ret, "DeactivateActCtx failed: %lu\n", GetLastError());
ReleaseActCtx(handle);
}
@@ -2863,8 +2864,8 @@ static void test_no_compat(HANDLE handle, int line)
ok_(__FILE__, line)(b, "CompatibilityInformationInActivationContext failed\n");
ok_(__FILE__, line)(size == offsetof(test_act_ctx_compat_info,Elements[0]) ||
broken(size == offsetof(old_win10_test_act_ctx_compat_info,Elements[0])),
- "size mismatch got %lu\n", size);
- ok_(__FILE__, line)(compat_info.ElementCount == 0, "unexpected ElementCount %u\n", compat_info.ElementCount);
+ "size mismatch got %Iu\n", size);
+ ok_(__FILE__, line)(compat_info.ElementCount == 0, "unexpected ElementCount %lu\n", compat_info.ElementCount);
}
static void test_with_compat(HANDLE handle, DWORD num_compat, DWORD num_version,
@@ -2882,10 +2883,10 @@ static void test_with_compat(HANDLE handle, DWORD num_compat, DWORD num_version,
ok_(__FILE__, line)(b, "CompatibilityInformationInActivationContext failed\n");
ok_(__FILE__, line)(size == offsetof(test_act_ctx_compat_info,Elements[num_compat + num_version]) ||
broken(size == offsetof(old_win10_test_act_ctx_compat_info,Elements[num_compat])),
- "size mismatch got %lu\n", size);
+ "size mismatch got %Iu\n", size);
ok_(__FILE__, line)(compat_info.ElementCount == num_compat + num_version ||
broken(compat_info.ElementCount == num_compat),
- "unexpected ElementCount %u\n", compat_info.ElementCount);
+ "unexpected ElementCount %lu\n", compat_info.ElementCount);
if (size == offsetof(old_win10_test_act_ctx_compat_info,Elements[num_compat]))
{
@@ -2893,12 +2894,12 @@ static void test_with_compat(HANDLE handle, DWORD num_compat, DWORD num_version,
{
old_win10_test_act_ctx_compat_info *info = (old_win10_test_act_ctx_compat_info *)&compat_info;
ok_(__FILE__, line)(IsEqualGUID(&info->Elements[n].Id, expected_compat[n]),
- "got wrong clsid %s, expected %s for %u\n",
+ "got wrong clsid %s, expected %s for %lu\n",
wine_dbgstr_guid(&info->Elements[n].Id),
wine_dbgstr_guid(expected_compat[n]),
n);
ok_(__FILE__, line)(info->Elements[n].Type == ACTCTX_COMPATIBILITY_ELEMENT_TYPE_OS,
- "Wrong type, got %u for %u\n", (DWORD)info->Elements[n].Type, n);
+ "Wrong type, got %lu for %lu\n", (DWORD)info->Elements[n].Type, n);
}
}
else
@@ -2906,19 +2907,19 @@ static void test_with_compat(HANDLE handle, DWORD num_compat, DWORD num_version,
for (n = 0; n < num_compat; ++n)
{
ok_(__FILE__, line)(IsEqualGUID(&compat_info.Elements[n].Id, expected_compat[n]),
- "got wrong clsid %s, expected %s for %u\n",
+ "got wrong clsid %s, expected %s for %lu\n",
wine_dbgstr_guid(&compat_info.Elements[n].Id),
wine_dbgstr_guid(expected_compat[n]),
n);
ok_(__FILE__, line)(compat_info.Elements[n].Type == ACTCTX_COMPATIBILITY_ELEMENT_TYPE_OS,
- "Wrong type, got %u for %u\n", (DWORD)compat_info.Elements[n].Type, n);
+ "Wrong type, got %lu for %lu\n", (DWORD)compat_info.Elements[n].Type, n);
}
for (; n < num_compat + num_version; ++n)
{
ok_(__FILE__, line)(compat_info.Elements[n].Type == ACTCTX_COMPATIBILITY_ELEMENT_TYPE_MAXVERSIONTESTED,
- "Wrong type, got %u for %u\n", (DWORD)compat_info.Elements[n].Type, n);
+ "Wrong type, got %lu for %lu\n", (DWORD)compat_info.Elements[n].Type, n);
ok_(__FILE__, line)(compat_info.Elements[n].MaxVersionTested == expected_version[n - num_compat],
- "Wrong version, got %s for %u\n", wine_dbgstr_longlong(compat_info.Elements[n].MaxVersionTested), n);
+ "Wrong version, got %s for %lu\n", wine_dbgstr_longlong(compat_info.Elements[n].MaxVersionTested), n);
}
}
}
@@ -2935,7 +2936,7 @@ static void test_compatibility(void)
return;
}
handle = test_create("test1.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("test1.manifest");
if(handle != INVALID_HANDLE_VALUE)
{
@@ -2967,7 +2968,7 @@ static void test_compatibility(void)
return;
}
handle = test_create("no_supportedOs.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("no_supportedOs.manifest");
if(handle != INVALID_HANDLE_VALUE)
{
@@ -2984,7 +2985,7 @@ static void test_compatibility(void)
return;
}
handle = test_create("manifest_vista.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("manifest_vista.manifest");
if(handle != INVALID_HANDLE_VALUE)
{
@@ -3005,7 +3006,7 @@ static void test_compatibility(void)
return;
}
handle = test_create("manifest_vista_7_8_10_81.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("manifest_vista_7_8_10_81.manifest");
if(handle != INVALID_HANDLE_VALUE)
{
@@ -3035,7 +3036,7 @@ static void test_compatibility(void)
return;
}
handle = test_create("manifest_other_guid.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("manifest_other_guid.manifest");
if(handle != INVALID_HANDLE_VALUE)
{
@@ -3069,100 +3070,100 @@ static void test_settings(void)
}
create_manifest_file( "manifest_settings.manifest", settings_manifest, -1, NULL, NULL );
handle = test_create("manifest_settings.manifest");
- ok( handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError() );
+ ok( handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError() );
DeleteFileA( "manifest_settings.manifest" );
SetLastError( 0xdeadbeef );
ret = pQueryActCtxSettingsW( 1, handle, NULL, dpiAwareW, buffer, 80, &size );
- ok( !ret, "QueryActCtxSettingsW failed err %u\n", GetLastError() );
- ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() );
+ ok( !ret, "QueryActCtxSettingsW failed err %lu\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef );
ret = pQueryActCtxSettingsW( 0, handle, dummyW, dpiAwareW, buffer, 80, &size );
- ok( !ret, "QueryActCtxSettingsW failed err %u\n", GetLastError() );
- ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() );
+ ok( !ret, "QueryActCtxSettingsW failed err %lu\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef );
size = 0xdead;
memset( buffer, 0xcc, sizeof(buffer) );
ret = pQueryActCtxSettingsW( 0, handle, NULL, dpiAwareW, buffer, 80, &size );
- ok( ret, "QueryActCtxSettingsW failed err %u\n", GetLastError() );
+ ok( ret, "QueryActCtxSettingsW failed err %lu\n", GetLastError() );
ok( !lstrcmpW( buffer, trueW ), "got %s\n", wine_dbgstr_w(buffer) );
- ok( size == lstrlenW( buffer ) + 1, "wrong len %lu\n", size );
+ ok( size == lstrlenW( buffer ) + 1, "wrong len %Iu\n", size );
SetLastError( 0xdeadbeef );
size = 0xdead;
memset( buffer, 0xcc, sizeof(buffer) );
ret = pQueryActCtxSettingsW( 0, handle, NULL, dummyW, buffer, 80, &size );
ok( !ret, "QueryActCtxSettingsW succeeded\n" );
- ok( GetLastError() == ERROR_SXS_KEY_NOT_FOUND, "wrong error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_SXS_KEY_NOT_FOUND, "wrong error %lu\n", GetLastError() );
ok( buffer[0] == 0xcccc, "got %s\n", wine_dbgstr_w(buffer) );
SetLastError( 0xdeadbeef );
size = 0xdead;
memset( buffer, 0xcc, sizeof(buffer) );
ret = pQueryActCtxSettingsW( 0, handle, namespace2005W, dpiAwareW, buffer, 80, &size );
- ok( ret, "QueryActCtxSettingsW failed err %u\n", GetLastError() );
+ ok( ret, "QueryActCtxSettingsW failed err %lu\n", GetLastError() );
ok( !lstrcmpW( buffer, trueW ), "got %s\n", wine_dbgstr_w(buffer) );
- ok( size == ARRAY_SIZE(trueW), "wrong len %lu\n", size );
+ ok( size == ARRAY_SIZE(trueW), "wrong len %Iu\n", size );
SetLastError( 0xdeadbeef );
size = 0xdead;
memset( buffer, 0xcc, sizeof(buffer) );
ret = pQueryActCtxSettingsW( 0, handle, namespace2005W, dpiAwareW, buffer, lstrlenW(trueW) + 1, &size );
- ok( ret, "QueryActCtxSettingsW failed err %u\n", GetLastError() );
+ ok( ret, "QueryActCtxSettingsW failed err %lu\n", GetLastError() );
ok( !lstrcmpW( buffer, trueW ), "got %s\n", wine_dbgstr_w(buffer) );
- ok( size == ARRAY_SIZE(trueW), "wrong len %lu\n", size );
+ ok( size == ARRAY_SIZE(trueW), "wrong len %Iu\n", size );
SetLastError( 0xdeadbeef );
size = 0xdead;
memset( buffer, 0xcc, sizeof(buffer) );
ret = pQueryActCtxSettingsW( 0, handle, namespace2016W, dpiAwareW, buffer, lstrlenW(trueW) + 1, &size );
ok( !ret, "QueryActCtxSettingsW succeeded\n" );
ok( GetLastError() == ERROR_SXS_KEY_NOT_FOUND || broken( GetLastError() == ERROR_INVALID_PARAMETER ),
- "wrong error %u\n", GetLastError() );
+ "wrong error %lu\n", GetLastError() );
ok( buffer[0] == 0xcccc, "got %s\n", wine_dbgstr_w(buffer) );
SetLastError( 0xdeadbeef );
size = 0xdead;
memset( buffer, 0xcc, sizeof(buffer) );
ret = pQueryActCtxSettingsW( 0, handle, NULL, dpiAwarenessW, buffer, lstrlenW(trueW) + 1, &size );
ok( !ret, "QueryActCtxSettingsW succeeded\n" );
- ok( GetLastError() == ERROR_SXS_KEY_NOT_FOUND, "wrong error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_SXS_KEY_NOT_FOUND, "wrong error %lu\n", GetLastError() );
ok( buffer[0] == 0xcccc, "got %s\n", wine_dbgstr_w(buffer) );
SetLastError( 0xdeadbeef );
size = 0xdead;
memset( buffer, 0xcc, sizeof(buffer) );
ret = pQueryActCtxSettingsW( 0, handle, namespace2005W, dpiAwarenessW, buffer, lstrlenW(trueW) + 1, &size );
ok( !ret, "QueryActCtxSettingsW succeeded\n" );
- ok( GetLastError() == ERROR_SXS_KEY_NOT_FOUND, "wrong error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_SXS_KEY_NOT_FOUND, "wrong error %lu\n", GetLastError() );
ok( buffer[0] == 0xcccc, "got %s\n", wine_dbgstr_w(buffer) );
SetLastError( 0xdeadbeef );
size = 0xdead;
memset( buffer, 0xcc, sizeof(buffer) );
ret = pQueryActCtxSettingsW( 0, handle, namespace2016W, dpiAwarenessW, buffer, lstrlenW(trueW) + 1, &size );
ok( ret || broken( GetLastError() == ERROR_INVALID_PARAMETER ),
- "QueryActCtxSettingsW failed err %u\n", GetLastError() );
+ "QueryActCtxSettingsW failed err %lu\n", GetLastError() );
if (ret)
{
ok( !lstrcmpW( buffer, trueW ), "got %s\n", wine_dbgstr_w(buffer) );
- ok( size == ARRAY_SIZE(trueW), "wrong len %lu\n", size );
+ ok( size == ARRAY_SIZE(trueW), "wrong len %Iu\n", size );
}
else ok( buffer[0] == 0xcccc, "got %s\n", wine_dbgstr_w(buffer) );
SetLastError( 0xdeadbeef );
size = 0xdead;
memset( buffer, 0xcc, sizeof(buffer) );
ret = pQueryActCtxSettingsW( 0, handle, NULL, dpiAwareW, buffer, lstrlenW(trueW), &size );
- ok( ret, "QueryActCtxSettingsW failed err %u\n", GetLastError() );
+ ok( ret, "QueryActCtxSettingsW failed err %lu\n", GetLastError() );
ok( !lstrcmpW( buffer, trueW ), "got %s\n", wine_dbgstr_w(buffer) );
- ok( size == ARRAY_SIZE(trueW), "wrong len %lu\n", size );
+ ok( size == ARRAY_SIZE(trueW), "wrong len %Iu\n", size );
SetLastError( 0xdeadbeef );
size = 0xdead;
memset( buffer, 0xcc, sizeof(buffer) );
ret = pQueryActCtxSettingsW( 0, handle, NULL, dpiAwareW, buffer, lstrlenW(trueW) - 1, &size );
- ok( !ret, "QueryActCtxSettingsW failed err %u\n", GetLastError() );
- ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, "wrong error %u\n", GetLastError() );
+ ok( !ret, "QueryActCtxSettingsW failed err %lu\n", GetLastError() );
+ ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, "wrong error %lu\n", GetLastError() );
ok( buffer[0] == 0xcccc, "got %s\n", wine_dbgstr_w(buffer) );
- ok( size == ARRAY_SIZE(trueW), "wrong len %lu\n", size );
+ ok( size == ARRAY_SIZE(trueW), "wrong len %Iu\n", size );
ReleaseActCtx(handle);
create_manifest_file( "manifest_settings2.manifest", settings_manifest2, -1, NULL, NULL );
handle = test_create("manifest_settings2.manifest");
ok( handle != INVALID_HANDLE_VALUE || broken( handle == INVALID_HANDLE_VALUE ), /* <= vista */
- "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError() );
+ "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError() );
DeleteFileA( "manifest_settings2.manifest" );
if (handle != INVALID_HANDLE_VALUE)
{
@@ -3170,22 +3171,22 @@ static void test_settings(void)
size = 0xdead;
memset( buffer, 0xcc, sizeof(buffer) );
ret = pQueryActCtxSettingsW( 0, handle, NULL, dpiAwareW, buffer, 80, &size );
- ok( ret, "QueryActCtxSettingsW failed err %u\n", GetLastError() );
+ ok( ret, "QueryActCtxSettingsW failed err %lu\n", GetLastError() );
ok( !lstrcmpW( buffer, trueW ), "got %s\n", wine_dbgstr_w(buffer) );
- ok( size == lstrlenW( buffer ) + 1, "wrong len %lu\n", size );
+ ok( size == lstrlenW( buffer ) + 1, "wrong len %Iu\n", size );
ReleaseActCtx(handle);
}
create_manifest_file( "manifest_settings3.manifest", settings_manifest3, -1, NULL, NULL );
handle = test_create("manifest_settings3.manifest");
- ok( handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError() );
+ ok( handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError() );
DeleteFileA( "manifest_settings3.manifest" );
SetLastError( 0xdeadbeef );
size = 0xdead;
memset( buffer, 0xcc, sizeof(buffer) );
ret = pQueryActCtxSettingsW( 0, handle, NULL, dpiAwareW, buffer, 80, &size );
ok( !ret, "QueryActCtxSettingsW succeeded\n" );
- ok( GetLastError() == ERROR_SXS_KEY_NOT_FOUND, "wrong error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_SXS_KEY_NOT_FOUND, "wrong error %lu\n", GetLastError() );
ReleaseActCtx(handle);
}
@@ -3228,7 +3229,7 @@ static BOOL fill_sxs_info(sxs_info *info, const char *temp, const char *path_dll
info->handle_context = CreateActCtxA(&info->context);
ok((info->handle_context != NULL && info->handle_context != INVALID_HANDLE_VALUE )
|| broken(GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX), /* XP doesn't support manifests outside of PE files */
- "CreateActCtxA failed: %d\n", GetLastError());
+ "CreateActCtxA failed: %ld\n", GetLastError());
if (GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX)
{
skip("Failed to create activation context.\n");
@@ -3238,7 +3239,7 @@ static BOOL fill_sxs_info(sxs_info *info, const char *temp, const char *path_dll
if (do_load)
{
success = ActivateActCtx(info->handle_context, &info->cookie);
- ok(success, "ActivateActCtx failed: %d\n", GetLastError());
+ ok(success, "ActivateActCtx failed: %ld\n", GetLastError());
info->module = LoadLibraryA("sxs_dll.dll");
ok(info->module != NULL, "LoadLibrary failed\n");
@@ -3258,22 +3259,22 @@ static void clean_sxs_info(sxs_info *info)
if (*info->path_dll)
{
BOOL ret = DeleteFileA(info->path_dll);
- ok(ret, "DeleteFileA failed for %s: %d\n", info->path_dll, GetLastError());
+ ok(ret, "DeleteFileA failed for %s: %ld\n", info->path_dll, GetLastError());
}
if (*info->path_manifest_exe)
{
BOOL ret = DeleteFileA(info->path_manifest_exe);
- ok(ret, "DeleteFileA failed for %s: %d\n", info->path_manifest_exe, GetLastError());
+ ok(ret, "DeleteFileA failed for %s: %ld\n", info->path_manifest_exe, GetLastError());
}
if (*info->path_manifest_dll)
{
BOOL ret = DeleteFileA(info->path_manifest_dll);
- ok(ret, "DeleteFileA failed for %s: %d\n", info->path_manifest_dll, GetLastError());
+ ok(ret, "DeleteFileA failed for %s: %ld\n", info->path_manifest_dll, GetLastError());
}
if (*info->path_tmp)
{
BOOL ret = RemoveDirectoryA(info->path_tmp);
- ok(ret, "RemoveDirectoryA failed for %s: %d\n", info->path_tmp, GetLastError());
+ ok(ret, "RemoveDirectoryA failed for %s: %ld\n", info->path_tmp, GetLastError());
}
}
@@ -3348,7 +3349,7 @@ cleanup:
if (*path_dll_local)
{
BOOL success = DeleteFileA(path_dll_local);
- ok(success, "DeleteFileA failed for %s: %d\n", path_dll_local, GetLastError());
+ ok(success, "DeleteFileA failed for %s: %ld\n", path_dll_local, GetLastError());
}
clean_sxs_info(&dll);
}
@@ -3388,7 +3389,7 @@ cleanup:
if (*path_dll_local)
{
BOOL success = DeleteFileA(path_dll_local);
- ok(success, "DeleteFileA failed for %s: %d\n", path_dll_local, GetLastError());
+ ok(success, "DeleteFileA failed for %s: %ld\n", path_dll_local, GetLastError());
}
clean_sxs_info(&dll);
}
@@ -3414,7 +3415,7 @@ static void test_one_with_sxs_and_GetModuleHandleA(void)
goto cleanup;
success = ActivateActCtx(dll.handle_context, &dll.cookie);
- ok(success, "ActivateActCtx failed: %d\n", GetLastError());
+ ok(success, "ActivateActCtx failed: %ld\n", GetLastError());
module_temp = GetModuleHandleA("sxs_dll.dll");
ok (module_temp == 0, "Expected 0, got %p\n", module_temp);
@@ -3429,7 +3430,7 @@ cleanup:
if (*path_dll_local)
{
success = DeleteFileA(path_dll_local);
- ok(success, "DeleteFileA failed for %s: %d\n", path_dll_local, GetLastError());
+ ok(success, "DeleteFileA failed for %s: %ld\n", path_dll_local, GetLastError());
}
clean_sxs_info(&dll);
}
@@ -3459,7 +3460,7 @@ static void test_builtin_sxs(void)
handle_context = CreateActCtxA(&context);
ok((handle_context != NULL && handle_context != INVALID_HANDLE_VALUE )
|| broken(GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX), /* XP doesn't support manifests outside of PE files */
- "CreateActCtxA failed: %d\n", GetLastError());
+ "CreateActCtxA failed: %ld\n", GetLastError());
if (GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX)
{
skip("Failed to create activation context.\n");
@@ -3468,12 +3469,12 @@ static void test_builtin_sxs(void)
success = ActivateActCtx(handle_context, &cookie);
- ok(success, "ActivateActCtx failed: %d\n", GetLastError());
+ ok(success, "ActivateActCtx failed: %ld\n", GetLastError());
module_msvcp = LoadLibraryA("msvcp90.dll");
- ok (module_msvcp != 0 || broken(module_msvcp == 0), "LoadLibraryA failed, %d\n", GetLastError());
+ ok (module_msvcp != 0 || broken(module_msvcp == 0), "LoadLibraryA failed, %ld\n", GetLastError());
module_msvcr = LoadLibraryA("msvcr90.dll");
- ok (module_msvcr != 0 || broken(module_msvcr == 0), "LoadLibraryA failed, %d\n", GetLastError());
+ ok (module_msvcr != 0 || broken(module_msvcr == 0), "LoadLibraryA failed, %ld\n", GetLastError());
if (!module_msvcp || !module_msvcr)
{
skip("Failed to find msvcp90 or msvcr90.\n");
@@ -3495,7 +3496,7 @@ cleanup:
if (*path_manifest)
{
success = DeleteFileA(path_manifest);
- ok(success, "DeleteFileA failed for %s: %d\n", path_manifest, GetLastError());
+ ok(success, "DeleteFileA failed for %s: %ld\n", path_manifest, GetLastError());
}
}
@@ -3540,7 +3541,7 @@ static void run_child_process_two_dll(int run)
si.cb = sizeof(si);
ret = CreateProcessA(exe, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
- ok(ret, "Could not create process: %u\n", GetLastError());
+ ok(ret, "Could not create process: %lu\n", GetLastError());
wait_child_process( pi.hProcess );
@@ -3566,7 +3567,7 @@ static void test_manifest_in_module(void)
ctx.lpResourceName = (LPWSTR)124;
ctx.hModule = GetModuleHandleW(NULL);
handle = CreateActCtxW(&ctx);
- ok(handle != 0, "CreateActCtx error %u\n", GetLastError());
+ ok(handle != 0, "CreateActCtx error %lu\n", GetLastError());
test_basic_info(handle, __LINE__);
test_detailed_info(handle, &detailed_info3, __LINE__);
4
26
Signed-off-by: Huw Davies <huw(a)codeweavers.com>
---
dlls/win32u/ntgdi_private.h | 4 ----
1 file changed, 4 deletions(-)
diff --git a/dlls/win32u/ntgdi_private.h b/dlls/win32u/ntgdi_private.h
index 7f35707c4f2..29f1240a7b7 100644
--- a/dlls/win32u/ntgdi_private.h
+++ b/dlls/win32u/ntgdi_private.h
@@ -89,10 +89,6 @@ typedef struct tagDC
RECT bounds; /* Current bounding rect */
} DC;
-/* Certain functions will do no further processing if the driver returns this.
- Used by mfdrv for example. */
-#define GDI_NO_MORE_WORK 2
-
/* Rounds a floating point number to integer. The world-to-viewport
* transformation process is done in floating point internally. This function
* is then used to round these coordinates to integer values.
--
2.23.0
2
1
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
---
tools/widl/typetree.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c
index dc4db35e835..aa8c302c064 100644
--- a/tools/widl/typetree.c
+++ b/tools/widl/typetree.c
@@ -226,10 +226,12 @@ static size_t append_type_signature(char **buf, size_t *len, size_t pos, type_t
case TYPE_BASIC_DOUBLE:
n += strappend(buf, len, pos + n, "f8");
return n;
+ case TYPE_BASIC_CHAR:
+ n += strappend(buf, len, pos + n, type_basic_get_sign(type) <= 0 ? "i1" : "u1");
+ return n;
case TYPE_BASIC_INT16:
case TYPE_BASIC_INT3264:
case TYPE_BASIC_LONG:
- case TYPE_BASIC_CHAR:
case TYPE_BASIC_HYPER:
case TYPE_BASIC_BYTE:
case TYPE_BASIC_WCHAR:
--
2.34.1
3
4
March 3, 2022
From: Matteo Bruni <mbruni(a)codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/win32u/mapping.c | 52 +++++++++++++++++++++----------------------
dlls/win32u/region.c | 4 ++--
2 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/dlls/win32u/mapping.c b/dlls/win32u/mapping.c
index 6e7c42fe7cc..ecdbf457202 100644
--- a/dlls/win32u/mapping.c
+++ b/dlls/win32u/mapping.c
@@ -98,13 +98,13 @@ static void MAPPING_FixIsotropic( DC * dc )
if (xdim > ydim)
{
INT mincx = (dc->attr->vport_ext.cx >= 0) ? 1 : -1;
- dc->attr->vport_ext.cx = floor(dc->attr->vport_ext.cx * ydim / xdim + 0.5);
+ dc->attr->vport_ext.cx = GDI_ROUND( dc->attr->vport_ext.cx * ydim / xdim );
if (!dc->attr->vport_ext.cx) dc->attr->vport_ext.cx = mincx;
}
else
{
INT mincy = (dc->attr->vport_ext.cy >= 0) ? 1 : -1;
- dc->attr->vport_ext.cy = floor(dc->attr->vport_ext.cy * xdim / ydim + 0.5);
+ dc->attr->vport_ext.cy = GDI_ROUND( dc->attr->vport_ext.cy * xdim / ydim );
if (!dc->attr->vport_ext.cy) dc->attr->vport_ext.cy = mincy;
}
}
@@ -190,12 +190,12 @@ BOOL dp_to_lp( DC *dc, POINT *points, INT count )
{
double x = points->x;
double y = points->y;
- points->x = floor( x * dc->xformVport2World.eM11 +
- y * dc->xformVport2World.eM21 +
- dc->xformVport2World.eDx + 0.5 );
- points->y = floor( x * dc->xformVport2World.eM12 +
- y * dc->xformVport2World.eM22 +
- dc->xformVport2World.eDy + 0.5 );
+ points->x = GDI_ROUND( x * dc->xformVport2World.eM11 +
+ y * dc->xformVport2World.eM21 +
+ dc->xformVport2World.eDx );
+ points->y = GDI_ROUND( x * dc->xformVport2World.eM12 +
+ y * dc->xformVport2World.eM22 +
+ dc->xformVport2World.eDy );
points++;
}
}
@@ -221,12 +221,12 @@ BOOL WINAPI NtGdiTransformPoints( HDC hdc, const POINT *points_in, POINT *points
{
double x = points_in[i].x;
double y = points_in[i].y;
- points_out[i].x = floor( x * dc->xformWorld2Vport.eM11 +
- y * dc->xformWorld2Vport.eM21 +
- dc->xformWorld2Vport.eDx + 0.5 );
- points_out[i].y = floor( x * dc->xformWorld2Vport.eM12 +
- y * dc->xformWorld2Vport.eM22 +
- dc->xformWorld2Vport.eDy + 0.5 );
+ points_out[i].x = GDI_ROUND( x * dc->xformWorld2Vport.eM11 +
+ y * dc->xformWorld2Vport.eM21 +
+ dc->xformWorld2Vport.eDx );
+ points_out[i].y = GDI_ROUND( x * dc->xformWorld2Vport.eM12 +
+ y * dc->xformWorld2Vport.eM22 +
+ dc->xformWorld2Vport.eDy );
}
ret = TRUE;
break;
@@ -237,12 +237,12 @@ BOOL WINAPI NtGdiTransformPoints( HDC hdc, const POINT *points_in, POINT *points
{
double x = points_in[i].x;
double y = points_in[i].y;
- points_out[i].x = floor( x * dc->xformVport2World.eM11 +
- y * dc->xformVport2World.eM21 +
- dc->xformVport2World.eDx + 0.5 );
- points_out[i].y = floor( x * dc->xformVport2World.eM12 +
- y * dc->xformVport2World.eM22 +
- dc->xformVport2World.eDy + 0.5 );
+ points_out[i].x = GDI_ROUND( x * dc->xformVport2World.eM11 +
+ y * dc->xformVport2World.eM21 +
+ dc->xformVport2World.eDx );
+ points_out[i].y = GDI_ROUND( x * dc->xformVport2World.eM12 +
+ y * dc->xformVport2World.eM22 +
+ dc->xformVport2World.eDy );
}
ret = TRUE;
break;
@@ -268,12 +268,12 @@ void lp_to_dp( DC *dc, POINT *points, INT count )
{
double x = points->x;
double y = points->y;
- points->x = floor( x * dc->xformWorld2Vport.eM11 +
- y * dc->xformWorld2Vport.eM21 +
- dc->xformWorld2Vport.eDx + 0.5 );
- points->y = floor( x * dc->xformWorld2Vport.eM12 +
- y * dc->xformWorld2Vport.eM22 +
- dc->xformWorld2Vport.eDy + 0.5 );
+ points->x = GDI_ROUND( x * dc->xformWorld2Vport.eM11 +
+ y * dc->xformWorld2Vport.eM21 +
+ dc->xformWorld2Vport.eDx );
+ points->y = GDI_ROUND( x * dc->xformWorld2Vport.eM12 +
+ y * dc->xformWorld2Vport.eM22 +
+ dc->xformWorld2Vport.eDy );
points++;
}
}
diff --git a/dlls/win32u/region.c b/dlls/win32u/region.c
index 17eae861cbf..e524dd66f34 100644
--- a/dlls/win32u/region.c
+++ b/dlls/win32u/region.c
@@ -866,8 +866,8 @@ static void translate( POINT *pt, UINT count, const XFORM *xform )
{
double x = pt->x;
double y = pt->y;
- pt->x = floor( x * xform->eM11 + y * xform->eM21 + xform->eDx + 0.5 );
- pt->y = floor( x * xform->eM12 + y * xform->eM22 + xform->eDy + 0.5 );
+ pt->x = GDI_ROUND( x * xform->eM11 + y * xform->eM21 + xform->eDx );
+ pt->y = GDI_ROUND( x * xform->eM12 + y * xform->eM22 + xform->eDy );
pt++;
}
}
--
2.35.1
2
1
[PATCH] kernelbase: Add support for progress callback in CopyFileEx.
by Alistair Leslie-Hughes March 3, 2022
by Alistair Leslie-Hughes March 3, 2022
March 3, 2022
From: Michael Müller <michael(a)fds-team.de>
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
---
dlls/kernel32/tests/file.c | 6 ---
dlls/kernelbase/file.c | 77 +++++++++++++++++++++++++++++++++++---
2 files changed, 71 insertions(+), 12 deletions(-)
diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c
index f16a092a4df..b219ac7d9b9 100644
--- a/dlls/kernel32/tests/file.c
+++ b/dlls/kernel32/tests/file.c
@@ -1169,23 +1169,17 @@ static void test_CopyFileEx(void)
ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file, error %d\n", GetLastError());
SetLastError(0xdeadbeef);
retok = CopyFileExA(source, dest, copy_progress_cb, hfile, NULL, 0);
- todo_wine
ok(!retok, "CopyFileExA unexpectedly succeeded\n");
- todo_wine
ok(GetLastError() == ERROR_REQUEST_ABORTED, "expected ERROR_REQUEST_ABORTED, got %d\n", GetLastError());
ok(GetFileAttributesA(dest) != INVALID_FILE_ATTRIBUTES, "file was deleted\n");
hfile = CreateFileA(dest, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_WRITE | FILE_SHARE_DELETE,
NULL, OPEN_EXISTING, 0, 0);
- todo_wine
ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file, error %d\n", GetLastError());
SetLastError(0xdeadbeef);
retok = CopyFileExA(source, dest, copy_progress_cb, hfile, NULL, 0);
- todo_wine
ok(!retok, "CopyFileExA unexpectedly succeeded\n");
- todo_wine
ok(GetLastError() == ERROR_REQUEST_ABORTED, "expected ERROR_REQUEST_ABORTED, got %d\n", GetLastError());
- todo_wine
ok(GetFileAttributesA(dest) == INVALID_FILE_ATTRIBUTES, "file was not deleted\n");
retok = CopyFileExA(source, NULL, copy_progress_cb, hfile, NULL, 0);
diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c
index c6dc904044a..b9ba1bd7c26 100644
--- a/dlls/kernelbase/file.c
+++ b/dlls/kernelbase/file.c
@@ -499,11 +499,16 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT
{
static const int buffer_size = 65536;
HANDLE h1, h2;
- FILE_BASIC_INFORMATION info;
+ FILE_NETWORK_OPEN_INFORMATION info;
+ FILE_BASIC_INFORMATION basic_info;
IO_STATUS_BLOCK io;
DWORD count;
BOOL ret = FALSE;
char *buffer;
+ LARGE_INTEGER size;
+ LARGE_INTEGER transferred;
+ DWORD cbret;
+ DWORD source_access = GENERIC_READ;
if (!source || !dest)
{
@@ -518,7 +523,15 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT
TRACE("%s -> %s, %lx\n", debugstr_w(source), debugstr_w(dest), flags);
- if ((h1 = CreateFileW( source, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
+ if (flags & COPY_FILE_RESTARTABLE)
+ FIXME("COPY_FILE_RESTARTABLE is not supported\n");
+ if (flags & COPY_FILE_COPY_SYMLINK)
+ FIXME("COPY_FILE_COPY_SYMLINK is not supported\n");
+
+ if (flags & COPY_FILE_OPEN_SOURCE_FOR_WRITE)
+ source_access |= GENERIC_WRITE;
+
+ if ((h1 = CreateFileW( source, source_access, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
NULL, OPEN_EXISTING, 0, 0 )) == INVALID_HANDLE_VALUE)
{
WARN("Unable to open source %s\n", debugstr_w(source));
@@ -526,7 +539,7 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT
return FALSE;
}
- if (!set_ntstatus( NtQueryInformationFile( h1, &io, &info, sizeof(info), FileBasicInformation )))
+ if (!set_ntstatus( NtQueryInformationFile( h1, &io, &info, sizeof(info), FileNetworkOpenInformation )))
{
WARN("GetFileInformationByHandle returned error for %s\n", debugstr_w(source));
HeapFree( GetProcessHeap(), 0, buffer );
@@ -552,7 +565,11 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT
}
}
- if ((h2 = CreateFileW( dest, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
+ if ((h2 = CreateFileW( dest, GENERIC_WRITE | DELETE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
+ (flags & COPY_FILE_FAIL_IF_EXISTS) ? CREATE_NEW : CREATE_ALWAYS,
+ info.FileAttributes, h1 )) == INVALID_HANDLE_VALUE &&
+ /* retry without DELETE if we got a sharing violation */
+ (h2 = CreateFileW( dest, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
(flags & COPY_FILE_FAIL_IF_EXISTS) ? CREATE_NEW : CREATE_ALWAYS,
info.FileAttributes, h1 )) == INVALID_HANDLE_VALUE)
{
@@ -562,6 +579,29 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT
return FALSE;
}
+ size = info.EndOfFile;
+ transferred.QuadPart = 0;
+
+ if (progress)
+ {
+ cbret = progress( size, transferred, size, transferred, 1,
+ CALLBACK_STREAM_SWITCH, h1, h2, param );
+ if (cbret == PROGRESS_QUIET)
+ progress = NULL;
+ else if (cbret == PROGRESS_STOP)
+ {
+ SetLastError( ERROR_REQUEST_ABORTED );
+ goto done;
+ }
+ else if (cbret == PROGRESS_CANCEL)
+ {
+ BOOLEAN disp = TRUE;
+ SetFileInformationByHandle( h2, FileDispositionInfo, &disp, sizeof(disp) );
+ SetLastError( ERROR_REQUEST_ABORTED );
+ goto done;
+ }
+ }
+
while (ReadFile( h1, buffer, buffer_size, &count, NULL ) && count)
{
char *p = buffer;
@@ -571,13 +611,38 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT
if (!WriteFile( h2, p, count, &res, NULL ) || !res) goto done;
p += res;
count -= res;
+
+ if (progress)
+ {
+ transferred.QuadPart += res;
+ cbret = progress( size, transferred, size, transferred, 1,
+ CALLBACK_CHUNK_FINISHED, h1, h2, param );
+ if (cbret == PROGRESS_QUIET)
+ progress = NULL;
+ else if (cbret == PROGRESS_STOP)
+ {
+ SetLastError( ERROR_REQUEST_ABORTED );
+ goto done;
+ }
+ else if (cbret == PROGRESS_CANCEL)
+ {
+ BOOLEAN disp = TRUE;
+ SetFileInformationByHandle( h2, FileDispositionInfo, &disp, sizeof(disp) );
+ SetLastError( ERROR_REQUEST_ABORTED );
+ goto done;
+ }
+ }
}
}
ret = TRUE;
done:
/* Maintain the timestamp of source file to destination file */
- info.FileAttributes = 0;
- NtSetInformationFile( h2, &io, &info, sizeof(info), FileBasicInformation );
+ basic_info.CreationTime = info.CreationTime;
+ basic_info.LastAccessTime = info.LastAccessTime;
+ basic_info.LastWriteTime = info.LastWriteTime;
+ basic_info.ChangeTime = info.ChangeTime;
+ basic_info.FileAttributes = 0;
+ NtSetInformationFile( h2, &io, &basic_info, sizeof(basic_info), FileBasicInformation );
HeapFree( GetProcessHeap(), 0, buffer );
CloseHandle( h1 );
CloseHandle( h2 );
--
2.34.1
1
0
Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com>
---
dlls/d3dx11_43/tests/d3dx11.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/dlls/d3dx11_43/tests/d3dx11.c b/dlls/d3dx11_43/tests/d3dx11.c
index 89fc0721c92..357a84ce457 100644
--- a/dlls/d3dx11_43/tests/d3dx11.c
+++ b/dlls/d3dx11_43/tests/d3dx11.c
@@ -21,7 +21,6 @@
#include "d3d11.h"
#include "d3dx11.h"
#include "wine/test.h"
-#include "wine/heap.h"
#ifndef MAKEFOURCC
#define MAKEFOURCC(ch0, ch1, ch2, ch3) \
@@ -503,8 +502,8 @@ static HRESULT WINAPI test_d3dinclude_open(ID3DInclude *iface, D3D_INCLUDE_TYPE
if (!strcmp(filename, "include1.h"))
{
- buffer = heap_alloc(strlen(include1));
- CopyMemory(buffer, include1, strlen(include1));
+ buffer = malloc(strlen(include1));
+ memcpy(buffer, include1, strlen(include1));
*bytes = strlen(include1);
ok(include_type == D3D_INCLUDE_LOCAL, "Unexpected include type %d.\n", include_type);
ok(!strncmp(include2, parent_data, strlen(include2)),
@@ -512,8 +511,8 @@ static HRESULT WINAPI test_d3dinclude_open(ID3DInclude *iface, D3D_INCLUDE_TYPE
}
else if (!strcmp(filename, "include\\include2.h"))
{
- buffer = heap_alloc(strlen(include2));
- CopyMemory(buffer, include2, strlen(include2));
+ buffer = malloc(strlen(include2));
+ memcpy(buffer, include2, strlen(include2));
*bytes = strlen(include2);
ok(!parent_data, "Unexpected parent_data value.\n");
ok(include_type == D3D_INCLUDE_LOCAL, "Unexpected include type %d.\n", include_type);
@@ -530,7 +529,7 @@ static HRESULT WINAPI test_d3dinclude_open(ID3DInclude *iface, D3D_INCLUDE_TYPE
static HRESULT WINAPI test_d3dinclude_close(ID3DInclude *iface, const void *data)
{
- heap_free((void *)data);
+ free((void *)data);
return S_OK;
}
--
2.34.1
3
4
March 2, 2022
The imported algorithm modified to match the tests.
Fixes a regression introduced by commit
671cf16f773e5dafc7edbf7766aed9e52e4e7b56.
Windows inet_addr() behaves basically the same as Unix
inet_addr() which is different from inet_pton().
Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com>
---
v2:
- add TRACE();
- formatting.
dlls/ws2_32/protocol.c | 51 +++++++++++++++++++++--
dlls/ws2_32/tests/protocol.c | 80 ++++++++++++++++++++++++++++++++++++
2 files changed, 127 insertions(+), 4 deletions(-)
diff --git a/dlls/ws2_32/protocol.c b/dlls/ws2_32/protocol.c
index 0f56b1604d8..3194fff93cd 100644
--- a/dlls/ws2_32/protocol.c
+++ b/dlls/ws2_32/protocol.c
@@ -1834,17 +1834,60 @@ int WINAPI WSAAddressToStringW( struct sockaddr *addr, DWORD addr_len,
return 0;
}
-
/***********************************************************************
* inet_addr (ws2_32.11)
*/
u_long WINAPI inet_addr( const char *str )
{
+ unsigned long a[4] = { 0 };
+ const char *s = str;
+ unsigned char *d;
+ unsigned int i;
u_long addr;
+ char *z;
+
+ TRACE( "str %s.\n", debugstr_a(str) );
+
+ if (!s)
+ {
+ SetLastError( WSAEFAULT );
+ return INADDR_NONE;
+ }
+
+ d = (unsigned char *)&addr;
+
+ if (s[0] == ' ' && !s[1]) return 0;
- if (inet_pton( AF_INET, str, &addr ) == 1)
- return addr;
- return INADDR_NONE;
+ for (i = 0; i < 4; ++i)
+ {
+ a[i] = strtoul( s, &z, 0 );
+ if (z == s || !isdigit( *s )) return INADDR_NONE;
+ if (!*z || *z == ' ') break;
+ if (*z != '.') return INADDR_NONE;
+ s = z + 1;
+ }
+
+ if (i == 4) return INADDR_NONE;
+
+ switch (i) {
+ case 0:
+ a[1] = a[0] & 0xffffff;
+ a[0] >>= 24;
+ /* fallthrough */
+ case 1:
+ a[2] = a[1] & 0xffff;
+ a[1] >>= 16;
+ /* fallthrough */
+ case 2:
+ a[3] = a[2] & 0xff;
+ a[2] >>= 8;
+ }
+ for (i = 0; i < 4; ++i)
+ {
+ if (a[i] > 255) return INADDR_NONE;
+ d[i] = a[i];
+ }
+ return addr;
}
diff --git a/dlls/ws2_32/tests/protocol.c b/dlls/ws2_32/tests/protocol.c
index 374fa01789d..847c147b4fd 100644
--- a/dlls/ws2_32/tests/protocol.c
+++ b/dlls/ws2_32/tests/protocol.c
@@ -674,6 +674,85 @@ static void test_inet_ntoa(void)
CloseHandle(thread);
}
+static void test_inet_addr(void)
+{
+ static const struct
+ {
+ const char *input;
+ u_long addr;
+ }
+ tests[] =
+ {
+ {"1.2.3.4", 0x04030201},
+ {"1 2 3 4", 0x01000000},
+ {"1.2.3. 4", 0xffffffff},
+ {"1.2.3 .4", 0x03000201},
+ {"1.2.3 \xfe\xff", 0x03000201},
+ {"3.4.5.6.7", 0xffffffff},
+ {"3.4.5.6. 7", 0xffffffff},
+ {"3.4.5.6 7", 0x06050403},
+ {" 3.4.5.6", 0xffffffff},
+ {"\t3.4.5.6", 0xffffffff},
+ {"3.4.5.6 ", 0x06050403},
+ {"3.4.5.6 ", 0x06050403},
+ {"3. 4.5.6", 0xffffffff},
+ {"3 .4.5.6", 0x03000000},
+ {"1.2.3", 0x03000201},
+ {".1.2.3", 0xffffffff},
+ {"0.0.0.0", 0x00000000},
+ {"", 0xffffffff},
+ {" 0", 0xffffffff},
+ {"0xa1a2b3b4 ", 0xb4b3a2a1},
+ {".", 0xffffffff},
+ {" ", 0x00000000},
+ {"\t", 0xffffffff},
+ {" ", 0xffffffff},
+ {"127.127.127.255", 0xff7f7f7f},
+ {"127.127.127.255:123", 0xffffffff},
+ {"127.127.127.256", 0xffffffff},
+ {"a", 0xffffffff},
+ {"1.2.3.0xaA", 0xaa030201},
+ {"1.1.1.0x", 0xffffffff},
+ {"1.2.3.010", 0x08030201},
+ {"1.2.3.00", 0x00030201},
+ {"1.2.3.0a", 0xffffffff},
+ {"1.1.1.0o10", 0xffffffff},
+ {"1.1.1.0b10", 0xffffffff},
+ {"1.1.1.-2", 0xffffffff},
+ {"1", 0x01000000},
+ {"1.2", 0x02000001},
+ {"1.2.3", 0x03000201},
+ {"203569230", 0x4e38220c},
+ {"[0.1.2.3]", 0xffffffff},
+ {"0x00010203", 0x03020100},
+ {"0x2134", 0x34210000},
+ {"1234BEEF", 0xffffffff},
+ {"017700000001", 0x0100007f},
+ {"0777", 0xff010000},
+ {"2607:f0d0:1002:51::4", 0xffffffff},
+ {"::177.32.45.20", 0xffffffff},
+ {"::1/128", 0xffffffff},
+ {"::1", 0xffffffff},
+ {":1", 0xffffffff},
+ };
+ unsigned int i;
+ u_long addr;
+
+ WSASetLastError(0xdeadbeef);
+ addr = inet_addr(NULL);
+ ok(WSAGetLastError() == WSAEFAULT, "got error %u\n", WSAGetLastError());
+ ok(addr == 0xffffffff, "got addr %#08x\n", addr);
+ for (i = 0; i < ARRAY_SIZE(tests); ++i)
+ {
+ winetest_push_context( "Address %s, i %u", debugstr_a(tests[i].input), i );
+ WSASetLastError(0xdeadbeef);
+ addr = inet_addr(tests[i].input);
+ ok(WSAGetLastError() == 0xdeadbeef, "got error %u\n", WSAGetLastError());
+ ok(addr == tests[i].addr, "got addr %#08x\n", addr);
+ winetest_pop_context();
+ }
+}
+
static void test_inet_pton(void)
{
static const struct
@@ -2871,6 +2950,7 @@ START_TEST( protocol )
test_WSALookupService();
test_inet_ntoa();
+ test_inet_addr();
test_inet_pton();
test_addr_to_print();
test_WSAAddressToString();
--
2.35.1
2
1
[PATCH vkd3d v3 8/8] vkd3d-shader/hlsl: Treat all braceless initializers as assignments.
by Francisco Casas March 2, 2022
by Francisco Casas March 2, 2022
March 2, 2022
Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com>
---
v3:
- New in v3, split of vkd3d-shader/hlsl:
vkd3d-shader/hlsl: Reroute initialization towards a generic variable
initializer.
- Using the 'braces' flag.
Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com>
---
libs/vkd3d-shader/hlsl.y | 91 +++++++++++++++++++++-------------------
1 file changed, 48 insertions(+), 43 deletions(-)
diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y
index c98e73f7..2a6feff5 100644
--- a/libs/vkd3d-shader/hlsl.y
+++ b/libs/vkd3d-shader/hlsl.y
@@ -1498,61 +1498,66 @@ static struct list *declare_vars(struct hlsl_ctx *ctx, struct hlsl_type *basic_t
if (v->initializer.args_count)
{
- unsigned int size = initializer_size(&v->initializer);
- struct hlsl_ir_load *load;
-
- if (type->type <= HLSL_CLASS_LAST_NUMERIC && v->initializer.braces
- && type->dimx * type->dimy != size)
+ if (v->initializer.braces)
{
- hlsl_error(ctx, &v->loc, VKD3D_SHADER_ERROR_HLSL_WRONG_PARAMETER_COUNT,
- "Expected %u components in numeric initializer, but got %u.",
- type->dimx * type->dimy, v->initializer.args_count);
- free_parse_initializer(&v->initializer);
- vkd3d_free(v);
- continue;
- }
+ unsigned int size = initializer_size(&v->initializer);
- if ((type->type == HLSL_CLASS_STRUCT || type->type == HLSL_CLASS_ARRAY)
- && hlsl_type_component_count(type) != size)
- {
- hlsl_error(ctx, &v->loc, VKD3D_SHADER_ERROR_HLSL_WRONG_PARAMETER_COUNT,
- "Expected %u components in initializer, but got %u.", hlsl_type_component_count(type), size);
- free_parse_initializer(&v->initializer);
- vkd3d_free(v);
- continue;
- }
+ if (type->type <= HLSL_CLASS_LAST_NUMERIC && type->dimx * type->dimy != size)
+ {
+ hlsl_error(ctx, &v->loc, VKD3D_SHADER_ERROR_HLSL_WRONG_PARAMETER_COUNT,
+ "Expected %u components in numeric initializer, but got %u.",
+ type->dimx * type->dimy, v->initializer.args_count);
+ free_parse_initializer(&v->initializer);
+ vkd3d_free(v);
+ continue;
+ }
- if (type->type > HLSL_CLASS_LAST_NUMERIC && type->type != HLSL_CLASS_STRUCT)
- {
- FIXME("Initializers for non scalar/struct variables not supported yet.\n");
- free_parse_initializer(&v->initializer);
- vkd3d_free(v);
- continue;
- }
+ if ((type->type == HLSL_CLASS_STRUCT || type->type == HLSL_CLASS_ARRAY)
+ && hlsl_type_component_count(type) != size)
+ {
+ hlsl_error(ctx, &v->loc, VKD3D_SHADER_ERROR_HLSL_WRONG_PARAMETER_COUNT,
+ "Expected %u components in initializer, but got %u.", hlsl_type_component_count(type), size);
+ free_parse_initializer(&v->initializer);
+ vkd3d_free(v);
+ continue;
+ }
- if (type->type == HLSL_CLASS_STRUCT)
- {
- struct_var_initializer(ctx, statements_list, var, &v->initializer);
- vkd3d_free(v);
- continue;
+ if (type->type > HLSL_CLASS_LAST_NUMERIC && type->type != HLSL_CLASS_STRUCT)
+ {
+ FIXME("Initializers for non scalar/struct variables not supported yet.\n");
+ free_parse_initializer(&v->initializer);
+ vkd3d_free(v);
+ continue;
+ }
+
+ if (type->type == HLSL_CLASS_STRUCT)
+ {
+ struct_var_initializer(ctx, statements_list, var, &v->initializer);
+ vkd3d_free(v);
+ continue;
+ }
+ else
+ {
+ hlsl_fixme(ctx, &v->loc, "Complex initializer.");
+ free_parse_initializer(&v->initializer);
+ vkd3d_free(v);
+ continue;
+ }
}
- if (v->initializer.args_count > 1)
+ else
{
- hlsl_fixme(ctx, &v->loc, "Complex initializer.");
- free_parse_initializer(&v->initializer);
- vkd3d_free(v);
- continue;
- }
+ struct hlsl_ir_load *load = hlsl_new_var_load(ctx, var, var->loc);
- load = hlsl_new_var_load(ctx, var, var->loc);
- list_add_tail(v->initializer.instrs, &load->node.entry);
- add_assignment(ctx, v->initializer.instrs, &load->node, ASSIGN_OP_ASSIGN, v->initializer.args[0]);
- vkd3d_free(v->initializer.args);
+ assert(v->initializer.args_count == 1);
+ list_add_tail(v->initializer.instrs, &load->node.entry);
+ add_assignment(ctx, v->initializer.instrs, &load->node, ASSIGN_OP_ASSIGN, v->initializer.args[0]);
+ }
if (modifiers & HLSL_STORAGE_STATIC)
list_move_tail(&ctx->static_initializers, v->initializer.instrs);
else
list_move_tail(statements_list, v->initializer.instrs);
+ vkd3d_free(v->initializer.args);
vkd3d_free(v->initializer.instrs);
}
vkd3d_free(v);
--
2.25.1
1
0
[PATCH vkd3d v3 6/8] vkd3d-shader/hlsl: Don't check exact number of components for braceless initialization of numeric types.
by Francisco Casas March 2, 2022
by Francisco Casas March 2, 2022
March 2, 2022
The implicit conversion in add_assignment() takes responsability now.
Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com>
---
v3:
- New patch, split of
vkd3d-shader/hlsl: Support complex numeric initializers.
- Using the 'braces' flag instead of 'v->initializer.args_count != 1'
Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com>
---
libs/vkd3d-shader/hlsl.y | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y
index e702c234..547a2ff4 100644
--- a/libs/vkd3d-shader/hlsl.y
+++ b/libs/vkd3d-shader/hlsl.y
@@ -1501,19 +1501,17 @@ static struct list *declare_vars(struct hlsl_ctx *ctx, struct hlsl_type *basic_t
unsigned int size = initializer_size(&v->initializer);
struct hlsl_ir_load *load;
- if (type->type <= HLSL_CLASS_LAST_NUMERIC
- && type->dimx * type->dimy != size && size != 1)
+ if (type->type <= HLSL_CLASS_LAST_NUMERIC && v->initializer.braces
+ && type->dimx * type->dimy != size)
{
- if (size < type->dimx * type->dimy)
- {
- hlsl_error(ctx, &v->loc, VKD3D_SHADER_ERROR_HLSL_WRONG_PARAMETER_COUNT,
- "Expected %u components in numeric initializer, but got %u.",
- type->dimx * type->dimy, size);
- free_parse_initializer(&v->initializer);
- vkd3d_free(v);
- continue;
- }
+ hlsl_error(ctx, &v->loc, VKD3D_SHADER_ERROR_HLSL_WRONG_PARAMETER_COUNT,
+ "Expected %u components in numeric initializer, but got %u.",
+ type->dimx * type->dimy, v->initializer.args_count);
+ free_parse_initializer(&v->initializer);
+ vkd3d_free(v);
+ continue;
}
+
if ((type->type == HLSL_CLASS_STRUCT || type->type == HLSL_CLASS_ARRAY)
&& hlsl_type_component_count(type) != size)
{
--
2.25.1
1
0